@sinco/react 1.2.4 → 1.2.5-rc.1
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 +387 -415
- package/package.json +3 -3
- package/src/lib/Components/FooterAction.d.ts +1 -1
package/index.esm.js
CHANGED
@@ -452,7 +452,7 @@ function _extends() {
|
|
452
452
|
}, _extends.apply(null, arguments);
|
453
453
|
}
|
454
454
|
|
455
|
-
function memoize$
|
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
|
-
|
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$
|
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.
|
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 (
|
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
|
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
|
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
|
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
|
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
|
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
|
5375
|
-
* It will
|
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.
|
5386
|
+
* @param element React.ReactElement
|
5378
5387
|
* @returns React.Ref<any> | null
|
5379
|
-
*
|
5380
|
-
* @deprecated Use getReactElementRef instead
|
5381
5388
|
*/
|
5382
|
-
function
|
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
|
-
|
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
|
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
|
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
|
-
|
6069
|
-
|
6070
|
-
|
6071
|
-
|
6072
|
-
|
6073
|
-
|
6074
|
-
|
6075
|
-
|
6076
|
-
|
6077
|
-
|
6078
|
-
|
6079
|
-
|
6080
|
-
|
6081
|
-
|
6082
|
-
|
6083
|
-
|
6084
|
-
|
6085
|
-
|
6086
|
-
|
6087
|
-
|
6088
|
-
|
6089
|
-
|
6090
|
-
|
6091
|
-
|
6092
|
-
|
6093
|
-
|
6094
|
-
|
6095
|
-
|
6096
|
-
|
6097
|
-
|
6098
|
-
|
6099
|
-
|
6100
|
-
|
6101
|
-
|
6102
|
-
|
6103
|
-
|
6104
|
-
|
6105
|
-
}
|
6106
|
-
|
6107
|
-
|
6108
|
-
|
6109
|
-
|
6110
|
-
|
6111
|
-
|
6112
|
-
|
6113
|
-
|
6114
|
-
|
6115
|
-
|
6116
|
-
|
6117
|
-
|
6118
|
-
|
6119
|
-
|
6120
|
-
|
6121
|
-
|
6122
|
-
|
6123
|
-
|
6124
|
-
|
6125
|
-
|
6126
|
-
|
6127
|
-
|
6128
|
-
|
6129
|
-
|
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
|
-
|
6298
|
-
|
6299
|
-
|
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 (!
|
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
|
-
...
|
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" ?
|
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
|
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(
|
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 =
|
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
|
-
|
6838
|
+
[root]: css,
|
6758
6839
|
[`@media (prefers-color-scheme: dark)`]: {
|
6759
|
-
|
6840
|
+
[root]: excludedVariables
|
6760
6841
|
}
|
6761
6842
|
};
|
6762
6843
|
}
|
6763
6844
|
if (rule) {
|
6764
6845
|
return {
|
6765
6846
|
[rule.replace('%s', colorScheme)]: excludedVariables,
|
6766
|
-
[
|
6847
|
+
[`${root}, ${rule.replace('%s', colorScheme)}`]: css
|
6767
6848
|
};
|
6768
6849
|
}
|
6769
6850
|
return {
|
6770
|
-
|
6851
|
+
[root]: {
|
6771
6852
|
...css,
|
6772
6853
|
...excludedVariables
|
6773
6854
|
}
|
6774
6855
|
};
|
6775
6856
|
}
|
6776
6857
|
if (rule && rule !== 'media') {
|
6777
|
-
return
|
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
|
-
|
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
|
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';
|
@@ -7698,20 +7716,15 @@ var components = {
|
|
7698
7716
|
MuiDialog: {
|
7699
7717
|
styleOverrides: {
|
7700
7718
|
root: function root(_ref) {
|
7701
|
-
|
7702
|
-
return
|
7703
|
-
|
7704
|
-
|
7705
|
-
|
7706
|
-
|
7707
|
-
|
7708
|
-
|
7709
|
-
|
7710
|
-
}), ".MuiPaper-elevation", {
|
7711
|
-
boxShadow: "0px 1px 5px rgba(24, 39, 75, 0.12), 0px 2px 2px rgba(24, 39, 75, 0.14), 0px 3px 1px -2px rgba(24, 39, 75, 0.2) "
|
7712
|
-
}), ".MuiBackdrop-root", {
|
7713
|
-
backgroundColor: "#00000047"
|
7714
|
-
});
|
7719
|
+
_ref.theme;
|
7720
|
+
return {
|
7721
|
+
".MuiPaper-elevation": {
|
7722
|
+
boxShadow: "0px 1px 5px rgba(24, 39, 75, 0.12), 0px 2px 2px rgba(24, 39, 75, 0.14), 0px 3px 1px -2px rgba(24, 39, 75, 0.2) "
|
7723
|
+
},
|
7724
|
+
".MuiBackdrop-root": {
|
7725
|
+
backgroundColor: "#00000047"
|
7726
|
+
}
|
7727
|
+
};
|
7715
7728
|
}
|
7716
7729
|
}
|
7717
7730
|
},
|
@@ -7813,15 +7826,15 @@ var components = {
|
|
7813
7826
|
height: 18,
|
7814
7827
|
width: 18
|
7815
7828
|
},
|
7816
|
-
colorDefault: function colorDefault(
|
7817
|
-
var theme =
|
7829
|
+
colorDefault: function colorDefault(_ref2) {
|
7830
|
+
var theme = _ref2.theme;
|
7818
7831
|
return {
|
7819
7832
|
backgroundColor: theme.palette.chipDefault.main,
|
7820
7833
|
color: theme.palette.chipDefault.contrastText
|
7821
7834
|
};
|
7822
7835
|
},
|
7823
|
-
deleteIcon: function deleteIcon(
|
7824
|
-
var theme =
|
7836
|
+
deleteIcon: function deleteIcon(_ref3) {
|
7837
|
+
var theme = _ref3.theme;
|
7825
7838
|
return {
|
7826
7839
|
variants: [{
|
7827
7840
|
props: {
|
@@ -7867,8 +7880,8 @@ var components = {
|
|
7867
7880
|
}]
|
7868
7881
|
};
|
7869
7882
|
},
|
7870
|
-
avatar: function avatar(
|
7871
|
-
var theme =
|
7883
|
+
avatar: function avatar(_ref4) {
|
7884
|
+
var theme = _ref4.theme;
|
7872
7885
|
return {
|
7873
7886
|
lineHeight: 1.8,
|
7874
7887
|
variants: [{
|
@@ -7945,12 +7958,12 @@ var components = {
|
|
7945
7958
|
}]
|
7946
7959
|
};
|
7947
7960
|
},
|
7948
|
-
label: function label(
|
7949
|
-
var theme =
|
7961
|
+
label: function label(_ref5) {
|
7962
|
+
var theme = _ref5.theme;
|
7950
7963
|
return _objectSpread2({}, theme.typography.caption);
|
7951
7964
|
},
|
7952
|
-
root: function root(
|
7953
|
-
var theme =
|
7965
|
+
root: function root(_ref6) {
|
7966
|
+
var theme = _ref6.theme;
|
7954
7967
|
return {
|
7955
7968
|
height: "inherit",
|
7956
7969
|
borderRadius: 4,
|
@@ -8124,8 +8137,8 @@ var components = {
|
|
8124
8137
|
}
|
8125
8138
|
}],
|
8126
8139
|
styleOverrides: {
|
8127
|
-
message: function message(
|
8128
|
-
var theme =
|
8140
|
+
message: function message(_ref7) {
|
8141
|
+
var theme = _ref7.theme;
|
8129
8142
|
return {
|
8130
8143
|
padding: "0px 4px",
|
8131
8144
|
minWidth: 0,
|
@@ -8146,8 +8159,8 @@ var components = {
|
|
8146
8159
|
}]
|
8147
8160
|
};
|
8148
8161
|
},
|
8149
|
-
icon: function icon(
|
8150
|
-
var theme =
|
8162
|
+
icon: function icon(_ref8) {
|
8163
|
+
var theme = _ref8.theme;
|
8151
8164
|
return {
|
8152
8165
|
padding: "4px",
|
8153
8166
|
marginRight: 0,
|
@@ -8189,8 +8202,8 @@ var components = {
|
|
8189
8202
|
}]
|
8190
8203
|
};
|
8191
8204
|
},
|
8192
|
-
action: function action(
|
8193
|
-
var theme =
|
8205
|
+
action: function action(_ref9) {
|
8206
|
+
var theme = _ref9.theme;
|
8194
8207
|
return {
|
8195
8208
|
display: "flex",
|
8196
8209
|
gap: 1.5,
|
@@ -8395,9 +8408,6 @@ var components = {
|
|
8395
8408
|
}
|
8396
8409
|
},
|
8397
8410
|
MuiIconButton: {
|
8398
|
-
defaultProps: {
|
8399
|
-
color: "primary"
|
8400
|
-
},
|
8401
8411
|
styleOverrides: {
|
8402
8412
|
sizeSmall: {
|
8403
8413
|
padding: 3
|
@@ -8477,8 +8487,8 @@ var components = {
|
|
8477
8487
|
},
|
8478
8488
|
MuiInputLabel: {
|
8479
8489
|
styleOverrides: {
|
8480
|
-
asterisk: function asterisk(
|
8481
|
-
var theme =
|
8490
|
+
asterisk: function asterisk(_ref10) {
|
8491
|
+
var theme = _ref10.theme;
|
8482
8492
|
return {
|
8483
8493
|
color: theme.palette.error.main
|
8484
8494
|
};
|
@@ -8982,94 +8992,6 @@ var paletteADC = _objectSpread2({
|
|
8982
8992
|
}
|
8983
8993
|
}, BasicPalette);
|
8984
8994
|
|
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
8995
|
var breakpoints = createBreakpoints({
|
9074
8996
|
values: {
|
9075
8997
|
xs: 0,
|
@@ -9093,30 +9015,7 @@ function internal_createExtendSxProp() {
|
|
9093
9015
|
return extendSxProp$1;
|
9094
9016
|
}
|
9095
9017
|
|
9096
|
-
|
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
|
-
}
|
9018
|
+
const memoTheme = unstable_memoTheme;
|
9120
9019
|
|
9121
9020
|
process.env.NODE_ENV !== "production" ? {
|
9122
9021
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
@@ -9136,6 +9035,48 @@ function useDefaultProps(params) {
|
|
9136
9035
|
return useDefaultProps$1(params);
|
9137
9036
|
}
|
9138
9037
|
|
9038
|
+
/**
|
9039
|
+
* Type guard to check if the object has a "main" property of type string.
|
9040
|
+
*
|
9041
|
+
* @param obj - the object to check
|
9042
|
+
* @returns boolean
|
9043
|
+
*/
|
9044
|
+
function hasCorrectMainProperty(obj) {
|
9045
|
+
return typeof obj.main === 'string';
|
9046
|
+
}
|
9047
|
+
/**
|
9048
|
+
* Checks if the object conforms to the SimplePaletteColorOptions type.
|
9049
|
+
* The minimum requirement is that the object has a "main" property of type string, this is always checked.
|
9050
|
+
* Optionally, you can pass additional properties to check.
|
9051
|
+
*
|
9052
|
+
* @param obj - The object to check
|
9053
|
+
* @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
|
9054
|
+
* @returns boolean
|
9055
|
+
*/
|
9056
|
+
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
9057
|
+
if (!hasCorrectMainProperty(obj)) {
|
9058
|
+
return false;
|
9059
|
+
}
|
9060
|
+
for (const value of additionalPropertiesToCheck) {
|
9061
|
+
if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {
|
9062
|
+
return false;
|
9063
|
+
}
|
9064
|
+
}
|
9065
|
+
return true;
|
9066
|
+
}
|
9067
|
+
|
9068
|
+
/**
|
9069
|
+
* Creates a filter function used to filter simple palette color options.
|
9070
|
+
* The minimum requirement is that the object has a "main" property of type string, this is always checked.
|
9071
|
+
* Optionally, you can pass additional properties to check.
|
9072
|
+
*
|
9073
|
+
* @param additionalPropertiesToCheck - Array containing "light", "dark", and/or "contrastText"
|
9074
|
+
* @returns ([, value]: [any, PaletteColorOptions]) => boolean
|
9075
|
+
*/
|
9076
|
+
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
9077
|
+
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
9078
|
+
}
|
9079
|
+
|
9139
9080
|
function getTypographyUtilityClass(slot) {
|
9140
9081
|
return generateUtilityClass('MuiTypography', slot);
|
9141
9082
|
}
|
@@ -9195,7 +9136,7 @@ const TypographyRoot = styled('span', {
|
|
9195
9136
|
variant
|
9196
9137
|
},
|
9197
9138
|
style: value
|
9198
|
-
})), ...Object.entries(theme.palette).filter((
|
9139
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
9199
9140
|
props: {
|
9200
9141
|
color
|
9201
9142
|
},
|
@@ -9490,6 +9431,16 @@ function createControlledPromise() {
|
|
9490
9431
|
return p;
|
9491
9432
|
}
|
9492
9433
|
|
9434
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
9435
|
+
if (null == r) return {};
|
9436
|
+
var t = {};
|
9437
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
9438
|
+
if (e.indexOf(n) >= 0) continue;
|
9439
|
+
t[n] = r[n];
|
9440
|
+
}
|
9441
|
+
return t;
|
9442
|
+
}
|
9443
|
+
|
9493
9444
|
function _setPrototypeOf(t, e) {
|
9494
9445
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
9495
9446
|
return t.__proto__ = e, t;
|
@@ -11831,14 +11782,14 @@ function createSvgIcon(path, displayName) {
|
|
11831
11782
|
Component.displayName = `${displayName}Icon`;
|
11832
11783
|
}
|
11833
11784
|
Component.muiName = SvgIcon.muiName;
|
11834
|
-
return /*#__PURE__*/React.memo(
|
11785
|
+
return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));
|
11835
11786
|
}
|
11836
11787
|
|
11837
|
-
var RadioButtonUncheckedIcon = createSvgIcon(
|
11788
|
+
var RadioButtonUncheckedIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
|
11838
11789
|
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
11790
|
}), 'RadioButtonUnchecked');
|
11840
11791
|
|
11841
|
-
var RadioButtonCheckedIcon = createSvgIcon(
|
11792
|
+
var RadioButtonCheckedIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
|
11842
11793
|
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
11794
|
}), 'RadioButtonChecked');
|
11844
11795
|
|
@@ -11970,6 +11921,7 @@ const RadioRoot = styled(SwitchBase, {
|
|
11970
11921
|
variants: [{
|
11971
11922
|
props: {
|
11972
11923
|
color: 'default',
|
11924
|
+
disabled: false,
|
11973
11925
|
disableRipple: false
|
11974
11926
|
},
|
11975
11927
|
style: {
|
@@ -11977,9 +11929,10 @@ const RadioRoot = styled(SwitchBase, {
|
|
11977
11929
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
|
11978
11930
|
}
|
11979
11931
|
}
|
11980
|
-
}, ...Object.entries(theme.palette).filter((
|
11932
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
11981
11933
|
props: {
|
11982
11934
|
color,
|
11935
|
+
disabled: false,
|
11983
11936
|
disableRipple: false
|
11984
11937
|
},
|
11985
11938
|
style: {
|
@@ -11987,9 +11940,10 @@ const RadioRoot = styled(SwitchBase, {
|
|
11987
11940
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
|
11988
11941
|
}
|
11989
11942
|
}
|
11990
|
-
})), ...Object.entries(theme.palette).filter((
|
11943
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
11991
11944
|
props: {
|
11992
|
-
color
|
11945
|
+
color,
|
11946
|
+
disabled: false
|
11993
11947
|
},
|
11994
11948
|
style: {
|
11995
11949
|
[`&.${radioClasses.checked}`]: {
|
@@ -12037,11 +11991,21 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
|
|
12037
11991
|
onChange: onChangeProp,
|
12038
11992
|
size = 'medium',
|
12039
11993
|
className,
|
11994
|
+
disabled: disabledProp,
|
12040
11995
|
disableRipple = false,
|
12041
11996
|
...other
|
12042
11997
|
} = props;
|
11998
|
+
const muiFormControl = useFormControl();
|
11999
|
+
let disabled = disabledProp;
|
12000
|
+
if (muiFormControl) {
|
12001
|
+
if (typeof disabled === 'undefined') {
|
12002
|
+
disabled = muiFormControl.disabled;
|
12003
|
+
}
|
12004
|
+
}
|
12005
|
+
disabled ??= false;
|
12043
12006
|
const ownerState = {
|
12044
12007
|
...props,
|
12008
|
+
disabled,
|
12045
12009
|
disableRipple,
|
12046
12010
|
color,
|
12047
12011
|
size
|
@@ -12067,6 +12031,7 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
|
|
12067
12031
|
checkedIcon: /*#__PURE__*/React.cloneElement(checkedIcon, {
|
12068
12032
|
fontSize: defaultCheckedIcon.props.fontSize ?? size
|
12069
12033
|
}),
|
12034
|
+
disabled: disabled,
|
12070
12035
|
ownerState: ownerState,
|
12071
12036
|
classes: classes,
|
12072
12037
|
name: name,
|
@@ -12603,12 +12568,11 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
12603
12568
|
duration: theme.transitions.duration.shortest
|
12604
12569
|
}),
|
12605
12570
|
variants: [{
|
12606
|
-
props:
|
12607
|
-
disableRipple: false
|
12608
|
-
},
|
12571
|
+
props: props => !props.disableRipple,
|
12609
12572
|
style: {
|
12573
|
+
'--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
12574
|
'&:hover': {
|
12611
|
-
backgroundColor:
|
12575
|
+
backgroundColor: 'var(--IconButton-hoverBg)',
|
12612
12576
|
// Reset on touch devices, it doesn't add specificity
|
12613
12577
|
'@media (hover: none)': {
|
12614
12578
|
backgroundColor: 'transparent'
|
@@ -12656,7 +12620,7 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
12656
12620
|
style: {
|
12657
12621
|
color: 'inherit'
|
12658
12622
|
}
|
12659
|
-
}, ...Object.entries(theme.palette).filter((
|
12623
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
12660
12624
|
.map(([color]) => ({
|
12661
12625
|
props: {
|
12662
12626
|
color
|
@@ -12664,20 +12628,13 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
12664
12628
|
style: {
|
12665
12629
|
color: (theme.vars || theme).palette[color].main
|
12666
12630
|
}
|
12667
|
-
})), ...Object.entries(theme.palette).filter((
|
12631
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
12668
12632
|
.map(([color]) => ({
|
12669
12633
|
props: {
|
12670
|
-
color
|
12671
|
-
disableRipple: false
|
12634
|
+
color
|
12672
12635
|
},
|
12673
12636
|
style: {
|
12674
|
-
'
|
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
|
-
}
|
12637
|
+
'--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
12638
|
}
|
12682
12639
|
})), {
|
12683
12640
|
props: {
|
@@ -12718,7 +12675,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
12718
12675
|
color = 'default',
|
12719
12676
|
disabled = false,
|
12720
12677
|
disableFocusRipple = false,
|
12721
|
-
disableRipple = false,
|
12722
12678
|
size = 'medium',
|
12723
12679
|
...other
|
12724
12680
|
} = props;
|
@@ -12728,7 +12684,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
12728
12684
|
color,
|
12729
12685
|
disabled,
|
12730
12686
|
disableFocusRipple,
|
12731
|
-
disableRipple,
|
12732
12687
|
size
|
12733
12688
|
};
|
12734
12689
|
const classes = useUtilityClasses$8(ownerState);
|
@@ -12737,7 +12692,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
12737
12692
|
centerRipple: true,
|
12738
12693
|
focusRipple: !disableFocusRipple,
|
12739
12694
|
disabled: disabled,
|
12740
|
-
disableRipple: disableRipple,
|
12741
12695
|
ref: ref,
|
12742
12696
|
...other,
|
12743
12697
|
ownerState: ownerState,
|
@@ -12920,7 +12874,7 @@ const AppBarRoot = styled(Paper, {
|
|
12920
12874
|
'--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[900])
|
12921
12875
|
})
|
12922
12876
|
}
|
12923
|
-
}, ...Object.entries(theme.palette).filter(([
|
12877
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({
|
12924
12878
|
props: {
|
12925
12879
|
color
|
12926
12880
|
},
|
@@ -13053,7 +13007,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
|
|
13053
13007
|
disablePortal = false
|
13054
13008
|
} = props;
|
13055
13009
|
const [mountNode, setMountNode] = React.useState(null);
|
13056
|
-
const handleRef = useForkRef(
|
13010
|
+
const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
|
13057
13011
|
useEnhancedEffect(() => {
|
13058
13012
|
if (!disablePortal) {
|
13059
13013
|
setMountNode(getContainer$1(container) || document.body);
|
@@ -13069,7 +13023,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
|
|
13069
13023
|
return undefined;
|
13070
13024
|
}, [forwardedRef, mountNode, disablePortal]);
|
13071
13025
|
if (disablePortal) {
|
13072
|
-
if (
|
13026
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
13073
13027
|
const newProps = {
|
13074
13028
|
ref: handleRef
|
13075
13029
|
};
|
@@ -13152,7 +13106,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
13152
13106
|
...other
|
13153
13107
|
} = props;
|
13154
13108
|
const nodeRef = React.useRef(null);
|
13155
|
-
const handleRef = useForkRef(nodeRef,
|
13109
|
+
const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
|
13156
13110
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
13157
13111
|
if (callback) {
|
13158
13112
|
const node = nodeRef.current;
|
@@ -13314,6 +13268,13 @@ function getBackdropUtilityClass(slot) {
|
|
13314
13268
|
}
|
13315
13269
|
generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
|
13316
13270
|
|
13271
|
+
const removeOwnerState = props => {
|
13272
|
+
const {
|
13273
|
+
ownerState,
|
13274
|
+
...rest
|
13275
|
+
} = props;
|
13276
|
+
return rest;
|
13277
|
+
};
|
13317
13278
|
const useUtilityClasses$6 = ownerState => {
|
13318
13279
|
const {
|
13319
13280
|
classes,
|
@@ -13402,12 +13363,12 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
13402
13363
|
externalForwardedProps,
|
13403
13364
|
ownerState
|
13404
13365
|
});
|
13405
|
-
|
13366
|
+
const transitionPropsRemoved = removeOwnerState(transitionProps);
|
13406
13367
|
return /*#__PURE__*/jsx(TransitionSlot, {
|
13407
13368
|
in: open,
|
13408
13369
|
timeout: transitionDuration,
|
13409
13370
|
...other,
|
13410
|
-
...
|
13371
|
+
...transitionPropsRemoved,
|
13411
13372
|
children: /*#__PURE__*/jsx(RootSlot, {
|
13412
13373
|
"aria-hidden": true,
|
13413
13374
|
...rootProps,
|
@@ -13494,6 +13455,7 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes /* remove-proptypes *
|
|
13494
13455
|
* The component used for the transition.
|
13495
13456
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
13496
13457
|
* @default Fade
|
13458
|
+
* @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
13459
|
*/
|
13498
13460
|
TransitionComponent: PropTypes.elementType,
|
13499
13461
|
/**
|
@@ -13687,7 +13649,7 @@ const ButtonRoot = styled(ButtonBase, {
|
|
13687
13649
|
color: `var(--variant-textColor)`,
|
13688
13650
|
backgroundColor: `var(--variant-textBg)`
|
13689
13651
|
}
|
13690
|
-
}, ...Object.entries(theme.palette).filter((
|
13652
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
13691
13653
|
props: {
|
13692
13654
|
color
|
13693
13655
|
},
|
@@ -13711,9 +13673,8 @@ const ButtonRoot = styled(ButtonBase, {
|
|
13711
13673
|
color: 'inherit'
|
13712
13674
|
},
|
13713
13675
|
style: {
|
13714
|
-
'
|
13715
|
-
|
13716
|
-
theme.vars.palette.text.primary : theme.palette.getContrastText?.(inheritContainedBackgroundColor),
|
13676
|
+
color: 'inherit',
|
13677
|
+
borderColor: 'currentColor',
|
13717
13678
|
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
|
13718
13679
|
'@media (hover: hover)': {
|
13719
13680
|
'&:hover': {
|
@@ -14017,8 +13978,8 @@ function isOverflowing(container) {
|
|
14017
13978
|
}
|
14018
13979
|
return container.scrollHeight > container.clientHeight;
|
14019
13980
|
}
|
14020
|
-
function ariaHidden(element,
|
14021
|
-
if (
|
13981
|
+
function ariaHidden(element, hide) {
|
13982
|
+
if (hide) {
|
14022
13983
|
element.setAttribute('aria-hidden', 'true');
|
14023
13984
|
} else {
|
14024
13985
|
element.removeAttribute('aria-hidden');
|
@@ -14032,17 +13993,17 @@ function isAriaHiddenForbiddenOnElement(element) {
|
|
14032
13993
|
// can be children of body and can't have aria-hidden attribute.
|
14033
13994
|
// cf. https://www.w3.org/TR/html-aria/#docconformance
|
14034
13995
|
const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];
|
14035
|
-
const isForbiddenTagName = forbiddenTagNames.
|
13996
|
+
const isForbiddenTagName = forbiddenTagNames.includes(element.tagName);
|
14036
13997
|
const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';
|
14037
13998
|
return isForbiddenTagName || isInputHidden;
|
14038
13999
|
}
|
14039
|
-
function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude,
|
14000
|
+
function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, hide) {
|
14040
14001
|
const blacklist = [mountElement, currentElement, ...elementsToExclude];
|
14041
14002
|
[].forEach.call(container.children, element => {
|
14042
|
-
const isNotExcludedElement = blacklist.
|
14003
|
+
const isNotExcludedElement = !blacklist.includes(element);
|
14043
14004
|
const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);
|
14044
14005
|
if (isNotExcludedElement && isNotForbiddenElement) {
|
14045
|
-
ariaHidden(element,
|
14006
|
+
ariaHidden(element, hide);
|
14046
14007
|
}
|
14047
14008
|
});
|
14048
14009
|
}
|
@@ -14063,7 +14024,7 @@ function handleContainer(containerInfo, props) {
|
|
14063
14024
|
if (!props.disableScrollLock) {
|
14064
14025
|
if (isOverflowing(container)) {
|
14065
14026
|
// Compute the size before applying overflow hidden to avoid any scroll jumps.
|
14066
|
-
const scrollbarSize = getScrollbarSize(
|
14027
|
+
const scrollbarSize = getScrollbarSize(ownerWindow(container));
|
14067
14028
|
restoreStyle.push({
|
14068
14029
|
value: container.style.paddingRight,
|
14069
14030
|
property: 'padding-right',
|
@@ -14175,7 +14136,7 @@ class ModalManager {
|
|
14175
14136
|
return modalIndex;
|
14176
14137
|
}
|
14177
14138
|
mount(modal, props) {
|
14178
|
-
const containerIndex = findIndexOf(this.containers, item => item.modals.
|
14139
|
+
const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
|
14179
14140
|
const containerInfo = this.containers[containerIndex];
|
14180
14141
|
if (!containerInfo.restore) {
|
14181
14142
|
containerInfo.restore = handleContainer(containerInfo, props);
|
@@ -14186,7 +14147,7 @@ class ModalManager {
|
|
14186
14147
|
if (modalIndex === -1) {
|
14187
14148
|
return modalIndex;
|
14188
14149
|
}
|
14189
|
-
const containerIndex = findIndexOf(this.containers, item => item.modals.
|
14150
|
+
const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
|
14190
14151
|
const containerInfo = this.containers[containerIndex];
|
14191
14152
|
containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);
|
14192
14153
|
this.modals.splice(modalIndex, 1);
|
@@ -14229,7 +14190,7 @@ function getTabIndex(node) {
|
|
14229
14190
|
}
|
14230
14191
|
|
14231
14192
|
// Browsers do not return `tabIndex` correctly for contentEditable nodes;
|
14232
|
-
// https://
|
14193
|
+
// https://issues.chromium.org/issues/41283952
|
14233
14194
|
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
14234
14195
|
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
14235
14196
|
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
@@ -14307,7 +14268,7 @@ function FocusTrap(props) {
|
|
14307
14268
|
// It waits for the active element to move into the component to activate.
|
14308
14269
|
const activated = React.useRef(false);
|
14309
14270
|
const rootRef = React.useRef(null);
|
14310
|
-
const handleRef = useForkRef(
|
14271
|
+
const handleRef = useForkRef(getReactElementRef(children), rootRef);
|
14311
14272
|
const lastKeydown = React.useRef(null);
|
14312
14273
|
React.useEffect(() => {
|
14313
14274
|
// We might render an empty child.
|
@@ -14551,7 +14512,7 @@ function getHasTransition(children) {
|
|
14551
14512
|
|
14552
14513
|
// A modal manager used to track and manage the state of open Modals.
|
14553
14514
|
// Modals don't open on the server so this won't conflict with concurrent requests.
|
14554
|
-
const
|
14515
|
+
const manager = new ModalManager();
|
14555
14516
|
/**
|
14556
14517
|
*
|
14557
14518
|
* Demos:
|
@@ -14567,8 +14528,6 @@ function useModal(parameters) {
|
|
14567
14528
|
container,
|
14568
14529
|
disableEscapeKeyDown = false,
|
14569
14530
|
disableScrollLock = false,
|
14570
|
-
// @ts-ignore internal logic - Base UI supports the manager as a prop too
|
14571
|
-
manager = defaultManager,
|
14572
14531
|
closeAfterTransition = false,
|
14573
14532
|
onTransitionEnter,
|
14574
14533
|
onTransitionExited,
|
@@ -14614,7 +14573,7 @@ function useModal(parameters) {
|
|
14614
14573
|
handleMounted();
|
14615
14574
|
}
|
14616
14575
|
});
|
14617
|
-
const isTopModal =
|
14576
|
+
const isTopModal = () => manager.isTopModal(getModal());
|
14618
14577
|
const handlePortalRef = useEventCallback(node => {
|
14619
14578
|
mountNodeRef.current = node;
|
14620
14579
|
if (!node) {
|
@@ -14628,7 +14587,7 @@ function useModal(parameters) {
|
|
14628
14587
|
});
|
14629
14588
|
const handleClose = React.useCallback(() => {
|
14630
14589
|
manager.remove(getModal(), ariaHiddenProp);
|
14631
|
-
}, [ariaHiddenProp
|
14590
|
+
}, [ariaHiddenProp]);
|
14632
14591
|
React.useEffect(() => {
|
14633
14592
|
return () => {
|
14634
14593
|
handleClose();
|
@@ -14683,6 +14642,12 @@ function useModal(parameters) {
|
|
14683
14642
|
...otherHandlers
|
14684
14643
|
};
|
14685
14644
|
return {
|
14645
|
+
/*
|
14646
|
+
* Marking an element with the role presentation indicates to assistive technology
|
14647
|
+
* that this element should be ignored; it exists to support the web application and
|
14648
|
+
* is not meant for humans to interact with directly.
|
14649
|
+
* https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
|
14650
|
+
*/
|
14686
14651
|
role: 'presentation',
|
14687
14652
|
...externalEventHandlers,
|
14688
14653
|
onKeyDown: createHandleKeyDown(externalEventHandlers),
|
@@ -14877,6 +14842,7 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
14877
14842
|
childProps.onExited = onExited;
|
14878
14843
|
}
|
14879
14844
|
const externalForwardedProps = {
|
14845
|
+
...other,
|
14880
14846
|
slots: {
|
14881
14847
|
root: components.Root,
|
14882
14848
|
backdrop: components.Backdrop,
|
@@ -14905,12 +14871,12 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
14905
14871
|
getSlotProps: otherHandlers => {
|
14906
14872
|
return getBackdropProps({
|
14907
14873
|
...otherHandlers,
|
14908
|
-
onClick:
|
14874
|
+
onClick: event => {
|
14909
14875
|
if (onBackdropClick) {
|
14910
|
-
onBackdropClick(
|
14876
|
+
onBackdropClick(event);
|
14911
14877
|
}
|
14912
14878
|
if (otherHandlers?.onClick) {
|
14913
|
-
otherHandlers.onClick(
|
14879
|
+
otherHandlers.onClick(event);
|
14914
14880
|
}
|
14915
14881
|
}
|
14916
14882
|
});
|
@@ -14928,7 +14894,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
14928
14894
|
disablePortal: disablePortal,
|
14929
14895
|
children: /*#__PURE__*/jsxs(RootSlot, {
|
14930
14896
|
...rootProps,
|
14931
|
-
...other,
|
14932
14897
|
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/jsx(BackdropSlot, {
|
14933
14898
|
...backdropProps,
|
14934
14899
|
ref: backdropRef
|
@@ -15229,7 +15194,6 @@ const DividerRoot = styled('div', {
|
|
15229
15194
|
}) => !!ownerState.children,
|
15230
15195
|
style: {
|
15231
15196
|
display: 'flex',
|
15232
|
-
whiteSpace: 'nowrap',
|
15233
15197
|
textAlign: 'center',
|
15234
15198
|
border: 0,
|
15235
15199
|
borderTopStyle: 'solid',
|
@@ -15303,6 +15267,7 @@ const DividerWrapper = styled('span', {
|
|
15303
15267
|
display: 'inline-block',
|
15304
15268
|
paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
|
15305
15269
|
paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
|
15270
|
+
whiteSpace: 'nowrap',
|
15306
15271
|
variants: [{
|
15307
15272
|
props: {
|
15308
15273
|
orientation: 'vertical'
|
@@ -15520,7 +15485,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
15520
15485
|
...other
|
15521
15486
|
} = props;
|
15522
15487
|
const childrenRef = React.useRef(null);
|
15523
|
-
const handleRef = useForkRef(
|
15488
|
+
const handleRef = useForkRef(getReactElementRef(children), childrenRef, ref);
|
15524
15489
|
const normalizedTransitionCallback = callback => isAppearing => {
|
15525
15490
|
if (callback) {
|
15526
15491
|
// onEnterXxx and onExitXxx callbacks have a different arguments.length value.
|
@@ -16204,7 +16169,7 @@ const LinearProgressRoot = styled('span', {
|
|
16204
16169
|
'@media print': {
|
16205
16170
|
colorAdjust: 'exact'
|
16206
16171
|
},
|
16207
|
-
variants: [...Object.entries(theme.palette).filter((
|
16172
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16208
16173
|
props: {
|
16209
16174
|
color
|
16210
16175
|
},
|
@@ -16269,7 +16234,7 @@ const LinearProgressDashed = styled('span', {
|
|
16269
16234
|
opacity: 0.3,
|
16270
16235
|
backgroundImage: `radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`
|
16271
16236
|
}
|
16272
|
-
}, ...Object.entries(theme.palette).filter((
|
16237
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => {
|
16273
16238
|
const backgroundColor = getColorShade(theme, color);
|
16274
16239
|
return {
|
16275
16240
|
props: {
|
@@ -16310,7 +16275,7 @@ const LinearProgressBar1 = styled('span', {
|
|
16310
16275
|
style: {
|
16311
16276
|
backgroundColor: 'currentColor'
|
16312
16277
|
}
|
16313
|
-
}, ...Object.entries(theme.palette).filter((
|
16278
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16314
16279
|
props: {
|
16315
16280
|
color
|
16316
16281
|
},
|
@@ -16367,7 +16332,7 @@ const LinearProgressBar2 = styled('span', {
|
|
16367
16332
|
top: 0,
|
16368
16333
|
transition: 'transform 0.2s linear',
|
16369
16334
|
transformOrigin: 'left',
|
16370
|
-
variants: [...Object.entries(theme.palette).filter((
|
16335
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16371
16336
|
props: {
|
16372
16337
|
color
|
16373
16338
|
},
|
@@ -16381,6 +16346,13 @@ const LinearProgressBar2 = styled('span', {
|
|
16381
16346
|
style: {
|
16382
16347
|
backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
|
16383
16348
|
}
|
16349
|
+
}, {
|
16350
|
+
props: ({
|
16351
|
+
ownerState
|
16352
|
+
}) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
|
16353
|
+
style: {
|
16354
|
+
backgroundColor: 'currentColor'
|
16355
|
+
}
|
16384
16356
|
}, {
|
16385
16357
|
props: {
|
16386
16358
|
color: 'inherit'
|
@@ -16388,7 +16360,7 @@ const LinearProgressBar2 = styled('span', {
|
|
16388
16360
|
style: {
|
16389
16361
|
opacity: 0.3
|
16390
16362
|
}
|
16391
|
-
}, ...Object.entries(theme.palette).filter((
|
16363
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16392
16364
|
props: {
|
16393
16365
|
color,
|
16394
16366
|
variant: 'buffer'
|
@@ -16540,7 +16512,7 @@ const Stack = createStack({
|
|
16540
16512
|
slot: 'Root',
|
16541
16513
|
overridesResolver: (props, styles) => styles.root
|
16542
16514
|
}),
|
16543
|
-
useThemeProps: inProps =>
|
16515
|
+
useThemeProps: inProps => useDefaultProps({
|
16544
16516
|
props: inProps,
|
16545
16517
|
name: 'MuiStack'
|
16546
16518
|
})
|
@@ -16838,7 +16810,7 @@ var DrawerComponent = function DrawerComponent(_ref) {
|
|
16838
16810
|
py: 1.5,
|
16839
16811
|
px: 1,
|
16840
16812
|
sx: _objectSpread2({
|
16841
|
-
backgroundColor: "secondary.main"
|
16813
|
+
backgroundColor: "secondary.main"
|
16842
16814
|
}, sxHeader)
|
16843
16815
|
}, React__default.createElement(Typography, {
|
16844
16816
|
color: color || "background.paper",
|
@@ -24435,7 +24407,7 @@ function customColor(source, color) {
|
|
24435
24407
|
}
|
24436
24408
|
|
24437
24409
|
var DynamicColor = /*#__PURE__*/function () {
|
24438
|
-
var _ref = _asyncToGenerator(
|
24410
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(src) {
|
24439
24411
|
var imageElement, dynamicPalette, extractHctInstance, _dynamicPalette$palet, primary, secondary, _dynamicPalette$schem, dark, light, primaryMain, secondaryMain, primaryLight, primaryDark, secondaryLight, secondaryDark, primaryColor, secondaryColor, backgroundColor;
|
24440
24412
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
24441
24413
|
while (1) switch (_context.prev = _context.next) {
|