@mui/material 5.10.15 → 5.10.17
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/Accordion/accordionClasses.d.ts +1 -1
- package/AccordionActions/accordionActionsClasses.d.ts +1 -1
- package/AccordionDetails/accordionDetailsClasses.d.ts +1 -1
- package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/Alert/alertClasses.d.ts +1 -1
- package/AlertTitle/alertTitleClasses.d.ts +1 -1
- package/AppBar/appBarClasses.d.ts +1 -1
- package/Autocomplete/autocompleteClasses.d.ts +1 -1
- package/Avatar/avatarClasses.d.ts +1 -1
- package/AvatarGroup/avatarGroupClasses.d.ts +1 -1
- package/Backdrop/backdropClasses.d.ts +1 -1
- package/Badge/badgeClasses.d.ts +1 -1
- package/BottomNavigation/bottomNavigationClasses.d.ts +1 -1
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +1 -1
- package/Breadcrumbs/breadcrumbsClasses.d.ts +1 -1
- package/Button/buttonClasses.d.ts +1 -1
- package/ButtonBase/buttonBaseClasses.d.ts +1 -1
- package/ButtonBase/touchRippleClasses.d.ts +1 -1
- package/ButtonGroup/buttonGroupClasses.d.ts +1 -1
- package/CHANGELOG.md +121 -1
- package/Card/cardClasses.d.ts +1 -1
- package/CardActionArea/cardActionAreaClasses.d.ts +1 -1
- package/CardActions/cardActionsClasses.d.ts +1 -1
- package/CardContent/cardContentClasses.d.ts +1 -1
- package/CardHeader/cardHeaderClasses.d.ts +1 -1
- package/CardMedia/cardMediaClasses.d.ts +1 -1
- package/Checkbox/checkboxClasses.d.ts +1 -1
- package/Chip/Chip.d.ts +10 -0
- package/Chip/Chip.js +15 -2
- package/Chip/chipClasses.d.ts +1 -1
- package/CircularProgress/circularProgressClasses.d.ts +1 -1
- package/Collapse/collapseClasses.d.ts +1 -1
- package/Dialog/dialogClasses.d.ts +1 -1
- package/DialogActions/dialogActionsClasses.d.ts +1 -1
- package/DialogContent/dialogContentClasses.d.ts +1 -1
- package/DialogContentText/dialogContentTextClasses.d.ts +1 -1
- package/DialogTitle/dialogTitleClasses.d.ts +1 -1
- package/Divider/dividerClasses.d.ts +1 -1
- package/Drawer/drawerClasses.d.ts +1 -1
- package/Fab/Fab.js +8 -5
- package/Fab/fabClasses.d.ts +1 -1
- package/FilledInput/filledInputClasses.d.ts +1 -1
- package/FormControl/FormControlContext.d.ts +17 -0
- package/FormControl/FormControlContext.js +1 -1
- package/FormControl/formControlClasses.d.ts +1 -1
- package/FormControl/index.d.ts +3 -1
- package/FormControl/useFormControl.d.ts +1 -24
- package/FormControlLabel/formControlLabelClasses.d.ts +1 -1
- package/FormGroup/formGroupClasses.d.ts +1 -1
- package/FormHelperText/formHelperTextClasses.d.ts +1 -1
- package/FormLabel/formLabelClasses.d.ts +1 -1
- package/Grid/gridClasses.d.ts +1 -1
- package/Icon/iconClasses.d.ts +1 -1
- package/IconButton/iconButtonClasses.d.ts +9 -1
- package/IconButton/iconButtonClasses.js +1 -1
- package/ImageList/imageListClasses.d.ts +1 -1
- package/ImageListItem/imageListItemClasses.d.ts +1 -1
- package/ImageListItemBar/imageListItemBarClasses.d.ts +1 -1
- package/Input/inputClasses.d.ts +1 -1
- package/InputAdornment/inputAdornmentClasses.d.ts +1 -1
- package/InputBase/inputBaseClasses.d.ts +1 -1
- package/InputLabel/inputLabelClasses.d.ts +1 -1
- package/LinearProgress/linearProgressClasses.d.ts +1 -1
- package/Link/linkClasses.d.ts +1 -1
- package/List/listClasses.d.ts +1 -1
- package/ListItem/listItemClasses.d.ts +1 -1
- package/ListItemAvatar/listItemAvatarClasses.d.ts +1 -1
- package/ListItemButton/listItemButtonClasses.d.ts +1 -1
- package/ListItemIcon/listItemIconClasses.d.ts +1 -1
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +1 -1
- package/ListItemText/listItemTextClasses.d.ts +1 -1
- package/ListSubheader/listSubheaderClasses.d.ts +1 -1
- package/Menu/menuClasses.d.ts +1 -1
- package/MenuItem/menuItemClasses.d.ts +1 -1
- package/MobileStepper/mobileStepperClasses.d.ts +1 -1
- package/NativeSelect/nativeSelectClasses.d.ts +1 -1
- package/OutlinedInput/outlinedInputClasses.d.ts +1 -1
- package/Pagination/paginationClasses.d.ts +1 -1
- package/PaginationItem/paginationItemClasses.d.ts +1 -1
- package/Paper/paperClasses.d.ts +1 -1
- package/Popover/popoverClasses.d.ts +1 -1
- package/Popper/Popper.d.ts +2 -2
- package/README.md +0 -9
- package/Radio/radioClasses.d.ts +1 -1
- package/Rating/Rating.js +3 -1
- package/Rating/ratingClasses.d.ts +1 -1
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +1 -1
- package/Select/selectClasses.d.ts +1 -1
- package/Skeleton/skeletonClasses.d.ts +1 -1
- package/Slider/Slider.js +6 -1
- package/Snackbar/snackbarClasses.d.ts +1 -1
- package/SnackbarContent/snackbarContentClasses.d.ts +1 -1
- package/SpeedDial/speedDialClasses.d.ts +1 -1
- package/SpeedDialAction/speedDialActionClasses.d.ts +1 -1
- package/SpeedDialIcon/speedDialIconClasses.d.ts +1 -1
- package/Step/stepClasses.d.ts +1 -1
- package/StepButton/stepButtonClasses.d.ts +1 -1
- package/StepConnector/stepConnectorClasses.d.ts +1 -1
- package/StepContent/stepContentClasses.d.ts +1 -1
- package/StepIcon/stepIconClasses.d.ts +1 -1
- package/StepLabel/stepLabelClasses.d.ts +1 -1
- package/Stepper/stepperClasses.d.ts +1 -1
- package/SvgIcon/svgIconClasses.d.ts +1 -1
- package/SwipeableDrawer/SwipeableDrawer.js +3 -1
- package/Switch/switchClasses.d.ts +1 -1
- package/Tab/tabClasses.d.ts +1 -1
- package/TabScrollButton/tabScrollButtonClasses.d.ts +1 -1
- package/Table/tableClasses.d.ts +1 -1
- package/TableBody/tableBodyClasses.d.ts +1 -1
- package/TableCell/tableCellClasses.d.ts +1 -1
- package/TableContainer/tableContainerClasses.d.ts +1 -1
- package/TableFooter/tableFooterClasses.d.ts +1 -1
- package/TableHead/tableHeadClasses.d.ts +1 -1
- package/TablePagination/tablePaginationClasses.d.ts +1 -1
- package/TableRow/tableRowClasses.d.ts +1 -1
- package/TableSortLabel/tableSortLabelClasses.d.ts +1 -1
- package/Tabs/tabsClasses.d.ts +1 -1
- package/TextField/textFieldClasses.d.ts +1 -1
- package/ToggleButton/toggleButtonClasses.d.ts +1 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +1 -1
- package/Toolbar/toolbarClasses.d.ts +1 -1
- package/Tooltip/tooltipClasses.d.ts +1 -1
- package/Typography/typographyClasses.d.ts +1 -1
- package/Unstable_Grid2/Grid2Props.d.ts +2 -2
- package/Unstable_Grid2/grid2Classes.d.ts +1 -1
- package/esm/Chip/Chip.js +15 -2
- package/esm/Fab/Fab.js +8 -5
- package/esm/FormControl/FormControlContext.js +1 -2
- package/esm/IconButton/iconButtonClasses.js +1 -1
- package/esm/Rating/Rating.js +3 -1
- package/esm/Slider/Slider.js +6 -1
- package/esm/SwipeableDrawer/SwipeableDrawer.js +3 -1
- package/esm/locale/index.js +5 -5
- package/esm/styles/experimental_extendTheme.js +115 -103
- package/esm/utils/index.js +3 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +1 -1
- package/legacy/Chip/Chip.js +15 -1
- package/legacy/Fab/Fab.js +11 -8
- package/legacy/FormControl/FormControlContext.js +1 -2
- package/legacy/IconButton/iconButtonClasses.js +1 -1
- package/legacy/Rating/Rating.js +10 -9
- package/legacy/Slider/Slider.js +2 -1
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +3 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +5 -5
- package/legacy/styles/experimental_extendTheme.js +136 -103
- package/legacy/utils/index.js +3 -1
- package/locale/index.js +5 -5
- package/modern/Chip/Chip.js +15 -2
- package/modern/Fab/Fab.js +8 -5
- package/modern/FormControl/FormControlContext.js +1 -2
- package/modern/IconButton/iconButtonClasses.js +1 -1
- package/modern/Rating/Rating.js +3 -1
- package/modern/Slider/Slider.js +6 -1
- package/modern/SwipeableDrawer/SwipeableDrawer.js +3 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +5 -5
- package/modern/styles/experimental_extendTheme.js +115 -103
- package/modern/utils/index.js +3 -1
- package/package.json +6 -6
- package/styles/CssVarsProvider.d.ts +3 -1
- package/styles/experimental_extendTheme.js +114 -102
- package/styles/responsiveFontSizes.d.ts +2 -2
- package/transitions/transition.d.ts +3 -3
- package/umd/material-ui.development.js +265 -150
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +1 -1
- package/utils/index.js +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.10.
|
|
1
|
+
/** @license MUI v5.10.17
|
|
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.
|
|
@@ -7305,6 +7305,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7305
7305
|
const decomposedColor = decomposeColor(color);
|
|
7306
7306
|
return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');
|
|
7307
7307
|
};
|
|
7308
|
+
const private_safeColorChannel = (color, warning) => {
|
|
7309
|
+
try {
|
|
7310
|
+
return colorChannel(color);
|
|
7311
|
+
} catch (error) {
|
|
7312
|
+
if (warning && "development" !== 'production') {
|
|
7313
|
+
console.warn(warning);
|
|
7314
|
+
}
|
|
7315
|
+
return color;
|
|
7316
|
+
}
|
|
7317
|
+
};
|
|
7308
7318
|
|
|
7309
7319
|
/**
|
|
7310
7320
|
* Converts a color object with type and values to a string.
|
|
@@ -7435,6 +7445,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7435
7445
|
}
|
|
7436
7446
|
return recomposeColor(color);
|
|
7437
7447
|
}
|
|
7448
|
+
function private_safeAlpha(color, value, warning) {
|
|
7449
|
+
try {
|
|
7450
|
+
return alpha(color, value);
|
|
7451
|
+
} catch (error) {
|
|
7452
|
+
if (warning && "development" !== 'production') {
|
|
7453
|
+
console.warn(warning);
|
|
7454
|
+
}
|
|
7455
|
+
return color;
|
|
7456
|
+
}
|
|
7457
|
+
}
|
|
7438
7458
|
|
|
7439
7459
|
/**
|
|
7440
7460
|
* Darkens a color.
|
|
@@ -7454,6 +7474,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7454
7474
|
}
|
|
7455
7475
|
return recomposeColor(color);
|
|
7456
7476
|
}
|
|
7477
|
+
function private_safeDarken(color, coefficient, warning) {
|
|
7478
|
+
try {
|
|
7479
|
+
return darken(color, coefficient);
|
|
7480
|
+
} catch (error) {
|
|
7481
|
+
if (warning && "development" !== 'production') {
|
|
7482
|
+
console.warn(warning);
|
|
7483
|
+
}
|
|
7484
|
+
return color;
|
|
7485
|
+
}
|
|
7486
|
+
}
|
|
7457
7487
|
|
|
7458
7488
|
/**
|
|
7459
7489
|
* Lightens a color.
|
|
@@ -7477,6 +7507,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7477
7507
|
}
|
|
7478
7508
|
return recomposeColor(color);
|
|
7479
7509
|
}
|
|
7510
|
+
function private_safeLighten(color, coefficient, warning) {
|
|
7511
|
+
try {
|
|
7512
|
+
return lighten(color, coefficient);
|
|
7513
|
+
} catch (error) {
|
|
7514
|
+
if (warning && "development" !== 'production') {
|
|
7515
|
+
console.warn(warning);
|
|
7516
|
+
}
|
|
7517
|
+
return color;
|
|
7518
|
+
}
|
|
7519
|
+
}
|
|
7480
7520
|
|
|
7481
7521
|
/**
|
|
7482
7522
|
* Darken or lighten a color, depending on its luminance.
|
|
@@ -7488,6 +7528,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7488
7528
|
function emphasize(color, coefficient = 0.15) {
|
|
7489
7529
|
return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
|
|
7490
7530
|
}
|
|
7531
|
+
function private_safeEmphasize(color, coefficient, warning) {
|
|
7532
|
+
try {
|
|
7533
|
+
return private_safeEmphasize(color, coefficient);
|
|
7534
|
+
} catch (error) {
|
|
7535
|
+
if (warning && "development" !== 'production') {
|
|
7536
|
+
console.warn(warning);
|
|
7537
|
+
}
|
|
7538
|
+
return color;
|
|
7539
|
+
}
|
|
7540
|
+
}
|
|
7491
7541
|
|
|
7492
7542
|
const EMPTY_THEME = {};
|
|
7493
7543
|
function InnerThemeProvider(props) {
|
|
@@ -7626,10 +7676,10 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7626
7676
|
* }} options.
|
|
7627
7677
|
* `prefix`: The prefix of the generated CSS variables. This function does not change the value.
|
|
7628
7678
|
*
|
|
7629
|
-
* @returns {{ css: Object, vars: Object
|
|
7679
|
+
* @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).
|
|
7630
7680
|
*
|
|
7631
7681
|
* @example
|
|
7632
|
-
* const { css, vars
|
|
7682
|
+
* const { css, vars } = parser({
|
|
7633
7683
|
* fontSize: 12,
|
|
7634
7684
|
* lineHeight: 1.2,
|
|
7635
7685
|
* palette: { primary: { 500: 'var(--color)' } }
|
|
@@ -7637,7 +7687,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7637
7687
|
*
|
|
7638
7688
|
* console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }
|
|
7639
7689
|
* console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }
|
|
7640
|
-
* console.log(parsedTheme) // { fontSize: 12, lineHeight: 1.2, palette: { primary: { 500: 'var(--color)' } } }
|
|
7641
7690
|
*/
|
|
7642
7691
|
function cssVarsParser(theme, options) {
|
|
7643
7692
|
const {
|
|
@@ -7646,7 +7695,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7646
7695
|
} = options || {};
|
|
7647
7696
|
const css = {};
|
|
7648
7697
|
const vars = {};
|
|
7649
|
-
const parsedTheme = {};
|
|
7650
7698
|
walkObjectDeep(theme, (keys, value, arrayKeys) => {
|
|
7651
7699
|
if (typeof value === 'string' || typeof value === 'number') {
|
|
7652
7700
|
if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {
|
|
@@ -7658,14 +7706,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7658
7706
|
assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);
|
|
7659
7707
|
}
|
|
7660
7708
|
}
|
|
7661
|
-
assignNestedKeys(parsedTheme, keys, value, arrayKeys);
|
|
7662
7709
|
}, keys => keys[0] === 'vars' // skip 'vars/*' paths
|
|
7663
7710
|
);
|
|
7664
7711
|
|
|
7665
7712
|
return {
|
|
7666
7713
|
css,
|
|
7667
|
-
vars
|
|
7668
|
-
parsedTheme
|
|
7714
|
+
vars
|
|
7669
7715
|
};
|
|
7670
7716
|
}
|
|
7671
7717
|
|
|
@@ -7967,9 +8013,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7967
8013
|
documentNode = typeof document === 'undefined' ? undefined : document,
|
|
7968
8014
|
colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
|
|
7969
8015
|
colorSchemeSelector = ':root',
|
|
7970
|
-
shouldSkipGeneratingVar = designSystemShouldSkipGeneratingVar
|
|
8016
|
+
shouldSkipGeneratingVar = designSystemShouldSkipGeneratingVar,
|
|
8017
|
+
disableNestedContext = false,
|
|
8018
|
+
disableStyleSheetGeneration = false
|
|
7971
8019
|
}) {
|
|
7972
8020
|
const hasMounted = React__namespace.useRef(false);
|
|
8021
|
+
const upperTheme = useTheme$3();
|
|
8022
|
+
const ctx = React__namespace.useContext(ColorSchemeContext);
|
|
8023
|
+
const nested = !!ctx && !disableNestedContext;
|
|
7973
8024
|
const {
|
|
7974
8025
|
colorSchemes = {},
|
|
7975
8026
|
components = {},
|
|
@@ -7982,12 +8033,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7982
8033
|
|
|
7983
8034
|
// 1. Get the data about the `mode`, `colorScheme`, and setter functions.
|
|
7984
8035
|
const {
|
|
7985
|
-
mode,
|
|
8036
|
+
mode: stateMode,
|
|
7986
8037
|
setMode,
|
|
7987
8038
|
systemMode,
|
|
7988
8039
|
lightColorScheme,
|
|
7989
8040
|
darkColorScheme,
|
|
7990
|
-
colorScheme,
|
|
8041
|
+
colorScheme: stateColorScheme,
|
|
7991
8042
|
setColorScheme
|
|
7992
8043
|
} = useCurrentColorScheme({
|
|
7993
8044
|
supportedColorSchemes: allColorSchemes,
|
|
@@ -7998,6 +8049,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7998
8049
|
defaultMode,
|
|
7999
8050
|
storageWindow
|
|
8000
8051
|
});
|
|
8052
|
+
let mode = stateMode;
|
|
8053
|
+
let colorScheme = stateColorScheme;
|
|
8054
|
+
if (nested) {
|
|
8055
|
+
mode = ctx.mode;
|
|
8056
|
+
colorScheme = ctx.colorScheme;
|
|
8057
|
+
}
|
|
8001
8058
|
const calculatedMode = (() => {
|
|
8002
8059
|
if (!mode) {
|
|
8003
8060
|
// This scope occurs on the server
|
|
@@ -8023,15 +8080,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8023
8080
|
// 2. Create CSS variables and store them in objects (to be generated in stylesheets in the final step)
|
|
8024
8081
|
const {
|
|
8025
8082
|
css: rootCss,
|
|
8026
|
-
vars: rootVars
|
|
8027
|
-
parsedTheme
|
|
8083
|
+
vars: rootVars
|
|
8028
8084
|
} = cssVarsParser(restThemeProp, {
|
|
8029
8085
|
prefix: cssVarPrefix,
|
|
8030
8086
|
shouldSkipGeneratingVar
|
|
8031
8087
|
});
|
|
8032
8088
|
|
|
8033
8089
|
// 3. Start composing the theme object
|
|
8034
|
-
const theme = _extends({},
|
|
8090
|
+
const theme = _extends({}, restThemeProp, {
|
|
8035
8091
|
components,
|
|
8036
8092
|
colorSchemes,
|
|
8037
8093
|
cssVarPrefix,
|
|
@@ -8047,8 +8103,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8047
8103
|
Object.entries(colorSchemes).forEach(([key, scheme]) => {
|
|
8048
8104
|
const {
|
|
8049
8105
|
css,
|
|
8050
|
-
vars
|
|
8051
|
-
parsedTheme: parsedScheme
|
|
8106
|
+
vars
|
|
8052
8107
|
} = cssVarsParser(scheme, {
|
|
8053
8108
|
prefix: cssVarPrefix,
|
|
8054
8109
|
shouldSkipGeneratingVar
|
|
@@ -8056,12 +8111,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8056
8111
|
theme.vars = deepmerge(theme.vars, vars);
|
|
8057
8112
|
if (key === calculatedColorScheme) {
|
|
8058
8113
|
// 4.1 Merge the selected color scheme to the theme
|
|
8059
|
-
Object.keys(
|
|
8060
|
-
if (
|
|
8114
|
+
Object.keys(scheme).forEach(schemeKey => {
|
|
8115
|
+
if (scheme[schemeKey] && typeof scheme[schemeKey] === 'object') {
|
|
8061
8116
|
// shallow merge the 1st level structure of the theme.
|
|
8062
|
-
theme[schemeKey] = _extends({}, theme[schemeKey],
|
|
8117
|
+
theme[schemeKey] = _extends({}, theme[schemeKey], scheme[schemeKey]);
|
|
8063
8118
|
} else {
|
|
8064
|
-
theme[schemeKey] =
|
|
8119
|
+
theme[schemeKey] = scheme[schemeKey];
|
|
8065
8120
|
}
|
|
8066
8121
|
});
|
|
8067
8122
|
if (theme.palette) {
|
|
@@ -8136,21 +8191,33 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8136
8191
|
setColorScheme,
|
|
8137
8192
|
allColorSchemes
|
|
8138
8193
|
}), [allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode]);
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8194
|
+
let shouldGenerateStyleSheet = true;
|
|
8195
|
+
if (disableStyleSheetGeneration || nested && (upperTheme == null ? void 0 : upperTheme.cssVarPrefix) === cssVarPrefix) {
|
|
8196
|
+
shouldGenerateStyleSheet = false;
|
|
8197
|
+
}
|
|
8198
|
+
const element = /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
8199
|
+
children: [shouldGenerateStyleSheet && /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
8200
|
+
children: [/*#__PURE__*/jsxRuntime_1(GlobalStyles$1, {
|
|
8201
|
+
styles: {
|
|
8202
|
+
[colorSchemeSelector]: rootCss
|
|
8203
|
+
}
|
|
8204
|
+
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$1, {
|
|
8205
|
+
styles: defaultColorSchemeStyleSheet
|
|
8206
|
+
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$1, {
|
|
8207
|
+
styles: otherColorSchemesStyleSheet
|
|
8208
|
+
})]
|
|
8149
8209
|
}), /*#__PURE__*/jsxRuntime_1(ThemeProvider, {
|
|
8150
8210
|
theme: resolveTheme ? resolveTheme(theme) : theme,
|
|
8151
8211
|
children: children
|
|
8152
8212
|
})]
|
|
8153
8213
|
});
|
|
8214
|
+
if (nested) {
|
|
8215
|
+
return element;
|
|
8216
|
+
}
|
|
8217
|
+
return /*#__PURE__*/jsxRuntime_1(ColorSchemeContext.Provider, {
|
|
8218
|
+
value: contextValue,
|
|
8219
|
+
children: element
|
|
8220
|
+
});
|
|
8154
8221
|
}
|
|
8155
8222
|
CssVarsProvider.propTypes = {
|
|
8156
8223
|
/**
|
|
@@ -8181,6 +8248,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8181
8248
|
* The initial mode used.
|
|
8182
8249
|
*/
|
|
8183
8250
|
defaultMode: PropTypes.string,
|
|
8251
|
+
/**
|
|
8252
|
+
* If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.
|
|
8253
|
+
*/
|
|
8254
|
+
disableNestedContext: PropTypes.bool,
|
|
8255
|
+
/**
|
|
8256
|
+
* If `true`, the style sheet won't be generated.
|
|
8257
|
+
*
|
|
8258
|
+
* This is useful for controlling nested CssVarsProvider behavior.
|
|
8259
|
+
*/
|
|
8260
|
+
disableStyleSheetGeneration: PropTypes.bool,
|
|
8184
8261
|
/**
|
|
8185
8262
|
* Disable CSS transitions when switching between modes or color schemes
|
|
8186
8263
|
*/
|
|
@@ -9679,8 +9756,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
9679
9756
|
});
|
|
9680
9757
|
}
|
|
9681
9758
|
function setColor(obj, key, defaultValue) {
|
|
9682
|
-
|
|
9759
|
+
if (!obj[key] && defaultValue) {
|
|
9760
|
+
obj[key] = defaultValue;
|
|
9761
|
+
}
|
|
9683
9762
|
}
|
|
9763
|
+
const silent = fn => {
|
|
9764
|
+
try {
|
|
9765
|
+
return fn();
|
|
9766
|
+
} catch (error) {
|
|
9767
|
+
// ignore error
|
|
9768
|
+
}
|
|
9769
|
+
return undefined;
|
|
9770
|
+
};
|
|
9684
9771
|
const createGetCssVar = (cssVarPrefix = 'mui') => createGetCssVar$1(cssVarPrefix);
|
|
9685
9772
|
function extendTheme(options = {}, ...args) {
|
|
9686
9773
|
var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
|
|
@@ -9745,22 +9832,22 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
9745
9832
|
// assign component variables
|
|
9746
9833
|
assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
9747
9834
|
if (key === 'light') {
|
|
9748
|
-
setColor(palette.Alert, 'errorColor',
|
|
9749
|
-
setColor(palette.Alert, 'infoColor',
|
|
9750
|
-
setColor(palette.Alert, 'successColor',
|
|
9751
|
-
setColor(palette.Alert, 'warningColor',
|
|
9835
|
+
setColor(palette.Alert, 'errorColor', private_safeDarken(palette.error.light, 0.6));
|
|
9836
|
+
setColor(palette.Alert, 'infoColor', private_safeDarken(palette.info.light, 0.6));
|
|
9837
|
+
setColor(palette.Alert, 'successColor', private_safeDarken(palette.success.light, 0.6));
|
|
9838
|
+
setColor(palette.Alert, 'warningColor', private_safeDarken(palette.warning.light, 0.6));
|
|
9752
9839
|
setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-main'));
|
|
9753
9840
|
setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-main'));
|
|
9754
9841
|
setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-main'));
|
|
9755
9842
|
setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-main'));
|
|
9756
|
-
setColor(palette.Alert, 'errorFilledColor', lightPalette.getContrastText(palette.error.main));
|
|
9757
|
-
setColor(palette.Alert, 'infoFilledColor', lightPalette.getContrastText(palette.info.main));
|
|
9758
|
-
setColor(palette.Alert, 'successFilledColor', lightPalette.getContrastText(palette.success.main));
|
|
9759
|
-
setColor(palette.Alert, 'warningFilledColor', lightPalette.getContrastText(palette.warning.main));
|
|
9760
|
-
setColor(palette.Alert, 'errorStandardBg',
|
|
9761
|
-
setColor(palette.Alert, 'infoStandardBg',
|
|
9762
|
-
setColor(palette.Alert, 'successStandardBg',
|
|
9763
|
-
setColor(palette.Alert, 'warningStandardBg',
|
|
9843
|
+
setColor(palette.Alert, 'errorFilledColor', silent(() => lightPalette.getContrastText(palette.error.main)));
|
|
9844
|
+
setColor(palette.Alert, 'infoFilledColor', silent(() => lightPalette.getContrastText(palette.info.main)));
|
|
9845
|
+
setColor(palette.Alert, 'successFilledColor', silent(() => lightPalette.getContrastText(palette.success.main)));
|
|
9846
|
+
setColor(palette.Alert, 'warningFilledColor', silent(() => lightPalette.getContrastText(palette.warning.main)));
|
|
9847
|
+
setColor(palette.Alert, 'errorStandardBg', private_safeLighten(palette.error.light, 0.9));
|
|
9848
|
+
setColor(palette.Alert, 'infoStandardBg', private_safeLighten(palette.info.light, 0.9));
|
|
9849
|
+
setColor(palette.Alert, 'successStandardBg', private_safeLighten(palette.success.light, 0.9));
|
|
9850
|
+
setColor(palette.Alert, 'warningStandardBg', private_safeLighten(palette.warning.light, 0.9));
|
|
9764
9851
|
setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-light'));
|
|
9765
9852
|
setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-light'));
|
|
9766
9853
|
setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-light'));
|
|
@@ -9773,52 +9860,52 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
9773
9860
|
setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
|
|
9774
9861
|
setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
|
|
9775
9862
|
setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
|
|
9776
|
-
setColor(palette.LinearProgress, 'primaryBg',
|
|
9777
|
-
setColor(palette.LinearProgress, 'secondaryBg',
|
|
9778
|
-
setColor(palette.LinearProgress, 'errorBg',
|
|
9779
|
-
setColor(palette.LinearProgress, 'infoBg',
|
|
9780
|
-
setColor(palette.LinearProgress, 'successBg',
|
|
9781
|
-
setColor(palette.LinearProgress, 'warningBg',
|
|
9863
|
+
setColor(palette.LinearProgress, 'primaryBg', private_safeLighten(palette.primary.main, 0.62));
|
|
9864
|
+
setColor(palette.LinearProgress, 'secondaryBg', private_safeLighten(palette.secondary.main, 0.62));
|
|
9865
|
+
setColor(palette.LinearProgress, 'errorBg', private_safeLighten(palette.error.main, 0.62));
|
|
9866
|
+
setColor(palette.LinearProgress, 'infoBg', private_safeLighten(palette.info.main, 0.62));
|
|
9867
|
+
setColor(palette.LinearProgress, 'successBg', private_safeLighten(palette.success.main, 0.62));
|
|
9868
|
+
setColor(palette.LinearProgress, 'warningBg', private_safeLighten(palette.warning.main, 0.62));
|
|
9782
9869
|
setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.11)`);
|
|
9783
|
-
setColor(palette.Slider, 'primaryTrack',
|
|
9784
|
-
setColor(palette.Slider, 'secondaryTrack',
|
|
9785
|
-
setColor(palette.Slider, 'errorTrack',
|
|
9786
|
-
setColor(palette.Slider, 'infoTrack',
|
|
9787
|
-
setColor(palette.Slider, 'successTrack',
|
|
9788
|
-
setColor(palette.Slider, 'warningTrack',
|
|
9789
|
-
const snackbarContentBackground =
|
|
9870
|
+
setColor(palette.Slider, 'primaryTrack', private_safeLighten(palette.primary.main, 0.62));
|
|
9871
|
+
setColor(palette.Slider, 'secondaryTrack', private_safeLighten(palette.secondary.main, 0.62));
|
|
9872
|
+
setColor(palette.Slider, 'errorTrack', private_safeLighten(palette.error.main, 0.62));
|
|
9873
|
+
setColor(palette.Slider, 'infoTrack', private_safeLighten(palette.info.main, 0.62));
|
|
9874
|
+
setColor(palette.Slider, 'successTrack', private_safeLighten(palette.success.main, 0.62));
|
|
9875
|
+
setColor(palette.Slider, 'warningTrack', private_safeLighten(palette.warning.main, 0.62));
|
|
9876
|
+
const snackbarContentBackground = private_safeEmphasize(palette.background.default, 0.8);
|
|
9790
9877
|
setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
|
|
9791
|
-
setColor(palette.SnackbarContent, 'color', lightPalette.getContrastText(snackbarContentBackground));
|
|
9792
|
-
setColor(palette.SpeedDialAction, 'fabHoverBg',
|
|
9878
|
+
setColor(palette.SnackbarContent, 'color', silent(() => lightPalette.getContrastText(snackbarContentBackground)));
|
|
9879
|
+
setColor(palette.SpeedDialAction, 'fabHoverBg', private_safeEmphasize(palette.background.paper, 0.15));
|
|
9793
9880
|
setColor(palette.StepConnector, 'border', getCssVar('palette-grey-400'));
|
|
9794
9881
|
setColor(palette.StepContent, 'border', getCssVar('palette-grey-400'));
|
|
9795
9882
|
setColor(palette.Switch, 'defaultColor', getCssVar('palette-common-white'));
|
|
9796
9883
|
setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-100'));
|
|
9797
|
-
setColor(palette.Switch, 'primaryDisabledColor',
|
|
9798
|
-
setColor(palette.Switch, 'secondaryDisabledColor',
|
|
9799
|
-
setColor(palette.Switch, 'errorDisabledColor',
|
|
9800
|
-
setColor(palette.Switch, 'infoDisabledColor',
|
|
9801
|
-
setColor(palette.Switch, 'successDisabledColor',
|
|
9802
|
-
setColor(palette.Switch, 'warningDisabledColor',
|
|
9803
|
-
setColor(palette.TableCell, 'border',
|
|
9804
|
-
setColor(palette.Tooltip, 'bg',
|
|
9884
|
+
setColor(palette.Switch, 'primaryDisabledColor', private_safeLighten(palette.primary.main, 0.62));
|
|
9885
|
+
setColor(palette.Switch, 'secondaryDisabledColor', private_safeLighten(palette.secondary.main, 0.62));
|
|
9886
|
+
setColor(palette.Switch, 'errorDisabledColor', private_safeLighten(palette.error.main, 0.62));
|
|
9887
|
+
setColor(palette.Switch, 'infoDisabledColor', private_safeLighten(palette.info.main, 0.62));
|
|
9888
|
+
setColor(palette.Switch, 'successDisabledColor', private_safeLighten(palette.success.main, 0.62));
|
|
9889
|
+
setColor(palette.Switch, 'warningDisabledColor', private_safeLighten(palette.warning.main, 0.62));
|
|
9890
|
+
setColor(palette.TableCell, 'border', private_safeLighten(private_safeAlpha(palette.divider, 1), 0.88));
|
|
9891
|
+
setColor(palette.Tooltip, 'bg', private_safeAlpha(palette.grey[700], 0.92));
|
|
9805
9892
|
} else {
|
|
9806
|
-
setColor(palette.Alert, 'errorColor',
|
|
9807
|
-
setColor(palette.Alert, 'infoColor',
|
|
9808
|
-
setColor(palette.Alert, 'successColor',
|
|
9809
|
-
setColor(palette.Alert, 'warningColor',
|
|
9893
|
+
setColor(palette.Alert, 'errorColor', private_safeLighten(palette.error.light, 0.6));
|
|
9894
|
+
setColor(palette.Alert, 'infoColor', private_safeLighten(palette.info.light, 0.6));
|
|
9895
|
+
setColor(palette.Alert, 'successColor', private_safeLighten(palette.success.light, 0.6));
|
|
9896
|
+
setColor(palette.Alert, 'warningColor', private_safeLighten(palette.warning.light, 0.6));
|
|
9810
9897
|
setColor(palette.Alert, 'errorFilledBg', getCssVar('palette-error-dark'));
|
|
9811
9898
|
setColor(palette.Alert, 'infoFilledBg', getCssVar('palette-info-dark'));
|
|
9812
9899
|
setColor(palette.Alert, 'successFilledBg', getCssVar('palette-success-dark'));
|
|
9813
9900
|
setColor(palette.Alert, 'warningFilledBg', getCssVar('palette-warning-dark'));
|
|
9814
|
-
setColor(palette.Alert, 'errorFilledColor', darkPalette.getContrastText(palette.error.dark));
|
|
9815
|
-
setColor(palette.Alert, 'infoFilledColor', darkPalette.getContrastText(palette.info.dark));
|
|
9816
|
-
setColor(palette.Alert, 'successFilledColor', darkPalette.getContrastText(palette.success.dark));
|
|
9817
|
-
setColor(palette.Alert, 'warningFilledColor', darkPalette.getContrastText(palette.warning.dark));
|
|
9818
|
-
setColor(palette.Alert, 'errorStandardBg',
|
|
9819
|
-
setColor(palette.Alert, 'infoStandardBg',
|
|
9820
|
-
setColor(palette.Alert, 'successStandardBg',
|
|
9821
|
-
setColor(palette.Alert, 'warningStandardBg',
|
|
9901
|
+
setColor(palette.Alert, 'errorFilledColor', silent(() => darkPalette.getContrastText(palette.error.dark)));
|
|
9902
|
+
setColor(palette.Alert, 'infoFilledColor', silent(() => darkPalette.getContrastText(palette.info.dark)));
|
|
9903
|
+
setColor(palette.Alert, 'successFilledColor', silent(() => darkPalette.getContrastText(palette.success.dark)));
|
|
9904
|
+
setColor(palette.Alert, 'warningFilledColor', silent(() => darkPalette.getContrastText(palette.warning.dark)));
|
|
9905
|
+
setColor(palette.Alert, 'errorStandardBg', private_safeDarken(palette.error.light, 0.9));
|
|
9906
|
+
setColor(palette.Alert, 'infoStandardBg', private_safeDarken(palette.info.light, 0.9));
|
|
9907
|
+
setColor(palette.Alert, 'successStandardBg', private_safeDarken(palette.success.light, 0.9));
|
|
9908
|
+
setColor(palette.Alert, 'warningStandardBg', private_safeDarken(palette.warning.light, 0.9));
|
|
9822
9909
|
setColor(palette.Alert, 'errorIconColor', getCssVar('palette-error-main'));
|
|
9823
9910
|
setColor(palette.Alert, 'infoIconColor', getCssVar('palette-info-main'));
|
|
9824
9911
|
setColor(palette.Alert, 'successIconColor', getCssVar('palette-success-main'));
|
|
@@ -9833,72 +9920,74 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
9833
9920
|
setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
|
|
9834
9921
|
setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
|
|
9835
9922
|
setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
|
|
9836
|
-
setColor(palette.LinearProgress, 'primaryBg',
|
|
9837
|
-
setColor(palette.LinearProgress, 'secondaryBg',
|
|
9838
|
-
setColor(palette.LinearProgress, 'errorBg',
|
|
9839
|
-
setColor(palette.LinearProgress, 'infoBg',
|
|
9840
|
-
setColor(palette.LinearProgress, 'successBg',
|
|
9841
|
-
setColor(palette.LinearProgress, 'warningBg',
|
|
9923
|
+
setColor(palette.LinearProgress, 'primaryBg', private_safeDarken(palette.primary.main, 0.5));
|
|
9924
|
+
setColor(palette.LinearProgress, 'secondaryBg', private_safeDarken(palette.secondary.main, 0.5));
|
|
9925
|
+
setColor(palette.LinearProgress, 'errorBg', private_safeDarken(palette.error.main, 0.5));
|
|
9926
|
+
setColor(palette.LinearProgress, 'infoBg', private_safeDarken(palette.info.main, 0.5));
|
|
9927
|
+
setColor(palette.LinearProgress, 'successBg', private_safeDarken(palette.success.main, 0.5));
|
|
9928
|
+
setColor(palette.LinearProgress, 'warningBg', private_safeDarken(palette.warning.main, 0.5));
|
|
9842
9929
|
setColor(palette.Skeleton, 'bg', `rgba(${getCssVar('palette-text-primaryChannel')} / 0.13)`);
|
|
9843
|
-
setColor(palette.Slider, 'primaryTrack',
|
|
9844
|
-
setColor(palette.Slider, 'secondaryTrack',
|
|
9845
|
-
setColor(palette.Slider, 'errorTrack',
|
|
9846
|
-
setColor(palette.Slider, 'infoTrack',
|
|
9847
|
-
setColor(palette.Slider, 'successTrack',
|
|
9848
|
-
setColor(palette.Slider, 'warningTrack',
|
|
9849
|
-
const snackbarContentBackground =
|
|
9930
|
+
setColor(palette.Slider, 'primaryTrack', private_safeDarken(palette.primary.main, 0.5));
|
|
9931
|
+
setColor(palette.Slider, 'secondaryTrack', private_safeDarken(palette.secondary.main, 0.5));
|
|
9932
|
+
setColor(palette.Slider, 'errorTrack', private_safeDarken(palette.error.main, 0.5));
|
|
9933
|
+
setColor(palette.Slider, 'infoTrack', private_safeDarken(palette.info.main, 0.5));
|
|
9934
|
+
setColor(palette.Slider, 'successTrack', private_safeDarken(palette.success.main, 0.5));
|
|
9935
|
+
setColor(palette.Slider, 'warningTrack', private_safeDarken(palette.warning.main, 0.5));
|
|
9936
|
+
const snackbarContentBackground = private_safeEmphasize(palette.background.default, 0.98);
|
|
9850
9937
|
setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
|
|
9851
|
-
setColor(palette.SnackbarContent, 'color', darkPalette.getContrastText(snackbarContentBackground));
|
|
9852
|
-
setColor(palette.SpeedDialAction, 'fabHoverBg',
|
|
9938
|
+
setColor(palette.SnackbarContent, 'color', silent(() => darkPalette.getContrastText(snackbarContentBackground)));
|
|
9939
|
+
setColor(palette.SpeedDialAction, 'fabHoverBg', private_safeEmphasize(palette.background.paper, 0.15));
|
|
9853
9940
|
setColor(palette.StepConnector, 'border', getCssVar('palette-grey-600'));
|
|
9854
9941
|
setColor(palette.StepContent, 'border', getCssVar('palette-grey-600'));
|
|
9855
9942
|
setColor(palette.Switch, 'defaultColor', getCssVar('palette-grey-300'));
|
|
9856
9943
|
setColor(palette.Switch, 'defaultDisabledColor', getCssVar('palette-grey-600'));
|
|
9857
|
-
setColor(palette.Switch, 'primaryDisabledColor',
|
|
9858
|
-
setColor(palette.Switch, 'secondaryDisabledColor',
|
|
9859
|
-
setColor(palette.Switch, 'errorDisabledColor',
|
|
9860
|
-
setColor(palette.Switch, 'infoDisabledColor',
|
|
9861
|
-
setColor(palette.Switch, 'successDisabledColor',
|
|
9862
|
-
setColor(palette.Switch, 'warningDisabledColor',
|
|
9863
|
-
setColor(palette.TableCell, 'border',
|
|
9864
|
-
setColor(palette.Tooltip, 'bg',
|
|
9865
|
-
}
|
|
9866
|
-
palette.background
|
|
9867
|
-
|
|
9868
|
-
palette.common
|
|
9869
|
-
palette.common
|
|
9870
|
-
palette
|
|
9944
|
+
setColor(palette.Switch, 'primaryDisabledColor', private_safeDarken(palette.primary.main, 0.55));
|
|
9945
|
+
setColor(palette.Switch, 'secondaryDisabledColor', private_safeDarken(palette.secondary.main, 0.55));
|
|
9946
|
+
setColor(palette.Switch, 'errorDisabledColor', private_safeDarken(palette.error.main, 0.55));
|
|
9947
|
+
setColor(palette.Switch, 'infoDisabledColor', private_safeDarken(palette.info.main, 0.55));
|
|
9948
|
+
setColor(palette.Switch, 'successDisabledColor', private_safeDarken(palette.success.main, 0.55));
|
|
9949
|
+
setColor(palette.Switch, 'warningDisabledColor', private_safeDarken(palette.warning.main, 0.55));
|
|
9950
|
+
setColor(palette.TableCell, 'border', private_safeDarken(private_safeAlpha(palette.divider, 1), 0.68));
|
|
9951
|
+
setColor(palette.Tooltip, 'bg', private_safeAlpha(palette.grey[700], 0.92));
|
|
9952
|
+
}
|
|
9953
|
+
setColor(palette.background, 'defaultChannel', private_safeColorChannel(palette.background.default, 'MUI: The value of `palette.background.default` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().')); // MUI X - DataGrid needs this token.
|
|
9954
|
+
|
|
9955
|
+
setColor(palette.common, 'backgroundChannel', private_safeColorChannel(palette.common.background, 'MUI: The value of `palette.common.background` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
|
|
9956
|
+
setColor(palette.common, 'onBackgroundChannel', private_safeColorChannel(palette.common.onBackground, 'MUI: The value of `palette.common.onBackground` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
|
|
9957
|
+
setColor(palette, 'dividerChannel', private_safeColorChannel(palette.divider, 'MUI: The value of `palette.divider` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
|
|
9871
9958
|
Object.keys(palette).forEach(color => {
|
|
9872
9959
|
const colors = palette[color];
|
|
9873
9960
|
|
|
9874
|
-
//
|
|
9875
|
-
if (colors.main) {
|
|
9876
|
-
palette[color].mainChannel = colorChannel(colors.main);
|
|
9877
|
-
}
|
|
9878
|
-
if (colors.light) {
|
|
9879
|
-
palette[color].lightChannel = colorChannel(colors.light);
|
|
9880
|
-
}
|
|
9881
|
-
if (colors.dark) {
|
|
9882
|
-
palette[color].darkChannel = colorChannel(colors.dark);
|
|
9883
|
-
}
|
|
9884
|
-
if (colors.contrastText) {
|
|
9885
|
-
palette[color].contrastTextChannel = colorChannel(colors.contrastText);
|
|
9886
|
-
}
|
|
9887
|
-
|
|
9888
|
-
// Text colors: text.primary, text.secondary
|
|
9889
|
-
if (colors.primary) {
|
|
9890
|
-
palette[color].primaryChannel = colorChannel(colors.primary);
|
|
9891
|
-
}
|
|
9892
|
-
if (colors.secondary) {
|
|
9893
|
-
palette[color].secondaryChannel = colorChannel(colors.secondary);
|
|
9894
|
-
}
|
|
9961
|
+
// The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.
|
|
9895
9962
|
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9963
|
+
if (colors && typeof colors === 'object') {
|
|
9964
|
+
// Silent the error for custom palettes.
|
|
9965
|
+
if (colors.main) {
|
|
9966
|
+
setColor(palette[color], 'mainChannel', private_safeColorChannel(colors.main));
|
|
9967
|
+
}
|
|
9968
|
+
if (colors.light) {
|
|
9969
|
+
setColor(palette[color], 'lightChannel', private_safeColorChannel(colors.light));
|
|
9970
|
+
}
|
|
9971
|
+
if (colors.dark) {
|
|
9972
|
+
setColor(palette[color], 'darkChannel', private_safeColorChannel(colors.dark));
|
|
9973
|
+
}
|
|
9974
|
+
if (colors.contrastText) {
|
|
9975
|
+
setColor(palette[color], 'contrastTextChannel', private_safeColorChannel(colors.contrastText));
|
|
9976
|
+
}
|
|
9977
|
+
if (color === 'text') {
|
|
9978
|
+
// Text colors: text.primary, text.secondary
|
|
9979
|
+
setColor(palette[color], 'primaryChannel', private_safeColorChannel(colors.primary, 'MUI: The value of `palette.text.primary` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
|
|
9980
|
+
setColor(palette[color], 'secondaryChannel', private_safeColorChannel(colors.secondary, 'MUI: The value of `palette.text.secondary` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
|
|
9981
|
+
}
|
|
9982
|
+
if (color === 'action') {
|
|
9983
|
+
// Action colors: action.active, action.selected
|
|
9984
|
+
if (colors.active) {
|
|
9985
|
+
setColor(palette[color], 'activeChannel', private_safeColorChannel(colors.active, 'MUI: The value of `palette.action.active` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
|
|
9986
|
+
}
|
|
9987
|
+
if (colors.selected) {
|
|
9988
|
+
setColor(palette[color], 'selectedChannel', private_safeColorChannel(colors.selected, 'MUI: The value of `palette.action.selected` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
|
|
9989
|
+
}
|
|
9990
|
+
}
|
|
9902
9991
|
}
|
|
9903
9992
|
});
|
|
9904
9993
|
});
|
|
@@ -9956,12 +10045,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
9956
10045
|
/**
|
|
9957
10046
|
* Appends the ownerState object to the props, merging with the existing one if necessary.
|
|
9958
10047
|
*
|
|
9959
|
-
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node, `ownerState` is not applied.
|
|
10048
|
+
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
|
|
9960
10049
|
* @param otherProps Props of the element.
|
|
9961
10050
|
* @param ownerState
|
|
9962
10051
|
*/
|
|
9963
10052
|
function appendOwnerState(elementType, otherProps, ownerState) {
|
|
9964
|
-
if (isHostComponent(elementType)) {
|
|
10053
|
+
if (elementType === undefined || isHostComponent(elementType)) {
|
|
9965
10054
|
return otherProps;
|
|
9966
10055
|
}
|
|
9967
10056
|
return _extends({}, otherProps, {
|
|
@@ -14342,7 +14431,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
14342
14431
|
slots = {}
|
|
14343
14432
|
} = props,
|
|
14344
14433
|
other = _objectWithoutPropertiesLoose(props, _excluded$26);
|
|
14345
|
-
const [exited, setExited] = React__namespace.useState(
|
|
14434
|
+
const [exited, setExited] = React__namespace.useState(!open);
|
|
14346
14435
|
const modal = React__namespace.useRef({});
|
|
14347
14436
|
const mountNodeRef = React__namespace.useRef(null);
|
|
14348
14437
|
const modalRef = React__namespace.useRef(null);
|
|
@@ -16223,7 +16312,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16223
16312
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
16224
16313
|
const unstable_ClassNameGenerator = {
|
|
16225
16314
|
configure: generator => {
|
|
16226
|
-
|
|
16315
|
+
{
|
|
16316
|
+
console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\n'));
|
|
16317
|
+
}
|
|
16227
16318
|
ClassNameGenerator$1.configure(generator);
|
|
16228
16319
|
}
|
|
16229
16320
|
};
|
|
@@ -19213,7 +19304,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
19213
19304
|
function getIconButtonUtilityClass(slot) {
|
|
19214
19305
|
return generateUtilityClass('MuiIconButton', slot);
|
|
19215
19306
|
}
|
|
19216
|
-
const iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
|
|
19307
|
+
const iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
|
|
19217
19308
|
var iconButtonClasses$1 = iconButtonClasses;
|
|
19218
19309
|
|
|
19219
19310
|
const _excluded$1W = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"];
|
|
@@ -20473,7 +20564,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20473
20564
|
const chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
|
20474
20565
|
var chipClasses$1 = chipClasses;
|
|
20475
20566
|
|
|
20476
|
-
const _excluded$1P = ["avatar", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant"];
|
|
20567
|
+
const _excluded$1P = ["avatar", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant", "tabIndex", "skipFocusWhenDisabled"];
|
|
20477
20568
|
const useUtilityClasses$1x = ownerState => {
|
|
20478
20569
|
const {
|
|
20479
20570
|
classes,
|
|
@@ -20750,7 +20841,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20750
20841
|
onKeyDown,
|
|
20751
20842
|
onKeyUp,
|
|
20752
20843
|
size = 'medium',
|
|
20753
|
-
variant = 'filled'
|
|
20844
|
+
variant = 'filled',
|
|
20845
|
+
tabIndex,
|
|
20846
|
+
skipFocusWhenDisabled = false
|
|
20754
20847
|
} = props,
|
|
20755
20848
|
other = _objectWithoutPropertiesLoose(props, _excluded$1P);
|
|
20756
20849
|
const chipRef = React__namespace.useRef(null);
|
|
@@ -20840,6 +20933,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20840
20933
|
onKeyDown: handleKeyDown,
|
|
20841
20934
|
onKeyUp: handleKeyUp,
|
|
20842
20935
|
ref: handleRef,
|
|
20936
|
+
tabIndex: skipFocusWhenDisabled && disabled ? -1 : tabIndex,
|
|
20843
20937
|
ownerState: ownerState
|
|
20844
20938
|
}, moreProps, other, {
|
|
20845
20939
|
children: [avatar || icon, /*#__PURE__*/jsxRuntime_1(ChipLabel, {
|
|
@@ -20931,10 +21025,20 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20931
21025
|
* @default 'medium'
|
|
20932
21026
|
*/
|
|
20933
21027
|
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
|
|
21028
|
+
/**
|
|
21029
|
+
* If `true`, allows the disabled chip to escape focus.
|
|
21030
|
+
* If `false`, allows the disabled chip to receive focus.
|
|
21031
|
+
* @default false
|
|
21032
|
+
*/
|
|
21033
|
+
skipFocusWhenDisabled: PropTypes.bool,
|
|
20934
21034
|
/**
|
|
20935
21035
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
20936
21036
|
*/
|
|
20937
21037
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
21038
|
+
/**
|
|
21039
|
+
* @ignore
|
|
21040
|
+
*/
|
|
21041
|
+
tabIndex: PropTypes.number,
|
|
20938
21042
|
/**
|
|
20939
21043
|
* The variant to use.
|
|
20940
21044
|
* @default 'filled'
|
|
@@ -20962,7 +21066,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20962
21066
|
/**
|
|
20963
21067
|
* @ignore - internal component.
|
|
20964
21068
|
*/
|
|
20965
|
-
const FormControlContext = /*#__PURE__*/React__namespace.createContext();
|
|
21069
|
+
const FormControlContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
20966
21070
|
{
|
|
20967
21071
|
FormControlContext.displayName = 'FormControlContext';
|
|
20968
21072
|
}
|
|
@@ -28599,11 +28703,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28599
28703
|
},
|
|
28600
28704
|
[`&.${fabClasses$1.focusVisible}`]: {
|
|
28601
28705
|
boxShadow: (theme.vars || theme).shadows[6]
|
|
28602
|
-
},
|
|
28603
|
-
[`&.${fabClasses$1.disabled}`]: {
|
|
28604
|
-
color: (theme.vars || theme).palette.action.disabled,
|
|
28605
|
-
boxShadow: (theme.vars || theme).shadows[0],
|
|
28606
|
-
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
28607
28706
|
}
|
|
28608
28707
|
}, ownerState.size === 'small' && {
|
|
28609
28708
|
width: 40,
|
|
@@ -28646,6 +28745,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28646
28745
|
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
28647
28746
|
}
|
|
28648
28747
|
}
|
|
28748
|
+
}), ({
|
|
28749
|
+
theme
|
|
28750
|
+
}) => ({
|
|
28751
|
+
[`&.${fabClasses$1.disabled}`]: {
|
|
28752
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
28753
|
+
boxShadow: (theme.vars || theme).shadows[0],
|
|
28754
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
28755
|
+
}
|
|
28649
28756
|
}));
|
|
28650
28757
|
const Fab = /*#__PURE__*/React__namespace.forwardRef(function Fab(inProps, ref) {
|
|
28651
28758
|
const props = useThemeProps({
|
|
@@ -38050,7 +38157,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
38050
38157
|
const RatingLabel = styled$1('label', {
|
|
38051
38158
|
name: 'MuiRating',
|
|
38052
38159
|
slot: 'Label',
|
|
38053
|
-
overridesResolver: (
|
|
38160
|
+
overridesResolver: ({
|
|
38161
|
+
ownerState
|
|
38162
|
+
}, styles) => [styles.label, ownerState.emptyValueFocused && styles.labelEmptyValueActive]
|
|
38054
38163
|
})(({
|
|
38055
38164
|
ownerState
|
|
38056
38165
|
}) => _extends({
|
|
@@ -40109,7 +40218,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
40109
40218
|
name: 'MuiSlider',
|
|
40110
40219
|
slot: 'Mark',
|
|
40111
40220
|
shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markActive',
|
|
40112
|
-
overridesResolver: (props, styles) =>
|
|
40221
|
+
overridesResolver: (props, styles) => {
|
|
40222
|
+
const {
|
|
40223
|
+
markActive
|
|
40224
|
+
} = props;
|
|
40225
|
+
return [styles.mark, markActive && styles.markActive];
|
|
40226
|
+
}
|
|
40113
40227
|
})(({
|
|
40114
40228
|
theme,
|
|
40115
40229
|
ownerState,
|
|
@@ -44344,6 +44458,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44344
44458
|
const swipeAreaRef = React__namespace.useRef();
|
|
44345
44459
|
const backdropRef = React__namespace.useRef();
|
|
44346
44460
|
const paperRef = React__namespace.useRef();
|
|
44461
|
+
const handleRef = useForkRef(PaperProps.ref, paperRef);
|
|
44347
44462
|
const touchDetected = React__namespace.useRef(false);
|
|
44348
44463
|
|
|
44349
44464
|
// Ref for transition duration based on / to match swipe speed
|
|
@@ -44638,7 +44753,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44638
44753
|
style: _extends({
|
|
44639
44754
|
pointerEvents: variant === 'temporary' && !open ? 'none' : ''
|
|
44640
44755
|
}, PaperProps.style),
|
|
44641
|
-
ref:
|
|
44756
|
+
ref: handleRef
|
|
44642
44757
|
}),
|
|
44643
44758
|
anchor: anchor,
|
|
44644
44759
|
transitionDuration: calculatedDurationRef.current || transitionDuration,
|