@sinco/react 1.2.4-rc.9 → 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 +386 -406
- package/package.json +3 -3
- package/src/lib/Components/FooterAction.d.ts +1 -1
- package/src/lib/Theme/module.d.ts +2 -2
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';
|
@@ -7816,8 +7834,8 @@ var components = {
|
|
7816
7834
|
colorDefault: function colorDefault(_ref3) {
|
7817
7835
|
var theme = _ref3.theme;
|
7818
7836
|
return {
|
7819
|
-
backgroundColor: theme.palette
|
7820
|
-
color: theme.palette
|
7837
|
+
backgroundColor: theme.palette.chipDefault.main,
|
7838
|
+
color: theme.palette.chipDefault.contrastText
|
7821
7839
|
};
|
7822
7840
|
},
|
7823
7841
|
deleteIcon: function deleteIcon(_ref4) {
|
@@ -7836,10 +7854,10 @@ var components = {
|
|
7836
7854
|
variant: "standard"
|
7837
7855
|
},
|
7838
7856
|
style: {
|
7839
|
-
color: theme.palette
|
7857
|
+
color: theme.palette.chipDefault.contrastText,
|
7840
7858
|
opacity: "30%",
|
7841
7859
|
":hover": {
|
7842
|
-
color: theme.palette
|
7860
|
+
color: theme.palette.chipDefault.contrastText,
|
7843
7861
|
opacity: "30%"
|
7844
7862
|
}
|
7845
7863
|
}
|
@@ -7861,7 +7879,7 @@ var components = {
|
|
7861
7879
|
color: "default"
|
7862
7880
|
},
|
7863
7881
|
style: {
|
7864
|
-
color: theme.palette
|
7882
|
+
color: theme.palette.chipDefault.contrastText,
|
7865
7883
|
opacity: "30%"
|
7866
7884
|
}
|
7867
7885
|
}]
|
@@ -7878,14 +7896,14 @@ var components = {
|
|
7878
7896
|
style: {
|
7879
7897
|
backgroundColor: theme.palette.background.paper,
|
7880
7898
|
opacity: "70%",
|
7881
|
-
color: theme.palette
|
7899
|
+
color: theme.palette.chipDefault.contrastText
|
7882
7900
|
}
|
7883
7901
|
}, {
|
7884
7902
|
props: {
|
7885
7903
|
variant: "standard"
|
7886
7904
|
},
|
7887
7905
|
style: {
|
7888
|
-
backgroundColor: theme.palette
|
7906
|
+
backgroundColor: theme.palette.chipDefault.contrastText,
|
7889
7907
|
color: theme.palette.primary.contrastText
|
7890
7908
|
}
|
7891
7909
|
}, {
|
@@ -7939,7 +7957,7 @@ var components = {
|
|
7939
7957
|
color: "default"
|
7940
7958
|
},
|
7941
7959
|
style: {
|
7942
|
-
backgroundColor: theme.palette
|
7960
|
+
backgroundColor: theme.palette.chipDefault.contrastText,
|
7943
7961
|
color: theme.palette.background.paper
|
7944
7962
|
}
|
7945
7963
|
}]
|
@@ -7962,9 +7980,9 @@ var components = {
|
|
7962
7980
|
style: {
|
7963
7981
|
border: "1px solid ".concat(theme.palette.grey[400]),
|
7964
7982
|
backgroundColor: "transparent !important",
|
7965
|
-
color: theme.palette
|
7983
|
+
color: theme.palette.chipDefault.contrastText,
|
7966
7984
|
":hover": {
|
7967
|
-
backgroundColor: theme.palette
|
7985
|
+
backgroundColor: theme.palette.chipDefault.main
|
7968
7986
|
}
|
7969
7987
|
}
|
7970
7988
|
}, {
|
@@ -7973,10 +7991,10 @@ var components = {
|
|
7973
7991
|
color: "default"
|
7974
7992
|
},
|
7975
7993
|
style: {
|
7976
|
-
backgroundColor: theme.palette
|
7977
|
-
color: theme.palette
|
7994
|
+
backgroundColor: theme.palette.chipDefault.main,
|
7995
|
+
color: theme.palette.chipDefault.contrastText,
|
7978
7996
|
":hover": {
|
7979
|
-
backgroundColor: theme.palette
|
7997
|
+
backgroundColor: theme.palette.chipDefault.dark
|
7980
7998
|
}
|
7981
7999
|
}
|
7982
8000
|
}, {
|
@@ -7986,7 +8004,7 @@ var components = {
|
|
7986
8004
|
},
|
7987
8005
|
style: {
|
7988
8006
|
backgroundColor: theme.palette.grey[50],
|
7989
|
-
color: theme.palette
|
8007
|
+
color: theme.palette.chipDefault.contrastText,
|
7990
8008
|
":hover": {
|
7991
8009
|
backgroundColor: theme.palette.grey[100]
|
7992
8010
|
}
|
@@ -7998,7 +8016,7 @@ var components = {
|
|
7998
8016
|
},
|
7999
8017
|
style: {
|
8000
8018
|
backgroundColor: theme.palette.grey[50],
|
8001
|
-
color: theme.palette
|
8019
|
+
color: theme.palette.chipDefault.contrastText,
|
8002
8020
|
":hover": {
|
8003
8021
|
backgroundColor: theme.palette.grey[100]
|
8004
8022
|
}
|
@@ -8009,16 +8027,16 @@ var components = {
|
|
8009
8027
|
avatar: true
|
8010
8028
|
},
|
8011
8029
|
style: {
|
8012
|
-
backgroundColor: theme.palette
|
8013
|
-
color: theme.palette
|
8030
|
+
backgroundColor: theme.palette.chipDefault.contrastText,
|
8031
|
+
color: theme.palette.chipDefault.contrastText
|
8014
8032
|
}
|
8015
8033
|
}, {
|
8016
8034
|
props: {
|
8017
8035
|
variant: "standard"
|
8018
8036
|
},
|
8019
8037
|
style: {
|
8020
|
-
backgroundColor: theme.palette
|
8021
|
-
color: theme.palette
|
8038
|
+
backgroundColor: theme.palette.chipDefault.contrastText,
|
8039
|
+
color: theme.palette.chipDefault.contrastText
|
8022
8040
|
}
|
8023
8041
|
}, {
|
8024
8042
|
props: {
|
@@ -8699,12 +8717,6 @@ var components = {
|
|
8699
8717
|
};
|
8700
8718
|
|
8701
8719
|
var BasicPalette = {
|
8702
|
-
"default": {
|
8703
|
-
main: "#E4E5E7",
|
8704
|
-
dark: "#D1D3D7",
|
8705
|
-
light: "#F2F2F3",
|
8706
|
-
contrastText: "#5A5E73"
|
8707
|
-
},
|
8708
8720
|
chipInfo: {
|
8709
8721
|
main: "#C0E8FC",
|
8710
8722
|
dark: "#9CD8FA",
|
@@ -8834,7 +8846,13 @@ var BasicPalette = {
|
|
8834
8846
|
black: "#000",
|
8835
8847
|
white: "#fff"
|
8836
8848
|
},
|
8837
|
-
divider: "#0000001f"
|
8849
|
+
divider: "#0000001f",
|
8850
|
+
chipDefault: {
|
8851
|
+
main: "#E4E5E7",
|
8852
|
+
dark: "#D1D3D7",
|
8853
|
+
light: "#F2F2F3",
|
8854
|
+
contrastText: "#5A5E73"
|
8855
|
+
}
|
8838
8856
|
};
|
8839
8857
|
var paletteERP = _objectSpread2({
|
8840
8858
|
primary: {
|
@@ -8979,94 +8997,6 @@ var paletteADC = _objectSpread2({
|
|
8979
8997
|
}
|
8980
8998
|
}, BasicPalette);
|
8981
8999
|
|
8982
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
8983
|
-
if (null == r) return {};
|
8984
|
-
var t = {};
|
8985
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
8986
|
-
if (e.indexOf(n) >= 0) continue;
|
8987
|
-
t[n] = r[n];
|
8988
|
-
}
|
8989
|
-
return t;
|
8990
|
-
}
|
8991
|
-
|
8992
|
-
const _excluded = ["values", "unit", "step"];
|
8993
|
-
const sortBreakpointsValues = values => {
|
8994
|
-
const breakpointsAsArray = Object.keys(values).map(key => ({
|
8995
|
-
key,
|
8996
|
-
val: values[key]
|
8997
|
-
})) || [];
|
8998
|
-
// Sort in ascending order
|
8999
|
-
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
9000
|
-
return breakpointsAsArray.reduce((acc, obj) => {
|
9001
|
-
return _extends({}, acc, {
|
9002
|
-
[obj.key]: obj.val
|
9003
|
-
});
|
9004
|
-
}, {});
|
9005
|
-
};
|
9006
|
-
|
9007
|
-
// Keep in mind that @media is inclusive by the CSS specification.
|
9008
|
-
function createBreakpoints(breakpoints) {
|
9009
|
-
const {
|
9010
|
-
// The breakpoint **start** at this value.
|
9011
|
-
// For instance with the first breakpoint xs: [xs, sm).
|
9012
|
-
values = {
|
9013
|
-
xs: 0,
|
9014
|
-
// phone
|
9015
|
-
sm: 600,
|
9016
|
-
// tablet
|
9017
|
-
md: 900,
|
9018
|
-
// small laptop
|
9019
|
-
lg: 1200,
|
9020
|
-
// desktop
|
9021
|
-
xl: 1536 // large screen
|
9022
|
-
},
|
9023
|
-
unit = 'px',
|
9024
|
-
step = 5
|
9025
|
-
} = breakpoints,
|
9026
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded);
|
9027
|
-
const sortedValues = sortBreakpointsValues(values);
|
9028
|
-
const keys = Object.keys(sortedValues);
|
9029
|
-
function up(key) {
|
9030
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
9031
|
-
return `@media (min-width:${value}${unit})`;
|
9032
|
-
}
|
9033
|
-
function down(key) {
|
9034
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
9035
|
-
return `@media (max-width:${value - step / 100}${unit})`;
|
9036
|
-
}
|
9037
|
-
function between(start, end) {
|
9038
|
-
const endIndex = keys.indexOf(end);
|
9039
|
-
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})`;
|
9040
|
-
}
|
9041
|
-
function only(key) {
|
9042
|
-
if (keys.indexOf(key) + 1 < keys.length) {
|
9043
|
-
return between(key, keys[keys.indexOf(key) + 1]);
|
9044
|
-
}
|
9045
|
-
return up(key);
|
9046
|
-
}
|
9047
|
-
function not(key) {
|
9048
|
-
// handle first and last key separately, for better readability
|
9049
|
-
const keyIndex = keys.indexOf(key);
|
9050
|
-
if (keyIndex === 0) {
|
9051
|
-
return up(keys[1]);
|
9052
|
-
}
|
9053
|
-
if (keyIndex === keys.length - 1) {
|
9054
|
-
return down(keys[keyIndex]);
|
9055
|
-
}
|
9056
|
-
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
9057
|
-
}
|
9058
|
-
return _extends({
|
9059
|
-
keys,
|
9060
|
-
values: sortedValues,
|
9061
|
-
up,
|
9062
|
-
down,
|
9063
|
-
between,
|
9064
|
-
only,
|
9065
|
-
not,
|
9066
|
-
unit
|
9067
|
-
}, other);
|
9068
|
-
}
|
9069
|
-
|
9070
9000
|
var breakpoints = createBreakpoints({
|
9071
9001
|
values: {
|
9072
9002
|
xs: 0,
|
@@ -9090,30 +9020,7 @@ function internal_createExtendSxProp() {
|
|
9090
9020
|
return extendSxProp$1;
|
9091
9021
|
}
|
9092
9022
|
|
9093
|
-
|
9094
|
-
// allocate more objects.
|
9095
|
-
const arg = {
|
9096
|
-
theme: undefined
|
9097
|
-
};
|
9098
|
-
|
9099
|
-
/**
|
9100
|
-
* Memoize style function on theme.
|
9101
|
-
* Intended to be used in styled() calls that only need access to the theme.
|
9102
|
-
*/
|
9103
|
-
function memoTheme(styleFn) {
|
9104
|
-
let lastValue;
|
9105
|
-
let lastTheme;
|
9106
|
-
return props => {
|
9107
|
-
let value = lastValue;
|
9108
|
-
if (value === undefined || props.theme !== lastTheme) {
|
9109
|
-
arg.theme = props.theme;
|
9110
|
-
value = styleFn(arg);
|
9111
|
-
lastValue = value;
|
9112
|
-
lastTheme = props.theme;
|
9113
|
-
}
|
9114
|
-
return value;
|
9115
|
-
};
|
9116
|
-
}
|
9023
|
+
const memoTheme = unstable_memoTheme;
|
9117
9024
|
|
9118
9025
|
process.env.NODE_ENV !== "production" ? {
|
9119
9026
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
@@ -9133,6 +9040,48 @@ function useDefaultProps(params) {
|
|
9133
9040
|
return useDefaultProps$1(params);
|
9134
9041
|
}
|
9135
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
|
+
|
9136
9085
|
function getTypographyUtilityClass(slot) {
|
9137
9086
|
return generateUtilityClass('MuiTypography', slot);
|
9138
9087
|
}
|
@@ -9192,7 +9141,7 @@ const TypographyRoot = styled('span', {
|
|
9192
9141
|
variant
|
9193
9142
|
},
|
9194
9143
|
style: value
|
9195
|
-
})), ...Object.entries(theme.palette).filter((
|
9144
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
9196
9145
|
props: {
|
9197
9146
|
color
|
9198
9147
|
},
|
@@ -9487,6 +9436,16 @@ function createControlledPromise() {
|
|
9487
9436
|
return p;
|
9488
9437
|
}
|
9489
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
|
+
|
9490
9449
|
function _setPrototypeOf(t, e) {
|
9491
9450
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
9492
9451
|
return t.__proto__ = e, t;
|
@@ -11828,14 +11787,14 @@ function createSvgIcon(path, displayName) {
|
|
11828
11787
|
Component.displayName = `${displayName}Icon`;
|
11829
11788
|
}
|
11830
11789
|
Component.muiName = SvgIcon.muiName;
|
11831
|
-
return /*#__PURE__*/React.memo(
|
11790
|
+
return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));
|
11832
11791
|
}
|
11833
11792
|
|
11834
|
-
var RadioButtonUncheckedIcon = createSvgIcon(
|
11793
|
+
var RadioButtonUncheckedIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
|
11835
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"
|
11836
11795
|
}), 'RadioButtonUnchecked');
|
11837
11796
|
|
11838
|
-
var RadioButtonCheckedIcon = createSvgIcon(
|
11797
|
+
var RadioButtonCheckedIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
|
11839
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"
|
11840
11799
|
}), 'RadioButtonChecked');
|
11841
11800
|
|
@@ -11967,6 +11926,7 @@ const RadioRoot = styled(SwitchBase, {
|
|
11967
11926
|
variants: [{
|
11968
11927
|
props: {
|
11969
11928
|
color: 'default',
|
11929
|
+
disabled: false,
|
11970
11930
|
disableRipple: false
|
11971
11931
|
},
|
11972
11932
|
style: {
|
@@ -11974,9 +11934,10 @@ const RadioRoot = styled(SwitchBase, {
|
|
11974
11934
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
|
11975
11935
|
}
|
11976
11936
|
}
|
11977
|
-
}, ...Object.entries(theme.palette).filter((
|
11937
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
11978
11938
|
props: {
|
11979
11939
|
color,
|
11940
|
+
disabled: false,
|
11980
11941
|
disableRipple: false
|
11981
11942
|
},
|
11982
11943
|
style: {
|
@@ -11984,9 +11945,10 @@ const RadioRoot = styled(SwitchBase, {
|
|
11984
11945
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
|
11985
11946
|
}
|
11986
11947
|
}
|
11987
|
-
})), ...Object.entries(theme.palette).filter((
|
11948
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
11988
11949
|
props: {
|
11989
|
-
color
|
11950
|
+
color,
|
11951
|
+
disabled: false
|
11990
11952
|
},
|
11991
11953
|
style: {
|
11992
11954
|
[`&.${radioClasses.checked}`]: {
|
@@ -12034,11 +11996,21 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
|
|
12034
11996
|
onChange: onChangeProp,
|
12035
11997
|
size = 'medium',
|
12036
11998
|
className,
|
11999
|
+
disabled: disabledProp,
|
12037
12000
|
disableRipple = false,
|
12038
12001
|
...other
|
12039
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;
|
12040
12011
|
const ownerState = {
|
12041
12012
|
...props,
|
12013
|
+
disabled,
|
12042
12014
|
disableRipple,
|
12043
12015
|
color,
|
12044
12016
|
size
|
@@ -12064,6 +12036,7 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
|
|
12064
12036
|
checkedIcon: /*#__PURE__*/React.cloneElement(checkedIcon, {
|
12065
12037
|
fontSize: defaultCheckedIcon.props.fontSize ?? size
|
12066
12038
|
}),
|
12039
|
+
disabled: disabled,
|
12067
12040
|
ownerState: ownerState,
|
12068
12041
|
classes: classes,
|
12069
12042
|
name: name,
|
@@ -12600,12 +12573,11 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
12600
12573
|
duration: theme.transitions.duration.shortest
|
12601
12574
|
}),
|
12602
12575
|
variants: [{
|
12603
|
-
props:
|
12604
|
-
disableRipple: false
|
12605
|
-
},
|
12576
|
+
props: props => !props.disableRipple,
|
12606
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),
|
12607
12579
|
'&:hover': {
|
12608
|
-
backgroundColor:
|
12580
|
+
backgroundColor: 'var(--IconButton-hoverBg)',
|
12609
12581
|
// Reset on touch devices, it doesn't add specificity
|
12610
12582
|
'@media (hover: none)': {
|
12611
12583
|
backgroundColor: 'transparent'
|
@@ -12653,7 +12625,7 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
12653
12625
|
style: {
|
12654
12626
|
color: 'inherit'
|
12655
12627
|
}
|
12656
|
-
}, ...Object.entries(theme.palette).filter((
|
12628
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
12657
12629
|
.map(([color]) => ({
|
12658
12630
|
props: {
|
12659
12631
|
color
|
@@ -12661,20 +12633,13 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
12661
12633
|
style: {
|
12662
12634
|
color: (theme.vars || theme).palette[color].main
|
12663
12635
|
}
|
12664
|
-
})), ...Object.entries(theme.palette).filter((
|
12636
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
12665
12637
|
.map(([color]) => ({
|
12666
12638
|
props: {
|
12667
|
-
color
|
12668
|
-
disableRipple: false
|
12639
|
+
color
|
12669
12640
|
},
|
12670
12641
|
style: {
|
12671
|
-
'
|
12672
|
-
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),
|
12673
|
-
// Reset on touch devices, it doesn't add specificity
|
12674
|
-
'@media (hover: none)': {
|
12675
|
-
backgroundColor: 'transparent'
|
12676
|
-
}
|
12677
|
-
}
|
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)
|
12678
12643
|
}
|
12679
12644
|
})), {
|
12680
12645
|
props: {
|
@@ -12715,7 +12680,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
12715
12680
|
color = 'default',
|
12716
12681
|
disabled = false,
|
12717
12682
|
disableFocusRipple = false,
|
12718
|
-
disableRipple = false,
|
12719
12683
|
size = 'medium',
|
12720
12684
|
...other
|
12721
12685
|
} = props;
|
@@ -12725,7 +12689,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
12725
12689
|
color,
|
12726
12690
|
disabled,
|
12727
12691
|
disableFocusRipple,
|
12728
|
-
disableRipple,
|
12729
12692
|
size
|
12730
12693
|
};
|
12731
12694
|
const classes = useUtilityClasses$8(ownerState);
|
@@ -12734,7 +12697,6 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
12734
12697
|
centerRipple: true,
|
12735
12698
|
focusRipple: !disableFocusRipple,
|
12736
12699
|
disabled: disabled,
|
12737
|
-
disableRipple: disableRipple,
|
12738
12700
|
ref: ref,
|
12739
12701
|
...other,
|
12740
12702
|
ownerState: ownerState,
|
@@ -12917,7 +12879,7 @@ const AppBarRoot = styled(Paper, {
|
|
12917
12879
|
'--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[900])
|
12918
12880
|
})
|
12919
12881
|
}
|
12920
|
-
}, ...Object.entries(theme.palette).filter(([
|
12882
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({
|
12921
12883
|
props: {
|
12922
12884
|
color
|
12923
12885
|
},
|
@@ -13050,7 +13012,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
|
|
13050
13012
|
disablePortal = false
|
13051
13013
|
} = props;
|
13052
13014
|
const [mountNode, setMountNode] = React.useState(null);
|
13053
|
-
const handleRef = useForkRef(
|
13015
|
+
const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
|
13054
13016
|
useEnhancedEffect(() => {
|
13055
13017
|
if (!disablePortal) {
|
13056
13018
|
setMountNode(getContainer$1(container) || document.body);
|
@@ -13066,7 +13028,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
|
|
13066
13028
|
return undefined;
|
13067
13029
|
}, [forwardedRef, mountNode, disablePortal]);
|
13068
13030
|
if (disablePortal) {
|
13069
|
-
if (
|
13031
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
13070
13032
|
const newProps = {
|
13071
13033
|
ref: handleRef
|
13072
13034
|
};
|
@@ -13149,7 +13111,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
13149
13111
|
...other
|
13150
13112
|
} = props;
|
13151
13113
|
const nodeRef = React.useRef(null);
|
13152
|
-
const handleRef = useForkRef(nodeRef,
|
13114
|
+
const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
|
13153
13115
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
13154
13116
|
if (callback) {
|
13155
13117
|
const node = nodeRef.current;
|
@@ -13311,6 +13273,13 @@ function getBackdropUtilityClass(slot) {
|
|
13311
13273
|
}
|
13312
13274
|
generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
|
13313
13275
|
|
13276
|
+
const removeOwnerState = props => {
|
13277
|
+
const {
|
13278
|
+
ownerState,
|
13279
|
+
...rest
|
13280
|
+
} = props;
|
13281
|
+
return rest;
|
13282
|
+
};
|
13314
13283
|
const useUtilityClasses$6 = ownerState => {
|
13315
13284
|
const {
|
13316
13285
|
classes,
|
@@ -13399,12 +13368,12 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
13399
13368
|
externalForwardedProps,
|
13400
13369
|
ownerState
|
13401
13370
|
});
|
13402
|
-
|
13371
|
+
const transitionPropsRemoved = removeOwnerState(transitionProps);
|
13403
13372
|
return /*#__PURE__*/jsx(TransitionSlot, {
|
13404
13373
|
in: open,
|
13405
13374
|
timeout: transitionDuration,
|
13406
13375
|
...other,
|
13407
|
-
...
|
13376
|
+
...transitionPropsRemoved,
|
13408
13377
|
children: /*#__PURE__*/jsx(RootSlot, {
|
13409
13378
|
"aria-hidden": true,
|
13410
13379
|
...rootProps,
|
@@ -13491,6 +13460,7 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes /* remove-proptypes *
|
|
13491
13460
|
* The component used for the transition.
|
13492
13461
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
13493
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.
|
13494
13464
|
*/
|
13495
13465
|
TransitionComponent: PropTypes.elementType,
|
13496
13466
|
/**
|
@@ -13684,7 +13654,7 @@ const ButtonRoot = styled(ButtonBase, {
|
|
13684
13654
|
color: `var(--variant-textColor)`,
|
13685
13655
|
backgroundColor: `var(--variant-textBg)`
|
13686
13656
|
}
|
13687
|
-
}, ...Object.entries(theme.palette).filter((
|
13657
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
13688
13658
|
props: {
|
13689
13659
|
color
|
13690
13660
|
},
|
@@ -13708,9 +13678,8 @@ const ButtonRoot = styled(ButtonBase, {
|
|
13708
13678
|
color: 'inherit'
|
13709
13679
|
},
|
13710
13680
|
style: {
|
13711
|
-
'
|
13712
|
-
|
13713
|
-
theme.vars.palette.text.primary : theme.palette.getContrastText?.(inheritContainedBackgroundColor),
|
13681
|
+
color: 'inherit',
|
13682
|
+
borderColor: 'currentColor',
|
13714
13683
|
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
|
13715
13684
|
'@media (hover: hover)': {
|
13716
13685
|
'&:hover': {
|
@@ -14014,8 +13983,8 @@ function isOverflowing(container) {
|
|
14014
13983
|
}
|
14015
13984
|
return container.scrollHeight > container.clientHeight;
|
14016
13985
|
}
|
14017
|
-
function ariaHidden(element,
|
14018
|
-
if (
|
13986
|
+
function ariaHidden(element, hide) {
|
13987
|
+
if (hide) {
|
14019
13988
|
element.setAttribute('aria-hidden', 'true');
|
14020
13989
|
} else {
|
14021
13990
|
element.removeAttribute('aria-hidden');
|
@@ -14029,17 +13998,17 @@ function isAriaHiddenForbiddenOnElement(element) {
|
|
14029
13998
|
// can be children of body and can't have aria-hidden attribute.
|
14030
13999
|
// cf. https://www.w3.org/TR/html-aria/#docconformance
|
14031
14000
|
const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];
|
14032
|
-
const isForbiddenTagName = forbiddenTagNames.
|
14001
|
+
const isForbiddenTagName = forbiddenTagNames.includes(element.tagName);
|
14033
14002
|
const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';
|
14034
14003
|
return isForbiddenTagName || isInputHidden;
|
14035
14004
|
}
|
14036
|
-
function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude,
|
14005
|
+
function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, hide) {
|
14037
14006
|
const blacklist = [mountElement, currentElement, ...elementsToExclude];
|
14038
14007
|
[].forEach.call(container.children, element => {
|
14039
|
-
const isNotExcludedElement = blacklist.
|
14008
|
+
const isNotExcludedElement = !blacklist.includes(element);
|
14040
14009
|
const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);
|
14041
14010
|
if (isNotExcludedElement && isNotForbiddenElement) {
|
14042
|
-
ariaHidden(element,
|
14011
|
+
ariaHidden(element, hide);
|
14043
14012
|
}
|
14044
14013
|
});
|
14045
14014
|
}
|
@@ -14060,7 +14029,7 @@ function handleContainer(containerInfo, props) {
|
|
14060
14029
|
if (!props.disableScrollLock) {
|
14061
14030
|
if (isOverflowing(container)) {
|
14062
14031
|
// Compute the size before applying overflow hidden to avoid any scroll jumps.
|
14063
|
-
const scrollbarSize = getScrollbarSize(
|
14032
|
+
const scrollbarSize = getScrollbarSize(ownerWindow(container));
|
14064
14033
|
restoreStyle.push({
|
14065
14034
|
value: container.style.paddingRight,
|
14066
14035
|
property: 'padding-right',
|
@@ -14172,7 +14141,7 @@ class ModalManager {
|
|
14172
14141
|
return modalIndex;
|
14173
14142
|
}
|
14174
14143
|
mount(modal, props) {
|
14175
|
-
const containerIndex = findIndexOf(this.containers, item => item.modals.
|
14144
|
+
const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
|
14176
14145
|
const containerInfo = this.containers[containerIndex];
|
14177
14146
|
if (!containerInfo.restore) {
|
14178
14147
|
containerInfo.restore = handleContainer(containerInfo, props);
|
@@ -14183,7 +14152,7 @@ class ModalManager {
|
|
14183
14152
|
if (modalIndex === -1) {
|
14184
14153
|
return modalIndex;
|
14185
14154
|
}
|
14186
|
-
const containerIndex = findIndexOf(this.containers, item => item.modals.
|
14155
|
+
const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
|
14187
14156
|
const containerInfo = this.containers[containerIndex];
|
14188
14157
|
containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);
|
14189
14158
|
this.modals.splice(modalIndex, 1);
|
@@ -14226,7 +14195,7 @@ function getTabIndex(node) {
|
|
14226
14195
|
}
|
14227
14196
|
|
14228
14197
|
// Browsers do not return `tabIndex` correctly for contentEditable nodes;
|
14229
|
-
// https://
|
14198
|
+
// https://issues.chromium.org/issues/41283952
|
14230
14199
|
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
14231
14200
|
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
14232
14201
|
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
@@ -14304,7 +14273,7 @@ function FocusTrap(props) {
|
|
14304
14273
|
// It waits for the active element to move into the component to activate.
|
14305
14274
|
const activated = React.useRef(false);
|
14306
14275
|
const rootRef = React.useRef(null);
|
14307
|
-
const handleRef = useForkRef(
|
14276
|
+
const handleRef = useForkRef(getReactElementRef(children), rootRef);
|
14308
14277
|
const lastKeydown = React.useRef(null);
|
14309
14278
|
React.useEffect(() => {
|
14310
14279
|
// We might render an empty child.
|
@@ -14548,7 +14517,7 @@ function getHasTransition(children) {
|
|
14548
14517
|
|
14549
14518
|
// A modal manager used to track and manage the state of open Modals.
|
14550
14519
|
// Modals don't open on the server so this won't conflict with concurrent requests.
|
14551
|
-
const
|
14520
|
+
const manager = new ModalManager();
|
14552
14521
|
/**
|
14553
14522
|
*
|
14554
14523
|
* Demos:
|
@@ -14564,8 +14533,6 @@ function useModal(parameters) {
|
|
14564
14533
|
container,
|
14565
14534
|
disableEscapeKeyDown = false,
|
14566
14535
|
disableScrollLock = false,
|
14567
|
-
// @ts-ignore internal logic - Base UI supports the manager as a prop too
|
14568
|
-
manager = defaultManager,
|
14569
14536
|
closeAfterTransition = false,
|
14570
14537
|
onTransitionEnter,
|
14571
14538
|
onTransitionExited,
|
@@ -14611,7 +14578,7 @@ function useModal(parameters) {
|
|
14611
14578
|
handleMounted();
|
14612
14579
|
}
|
14613
14580
|
});
|
14614
|
-
const isTopModal =
|
14581
|
+
const isTopModal = () => manager.isTopModal(getModal());
|
14615
14582
|
const handlePortalRef = useEventCallback(node => {
|
14616
14583
|
mountNodeRef.current = node;
|
14617
14584
|
if (!node) {
|
@@ -14625,7 +14592,7 @@ function useModal(parameters) {
|
|
14625
14592
|
});
|
14626
14593
|
const handleClose = React.useCallback(() => {
|
14627
14594
|
manager.remove(getModal(), ariaHiddenProp);
|
14628
|
-
}, [ariaHiddenProp
|
14595
|
+
}, [ariaHiddenProp]);
|
14629
14596
|
React.useEffect(() => {
|
14630
14597
|
return () => {
|
14631
14598
|
handleClose();
|
@@ -14680,6 +14647,12 @@ function useModal(parameters) {
|
|
14680
14647
|
...otherHandlers
|
14681
14648
|
};
|
14682
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
|
+
*/
|
14683
14656
|
role: 'presentation',
|
14684
14657
|
...externalEventHandlers,
|
14685
14658
|
onKeyDown: createHandleKeyDown(externalEventHandlers),
|
@@ -14874,6 +14847,7 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
14874
14847
|
childProps.onExited = onExited;
|
14875
14848
|
}
|
14876
14849
|
const externalForwardedProps = {
|
14850
|
+
...other,
|
14877
14851
|
slots: {
|
14878
14852
|
root: components.Root,
|
14879
14853
|
backdrop: components.Backdrop,
|
@@ -14902,12 +14876,12 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
14902
14876
|
getSlotProps: otherHandlers => {
|
14903
14877
|
return getBackdropProps({
|
14904
14878
|
...otherHandlers,
|
14905
|
-
onClick:
|
14879
|
+
onClick: event => {
|
14906
14880
|
if (onBackdropClick) {
|
14907
|
-
onBackdropClick(
|
14881
|
+
onBackdropClick(event);
|
14908
14882
|
}
|
14909
14883
|
if (otherHandlers?.onClick) {
|
14910
|
-
otherHandlers.onClick(
|
14884
|
+
otherHandlers.onClick(event);
|
14911
14885
|
}
|
14912
14886
|
}
|
14913
14887
|
});
|
@@ -14925,7 +14899,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
14925
14899
|
disablePortal: disablePortal,
|
14926
14900
|
children: /*#__PURE__*/jsxs(RootSlot, {
|
14927
14901
|
...rootProps,
|
14928
|
-
...other,
|
14929
14902
|
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/jsx(BackdropSlot, {
|
14930
14903
|
...backdropProps,
|
14931
14904
|
ref: backdropRef
|
@@ -15226,7 +15199,6 @@ const DividerRoot = styled('div', {
|
|
15226
15199
|
}) => !!ownerState.children,
|
15227
15200
|
style: {
|
15228
15201
|
display: 'flex',
|
15229
|
-
whiteSpace: 'nowrap',
|
15230
15202
|
textAlign: 'center',
|
15231
15203
|
border: 0,
|
15232
15204
|
borderTopStyle: 'solid',
|
@@ -15300,6 +15272,7 @@ const DividerWrapper = styled('span', {
|
|
15300
15272
|
display: 'inline-block',
|
15301
15273
|
paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
|
15302
15274
|
paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
|
15275
|
+
whiteSpace: 'nowrap',
|
15303
15276
|
variants: [{
|
15304
15277
|
props: {
|
15305
15278
|
orientation: 'vertical'
|
@@ -15517,7 +15490,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
15517
15490
|
...other
|
15518
15491
|
} = props;
|
15519
15492
|
const childrenRef = React.useRef(null);
|
15520
|
-
const handleRef = useForkRef(
|
15493
|
+
const handleRef = useForkRef(getReactElementRef(children), childrenRef, ref);
|
15521
15494
|
const normalizedTransitionCallback = callback => isAppearing => {
|
15522
15495
|
if (callback) {
|
15523
15496
|
// onEnterXxx and onExitXxx callbacks have a different arguments.length value.
|
@@ -16201,7 +16174,7 @@ const LinearProgressRoot = styled('span', {
|
|
16201
16174
|
'@media print': {
|
16202
16175
|
colorAdjust: 'exact'
|
16203
16176
|
},
|
16204
|
-
variants: [...Object.entries(theme.palette).filter((
|
16177
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16205
16178
|
props: {
|
16206
16179
|
color
|
16207
16180
|
},
|
@@ -16266,7 +16239,7 @@ const LinearProgressDashed = styled('span', {
|
|
16266
16239
|
opacity: 0.3,
|
16267
16240
|
backgroundImage: `radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`
|
16268
16241
|
}
|
16269
|
-
}, ...Object.entries(theme.palette).filter((
|
16242
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => {
|
16270
16243
|
const backgroundColor = getColorShade(theme, color);
|
16271
16244
|
return {
|
16272
16245
|
props: {
|
@@ -16307,7 +16280,7 @@ const LinearProgressBar1 = styled('span', {
|
|
16307
16280
|
style: {
|
16308
16281
|
backgroundColor: 'currentColor'
|
16309
16282
|
}
|
16310
|
-
}, ...Object.entries(theme.palette).filter((
|
16283
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16311
16284
|
props: {
|
16312
16285
|
color
|
16313
16286
|
},
|
@@ -16364,7 +16337,7 @@ const LinearProgressBar2 = styled('span', {
|
|
16364
16337
|
top: 0,
|
16365
16338
|
transition: 'transform 0.2s linear',
|
16366
16339
|
transformOrigin: 'left',
|
16367
|
-
variants: [...Object.entries(theme.palette).filter((
|
16340
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16368
16341
|
props: {
|
16369
16342
|
color
|
16370
16343
|
},
|
@@ -16378,6 +16351,13 @@ const LinearProgressBar2 = styled('span', {
|
|
16378
16351
|
style: {
|
16379
16352
|
backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
|
16380
16353
|
}
|
16354
|
+
}, {
|
16355
|
+
props: ({
|
16356
|
+
ownerState
|
16357
|
+
}) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
|
16358
|
+
style: {
|
16359
|
+
backgroundColor: 'currentColor'
|
16360
|
+
}
|
16381
16361
|
}, {
|
16382
16362
|
props: {
|
16383
16363
|
color: 'inherit'
|
@@ -16385,7 +16365,7 @@ const LinearProgressBar2 = styled('span', {
|
|
16385
16365
|
style: {
|
16386
16366
|
opacity: 0.3
|
16387
16367
|
}
|
16388
|
-
}, ...Object.entries(theme.palette).filter((
|
16368
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
16389
16369
|
props: {
|
16390
16370
|
color,
|
16391
16371
|
variant: 'buffer'
|
@@ -16537,7 +16517,7 @@ const Stack = createStack({
|
|
16537
16517
|
slot: 'Root',
|
16538
16518
|
overridesResolver: (props, styles) => styles.root
|
16539
16519
|
}),
|
16540
|
-
useThemeProps: inProps =>
|
16520
|
+
useThemeProps: inProps => useDefaultProps({
|
16541
16521
|
props: inProps,
|
16542
16522
|
name: 'MuiStack'
|
16543
16523
|
})
|
@@ -16835,7 +16815,7 @@ var DrawerComponent = function DrawerComponent(_ref) {
|
|
16835
16815
|
py: 1.5,
|
16836
16816
|
px: 1,
|
16837
16817
|
sx: _objectSpread2({
|
16838
|
-
backgroundColor: "secondary.main"
|
16818
|
+
backgroundColor: "secondary.main"
|
16839
16819
|
}, sxHeader)
|
16840
16820
|
}, React__default.createElement(Typography, {
|
16841
16821
|
color: color || "background.paper",
|
@@ -24432,7 +24412,7 @@ function customColor(source, color) {
|
|
24432
24412
|
}
|
24433
24413
|
|
24434
24414
|
var DynamicColor = /*#__PURE__*/function () {
|
24435
|
-
var _ref = _asyncToGenerator(
|
24415
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(src) {
|
24436
24416
|
var imageElement, dynamicPalette, extractHctInstance, _dynamicPalette$palet, primary, secondary, _dynamicPalette$schem, dark, light, primaryMain, secondaryMain, primaryLight, primaryDark, secondaryLight, secondaryDark, primaryColor, secondaryColor, backgroundColor;
|
24437
24417
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
24438
24418
|
while (1) switch (_context.prev = _context.next) {
|