@sinco/react 1.0.2-rc.18 → 1.0.2-rc.19
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +339 -133
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1097,8 +1097,8 @@ function chainPropTypes(propType1, propType2) {
|
|
1097
1097
|
};
|
1098
1098
|
}
|
1099
1099
|
|
1100
|
-
function _extends$
|
1101
|
-
_extends$
|
1100
|
+
function _extends$4() {
|
1101
|
+
_extends$4 = Object.assign ? Object.assign.bind() : function (target) {
|
1102
1102
|
for (var i = 1; i < arguments.length; i++) {
|
1103
1103
|
var source = arguments[i];
|
1104
1104
|
for (var key in source) {
|
@@ -1109,7 +1109,7 @@ function _extends$3() {
|
|
1109
1109
|
}
|
1110
1110
|
return target;
|
1111
1111
|
};
|
1112
|
-
return _extends$
|
1112
|
+
return _extends$4.apply(this, arguments);
|
1113
1113
|
}
|
1114
1114
|
|
1115
1115
|
function isPlainObject(item) {
|
@@ -1128,7 +1128,7 @@ function deepClone(source) {
|
|
1128
1128
|
function deepmerge(target, source, options = {
|
1129
1129
|
clone: true
|
1130
1130
|
}) {
|
1131
|
-
const output = options.clone ? _extends$
|
1131
|
+
const output = options.clone ? _extends$4({}, target) : target;
|
1132
1132
|
if (isPlainObject(target) && isPlainObject(source)) {
|
1133
1133
|
Object.keys(source).forEach(key => {
|
1134
1134
|
// Avoid prototype pollution
|
@@ -2292,6 +2292,25 @@ function elementTypeAcceptingRef(props, propName, componentName, location, propF
|
|
2292
2292
|
}
|
2293
2293
|
var elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
|
2294
2294
|
|
2295
|
+
// This module is based on https://github.com/airbnb/prop-types-exact repository.
|
2296
|
+
// However, in order to reduce the number of dependencies and to remove some extra safe checks
|
2297
|
+
// the module was forked.
|
2298
|
+
const specialProperty = 'exact-prop: \u200b';
|
2299
|
+
function exactProp(propTypes) {
|
2300
|
+
if (process.env.NODE_ENV === 'production') {
|
2301
|
+
return propTypes;
|
2302
|
+
}
|
2303
|
+
return _extends$4({}, propTypes, {
|
2304
|
+
[specialProperty]: props => {
|
2305
|
+
const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));
|
2306
|
+
if (unsupportedProps.length > 0) {
|
2307
|
+
return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\`${prop}\``).join(', ')}. Please remove them.`);
|
2308
|
+
}
|
2309
|
+
return null;
|
2310
|
+
}
|
2311
|
+
});
|
2312
|
+
}
|
2313
|
+
|
2295
2314
|
/**
|
2296
2315
|
* WARNING: Don't import this directly.
|
2297
2316
|
* Use `MuiError` from `@mui/utils/macros/MuiError.macro` instead.
|
@@ -2888,10 +2907,10 @@ var integerPropType = process.env.NODE_ENV === 'production' ? validatorNoop : va
|
|
2888
2907
|
* @returns {object} resolved props
|
2889
2908
|
*/
|
2890
2909
|
function resolveProps(defaultProps, props) {
|
2891
|
-
const output = _extends$
|
2910
|
+
const output = _extends$4({}, props);
|
2892
2911
|
Object.keys(defaultProps).forEach(propName => {
|
2893
2912
|
if (propName.toString().match(/^(components|slots)$/)) {
|
2894
|
-
output[propName] = _extends$
|
2913
|
+
output[propName] = _extends$4({}, defaultProps[propName], output[propName]);
|
2895
2914
|
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
2896
2915
|
const defaultSlotProps = defaultProps[propName] || {};
|
2897
2916
|
const slotProps = props[propName];
|
@@ -2903,7 +2922,7 @@ function resolveProps(defaultProps, props) {
|
|
2903
2922
|
// Reduce the iteration if the default slot props is empty
|
2904
2923
|
output[propName] = slotProps;
|
2905
2924
|
} else {
|
2906
|
-
output[propName] = _extends$
|
2925
|
+
output[propName] = _extends$4({}, slotProps);
|
2907
2926
|
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
2908
2927
|
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
2909
2928
|
});
|
@@ -2983,8 +3002,8 @@ function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui')
|
|
2983
3002
|
|
2984
3003
|
var THEME_ID = '$$material';
|
2985
3004
|
|
2986
|
-
function _extends$
|
2987
|
-
_extends$
|
3005
|
+
function _extends$3() {
|
3006
|
+
_extends$3 = Object.assign ? Object.assign.bind() : function (target) {
|
2988
3007
|
for (var i = 1; i < arguments.length; i++) {
|
2989
3008
|
var source = arguments[i];
|
2990
3009
|
for (var key in source) {
|
@@ -2995,7 +3014,7 @@ function _extends$2() {
|
|
2995
3014
|
}
|
2996
3015
|
return target;
|
2997
3016
|
};
|
2998
|
-
return _extends$
|
3017
|
+
return _extends$3.apply(this, arguments);
|
2999
3018
|
}
|
3000
3019
|
|
3001
3020
|
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
@@ -3011,8 +3030,8 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
3011
3030
|
return target;
|
3012
3031
|
}
|
3013
3032
|
|
3014
|
-
function _extends$
|
3015
|
-
_extends$
|
3033
|
+
function _extends$2() {
|
3034
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
3016
3035
|
for (var i = 1; i < arguments.length; i++) {
|
3017
3036
|
var source = arguments[i];
|
3018
3037
|
for (var key in source) {
|
@@ -3023,7 +3042,7 @@ function _extends$1() {
|
|
3023
3042
|
}
|
3024
3043
|
return target;
|
3025
3044
|
};
|
3026
|
-
return _extends$
|
3045
|
+
return _extends$2.apply(this, arguments);
|
3027
3046
|
}
|
3028
3047
|
|
3029
3048
|
function memoize$1(fn) {
|
@@ -5209,10 +5228,10 @@ if (!isBrowser$2) {
|
|
5209
5228
|
};
|
5210
5229
|
}
|
5211
5230
|
|
5212
|
-
var ThemeContext = /* #__PURE__ */React.createContext({});
|
5231
|
+
var ThemeContext$2 = /* #__PURE__ */React.createContext({});
|
5213
5232
|
|
5214
5233
|
if (process.env.NODE_ENV !== 'production') {
|
5215
|
-
ThemeContext.displayName = 'EmotionThemeContext';
|
5234
|
+
ThemeContext$2.displayName = 'EmotionThemeContext';
|
5216
5235
|
}
|
5217
5236
|
|
5218
5237
|
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
@@ -5265,7 +5284,7 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
5265
5284
|
className = props.className + " ";
|
5266
5285
|
}
|
5267
5286
|
|
5268
|
-
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
|
5287
|
+
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext$2));
|
5269
5288
|
|
5270
5289
|
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
5271
5290
|
var labelFromStack = props[labelPropName];
|
@@ -5444,7 +5463,7 @@ var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
5444
5463
|
}
|
5445
5464
|
|
5446
5465
|
var styles = props.styles;
|
5447
|
-
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));
|
5466
|
+
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext$2));
|
5448
5467
|
|
5449
5468
|
if (!isBrowser$2) {
|
5450
5469
|
var _ref;
|
@@ -5690,7 +5709,7 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
5690
5709
|
var content = {
|
5691
5710
|
css: css,
|
5692
5711
|
cx: cx,
|
5693
|
-
theme: React.useContext(ThemeContext)
|
5712
|
+
theme: React.useContext(ThemeContext$2)
|
5694
5713
|
};
|
5695
5714
|
var ele = props.children(content);
|
5696
5715
|
hasRendered = true;
|
@@ -5846,7 +5865,7 @@ var createStyled$1 = function createStyled(tag, options) {
|
|
5846
5865
|
mergedProps[key] = props[key];
|
5847
5866
|
}
|
5848
5867
|
|
5849
|
-
mergedProps.theme = React.useContext(ThemeContext);
|
5868
|
+
mergedProps.theme = React.useContext(ThemeContext$2);
|
5850
5869
|
}
|
5851
5870
|
|
5852
5871
|
if (typeof props.className === 'string') {
|
@@ -5900,7 +5919,7 @@ var createStyled$1 = function createStyled(tag, options) {
|
|
5900
5919
|
});
|
5901
5920
|
|
5902
5921
|
Styled.withComponent = function (nextTag, nextOptions) {
|
5903
|
-
return createStyled(nextTag, _extends$
|
5922
|
+
return createStyled(nextTag, _extends$2({}, options, nextOptions, {
|
5904
5923
|
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
5905
5924
|
})).apply(void 0, styles);
|
5906
5925
|
};
|
@@ -5950,8 +5969,8 @@ const internal_processStyles = (tag, processor) => {
|
|
5950
5969
|
}
|
5951
5970
|
};
|
5952
5971
|
|
5953
|
-
function _extends() {
|
5954
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
5972
|
+
function _extends$1() {
|
5973
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
5955
5974
|
for (var i = 1; i < arguments.length; i++) {
|
5956
5975
|
var source = arguments[i];
|
5957
5976
|
for (var key in source) {
|
@@ -5962,7 +5981,7 @@ function _extends() {
|
|
5962
5981
|
}
|
5963
5982
|
return target;
|
5964
5983
|
};
|
5965
|
-
return _extends.apply(this, arguments);
|
5984
|
+
return _extends$1.apply(this, arguments);
|
5966
5985
|
}
|
5967
5986
|
|
5968
5987
|
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
@@ -5978,7 +5997,7 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
5978
5997
|
return target;
|
5979
5998
|
}
|
5980
5999
|
|
5981
|
-
const _excluded$
|
6000
|
+
const _excluded$k = ["values", "unit", "step"];
|
5982
6001
|
const sortBreakpointsValues = values => {
|
5983
6002
|
const breakpointsAsArray = Object.keys(values).map(key => ({
|
5984
6003
|
key,
|
@@ -5987,7 +6006,7 @@ const sortBreakpointsValues = values => {
|
|
5987
6006
|
// Sort in ascending order
|
5988
6007
|
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
5989
6008
|
return breakpointsAsArray.reduce((acc, obj) => {
|
5990
|
-
return _extends({}, acc, {
|
6009
|
+
return _extends$1({}, acc, {
|
5991
6010
|
[obj.key]: obj.val
|
5992
6011
|
});
|
5993
6012
|
}, {});
|
@@ -6013,7 +6032,7 @@ function createBreakpoints(breakpoints) {
|
|
6013
6032
|
unit = 'px',
|
6014
6033
|
step = 5
|
6015
6034
|
} = breakpoints,
|
6016
|
-
other = _objectWithoutPropertiesLoose$1(breakpoints, _excluded$
|
6035
|
+
other = _objectWithoutPropertiesLoose$1(breakpoints, _excluded$k);
|
6017
6036
|
const sortedValues = sortBreakpointsValues(values);
|
6018
6037
|
const keys = Object.keys(sortedValues);
|
6019
6038
|
function up(key) {
|
@@ -6045,7 +6064,7 @@ function createBreakpoints(breakpoints) {
|
|
6045
6064
|
}
|
6046
6065
|
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
6047
6066
|
}
|
6048
|
-
return _extends({
|
6067
|
+
return _extends$1({
|
6049
6068
|
keys,
|
6050
6069
|
values: sortedValues,
|
6051
6070
|
up,
|
@@ -7097,7 +7116,7 @@ const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
7097
7116
|
styleFunctionSx.filterProps = ['sx'];
|
7098
7117
|
var styleFunctionSx$1 = styleFunctionSx;
|
7099
7118
|
|
7100
|
-
const _excluded$
|
7119
|
+
const _excluded$j = ["breakpoints", "palette", "spacing", "shape"];
|
7101
7120
|
function createTheme$1(options = {}, ...args) {
|
7102
7121
|
const {
|
7103
7122
|
breakpoints: breakpointsInput = {},
|
@@ -7105,7 +7124,7 @@ function createTheme$1(options = {}, ...args) {
|
|
7105
7124
|
spacing: spacingInput,
|
7106
7125
|
shape: shapeInput = {}
|
7107
7126
|
} = options,
|
7108
|
-
other = _objectWithoutPropertiesLoose$1(options, _excluded$
|
7127
|
+
other = _objectWithoutPropertiesLoose$1(options, _excluded$j);
|
7109
7128
|
const breakpoints = createBreakpoints(breakpointsInput);
|
7110
7129
|
const spacing = createSpacing(spacingInput);
|
7111
7130
|
let muiTheme = deepmerge({
|
@@ -7113,14 +7132,14 @@ function createTheme$1(options = {}, ...args) {
|
|
7113
7132
|
direction: 'ltr',
|
7114
7133
|
components: {},
|
7115
7134
|
// Inject component definitions.
|
7116
|
-
palette: _extends({
|
7135
|
+
palette: _extends$1({
|
7117
7136
|
mode: 'light'
|
7118
7137
|
}, paletteInput),
|
7119
7138
|
spacing,
|
7120
|
-
shape: _extends({}, shape$1, shapeInput)
|
7139
|
+
shape: _extends$1({}, shape$1, shapeInput)
|
7121
7140
|
}, other);
|
7122
7141
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
7123
|
-
muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
7142
|
+
muiTheme.unstable_sxConfig = _extends$1({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
7124
7143
|
muiTheme.unstable_sx = function sx(props) {
|
7125
7144
|
return styleFunctionSx$1({
|
7126
7145
|
sx: props,
|
@@ -7133,17 +7152,17 @@ function createTheme$1(options = {}, ...args) {
|
|
7133
7152
|
function isObjectEmpty(obj) {
|
7134
7153
|
return Object.keys(obj).length === 0;
|
7135
7154
|
}
|
7136
|
-
function useTheme$
|
7137
|
-
const contextTheme = React.useContext(ThemeContext);
|
7155
|
+
function useTheme$3(defaultTheme = null) {
|
7156
|
+
const contextTheme = React.useContext(ThemeContext$2);
|
7138
7157
|
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
|
7139
7158
|
}
|
7140
7159
|
|
7141
7160
|
const systemDefaultTheme$1 = createTheme$1();
|
7142
|
-
function useTheme$
|
7143
|
-
return useTheme$
|
7161
|
+
function useTheme$2(defaultTheme = systemDefaultTheme$1) {
|
7162
|
+
return useTheme$3(defaultTheme);
|
7144
7163
|
}
|
7145
7164
|
|
7146
|
-
const _excluded$
|
7165
|
+
const _excluded$i = ["sx"];
|
7147
7166
|
const splitProps = props => {
|
7148
7167
|
var _props$theme$unstable, _props$theme;
|
7149
7168
|
const result = {
|
@@ -7164,7 +7183,7 @@ function extendSxProp(props) {
|
|
7164
7183
|
const {
|
7165
7184
|
sx: inSx
|
7166
7185
|
} = props,
|
7167
|
-
other = _objectWithoutPropertiesLoose$1(props, _excluded$
|
7186
|
+
other = _objectWithoutPropertiesLoose$1(props, _excluded$i);
|
7168
7187
|
const {
|
7169
7188
|
systemProps,
|
7170
7189
|
otherProps
|
@@ -7178,19 +7197,19 @@ function extendSxProp(props) {
|
|
7178
7197
|
if (!isPlainObject(result)) {
|
7179
7198
|
return systemProps;
|
7180
7199
|
}
|
7181
|
-
return _extends({}, systemProps, result);
|
7200
|
+
return _extends$1({}, systemProps, result);
|
7182
7201
|
};
|
7183
7202
|
} else {
|
7184
|
-
finalSx = _extends({}, systemProps, inSx);
|
7203
|
+
finalSx = _extends$1({}, systemProps, inSx);
|
7185
7204
|
}
|
7186
|
-
return _extends({}, otherProps, {
|
7205
|
+
return _extends$1({}, otherProps, {
|
7187
7206
|
sx: finalSx
|
7188
7207
|
});
|
7189
7208
|
}
|
7190
7209
|
|
7191
7210
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
7192
7211
|
|
7193
|
-
const _excluded$
|
7212
|
+
const _excluded$h = ["className", "component"];
|
7194
7213
|
function createBox(options = {}) {
|
7195
7214
|
const {
|
7196
7215
|
themeId,
|
@@ -7202,14 +7221,14 @@ function createBox(options = {}) {
|
|
7202
7221
|
shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
|
7203
7222
|
})(styleFunctionSx$1);
|
7204
7223
|
const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
|
7205
|
-
const theme = useTheme$
|
7224
|
+
const theme = useTheme$2(defaultTheme);
|
7206
7225
|
const _extendSxProp = extendSxProp(inProps),
|
7207
7226
|
{
|
7208
7227
|
className,
|
7209
7228
|
component = 'div'
|
7210
7229
|
} = _extendSxProp,
|
7211
|
-
other = _objectWithoutPropertiesLoose$1(_extendSxProp, _excluded$
|
7212
|
-
return /*#__PURE__*/jsx(BoxRoot, _extends({
|
7230
|
+
other = _objectWithoutPropertiesLoose$1(_extendSxProp, _excluded$h);
|
7231
|
+
return /*#__PURE__*/jsx(BoxRoot, _extends$1({
|
7213
7232
|
as: component,
|
7214
7233
|
ref: ref,
|
7215
7234
|
className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
@@ -7219,7 +7238,7 @@ function createBox(options = {}) {
|
|
7219
7238
|
return Box;
|
7220
7239
|
}
|
7221
7240
|
|
7222
|
-
const _excluded$
|
7241
|
+
const _excluded$g = ["variant"];
|
7223
7242
|
function isEmpty$1(string) {
|
7224
7243
|
return string.length === 0;
|
7225
7244
|
}
|
@@ -7233,7 +7252,7 @@ function propsToClassKey(props) {
|
|
7233
7252
|
const {
|
7234
7253
|
variant
|
7235
7254
|
} = props,
|
7236
|
-
other = _objectWithoutPropertiesLoose$1(props, _excluded$
|
7255
|
+
other = _objectWithoutPropertiesLoose$1(props, _excluded$g);
|
7237
7256
|
let classKey = variant || '';
|
7238
7257
|
Object.keys(other).sort().forEach(key => {
|
7239
7258
|
if (key === 'color') {
|
@@ -7245,7 +7264,7 @@ function propsToClassKey(props) {
|
|
7245
7264
|
return classKey;
|
7246
7265
|
}
|
7247
7266
|
|
7248
|
-
const _excluded$
|
7267
|
+
const _excluded$f = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
7249
7268
|
function isEmpty(obj) {
|
7250
7269
|
return Object.keys(obj).length === 0;
|
7251
7270
|
}
|
@@ -7322,8 +7341,8 @@ function createStyled(input = {}) {
|
|
7322
7341
|
slotShouldForwardProp = shouldForwardProp
|
7323
7342
|
} = input;
|
7324
7343
|
const systemSx = props => {
|
7325
|
-
return styleFunctionSx$1(_extends({}, props, {
|
7326
|
-
theme: resolveTheme(_extends({}, props, {
|
7344
|
+
return styleFunctionSx$1(_extends$1({}, props, {
|
7345
|
+
theme: resolveTheme(_extends$1({}, props, {
|
7327
7346
|
defaultTheme,
|
7328
7347
|
themeId
|
7329
7348
|
}))
|
@@ -7340,7 +7359,7 @@ function createStyled(input = {}) {
|
|
7340
7359
|
skipSx: inputSkipSx,
|
7341
7360
|
overridesResolver
|
7342
7361
|
} = inputOptions,
|
7343
|
-
options = _objectWithoutPropertiesLoose$1(inputOptions, _excluded$
|
7362
|
+
options = _objectWithoutPropertiesLoose$1(inputOptions, _excluded$f);
|
7344
7363
|
|
7345
7364
|
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
7346
7365
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
|
@@ -7361,7 +7380,7 @@ function createStyled(input = {}) {
|
|
7361
7380
|
// for string (html) tag, preserve the behavior in emotion & styled-components.
|
7362
7381
|
shouldForwardPropOption = undefined;
|
7363
7382
|
}
|
7364
|
-
const defaultStyledResolver = styled$3(tag, _extends({
|
7383
|
+
const defaultStyledResolver = styled$3(tag, _extends$1({
|
7365
7384
|
shouldForwardProp: shouldForwardPropOption,
|
7366
7385
|
label
|
7367
7386
|
}, options));
|
@@ -7371,8 +7390,8 @@ function createStyled(input = {}) {
|
|
7371
7390
|
// component stays as a function. This condition makes sure that we do not interpolate functions
|
7372
7391
|
// which are basically components used as a selectors.
|
7373
7392
|
return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? props => {
|
7374
|
-
return stylesArg(_extends({}, props, {
|
7375
|
-
theme: resolveTheme(_extends({}, props, {
|
7393
|
+
return stylesArg(_extends$1({}, props, {
|
7394
|
+
theme: resolveTheme(_extends$1({}, props, {
|
7376
7395
|
defaultTheme,
|
7377
7396
|
themeId
|
7378
7397
|
}))
|
@@ -7382,7 +7401,7 @@ function createStyled(input = {}) {
|
|
7382
7401
|
let transformedStyleArg = styleArg;
|
7383
7402
|
if (componentName && overridesResolver) {
|
7384
7403
|
expressionsWithDefaultTheme.push(props => {
|
7385
|
-
const theme = resolveTheme(_extends({}, props, {
|
7404
|
+
const theme = resolveTheme(_extends$1({}, props, {
|
7386
7405
|
defaultTheme,
|
7387
7406
|
themeId
|
7388
7407
|
}));
|
@@ -7390,7 +7409,7 @@ function createStyled(input = {}) {
|
|
7390
7409
|
if (styleOverrides) {
|
7391
7410
|
const resolvedStyleOverrides = {};
|
7392
7411
|
Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
|
7393
|
-
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends({}, props, {
|
7412
|
+
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$1({}, props, {
|
7394
7413
|
theme
|
7395
7414
|
})) : slotStyle;
|
7396
7415
|
});
|
@@ -7401,7 +7420,7 @@ function createStyled(input = {}) {
|
|
7401
7420
|
}
|
7402
7421
|
if (componentName && !skipVariantsResolver) {
|
7403
7422
|
expressionsWithDefaultTheme.push(props => {
|
7404
|
-
const theme = resolveTheme(_extends({}, props, {
|
7423
|
+
const theme = resolveTheme(_extends$1({}, props, {
|
7405
7424
|
defaultTheme,
|
7406
7425
|
themeId
|
7407
7426
|
}));
|
@@ -7423,8 +7442,8 @@ function createStyled(input = {}) {
|
|
7423
7442
|
// which are basically components used as a selectors.
|
7424
7443
|
styleArg.__emotion_real !== styleArg) {
|
7425
7444
|
// If the type is function, we need to define the default theme.
|
7426
|
-
transformedStyleArg = props => styleArg(_extends({}, props, {
|
7427
|
-
theme: resolveTheme(_extends({}, props, {
|
7445
|
+
transformedStyleArg = props => styleArg(_extends$1({}, props, {
|
7446
|
+
theme: resolveTheme(_extends$1({}, props, {
|
7428
7447
|
defaultTheme,
|
7429
7448
|
themeId
|
7430
7449
|
}))
|
@@ -7474,7 +7493,7 @@ function useThemeProps$1({
|
|
7474
7493
|
defaultTheme,
|
7475
7494
|
themeId
|
7476
7495
|
}) {
|
7477
|
-
let theme = useTheme$
|
7496
|
+
let theme = useTheme$2(defaultTheme);
|
7478
7497
|
if (themeId) {
|
7479
7498
|
theme = theme[themeId] || theme;
|
7480
7499
|
}
|
@@ -7720,7 +7739,169 @@ function lighten(color, coefficient) {
|
|
7720
7739
|
return recomposeColor(color);
|
7721
7740
|
}
|
7722
7741
|
|
7723
|
-
|
7742
|
+
function _extends() {
|
7743
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
7744
|
+
for (var i = 1; i < arguments.length; i++) {
|
7745
|
+
var source = arguments[i];
|
7746
|
+
for (var key in source) {
|
7747
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
7748
|
+
target[key] = source[key];
|
7749
|
+
}
|
7750
|
+
}
|
7751
|
+
}
|
7752
|
+
return target;
|
7753
|
+
};
|
7754
|
+
return _extends.apply(this, arguments);
|
7755
|
+
}
|
7756
|
+
|
7757
|
+
const ThemeContext = /*#__PURE__*/React.createContext(null);
|
7758
|
+
if (process.env.NODE_ENV !== 'production') {
|
7759
|
+
ThemeContext.displayName = 'ThemeContext';
|
7760
|
+
}
|
7761
|
+
var ThemeContext$1 = ThemeContext;
|
7762
|
+
|
7763
|
+
function useTheme$1() {
|
7764
|
+
const theme = React.useContext(ThemeContext$1);
|
7765
|
+
if (process.env.NODE_ENV !== 'production') {
|
7766
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
7767
|
+
React.useDebugValue(theme);
|
7768
|
+
}
|
7769
|
+
return theme;
|
7770
|
+
}
|
7771
|
+
|
7772
|
+
const hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
7773
|
+
var nested = hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';
|
7774
|
+
|
7775
|
+
function mergeOuterLocalTheme(outerTheme, localTheme) {
|
7776
|
+
if (typeof localTheme === 'function') {
|
7777
|
+
const mergedTheme = localTheme(outerTheme);
|
7778
|
+
if (process.env.NODE_ENV !== 'production') {
|
7779
|
+
if (!mergedTheme) {
|
7780
|
+
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
|
7781
|
+
}
|
7782
|
+
}
|
7783
|
+
return mergedTheme;
|
7784
|
+
}
|
7785
|
+
return _extends({}, outerTheme, localTheme);
|
7786
|
+
}
|
7787
|
+
|
7788
|
+
/**
|
7789
|
+
* This component takes a `theme` prop.
|
7790
|
+
* It makes the `theme` available down the React tree thanks to React context.
|
7791
|
+
* This component should preferably be used at **the root of your component tree**.
|
7792
|
+
*/
|
7793
|
+
function ThemeProvider$2(props) {
|
7794
|
+
const {
|
7795
|
+
children,
|
7796
|
+
theme: localTheme
|
7797
|
+
} = props;
|
7798
|
+
const outerTheme = useTheme$1();
|
7799
|
+
if (process.env.NODE_ENV !== 'production') {
|
7800
|
+
if (outerTheme === null && typeof localTheme === 'function') {
|
7801
|
+
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
7802
|
+
}
|
7803
|
+
}
|
7804
|
+
const theme = React.useMemo(() => {
|
7805
|
+
const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
|
7806
|
+
if (output != null) {
|
7807
|
+
output[nested] = outerTheme !== null;
|
7808
|
+
}
|
7809
|
+
return output;
|
7810
|
+
}, [localTheme, outerTheme]);
|
7811
|
+
return /*#__PURE__*/jsx(ThemeContext$1.Provider, {
|
7812
|
+
value: theme,
|
7813
|
+
children: children
|
7814
|
+
});
|
7815
|
+
}
|
7816
|
+
process.env.NODE_ENV !== "production" ? ThemeProvider$2.propTypes = {
|
7817
|
+
/**
|
7818
|
+
* Your component tree.
|
7819
|
+
*/
|
7820
|
+
children: PropTypes.node,
|
7821
|
+
/**
|
7822
|
+
* A theme object. You can provide a function to extend the outer theme.
|
7823
|
+
*/
|
7824
|
+
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
|
7825
|
+
} : void 0;
|
7826
|
+
if (process.env.NODE_ENV !== 'production') {
|
7827
|
+
process.env.NODE_ENV !== "production" ? ThemeProvider$2.propTypes = exactProp(ThemeProvider$2.propTypes) : void 0;
|
7828
|
+
}
|
7829
|
+
|
7830
|
+
const EMPTY_THEME = {};
|
7831
|
+
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
7832
|
+
return React.useMemo(() => {
|
7833
|
+
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
7834
|
+
if (typeof localTheme === 'function') {
|
7835
|
+
const mergedTheme = localTheme(resolvedTheme);
|
7836
|
+
const result = themeId ? _extends$1({}, upperTheme, {
|
7837
|
+
[themeId]: mergedTheme
|
7838
|
+
}) : mergedTheme;
|
7839
|
+
// must return a function for the private theme to NOT merge with the upper theme.
|
7840
|
+
// see the test case "use provided theme from a callback" in ThemeProvider.test.js
|
7841
|
+
if (isPrivate) {
|
7842
|
+
return () => result;
|
7843
|
+
}
|
7844
|
+
return result;
|
7845
|
+
}
|
7846
|
+
return themeId ? _extends$1({}, upperTheme, {
|
7847
|
+
[themeId]: localTheme
|
7848
|
+
}) : _extends$1({}, upperTheme, localTheme);
|
7849
|
+
}, [themeId, upperTheme, localTheme, isPrivate]);
|
7850
|
+
}
|
7851
|
+
|
7852
|
+
/**
|
7853
|
+
* This component makes the `theme` available down the React tree.
|
7854
|
+
* It should preferably be used at **the root of your component tree**.
|
7855
|
+
*
|
7856
|
+
* <ThemeProvider theme={theme}> // existing use case
|
7857
|
+
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
7858
|
+
*/
|
7859
|
+
function ThemeProvider$1(props) {
|
7860
|
+
const {
|
7861
|
+
children,
|
7862
|
+
theme: localTheme,
|
7863
|
+
themeId
|
7864
|
+
} = props;
|
7865
|
+
const upperTheme = useTheme$3(EMPTY_THEME);
|
7866
|
+
const upperPrivateTheme = useTheme$1() || EMPTY_THEME;
|
7867
|
+
if (process.env.NODE_ENV !== 'production') {
|
7868
|
+
if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {
|
7869
|
+
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
7870
|
+
}
|
7871
|
+
}
|
7872
|
+
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
7873
|
+
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
7874
|
+
return /*#__PURE__*/jsx(ThemeProvider$2, {
|
7875
|
+
theme: privateTheme,
|
7876
|
+
children: /*#__PURE__*/jsx(ThemeContext$2.Provider, {
|
7877
|
+
value: engineTheme,
|
7878
|
+
children: children
|
7879
|
+
})
|
7880
|
+
});
|
7881
|
+
}
|
7882
|
+
process.env.NODE_ENV !== "production" ? ThemeProvider$1.propTypes /* remove-proptypes */ = {
|
7883
|
+
// ----------------------------- Warning --------------------------------
|
7884
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
7885
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
7886
|
+
// ----------------------------------------------------------------------
|
7887
|
+
/**
|
7888
|
+
* Your component tree.
|
7889
|
+
*/
|
7890
|
+
children: PropTypes.node,
|
7891
|
+
/**
|
7892
|
+
* A theme object. You can provide a function to extend the outer theme.
|
7893
|
+
*/
|
7894
|
+
theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,
|
7895
|
+
/**
|
7896
|
+
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
7897
|
+
*/
|
7898
|
+
themeId: PropTypes.string
|
7899
|
+
} : void 0;
|
7900
|
+
if (process.env.NODE_ENV !== 'production') {
|
7901
|
+
process.env.NODE_ENV !== "production" ? ThemeProvider$1.propTypes = exactProp(ThemeProvider$1.propTypes) : void 0;
|
7902
|
+
}
|
7903
|
+
|
7904
|
+
const _excluded$e = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"];
|
7724
7905
|
const defaultTheme$3 = createTheme$1();
|
7725
7906
|
// widening Theme to any so that the consumer can own the theme structure.
|
7726
7907
|
const defaultCreateStyledComponent = systemStyled('div', {
|
@@ -7767,7 +7948,7 @@ const style = ({
|
|
7767
7948
|
ownerState,
|
7768
7949
|
theme
|
7769
7950
|
}) => {
|
7770
|
-
let styles = _extends({
|
7951
|
+
let styles = _extends$1({
|
7771
7952
|
display: 'flex',
|
7772
7953
|
flexDirection: 'column'
|
7773
7954
|
}, handleBreakpoints({
|
@@ -7849,14 +8030,14 @@ function createStack(options = {}) {
|
|
7849
8030
|
className,
|
7850
8031
|
useFlexGap = false
|
7851
8032
|
} = props,
|
7852
|
-
other = _objectWithoutPropertiesLoose$1(props, _excluded$
|
8033
|
+
other = _objectWithoutPropertiesLoose$1(props, _excluded$e);
|
7853
8034
|
const ownerState = {
|
7854
8035
|
direction,
|
7855
8036
|
spacing,
|
7856
8037
|
useFlexGap
|
7857
8038
|
};
|
7858
8039
|
const classes = useUtilityClasses();
|
7859
|
-
return /*#__PURE__*/jsx(StackRoot, _extends({
|
8040
|
+
return /*#__PURE__*/jsx(StackRoot, _extends$1({
|
7860
8041
|
as: component,
|
7861
8042
|
ownerState: ownerState,
|
7862
8043
|
ref: ref,
|
@@ -7876,7 +8057,7 @@ function createStack(options = {}) {
|
|
7876
8057
|
}
|
7877
8058
|
|
7878
8059
|
function createMixins(breakpoints, mixins) {
|
7879
|
-
return _extends$
|
8060
|
+
return _extends$3({
|
7880
8061
|
toolbar: {
|
7881
8062
|
minHeight: 56,
|
7882
8063
|
[breakpoints.up('xs')]: {
|
@@ -8023,7 +8204,7 @@ const green = {
|
|
8023
8204
|
};
|
8024
8205
|
var green$1 = green;
|
8025
8206
|
|
8026
|
-
const _excluded$
|
8207
|
+
const _excluded$d = ["mode", "contrastThreshold", "tonalOffset"];
|
8027
8208
|
const light = {
|
8028
8209
|
// The colors used to style the text.
|
8029
8210
|
text: {
|
@@ -8192,7 +8373,7 @@ function createPalette(palette) {
|
|
8192
8373
|
contrastThreshold = 3,
|
8193
8374
|
tonalOffset = 0.2
|
8194
8375
|
} = palette,
|
8195
|
-
other = _objectWithoutPropertiesLoose$2(palette, _excluded$
|
8376
|
+
other = _objectWithoutPropertiesLoose$2(palette, _excluded$d);
|
8196
8377
|
const primary = palette.primary || getDefaultPrimary(mode);
|
8197
8378
|
const secondary = palette.secondary || getDefaultSecondary(mode);
|
8198
8379
|
const error = palette.error || getDefaultError(mode);
|
@@ -8220,7 +8401,7 @@ function createPalette(palette) {
|
|
8220
8401
|
lightShade = 300,
|
8221
8402
|
darkShade = 700
|
8222
8403
|
}) => {
|
8223
|
-
color = _extends$
|
8404
|
+
color = _extends$3({}, color);
|
8224
8405
|
if (!color.main && color[mainShade]) {
|
8225
8406
|
color.main = color[mainShade];
|
8226
8407
|
}
|
@@ -8260,9 +8441,9 @@ const theme2 = createTheme({ palette: {
|
|
8260
8441
|
console.error(`MUI: The palette mode \`${mode}\` is not supported.`);
|
8261
8442
|
}
|
8262
8443
|
}
|
8263
|
-
const paletteOutput = deepmerge(_extends$
|
8444
|
+
const paletteOutput = deepmerge(_extends$3({
|
8264
8445
|
// A collection of common colors.
|
8265
|
-
common: _extends$
|
8446
|
+
common: _extends$3({}, common$1),
|
8266
8447
|
// prevent mutable object.
|
8267
8448
|
// The palette mode, can be light or dark.
|
8268
8449
|
mode,
|
@@ -8316,7 +8497,7 @@ const theme2 = createTheme({ palette: {
|
|
8316
8497
|
return paletteOutput;
|
8317
8498
|
}
|
8318
8499
|
|
8319
|
-
const _excluded$
|
8500
|
+
const _excluded$c = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
|
8320
8501
|
function round(value) {
|
8321
8502
|
return Math.round(value * 1e5) / 1e5;
|
8322
8503
|
}
|
@@ -8347,7 +8528,7 @@ function createTypography(palette, typography) {
|
|
8347
8528
|
allVariants,
|
8348
8529
|
pxToRem: pxToRem2
|
8349
8530
|
} = _ref,
|
8350
|
-
other = _objectWithoutPropertiesLoose$2(_ref, _excluded$
|
8531
|
+
other = _objectWithoutPropertiesLoose$2(_ref, _excluded$c);
|
8351
8532
|
if (process.env.NODE_ENV !== 'production') {
|
8352
8533
|
if (typeof fontSize !== 'number') {
|
8353
8534
|
console.error('MUI: `fontSize` is required to be a number.');
|
@@ -8358,7 +8539,7 @@ function createTypography(palette, typography) {
|
|
8358
8539
|
}
|
8359
8540
|
const coef = fontSize / 14;
|
8360
8541
|
const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
|
8361
|
-
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$
|
8542
|
+
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$3({
|
8362
8543
|
fontFamily,
|
8363
8544
|
fontWeight,
|
8364
8545
|
fontSize: pxToRem(size),
|
@@ -8389,7 +8570,7 @@ function createTypography(palette, typography) {
|
|
8389
8570
|
letterSpacing: 'inherit'
|
8390
8571
|
}
|
8391
8572
|
};
|
8392
|
-
return deepmerge(_extends$
|
8573
|
+
return deepmerge(_extends$3({
|
8393
8574
|
htmlFontSize,
|
8394
8575
|
pxToRem,
|
8395
8576
|
fontFamily,
|
@@ -8414,7 +8595,7 @@ function createShadow(...px) {
|
|
8414
8595
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
8415
8596
|
var shadows$1 = shadows;
|
8416
8597
|
|
8417
|
-
const _excluded$
|
8598
|
+
const _excluded$b = ["duration", "easing", "delay"];
|
8418
8599
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
8419
8600
|
// to learn the context in which each easing should be used.
|
8420
8601
|
const easing = {
|
@@ -8457,15 +8638,15 @@ function getAutoHeightDuration(height) {
|
|
8457
8638
|
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
|
8458
8639
|
}
|
8459
8640
|
function createTransitions(inputTransitions) {
|
8460
|
-
const mergedEasing = _extends$
|
8461
|
-
const mergedDuration = _extends$
|
8641
|
+
const mergedEasing = _extends$3({}, easing, inputTransitions.easing);
|
8642
|
+
const mergedDuration = _extends$3({}, duration, inputTransitions.duration);
|
8462
8643
|
const create = (props = ['all'], options = {}) => {
|
8463
8644
|
const {
|
8464
8645
|
duration: durationOption = mergedDuration.standard,
|
8465
8646
|
easing: easingOption = mergedEasing.easeInOut,
|
8466
8647
|
delay = 0
|
8467
8648
|
} = options,
|
8468
|
-
other = _objectWithoutPropertiesLoose$2(options, _excluded$
|
8649
|
+
other = _objectWithoutPropertiesLoose$2(options, _excluded$b);
|
8469
8650
|
if (process.env.NODE_ENV !== 'production') {
|
8470
8651
|
const isString = value => typeof value === 'string';
|
8471
8652
|
// IE11 support, replace with Number.isNaN
|
@@ -8492,7 +8673,7 @@ function createTransitions(inputTransitions) {
|
|
8492
8673
|
}
|
8493
8674
|
return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
|
8494
8675
|
};
|
8495
|
-
return _extends$
|
8676
|
+
return _extends$3({
|
8496
8677
|
getAutoHeightDuration,
|
8497
8678
|
create
|
8498
8679
|
}, inputTransitions, {
|
@@ -8515,7 +8696,7 @@ const zIndex = {
|
|
8515
8696
|
};
|
8516
8697
|
var zIndex$1 = zIndex;
|
8517
8698
|
|
8518
|
-
const _excluded$
|
8699
|
+
const _excluded$a = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
8519
8700
|
function createTheme(options = {}, ...args) {
|
8520
8701
|
const {
|
8521
8702
|
mixins: mixinsInput = {},
|
@@ -8523,7 +8704,7 @@ function createTheme(options = {}, ...args) {
|
|
8523
8704
|
transitions: transitionsInput = {},
|
8524
8705
|
typography: typographyInput = {}
|
8525
8706
|
} = options,
|
8526
|
-
other = _objectWithoutPropertiesLoose$2(options, _excluded$
|
8707
|
+
other = _objectWithoutPropertiesLoose$2(options, _excluded$a);
|
8527
8708
|
if (options.vars) {
|
8528
8709
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
|
8529
8710
|
Please use another name.` : formatMuiErrorMessage(18));
|
@@ -8537,7 +8718,7 @@ Please use another name.` : formatMuiErrorMessage(18));
|
|
8537
8718
|
shadows: shadows$1.slice(),
|
8538
8719
|
typography: createTypography(palette, typographyInput),
|
8539
8720
|
transitions: createTransitions(transitionsInput),
|
8540
|
-
zIndex: _extends$
|
8721
|
+
zIndex: _extends$3({}, zIndex$1)
|
8541
8722
|
});
|
8542
8723
|
muiTheme = deepmerge(muiTheme, other);
|
8543
8724
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
@@ -8571,7 +8752,7 @@ Please use another name.` : formatMuiErrorMessage(18));
|
|
8571
8752
|
}
|
8572
8753
|
});
|
8573
8754
|
}
|
8574
|
-
muiTheme.unstable_sxConfig = _extends$
|
8755
|
+
muiTheme.unstable_sxConfig = _extends$3({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
8575
8756
|
muiTheme.unstable_sx = function sx(props) {
|
8576
8757
|
return styleFunctionSx$1({
|
8577
8758
|
sx: props,
|
@@ -8585,7 +8766,7 @@ const defaultTheme$1 = createTheme();
|
|
8585
8766
|
var defaultTheme$2 = defaultTheme$1;
|
8586
8767
|
|
8587
8768
|
function useTheme() {
|
8588
|
-
const theme = useTheme$
|
8769
|
+
const theme = useTheme$2(defaultTheme$2);
|
8589
8770
|
if (process.env.NODE_ENV !== 'production') {
|
8590
8771
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
8591
8772
|
React.useDebugValue(theme);
|
@@ -8613,6 +8794,29 @@ const styled = createStyled({
|
|
8613
8794
|
});
|
8614
8795
|
var styled$1 = styled;
|
8615
8796
|
|
8797
|
+
const _excluded$9 = ["theme"];
|
8798
|
+
function ThemeProvider(_ref) {
|
8799
|
+
let {
|
8800
|
+
theme: themeInput
|
8801
|
+
} = _ref,
|
8802
|
+
props = _objectWithoutPropertiesLoose$2(_ref, _excluded$9);
|
8803
|
+
const scopedTheme = themeInput[THEME_ID];
|
8804
|
+
return /*#__PURE__*/jsx(ThemeProvider$1, _extends$3({}, props, {
|
8805
|
+
themeId: scopedTheme ? THEME_ID : undefined,
|
8806
|
+
theme: scopedTheme || themeInput
|
8807
|
+
}));
|
8808
|
+
}
|
8809
|
+
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = {
|
8810
|
+
/**
|
8811
|
+
* Your component tree.
|
8812
|
+
*/
|
8813
|
+
children: PropTypes.node,
|
8814
|
+
/**
|
8815
|
+
* A theme object. You can provide a function to extend the outer theme.
|
8816
|
+
*/
|
8817
|
+
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
|
8818
|
+
} : void 0;
|
8819
|
+
|
8616
8820
|
// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
|
8617
8821
|
const getOverlayAlpha = elevation => {
|
8618
8822
|
let alphaValue;
|
@@ -9702,7 +9906,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
9702
9906
|
} = props,
|
9703
9907
|
other = _objectWithoutPropertiesLoose$2(props, _excluded$8);
|
9704
9908
|
const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
|
9705
|
-
const ownerState = _extends$
|
9909
|
+
const ownerState = _extends$3({}, props, {
|
9706
9910
|
color,
|
9707
9911
|
component,
|
9708
9912
|
fontSize,
|
@@ -9716,7 +9920,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
9716
9920
|
more.viewBox = viewBox;
|
9717
9921
|
}
|
9718
9922
|
const classes = useUtilityClasses$7(ownerState);
|
9719
|
-
return /*#__PURE__*/jsxs(SvgIconRoot, _extends$
|
9923
|
+
return /*#__PURE__*/jsxs(SvgIconRoot, _extends$3({
|
9720
9924
|
as: component,
|
9721
9925
|
className: clsx(classes.root, className),
|
9722
9926
|
focusable: "false",
|
@@ -9808,7 +10012,7 @@ var SvgIcon$1 = SvgIcon;
|
|
9808
10012
|
|
9809
10013
|
function createSvgIcon(path, displayName) {
|
9810
10014
|
function Component(props, ref) {
|
9811
|
-
return /*#__PURE__*/jsx(SvgIcon$1, _extends$
|
10015
|
+
return /*#__PURE__*/jsx(SvgIcon$1, _extends$3({
|
9812
10016
|
"data-testid": `${displayName}Icon`,
|
9813
10017
|
ref: ref
|
9814
10018
|
}, props, {
|
@@ -10084,7 +10288,7 @@ var TransitionGroup = /*#__PURE__*/function (_React$Component) {
|
|
10084
10288
|
|
10085
10289
|
if (this.mounted) {
|
10086
10290
|
this.setState(function (state) {
|
10087
|
-
var children = _extends$
|
10291
|
+
var children = _extends$2({}, state.children);
|
10088
10292
|
|
10089
10293
|
delete children[child.key];
|
10090
10294
|
return {
|
@@ -10213,7 +10417,7 @@ const PaperRoot = styled$1('div', {
|
|
10213
10417
|
ownerState
|
10214
10418
|
}) => {
|
10215
10419
|
var _theme$vars$overlays;
|
10216
|
-
return _extends$
|
10420
|
+
return _extends$3({
|
10217
10421
|
backgroundColor: (theme.vars || theme).palette.background.paper,
|
10218
10422
|
color: (theme.vars || theme).palette.text.primary,
|
10219
10423
|
transition: theme.transitions.create('box-shadow')
|
@@ -10221,7 +10425,7 @@ const PaperRoot = styled$1('div', {
|
|
10221
10425
|
borderRadius: theme.shape.borderRadius
|
10222
10426
|
}, ownerState.variant === 'outlined' && {
|
10223
10427
|
border: `1px solid ${(theme.vars || theme).palette.divider}`
|
10224
|
-
}, ownerState.variant === 'elevation' && _extends$
|
10428
|
+
}, ownerState.variant === 'elevation' && _extends$3({
|
10225
10429
|
boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
|
10226
10430
|
}, !theme.vars && theme.palette.mode === 'dark' && {
|
10227
10431
|
backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha$1(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha$1(ownerState.elevation))})`
|
@@ -10242,7 +10446,7 @@ const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
|
|
10242
10446
|
variant = 'elevation'
|
10243
10447
|
} = props,
|
10244
10448
|
other = _objectWithoutPropertiesLoose$2(props, _excluded$7);
|
10245
|
-
const ownerState = _extends$
|
10449
|
+
const ownerState = _extends$3({}, props, {
|
10246
10450
|
component,
|
10247
10451
|
elevation,
|
10248
10452
|
square,
|
@@ -10256,7 +10460,7 @@ const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
|
|
10256
10460
|
console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join('\n'));
|
10257
10461
|
}
|
10258
10462
|
}
|
10259
|
-
return /*#__PURE__*/jsx(PaperRoot, _extends$
|
10463
|
+
return /*#__PURE__*/jsx(PaperRoot, _extends$3({
|
10260
10464
|
as: component,
|
10261
10465
|
ownerState: ownerState,
|
10262
10466
|
className: clsx(classes.root, className),
|
@@ -10696,7 +10900,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
10696
10900
|
start,
|
10697
10901
|
stop
|
10698
10902
|
}), [pulsate, start, stop]);
|
10699
|
-
return /*#__PURE__*/jsx(TouchRippleRoot, _extends$
|
10903
|
+
return /*#__PURE__*/jsx(TouchRippleRoot, _extends$3({
|
10700
10904
|
className: clsx(touchRippleClasses$1.root, classes.root, className),
|
10701
10905
|
ref: container
|
10702
10906
|
}, other, {
|
@@ -10990,7 +11194,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
10990
11194
|
}
|
10991
11195
|
}, [enableTouchRipple]);
|
10992
11196
|
}
|
10993
|
-
const ownerState = _extends$
|
11197
|
+
const ownerState = _extends$3({}, props, {
|
10994
11198
|
centerRipple,
|
10995
11199
|
component,
|
10996
11200
|
disabled,
|
@@ -11001,7 +11205,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
11001
11205
|
focusVisible
|
11002
11206
|
});
|
11003
11207
|
const classes = useUtilityClasses$5(ownerState);
|
11004
|
-
return /*#__PURE__*/jsxs(ButtonBaseRoot, _extends$
|
11208
|
+
return /*#__PURE__*/jsxs(ButtonBaseRoot, _extends$3({
|
11005
11209
|
as: ComponentProp,
|
11006
11210
|
className: clsx(classes.root, className),
|
11007
11211
|
ownerState: ownerState,
|
@@ -11025,7 +11229,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
11025
11229
|
children: [children, enableTouchRipple ?
|
11026
11230
|
/*#__PURE__*/
|
11027
11231
|
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
11028
|
-
jsx(TouchRipple$1, _extends$
|
11232
|
+
jsx(TouchRipple$1, _extends$3({
|
11029
11233
|
ref: handleRippleRef,
|
11030
11234
|
center: centerRipple
|
11031
11235
|
}, TouchRippleProps)) : null]
|
@@ -11223,7 +11427,7 @@ const IconButtonRoot = styled$1(ButtonBase$1, {
|
|
11223
11427
|
})(({
|
11224
11428
|
theme,
|
11225
11429
|
ownerState
|
11226
|
-
}) => _extends$
|
11430
|
+
}) => _extends$3({
|
11227
11431
|
textAlign: 'center',
|
11228
11432
|
flex: '0 0 auto',
|
11229
11433
|
fontSize: theme.typography.pxToRem(24),
|
@@ -11253,12 +11457,12 @@ const IconButtonRoot = styled$1(ButtonBase$1, {
|
|
11253
11457
|
}) => {
|
11254
11458
|
var _palette;
|
11255
11459
|
const palette = (_palette = (theme.vars || theme).palette) == null ? void 0 : _palette[ownerState.color];
|
11256
|
-
return _extends$
|
11460
|
+
return _extends$3({}, ownerState.color === 'inherit' && {
|
11257
11461
|
color: 'inherit'
|
11258
|
-
}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && _extends$
|
11462
|
+
}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && _extends$3({
|
11259
11463
|
color: palette == null ? void 0 : palette.main
|
11260
11464
|
}, !ownerState.disableRipple && {
|
11261
|
-
'&:hover': _extends$
|
11465
|
+
'&:hover': _extends$3({}, palette && {
|
11262
11466
|
backgroundColor: theme.vars ? `rgba(${palette.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(palette.main, theme.palette.action.hoverOpacity)
|
11263
11467
|
}, {
|
11264
11468
|
// Reset on touch devices, it doesn't add specificity
|
@@ -11299,7 +11503,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
11299
11503
|
size = 'medium'
|
11300
11504
|
} = props,
|
11301
11505
|
other = _objectWithoutPropertiesLoose$2(props, _excluded$4);
|
11302
|
-
const ownerState = _extends$
|
11506
|
+
const ownerState = _extends$3({}, props, {
|
11303
11507
|
edge,
|
11304
11508
|
color,
|
11305
11509
|
disabled,
|
@@ -11307,7 +11511,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
11307
11511
|
size
|
11308
11512
|
});
|
11309
11513
|
const classes = useUtilityClasses$4(ownerState);
|
11310
|
-
return /*#__PURE__*/jsx(IconButtonRoot, _extends$
|
11514
|
+
return /*#__PURE__*/jsx(IconButtonRoot, _extends$3({
|
11311
11515
|
className: clsx(classes.root, className),
|
11312
11516
|
centerRipple: true,
|
11313
11517
|
focusRipple: !disableFocusRipple,
|
@@ -11419,7 +11623,7 @@ const TypographyRoot = styled$1('span', {
|
|
11419
11623
|
})(({
|
11420
11624
|
theme,
|
11421
11625
|
ownerState
|
11422
|
-
}) => _extends$
|
11626
|
+
}) => _extends$3({
|
11423
11627
|
margin: 0
|
11424
11628
|
}, ownerState.variant && theme.typography[ownerState.variant], ownerState.align !== 'inherit' && {
|
11425
11629
|
textAlign: ownerState.align
|
@@ -11463,7 +11667,7 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, re
|
|
11463
11667
|
name: 'MuiTypography'
|
11464
11668
|
});
|
11465
11669
|
const color = transformDeprecatedColors(themeProps.color);
|
11466
|
-
const props = extendSxProp(_extends$
|
11670
|
+
const props = extendSxProp(_extends$3({}, themeProps, {
|
11467
11671
|
color
|
11468
11672
|
}));
|
11469
11673
|
const {
|
@@ -11477,7 +11681,7 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, re
|
|
11477
11681
|
variantMapping = defaultVariantMapping
|
11478
11682
|
} = props,
|
11479
11683
|
other = _objectWithoutPropertiesLoose$2(props, _excluded$3);
|
11480
|
-
const ownerState = _extends$
|
11684
|
+
const ownerState = _extends$3({}, props, {
|
11481
11685
|
align,
|
11482
11686
|
color,
|
11483
11687
|
className,
|
@@ -11490,7 +11694,7 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, re
|
|
11490
11694
|
});
|
11491
11695
|
const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';
|
11492
11696
|
const classes = useUtilityClasses$3(ownerState);
|
11493
|
-
return /*#__PURE__*/jsx(TypographyRoot, _extends$
|
11697
|
+
return /*#__PURE__*/jsx(TypographyRoot, _extends$3({
|
11494
11698
|
as: Component,
|
11495
11699
|
ref: ref,
|
11496
11700
|
ownerState: ownerState,
|
@@ -11634,9 +11838,9 @@ const useUtilityClasses$2 = ownerState => {
|
|
11634
11838
|
endIcon: ['endIcon', `iconSize${capitalize(size)}`]
|
11635
11839
|
};
|
11636
11840
|
const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
|
11637
|
-
return _extends$
|
11841
|
+
return _extends$3({}, classes, composedClasses);
|
11638
11842
|
};
|
11639
|
-
const commonIconStyles = ownerState => _extends$
|
11843
|
+
const commonIconStyles = ownerState => _extends$3({}, ownerState.size === 'small' && {
|
11640
11844
|
'& > *:nth-of-type(1)': {
|
11641
11845
|
fontSize: 18
|
11642
11846
|
}
|
@@ -11666,14 +11870,14 @@ const ButtonRoot = styled$1(ButtonBase$1, {
|
|
11666
11870
|
var _theme$palette$getCon, _theme$palette;
|
11667
11871
|
const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];
|
11668
11872
|
const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];
|
11669
|
-
return _extends$
|
11873
|
+
return _extends$3({}, theme.typography.button, {
|
11670
11874
|
minWidth: 64,
|
11671
11875
|
padding: '6px 16px',
|
11672
11876
|
borderRadius: (theme.vars || theme).shape.borderRadius,
|
11673
11877
|
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
|
11674
11878
|
duration: theme.transitions.duration.short
|
11675
11879
|
}),
|
11676
|
-
'&:hover': _extends$
|
11880
|
+
'&:hover': _extends$3({
|
11677
11881
|
textDecoration: 'none',
|
11678
11882
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
|
11679
11883
|
// Reset on touch devices, it doesn't add specificity
|
@@ -11708,13 +11912,13 @@ const ButtonRoot = styled$1(ButtonBase$1, {
|
|
11708
11912
|
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
11709
11913
|
}
|
11710
11914
|
}),
|
11711
|
-
'&:active': _extends$
|
11915
|
+
'&:active': _extends$3({}, ownerState.variant === 'contained' && {
|
11712
11916
|
boxShadow: (theme.vars || theme).shadows[8]
|
11713
11917
|
}),
|
11714
|
-
[`&.${buttonClasses$1.focusVisible}`]: _extends$
|
11918
|
+
[`&.${buttonClasses$1.focusVisible}`]: _extends$3({}, ownerState.variant === 'contained' && {
|
11715
11919
|
boxShadow: (theme.vars || theme).shadows[6]
|
11716
11920
|
}),
|
11717
|
-
[`&.${buttonClasses$1.disabled}`]: _extends$
|
11921
|
+
[`&.${buttonClasses$1.disabled}`]: _extends$3({
|
11718
11922
|
color: (theme.vars || theme).palette.action.disabled
|
11719
11923
|
}, ownerState.variant === 'outlined' && {
|
11720
11924
|
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
@@ -11794,7 +11998,7 @@ const ButtonStartIcon = styled$1('span', {
|
|
11794
11998
|
}
|
11795
11999
|
})(({
|
11796
12000
|
ownerState
|
11797
|
-
}) => _extends$
|
12001
|
+
}) => _extends$3({
|
11798
12002
|
display: 'inherit',
|
11799
12003
|
marginRight: 8,
|
11800
12004
|
marginLeft: -4
|
@@ -11812,7 +12016,7 @@ const ButtonEndIcon = styled$1('span', {
|
|
11812
12016
|
}
|
11813
12017
|
})(({
|
11814
12018
|
ownerState
|
11815
|
-
}) => _extends$
|
12019
|
+
}) => _extends$3({
|
11816
12020
|
display: 'inherit',
|
11817
12021
|
marginRight: -4,
|
11818
12022
|
marginLeft: 8
|
@@ -11844,7 +12048,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
11844
12048
|
variant = 'text'
|
11845
12049
|
} = props,
|
11846
12050
|
other = _objectWithoutPropertiesLoose$2(props, _excluded$2);
|
11847
|
-
const ownerState = _extends$
|
12051
|
+
const ownerState = _extends$3({}, props, {
|
11848
12052
|
color,
|
11849
12053
|
component,
|
11850
12054
|
disabled,
|
@@ -11866,7 +12070,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
11866
12070
|
ownerState: ownerState,
|
11867
12071
|
children: endIconProp
|
11868
12072
|
});
|
11869
|
-
return /*#__PURE__*/jsxs(ButtonRoot, _extends$
|
12073
|
+
return /*#__PURE__*/jsxs(ButtonRoot, _extends$3({
|
11870
12074
|
ownerState: ownerState,
|
11871
12075
|
className: clsx(contextProps.className, classes.root, className),
|
11872
12076
|
component: component,
|
@@ -12011,7 +12215,7 @@ const DividerRoot = styled$1('div', {
|
|
12011
12215
|
})(({
|
12012
12216
|
theme,
|
12013
12217
|
ownerState
|
12014
|
-
}) => _extends$
|
12218
|
+
}) => _extends$3({
|
12015
12219
|
margin: 0,
|
12016
12220
|
// Reset browser default style.
|
12017
12221
|
flexShrink: 0,
|
@@ -12043,7 +12247,7 @@ const DividerRoot = styled$1('div', {
|
|
12043
12247
|
height: 'auto'
|
12044
12248
|
}), ({
|
12045
12249
|
ownerState
|
12046
|
-
}) => _extends$
|
12250
|
+
}) => _extends$3({}, ownerState.children && {
|
12047
12251
|
display: 'flex',
|
12048
12252
|
whiteSpace: 'nowrap',
|
12049
12253
|
textAlign: 'center',
|
@@ -12055,7 +12259,7 @@ const DividerRoot = styled$1('div', {
|
|
12055
12259
|
}), ({
|
12056
12260
|
theme,
|
12057
12261
|
ownerState
|
12058
|
-
}) => _extends$
|
12262
|
+
}) => _extends$3({}, ownerState.children && ownerState.orientation !== 'vertical' && {
|
12059
12263
|
'&::before, &::after': {
|
12060
12264
|
width: '100%',
|
12061
12265
|
borderTop: `thin solid ${(theme.vars || theme).palette.divider}`
|
@@ -12063,7 +12267,7 @@ const DividerRoot = styled$1('div', {
|
|
12063
12267
|
}), ({
|
12064
12268
|
theme,
|
12065
12269
|
ownerState
|
12066
|
-
}) => _extends$
|
12270
|
+
}) => _extends$3({}, ownerState.children && ownerState.orientation === 'vertical' && {
|
12067
12271
|
flexDirection: 'column',
|
12068
12272
|
'&::before, &::after': {
|
12069
12273
|
height: '100%',
|
@@ -12071,7 +12275,7 @@ const DividerRoot = styled$1('div', {
|
|
12071
12275
|
}
|
12072
12276
|
}), ({
|
12073
12277
|
ownerState
|
12074
|
-
}) => _extends$
|
12278
|
+
}) => _extends$3({}, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && {
|
12075
12279
|
'&::before': {
|
12076
12280
|
width: '90%'
|
12077
12281
|
},
|
@@ -12098,7 +12302,7 @@ const DividerWrapper = styled$1('span', {
|
|
12098
12302
|
})(({
|
12099
12303
|
theme,
|
12100
12304
|
ownerState
|
12101
|
-
}) => _extends$
|
12305
|
+
}) => _extends$3({
|
12102
12306
|
display: 'inline-block',
|
12103
12307
|
paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
|
12104
12308
|
paddingRight: `calc(${theme.spacing(1)} * 1.2)`
|
@@ -12124,7 +12328,7 @@ const Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {
|
|
12124
12328
|
variant = 'fullWidth'
|
12125
12329
|
} = props,
|
12126
12330
|
other = _objectWithoutPropertiesLoose$2(props, _excluded$1);
|
12127
|
-
const ownerState = _extends$
|
12331
|
+
const ownerState = _extends$3({}, props, {
|
12128
12332
|
absolute,
|
12129
12333
|
component,
|
12130
12334
|
flexItem,
|
@@ -12135,7 +12339,7 @@ const Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {
|
|
12135
12339
|
variant
|
12136
12340
|
});
|
12137
12341
|
const classes = useUtilityClasses$1(ownerState);
|
12138
|
-
return /*#__PURE__*/jsx(DividerRoot, _extends$
|
12342
|
+
return /*#__PURE__*/jsx(DividerRoot, _extends$3({
|
12139
12343
|
as: component,
|
12140
12344
|
className: clsx(classes.root, className),
|
12141
12345
|
role: role,
|
@@ -12367,7 +12571,7 @@ const LinearProgressRoot = styled$1('span', {
|
|
12367
12571
|
})(({
|
12368
12572
|
ownerState,
|
12369
12573
|
theme
|
12370
|
-
}) => _extends$
|
12574
|
+
}) => _extends$3({
|
12371
12575
|
position: 'relative',
|
12372
12576
|
overflow: 'hidden',
|
12373
12577
|
display: 'block',
|
@@ -12409,7 +12613,7 @@ const LinearProgressDashed = styled$1('span', {
|
|
12409
12613
|
theme
|
12410
12614
|
}) => {
|
12411
12615
|
const backgroundColor = getColorShade(theme, ownerState.color);
|
12412
|
-
return _extends$
|
12616
|
+
return _extends$3({
|
12413
12617
|
position: 'absolute',
|
12414
12618
|
marginTop: 0,
|
12415
12619
|
height: '100%',
|
@@ -12436,7 +12640,7 @@ const LinearProgressBar1 = styled$1('span', {
|
|
12436
12640
|
})(({
|
12437
12641
|
ownerState,
|
12438
12642
|
theme
|
12439
|
-
}) => _extends$
|
12643
|
+
}) => _extends$3({
|
12440
12644
|
width: '100%',
|
12441
12645
|
position: 'absolute',
|
12442
12646
|
left: 0,
|
@@ -12468,7 +12672,7 @@ const LinearProgressBar2 = styled$1('span', {
|
|
12468
12672
|
})(({
|
12469
12673
|
ownerState,
|
12470
12674
|
theme
|
12471
|
-
}) => _extends$
|
12675
|
+
}) => _extends$3({
|
12472
12676
|
width: '100%',
|
12473
12677
|
position: 'absolute',
|
12474
12678
|
left: 0,
|
@@ -12510,7 +12714,7 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
|
|
12510
12714
|
variant = 'indeterminate'
|
12511
12715
|
} = props,
|
12512
12716
|
other = _objectWithoutPropertiesLoose$2(props, _excluded);
|
12513
|
-
const ownerState = _extends$
|
12717
|
+
const ownerState = _extends$3({}, props, {
|
12514
12718
|
color,
|
12515
12719
|
variant
|
12516
12720
|
});
|
@@ -12546,7 +12750,7 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
|
|
12546
12750
|
console.error('MUI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');
|
12547
12751
|
}
|
12548
12752
|
}
|
12549
|
-
return /*#__PURE__*/jsxs(LinearProgressRoot, _extends$
|
12753
|
+
return /*#__PURE__*/jsxs(LinearProgressRoot, _extends$3({
|
12550
12754
|
className: clsx(classes.root, className),
|
12551
12755
|
ownerState: ownerState,
|
12552
12756
|
role: "progressbar"
|
@@ -12679,7 +12883,9 @@ const ToastNotification = toast => {
|
|
12679
12883
|
};
|
12680
12884
|
}, [timeProgress, toast.time]);
|
12681
12885
|
console.log(progress);
|
12682
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null,
|
12886
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
12887
|
+
theme: SincoTheme
|
12888
|
+
}, openToast && /*#__PURE__*/React__default.createElement(Paper$1, {
|
12683
12889
|
sx: {
|
12684
12890
|
width: 370
|
12685
12891
|
},
|
@@ -12752,7 +12958,7 @@ const ToastNotification = toast => {
|
|
12752
12958
|
color: colors,
|
12753
12959
|
variant: "determinate",
|
12754
12960
|
value: progress
|
12755
|
-
}))));
|
12961
|
+
})))));
|
12756
12962
|
};
|
12757
12963
|
|
12758
12964
|
export { SincoTheme, ToastNotification };
|