@mui/material 5.10.8 → 5.10.10
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/ButtonBase/ButtonBase.js +1 -2
- package/CHANGELOG.md +208 -19
- package/CssBaseline/CssBaseline.js +15 -3
- package/Fade/Fade.js +1 -2
- package/Grow/Grow.js +1 -2
- package/InputBase/InputBase.js +1 -3
- package/Popover/Popover.js +13 -1
- package/Rating/Rating.js +1 -2
- package/ScopedCssBaseline/ScopedCssBaseline.js +13 -1
- package/Slide/Slide.js +1 -2
- package/Tooltip/Tooltip.js +1 -3
- package/Unstable_TrapFocus/index.d.ts +1 -1
- package/Zoom/Zoom.js +1 -2
- package/esm/ButtonBase/ButtonBase.js +1 -2
- package/esm/CssBaseline/CssBaseline.js +16 -3
- package/esm/Fade/Fade.js +1 -2
- package/esm/Grow/Grow.js +1 -2
- package/esm/InputBase/InputBase.js +1 -3
- package/esm/Popover/Popover.js +13 -1
- package/esm/Rating/Rating.js +1 -2
- package/esm/ScopedCssBaseline/ScopedCssBaseline.js +13 -1
- package/esm/Slide/Slide.js +1 -2
- package/esm/Tooltip/Tooltip.js +1 -3
- package/esm/Zoom/Zoom.js +1 -2
- package/esm/utils/createSvgIcon.js +8 -6
- package/index.js +1 -1
- package/legacy/ButtonBase/ButtonBase.js +1 -2
- package/legacy/CssBaseline/CssBaseline.js +21 -3
- package/legacy/Fade/Fade.js +1 -2
- package/legacy/Grow/Grow.js +1 -2
- package/legacy/InputBase/InputBase.js +1 -3
- package/legacy/Popover/Popover.js +17 -1
- package/legacy/Rating/Rating.js +1 -2
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +18 -1
- package/legacy/Slide/Slide.js +1 -2
- package/legacy/Tooltip/Tooltip.js +1 -3
- package/legacy/Zoom/Zoom.js +1 -2
- package/legacy/index.js +1 -1
- package/legacy/utils/createSvgIcon.js +2 -2
- package/modern/ButtonBase/ButtonBase.js +1 -2
- package/modern/CssBaseline/CssBaseline.js +14 -3
- package/modern/Fade/Fade.js +1 -2
- package/modern/Grow/Grow.js +1 -2
- package/modern/InputBase/InputBase.js +1 -3
- package/modern/Popover/Popover.js +13 -1
- package/modern/Rating/Rating.js +1 -2
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +11 -1
- package/modern/Slide/Slide.js +1 -2
- package/modern/Tooltip/Tooltip.js +1 -3
- package/modern/Zoom/Zoom.js +1 -2
- package/modern/index.js +1 -1
- package/modern/utils/createSvgIcon.js +8 -6
- package/package.json +5 -5
- package/styles/components.d.ts +3 -0
- package/styles/experimental_extendTheme.d.ts +1 -1
- package/umd/material-ui.development.js +165 -95
- package/umd/material-ui.production.min.js +20 -20
- package/utils/createSvgIcon.js +8 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.10.
|
|
1
|
+
/** @license MUI v5.10.10
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -5268,22 +5268,23 @@
|
|
|
5268
5268
|
(0, ref.current)(...args), []);
|
|
5269
5269
|
}
|
|
5270
5270
|
|
|
5271
|
-
function useForkRef(
|
|
5271
|
+
function useForkRef(...refs) {
|
|
5272
5272
|
/**
|
|
5273
|
-
* This will create a new function if the
|
|
5273
|
+
* This will create a new function if the refs passed to this hook change and are all defined.
|
|
5274
5274
|
* This means react will call the old forkRef with `null` and the new forkRef
|
|
5275
5275
|
* with the ref. Cleanup naturally emerges from this behavior.
|
|
5276
5276
|
*/
|
|
5277
5277
|
return React__namespace.useMemo(() => {
|
|
5278
|
-
if (
|
|
5278
|
+
if (refs.every(ref => ref == null)) {
|
|
5279
5279
|
return null;
|
|
5280
5280
|
}
|
|
5281
5281
|
|
|
5282
|
-
return
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5282
|
+
return instance => {
|
|
5283
|
+
refs.forEach(ref => {
|
|
5284
|
+
setRef(ref, instance);
|
|
5285
|
+
});
|
|
5286
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5287
|
+
}, refs);
|
|
5287
5288
|
}
|
|
5288
5289
|
|
|
5289
5290
|
// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js
|
|
@@ -5895,7 +5896,7 @@
|
|
|
5895
5896
|
}
|
|
5896
5897
|
|
|
5897
5898
|
if (transform) {
|
|
5898
|
-
value = transform(value);
|
|
5899
|
+
value = transform(value, userValue);
|
|
5899
5900
|
}
|
|
5900
5901
|
|
|
5901
5902
|
return value;
|
|
@@ -6353,18 +6354,29 @@
|
|
|
6353
6354
|
const grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
|
|
6354
6355
|
var grid$1 = grid;
|
|
6355
6356
|
|
|
6357
|
+
function transform$1(value, userValue) {
|
|
6358
|
+
if (userValue === 'grey') {
|
|
6359
|
+
return userValue;
|
|
6360
|
+
}
|
|
6361
|
+
|
|
6362
|
+
return value;
|
|
6363
|
+
}
|
|
6364
|
+
|
|
6356
6365
|
const color = style$2({
|
|
6357
6366
|
prop: 'color',
|
|
6358
|
-
themeKey: 'palette'
|
|
6367
|
+
themeKey: 'palette',
|
|
6368
|
+
transform: transform$1
|
|
6359
6369
|
});
|
|
6360
6370
|
const bgcolor = style$2({
|
|
6361
6371
|
prop: 'bgcolor',
|
|
6362
6372
|
cssProperty: 'backgroundColor',
|
|
6363
|
-
themeKey: 'palette'
|
|
6373
|
+
themeKey: 'palette',
|
|
6374
|
+
transform: transform$1
|
|
6364
6375
|
});
|
|
6365
6376
|
const backgroundColor = style$2({
|
|
6366
6377
|
prop: 'backgroundColor',
|
|
6367
|
-
themeKey: 'palette'
|
|
6378
|
+
themeKey: 'palette',
|
|
6379
|
+
transform: transform$1
|
|
6368
6380
|
});
|
|
6369
6381
|
const palette = compose(color, bgcolor, backgroundColor);
|
|
6370
6382
|
var palette$1 = palette;
|
|
@@ -7744,7 +7756,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7744
7756
|
const parsedTheme = {};
|
|
7745
7757
|
walkObjectDeep(theme, (keys, value, arrayKeys) => {
|
|
7746
7758
|
if (typeof value === 'string' || typeof value === 'number') {
|
|
7747
|
-
if (!shouldSkipGeneratingVar ||
|
|
7759
|
+
if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {
|
|
7748
7760
|
// only create css & var if `shouldSkipGeneratingVar` return false
|
|
7749
7761
|
const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;
|
|
7750
7762
|
Object.assign(css, {
|
|
@@ -7769,7 +7781,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7769
7781
|
const DEFAULT_ATTRIBUTE = 'data-color-scheme';
|
|
7770
7782
|
function getInitColorSchemeScript$1(options) {
|
|
7771
7783
|
const {
|
|
7772
|
-
enableColorScheme = true,
|
|
7773
7784
|
defaultMode = 'light',
|
|
7774
7785
|
defaultLightColorScheme = 'light',
|
|
7775
7786
|
defaultDarkColorScheme = 'dark',
|
|
@@ -7805,9 +7816,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7805
7816
|
if (colorScheme) {
|
|
7806
7817
|
${colorSchemeNode}.setAttribute('${attribute}', colorScheme);
|
|
7807
7818
|
}
|
|
7808
|
-
if (${enableColorScheme} && !!cssColorScheme) {
|
|
7809
|
-
${colorSchemeNode}.style.setProperty('color-scheme', cssColorScheme);
|
|
7810
|
-
}
|
|
7811
7819
|
} catch (e) {} })();`
|
|
7812
7820
|
}
|
|
7813
7821
|
});
|
|
@@ -8059,10 +8067,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8059
8067
|
attribute: defaultAttribute = DEFAULT_ATTRIBUTE,
|
|
8060
8068
|
modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
|
8061
8069
|
colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,
|
|
8062
|
-
defaultMode:
|
|
8070
|
+
defaultMode: designSystemMode = 'light',
|
|
8063
8071
|
defaultColorScheme: designSystemColorScheme,
|
|
8064
8072
|
disableTransitionOnChange: designSystemTransitionOnChange = false,
|
|
8065
|
-
enableColorScheme: designSystemEnableColorScheme = true,
|
|
8066
8073
|
shouldSkipGeneratingVar: designSystemShouldSkipGeneratingVar,
|
|
8067
8074
|
resolveTheme,
|
|
8068
8075
|
excludeVariablesFromRoot
|
|
@@ -8090,10 +8097,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8090
8097
|
modeStorageKey = defaultModeStorageKey,
|
|
8091
8098
|
colorSchemeStorageKey = defaultColorSchemeStorageKey,
|
|
8092
8099
|
attribute = defaultAttribute,
|
|
8093
|
-
defaultMode =
|
|
8100
|
+
defaultMode = designSystemMode,
|
|
8094
8101
|
defaultColorScheme = designSystemColorScheme,
|
|
8095
8102
|
disableTransitionOnChange = designSystemTransitionOnChange,
|
|
8096
|
-
enableColorScheme = designSystemEnableColorScheme,
|
|
8097
8103
|
storageWindow = typeof window === 'undefined' ? undefined : window,
|
|
8098
8104
|
documentNode = typeof document === 'undefined' ? undefined : document,
|
|
8099
8105
|
colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
|
|
@@ -8111,7 +8117,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8111
8117
|
|
|
8112
8118
|
const allColorSchemes = Object.keys(colorSchemes);
|
|
8113
8119
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
8114
|
-
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
8120
|
+
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark; // 1. Get the data about the `mode`, `colorScheme`, and setter functions.
|
|
8121
|
+
|
|
8115
8122
|
const {
|
|
8116
8123
|
mode,
|
|
8117
8124
|
setMode,
|
|
@@ -8130,36 +8137,54 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8130
8137
|
storageWindow
|
|
8131
8138
|
});
|
|
8132
8139
|
|
|
8133
|
-
const
|
|
8140
|
+
const calculatedMode = (() => {
|
|
8141
|
+
if (!mode) {
|
|
8142
|
+
// This scope occurs on the server
|
|
8143
|
+
if (defaultMode === 'system') {
|
|
8144
|
+
return designSystemMode;
|
|
8145
|
+
}
|
|
8146
|
+
|
|
8147
|
+
return defaultMode;
|
|
8148
|
+
}
|
|
8149
|
+
|
|
8150
|
+
return mode;
|
|
8151
|
+
})();
|
|
8152
|
+
|
|
8153
|
+
const calculatedColorScheme = (() => {
|
|
8134
8154
|
if (!colorScheme) {
|
|
8135
8155
|
// This scope occurs on the server
|
|
8136
|
-
if (
|
|
8156
|
+
if (calculatedMode === 'dark') {
|
|
8137
8157
|
return defaultDarkColorScheme;
|
|
8138
|
-
} // use light color scheme, if default mode is 'light' | '
|
|
8158
|
+
} // use light color scheme, if default mode is 'light' | 'system'
|
|
8139
8159
|
|
|
8140
8160
|
|
|
8141
8161
|
return defaultLightColorScheme;
|
|
8142
8162
|
}
|
|
8143
8163
|
|
|
8144
8164
|
return colorScheme;
|
|
8145
|
-
})();
|
|
8165
|
+
})(); // 2. Create CSS variables and store them in objects (to be generated in stylesheets in the final step)
|
|
8166
|
+
|
|
8146
8167
|
|
|
8147
|
-
let theme = restThemeProp;
|
|
8148
8168
|
const {
|
|
8149
8169
|
css: rootCss,
|
|
8150
8170
|
vars: rootVars,
|
|
8151
8171
|
parsedTheme
|
|
8152
|
-
} = cssVarsParser(
|
|
8172
|
+
} = cssVarsParser(restThemeProp, {
|
|
8153
8173
|
prefix: cssVarPrefix,
|
|
8154
8174
|
shouldSkipGeneratingVar
|
|
8155
|
-
});
|
|
8156
|
-
|
|
8175
|
+
}); // 3. Start composing the theme object
|
|
8176
|
+
|
|
8177
|
+
let theme = _extends({}, parsedTheme, {
|
|
8157
8178
|
components,
|
|
8158
8179
|
colorSchemes,
|
|
8159
8180
|
cssVarPrefix,
|
|
8160
8181
|
vars: rootVars,
|
|
8161
8182
|
getColorSchemeSelector: targetColorScheme => `[${attribute}="${targetColorScheme}"] &`
|
|
8162
|
-
});
|
|
8183
|
+
}); // 4. Create color CSS variables and store them in objects (to be generated in stylesheets in the final step)
|
|
8184
|
+
// The default color scheme stylesheet is constructed to have the least CSS specificity.
|
|
8185
|
+
// The other color schemes uses selector, default as data attribute, to increase the CSS specificity so that they can override the default color scheme stylesheet.
|
|
8186
|
+
|
|
8187
|
+
|
|
8163
8188
|
const defaultColorSchemeStyleSheet = {};
|
|
8164
8189
|
const otherColorSchemesStyleSheet = {};
|
|
8165
8190
|
Object.entries(colorSchemes).forEach(([key, scheme]) => {
|
|
@@ -8173,13 +8198,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8173
8198
|
});
|
|
8174
8199
|
theme.vars = deepmerge(theme.vars, vars);
|
|
8175
8200
|
|
|
8176
|
-
if (key ===
|
|
8201
|
+
if (key === calculatedColorScheme) {
|
|
8202
|
+
// 4.1 Merge the selected color scheme to the theme
|
|
8177
8203
|
theme = _extends({}, theme, parsedScheme);
|
|
8178
8204
|
|
|
8179
8205
|
if (theme.palette) {
|
|
8180
|
-
|
|
8181
|
-
theme.palette.mode = mode;
|
|
8182
|
-
theme.palette.colorScheme = resolvedColorScheme;
|
|
8206
|
+
theme.palette.colorScheme = key;
|
|
8183
8207
|
}
|
|
8184
8208
|
}
|
|
8185
8209
|
|
|
@@ -8209,35 +8233,21 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8209
8233
|
} else {
|
|
8210
8234
|
otherColorSchemesStyleSheet[`${colorSchemeSelector === ':root' ? '' : colorSchemeSelector}[${attribute}="${key}"]`] = css;
|
|
8211
8235
|
}
|
|
8212
|
-
});
|
|
8236
|
+
}); // 5. Declaring effects
|
|
8237
|
+
// 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.
|
|
8238
|
+
|
|
8213
8239
|
React__namespace.useEffect(() => {
|
|
8214
8240
|
if (colorScheme && colorSchemeNode) {
|
|
8215
8241
|
// attaches attribute to <html> because the css variables are attached to :root (html)
|
|
8216
8242
|
colorSchemeNode.setAttribute(attribute, colorScheme);
|
|
8217
8243
|
}
|
|
8218
|
-
}, [colorScheme, attribute, colorSchemeNode]);
|
|
8219
|
-
|
|
8220
|
-
if (!mode || !enableColorScheme || !colorSchemeNode) {
|
|
8221
|
-
return undefined;
|
|
8222
|
-
}
|
|
8223
|
-
|
|
8224
|
-
const priorColorScheme = colorSchemeNode.style.getPropertyValue('color-scheme'); // `color-scheme` tells browser to render built-in elements according to its value: `light` or `dark`
|
|
8225
|
-
|
|
8226
|
-
if (mode === 'system') {
|
|
8227
|
-
colorSchemeNode.style.setProperty('color-scheme', systemMode);
|
|
8228
|
-
} else {
|
|
8229
|
-
colorSchemeNode.style.setProperty('color-scheme', mode);
|
|
8230
|
-
}
|
|
8244
|
+
}, [colorScheme, attribute, colorSchemeNode]); // 5.2 Remove the CSS transition when color scheme changes to create instant experience.
|
|
8245
|
+
// credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313
|
|
8231
8246
|
|
|
8232
|
-
return () => {
|
|
8233
|
-
colorSchemeNode.style.setProperty('color-scheme', priorColorScheme);
|
|
8234
|
-
};
|
|
8235
|
-
}, [mode, systemMode, enableColorScheme, colorSchemeNode]);
|
|
8236
8247
|
React__namespace.useEffect(() => {
|
|
8237
8248
|
let timer;
|
|
8238
8249
|
|
|
8239
8250
|
if (disableTransitionOnChange && hasMounted.current && documentNode) {
|
|
8240
|
-
// credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313
|
|
8241
8251
|
const css = documentNode.createElement('style');
|
|
8242
8252
|
css.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION));
|
|
8243
8253
|
documentNode.head.appendChild(css); // Force browser repaint
|
|
@@ -8262,6 +8272,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8262
8272
|
return /*#__PURE__*/jsxRuntime_2(ColorSchemeContext.Provider, {
|
|
8263
8273
|
value: {
|
|
8264
8274
|
mode,
|
|
8275
|
+
systemMode,
|
|
8265
8276
|
setMode,
|
|
8266
8277
|
lightColorScheme,
|
|
8267
8278
|
darkColorScheme,
|
|
@@ -8330,11 +8341,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8330
8341
|
*/
|
|
8331
8342
|
documentNode: PropTypes.any,
|
|
8332
8343
|
|
|
8333
|
-
/**
|
|
8334
|
-
* Indicate to the browser which color scheme is used (light or dark) for rendering built-in UI
|
|
8335
|
-
*/
|
|
8336
|
-
enableColorScheme: PropTypes.bool,
|
|
8337
|
-
|
|
8338
8344
|
/**
|
|
8339
8345
|
* The key in the local storage used to store current color scheme.
|
|
8340
8346
|
*/
|
|
@@ -8356,12 +8362,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8356
8362
|
*/
|
|
8357
8363
|
theme: PropTypes.object
|
|
8358
8364
|
} ;
|
|
8365
|
+
const defaultLightColorScheme = typeof designSystemColorScheme === 'string' ? designSystemColorScheme : designSystemColorScheme.light;
|
|
8366
|
+
const defaultDarkColorScheme = typeof designSystemColorScheme === 'string' ? designSystemColorScheme : designSystemColorScheme.dark;
|
|
8359
8367
|
|
|
8360
8368
|
const getInitColorSchemeScript = params => getInitColorSchemeScript$1(_extends({
|
|
8361
8369
|
attribute: defaultAttribute,
|
|
8362
8370
|
colorSchemeStorageKey: defaultColorSchemeStorageKey,
|
|
8363
|
-
|
|
8364
|
-
|
|
8371
|
+
defaultMode: designSystemMode,
|
|
8372
|
+
defaultLightColorScheme,
|
|
8373
|
+
defaultDarkColorScheme,
|
|
8374
|
+
modeStorageKey: defaultModeStorageKey
|
|
8365
8375
|
}, params));
|
|
8366
8376
|
|
|
8367
8377
|
return {
|
|
@@ -8775,6 +8785,17 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8775
8785
|
|
|
8776
8786
|
return [];
|
|
8777
8787
|
};
|
|
8788
|
+
const generateDirectionClasses = direction => {
|
|
8789
|
+
if (direction === undefined) {
|
|
8790
|
+
return [];
|
|
8791
|
+
}
|
|
8792
|
+
|
|
8793
|
+
if (typeof direction === 'object') {
|
|
8794
|
+
return Object.entries(direction).map(([key, value]) => `direction-${key}-${value}`);
|
|
8795
|
+
}
|
|
8796
|
+
|
|
8797
|
+
return [`direction-xs-${String(direction)}`];
|
|
8798
|
+
};
|
|
8778
8799
|
|
|
8779
8800
|
const _excluded$2f = ["className", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow"];
|
|
8780
8801
|
const defaultTheme$4 = createTheme$1(); // widening Theme to any so that the consumer can own the theme structure.
|
|
@@ -8812,7 +8833,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8812
8833
|
gridSize
|
|
8813
8834
|
} = ownerState;
|
|
8814
8835
|
const slots = {
|
|
8815
|
-
root: ['root', container && 'container',
|
|
8836
|
+
root: ['root', container && 'container', wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...generateDirectionClasses(direction), ...generateSizeClassNames(gridSize), ...(container ? generateSpacingClassNames(spacing, theme.breakpoints.keys[0]) : [])]
|
|
8816
8837
|
};
|
|
8817
8838
|
return composeClasses(slots, slot => generateUtilityClass(componentName, slot), {});
|
|
8818
8839
|
};
|
|
@@ -9202,7 +9223,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9202
9223
|
} = mergeSlotProps(_extends({}, rest, {
|
|
9203
9224
|
externalSlotProps: resolvedComponentsProps
|
|
9204
9225
|
}));
|
|
9205
|
-
const ref = useForkRef(internalRef,
|
|
9226
|
+
const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);
|
|
9206
9227
|
const props = appendOwnerState(elementType, _extends({}, mergedProps, {
|
|
9207
9228
|
ref
|
|
9208
9229
|
}), ownerState);
|
|
@@ -14077,6 +14098,24 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14077
14098
|
} ;
|
|
14078
14099
|
var ModalUnstyled$1 = ModalUnstyled;
|
|
14079
14100
|
|
|
14101
|
+
/**
|
|
14102
|
+
* NoSsr purposely removes components from the subject of Server Side Rendering (SSR).
|
|
14103
|
+
*
|
|
14104
|
+
* This component can be useful in a variety of situations:
|
|
14105
|
+
*
|
|
14106
|
+
* * Escape hatch for broken dependencies not supporting SSR.
|
|
14107
|
+
* * Improve the time-to-first paint on the client by only rendering above the fold.
|
|
14108
|
+
* * Reduce the rendering time on the server.
|
|
14109
|
+
* * Under too heavy server load, you can turn on service degradation.
|
|
14110
|
+
*
|
|
14111
|
+
* Demos:
|
|
14112
|
+
*
|
|
14113
|
+
* - [No SSR](https://mui.com/base/react-no-ssr/)
|
|
14114
|
+
*
|
|
14115
|
+
* API:
|
|
14116
|
+
*
|
|
14117
|
+
* - [NoSsr API](https://mui.com/base/api/no-ssr/)
|
|
14118
|
+
*/
|
|
14080
14119
|
function NoSsr(props) {
|
|
14081
14120
|
const {
|
|
14082
14121
|
children,
|
|
@@ -14105,7 +14144,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14105
14144
|
= {
|
|
14106
14145
|
// ----------------------------- Warning --------------------------------
|
|
14107
14146
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
14108
|
-
// | To update them edit
|
|
14147
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
14109
14148
|
// ----------------------------------------------------------------------
|
|
14110
14149
|
|
|
14111
14150
|
/**
|
|
@@ -14874,7 +14913,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14874
14913
|
};
|
|
14875
14914
|
}
|
|
14876
14915
|
|
|
14877
|
-
const _excluded$29 = ["aria-label", "aria-valuetext", "className", "component", "classes", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat", "isRtl", "components", "componentsProps"];
|
|
14916
|
+
const _excluded$29 = ["aria-label", "aria-valuetext", "aria-labelledby", "className", "component", "classes", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat", "isRtl", "components", "componentsProps"];
|
|
14878
14917
|
|
|
14879
14918
|
const Identity = x => x;
|
|
14880
14919
|
|
|
@@ -14914,6 +14953,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14914
14953
|
const {
|
|
14915
14954
|
'aria-label': ariaLabel,
|
|
14916
14955
|
'aria-valuetext': ariaValuetext,
|
|
14956
|
+
'aria-labelledby': ariaLabelledby,
|
|
14917
14957
|
className,
|
|
14918
14958
|
component,
|
|
14919
14959
|
classes: classesProp,
|
|
@@ -15091,6 +15131,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
15091
15131
|
"data-index": index,
|
|
15092
15132
|
"aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
|
|
15093
15133
|
"aria-valuenow": scale(value),
|
|
15134
|
+
"aria-labelledby": ariaLabelledby,
|
|
15094
15135
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
|
|
15095
15136
|
value: values[index]
|
|
15096
15137
|
}, inputProps))
|
|
@@ -17179,12 +17220,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
17179
17220
|
var SvgIcon$1 = SvgIcon;
|
|
17180
17221
|
|
|
17181
17222
|
function createSvgIcon(path, displayName) {
|
|
17182
|
-
|
|
17183
|
-
|
|
17184
|
-
|
|
17185
|
-
|
|
17186
|
-
|
|
17187
|
-
|
|
17223
|
+
function Component(props, ref) {
|
|
17224
|
+
return /*#__PURE__*/jsxRuntime_1(SvgIcon$1, _extends({
|
|
17225
|
+
"data-testid": `${displayName}Icon`,
|
|
17226
|
+
ref: ref
|
|
17227
|
+
}, props, {
|
|
17228
|
+
children: path
|
|
17229
|
+
}));
|
|
17230
|
+
}
|
|
17188
17231
|
|
|
17189
17232
|
{
|
|
17190
17233
|
// Need to set `displayName` on the inner component for React.memo.
|
|
@@ -19791,8 +19834,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
19791
19834
|
}
|
|
19792
19835
|
}
|
|
19793
19836
|
|
|
19794
|
-
const
|
|
19795
|
-
const handleRef = useForkRef(ref, handleOwnRef);
|
|
19837
|
+
const handleRef = useForkRef(ref, focusVisibleRef, buttonRef);
|
|
19796
19838
|
|
|
19797
19839
|
{
|
|
19798
19840
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -22415,9 +22457,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
22415
22457
|
}
|
|
22416
22458
|
}
|
|
22417
22459
|
}, []);
|
|
22418
|
-
const
|
|
22419
|
-
const handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);
|
|
22420
|
-
const handleInputRef = useForkRef(inputRef, handleInputRefProp);
|
|
22460
|
+
const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
|
|
22421
22461
|
const [focused, setFocused] = React__namespace.useState(false);
|
|
22422
22462
|
const muiFormControl = useFormControl();
|
|
22423
22463
|
|
|
@@ -24511,8 +24551,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24511
24551
|
} = props,
|
|
24512
24552
|
other = _objectWithoutPropertiesLoose(props, _excluded$1K);
|
|
24513
24553
|
const nodeRef = React__namespace.useRef(null);
|
|
24514
|
-
const
|
|
24515
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
24554
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
24516
24555
|
|
|
24517
24556
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
24518
24557
|
if (callback) {
|
|
@@ -28200,7 +28239,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28200
28239
|
boxSizing: 'border-box',
|
|
28201
28240
|
// Fix font resize problem in iOS
|
|
28202
28241
|
WebkitTextSizeAdjust: '100%'
|
|
28203
|
-
}, enableColorScheme && {
|
|
28242
|
+
}, enableColorScheme && !theme.vars && {
|
|
28204
28243
|
colorScheme: theme.palette.mode
|
|
28205
28244
|
});
|
|
28206
28245
|
const body = theme => _extends({
|
|
@@ -28215,7 +28254,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28215
28254
|
const styles$3 = (theme, enableColorScheme = false) => {
|
|
28216
28255
|
var _theme$components, _theme$components$Mui;
|
|
28217
28256
|
|
|
28218
|
-
|
|
28257
|
+
const colorSchemeStyles = {};
|
|
28258
|
+
|
|
28259
|
+
if (enableColorScheme && theme.colorSchemes) {
|
|
28260
|
+
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
28261
|
+
var _scheme$palette;
|
|
28262
|
+
|
|
28263
|
+
colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, '')] = {
|
|
28264
|
+
colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
|
|
28265
|
+
};
|
|
28266
|
+
});
|
|
28267
|
+
}
|
|
28268
|
+
|
|
28269
|
+
let defaultStyles = _extends({
|
|
28219
28270
|
html: html(theme, enableColorScheme),
|
|
28220
28271
|
'*, *::before, *::after': {
|
|
28221
28272
|
boxSizing: 'inherit'
|
|
@@ -28232,7 +28283,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28232
28283
|
backgroundColor: (theme.vars || theme).palette.background.default
|
|
28233
28284
|
}
|
|
28234
28285
|
})
|
|
28235
|
-
};
|
|
28286
|
+
}, colorSchemeStyles);
|
|
28287
|
+
|
|
28236
28288
|
const themeOverrides = (_theme$components = theme.components) == null ? void 0 : (_theme$components$Mui = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components$Mui.styleOverrides;
|
|
28237
28289
|
|
|
28238
28290
|
if (themeOverrides) {
|
|
@@ -29768,8 +29820,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29768
29820
|
other = _objectWithoutPropertiesLoose(props, _excluded$1m);
|
|
29769
29821
|
|
|
29770
29822
|
const childrenRef = React__namespace.useRef(null);
|
|
29771
|
-
const
|
|
29772
|
-
const handleRef = useForkRef(handleRefIntermediary, ref);
|
|
29823
|
+
const handleRef = useForkRef(children.ref, childrenRef, ref);
|
|
29773
29824
|
|
|
29774
29825
|
const normalizedTransitionCallback = callback => isAppearing => {
|
|
29775
29826
|
if (callback) {
|
|
@@ -32764,8 +32815,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
32764
32815
|
const autoTimeout = React__namespace.useRef();
|
|
32765
32816
|
const theme = useTheme();
|
|
32766
32817
|
const nodeRef = React__namespace.useRef(null);
|
|
32767
|
-
const
|
|
32768
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
32818
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
32769
32819
|
|
|
32770
32820
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
32771
32821
|
if (callback) {
|
|
@@ -37638,6 +37688,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
37638
37688
|
transformOrigin: getTransformOriginValue(elemTransformOrigin)
|
|
37639
37689
|
};
|
|
37640
37690
|
}, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);
|
|
37691
|
+
const [isPositioned, setIsPositioned] = React__namespace.useState(open);
|
|
37641
37692
|
const setPositioningStyles = React__namespace.useCallback(() => {
|
|
37642
37693
|
const element = paperRef.current;
|
|
37643
37694
|
|
|
@@ -37656,6 +37707,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
37656
37707
|
}
|
|
37657
37708
|
|
|
37658
37709
|
element.style.transformOrigin = positioning.transformOrigin;
|
|
37710
|
+
setIsPositioned(true);
|
|
37659
37711
|
}, [getPositioningStyle]);
|
|
37660
37712
|
|
|
37661
37713
|
const handleEntering = (element, isAppearing) => {
|
|
@@ -37666,6 +37718,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
37666
37718
|
setPositioningStyles();
|
|
37667
37719
|
};
|
|
37668
37720
|
|
|
37721
|
+
const handleExited = () => {
|
|
37722
|
+
setIsPositioned(false);
|
|
37723
|
+
};
|
|
37724
|
+
|
|
37669
37725
|
React__namespace.useEffect(() => {
|
|
37670
37726
|
if (open) {
|
|
37671
37727
|
setPositioningStyles();
|
|
@@ -37715,13 +37771,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
37715
37771
|
appear: true,
|
|
37716
37772
|
in: open,
|
|
37717
37773
|
onEntering: handleEntering,
|
|
37774
|
+
onExited: handleExited,
|
|
37718
37775
|
timeout: transitionDuration
|
|
37719
37776
|
}, TransitionProps, {
|
|
37720
37777
|
children: /*#__PURE__*/jsxRuntime_1(PopoverPaper, _extends({
|
|
37721
37778
|
elevation: elevation
|
|
37722
37779
|
}, PaperProps, {
|
|
37723
37780
|
ref: handlePaperRef,
|
|
37724
|
-
className: clsx(classes.paper, PaperProps.className)
|
|
37781
|
+
className: clsx(classes.paper, PaperProps.className)
|
|
37782
|
+
}, isPositioned ? undefined : {
|
|
37783
|
+
style: _extends({}, PaperProps.style, {
|
|
37784
|
+
opacity: 0
|
|
37785
|
+
})
|
|
37786
|
+
}, {
|
|
37725
37787
|
ownerState: ownerState,
|
|
37726
37788
|
children: children
|
|
37727
37789
|
}))
|
|
@@ -41066,8 +41128,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
41066
41128
|
} = useIsFocusVisible();
|
|
41067
41129
|
const [focusVisible, setFocusVisible] = React__namespace.useState(false);
|
|
41068
41130
|
const rootRef = React__namespace.useRef();
|
|
41069
|
-
const
|
|
41070
|
-
const handleRef = useForkRef(handleFocusRef, ref);
|
|
41131
|
+
const handleRef = useForkRef(focusVisibleRef, rootRef, ref);
|
|
41071
41132
|
|
|
41072
41133
|
const handleMouseMove = event => {
|
|
41073
41134
|
if (onMouseMove) {
|
|
@@ -41461,6 +41522,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
41461
41522
|
theme,
|
|
41462
41523
|
ownerState
|
|
41463
41524
|
}) => {
|
|
41525
|
+
const colorSchemeStyles = {};
|
|
41526
|
+
|
|
41527
|
+
if (ownerState.enableColorScheme && theme.colorSchemes) {
|
|
41528
|
+
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
41529
|
+
var _scheme$palette;
|
|
41530
|
+
|
|
41531
|
+
colorSchemeStyles[`&${theme.getColorSchemeSelector(key).replace(/\s*&/, '')}`] = {
|
|
41532
|
+
colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
|
|
41533
|
+
};
|
|
41534
|
+
});
|
|
41535
|
+
}
|
|
41536
|
+
|
|
41464
41537
|
return _extends({}, html(theme, ownerState.enableColorScheme), body(theme), {
|
|
41465
41538
|
'& *, & *::before, & *::after': {
|
|
41466
41539
|
boxSizing: 'inherit'
|
|
@@ -41468,7 +41541,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
41468
41541
|
'& strong, & b': {
|
|
41469
41542
|
fontWeight: theme.typography.fontWeightBold
|
|
41470
41543
|
}
|
|
41471
|
-
});
|
|
41544
|
+
}, colorSchemeStyles);
|
|
41472
41545
|
});
|
|
41473
41546
|
const ScopedCssBaseline = /*#__PURE__*/React__namespace.forwardRef(function ScopedCssBaseline(inProps, ref) {
|
|
41474
41547
|
const props = useThemeProps({
|
|
@@ -44156,8 +44229,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44156
44229
|
other = _objectWithoutPropertiesLoose(props, _excluded$y);
|
|
44157
44230
|
|
|
44158
44231
|
const nodeRef = React__namespace.useRef(null);
|
|
44159
|
-
const
|
|
44160
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
44232
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
44161
44233
|
|
|
44162
44234
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
44163
44235
|
if (callback) {
|
|
@@ -45325,9 +45397,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
45325
45397
|
document.removeEventListener('keydown', handleKeyDown);
|
|
45326
45398
|
};
|
|
45327
45399
|
}, [handleClose, open]);
|
|
45328
|
-
const
|
|
45329
|
-
const handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
|
|
45330
|
-
const handleRef = useForkRef(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
|
|
45400
|
+
const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
45331
45401
|
|
|
45332
45402
|
if (typeof title !== 'number' && !title) {
|
|
45333
45403
|
open = false;
|