@mui/material 5.10.8 → 5.10.9
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 +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/ButtonBase.js +1 -2
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +117 -0
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/CssBaseline/CssBaseline.js +15 -3
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/Fade/Fade.js +1 -2
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Grow/Grow.js +1 -2
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.js +1 -3
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/OverridableComponentAugmentation.d.ts +31 -31
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +24 -24
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/Rating.js +1 -2
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/ScopedCssBaseline.js +13 -1
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slide/Slide.js +1 -2
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.js +1 -3
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/Unstable_TrapFocus/index.d.ts +1 -1
- package/Zoom/Zoom.js +1 -2
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/esm/BottomNavigation/BottomNavigation.js +0 -0
- 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/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/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- 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/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/locale/index.d.ts +72 -72
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- 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/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/package.json +5 -5
- package/styles/CssVarsProvider.d.ts +14 -14
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/experimental_extendTheme.d.ts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +109 -82
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.10.
|
|
1
|
+
/** @license MUI v5.10.9
|
|
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
|
|
@@ -7769,7 +7770,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7769
7770
|
const DEFAULT_ATTRIBUTE = 'data-color-scheme';
|
|
7770
7771
|
function getInitColorSchemeScript$1(options) {
|
|
7771
7772
|
const {
|
|
7772
|
-
enableColorScheme = true,
|
|
7773
7773
|
defaultMode = 'light',
|
|
7774
7774
|
defaultLightColorScheme = 'light',
|
|
7775
7775
|
defaultDarkColorScheme = 'dark',
|
|
@@ -7805,9 +7805,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7805
7805
|
if (colorScheme) {
|
|
7806
7806
|
${colorSchemeNode}.setAttribute('${attribute}', colorScheme);
|
|
7807
7807
|
}
|
|
7808
|
-
if (${enableColorScheme} && !!cssColorScheme) {
|
|
7809
|
-
${colorSchemeNode}.style.setProperty('color-scheme', cssColorScheme);
|
|
7810
|
-
}
|
|
7811
7808
|
} catch (e) {} })();`
|
|
7812
7809
|
}
|
|
7813
7810
|
});
|
|
@@ -8059,10 +8056,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8059
8056
|
attribute: defaultAttribute = DEFAULT_ATTRIBUTE,
|
|
8060
8057
|
modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
|
8061
8058
|
colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,
|
|
8062
|
-
defaultMode:
|
|
8059
|
+
defaultMode: designSystemMode = 'light',
|
|
8063
8060
|
defaultColorScheme: designSystemColorScheme,
|
|
8064
8061
|
disableTransitionOnChange: designSystemTransitionOnChange = false,
|
|
8065
|
-
enableColorScheme: designSystemEnableColorScheme = true,
|
|
8066
8062
|
shouldSkipGeneratingVar: designSystemShouldSkipGeneratingVar,
|
|
8067
8063
|
resolveTheme,
|
|
8068
8064
|
excludeVariablesFromRoot
|
|
@@ -8090,10 +8086,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8090
8086
|
modeStorageKey = defaultModeStorageKey,
|
|
8091
8087
|
colorSchemeStorageKey = defaultColorSchemeStorageKey,
|
|
8092
8088
|
attribute = defaultAttribute,
|
|
8093
|
-
defaultMode =
|
|
8089
|
+
defaultMode = designSystemMode,
|
|
8094
8090
|
defaultColorScheme = designSystemColorScheme,
|
|
8095
8091
|
disableTransitionOnChange = designSystemTransitionOnChange,
|
|
8096
|
-
enableColorScheme = designSystemEnableColorScheme,
|
|
8097
8092
|
storageWindow = typeof window === 'undefined' ? undefined : window,
|
|
8098
8093
|
documentNode = typeof document === 'undefined' ? undefined : document,
|
|
8099
8094
|
colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
|
|
@@ -8111,7 +8106,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8111
8106
|
|
|
8112
8107
|
const allColorSchemes = Object.keys(colorSchemes);
|
|
8113
8108
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
8114
|
-
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
8109
|
+
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark; // 1. Get the data about the `mode`, `colorScheme`, and setter functions.
|
|
8110
|
+
|
|
8115
8111
|
const {
|
|
8116
8112
|
mode,
|
|
8117
8113
|
setMode,
|
|
@@ -8130,36 +8126,54 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8130
8126
|
storageWindow
|
|
8131
8127
|
});
|
|
8132
8128
|
|
|
8133
|
-
const
|
|
8129
|
+
const calculatedMode = (() => {
|
|
8130
|
+
if (!mode) {
|
|
8131
|
+
// This scope occurs on the server
|
|
8132
|
+
if (defaultMode === 'system') {
|
|
8133
|
+
return designSystemMode;
|
|
8134
|
+
}
|
|
8135
|
+
|
|
8136
|
+
return defaultMode;
|
|
8137
|
+
}
|
|
8138
|
+
|
|
8139
|
+
return mode;
|
|
8140
|
+
})();
|
|
8141
|
+
|
|
8142
|
+
const calculatedColorScheme = (() => {
|
|
8134
8143
|
if (!colorScheme) {
|
|
8135
8144
|
// This scope occurs on the server
|
|
8136
|
-
if (
|
|
8145
|
+
if (calculatedMode === 'dark') {
|
|
8137
8146
|
return defaultDarkColorScheme;
|
|
8138
|
-
} // use light color scheme, if default mode is 'light' | '
|
|
8147
|
+
} // use light color scheme, if default mode is 'light' | 'system'
|
|
8139
8148
|
|
|
8140
8149
|
|
|
8141
8150
|
return defaultLightColorScheme;
|
|
8142
8151
|
}
|
|
8143
8152
|
|
|
8144
8153
|
return colorScheme;
|
|
8145
|
-
})();
|
|
8154
|
+
})(); // 2. Create CSS variables and store them in objects (to be generated in stylesheets in the final step)
|
|
8155
|
+
|
|
8146
8156
|
|
|
8147
|
-
let theme = restThemeProp;
|
|
8148
8157
|
const {
|
|
8149
8158
|
css: rootCss,
|
|
8150
8159
|
vars: rootVars,
|
|
8151
8160
|
parsedTheme
|
|
8152
|
-
} = cssVarsParser(
|
|
8161
|
+
} = cssVarsParser(restThemeProp, {
|
|
8153
8162
|
prefix: cssVarPrefix,
|
|
8154
8163
|
shouldSkipGeneratingVar
|
|
8155
|
-
});
|
|
8156
|
-
|
|
8164
|
+
}); // 3. Start composing the theme object
|
|
8165
|
+
|
|
8166
|
+
let theme = _extends({}, parsedTheme, {
|
|
8157
8167
|
components,
|
|
8158
8168
|
colorSchemes,
|
|
8159
8169
|
cssVarPrefix,
|
|
8160
8170
|
vars: rootVars,
|
|
8161
8171
|
getColorSchemeSelector: targetColorScheme => `[${attribute}="${targetColorScheme}"] &`
|
|
8162
|
-
});
|
|
8172
|
+
}); // 4. Create color CSS variables and store them in objects (to be generated in stylesheets in the final step)
|
|
8173
|
+
// The default color scheme stylesheet is constructed to have the least CSS specificity.
|
|
8174
|
+
// 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.
|
|
8175
|
+
|
|
8176
|
+
|
|
8163
8177
|
const defaultColorSchemeStyleSheet = {};
|
|
8164
8178
|
const otherColorSchemesStyleSheet = {};
|
|
8165
8179
|
Object.entries(colorSchemes).forEach(([key, scheme]) => {
|
|
@@ -8173,13 +8187,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8173
8187
|
});
|
|
8174
8188
|
theme.vars = deepmerge(theme.vars, vars);
|
|
8175
8189
|
|
|
8176
|
-
if (key ===
|
|
8190
|
+
if (key === calculatedColorScheme) {
|
|
8191
|
+
// 4.1 Merge the selected color scheme to the theme
|
|
8177
8192
|
theme = _extends({}, theme, parsedScheme);
|
|
8178
8193
|
|
|
8179
8194
|
if (theme.palette) {
|
|
8180
|
-
|
|
8181
|
-
theme.palette.mode = mode;
|
|
8182
|
-
theme.palette.colorScheme = resolvedColorScheme;
|
|
8195
|
+
theme.palette.colorScheme = key;
|
|
8183
8196
|
}
|
|
8184
8197
|
}
|
|
8185
8198
|
|
|
@@ -8209,35 +8222,21 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8209
8222
|
} else {
|
|
8210
8223
|
otherColorSchemesStyleSheet[`${colorSchemeSelector === ':root' ? '' : colorSchemeSelector}[${attribute}="${key}"]`] = css;
|
|
8211
8224
|
}
|
|
8212
|
-
});
|
|
8225
|
+
}); // 5. Declaring effects
|
|
8226
|
+
// 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.
|
|
8227
|
+
|
|
8213
8228
|
React__namespace.useEffect(() => {
|
|
8214
8229
|
if (colorScheme && colorSchemeNode) {
|
|
8215
8230
|
// attaches attribute to <html> because the css variables are attached to :root (html)
|
|
8216
8231
|
colorSchemeNode.setAttribute(attribute, colorScheme);
|
|
8217
8232
|
}
|
|
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
|
-
}
|
|
8233
|
+
}, [colorScheme, attribute, colorSchemeNode]); // 5.2 Remove the CSS transition when color scheme changes to create instant experience.
|
|
8234
|
+
// credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313
|
|
8231
8235
|
|
|
8232
|
-
return () => {
|
|
8233
|
-
colorSchemeNode.style.setProperty('color-scheme', priorColorScheme);
|
|
8234
|
-
};
|
|
8235
|
-
}, [mode, systemMode, enableColorScheme, colorSchemeNode]);
|
|
8236
8236
|
React__namespace.useEffect(() => {
|
|
8237
8237
|
let timer;
|
|
8238
8238
|
|
|
8239
8239
|
if (disableTransitionOnChange && hasMounted.current && documentNode) {
|
|
8240
|
-
// credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313
|
|
8241
8240
|
const css = documentNode.createElement('style');
|
|
8242
8241
|
css.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION));
|
|
8243
8242
|
documentNode.head.appendChild(css); // Force browser repaint
|
|
@@ -8262,6 +8261,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8262
8261
|
return /*#__PURE__*/jsxRuntime_2(ColorSchemeContext.Provider, {
|
|
8263
8262
|
value: {
|
|
8264
8263
|
mode,
|
|
8264
|
+
systemMode,
|
|
8265
8265
|
setMode,
|
|
8266
8266
|
lightColorScheme,
|
|
8267
8267
|
darkColorScheme,
|
|
@@ -8330,11 +8330,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8330
8330
|
*/
|
|
8331
8331
|
documentNode: PropTypes.any,
|
|
8332
8332
|
|
|
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
8333
|
/**
|
|
8339
8334
|
* The key in the local storage used to store current color scheme.
|
|
8340
8335
|
*/
|
|
@@ -8356,12 +8351,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8356
8351
|
*/
|
|
8357
8352
|
theme: PropTypes.object
|
|
8358
8353
|
} ;
|
|
8354
|
+
const defaultLightColorScheme = typeof designSystemColorScheme === 'string' ? designSystemColorScheme : designSystemColorScheme.light;
|
|
8355
|
+
const defaultDarkColorScheme = typeof designSystemColorScheme === 'string' ? designSystemColorScheme : designSystemColorScheme.dark;
|
|
8359
8356
|
|
|
8360
8357
|
const getInitColorSchemeScript = params => getInitColorSchemeScript$1(_extends({
|
|
8361
8358
|
attribute: defaultAttribute,
|
|
8362
8359
|
colorSchemeStorageKey: defaultColorSchemeStorageKey,
|
|
8363
|
-
|
|
8364
|
-
|
|
8360
|
+
defaultMode: designSystemMode,
|
|
8361
|
+
defaultLightColorScheme,
|
|
8362
|
+
defaultDarkColorScheme,
|
|
8363
|
+
modeStorageKey: defaultModeStorageKey
|
|
8365
8364
|
}, params));
|
|
8366
8365
|
|
|
8367
8366
|
return {
|
|
@@ -8775,6 +8774,17 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8775
8774
|
|
|
8776
8775
|
return [];
|
|
8777
8776
|
};
|
|
8777
|
+
const generateDirectionClasses = direction => {
|
|
8778
|
+
if (direction === undefined) {
|
|
8779
|
+
return [];
|
|
8780
|
+
}
|
|
8781
|
+
|
|
8782
|
+
if (typeof direction === 'object') {
|
|
8783
|
+
return Object.entries(direction).map(([key, value]) => `direction-${key}-${value}`);
|
|
8784
|
+
}
|
|
8785
|
+
|
|
8786
|
+
return [`direction-xs-${String(direction)}`];
|
|
8787
|
+
};
|
|
8778
8788
|
|
|
8779
8789
|
const _excluded$2f = ["className", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow"];
|
|
8780
8790
|
const defaultTheme$4 = createTheme$1(); // widening Theme to any so that the consumer can own the theme structure.
|
|
@@ -8812,7 +8822,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8812
8822
|
gridSize
|
|
8813
8823
|
} = ownerState;
|
|
8814
8824
|
const slots = {
|
|
8815
|
-
root: ['root', container && 'container',
|
|
8825
|
+
root: ['root', container && 'container', wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...generateDirectionClasses(direction), ...generateSizeClassNames(gridSize), ...(container ? generateSpacingClassNames(spacing, theme.breakpoints.keys[0]) : [])]
|
|
8816
8826
|
};
|
|
8817
8827
|
return composeClasses(slots, slot => generateUtilityClass(componentName, slot), {});
|
|
8818
8828
|
};
|
|
@@ -9202,7 +9212,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9202
9212
|
} = mergeSlotProps(_extends({}, rest, {
|
|
9203
9213
|
externalSlotProps: resolvedComponentsProps
|
|
9204
9214
|
}));
|
|
9205
|
-
const ref = useForkRef(internalRef,
|
|
9215
|
+
const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);
|
|
9206
9216
|
const props = appendOwnerState(elementType, _extends({}, mergedProps, {
|
|
9207
9217
|
ref
|
|
9208
9218
|
}), ownerState);
|
|
@@ -14874,7 +14884,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14874
14884
|
};
|
|
14875
14885
|
}
|
|
14876
14886
|
|
|
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"];
|
|
14887
|
+
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
14888
|
|
|
14879
14889
|
const Identity = x => x;
|
|
14880
14890
|
|
|
@@ -14914,6 +14924,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14914
14924
|
const {
|
|
14915
14925
|
'aria-label': ariaLabel,
|
|
14916
14926
|
'aria-valuetext': ariaValuetext,
|
|
14927
|
+
'aria-labelledby': ariaLabelledby,
|
|
14917
14928
|
className,
|
|
14918
14929
|
component,
|
|
14919
14930
|
classes: classesProp,
|
|
@@ -15091,6 +15102,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
15091
15102
|
"data-index": index,
|
|
15092
15103
|
"aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
|
|
15093
15104
|
"aria-valuenow": scale(value),
|
|
15105
|
+
"aria-labelledby": ariaLabelledby,
|
|
15094
15106
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
|
|
15095
15107
|
value: values[index]
|
|
15096
15108
|
}, inputProps))
|
|
@@ -19791,8 +19803,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
19791
19803
|
}
|
|
19792
19804
|
}
|
|
19793
19805
|
|
|
19794
|
-
const
|
|
19795
|
-
const handleRef = useForkRef(ref, handleOwnRef);
|
|
19806
|
+
const handleRef = useForkRef(ref, focusVisibleRef, buttonRef);
|
|
19796
19807
|
|
|
19797
19808
|
{
|
|
19798
19809
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -22415,9 +22426,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
22415
22426
|
}
|
|
22416
22427
|
}
|
|
22417
22428
|
}, []);
|
|
22418
|
-
const
|
|
22419
|
-
const handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);
|
|
22420
|
-
const handleInputRef = useForkRef(inputRef, handleInputRefProp);
|
|
22429
|
+
const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
|
|
22421
22430
|
const [focused, setFocused] = React__namespace.useState(false);
|
|
22422
22431
|
const muiFormControl = useFormControl();
|
|
22423
22432
|
|
|
@@ -24511,8 +24520,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24511
24520
|
} = props,
|
|
24512
24521
|
other = _objectWithoutPropertiesLoose(props, _excluded$1K);
|
|
24513
24522
|
const nodeRef = React__namespace.useRef(null);
|
|
24514
|
-
const
|
|
24515
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
24523
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
24516
24524
|
|
|
24517
24525
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
24518
24526
|
if (callback) {
|
|
@@ -28200,7 +28208,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28200
28208
|
boxSizing: 'border-box',
|
|
28201
28209
|
// Fix font resize problem in iOS
|
|
28202
28210
|
WebkitTextSizeAdjust: '100%'
|
|
28203
|
-
}, enableColorScheme && {
|
|
28211
|
+
}, enableColorScheme && !theme.vars && {
|
|
28204
28212
|
colorScheme: theme.palette.mode
|
|
28205
28213
|
});
|
|
28206
28214
|
const body = theme => _extends({
|
|
@@ -28215,7 +28223,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28215
28223
|
const styles$3 = (theme, enableColorScheme = false) => {
|
|
28216
28224
|
var _theme$components, _theme$components$Mui;
|
|
28217
28225
|
|
|
28218
|
-
|
|
28226
|
+
const colorSchemeStyles = {};
|
|
28227
|
+
|
|
28228
|
+
if (enableColorScheme && theme.colorSchemes) {
|
|
28229
|
+
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
28230
|
+
var _scheme$palette;
|
|
28231
|
+
|
|
28232
|
+
colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, '')] = {
|
|
28233
|
+
colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
|
|
28234
|
+
};
|
|
28235
|
+
});
|
|
28236
|
+
}
|
|
28237
|
+
|
|
28238
|
+
let defaultStyles = _extends({
|
|
28219
28239
|
html: html(theme, enableColorScheme),
|
|
28220
28240
|
'*, *::before, *::after': {
|
|
28221
28241
|
boxSizing: 'inherit'
|
|
@@ -28232,7 +28252,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
28232
28252
|
backgroundColor: (theme.vars || theme).palette.background.default
|
|
28233
28253
|
}
|
|
28234
28254
|
})
|
|
28235
|
-
};
|
|
28255
|
+
}, colorSchemeStyles);
|
|
28256
|
+
|
|
28236
28257
|
const themeOverrides = (_theme$components = theme.components) == null ? void 0 : (_theme$components$Mui = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components$Mui.styleOverrides;
|
|
28237
28258
|
|
|
28238
28259
|
if (themeOverrides) {
|
|
@@ -29768,8 +29789,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29768
29789
|
other = _objectWithoutPropertiesLoose(props, _excluded$1m);
|
|
29769
29790
|
|
|
29770
29791
|
const childrenRef = React__namespace.useRef(null);
|
|
29771
|
-
const
|
|
29772
|
-
const handleRef = useForkRef(handleRefIntermediary, ref);
|
|
29792
|
+
const handleRef = useForkRef(children.ref, childrenRef, ref);
|
|
29773
29793
|
|
|
29774
29794
|
const normalizedTransitionCallback = callback => isAppearing => {
|
|
29775
29795
|
if (callback) {
|
|
@@ -32764,8 +32784,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
32764
32784
|
const autoTimeout = React__namespace.useRef();
|
|
32765
32785
|
const theme = useTheme();
|
|
32766
32786
|
const nodeRef = React__namespace.useRef(null);
|
|
32767
|
-
const
|
|
32768
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
32787
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
32769
32788
|
|
|
32770
32789
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
32771
32790
|
if (callback) {
|
|
@@ -41066,8 +41085,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
41066
41085
|
} = useIsFocusVisible();
|
|
41067
41086
|
const [focusVisible, setFocusVisible] = React__namespace.useState(false);
|
|
41068
41087
|
const rootRef = React__namespace.useRef();
|
|
41069
|
-
const
|
|
41070
|
-
const handleRef = useForkRef(handleFocusRef, ref);
|
|
41088
|
+
const handleRef = useForkRef(focusVisibleRef, rootRef, ref);
|
|
41071
41089
|
|
|
41072
41090
|
const handleMouseMove = event => {
|
|
41073
41091
|
if (onMouseMove) {
|
|
@@ -41461,6 +41479,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
41461
41479
|
theme,
|
|
41462
41480
|
ownerState
|
|
41463
41481
|
}) => {
|
|
41482
|
+
const colorSchemeStyles = {};
|
|
41483
|
+
|
|
41484
|
+
if (ownerState.enableColorScheme && theme.colorSchemes) {
|
|
41485
|
+
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
41486
|
+
var _scheme$palette;
|
|
41487
|
+
|
|
41488
|
+
colorSchemeStyles[`&${theme.getColorSchemeSelector(key).replace(/\s*&/, '')}`] = {
|
|
41489
|
+
colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
|
|
41490
|
+
};
|
|
41491
|
+
});
|
|
41492
|
+
}
|
|
41493
|
+
|
|
41464
41494
|
return _extends({}, html(theme, ownerState.enableColorScheme), body(theme), {
|
|
41465
41495
|
'& *, & *::before, & *::after': {
|
|
41466
41496
|
boxSizing: 'inherit'
|
|
@@ -41468,7 +41498,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
41468
41498
|
'& strong, & b': {
|
|
41469
41499
|
fontWeight: theme.typography.fontWeightBold
|
|
41470
41500
|
}
|
|
41471
|
-
});
|
|
41501
|
+
}, colorSchemeStyles);
|
|
41472
41502
|
});
|
|
41473
41503
|
const ScopedCssBaseline = /*#__PURE__*/React__namespace.forwardRef(function ScopedCssBaseline(inProps, ref) {
|
|
41474
41504
|
const props = useThemeProps({
|
|
@@ -44156,8 +44186,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44156
44186
|
other = _objectWithoutPropertiesLoose(props, _excluded$y);
|
|
44157
44187
|
|
|
44158
44188
|
const nodeRef = React__namespace.useRef(null);
|
|
44159
|
-
const
|
|
44160
|
-
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
44189
|
+
const handleRef = useForkRef(nodeRef, children.ref, ref);
|
|
44161
44190
|
|
|
44162
44191
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
44163
44192
|
if (callback) {
|
|
@@ -45325,9 +45354,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
45325
45354
|
document.removeEventListener('keydown', handleKeyDown);
|
|
45326
45355
|
};
|
|
45327
45356
|
}, [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.
|
|
45357
|
+
const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
45331
45358
|
|
|
45332
45359
|
if (typeof title !== 'number' && !title) {
|
|
45333
45360
|
open = false;
|