@sinco/react 1.2.4 → 1.2.5-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -452,7 +452,7 @@ function _extends() {
452
452
  }, _extends.apply(null, arguments);
453
453
  }
454
454
 
455
- function memoize$2(fn) {
455
+ function memoize$1(fn) {
456
456
  var cache = Object.create(null);
457
457
  return function (arg) {
458
458
  if (cache[arg] === undefined) cache[arg] = fn(arg);
@@ -460,9 +460,10 @@ function memoize$2(fn) {
460
460
  };
461
461
  }
462
462
 
463
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
463
+ // eslint-disable-next-line no-undef
464
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
464
465
 
465
- var isPropValid = /* #__PURE__ */memoize$2(function (prop) {
466
+ var isPropValid = /* #__PURE__ */memoize$1(function (prop) {
466
467
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
467
468
  /* o */
468
469
  && prop.charCodeAt(1) === 110
@@ -630,14 +631,6 @@ var unitlessKeys = {
630
631
  strokeWidth: 1
631
632
  };
632
633
 
633
- function memoize$1(fn) {
634
- var cache = Object.create(null);
635
- return function (arg) {
636
- if (cache[arg] === undefined) cache[arg] = fn(arg);
637
- return cache[arg];
638
- };
639
- }
640
-
641
634
  var isDevelopment = false;
642
635
 
643
636
  var hyphenateRegex = /[A-Z]|^ms/g;
@@ -732,7 +725,6 @@ function handleInterpolation(mergedProps, registered, interpolation) {
732
725
  }
733
726
 
734
727
  var styles = serializedStyles.styles + ";";
735
-
736
728
  return styles;
737
729
  }
738
730
 
@@ -818,10 +810,9 @@ function createStringFromObject(mergedProps, registered, obj) {
818
810
  return string;
819
811
  }
820
812
 
821
- var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
813
+ var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes
822
814
  // keyframes are stored on the SerializedStyles object as a linked list
823
815
 
824
-
825
816
  var cursor;
826
817
  function serializeStyles(args, registered, mergedProps) {
827
818
  if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
@@ -851,7 +842,7 @@ function serializeStyles(args, registered, mergedProps) {
851
842
 
852
843
  styles += templateStringsArr[i];
853
844
  }
854
- }
845
+ } // using a global regex with .exec is stateful so lastIndex has to be reset each time
855
846
 
856
847
 
857
848
  labelPattern.lastIndex = 0;
@@ -2262,7 +2253,7 @@ var propTypesExports = propTypes.exports;
2262
2253
  var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
2263
2254
 
2264
2255
  /**
2265
- * @mui/styled-engine v6.1.6
2256
+ * @mui/styled-engine v6.1.8
2266
2257
  *
2267
2258
  * @license MIT
2268
2259
  * This source code is licensed under the MIT license found in the
@@ -2311,7 +2302,7 @@ function isPlainObject(item) {
2311
2302
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
2312
2303
  }
2313
2304
  function deepClone(source) {
2314
- if (!isPlainObject(source)) {
2305
+ if (/*#__PURE__*/React.isValidElement(source) || !isPlainObject(source)) {
2315
2306
  return source;
2316
2307
  }
2317
2308
  const output = {};
@@ -2328,7 +2319,9 @@ function deepmerge(target, source, options = {
2328
2319
  } : target;
2329
2320
  if (isPlainObject(target) && isPlainObject(source)) {
2330
2321
  Object.keys(source).forEach(key => {
2331
- if (isPlainObject(source[key]) &&
2322
+ if (/*#__PURE__*/React.isValidElement(source[key])) {
2323
+ output[key] = source[key];
2324
+ } else if (isPlainObject(source[key]) &&
2332
2325
  // Avoid prototype pollution
2333
2326
  Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
2334
2327
  // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
@@ -2345,7 +2338,7 @@ function deepmerge(target, source, options = {
2345
2338
 
2346
2339
  // Sorted ASC by size. That's important.
2347
2340
  // It can't be configured as it's used statically for propTypes.
2348
- const sortBreakpointsValues$1 = values => {
2341
+ const sortBreakpointsValues = values => {
2349
2342
  const breakpointsAsArray = Object.keys(values).map(key => ({
2350
2343
  key,
2351
2344
  val: values[key]
@@ -2361,7 +2354,7 @@ const sortBreakpointsValues$1 = values => {
2361
2354
  };
2362
2355
 
2363
2356
  // Keep in mind that @media is inclusive by the CSS specification.
2364
- function createBreakpoints$1(breakpoints) {
2357
+ function createBreakpoints(breakpoints) {
2365
2358
  const {
2366
2359
  // The breakpoint **start** at this value.
2367
2360
  // For instance with the first breakpoint xs: [xs, sm).
@@ -2380,7 +2373,7 @@ function createBreakpoints$1(breakpoints) {
2380
2373
  step = 5,
2381
2374
  ...other
2382
2375
  } = breakpoints;
2383
- const sortedValues = sortBreakpointsValues$1(values);
2376
+ const sortedValues = sortBreakpointsValues(values);
2384
2377
  const keys = Object.keys(sortedValues);
2385
2378
  function up(key) {
2386
2379
  const value = typeof values[key] === 'number' ? values[key] : key;
@@ -3639,7 +3632,7 @@ function createTheme$1(options = {}, ...args) {
3639
3632
  shape: shapeInput = {},
3640
3633
  ...other
3641
3634
  } = options;
3642
- const breakpoints = createBreakpoints$1(breakpointsInput);
3635
+ const breakpoints = createBreakpoints(breakpointsInput);
3643
3636
  const spacing = createSpacing(spacingInput);
3644
3637
  let muiTheme = deepmerge({
3645
3638
  breakpoints,
@@ -4463,7 +4456,7 @@ function getThemeProps$1(params) {
4463
4456
  return resolveProps(theme.components[name].defaultProps, props);
4464
4457
  }
4465
4458
 
4466
- function useThemeProps$1({
4459
+ function useThemeProps({
4467
4460
  props,
4468
4461
  name,
4469
4462
  defaultTheme,
@@ -5027,6 +5020,22 @@ function useEventCallback(fn) {
5027
5020
  (0, ref.current)(...args)).current;
5028
5021
  }
5029
5022
 
5023
+ /**
5024
+ * Takes an array of refs and returns a new ref which will apply any modification to all of the refs.
5025
+ * This is useful when you want to have the ref used in multiple places.
5026
+ *
5027
+ * ```tsx
5028
+ * const rootRef = React.useRef<Instance>(null);
5029
+ * const refFork = useForkRef(rootRef, props.ref);
5030
+ *
5031
+ * return (
5032
+ * <Root {...props} ref={refFork} />
5033
+ * );
5034
+ * ```
5035
+ *
5036
+ * @param {Array<React.Ref<Instance> | undefined>} refs The ref array.
5037
+ * @returns {React.RefCallback<Instance> | null} The new ref callback.
5038
+ */
5030
5039
  function useForkRef(...refs) {
5031
5040
  /**
5032
5041
  * This will create a new function if the refs passed to this hook change and are all defined.
@@ -5371,25 +5380,20 @@ function resolveComponentProps(componentProps, ownerState, slotState) {
5371
5380
  }
5372
5381
 
5373
5382
  /**
5374
- * Returns the ref of a React node handling differences between React 19 and older versions.
5375
- * It will return null if the node is not a valid React element.
5383
+ * Returns the ref of a React element handling differences between React 19 and older versions.
5384
+ * It will throw runtime error if the element is not a valid React element.
5376
5385
  *
5377
- * @param element React.ReactNode
5386
+ * @param element React.ReactElement
5378
5387
  * @returns React.Ref<any> | null
5379
- *
5380
- * @deprecated Use getReactElementRef instead
5381
5388
  */
5382
- function getReactNodeRef(element) {
5383
- if (!element || ! /*#__PURE__*/React.isValidElement(element)) {
5384
- return null;
5385
- }
5386
-
5389
+ function getReactElementRef(element) {
5387
5390
  // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions
5388
- return element.props.propertyIsEnumerable('ref') ? element.props.ref :
5391
+ if (parseInt(React.version, 10) >= 19) {
5392
+ return element?.props?.ref || null;
5393
+ }
5389
5394
  // @ts-expect-error element.ref is not included in the ReactElement type
5390
- // We cannot check for it, but isValidElement is true at this point
5391
5395
  // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189
5392
- element.ref;
5396
+ return element?.ref || null;
5393
5397
  }
5394
5398
 
5395
5399
  const RtlContext = /*#__PURE__*/React.createContext();
@@ -5451,6 +5455,33 @@ function useDefaultProps$1({
5451
5455
  });
5452
5456
  }
5453
5457
 
5458
+ /* eslint-disable @typescript-eslint/naming-convention */
5459
+
5460
+ // We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to
5461
+ // allocate more objects.
5462
+ const arg = {
5463
+ theme: undefined
5464
+ };
5465
+
5466
+ /**
5467
+ * Memoize style function on theme.
5468
+ * Intended to be used in styled() calls that only need access to the theme.
5469
+ */
5470
+ function unstable_memoTheme(styleFn) {
5471
+ let lastValue;
5472
+ let lastTheme;
5473
+ return function styleMemoized(props) {
5474
+ let value = lastValue;
5475
+ if (value === undefined || props.theme !== lastTheme) {
5476
+ arg.theme = props.theme;
5477
+ value = preprocessStyles(styleFn(arg));
5478
+ lastValue = value;
5479
+ lastTheme = props.theme;
5480
+ }
5481
+ return value;
5482
+ };
5483
+ }
5484
+
5454
5485
  /**
5455
5486
  * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
5456
5487
  * and they does not need to remember the prefix (defined once).
@@ -5790,7 +5821,7 @@ const defaultCreateStyledComponent = styled$1('div', {
5790
5821
  overridesResolver: (props, styles) => styles.root
5791
5822
  });
5792
5823
  function useThemePropsDefault(props) {
5793
- return useThemeProps$1({
5824
+ return useThemeProps({
5794
5825
  props,
5795
5826
  name: 'MuiStack',
5796
5827
  defaultTheme: defaultTheme$2
@@ -6065,70 +6096,76 @@ const green = {
6065
6096
  A700: '#00c853'
6066
6097
  };
6067
6098
 
6068
- const light = {
6069
- // The colors used to style the text.
6070
- text: {
6071
- // The most important text.
6072
- primary: 'rgba(0, 0, 0, 0.87)',
6073
- // Secondary text.
6074
- secondary: 'rgba(0, 0, 0, 0.6)',
6075
- // Disabled text have even lower visual prominence.
6076
- disabled: 'rgba(0, 0, 0, 0.38)'
6077
- },
6078
- // The color used to divide different elements.
6079
- divider: 'rgba(0, 0, 0, 0.12)',
6080
- // The background colors used to style the surfaces.
6081
- // Consistency between these values is important.
6082
- background: {
6083
- paper: common.white,
6084
- default: common.white
6085
- },
6086
- // The colors used to style the action elements.
6087
- action: {
6088
- // The color of an active action like an icon button.
6089
- active: 'rgba(0, 0, 0, 0.54)',
6090
- // The color of an hovered action.
6091
- hover: 'rgba(0, 0, 0, 0.04)',
6092
- hoverOpacity: 0.04,
6093
- // The color of a selected action.
6094
- selected: 'rgba(0, 0, 0, 0.08)',
6095
- selectedOpacity: 0.08,
6096
- // The color of a disabled action.
6097
- disabled: 'rgba(0, 0, 0, 0.26)',
6098
- // The background color of a disabled action.
6099
- disabledBackground: 'rgba(0, 0, 0, 0.12)',
6100
- disabledOpacity: 0.38,
6101
- focus: 'rgba(0, 0, 0, 0.12)',
6102
- focusOpacity: 0.12,
6103
- activatedOpacity: 0.12
6104
- }
6105
- };
6106
- const dark = {
6107
- text: {
6108
- primary: common.white,
6109
- secondary: 'rgba(255, 255, 255, 0.7)',
6110
- disabled: 'rgba(255, 255, 255, 0.5)',
6111
- icon: 'rgba(255, 255, 255, 0.5)'
6112
- },
6113
- divider: 'rgba(255, 255, 255, 0.12)',
6114
- background: {
6115
- paper: '#121212',
6116
- default: '#121212'
6117
- },
6118
- action: {
6119
- active: common.white,
6120
- hover: 'rgba(255, 255, 255, 0.08)',
6121
- hoverOpacity: 0.08,
6122
- selected: 'rgba(255, 255, 255, 0.16)',
6123
- selectedOpacity: 0.16,
6124
- disabled: 'rgba(255, 255, 255, 0.3)',
6125
- disabledBackground: 'rgba(255, 255, 255, 0.12)',
6126
- disabledOpacity: 0.38,
6127
- focus: 'rgba(255, 255, 255, 0.12)',
6128
- focusOpacity: 0.12,
6129
- activatedOpacity: 0.24
6130
- }
6131
- };
6099
+ function getLight() {
6100
+ return {
6101
+ // The colors used to style the text.
6102
+ text: {
6103
+ // The most important text.
6104
+ primary: 'rgba(0, 0, 0, 0.87)',
6105
+ // Secondary text.
6106
+ secondary: 'rgba(0, 0, 0, 0.6)',
6107
+ // Disabled text have even lower visual prominence.
6108
+ disabled: 'rgba(0, 0, 0, 0.38)'
6109
+ },
6110
+ // The color used to divide different elements.
6111
+ divider: 'rgba(0, 0, 0, 0.12)',
6112
+ // The background colors used to style the surfaces.
6113
+ // Consistency between these values is important.
6114
+ background: {
6115
+ paper: common.white,
6116
+ default: common.white
6117
+ },
6118
+ // The colors used to style the action elements.
6119
+ action: {
6120
+ // The color of an active action like an icon button.
6121
+ active: 'rgba(0, 0, 0, 0.54)',
6122
+ // The color of an hovered action.
6123
+ hover: 'rgba(0, 0, 0, 0.04)',
6124
+ hoverOpacity: 0.04,
6125
+ // The color of a selected action.
6126
+ selected: 'rgba(0, 0, 0, 0.08)',
6127
+ selectedOpacity: 0.08,
6128
+ // The color of a disabled action.
6129
+ disabled: 'rgba(0, 0, 0, 0.26)',
6130
+ // The background color of a disabled action.
6131
+ disabledBackground: 'rgba(0, 0, 0, 0.12)',
6132
+ disabledOpacity: 0.38,
6133
+ focus: 'rgba(0, 0, 0, 0.12)',
6134
+ focusOpacity: 0.12,
6135
+ activatedOpacity: 0.12
6136
+ }
6137
+ };
6138
+ }
6139
+ const light = getLight();
6140
+ function getDark() {
6141
+ return {
6142
+ text: {
6143
+ primary: common.white,
6144
+ secondary: 'rgba(255, 255, 255, 0.7)',
6145
+ disabled: 'rgba(255, 255, 255, 0.5)',
6146
+ icon: 'rgba(255, 255, 255, 0.5)'
6147
+ },
6148
+ divider: 'rgba(255, 255, 255, 0.12)',
6149
+ background: {
6150
+ paper: '#121212',
6151
+ default: '#121212'
6152
+ },
6153
+ action: {
6154
+ active: common.white,
6155
+ hover: 'rgba(255, 255, 255, 0.08)',
6156
+ hoverOpacity: 0.08,
6157
+ selected: 'rgba(255, 255, 255, 0.16)',
6158
+ selectedOpacity: 0.16,
6159
+ disabled: 'rgba(255, 255, 255, 0.3)',
6160
+ disabledBackground: 'rgba(255, 255, 255, 0.12)',
6161
+ disabledOpacity: 0.38,
6162
+ focus: 'rgba(255, 255, 255, 0.12)',
6163
+ focusOpacity: 0.12,
6164
+ activatedOpacity: 0.24
6165
+ }
6166
+ };
6167
+ }
6168
+ const dark = getDark();
6132
6169
  function addLightOrDark(intent, direction, shade, tonalOffset) {
6133
6170
  const tonalOffsetLight = tonalOffset.light || tonalOffset;
6134
6171
  const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;
@@ -6268,24 +6305,10 @@ function createPalette(palette) {
6268
6305
  color.main = color[mainShade];
6269
6306
  }
6270
6307
  if (!color.hasOwnProperty('main')) {
6271
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
6272
- The color object needs to have a \`main\` property or a \`${mainShade}\` property.` : formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));
6308
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n` + `The color object needs to have a \`main\` property or a \`${mainShade}\` property.` : formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));
6273
6309
  }
6274
6310
  if (typeof color.main !== 'string') {
6275
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
6276
- \`color.main\` should be a string, but \`${JSON.stringify(color.main)}\` was provided instead.
6277
-
6278
- Did you intend to use one of the following approaches?
6279
-
6280
- import { green } from "@mui/material/colors";
6281
-
6282
- const theme1 = createTheme({ palette: {
6283
- primary: green,
6284
- } });
6285
-
6286
- const theme2 = createTheme({ palette: {
6287
- primary: { main: green[500] },
6288
- } });` : formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));
6311
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n` + `\`color.main\` should be a string, but \`${JSON.stringify(color.main)}\` was provided instead.\n` + '\n' + 'Did you intend to use one of the following approaches?\n' + '\n' + 'import { green } from "@mui/material/colors";\n' + '\n' + 'const theme1 = createTheme({ palette: {\n' + ' primary: green,\n' + '} });\n' + '\n' + 'const theme2 = createTheme({ palette: {\n' + ' primary: { main: green[500] },\n' + '} });' : formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));
6289
6312
  }
6290
6313
  addLightOrDark(color, 'light', lightShade, tonalOffset);
6291
6314
  addLightOrDark(color, 'dark', darkShade, tonalOffset);
@@ -6294,12 +6317,14 @@ const theme2 = createTheme({ palette: {
6294
6317
  }
6295
6318
  return color;
6296
6319
  };
6297
- const modes = {
6298
- dark,
6299
- light
6300
- };
6320
+ let modeHydrated;
6321
+ if (mode === 'light') {
6322
+ modeHydrated = getLight();
6323
+ } else if (mode === 'dark') {
6324
+ modeHydrated = getDark();
6325
+ }
6301
6326
  if (process.env.NODE_ENV !== 'production') {
6302
- if (!modes[mode]) {
6327
+ if (!modeHydrated) {
6303
6328
  console.error(`MUI: The palette mode \`${mode}\` is not supported.`);
6304
6329
  }
6305
6330
  }
@@ -6358,7 +6383,7 @@ const theme2 = createTheme({ palette: {
6358
6383
  // E.g., shift from Red 500 to Red 300 or Red 700.
6359
6384
  tonalOffset,
6360
6385
  // The light and dark mode object.
6361
- ...modes[mode]
6386
+ ...modeHydrated
6362
6387
  }, other);
6363
6388
  return paletteOutput;
6364
6389
  }
@@ -6597,6 +6622,60 @@ const zIndex = {
6597
6622
  tooltip: 1500
6598
6623
  };
6599
6624
 
6625
+ /* eslint-disable import/prefer-default-export */
6626
+ function isSerializable(val) {
6627
+ return isPlainObject(val) || typeof val === 'undefined' || typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number' || Array.isArray(val);
6628
+ }
6629
+
6630
+ /**
6631
+ * `baseTheme` usually comes from `createTheme()` or `extendTheme()`.
6632
+ *
6633
+ * This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS
6634
+ * For example, in a Next.js project:
6635
+ *
6636
+ * ```js
6637
+ * // next.config.js
6638
+ * const { extendTheme } = require('@mui/material/styles');
6639
+ *
6640
+ * const theme = extendTheme();
6641
+ * // `.toRuntimeSource` is Pigment CSS specific to create a theme that is available at runtime.
6642
+ * theme.toRuntimeSource = stringifyTheme;
6643
+ *
6644
+ * module.exports = withPigment({
6645
+ * theme,
6646
+ * });
6647
+ * ```
6648
+ */
6649
+ function stringifyTheme(baseTheme = {}) {
6650
+ const serializableTheme = {
6651
+ ...baseTheme
6652
+ };
6653
+ function serializeTheme(object) {
6654
+ const array = Object.entries(object);
6655
+ // eslint-disable-next-line no-plusplus
6656
+ for (let index = 0; index < array.length; index++) {
6657
+ const [key, value] = array[index];
6658
+ if (!isSerializable(value) || key.startsWith('unstable_')) {
6659
+ delete object[key];
6660
+ } else if (isPlainObject(value)) {
6661
+ object[key] = {
6662
+ ...value
6663
+ };
6664
+ serializeTheme(object[key]);
6665
+ }
6666
+ }
6667
+ }
6668
+ serializeTheme(serializableTheme);
6669
+ return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
6670
+
6671
+ const theme = ${JSON.stringify(serializableTheme, null, 2)};
6672
+
6673
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
6674
+ theme.transitions = createTransitions(theme.transitions || {});
6675
+
6676
+ export default theme;`;
6677
+ }
6678
+
6600
6679
  function createThemeNoVars(options = {}, ...args) {
6601
6680
  const {
6602
6681
  breakpoints: breakpointsInput,
@@ -6609,8 +6688,7 @@ function createThemeNoVars(options = {}, ...args) {
6609
6688
  ...other
6610
6689
  } = options;
6611
6690
  if (options.vars) {
6612
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
6613
- Please use another name.` : formatMuiErrorMessage(20));
6691
+ throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' + 'Please use another name.' : formatMuiErrorMessage(20));
6614
6692
  }
6615
6693
  const palette = createPalette(paletteInput);
6616
6694
  const systemTheme = createTheme$1(options);
@@ -6667,6 +6745,8 @@ Please use another name.` : formatMuiErrorMessage(20));
6667
6745
  theme: this
6668
6746
  });
6669
6747
  };
6748
+ muiTheme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration
6749
+
6670
6750
  return muiTheme;
6671
6751
  }
6672
6752
 
@@ -6683,7 +6763,7 @@ function getOverlayAlpha(elevation) {
6683
6763
 
6684
6764
  const defaultDarkOverlays = [...Array(25)].map((_, index) => {
6685
6765
  if (index === 0) {
6686
- return undefined;
6766
+ return 'none';
6687
6767
  }
6688
6768
  const overlay = getOverlayAlpha(index);
6689
6769
  return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;
@@ -6722,7 +6802,7 @@ function createColorScheme(options) {
6722
6802
  }
6723
6803
 
6724
6804
  function shouldSkipGeneratingVar(keys) {
6725
- return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
6805
+ return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
6726
6806
  // ends with sxConfig
6727
6807
  keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
6728
6808
  }
@@ -6730,9 +6810,10 @@ function shouldSkipGeneratingVar(keys) {
6730
6810
  /**
6731
6811
  * @internal These variables should not appear in the :root stylesheet when the `defaultColorScheme="dark"`
6732
6812
  */
6733
- const excludeVariablesFromRoot = cssVarPrefix => [...[...Array(24)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index + 1}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];
6813
+ const excludeVariablesFromRoot = cssVarPrefix => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];
6734
6814
 
6735
- var defaultGetSelector = (theme => (colorScheme, css) => {
6815
+ var defaultGetSelector = theme => (colorScheme, css) => {
6816
+ const root = theme.rootSelector || ':root';
6736
6817
  const selector = theme.colorSchemeSelector;
6737
6818
  let rule = selector;
6738
6819
  if (selector === 'class') {
@@ -6754,33 +6835,33 @@ var defaultGetSelector = (theme => (colorScheme, css) => {
6754
6835
  });
6755
6836
  if (rule === 'media') {
6756
6837
  return {
6757
- ':root': css,
6838
+ [root]: css,
6758
6839
  [`@media (prefers-color-scheme: dark)`]: {
6759
- ':root': excludedVariables
6840
+ [root]: excludedVariables
6760
6841
  }
6761
6842
  };
6762
6843
  }
6763
6844
  if (rule) {
6764
6845
  return {
6765
6846
  [rule.replace('%s', colorScheme)]: excludedVariables,
6766
- [`:root, ${rule.replace('%s', colorScheme)}`]: css
6847
+ [`${root}, ${rule.replace('%s', colorScheme)}`]: css
6767
6848
  };
6768
6849
  }
6769
6850
  return {
6770
- ':root': {
6851
+ [root]: {
6771
6852
  ...css,
6772
6853
  ...excludedVariables
6773
6854
  }
6774
6855
  };
6775
6856
  }
6776
6857
  if (rule && rule !== 'media') {
6777
- return `:root, ${rule.replace('%s', String(colorScheme))}`;
6858
+ return `${root}, ${rule.replace('%s', String(colorScheme))}`;
6778
6859
  }
6779
6860
  } else if (colorScheme) {
6780
6861
  if (rule === 'media') {
6781
6862
  return {
6782
6863
  [`@media (prefers-color-scheme: ${String(colorScheme)})`]: {
6783
- ':root': css
6864
+ [root]: css
6784
6865
  }
6785
6866
  };
6786
6867
  }
@@ -6788,62 +6869,8 @@ var defaultGetSelector = (theme => (colorScheme, css) => {
6788
6869
  return rule.replace('%s', String(colorScheme));
6789
6870
  }
6790
6871
  }
6791
- return ':root';
6792
- });
6793
-
6794
- /* eslint-disable import/prefer-default-export */
6795
- function isSerializable(val) {
6796
- return isPlainObject(val) || typeof val === 'undefined' || typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number' || Array.isArray(val);
6797
- }
6798
-
6799
- /**
6800
- * `baseTheme` usually comes from `createTheme` or `extendTheme`.
6801
- *
6802
- * This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS
6803
- * For example, in a Next.js project:
6804
- *
6805
- * ```js
6806
- * // next.config.js
6807
- * const { extendTheme } = require('@mui/material/styles');
6808
- *
6809
- * const theme = extendTheme();
6810
- * // `.toRuntimeSource` is Pigment CSS specific to create a theme that is available at runtime.
6811
- * theme.toRuntimeSource = stringifyTheme;
6812
- *
6813
- * module.exports = withPigment({
6814
- * theme,
6815
- * });
6816
- * ```
6817
- */
6818
- function stringifyTheme(baseTheme = {}) {
6819
- const serializableTheme = {
6820
- ...baseTheme
6821
- };
6822
- function serializeTheme(object) {
6823
- const array = Object.entries(object);
6824
- // eslint-disable-next-line no-plusplus
6825
- for (let index = 0; index < array.length; index++) {
6826
- const [key, value] = array[index];
6827
- if (!isSerializable(value) || key.startsWith('unstable_')) {
6828
- delete object[key];
6829
- } else if (isPlainObject(value)) {
6830
- object[key] = {
6831
- ...value
6832
- };
6833
- serializeTheme(object[key]);
6834
- }
6835
- }
6836
- }
6837
- serializeTheme(serializableTheme);
6838
- return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
6839
-
6840
- const theme = ${JSON.stringify(serializableTheme, null, 2)};
6841
-
6842
- theme.breakpoints = createBreakpoints(theme.breakpoints || {});
6843
- theme.transitions = createTransitions(theme.transitions || {});
6844
-
6845
- export default theme;`;
6846
- }
6872
+ return root;
6873
+ };
6847
6874
 
6848
6875
  function assignNode(obj, keys) {
6849
6876
  keys.forEach(k => {
@@ -6944,6 +6971,7 @@ function createThemeWithVars(options = {}, ...args) {
6944
6971
  cssVarPrefix = 'mui',
6945
6972
  shouldSkipGeneratingVar: shouldSkipGeneratingVar$1 = shouldSkipGeneratingVar,
6946
6973
  colorSchemeSelector: selector = colorSchemesInput.light && colorSchemesInput.dark ? 'media' : undefined,
6974
+ rootSelector = ':root',
6947
6975
  ...input
6948
6976
  } = options;
6949
6977
  const firstColorScheme = Object.keys(colorSchemesInput)[0];
@@ -6981,6 +7009,7 @@ function createThemeWithVars(options = {}, ...args) {
6981
7009
  ...muiTheme,
6982
7010
  cssVarPrefix,
6983
7011
  colorSchemeSelector: selector,
7012
+ rootSelector,
6984
7013
  getCssVar,
6985
7014
  colorSchemes,
6986
7015
  font: {
@@ -7319,24 +7348,13 @@ const defaultTheme$1 = createTheme();
7319
7348
  function useTheme() {
7320
7349
  const theme = useTheme$1(defaultTheme$1);
7321
7350
  if (process.env.NODE_ENV !== 'production') {
7351
+ // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
7322
7352
  // eslint-disable-next-line react-hooks/rules-of-hooks
7323
7353
  React.useDebugValue(theme);
7324
7354
  }
7325
7355
  return theme[THEME_ID] || theme;
7326
7356
  }
7327
7357
 
7328
- function useThemeProps({
7329
- props,
7330
- name
7331
- }) {
7332
- return useThemeProps$1({
7333
- props,
7334
- name,
7335
- defaultTheme: defaultTheme$1,
7336
- themeId: THEME_ID
7337
- });
7338
- }
7339
-
7340
7358
  // copied from @mui/system/createStyled
7341
7359
  function slotShouldForwardProp(prop) {
7342
7360
  return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
@@ -8395,9 +8413,6 @@ var components = {
8395
8413
  }
8396
8414
  },
8397
8415
  MuiIconButton: {
8398
- defaultProps: {
8399
- color: "primary"
8400
- },
8401
8416
  styleOverrides: {
8402
8417
  sizeSmall: {
8403
8418
  padding: 3
@@ -8982,94 +8997,6 @@ var paletteADC = _objectSpread2({
8982
8997
  }
8983
8998
  }, BasicPalette);
8984
8999
 
8985
- function _objectWithoutPropertiesLoose(r, e) {
8986
- if (null == r) return {};
8987
- var t = {};
8988
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
8989
- if (e.indexOf(n) >= 0) continue;
8990
- t[n] = r[n];
8991
- }
8992
- return t;
8993
- }
8994
-
8995
- const _excluded = ["values", "unit", "step"];
8996
- const sortBreakpointsValues = values => {
8997
- const breakpointsAsArray = Object.keys(values).map(key => ({
8998
- key,
8999
- val: values[key]
9000
- })) || [];
9001
- // Sort in ascending order
9002
- breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
9003
- return breakpointsAsArray.reduce((acc, obj) => {
9004
- return _extends({}, acc, {
9005
- [obj.key]: obj.val
9006
- });
9007
- }, {});
9008
- };
9009
-
9010
- // Keep in mind that @media is inclusive by the CSS specification.
9011
- function createBreakpoints(breakpoints) {
9012
- const {
9013
- // The breakpoint **start** at this value.
9014
- // For instance with the first breakpoint xs: [xs, sm).
9015
- values = {
9016
- xs: 0,
9017
- // phone
9018
- sm: 600,
9019
- // tablet
9020
- md: 900,
9021
- // small laptop
9022
- lg: 1200,
9023
- // desktop
9024
- xl: 1536 // large screen
9025
- },
9026
- unit = 'px',
9027
- step = 5
9028
- } = breakpoints,
9029
- other = _objectWithoutPropertiesLoose(breakpoints, _excluded);
9030
- const sortedValues = sortBreakpointsValues(values);
9031
- const keys = Object.keys(sortedValues);
9032
- function up(key) {
9033
- const value = typeof values[key] === 'number' ? values[key] : key;
9034
- return `@media (min-width:${value}${unit})`;
9035
- }
9036
- function down(key) {
9037
- const value = typeof values[key] === 'number' ? values[key] : key;
9038
- return `@media (max-width:${value - step / 100}${unit})`;
9039
- }
9040
- function between(start, end) {
9041
- const endIndex = keys.indexOf(end);
9042
- return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
9043
- }
9044
- function only(key) {
9045
- if (keys.indexOf(key) + 1 < keys.length) {
9046
- return between(key, keys[keys.indexOf(key) + 1]);
9047
- }
9048
- return up(key);
9049
- }
9050
- function not(key) {
9051
- // handle first and last key separately, for better readability
9052
- const keyIndex = keys.indexOf(key);
9053
- if (keyIndex === 0) {
9054
- return up(keys[1]);
9055
- }
9056
- if (keyIndex === keys.length - 1) {
9057
- return down(keys[keyIndex]);
9058
- }
9059
- return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
9060
- }
9061
- return _extends({
9062
- keys,
9063
- values: sortedValues,
9064
- up,
9065
- down,
9066
- between,
9067
- only,
9068
- not,
9069
- unit
9070
- }, other);
9071
- }
9072
-
9073
9000
  var breakpoints = createBreakpoints({
9074
9001
  values: {
9075
9002
  xs: 0,
@@ -9093,30 +9020,7 @@ function internal_createExtendSxProp() {
9093
9020
  return extendSxProp$1;
9094
9021
  }
9095
9022
 
9096
- // We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to
9097
- // allocate more objects.
9098
- const arg = {
9099
- theme: undefined
9100
- };
9101
-
9102
- /**
9103
- * Memoize style function on theme.
9104
- * Intended to be used in styled() calls that only need access to the theme.
9105
- */
9106
- function memoTheme(styleFn) {
9107
- let lastValue;
9108
- let lastTheme;
9109
- return props => {
9110
- let value = lastValue;
9111
- if (value === undefined || props.theme !== lastTheme) {
9112
- arg.theme = props.theme;
9113
- value = styleFn(arg);
9114
- lastValue = value;
9115
- lastTheme = props.theme;
9116
- }
9117
- return value;
9118
- };
9119
- }
9023
+ const memoTheme = unstable_memoTheme;
9120
9024
 
9121
9025
  process.env.NODE_ENV !== "production" ? {
9122
9026
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -9136,6 +9040,48 @@ function useDefaultProps(params) {
9136
9040
  return useDefaultProps$1(params);
9137
9041
  }
9138
9042
 
9043
+ /**
9044
+ * Type guard to check if the object has a "main" property of type string.
9045
+ *
9046
+ * @param obj - the object to check
9047
+ * @returns boolean
9048
+ */
9049
+ function hasCorrectMainProperty(obj) {
9050
+ return typeof obj.main === 'string';
9051
+ }
9052
+ /**
9053
+ * Checks if the object conforms to the SimplePaletteColorOptions type.
9054
+ * The minimum requirement is that the object has a "main" property of type string, this is always checked.
9055
+ * Optionally, you can pass additional properties to check.
9056
+ *
9057
+ * @param obj - The object to check
9058
+ * @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
9059
+ * @returns boolean
9060
+ */
9061
+ function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
9062
+ if (!hasCorrectMainProperty(obj)) {
9063
+ return false;
9064
+ }
9065
+ for (const value of additionalPropertiesToCheck) {
9066
+ if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {
9067
+ return false;
9068
+ }
9069
+ }
9070
+ return true;
9071
+ }
9072
+
9073
+ /**
9074
+ * Creates a filter function used to filter simple palette color options.
9075
+ * The minimum requirement is that the object has a "main" property of type string, this is always checked.
9076
+ * Optionally, you can pass additional properties to check.
9077
+ *
9078
+ * @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
9079
+ * @returns ([, value]: [any, PaletteColorOptions]) => boolean
9080
+ */
9081
+ function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
9082
+ return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
9083
+ }
9084
+
9139
9085
  function getTypographyUtilityClass(slot) {
9140
9086
  return generateUtilityClass('MuiTypography', slot);
9141
9087
  }
@@ -9195,7 +9141,7 @@ const TypographyRoot = styled('span', {
9195
9141
  variant
9196
9142
  },
9197
9143
  style: value
9198
- })), ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
9144
+ })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
9199
9145
  props: {
9200
9146
  color
9201
9147
  },
@@ -9490,6 +9436,16 @@ function createControlledPromise() {
9490
9436
  return p;
9491
9437
  }
9492
9438
 
9439
+ function _objectWithoutPropertiesLoose(r, e) {
9440
+ if (null == r) return {};
9441
+ var t = {};
9442
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
9443
+ if (e.indexOf(n) >= 0) continue;
9444
+ t[n] = r[n];
9445
+ }
9446
+ return t;
9447
+ }
9448
+
9493
9449
  function _setPrototypeOf(t, e) {
9494
9450
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
9495
9451
  return t.__proto__ = e, t;
@@ -11831,14 +11787,14 @@ function createSvgIcon(path, displayName) {
11831
11787
  Component.displayName = `${displayName}Icon`;
11832
11788
  }
11833
11789
  Component.muiName = SvgIcon.muiName;
11834
- return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
11790
+ return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));
11835
11791
  }
11836
11792
 
11837
- var RadioButtonUncheckedIcon = createSvgIcon( /*#__PURE__*/jsx("path", {
11793
+ var RadioButtonUncheckedIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
11838
11794
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
11839
11795
  }), 'RadioButtonUnchecked');
11840
11796
 
11841
- var RadioButtonCheckedIcon = createSvgIcon( /*#__PURE__*/jsx("path", {
11797
+ var RadioButtonCheckedIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
11842
11798
  d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
11843
11799
  }), 'RadioButtonChecked');
11844
11800
 
@@ -11970,6 +11926,7 @@ const RadioRoot = styled(SwitchBase, {
11970
11926
  variants: [{
11971
11927
  props: {
11972
11928
  color: 'default',
11929
+ disabled: false,
11973
11930
  disableRipple: false
11974
11931
  },
11975
11932
  style: {
@@ -11977,9 +11934,10 @@ const RadioRoot = styled(SwitchBase, {
11977
11934
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
11978
11935
  }
11979
11936
  }
11980
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
11937
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
11981
11938
  props: {
11982
11939
  color,
11940
+ disabled: false,
11983
11941
  disableRipple: false
11984
11942
  },
11985
11943
  style: {
@@ -11987,9 +11945,10 @@ const RadioRoot = styled(SwitchBase, {
11987
11945
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
11988
11946
  }
11989
11947
  }
11990
- })), ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({
11948
+ })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
11991
11949
  props: {
11992
- color
11950
+ color,
11951
+ disabled: false
11993
11952
  },
11994
11953
  style: {
11995
11954
  [`&.${radioClasses.checked}`]: {
@@ -12037,11 +11996,21 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
12037
11996
  onChange: onChangeProp,
12038
11997
  size = 'medium',
12039
11998
  className,
11999
+ disabled: disabledProp,
12040
12000
  disableRipple = false,
12041
12001
  ...other
12042
12002
  } = props;
12003
+ const muiFormControl = useFormControl();
12004
+ let disabled = disabledProp;
12005
+ if (muiFormControl) {
12006
+ if (typeof disabled === 'undefined') {
12007
+ disabled = muiFormControl.disabled;
12008
+ }
12009
+ }
12010
+ disabled ??= false;
12043
12011
  const ownerState = {
12044
12012
  ...props,
12013
+ disabled,
12045
12014
  disableRipple,
12046
12015
  color,
12047
12016
  size
@@ -12067,6 +12036,7 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
12067
12036
  checkedIcon: /*#__PURE__*/React.cloneElement(checkedIcon, {
12068
12037
  fontSize: defaultCheckedIcon.props.fontSize ?? size
12069
12038
  }),
12039
+ disabled: disabled,
12070
12040
  ownerState: ownerState,
12071
12041
  classes: classes,
12072
12042
  name: name,
@@ -12603,12 +12573,11 @@ const IconButtonRoot = styled(ButtonBase, {
12603
12573
  duration: theme.transitions.duration.shortest
12604
12574
  }),
12605
12575
  variants: [{
12606
- props: {
12607
- disableRipple: false
12608
- },
12576
+ props: props => !props.disableRipple,
12609
12577
  style: {
12578
+ '--IconButton-hoverBg': theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
12610
12579
  '&:hover': {
12611
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
12580
+ backgroundColor: 'var(--IconButton-hoverBg)',
12612
12581
  // Reset on touch devices, it doesn't add specificity
12613
12582
  '@media (hover: none)': {
12614
12583
  backgroundColor: 'transparent'
@@ -12656,7 +12625,7 @@ const IconButtonRoot = styled(ButtonBase, {
12656
12625
  style: {
12657
12626
  color: 'inherit'
12658
12627
  }
12659
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below
12628
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
12660
12629
  .map(([color]) => ({
12661
12630
  props: {
12662
12631
  color
@@ -12664,20 +12633,13 @@ const IconButtonRoot = styled(ButtonBase, {
12664
12633
  style: {
12665
12634
  color: (theme.vars || theme).palette[color].main
12666
12635
  }
12667
- })), ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below
12636
+ })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
12668
12637
  .map(([color]) => ({
12669
12638
  props: {
12670
- color,
12671
- disableRipple: false
12639
+ color
12672
12640
  },
12673
12641
  style: {
12674
- '&:hover': {
12675
- backgroundColor: theme.vars ? `rgba(${(theme.vars || theme).palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha((theme.vars || theme).palette[color].main, theme.palette.action.hoverOpacity),
12676
- // Reset on touch devices, it doesn't add specificity
12677
- '@media (hover: none)': {
12678
- backgroundColor: 'transparent'
12679
- }
12680
- }
12642
+ '--IconButton-hoverBg': theme.vars ? `rgba(${(theme.vars || theme).palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha((theme.vars || theme).palette[color].main, theme.palette.action.hoverOpacity)
12681
12643
  }
12682
12644
  })), {
12683
12645
  props: {
@@ -12718,7 +12680,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
12718
12680
  color = 'default',
12719
12681
  disabled = false,
12720
12682
  disableFocusRipple = false,
12721
- disableRipple = false,
12722
12683
  size = 'medium',
12723
12684
  ...other
12724
12685
  } = props;
@@ -12728,7 +12689,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
12728
12689
  color,
12729
12690
  disabled,
12730
12691
  disableFocusRipple,
12731
- disableRipple,
12732
12692
  size
12733
12693
  };
12734
12694
  const classes = useUtilityClasses$8(ownerState);
@@ -12737,7 +12697,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
12737
12697
  centerRipple: true,
12738
12698
  focusRipple: !disableFocusRipple,
12739
12699
  disabled: disabled,
12740
- disableRipple: disableRipple,
12741
12700
  ref: ref,
12742
12701
  ...other,
12743
12702
  ownerState: ownerState,
@@ -12920,7 +12879,7 @@ const AppBarRoot = styled(Paper, {
12920
12879
  '--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[900])
12921
12880
  })
12922
12881
  }
12923
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main && palette.contrastText).map(([color]) => ({
12882
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({
12924
12883
  props: {
12925
12884
  color
12926
12885
  },
@@ -13053,7 +13012,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
13053
13012
  disablePortal = false
13054
13013
  } = props;
13055
13014
  const [mountNode, setMountNode] = React.useState(null);
13056
- const handleRef = useForkRef(getReactNodeRef(children), forwardedRef);
13015
+ const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
13057
13016
  useEnhancedEffect(() => {
13058
13017
  if (!disablePortal) {
13059
13018
  setMountNode(getContainer$1(container) || document.body);
@@ -13069,7 +13028,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
13069
13028
  return undefined;
13070
13029
  }, [forwardedRef, mountNode, disablePortal]);
13071
13030
  if (disablePortal) {
13072
- if ( /*#__PURE__*/React.isValidElement(children)) {
13031
+ if (/*#__PURE__*/React.isValidElement(children)) {
13073
13032
  const newProps = {
13074
13033
  ref: handleRef
13075
13034
  };
@@ -13152,7 +13111,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
13152
13111
  ...other
13153
13112
  } = props;
13154
13113
  const nodeRef = React.useRef(null);
13155
- const handleRef = useForkRef(nodeRef, getReactNodeRef(children), ref);
13114
+ const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
13156
13115
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
13157
13116
  if (callback) {
13158
13117
  const node = nodeRef.current;
@@ -13314,6 +13273,13 @@ function getBackdropUtilityClass(slot) {
13314
13273
  }
13315
13274
  generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
13316
13275
 
13276
+ const removeOwnerState = props => {
13277
+ const {
13278
+ ownerState,
13279
+ ...rest
13280
+ } = props;
13281
+ return rest;
13282
+ };
13317
13283
  const useUtilityClasses$6 = ownerState => {
13318
13284
  const {
13319
13285
  classes,
@@ -13402,12 +13368,12 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
13402
13368
  externalForwardedProps,
13403
13369
  ownerState
13404
13370
  });
13405
- delete transitionProps.ownerState;
13371
+ const transitionPropsRemoved = removeOwnerState(transitionProps);
13406
13372
  return /*#__PURE__*/jsx(TransitionSlot, {
13407
13373
  in: open,
13408
13374
  timeout: transitionDuration,
13409
13375
  ...other,
13410
- ...transitionProps,
13376
+ ...transitionPropsRemoved,
13411
13377
  children: /*#__PURE__*/jsx(RootSlot, {
13412
13378
  "aria-hidden": true,
13413
13379
  ...rootProps,
@@ -13494,6 +13460,7 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes /* remove-proptypes *
13494
13460
  * The component used for the transition.
13495
13461
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
13496
13462
  * @default Fade
13463
+ * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
13497
13464
  */
13498
13465
  TransitionComponent: PropTypes.elementType,
13499
13466
  /**
@@ -13687,7 +13654,7 @@ const ButtonRoot = styled(ButtonBase, {
13687
13654
  color: `var(--variant-textColor)`,
13688
13655
  backgroundColor: `var(--variant-textBg)`
13689
13656
  }
13690
- }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main && palette.dark && palette.contrastText).map(([color]) => ({
13657
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
13691
13658
  props: {
13692
13659
  color
13693
13660
  },
@@ -13711,9 +13678,8 @@ const ButtonRoot = styled(ButtonBase, {
13711
13678
  color: 'inherit'
13712
13679
  },
13713
13680
  style: {
13714
- '--variant-containedColor': theme.vars ?
13715
- // this is safe because grey does not change between default light/dark mode
13716
- theme.vars.palette.text.primary : theme.palette.getContrastText?.(inheritContainedBackgroundColor),
13681
+ color: 'inherit',
13682
+ borderColor: 'currentColor',
13717
13683
  '--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
13718
13684
  '@media (hover: hover)': {
13719
13685
  '&:hover': {
@@ -14017,8 +13983,8 @@ function isOverflowing(container) {
14017
13983
  }
14018
13984
  return container.scrollHeight > container.clientHeight;
14019
13985
  }
14020
- function ariaHidden(element, show) {
14021
- if (show) {
13986
+ function ariaHidden(element, hide) {
13987
+ if (hide) {
14022
13988
  element.setAttribute('aria-hidden', 'true');
14023
13989
  } else {
14024
13990
  element.removeAttribute('aria-hidden');
@@ -14032,17 +13998,17 @@ function isAriaHiddenForbiddenOnElement(element) {
14032
13998
  // can be children of body and can't have aria-hidden attribute.
14033
13999
  // cf. https://www.w3.org/TR/html-aria/#docconformance
14034
14000
  const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];
14035
- const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;
14001
+ const isForbiddenTagName = forbiddenTagNames.includes(element.tagName);
14036
14002
  const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';
14037
14003
  return isForbiddenTagName || isInputHidden;
14038
14004
  }
14039
- function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {
14005
+ function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, hide) {
14040
14006
  const blacklist = [mountElement, currentElement, ...elementsToExclude];
14041
14007
  [].forEach.call(container.children, element => {
14042
- const isNotExcludedElement = blacklist.indexOf(element) === -1;
14008
+ const isNotExcludedElement = !blacklist.includes(element);
14043
14009
  const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);
14044
14010
  if (isNotExcludedElement && isNotForbiddenElement) {
14045
- ariaHidden(element, show);
14011
+ ariaHidden(element, hide);
14046
14012
  }
14047
14013
  });
14048
14014
  }
@@ -14063,7 +14029,7 @@ function handleContainer(containerInfo, props) {
14063
14029
  if (!props.disableScrollLock) {
14064
14030
  if (isOverflowing(container)) {
14065
14031
  // Compute the size before applying overflow hidden to avoid any scroll jumps.
14066
- const scrollbarSize = getScrollbarSize(ownerDocument(container));
14032
+ const scrollbarSize = getScrollbarSize(ownerWindow(container));
14067
14033
  restoreStyle.push({
14068
14034
  value: container.style.paddingRight,
14069
14035
  property: 'padding-right',
@@ -14175,7 +14141,7 @@ class ModalManager {
14175
14141
  return modalIndex;
14176
14142
  }
14177
14143
  mount(modal, props) {
14178
- const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);
14144
+ const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
14179
14145
  const containerInfo = this.containers[containerIndex];
14180
14146
  if (!containerInfo.restore) {
14181
14147
  containerInfo.restore = handleContainer(containerInfo, props);
@@ -14186,7 +14152,7 @@ class ModalManager {
14186
14152
  if (modalIndex === -1) {
14187
14153
  return modalIndex;
14188
14154
  }
14189
- const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);
14155
+ const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
14190
14156
  const containerInfo = this.containers[containerIndex];
14191
14157
  containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);
14192
14158
  this.modals.splice(modalIndex, 1);
@@ -14229,7 +14195,7 @@ function getTabIndex(node) {
14229
14195
  }
14230
14196
 
14231
14197
  // Browsers do not return `tabIndex` correctly for contentEditable nodes;
14232
- // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2
14198
+ // https://issues.chromium.org/issues/41283952
14233
14199
  // so if they don't have a tabindex attribute specifically set, assume it's 0.
14234
14200
  // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
14235
14201
  // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
@@ -14307,7 +14273,7 @@ function FocusTrap(props) {
14307
14273
  // It waits for the active element to move into the component to activate.
14308
14274
  const activated = React.useRef(false);
14309
14275
  const rootRef = React.useRef(null);
14310
- const handleRef = useForkRef(getReactNodeRef(children), rootRef);
14276
+ const handleRef = useForkRef(getReactElementRef(children), rootRef);
14311
14277
  const lastKeydown = React.useRef(null);
14312
14278
  React.useEffect(() => {
14313
14279
  // We might render an empty child.
@@ -14551,7 +14517,7 @@ function getHasTransition(children) {
14551
14517
 
14552
14518
  // A modal manager used to track and manage the state of open Modals.
14553
14519
  // Modals don't open on the server so this won't conflict with concurrent requests.
14554
- const defaultManager = new ModalManager();
14520
+ const manager = new ModalManager();
14555
14521
  /**
14556
14522
  *
14557
14523
  * Demos:
@@ -14567,8 +14533,6 @@ function useModal(parameters) {
14567
14533
  container,
14568
14534
  disableEscapeKeyDown = false,
14569
14535
  disableScrollLock = false,
14570
- // @ts-ignore internal logic - Base UI supports the manager as a prop too
14571
- manager = defaultManager,
14572
14536
  closeAfterTransition = false,
14573
14537
  onTransitionEnter,
14574
14538
  onTransitionExited,
@@ -14614,7 +14578,7 @@ function useModal(parameters) {
14614
14578
  handleMounted();
14615
14579
  }
14616
14580
  });
14617
- const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);
14581
+ const isTopModal = () => manager.isTopModal(getModal());
14618
14582
  const handlePortalRef = useEventCallback(node => {
14619
14583
  mountNodeRef.current = node;
14620
14584
  if (!node) {
@@ -14628,7 +14592,7 @@ function useModal(parameters) {
14628
14592
  });
14629
14593
  const handleClose = React.useCallback(() => {
14630
14594
  manager.remove(getModal(), ariaHiddenProp);
14631
- }, [ariaHiddenProp, manager]);
14595
+ }, [ariaHiddenProp]);
14632
14596
  React.useEffect(() => {
14633
14597
  return () => {
14634
14598
  handleClose();
@@ -14683,6 +14647,12 @@ function useModal(parameters) {
14683
14647
  ...otherHandlers
14684
14648
  };
14685
14649
  return {
14650
+ /*
14651
+ * Marking an element with the role presentation indicates to assistive technology
14652
+ * that this element should be ignored; it exists to support the web application and
14653
+ * is not meant for humans to interact with directly.
14654
+ * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
14655
+ */
14686
14656
  role: 'presentation',
14687
14657
  ...externalEventHandlers,
14688
14658
  onKeyDown: createHandleKeyDown(externalEventHandlers),
@@ -14877,6 +14847,7 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
14877
14847
  childProps.onExited = onExited;
14878
14848
  }
14879
14849
  const externalForwardedProps = {
14850
+ ...other,
14880
14851
  slots: {
14881
14852
  root: components.Root,
14882
14853
  backdrop: components.Backdrop,
@@ -14905,12 +14876,12 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
14905
14876
  getSlotProps: otherHandlers => {
14906
14877
  return getBackdropProps({
14907
14878
  ...otherHandlers,
14908
- onClick: e => {
14879
+ onClick: event => {
14909
14880
  if (onBackdropClick) {
14910
- onBackdropClick(e);
14881
+ onBackdropClick(event);
14911
14882
  }
14912
14883
  if (otherHandlers?.onClick) {
14913
- otherHandlers.onClick(e);
14884
+ otherHandlers.onClick(event);
14914
14885
  }
14915
14886
  }
14916
14887
  });
@@ -14928,7 +14899,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
14928
14899
  disablePortal: disablePortal,
14929
14900
  children: /*#__PURE__*/jsxs(RootSlot, {
14930
14901
  ...rootProps,
14931
- ...other,
14932
14902
  children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/jsx(BackdropSlot, {
14933
14903
  ...backdropProps,
14934
14904
  ref: backdropRef
@@ -15229,7 +15199,6 @@ const DividerRoot = styled('div', {
15229
15199
  }) => !!ownerState.children,
15230
15200
  style: {
15231
15201
  display: 'flex',
15232
- whiteSpace: 'nowrap',
15233
15202
  textAlign: 'center',
15234
15203
  border: 0,
15235
15204
  borderTopStyle: 'solid',
@@ -15303,6 +15272,7 @@ const DividerWrapper = styled('span', {
15303
15272
  display: 'inline-block',
15304
15273
  paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
15305
15274
  paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
15275
+ whiteSpace: 'nowrap',
15306
15276
  variants: [{
15307
15277
  props: {
15308
15278
  orientation: 'vertical'
@@ -15520,7 +15490,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
15520
15490
  ...other
15521
15491
  } = props;
15522
15492
  const childrenRef = React.useRef(null);
15523
- const handleRef = useForkRef(getReactNodeRef(children), childrenRef, ref);
15493
+ const handleRef = useForkRef(getReactElementRef(children), childrenRef, ref);
15524
15494
  const normalizedTransitionCallback = callback => isAppearing => {
15525
15495
  if (callback) {
15526
15496
  // onEnterXxx and onExitXxx callbacks have a different arguments.length value.
@@ -16204,7 +16174,7 @@ const LinearProgressRoot = styled('span', {
16204
16174
  '@media print': {
16205
16175
  colorAdjust: 'exact'
16206
16176
  },
16207
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
16177
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
16208
16178
  props: {
16209
16179
  color
16210
16180
  },
@@ -16269,7 +16239,7 @@ const LinearProgressDashed = styled('span', {
16269
16239
  opacity: 0.3,
16270
16240
  backgroundImage: `radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`
16271
16241
  }
16272
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => {
16242
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => {
16273
16243
  const backgroundColor = getColorShade(theme, color);
16274
16244
  return {
16275
16245
  props: {
@@ -16310,7 +16280,7 @@ const LinearProgressBar1 = styled('span', {
16310
16280
  style: {
16311
16281
  backgroundColor: 'currentColor'
16312
16282
  }
16313
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
16283
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
16314
16284
  props: {
16315
16285
  color
16316
16286
  },
@@ -16367,7 +16337,7 @@ const LinearProgressBar2 = styled('span', {
16367
16337
  top: 0,
16368
16338
  transition: 'transform 0.2s linear',
16369
16339
  transformOrigin: 'left',
16370
- variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
16340
+ variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
16371
16341
  props: {
16372
16342
  color
16373
16343
  },
@@ -16381,6 +16351,13 @@ const LinearProgressBar2 = styled('span', {
16381
16351
  style: {
16382
16352
  backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
16383
16353
  }
16354
+ }, {
16355
+ props: ({
16356
+ ownerState
16357
+ }) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
16358
+ style: {
16359
+ backgroundColor: 'currentColor'
16360
+ }
16384
16361
  }, {
16385
16362
  props: {
16386
16363
  color: 'inherit'
@@ -16388,7 +16365,7 @@ const LinearProgressBar2 = styled('span', {
16388
16365
  style: {
16389
16366
  opacity: 0.3
16390
16367
  }
16391
- }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
16368
+ }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
16392
16369
  props: {
16393
16370
  color,
16394
16371
  variant: 'buffer'
@@ -16540,7 +16517,7 @@ const Stack = createStack({
16540
16517
  slot: 'Root',
16541
16518
  overridesResolver: (props, styles) => styles.root
16542
16519
  }),
16543
- useThemeProps: inProps => useThemeProps({
16520
+ useThemeProps: inProps => useDefaultProps({
16544
16521
  props: inProps,
16545
16522
  name: 'MuiStack'
16546
16523
  })
@@ -16838,7 +16815,7 @@ var DrawerComponent = function DrawerComponent(_ref) {
16838
16815
  py: 1.5,
16839
16816
  px: 1,
16840
16817
  sx: _objectSpread2({
16841
- backgroundColor: "secondary.main"
16818
+ backgroundColor: "secondary.main"
16842
16819
  }, sxHeader)
16843
16820
  }, React__default.createElement(Typography, {
16844
16821
  color: color || "background.paper",
@@ -24435,7 +24412,7 @@ function customColor(source, color) {
24435
24412
  }
24436
24413
 
24437
24414
  var DynamicColor = /*#__PURE__*/function () {
24438
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(src) {
24415
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(src) {
24439
24416
  var imageElement, dynamicPalette, extractHctInstance, _dynamicPalette$palet, primary, secondary, _dynamicPalette$schem, dark, light, primaryMain, secondaryMain, primaryLight, primaryDark, secondaryLight, secondaryDark, primaryColor, secondaryColor, backgroundColor;
24440
24417
  return _regeneratorRuntime().wrap(function _callee$(_context) {
24441
24418
  while (1) switch (_context.prev = _context.next) {