@mui/material 5.11.16 → 5.12.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/Box/Box.js +2 -0
- package/CHANGELOG.md +73 -22
- package/GlobalStyles/GlobalStyles.js +4 -4
- package/Menu/Menu.js +1 -1
- package/OverridableComponent.d.ts +1 -1
- package/PaginationItem/paginationItemClasses.d.ts +2 -2
- package/Popper/Popper.js +0 -4
- package/README.md +5 -5
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +1 -1
- package/Tabs/Tabs.js +1 -1
- package/Toolbar/Toolbar.d.ts +1 -1
- package/Toolbar/Toolbar.js +1 -1
- package/darkScrollbar/index.js +1 -1
- package/index.js +1 -1
- package/legacy/Box/Box.js +2 -0
- package/legacy/GlobalStyles/GlobalStyles.js +4 -4
- package/legacy/Menu/Menu.js +1 -1
- package/legacy/Popper/Popper.js +0 -4
- package/legacy/Select/Select.js +1 -1
- package/legacy/Tabs/Tabs.js +1 -1
- package/legacy/Toolbar/Toolbar.js +1 -1
- package/legacy/darkScrollbar/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +2 -0
- package/legacy/styles/ThemeProvider.js +19 -1
- package/legacy/styles/identifier.js +1 -0
- package/legacy/styles/index.js +1 -0
- package/legacy/styles/styled.js +2 -0
- package/legacy/styles/useTheme.js +2 -1
- package/legacy/styles/useThemeProps.js +3 -1
- package/modern/Box/Box.js +2 -0
- package/modern/GlobalStyles/GlobalStyles.js +4 -4
- package/modern/Menu/Menu.js +1 -1
- package/modern/Popper/Popper.js +0 -4
- package/modern/Select/Select.js +1 -1
- package/modern/Tabs/Tabs.js +1 -1
- package/modern/Toolbar/Toolbar.js +1 -1
- package/modern/darkScrollbar/index.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +2 -0
- package/modern/styles/ThemeProvider.js +22 -1
- package/modern/styles/identifier.js +1 -0
- package/modern/styles/index.js +1 -0
- package/modern/styles/styled.js +2 -0
- package/modern/styles/useTheme.js +2 -1
- package/modern/styles/useThemeProps.js +3 -1
- package/node/Box/Box.js +2 -0
- package/node/GlobalStyles/GlobalStyles.js +4 -4
- package/node/Menu/Menu.js +1 -1
- package/node/Popper/Popper.js +0 -4
- package/node/Select/Select.js +1 -1
- package/node/Tabs/Tabs.js +1 -1
- package/node/Toolbar/Toolbar.js +1 -1
- package/node/darkScrollbar/index.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +2 -0
- package/node/styles/ThemeProvider.js +26 -7
- package/node/styles/identifier.js +8 -0
- package/node/styles/index.js +8 -0
- package/node/styles/styled.js +2 -0
- package/node/styles/useTheme.js +2 -1
- package/node/styles/useThemeProps.js +3 -1
- package/package.json +6 -6
- package/styles/CssVarsProvider.d.ts +5 -0
- package/styles/CssVarsProvider.js +2 -0
- package/styles/ThemeProvider.js +22 -1
- package/styles/experimental_extendTheme.d.ts +1 -1
- package/styles/identifier.d.ts +2 -0
- package/styles/identifier.js +1 -0
- package/styles/index.d.ts +1 -0
- package/styles/index.js +1 -0
- package/styles/styled.js +2 -0
- package/styles/useTheme.js +2 -1
- package/styles/useThemeProps.js +3 -1
- package/umd/material-ui.development.js +580 -489
- package/umd/material-ui.production.min.js +21 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v5.
|
|
2
|
+
* @mui/material v5.12.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -2358,6 +2358,8 @@
|
|
|
2358
2358
|
return result;
|
|
2359
2359
|
}
|
|
2360
2360
|
|
|
2361
|
+
var THEME_ID = '$$material';
|
|
2362
|
+
|
|
2361
2363
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2362
2364
|
if (source == null) return {};
|
|
2363
2365
|
var target = {};
|
|
@@ -2717,7 +2719,7 @@
|
|
|
2717
2719
|
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
2718
2720
|
|
|
2719
2721
|
if (unsafePseudoClasses) {
|
|
2720
|
-
var isNested = element.parent
|
|
2722
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
2721
2723
|
//
|
|
2722
2724
|
// considering this input:
|
|
2723
2725
|
// .a {
|
|
@@ -2733,7 +2735,7 @@
|
|
|
2733
2735
|
// .b {}
|
|
2734
2736
|
// }
|
|
2735
2737
|
|
|
2736
|
-
var commentContainer = isNested ?
|
|
2738
|
+
var commentContainer = isNested ? element.parent.children : // global rule at the root level
|
|
2737
2739
|
children;
|
|
2738
2740
|
|
|
2739
2741
|
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
@@ -5811,7 +5813,7 @@
|
|
|
5811
5813
|
function isEmpty$4(obj) {
|
|
5812
5814
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
5813
5815
|
}
|
|
5814
|
-
function GlobalStyles$
|
|
5816
|
+
function GlobalStyles$2(props) {
|
|
5815
5817
|
const {
|
|
5816
5818
|
styles,
|
|
5817
5819
|
defaultTheme = {}
|
|
@@ -5821,9 +5823,9 @@
|
|
|
5821
5823
|
styles: globalStyles
|
|
5822
5824
|
});
|
|
5823
5825
|
}
|
|
5824
|
-
GlobalStyles$
|
|
5826
|
+
GlobalStyles$2.propTypes = {
|
|
5825
5827
|
defaultTheme: PropTypes.object,
|
|
5826
|
-
styles: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func])
|
|
5828
|
+
styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])
|
|
5827
5829
|
} ;
|
|
5828
5830
|
|
|
5829
5831
|
function styled$3(tag, options) {
|
|
@@ -5850,6 +5852,90 @@
|
|
|
5850
5852
|
}
|
|
5851
5853
|
};
|
|
5852
5854
|
|
|
5855
|
+
const _excluded$2p = ["values", "unit", "step"];
|
|
5856
|
+
const sortBreakpointsValues = values => {
|
|
5857
|
+
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
5858
|
+
key,
|
|
5859
|
+
val: values[key]
|
|
5860
|
+
})) || [];
|
|
5861
|
+
// Sort in ascending order
|
|
5862
|
+
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
5863
|
+
return breakpointsAsArray.reduce((acc, obj) => {
|
|
5864
|
+
return _extends({}, acc, {
|
|
5865
|
+
[obj.key]: obj.val
|
|
5866
|
+
});
|
|
5867
|
+
}, {});
|
|
5868
|
+
};
|
|
5869
|
+
|
|
5870
|
+
// Keep in mind that @media is inclusive by the CSS specification.
|
|
5871
|
+
function createBreakpoints(breakpoints) {
|
|
5872
|
+
const {
|
|
5873
|
+
// The breakpoint **start** at this value.
|
|
5874
|
+
// For instance with the first breakpoint xs: [xs, sm).
|
|
5875
|
+
values = {
|
|
5876
|
+
xs: 0,
|
|
5877
|
+
// phone
|
|
5878
|
+
sm: 600,
|
|
5879
|
+
// tablet
|
|
5880
|
+
md: 900,
|
|
5881
|
+
// small laptop
|
|
5882
|
+
lg: 1200,
|
|
5883
|
+
// desktop
|
|
5884
|
+
xl: 1536 // large screen
|
|
5885
|
+
},
|
|
5886
|
+
|
|
5887
|
+
unit = 'px',
|
|
5888
|
+
step = 5
|
|
5889
|
+
} = breakpoints,
|
|
5890
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2p);
|
|
5891
|
+
const sortedValues = sortBreakpointsValues(values);
|
|
5892
|
+
const keys = Object.keys(sortedValues);
|
|
5893
|
+
function up(key) {
|
|
5894
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
5895
|
+
return `@media (min-width:${value}${unit})`;
|
|
5896
|
+
}
|
|
5897
|
+
function down(key) {
|
|
5898
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
5899
|
+
return `@media (max-width:${value - step / 100}${unit})`;
|
|
5900
|
+
}
|
|
5901
|
+
function between(start, end) {
|
|
5902
|
+
const endIndex = keys.indexOf(end);
|
|
5903
|
+
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})`;
|
|
5904
|
+
}
|
|
5905
|
+
function only(key) {
|
|
5906
|
+
if (keys.indexOf(key) + 1 < keys.length) {
|
|
5907
|
+
return between(key, keys[keys.indexOf(key) + 1]);
|
|
5908
|
+
}
|
|
5909
|
+
return up(key);
|
|
5910
|
+
}
|
|
5911
|
+
function not(key) {
|
|
5912
|
+
// handle first and last key separately, for better readability
|
|
5913
|
+
const keyIndex = keys.indexOf(key);
|
|
5914
|
+
if (keyIndex === 0) {
|
|
5915
|
+
return up(keys[1]);
|
|
5916
|
+
}
|
|
5917
|
+
if (keyIndex === keys.length - 1) {
|
|
5918
|
+
return down(keys[keyIndex]);
|
|
5919
|
+
}
|
|
5920
|
+
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
5921
|
+
}
|
|
5922
|
+
return _extends({
|
|
5923
|
+
keys,
|
|
5924
|
+
values: sortedValues,
|
|
5925
|
+
up,
|
|
5926
|
+
down,
|
|
5927
|
+
between,
|
|
5928
|
+
only,
|
|
5929
|
+
not,
|
|
5930
|
+
unit
|
|
5931
|
+
}, other);
|
|
5932
|
+
}
|
|
5933
|
+
|
|
5934
|
+
const shape = {
|
|
5935
|
+
borderRadius: 4
|
|
5936
|
+
};
|
|
5937
|
+
var shape$1 = shape;
|
|
5938
|
+
|
|
5853
5939
|
const responsivePropType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) ;
|
|
5854
5940
|
var responsivePropType$1 = responsivePropType;
|
|
5855
5941
|
|
|
@@ -6055,6 +6141,183 @@
|
|
|
6055
6141
|
return fn;
|
|
6056
6142
|
}
|
|
6057
6143
|
|
|
6144
|
+
function memoize(fn) {
|
|
6145
|
+
const cache = {};
|
|
6146
|
+
return arg => {
|
|
6147
|
+
if (cache[arg] === undefined) {
|
|
6148
|
+
cache[arg] = fn(arg);
|
|
6149
|
+
}
|
|
6150
|
+
return cache[arg];
|
|
6151
|
+
};
|
|
6152
|
+
}
|
|
6153
|
+
|
|
6154
|
+
const properties = {
|
|
6155
|
+
m: 'margin',
|
|
6156
|
+
p: 'padding'
|
|
6157
|
+
};
|
|
6158
|
+
const directions = {
|
|
6159
|
+
t: 'Top',
|
|
6160
|
+
r: 'Right',
|
|
6161
|
+
b: 'Bottom',
|
|
6162
|
+
l: 'Left',
|
|
6163
|
+
x: ['Left', 'Right'],
|
|
6164
|
+
y: ['Top', 'Bottom']
|
|
6165
|
+
};
|
|
6166
|
+
const aliases = {
|
|
6167
|
+
marginX: 'mx',
|
|
6168
|
+
marginY: 'my',
|
|
6169
|
+
paddingX: 'px',
|
|
6170
|
+
paddingY: 'py'
|
|
6171
|
+
};
|
|
6172
|
+
|
|
6173
|
+
// memoize() impact:
|
|
6174
|
+
// From 300,000 ops/sec
|
|
6175
|
+
// To 350,000 ops/sec
|
|
6176
|
+
const getCssProperties = memoize(prop => {
|
|
6177
|
+
// It's not a shorthand notation.
|
|
6178
|
+
if (prop.length > 2) {
|
|
6179
|
+
if (aliases[prop]) {
|
|
6180
|
+
prop = aliases[prop];
|
|
6181
|
+
} else {
|
|
6182
|
+
return [prop];
|
|
6183
|
+
}
|
|
6184
|
+
}
|
|
6185
|
+
const [a, b] = prop.split('');
|
|
6186
|
+
const property = properties[a];
|
|
6187
|
+
const direction = directions[b] || '';
|
|
6188
|
+
return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];
|
|
6189
|
+
});
|
|
6190
|
+
const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];
|
|
6191
|
+
const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
|
|
6192
|
+
const spacingKeys = [...marginKeys, ...paddingKeys];
|
|
6193
|
+
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
6194
|
+
var _getPath;
|
|
6195
|
+
const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
|
|
6196
|
+
if (typeof themeSpacing === 'number') {
|
|
6197
|
+
return abs => {
|
|
6198
|
+
if (typeof abs === 'string') {
|
|
6199
|
+
return abs;
|
|
6200
|
+
}
|
|
6201
|
+
{
|
|
6202
|
+
if (typeof abs !== 'number') {
|
|
6203
|
+
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
return themeSpacing * abs;
|
|
6207
|
+
};
|
|
6208
|
+
}
|
|
6209
|
+
if (Array.isArray(themeSpacing)) {
|
|
6210
|
+
return abs => {
|
|
6211
|
+
if (typeof abs === 'string') {
|
|
6212
|
+
return abs;
|
|
6213
|
+
}
|
|
6214
|
+
{
|
|
6215
|
+
if (!Number.isInteger(abs)) {
|
|
6216
|
+
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
|
|
6217
|
+
} else if (abs > themeSpacing.length - 1) {
|
|
6218
|
+
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
return themeSpacing[abs];
|
|
6222
|
+
};
|
|
6223
|
+
}
|
|
6224
|
+
if (typeof themeSpacing === 'function') {
|
|
6225
|
+
return themeSpacing;
|
|
6226
|
+
}
|
|
6227
|
+
{
|
|
6228
|
+
console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
|
|
6229
|
+
}
|
|
6230
|
+
return () => undefined;
|
|
6231
|
+
}
|
|
6232
|
+
function createUnarySpacing(theme) {
|
|
6233
|
+
return createUnaryUnit(theme, 'spacing', 8, 'spacing');
|
|
6234
|
+
}
|
|
6235
|
+
function getValue(transformer, propValue) {
|
|
6236
|
+
if (typeof propValue === 'string' || propValue == null) {
|
|
6237
|
+
return propValue;
|
|
6238
|
+
}
|
|
6239
|
+
const abs = Math.abs(propValue);
|
|
6240
|
+
const transformed = transformer(abs);
|
|
6241
|
+
if (propValue >= 0) {
|
|
6242
|
+
return transformed;
|
|
6243
|
+
}
|
|
6244
|
+
if (typeof transformed === 'number') {
|
|
6245
|
+
return -transformed;
|
|
6246
|
+
}
|
|
6247
|
+
return `-${transformed}`;
|
|
6248
|
+
}
|
|
6249
|
+
function getStyleFromPropValue(cssProperties, transformer) {
|
|
6250
|
+
return propValue => cssProperties.reduce((acc, cssProperty) => {
|
|
6251
|
+
acc[cssProperty] = getValue(transformer, propValue);
|
|
6252
|
+
return acc;
|
|
6253
|
+
}, {});
|
|
6254
|
+
}
|
|
6255
|
+
function resolveCssProperty(props, keys, prop, transformer) {
|
|
6256
|
+
// Using a hash computation over an array iteration could be faster, but with only 28 items,
|
|
6257
|
+
// it's doesn't worth the bundle size.
|
|
6258
|
+
if (keys.indexOf(prop) === -1) {
|
|
6259
|
+
return null;
|
|
6260
|
+
}
|
|
6261
|
+
const cssProperties = getCssProperties(prop);
|
|
6262
|
+
const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
|
6263
|
+
const propValue = props[prop];
|
|
6264
|
+
return handleBreakpoints(props, propValue, styleFromPropValue);
|
|
6265
|
+
}
|
|
6266
|
+
function style$1(props, keys) {
|
|
6267
|
+
const transformer = createUnarySpacing(props.theme);
|
|
6268
|
+
return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});
|
|
6269
|
+
}
|
|
6270
|
+
function margin(props) {
|
|
6271
|
+
return style$1(props, marginKeys);
|
|
6272
|
+
}
|
|
6273
|
+
margin.propTypes = marginKeys.reduce((obj, key) => {
|
|
6274
|
+
obj[key] = responsivePropType$1;
|
|
6275
|
+
return obj;
|
|
6276
|
+
}, {}) ;
|
|
6277
|
+
margin.filterProps = marginKeys;
|
|
6278
|
+
function padding(props) {
|
|
6279
|
+
return style$1(props, paddingKeys);
|
|
6280
|
+
}
|
|
6281
|
+
padding.propTypes = paddingKeys.reduce((obj, key) => {
|
|
6282
|
+
obj[key] = responsivePropType$1;
|
|
6283
|
+
return obj;
|
|
6284
|
+
}, {}) ;
|
|
6285
|
+
padding.filterProps = paddingKeys;
|
|
6286
|
+
spacingKeys.reduce((obj, key) => {
|
|
6287
|
+
obj[key] = responsivePropType$1;
|
|
6288
|
+
return obj;
|
|
6289
|
+
}, {}) ;
|
|
6290
|
+
|
|
6291
|
+
/* tslint:enable:unified-signatures */
|
|
6292
|
+
|
|
6293
|
+
function createSpacing(spacingInput = 8) {
|
|
6294
|
+
// Already transformed.
|
|
6295
|
+
if (spacingInput.mui) {
|
|
6296
|
+
return spacingInput;
|
|
6297
|
+
}
|
|
6298
|
+
|
|
6299
|
+
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
6300
|
+
// Smaller components, such as icons, can align to a 4dp grid.
|
|
6301
|
+
// https://m2.material.io/design/layout/understanding-layout.html
|
|
6302
|
+
const transform = createUnarySpacing({
|
|
6303
|
+
spacing: spacingInput
|
|
6304
|
+
});
|
|
6305
|
+
const spacing = (...argsInput) => {
|
|
6306
|
+
{
|
|
6307
|
+
if (!(argsInput.length <= 4)) {
|
|
6308
|
+
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
6309
|
+
}
|
|
6310
|
+
}
|
|
6311
|
+
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
6312
|
+
return args.map(argument => {
|
|
6313
|
+
const output = transform(argument);
|
|
6314
|
+
return typeof output === 'number' ? `${output}px` : output;
|
|
6315
|
+
}).join(' ');
|
|
6316
|
+
};
|
|
6317
|
+
spacing.mui = true;
|
|
6318
|
+
return spacing;
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6058
6321
|
function compose(...styles) {
|
|
6059
6322
|
const handlers = styles.reduce((acc, style) => {
|
|
6060
6323
|
style.filterProps.forEach(prop => {
|
|
@@ -6078,153 +6341,6 @@
|
|
|
6078
6341
|
return fn;
|
|
6079
6342
|
}
|
|
6080
6343
|
|
|
6081
|
-
function memoize(fn) {
|
|
6082
|
-
const cache = {};
|
|
6083
|
-
return arg => {
|
|
6084
|
-
if (cache[arg] === undefined) {
|
|
6085
|
-
cache[arg] = fn(arg);
|
|
6086
|
-
}
|
|
6087
|
-
return cache[arg];
|
|
6088
|
-
};
|
|
6089
|
-
}
|
|
6090
|
-
|
|
6091
|
-
const properties = {
|
|
6092
|
-
m: 'margin',
|
|
6093
|
-
p: 'padding'
|
|
6094
|
-
};
|
|
6095
|
-
const directions = {
|
|
6096
|
-
t: 'Top',
|
|
6097
|
-
r: 'Right',
|
|
6098
|
-
b: 'Bottom',
|
|
6099
|
-
l: 'Left',
|
|
6100
|
-
x: ['Left', 'Right'],
|
|
6101
|
-
y: ['Top', 'Bottom']
|
|
6102
|
-
};
|
|
6103
|
-
const aliases = {
|
|
6104
|
-
marginX: 'mx',
|
|
6105
|
-
marginY: 'my',
|
|
6106
|
-
paddingX: 'px',
|
|
6107
|
-
paddingY: 'py'
|
|
6108
|
-
};
|
|
6109
|
-
|
|
6110
|
-
// memoize() impact:
|
|
6111
|
-
// From 300,000 ops/sec
|
|
6112
|
-
// To 350,000 ops/sec
|
|
6113
|
-
const getCssProperties = memoize(prop => {
|
|
6114
|
-
// It's not a shorthand notation.
|
|
6115
|
-
if (prop.length > 2) {
|
|
6116
|
-
if (aliases[prop]) {
|
|
6117
|
-
prop = aliases[prop];
|
|
6118
|
-
} else {
|
|
6119
|
-
return [prop];
|
|
6120
|
-
}
|
|
6121
|
-
}
|
|
6122
|
-
const [a, b] = prop.split('');
|
|
6123
|
-
const property = properties[a];
|
|
6124
|
-
const direction = directions[b] || '';
|
|
6125
|
-
return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];
|
|
6126
|
-
});
|
|
6127
|
-
const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];
|
|
6128
|
-
const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
|
|
6129
|
-
const spacingKeys = [...marginKeys, ...paddingKeys];
|
|
6130
|
-
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
6131
|
-
var _getPath;
|
|
6132
|
-
const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
|
|
6133
|
-
if (typeof themeSpacing === 'number') {
|
|
6134
|
-
return abs => {
|
|
6135
|
-
if (typeof abs === 'string') {
|
|
6136
|
-
return abs;
|
|
6137
|
-
}
|
|
6138
|
-
{
|
|
6139
|
-
if (typeof abs !== 'number') {
|
|
6140
|
-
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
|
|
6141
|
-
}
|
|
6142
|
-
}
|
|
6143
|
-
return themeSpacing * abs;
|
|
6144
|
-
};
|
|
6145
|
-
}
|
|
6146
|
-
if (Array.isArray(themeSpacing)) {
|
|
6147
|
-
return abs => {
|
|
6148
|
-
if (typeof abs === 'string') {
|
|
6149
|
-
return abs;
|
|
6150
|
-
}
|
|
6151
|
-
{
|
|
6152
|
-
if (!Number.isInteger(abs)) {
|
|
6153
|
-
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
|
|
6154
|
-
} else if (abs > themeSpacing.length - 1) {
|
|
6155
|
-
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
|
|
6156
|
-
}
|
|
6157
|
-
}
|
|
6158
|
-
return themeSpacing[abs];
|
|
6159
|
-
};
|
|
6160
|
-
}
|
|
6161
|
-
if (typeof themeSpacing === 'function') {
|
|
6162
|
-
return themeSpacing;
|
|
6163
|
-
}
|
|
6164
|
-
{
|
|
6165
|
-
console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
|
|
6166
|
-
}
|
|
6167
|
-
return () => undefined;
|
|
6168
|
-
}
|
|
6169
|
-
function createUnarySpacing(theme) {
|
|
6170
|
-
return createUnaryUnit(theme, 'spacing', 8, 'spacing');
|
|
6171
|
-
}
|
|
6172
|
-
function getValue(transformer, propValue) {
|
|
6173
|
-
if (typeof propValue === 'string' || propValue == null) {
|
|
6174
|
-
return propValue;
|
|
6175
|
-
}
|
|
6176
|
-
const abs = Math.abs(propValue);
|
|
6177
|
-
const transformed = transformer(abs);
|
|
6178
|
-
if (propValue >= 0) {
|
|
6179
|
-
return transformed;
|
|
6180
|
-
}
|
|
6181
|
-
if (typeof transformed === 'number') {
|
|
6182
|
-
return -transformed;
|
|
6183
|
-
}
|
|
6184
|
-
return `-${transformed}`;
|
|
6185
|
-
}
|
|
6186
|
-
function getStyleFromPropValue(cssProperties, transformer) {
|
|
6187
|
-
return propValue => cssProperties.reduce((acc, cssProperty) => {
|
|
6188
|
-
acc[cssProperty] = getValue(transformer, propValue);
|
|
6189
|
-
return acc;
|
|
6190
|
-
}, {});
|
|
6191
|
-
}
|
|
6192
|
-
function resolveCssProperty(props, keys, prop, transformer) {
|
|
6193
|
-
// Using a hash computation over an array iteration could be faster, but with only 28 items,
|
|
6194
|
-
// it's doesn't worth the bundle size.
|
|
6195
|
-
if (keys.indexOf(prop) === -1) {
|
|
6196
|
-
return null;
|
|
6197
|
-
}
|
|
6198
|
-
const cssProperties = getCssProperties(prop);
|
|
6199
|
-
const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
|
6200
|
-
const propValue = props[prop];
|
|
6201
|
-
return handleBreakpoints(props, propValue, styleFromPropValue);
|
|
6202
|
-
}
|
|
6203
|
-
function style$1(props, keys) {
|
|
6204
|
-
const transformer = createUnarySpacing(props.theme);
|
|
6205
|
-
return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});
|
|
6206
|
-
}
|
|
6207
|
-
function margin(props) {
|
|
6208
|
-
return style$1(props, marginKeys);
|
|
6209
|
-
}
|
|
6210
|
-
margin.propTypes = marginKeys.reduce((obj, key) => {
|
|
6211
|
-
obj[key] = responsivePropType$1;
|
|
6212
|
-
return obj;
|
|
6213
|
-
}, {}) ;
|
|
6214
|
-
margin.filterProps = marginKeys;
|
|
6215
|
-
function padding(props) {
|
|
6216
|
-
return style$1(props, paddingKeys);
|
|
6217
|
-
}
|
|
6218
|
-
padding.propTypes = paddingKeys.reduce((obj, key) => {
|
|
6219
|
-
obj[key] = responsivePropType$1;
|
|
6220
|
-
return obj;
|
|
6221
|
-
}, {}) ;
|
|
6222
|
-
padding.filterProps = paddingKeys;
|
|
6223
|
-
spacingKeys.reduce((obj, key) => {
|
|
6224
|
-
obj[key] = responsivePropType$1;
|
|
6225
|
-
return obj;
|
|
6226
|
-
}, {}) ;
|
|
6227
|
-
|
|
6228
6344
|
function borderTransform(value) {
|
|
6229
6345
|
if (typeof value !== 'number') {
|
|
6230
6346
|
return value;
|
|
@@ -6852,168 +6968,7 @@
|
|
|
6852
6968
|
styleFunctionSx.filterProps = ['sx'];
|
|
6853
6969
|
var styleFunctionSx$1 = styleFunctionSx;
|
|
6854
6970
|
|
|
6855
|
-
const _excluded$2o = ["
|
|
6856
|
-
const splitProps = props => {
|
|
6857
|
-
var _props$theme$unstable, _props$theme;
|
|
6858
|
-
const result = {
|
|
6859
|
-
systemProps: {},
|
|
6860
|
-
otherProps: {}
|
|
6861
|
-
};
|
|
6862
|
-
const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig$1;
|
|
6863
|
-
Object.keys(props).forEach(prop => {
|
|
6864
|
-
if (config[prop]) {
|
|
6865
|
-
result.systemProps[prop] = props[prop];
|
|
6866
|
-
} else {
|
|
6867
|
-
result.otherProps[prop] = props[prop];
|
|
6868
|
-
}
|
|
6869
|
-
});
|
|
6870
|
-
return result;
|
|
6871
|
-
};
|
|
6872
|
-
function extendSxProp(props) {
|
|
6873
|
-
const {
|
|
6874
|
-
sx: inSx
|
|
6875
|
-
} = props,
|
|
6876
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$2o);
|
|
6877
|
-
const {
|
|
6878
|
-
systemProps,
|
|
6879
|
-
otherProps
|
|
6880
|
-
} = splitProps(other);
|
|
6881
|
-
let finalSx;
|
|
6882
|
-
if (Array.isArray(inSx)) {
|
|
6883
|
-
finalSx = [systemProps, ...inSx];
|
|
6884
|
-
} else if (typeof inSx === 'function') {
|
|
6885
|
-
finalSx = (...args) => {
|
|
6886
|
-
const result = inSx(...args);
|
|
6887
|
-
if (!isPlainObject(result)) {
|
|
6888
|
-
return systemProps;
|
|
6889
|
-
}
|
|
6890
|
-
return _extends({}, systemProps, result);
|
|
6891
|
-
};
|
|
6892
|
-
} else {
|
|
6893
|
-
finalSx = _extends({}, systemProps, inSx);
|
|
6894
|
-
}
|
|
6895
|
-
return _extends({}, otherProps, {
|
|
6896
|
-
sx: finalSx
|
|
6897
|
-
});
|
|
6898
|
-
}
|
|
6899
|
-
|
|
6900
|
-
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}
|
|
6901
|
-
|
|
6902
|
-
const _excluded$2n = ["values", "unit", "step"];
|
|
6903
|
-
const sortBreakpointsValues = values => {
|
|
6904
|
-
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
6905
|
-
key,
|
|
6906
|
-
val: values[key]
|
|
6907
|
-
})) || [];
|
|
6908
|
-
// Sort in ascending order
|
|
6909
|
-
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
6910
|
-
return breakpointsAsArray.reduce((acc, obj) => {
|
|
6911
|
-
return _extends({}, acc, {
|
|
6912
|
-
[obj.key]: obj.val
|
|
6913
|
-
});
|
|
6914
|
-
}, {});
|
|
6915
|
-
};
|
|
6916
|
-
|
|
6917
|
-
// Keep in mind that @media is inclusive by the CSS specification.
|
|
6918
|
-
function createBreakpoints(breakpoints) {
|
|
6919
|
-
const {
|
|
6920
|
-
// The breakpoint **start** at this value.
|
|
6921
|
-
// For instance with the first breakpoint xs: [xs, sm).
|
|
6922
|
-
values = {
|
|
6923
|
-
xs: 0,
|
|
6924
|
-
// phone
|
|
6925
|
-
sm: 600,
|
|
6926
|
-
// tablet
|
|
6927
|
-
md: 900,
|
|
6928
|
-
// small laptop
|
|
6929
|
-
lg: 1200,
|
|
6930
|
-
// desktop
|
|
6931
|
-
xl: 1536 // large screen
|
|
6932
|
-
},
|
|
6933
|
-
|
|
6934
|
-
unit = 'px',
|
|
6935
|
-
step = 5
|
|
6936
|
-
} = breakpoints,
|
|
6937
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2n);
|
|
6938
|
-
const sortedValues = sortBreakpointsValues(values);
|
|
6939
|
-
const keys = Object.keys(sortedValues);
|
|
6940
|
-
function up(key) {
|
|
6941
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
6942
|
-
return `@media (min-width:${value}${unit})`;
|
|
6943
|
-
}
|
|
6944
|
-
function down(key) {
|
|
6945
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
6946
|
-
return `@media (max-width:${value - step / 100}${unit})`;
|
|
6947
|
-
}
|
|
6948
|
-
function between(start, end) {
|
|
6949
|
-
const endIndex = keys.indexOf(end);
|
|
6950
|
-
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})`;
|
|
6951
|
-
}
|
|
6952
|
-
function only(key) {
|
|
6953
|
-
if (keys.indexOf(key) + 1 < keys.length) {
|
|
6954
|
-
return between(key, keys[keys.indexOf(key) + 1]);
|
|
6955
|
-
}
|
|
6956
|
-
return up(key);
|
|
6957
|
-
}
|
|
6958
|
-
function not(key) {
|
|
6959
|
-
// handle first and last key separately, for better readability
|
|
6960
|
-
const keyIndex = keys.indexOf(key);
|
|
6961
|
-
if (keyIndex === 0) {
|
|
6962
|
-
return up(keys[1]);
|
|
6963
|
-
}
|
|
6964
|
-
if (keyIndex === keys.length - 1) {
|
|
6965
|
-
return down(keys[keyIndex]);
|
|
6966
|
-
}
|
|
6967
|
-
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
6968
|
-
}
|
|
6969
|
-
return _extends({
|
|
6970
|
-
keys,
|
|
6971
|
-
values: sortedValues,
|
|
6972
|
-
up,
|
|
6973
|
-
down,
|
|
6974
|
-
between,
|
|
6975
|
-
only,
|
|
6976
|
-
not,
|
|
6977
|
-
unit
|
|
6978
|
-
}, other);
|
|
6979
|
-
}
|
|
6980
|
-
|
|
6981
|
-
const shape = {
|
|
6982
|
-
borderRadius: 4
|
|
6983
|
-
};
|
|
6984
|
-
var shape$1 = shape;
|
|
6985
|
-
|
|
6986
|
-
/* tslint:enable:unified-signatures */
|
|
6987
|
-
|
|
6988
|
-
function createSpacing(spacingInput = 8) {
|
|
6989
|
-
// Already transformed.
|
|
6990
|
-
if (spacingInput.mui) {
|
|
6991
|
-
return spacingInput;
|
|
6992
|
-
}
|
|
6993
|
-
|
|
6994
|
-
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
6995
|
-
// Smaller components, such as icons, can align to a 4dp grid.
|
|
6996
|
-
// https://m2.material.io/design/layout/understanding-layout.html
|
|
6997
|
-
const transform = createUnarySpacing({
|
|
6998
|
-
spacing: spacingInput
|
|
6999
|
-
});
|
|
7000
|
-
const spacing = (...argsInput) => {
|
|
7001
|
-
{
|
|
7002
|
-
if (!(argsInput.length <= 4)) {
|
|
7003
|
-
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
7004
|
-
}
|
|
7005
|
-
}
|
|
7006
|
-
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
7007
|
-
return args.map(argument => {
|
|
7008
|
-
const output = transform(argument);
|
|
7009
|
-
return typeof output === 'number' ? `${output}px` : output;
|
|
7010
|
-
}).join(' ');
|
|
7011
|
-
};
|
|
7012
|
-
spacing.mui = true;
|
|
7013
|
-
return spacing;
|
|
7014
|
-
}
|
|
7015
|
-
|
|
7016
|
-
const _excluded$2m = ["breakpoints", "palette", "spacing", "shape"];
|
|
6971
|
+
const _excluded$2o = ["breakpoints", "palette", "spacing", "shape"];
|
|
7017
6972
|
function createTheme$1(options = {}, ...args) {
|
|
7018
6973
|
const {
|
|
7019
6974
|
breakpoints: breakpointsInput = {},
|
|
@@ -7021,7 +6976,7 @@
|
|
|
7021
6976
|
spacing: spacingInput,
|
|
7022
6977
|
shape: shapeInput = {}
|
|
7023
6978
|
} = options,
|
|
7024
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
6979
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2o);
|
|
7025
6980
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
7026
6981
|
const spacing = createSpacing(spacingInput);
|
|
7027
6982
|
let muiTheme = deepmerge({
|
|
@@ -7046,95 +7001,100 @@
|
|
|
7046
7001
|
return muiTheme;
|
|
7047
7002
|
}
|
|
7048
7003
|
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
ThemeContext.displayName = 'ThemeContext';
|
|
7004
|
+
function isObjectEmpty(obj) {
|
|
7005
|
+
return Object.keys(obj).length === 0;
|
|
7052
7006
|
}
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
const theme = React__namespace.useContext(ThemeContext$1);
|
|
7057
|
-
{
|
|
7058
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
7059
|
-
React__namespace.useDebugValue(theme);
|
|
7060
|
-
}
|
|
7061
|
-
return theme;
|
|
7007
|
+
function useTheme$3(defaultTheme = null) {
|
|
7008
|
+
const contextTheme = React__namespace.useContext(ThemeContext$2);
|
|
7009
|
+
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
|
|
7062
7010
|
}
|
|
7063
7011
|
|
|
7064
|
-
const
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
function mergeOuterLocalTheme(outerTheme, localTheme) {
|
|
7068
|
-
if (typeof localTheme === 'function') {
|
|
7069
|
-
const mergedTheme = localTheme(outerTheme);
|
|
7070
|
-
{
|
|
7071
|
-
if (!mergedTheme) {
|
|
7072
|
-
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
|
|
7073
|
-
}
|
|
7074
|
-
}
|
|
7075
|
-
return mergedTheme;
|
|
7076
|
-
}
|
|
7077
|
-
return _extends({}, outerTheme, localTheme);
|
|
7012
|
+
const systemDefaultTheme$1 = createTheme$1();
|
|
7013
|
+
function useTheme$2(defaultTheme = systemDefaultTheme$1) {
|
|
7014
|
+
return useTheme$3(defaultTheme);
|
|
7078
7015
|
}
|
|
7079
7016
|
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
const
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
} = props;
|
|
7090
|
-
const outerTheme = useTheme$3();
|
|
7091
|
-
{
|
|
7092
|
-
if (outerTheme === null && typeof localTheme === 'function') {
|
|
7093
|
-
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'));
|
|
7094
|
-
}
|
|
7095
|
-
}
|
|
7096
|
-
const theme = React__namespace.useMemo(() => {
|
|
7097
|
-
const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
|
|
7098
|
-
if (output != null) {
|
|
7099
|
-
output[nested] = outerTheme !== null;
|
|
7100
|
-
}
|
|
7101
|
-
return output;
|
|
7102
|
-
}, [localTheme, outerTheme]);
|
|
7103
|
-
return /*#__PURE__*/jsxRuntime_1(ThemeContext$1.Provider, {
|
|
7104
|
-
value: theme,
|
|
7105
|
-
children: children
|
|
7017
|
+
function GlobalStyles$1({
|
|
7018
|
+
styles,
|
|
7019
|
+
themeId,
|
|
7020
|
+
defaultTheme = {}
|
|
7021
|
+
}) {
|
|
7022
|
+
const upperTheme = useTheme$2(defaultTheme);
|
|
7023
|
+
const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;
|
|
7024
|
+
return /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
7025
|
+
styles: globalStyles
|
|
7106
7026
|
});
|
|
7107
7027
|
}
|
|
7108
|
-
|
|
7028
|
+
GlobalStyles$1.propTypes /* remove-proptypes */ = {
|
|
7029
|
+
// ----------------------------- Warning --------------------------------
|
|
7030
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
7031
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
7032
|
+
// ----------------------------------------------------------------------
|
|
7109
7033
|
/**
|
|
7110
|
-
*
|
|
7034
|
+
* @ignore
|
|
7111
7035
|
*/
|
|
7112
|
-
|
|
7036
|
+
defaultTheme: PropTypes.object,
|
|
7113
7037
|
/**
|
|
7114
|
-
*
|
|
7038
|
+
* @ignore
|
|
7115
7039
|
*/
|
|
7116
|
-
|
|
7040
|
+
styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),
|
|
7041
|
+
/**
|
|
7042
|
+
* @ignore
|
|
7043
|
+
*/
|
|
7044
|
+
themeId: PropTypes.string
|
|
7117
7045
|
} ;
|
|
7118
|
-
{
|
|
7119
|
-
ThemeProvider$1.propTypes = exactProp(ThemeProvider$1.propTypes) ;
|
|
7120
|
-
}
|
|
7121
7046
|
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7047
|
+
const _excluded$2n = ["sx"];
|
|
7048
|
+
const splitProps = props => {
|
|
7049
|
+
var _props$theme$unstable, _props$theme;
|
|
7050
|
+
const result = {
|
|
7051
|
+
systemProps: {},
|
|
7052
|
+
otherProps: {}
|
|
7053
|
+
};
|
|
7054
|
+
const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig$1;
|
|
7055
|
+
Object.keys(props).forEach(prop => {
|
|
7056
|
+
if (config[prop]) {
|
|
7057
|
+
result.systemProps[prop] = props[prop];
|
|
7058
|
+
} else {
|
|
7059
|
+
result.otherProps[prop] = props[prop];
|
|
7060
|
+
}
|
|
7061
|
+
});
|
|
7062
|
+
return result;
|
|
7063
|
+
};
|
|
7064
|
+
function extendSxProp(props) {
|
|
7065
|
+
const {
|
|
7066
|
+
sx: inSx
|
|
7067
|
+
} = props,
|
|
7068
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2n);
|
|
7069
|
+
const {
|
|
7070
|
+
systemProps,
|
|
7071
|
+
otherProps
|
|
7072
|
+
} = splitProps(other);
|
|
7073
|
+
let finalSx;
|
|
7074
|
+
if (Array.isArray(inSx)) {
|
|
7075
|
+
finalSx = [systemProps, ...inSx];
|
|
7076
|
+
} else if (typeof inSx === 'function') {
|
|
7077
|
+
finalSx = (...args) => {
|
|
7078
|
+
const result = inSx(...args);
|
|
7079
|
+
if (!isPlainObject(result)) {
|
|
7080
|
+
return systemProps;
|
|
7081
|
+
}
|
|
7082
|
+
return _extends({}, systemProps, result);
|
|
7083
|
+
};
|
|
7084
|
+
} else {
|
|
7085
|
+
finalSx = _extends({}, systemProps, inSx);
|
|
7086
|
+
}
|
|
7087
|
+
return _extends({}, otherProps, {
|
|
7088
|
+
sx: finalSx
|
|
7089
|
+
});
|
|
7128
7090
|
}
|
|
7129
7091
|
|
|
7130
|
-
|
|
7131
|
-
function useTheme$1(defaultTheme = systemDefaultTheme$1) {
|
|
7132
|
-
return useTheme$2(defaultTheme);
|
|
7133
|
-
}
|
|
7092
|
+
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}
|
|
7134
7093
|
|
|
7135
|
-
const _excluded$
|
|
7094
|
+
const _excluded$2m = ["className", "component"];
|
|
7136
7095
|
function createBox(options = {}) {
|
|
7137
7096
|
const {
|
|
7097
|
+
themeId,
|
|
7138
7098
|
defaultTheme,
|
|
7139
7099
|
defaultClassName = 'MuiBox-root',
|
|
7140
7100
|
generateClassName
|
|
@@ -7143,24 +7103,24 @@
|
|
|
7143
7103
|
shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
|
|
7144
7104
|
})(styleFunctionSx$1);
|
|
7145
7105
|
const Box = /*#__PURE__*/React__namespace.forwardRef(function Box(inProps, ref) {
|
|
7146
|
-
const theme = useTheme$
|
|
7106
|
+
const theme = useTheme$2(defaultTheme);
|
|
7147
7107
|
const _extendSxProp = extendSxProp(inProps),
|
|
7148
7108
|
{
|
|
7149
7109
|
className,
|
|
7150
7110
|
component = 'div'
|
|
7151
7111
|
} = _extendSxProp,
|
|
7152
|
-
other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$
|
|
7112
|
+
other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2m);
|
|
7153
7113
|
return /*#__PURE__*/jsxRuntime_1(BoxRoot, _extends({
|
|
7154
7114
|
as: component,
|
|
7155
7115
|
ref: ref,
|
|
7156
7116
|
className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
|
7157
|
-
theme: theme
|
|
7117
|
+
theme: themeId ? theme[themeId] || theme : theme
|
|
7158
7118
|
}, other));
|
|
7159
7119
|
});
|
|
7160
7120
|
return Box;
|
|
7161
7121
|
}
|
|
7162
7122
|
|
|
7163
|
-
const _excluded$
|
|
7123
|
+
const _excluded$2l = ["variant"];
|
|
7164
7124
|
function isEmpty$3(string) {
|
|
7165
7125
|
return string.length === 0;
|
|
7166
7126
|
}
|
|
@@ -7174,7 +7134,7 @@
|
|
|
7174
7134
|
const {
|
|
7175
7135
|
variant
|
|
7176
7136
|
} = props,
|
|
7177
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
7137
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2l);
|
|
7178
7138
|
let classKey = variant || '';
|
|
7179
7139
|
Object.keys(other).sort().forEach(key => {
|
|
7180
7140
|
if (key === 'color') {
|
|
@@ -7186,9 +7146,7 @@
|
|
|
7186
7146
|
return classKey;
|
|
7187
7147
|
}
|
|
7188
7148
|
|
|
7189
|
-
const _excluded$
|
|
7190
|
-
_excluded2$d = ["theme"],
|
|
7191
|
-
_excluded3$1 = ["theme"];
|
|
7149
|
+
const _excluded$2k = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
|
7192
7150
|
function isEmpty$2(obj) {
|
|
7193
7151
|
return Object.keys(obj).length === 0;
|
|
7194
7152
|
}
|
|
@@ -7250,16 +7208,26 @@
|
|
|
7250
7208
|
const lowercaseFirstLetter = string => {
|
|
7251
7209
|
return string.charAt(0).toLowerCase() + string.slice(1);
|
|
7252
7210
|
};
|
|
7211
|
+
function resolveTheme({
|
|
7212
|
+
defaultTheme,
|
|
7213
|
+
theme,
|
|
7214
|
+
themeId
|
|
7215
|
+
}) {
|
|
7216
|
+
return isEmpty$2(theme) ? defaultTheme : theme[themeId] || theme;
|
|
7217
|
+
}
|
|
7253
7218
|
function createStyled(input = {}) {
|
|
7254
7219
|
const {
|
|
7220
|
+
themeId,
|
|
7255
7221
|
defaultTheme = systemDefaultTheme,
|
|
7256
7222
|
rootShouldForwardProp = shouldForwardProp,
|
|
7257
7223
|
slotShouldForwardProp = shouldForwardProp
|
|
7258
7224
|
} = input;
|
|
7259
7225
|
const systemSx = props => {
|
|
7260
|
-
const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
|
|
7261
7226
|
return styleFunctionSx$1(_extends({}, props, {
|
|
7262
|
-
theme
|
|
7227
|
+
theme: resolveTheme(_extends({}, props, {
|
|
7228
|
+
defaultTheme,
|
|
7229
|
+
themeId
|
|
7230
|
+
}))
|
|
7263
7231
|
}));
|
|
7264
7232
|
};
|
|
7265
7233
|
systemSx.__mui_systemSx = true;
|
|
@@ -7273,7 +7241,7 @@
|
|
|
7273
7241
|
skipSx: inputSkipSx,
|
|
7274
7242
|
overridesResolver
|
|
7275
7243
|
} = inputOptions,
|
|
7276
|
-
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$
|
|
7244
|
+
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2k);
|
|
7277
7245
|
|
|
7278
7246
|
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
7279
7247
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
|
|
@@ -7303,20 +7271,22 @@
|
|
|
7303
7271
|
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
7304
7272
|
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
7305
7273
|
// which are basically components used as a selectors.
|
|
7306
|
-
return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ?
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
}, other));
|
|
7274
|
+
return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? props => {
|
|
7275
|
+
return stylesArg(_extends({}, props, {
|
|
7276
|
+
theme: resolveTheme(_extends({}, props, {
|
|
7277
|
+
defaultTheme,
|
|
7278
|
+
themeId
|
|
7279
|
+
}))
|
|
7280
|
+
}));
|
|
7314
7281
|
} : stylesArg;
|
|
7315
7282
|
}) : [];
|
|
7316
7283
|
let transformedStyleArg = styleArg;
|
|
7317
7284
|
if (componentName && overridesResolver) {
|
|
7318
7285
|
expressionsWithDefaultTheme.push(props => {
|
|
7319
|
-
const theme =
|
|
7286
|
+
const theme = resolveTheme(_extends({}, props, {
|
|
7287
|
+
defaultTheme,
|
|
7288
|
+
themeId
|
|
7289
|
+
}));
|
|
7320
7290
|
const styleOverrides = getStyleOverrides(componentName, theme);
|
|
7321
7291
|
if (styleOverrides) {
|
|
7322
7292
|
const resolvedStyleOverrides = {};
|
|
@@ -7332,7 +7302,10 @@
|
|
|
7332
7302
|
}
|
|
7333
7303
|
if (componentName && !skipVariantsResolver) {
|
|
7334
7304
|
expressionsWithDefaultTheme.push(props => {
|
|
7335
|
-
const theme =
|
|
7305
|
+
const theme = resolveTheme(_extends({}, props, {
|
|
7306
|
+
defaultTheme,
|
|
7307
|
+
themeId
|
|
7308
|
+
}));
|
|
7336
7309
|
return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
|
7337
7310
|
});
|
|
7338
7311
|
}
|
|
@@ -7351,15 +7324,12 @@
|
|
|
7351
7324
|
// which are basically components used as a selectors.
|
|
7352
7325
|
styleArg.__emotion_real !== styleArg) {
|
|
7353
7326
|
// If the type is function, we need to define the default theme.
|
|
7354
|
-
transformedStyleArg =
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
|
|
7361
|
-
}, other));
|
|
7362
|
-
};
|
|
7327
|
+
transformedStyleArg = props => styleArg(_extends({}, props, {
|
|
7328
|
+
theme: resolveTheme(_extends({}, props, {
|
|
7329
|
+
defaultTheme,
|
|
7330
|
+
themeId
|
|
7331
|
+
}))
|
|
7332
|
+
}));
|
|
7363
7333
|
}
|
|
7364
7334
|
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
|
7365
7335
|
{
|
|
@@ -7399,9 +7369,13 @@
|
|
|
7399
7369
|
function useThemeProps$1({
|
|
7400
7370
|
props,
|
|
7401
7371
|
name,
|
|
7402
|
-
defaultTheme
|
|
7372
|
+
defaultTheme,
|
|
7373
|
+
themeId
|
|
7403
7374
|
}) {
|
|
7404
|
-
|
|
7375
|
+
let theme = useTheme$2(defaultTheme);
|
|
7376
|
+
if (themeId) {
|
|
7377
|
+
theme = theme[themeId] || theme;
|
|
7378
|
+
}
|
|
7405
7379
|
const mergedProps = getThemeProps({
|
|
7406
7380
|
theme,
|
|
7407
7381
|
name,
|
|
@@ -7735,38 +7709,132 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7735
7709
|
}
|
|
7736
7710
|
}
|
|
7737
7711
|
|
|
7738
|
-
const
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7712
|
+
const ThemeContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
7713
|
+
{
|
|
7714
|
+
ThemeContext.displayName = 'ThemeContext';
|
|
7715
|
+
}
|
|
7716
|
+
var ThemeContext$1 = ThemeContext;
|
|
7717
|
+
|
|
7718
|
+
function useTheme$1() {
|
|
7719
|
+
const theme = React__namespace.useContext(ThemeContext$1);
|
|
7720
|
+
{
|
|
7721
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
7722
|
+
React__namespace.useDebugValue(theme);
|
|
7723
|
+
}
|
|
7724
|
+
return theme;
|
|
7725
|
+
}
|
|
7726
|
+
|
|
7727
|
+
const hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
7728
|
+
var nested = hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';
|
|
7729
|
+
|
|
7730
|
+
function mergeOuterLocalTheme(outerTheme, localTheme) {
|
|
7731
|
+
if (typeof localTheme === 'function') {
|
|
7732
|
+
const mergedTheme = localTheme(outerTheme);
|
|
7733
|
+
{
|
|
7734
|
+
if (!mergedTheme) {
|
|
7735
|
+
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
|
|
7736
|
+
}
|
|
7737
|
+
}
|
|
7738
|
+
return mergedTheme;
|
|
7739
|
+
}
|
|
7740
|
+
return _extends({}, outerTheme, localTheme);
|
|
7741
|
+
}
|
|
7742
|
+
|
|
7743
|
+
/**
|
|
7744
|
+
* This component takes a `theme` prop.
|
|
7745
|
+
* It makes the `theme` available down the React tree thanks to React context.
|
|
7746
|
+
* This component should preferably be used at **the root of your component tree**.
|
|
7747
|
+
*/
|
|
7748
|
+
function ThemeProvider$2(props) {
|
|
7749
|
+
const {
|
|
7750
|
+
children,
|
|
7751
|
+
theme: localTheme
|
|
7752
|
+
} = props;
|
|
7753
|
+
const outerTheme = useTheme$1();
|
|
7754
|
+
{
|
|
7755
|
+
if (outerTheme === null && typeof localTheme === 'function') {
|
|
7756
|
+
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'));
|
|
7757
|
+
}
|
|
7758
|
+
}
|
|
7759
|
+
const theme = React__namespace.useMemo(() => {
|
|
7760
|
+
const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
|
|
7761
|
+
if (output != null) {
|
|
7762
|
+
output[nested] = outerTheme !== null;
|
|
7763
|
+
}
|
|
7764
|
+
return output;
|
|
7765
|
+
}, [localTheme, outerTheme]);
|
|
7766
|
+
return /*#__PURE__*/jsxRuntime_1(ThemeContext$1.Provider, {
|
|
7767
|
+
value: theme,
|
|
7768
|
+
children: children
|
|
7744
7769
|
});
|
|
7745
7770
|
}
|
|
7746
|
-
|
|
7771
|
+
ThemeProvider$2.propTypes = {
|
|
7747
7772
|
/**
|
|
7748
7773
|
* Your component tree.
|
|
7749
7774
|
*/
|
|
7750
|
-
children: PropTypes.node
|
|
7775
|
+
children: PropTypes.node,
|
|
7776
|
+
/**
|
|
7777
|
+
* A theme object. You can provide a function to extend the outer theme.
|
|
7778
|
+
*/
|
|
7779
|
+
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
|
|
7751
7780
|
} ;
|
|
7781
|
+
{
|
|
7782
|
+
ThemeProvider$2.propTypes = exactProp(ThemeProvider$2.propTypes) ;
|
|
7783
|
+
}
|
|
7784
|
+
|
|
7785
|
+
const EMPTY_THEME = {};
|
|
7786
|
+
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
7787
|
+
return React__namespace.useMemo(() => {
|
|
7788
|
+
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
7789
|
+
if (typeof localTheme === 'function') {
|
|
7790
|
+
const mergedTheme = localTheme(resolvedTheme);
|
|
7791
|
+
const result = themeId ? _extends({}, upperTheme, {
|
|
7792
|
+
[themeId]: mergedTheme
|
|
7793
|
+
}) : mergedTheme;
|
|
7794
|
+
// must return a function for the private theme to NOT merge with the upper theme.
|
|
7795
|
+
// see the test case "use provided theme from a callback" in ThemeProvider.test.js
|
|
7796
|
+
if (isPrivate) {
|
|
7797
|
+
return () => result;
|
|
7798
|
+
}
|
|
7799
|
+
return result;
|
|
7800
|
+
}
|
|
7801
|
+
return themeId ? _extends({}, upperTheme, {
|
|
7802
|
+
[themeId]: localTheme
|
|
7803
|
+
}) : _extends({}, upperTheme, localTheme);
|
|
7804
|
+
}, [themeId, upperTheme, localTheme, isPrivate]);
|
|
7805
|
+
}
|
|
7752
7806
|
|
|
7753
7807
|
/**
|
|
7754
7808
|
* This component makes the `theme` available down the React tree.
|
|
7755
7809
|
* It should preferably be used at **the root of your component tree**.
|
|
7810
|
+
*
|
|
7811
|
+
* <ThemeProvider theme={theme}> // existing use case
|
|
7812
|
+
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
|
7756
7813
|
*/
|
|
7757
|
-
function ThemeProvider(props) {
|
|
7814
|
+
function ThemeProvider$1(props) {
|
|
7758
7815
|
const {
|
|
7759
7816
|
children,
|
|
7760
|
-
theme: localTheme
|
|
7761
|
-
} = props;
|
|
7762
|
-
return /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, {
|
|
7763
7817
|
theme: localTheme,
|
|
7764
|
-
|
|
7818
|
+
themeId
|
|
7819
|
+
} = props;
|
|
7820
|
+
const upperTheme = useTheme$3(EMPTY_THEME);
|
|
7821
|
+
const upperPrivateTheme = useTheme$1() || EMPTY_THEME;
|
|
7822
|
+
{
|
|
7823
|
+
if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {
|
|
7824
|
+
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'));
|
|
7825
|
+
}
|
|
7826
|
+
}
|
|
7827
|
+
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
7828
|
+
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
7829
|
+
return /*#__PURE__*/jsxRuntime_1(ThemeProvider$2, {
|
|
7830
|
+
theme: privateTheme,
|
|
7831
|
+
children: /*#__PURE__*/jsxRuntime_1(ThemeContext$2.Provider, {
|
|
7832
|
+
value: engineTheme,
|
|
7765
7833
|
children: children
|
|
7766
7834
|
})
|
|
7767
7835
|
});
|
|
7768
7836
|
}
|
|
7769
|
-
ThemeProvider.propTypes /* remove-proptypes */ = {
|
|
7837
|
+
ThemeProvider$1.propTypes /* remove-proptypes */ = {
|
|
7770
7838
|
// ----------------------------- Warning --------------------------------
|
|
7771
7839
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
7772
7840
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -7778,10 +7846,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7778
7846
|
/**
|
|
7779
7847
|
* A theme object. You can provide a function to extend the outer theme.
|
|
7780
7848
|
*/
|
|
7781
|
-
theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired
|
|
7849
|
+
theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,
|
|
7850
|
+
/**
|
|
7851
|
+
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
|
7852
|
+
*/
|
|
7853
|
+
themeId: PropTypes.string
|
|
7782
7854
|
} ;
|
|
7783
7855
|
{
|
|
7784
|
-
ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) ;
|
|
7856
|
+
ThemeProvider$1.propTypes = exactProp(ThemeProvider$1.propTypes) ;
|
|
7785
7857
|
}
|
|
7786
7858
|
|
|
7787
7859
|
const DEFAULT_MODE_STORAGE_KEY = 'mode';
|
|
@@ -8043,10 +8115,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8043
8115
|
});
|
|
8044
8116
|
}
|
|
8045
8117
|
|
|
8046
|
-
const _excluded$
|
|
8118
|
+
const _excluded$2j = ["colorSchemes", "components", "generateCssVars", "cssVarPrefix"];
|
|
8047
8119
|
const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
|
|
8048
8120
|
function createCssVarsProvider(options) {
|
|
8049
8121
|
const {
|
|
8122
|
+
themeId,
|
|
8050
8123
|
theme: defaultTheme = {},
|
|
8051
8124
|
attribute: defaultAttribute = DEFAULT_ATTRIBUTE,
|
|
8052
8125
|
modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
|
@@ -8085,10 +8158,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8085
8158
|
disableStyleSheetGeneration = false
|
|
8086
8159
|
}) {
|
|
8087
8160
|
const hasMounted = React__namespace.useRef(false);
|
|
8088
|
-
const upperTheme = useTheme$
|
|
8161
|
+
const upperTheme = useTheme$1();
|
|
8089
8162
|
const ctx = React__namespace.useContext(ColorSchemeContext);
|
|
8090
8163
|
const nested = !!ctx && !disableNestedContext;
|
|
8091
|
-
const
|
|
8164
|
+
const scopedTheme = themeProp[themeId];
|
|
8165
|
+
const _ref = scopedTheme || themeProp,
|
|
8166
|
+
{
|
|
8092
8167
|
colorSchemes = {},
|
|
8093
8168
|
components = {},
|
|
8094
8169
|
generateCssVars = () => ({
|
|
@@ -8096,8 +8171,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8096
8171
|
css: {}
|
|
8097
8172
|
}),
|
|
8098
8173
|
cssVarPrefix
|
|
8099
|
-
} =
|
|
8100
|
-
restThemeProp = _objectWithoutPropertiesLoose(
|
|
8174
|
+
} = _ref,
|
|
8175
|
+
restThemeProp = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
|
|
8101
8176
|
const allColorSchemes = Object.keys(colorSchemes);
|
|
8102
8177
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
8103
8178
|
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
@@ -8263,16 +8338,17 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8263
8338
|
}
|
|
8264
8339
|
const element = /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
8265
8340
|
children: [shouldGenerateStyleSheet && /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
8266
|
-
children: [/*#__PURE__*/jsxRuntime_1(GlobalStyles$
|
|
8341
|
+
children: [/*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
8267
8342
|
styles: {
|
|
8268
8343
|
[colorSchemeSelector]: rootCss
|
|
8269
8344
|
}
|
|
8270
|
-
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$
|
|
8345
|
+
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
8271
8346
|
styles: defaultColorSchemeStyleSheet
|
|
8272
|
-
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$
|
|
8347
|
+
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
8273
8348
|
styles: otherColorSchemesStyleSheet
|
|
8274
8349
|
})]
|
|
8275
|
-
}), /*#__PURE__*/jsxRuntime_1(ThemeProvider, {
|
|
8350
|
+
}), /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, {
|
|
8351
|
+
themeId: scopedTheme ? themeId : undefined,
|
|
8276
8352
|
theme: resolveTheme ? resolveTheme(theme) : theme,
|
|
8277
8353
|
children: children
|
|
8278
8354
|
})]
|
|
@@ -8516,14 +8592,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8516
8592
|
};
|
|
8517
8593
|
}
|
|
8518
8594
|
|
|
8519
|
-
const _excluded$
|
|
8595
|
+
const _excluded$2i = ["colorSchemes", "components"],
|
|
8520
8596
|
_excluded2$c = ["light"];
|
|
8521
8597
|
function prepareCssVars(theme, parserConfig) {
|
|
8522
8598
|
// @ts-ignore - ignore components do not exist
|
|
8523
8599
|
const {
|
|
8524
8600
|
colorSchemes = {}
|
|
8525
8601
|
} = theme,
|
|
8526
|
-
otherTheme = _objectWithoutPropertiesLoose(theme, _excluded$
|
|
8602
|
+
otherTheme = _objectWithoutPropertiesLoose(theme, _excluded$2i);
|
|
8527
8603
|
const {
|
|
8528
8604
|
vars: rootVars,
|
|
8529
8605
|
css: rootCss,
|
|
@@ -8575,7 +8651,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8575
8651
|
};
|
|
8576
8652
|
}
|
|
8577
8653
|
|
|
8578
|
-
const _excluded$
|
|
8654
|
+
const _excluded$2h = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
|
|
8579
8655
|
const defaultTheme$6 = createTheme$1();
|
|
8580
8656
|
const defaultCreateStyledComponent$2 = systemStyled('div', {
|
|
8581
8657
|
name: 'MuiContainer',
|
|
@@ -8671,7 +8747,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8671
8747
|
fixed = false,
|
|
8672
8748
|
maxWidth = 'lg'
|
|
8673
8749
|
} = props,
|
|
8674
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
8750
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2h);
|
|
8675
8751
|
const ownerState = _extends({}, props, {
|
|
8676
8752
|
component,
|
|
8677
8753
|
disableGutters,
|
|
@@ -8972,7 +9048,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8972
9048
|
return [`direction-xs-${String(direction)}`];
|
|
8973
9049
|
};
|
|
8974
9050
|
|
|
8975
|
-
const _excluded$
|
|
9051
|
+
const _excluded$2g = ["className", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow"];
|
|
8976
9052
|
const defaultTheme$5 = createTheme$1();
|
|
8977
9053
|
|
|
8978
9054
|
// widening Theme to any so that the consumer can own the theme structure.
|
|
@@ -9013,7 +9089,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9013
9089
|
const GridRoot = createStyledComponent(generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridSizeStyles, generateGridDirectionStyles, generateGridStyles, generateGridOffsetStyles);
|
|
9014
9090
|
const Grid = /*#__PURE__*/React__namespace.forwardRef(function Grid(inProps, ref) {
|
|
9015
9091
|
var _inProps$columns, _inProps$spacing, _ref, _inProps$rowSpacing, _ref2, _inProps$columnSpacin, _ref3, _disableEqualOverflow;
|
|
9016
|
-
const theme = useTheme$
|
|
9092
|
+
const theme = useTheme$2();
|
|
9017
9093
|
const themeProps = useThemeProps(inProps);
|
|
9018
9094
|
const props = extendSxProp(themeProps); // `color` type conflicts with html color attribute.
|
|
9019
9095
|
const level = React__namespace.useContext(NestedContext);
|
|
@@ -9030,7 +9106,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9030
9106
|
columnSpacing: columnSpacingProp = spacingProp,
|
|
9031
9107
|
disableEqualOverflow: themeDisableEqualOverflow
|
|
9032
9108
|
} = props,
|
|
9033
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
9109
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2g);
|
|
9034
9110
|
// Because `disableEqualOverflow` can be set from the theme's defaultProps, the **nested** grid should look at the instance props instead.
|
|
9035
9111
|
let disableEqualOverflow = themeDisableEqualOverflow;
|
|
9036
9112
|
if (level && themeDisableEqualOverflow !== undefined) {
|
|
@@ -9120,7 +9196,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9120
9196
|
return Grid;
|
|
9121
9197
|
}
|
|
9122
9198
|
|
|
9123
|
-
const _excluded$
|
|
9199
|
+
const _excluded$2f = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"];
|
|
9124
9200
|
const defaultTheme$4 = createTheme$1();
|
|
9125
9201
|
// widening Theme to any so that the consumer can own the theme structure.
|
|
9126
9202
|
const defaultCreateStyledComponent = systemStyled('div', {
|
|
@@ -9249,7 +9325,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9249
9325
|
className,
|
|
9250
9326
|
useFlexGap = false
|
|
9251
9327
|
} = props,
|
|
9252
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
9328
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2f);
|
|
9253
9329
|
const ownerState = {
|
|
9254
9330
|
direction,
|
|
9255
9331
|
spacing,
|
|
@@ -9275,7 +9351,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9275
9351
|
return Stack;
|
|
9276
9352
|
}
|
|
9277
9353
|
|
|
9278
|
-
const _excluded$
|
|
9354
|
+
const _excluded$2e = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
|
|
9279
9355
|
_excluded2$b = ["type", "mode"];
|
|
9280
9356
|
function adaptV4Theme(inputTheme) {
|
|
9281
9357
|
{
|
|
@@ -9289,7 +9365,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9289
9365
|
props = {},
|
|
9290
9366
|
styleOverrides = {}
|
|
9291
9367
|
} = inputTheme,
|
|
9292
|
-
other = _objectWithoutPropertiesLoose(inputTheme, _excluded$
|
|
9368
|
+
other = _objectWithoutPropertiesLoose(inputTheme, _excluded$2e);
|
|
9293
9369
|
const theme = _extends({}, other, {
|
|
9294
9370
|
components: {}
|
|
9295
9371
|
});
|
|
@@ -9370,7 +9446,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9370
9446
|
}, mixins);
|
|
9371
9447
|
}
|
|
9372
9448
|
|
|
9373
|
-
const _excluded$
|
|
9449
|
+
const _excluded$2d = ["mode", "contrastThreshold", "tonalOffset"];
|
|
9374
9450
|
const light = {
|
|
9375
9451
|
// The colors used to style the text.
|
|
9376
9452
|
text: {
|
|
@@ -9539,7 +9615,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9539
9615
|
contrastThreshold = 3,
|
|
9540
9616
|
tonalOffset = 0.2
|
|
9541
9617
|
} = palette,
|
|
9542
|
-
other = _objectWithoutPropertiesLoose(palette, _excluded$
|
|
9618
|
+
other = _objectWithoutPropertiesLoose(palette, _excluded$2d);
|
|
9543
9619
|
const primary = palette.primary || getDefaultPrimary(mode);
|
|
9544
9620
|
const secondary = palette.secondary || getDefaultSecondary(mode);
|
|
9545
9621
|
const error = palette.error || getDefaultError(mode);
|
|
@@ -9663,7 +9739,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9663
9739
|
return paletteOutput;
|
|
9664
9740
|
}
|
|
9665
9741
|
|
|
9666
|
-
const _excluded$
|
|
9742
|
+
const _excluded$2c = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
|
|
9667
9743
|
function round$2(value) {
|
|
9668
9744
|
return Math.round(value * 1e5) / 1e5;
|
|
9669
9745
|
}
|
|
@@ -9694,7 +9770,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9694
9770
|
allVariants,
|
|
9695
9771
|
pxToRem: pxToRem2
|
|
9696
9772
|
} = _ref,
|
|
9697
|
-
other = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9773
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded$2c);
|
|
9698
9774
|
{
|
|
9699
9775
|
if (typeof fontSize !== 'number') {
|
|
9700
9776
|
console.error('MUI: `fontSize` is required to be a number.');
|
|
@@ -9761,7 +9837,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9761
9837
|
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)];
|
|
9762
9838
|
var shadows$1 = shadows;
|
|
9763
9839
|
|
|
9764
|
-
const _excluded$
|
|
9840
|
+
const _excluded$2b = ["duration", "easing", "delay"];
|
|
9765
9841
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
9766
9842
|
// to learn the context in which each easing should be used.
|
|
9767
9843
|
const easing = {
|
|
@@ -9812,7 +9888,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9812
9888
|
easing: easingOption = mergedEasing.easeInOut,
|
|
9813
9889
|
delay = 0
|
|
9814
9890
|
} = options,
|
|
9815
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
9891
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2b);
|
|
9816
9892
|
{
|
|
9817
9893
|
const isString = value => typeof value === 'string';
|
|
9818
9894
|
// IE11 support, replace with Number.isNaN
|
|
@@ -9859,7 +9935,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9859
9935
|
};
|
|
9860
9936
|
var zIndex$1 = zIndex;
|
|
9861
9937
|
|
|
9862
|
-
const _excluded$
|
|
9938
|
+
const _excluded$2a = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
|
9863
9939
|
function createTheme(options = {}, ...args) {
|
|
9864
9940
|
const {
|
|
9865
9941
|
mixins: mixinsInput = {},
|
|
@@ -9867,7 +9943,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9867
9943
|
transitions: transitionsInput = {},
|
|
9868
9944
|
typography: typographyInput = {}
|
|
9869
9945
|
} = options,
|
|
9870
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
9946
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2a);
|
|
9871
9947
|
if (options.vars) {
|
|
9872
9948
|
throw new Error(`MUI: \`vars\` is a private field used for CSS variables support.
|
|
9873
9949
|
Please use another name.` );
|
|
@@ -10139,12 +10215,12 @@ Use unitless line heights instead.` );
|
|
|
10139
10215
|
var defaultTheme$3 = defaultTheme$2;
|
|
10140
10216
|
|
|
10141
10217
|
function useTheme() {
|
|
10142
|
-
const theme = useTheme$
|
|
10218
|
+
const theme = useTheme$2(defaultTheme$3);
|
|
10143
10219
|
{
|
|
10144
10220
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
10145
10221
|
React__namespace.useDebugValue(theme);
|
|
10146
10222
|
}
|
|
10147
|
-
return theme;
|
|
10223
|
+
return theme[THEME_ID] || theme;
|
|
10148
10224
|
}
|
|
10149
10225
|
|
|
10150
10226
|
function useThemeProps({
|
|
@@ -10154,18 +10230,36 @@ Use unitless line heights instead.` );
|
|
|
10154
10230
|
return useThemeProps$1({
|
|
10155
10231
|
props,
|
|
10156
10232
|
name,
|
|
10157
|
-
defaultTheme: defaultTheme$3
|
|
10233
|
+
defaultTheme: defaultTheme$3,
|
|
10234
|
+
themeId: THEME_ID
|
|
10158
10235
|
});
|
|
10159
10236
|
}
|
|
10160
10237
|
|
|
10161
10238
|
const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
|
|
10162
10239
|
const slotShouldForwardProp = shouldForwardProp;
|
|
10163
10240
|
const styled = createStyled({
|
|
10241
|
+
themeId: THEME_ID,
|
|
10164
10242
|
defaultTheme: defaultTheme$3,
|
|
10165
10243
|
rootShouldForwardProp
|
|
10166
10244
|
});
|
|
10167
10245
|
var styled$1 = styled;
|
|
10168
10246
|
|
|
10247
|
+
const _excluded$29 = ["theme"];
|
|
10248
|
+
function ThemeProvider(_ref) {
|
|
10249
|
+
let {
|
|
10250
|
+
theme: themeInput
|
|
10251
|
+
} = _ref,
|
|
10252
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$29);
|
|
10253
|
+
const scopedTheme = themeInput[THEME_ID];
|
|
10254
|
+
return /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, _extends({}, props, {
|
|
10255
|
+
themeId: scopedTheme ? THEME_ID : undefined,
|
|
10256
|
+
theme: scopedTheme || themeInput
|
|
10257
|
+
}));
|
|
10258
|
+
}
|
|
10259
|
+
ThemeProvider.propTypes = {
|
|
10260
|
+
theme: PropTypes.object
|
|
10261
|
+
} ;
|
|
10262
|
+
|
|
10169
10263
|
function makeStyles() {
|
|
10170
10264
|
throw new Error(`MUI: makeStyles is no longer exported from @mui/material/styles.
|
|
10171
10265
|
You have to import it from @mui/styles.
|
|
@@ -10504,6 +10598,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
10504
10598
|
useColorScheme,
|
|
10505
10599
|
getInitColorSchemeScript
|
|
10506
10600
|
} = createCssVarsProvider({
|
|
10601
|
+
themeId: THEME_ID,
|
|
10507
10602
|
theme: defaultTheme$1,
|
|
10508
10603
|
attribute: 'data-mui-color-scheme',
|
|
10509
10604
|
modeStorageKey: 'mui-mode',
|
|
@@ -10681,7 +10776,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
10681
10776
|
const internalSlotProps = getSlotProps(eventHandlers);
|
|
10682
10777
|
|
|
10683
10778
|
// The order of classes is important here.
|
|
10684
|
-
// Emotion (that we use in libraries consuming
|
|
10779
|
+
// Emotion (that we use in libraries consuming Base UI) depends on this order
|
|
10685
10780
|
// to properly override style. It requires the most important classes to be last
|
|
10686
10781
|
// (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
|
|
10687
10782
|
const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
|
|
@@ -13320,7 +13415,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
13320
13415
|
}
|
|
13321
13416
|
generateUtilityClasses('MuiPopper', ['root']);
|
|
13322
13417
|
|
|
13323
|
-
const _excluded$26 = ["anchorEl", "children", "component", "direction", "disablePortal", "modifiers", "open", "
|
|
13418
|
+
const _excluded$26 = ["anchorEl", "children", "component", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"],
|
|
13324
13419
|
_excluded2$9 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
|
|
13325
13420
|
function flipPlacement(placement, direction) {
|
|
13326
13421
|
if (direction === 'ltr') {
|
|
@@ -13365,7 +13460,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
13365
13460
|
disablePortal,
|
|
13366
13461
|
modifiers,
|
|
13367
13462
|
open,
|
|
13368
|
-
ownerState,
|
|
13369
13463
|
placement: initialPlacement,
|
|
13370
13464
|
popperOptions,
|
|
13371
13465
|
popperRef: popperRefProp,
|
|
@@ -13468,7 +13562,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
13468
13562
|
role: 'tooltip',
|
|
13469
13563
|
ref: ownRef
|
|
13470
13564
|
},
|
|
13471
|
-
ownerState:
|
|
13565
|
+
ownerState: props,
|
|
13472
13566
|
className: classes.root
|
|
13473
13567
|
});
|
|
13474
13568
|
return /*#__PURE__*/jsxRuntime_1(Root, _extends({}, rootProps, {
|
|
@@ -14135,7 +14229,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
14135
14229
|
return null;
|
|
14136
14230
|
}
|
|
14137
14231
|
return /*#__PURE__*/jsxRuntime_1(Portal$1
|
|
14138
|
-
// @ts-expect-error TODO: include ref to
|
|
14232
|
+
// @ts-expect-error TODO: include ref to Base UI Portal props
|
|
14139
14233
|
, {
|
|
14140
14234
|
ref: handlePortalRef,
|
|
14141
14235
|
container: container,
|
|
@@ -15208,7 +15302,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
15208
15302
|
return updateState(prevState, newState);
|
|
15209
15303
|
});
|
|
15210
15304
|
}, [getUpdatedState]);
|
|
15211
|
-
const
|
|
15305
|
+
const syncHeightWithFlushSync = () => {
|
|
15212
15306
|
const newState = getUpdatedState();
|
|
15213
15307
|
if (isEmpty$1(newState)) {
|
|
15214
15308
|
return;
|
|
@@ -15232,7 +15326,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
15232
15326
|
// access a dom node that is no longer there (as the fallback component is being shown instead).
|
|
15233
15327
|
// See https://github.com/mui/material-ui/issues/32640
|
|
15234
15328
|
if (inputRef.current) {
|
|
15235
|
-
|
|
15329
|
+
syncHeightWithFlushSync();
|
|
15236
15330
|
}
|
|
15237
15331
|
});
|
|
15238
15332
|
let resizeObserver;
|
|
@@ -16217,7 +16311,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16217
16311
|
onFocus: handleFocus,
|
|
16218
16312
|
onChange: handleInputChange,
|
|
16219
16313
|
onMouseDown: handleInputMouseDown,
|
|
16220
|
-
// if open then this is handled
|
|
16314
|
+
// if open then this is handled imperatively so don't let react override
|
|
16221
16315
|
// only have an opinion about this when closed
|
|
16222
16316
|
'aria-activedescendant': popupOpen ? '' : null,
|
|
16223
16317
|
'aria-autocomplete': autoComplete ? 'both' : 'list',
|
|
@@ -20451,7 +20545,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20451
20545
|
*/
|
|
20452
20546
|
const Popper = /*#__PURE__*/React__namespace.forwardRef(function Popper(inProps, ref) {
|
|
20453
20547
|
var _slots$root;
|
|
20454
|
-
const theme = useTheme$
|
|
20548
|
+
const theme = useTheme$3();
|
|
20455
20549
|
const props = useThemeProps({
|
|
20456
20550
|
props: inProps,
|
|
20457
20551
|
name: 'MuiPopper'
|
|
@@ -20553,10 +20647,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20553
20647
|
* If `true`, the component is shown.
|
|
20554
20648
|
*/
|
|
20555
20649
|
open: PropTypes.bool.isRequired,
|
|
20556
|
-
/**
|
|
20557
|
-
* @ignore
|
|
20558
|
-
*/
|
|
20559
|
-
ownerState: PropTypes.any,
|
|
20560
20650
|
/**
|
|
20561
20651
|
* Popper placement.
|
|
20562
20652
|
* @default 'bottom'
|
|
@@ -21260,7 +21350,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
21260
21350
|
|
|
21261
21351
|
function GlobalStyles(props) {
|
|
21262
21352
|
return /*#__PURE__*/jsxRuntime_1(GlobalStyles$1, _extends({}, props, {
|
|
21263
|
-
defaultTheme: defaultTheme$3
|
|
21353
|
+
defaultTheme: defaultTheme$3,
|
|
21354
|
+
themeId: THEME_ID
|
|
21264
21355
|
}));
|
|
21265
21356
|
}
|
|
21266
21357
|
GlobalStyles.propTypes /* remove-proptypes */ = {
|
|
@@ -21271,9 +21362,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
21271
21362
|
/**
|
|
21272
21363
|
* The styles you want to apply globally.
|
|
21273
21364
|
*/
|
|
21274
|
-
styles: PropTypes
|
|
21275
|
-
__emotion_styles: PropTypes.any.isRequired
|
|
21276
|
-
}), PropTypes.string, PropTypes.bool])
|
|
21365
|
+
styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])
|
|
21277
21366
|
} ;
|
|
21278
21367
|
|
|
21279
21368
|
// Supports determination of isControlled().
|
|
@@ -24511,6 +24600,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24511
24600
|
|
|
24512
24601
|
const defaultTheme = createTheme();
|
|
24513
24602
|
const Box = createBox({
|
|
24603
|
+
themeId: THEME_ID,
|
|
24514
24604
|
defaultTheme,
|
|
24515
24605
|
defaultClassName: 'MuiBox-root',
|
|
24516
24606
|
generateClassName: ClassNameGenerator$1.generate
|
|
@@ -27023,7 +27113,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
27023
27113
|
enableColorScheme: PropTypes.bool
|
|
27024
27114
|
} ;
|
|
27025
27115
|
|
|
27026
|
-
// track, thumb and active are
|
|
27116
|
+
// track, thumb and active are derived from macOS 10.15.7
|
|
27027
27117
|
const scrollBar = {
|
|
27028
27118
|
track: '#2b2b2b',
|
|
27029
27119
|
thumb: '#6b6b6b',
|
|
@@ -31388,7 +31478,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
31388
31478
|
return match;
|
|
31389
31479
|
}
|
|
31390
31480
|
function useMediaQuery(queryInput, options = {}) {
|
|
31391
|
-
const theme = useTheme$
|
|
31481
|
+
const theme = useTheme$3();
|
|
31392
31482
|
// Wait for jsdom to support the match media feature.
|
|
31393
31483
|
// All the browsers MUI support have this built-in.
|
|
31394
31484
|
// This defensive check is here for simplicity.
|
|
@@ -35814,7 +35904,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
35814
35904
|
overridesResolver: (props, styles) => styles.paper
|
|
35815
35905
|
})({
|
|
35816
35906
|
// specZ: The maximum height of a simple menu should be one or more rows less than the view
|
|
35817
|
-
// height. This ensures a
|
|
35907
|
+
// height. This ensures a tappable area outside of the simple menu with which to dismiss
|
|
35818
35908
|
// the menu.
|
|
35819
35909
|
maxHeight: 'calc(100% - 96px)',
|
|
35820
35910
|
// Add iOS momentum scrolling for iOS < 13.0
|
|
@@ -39934,7 +40024,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
39934
40024
|
onChange: PropTypes.func,
|
|
39935
40025
|
/**
|
|
39936
40026
|
* Callback fired when the component requests to be closed.
|
|
39937
|
-
* Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select
|
|
40027
|
+
* Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).
|
|
39938
40028
|
*
|
|
39939
40029
|
* @param {object} event The event source of the callback.
|
|
39940
40030
|
*/
|
|
@@ -46533,7 +46623,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
46533
46623
|
// ----------------------------------------------------------------------
|
|
46534
46624
|
/**
|
|
46535
46625
|
* The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
|
|
46536
|
-
* The Toolbar is a flex container, allowing flex item
|
|
46626
|
+
* The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
|
|
46537
46627
|
*/
|
|
46538
46628
|
children: PropTypes.node,
|
|
46539
46629
|
/**
|
|
@@ -47985,7 +48075,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
47985
48075
|
moveTabsScroll(getScrollSize());
|
|
47986
48076
|
};
|
|
47987
48077
|
|
|
47988
|
-
// TODO Remove <ScrollbarSize /> as browser support for
|
|
48078
|
+
// TODO Remove <ScrollbarSize /> as browser support for hiding the scrollbar
|
|
47989
48079
|
// with CSS improves.
|
|
47990
48080
|
const handleScrollbarSizeChange = React__namespace.useCallback(scrollbarWidth => {
|
|
47991
48081
|
setScrollerStyle({
|
|
@@ -49359,6 +49449,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
49359
49449
|
exports.SvgIcon = SvgIcon$1;
|
|
49360
49450
|
exports.SwipeableDrawer = SwipeableDrawer$1;
|
|
49361
49451
|
exports.Switch = Switch$1;
|
|
49452
|
+
exports.THEME_ID = THEME_ID;
|
|
49362
49453
|
exports.Tab = Tab$1;
|
|
49363
49454
|
exports.TabScrollButton = TabScrollButton$1;
|
|
49364
49455
|
exports.Table = Table$1;
|