@mui/material 5.8.5 → 5.8.6
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/Alert.js +19 -11
- 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/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 +65 -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 +80 -80
- 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/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/FilledInput/FilledInput.js +1 -1
- 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/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/Input.js +1 -1
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +44 -44
- 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/OutlinedInput.js +15 -0
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- 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 +29 -29
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Slider/Slider.js +9 -9
- 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 +24 -24
- 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/Tabs.js +10 -2
- 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/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Alert/Alert.js +19 -11
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/FilledInput/FilledInput.js +1 -1
- package/legacy/Input/Input.js +1 -1
- package/legacy/OutlinedInput/OutlinedInput.js +15 -0
- package/legacy/Slider/Slider.js +9 -9
- package/legacy/Tabs/Tabs.js +10 -2
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +3 -1
- package/legacy/styles/experimental_extendTheme.js +43 -3
- package/locale/index.d.ts +71 -71
- package/modern/Alert/Alert.js +19 -11
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/FilledInput/FilledInput.js +1 -1
- package/modern/Input/Input.js +1 -1
- package/modern/OutlinedInput/OutlinedInput.js +15 -0
- package/modern/Slider/Slider.js +9 -9
- package/modern/Tabs/Tabs.js +10 -2
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +1 -1
- package/modern/styles/experimental_extendTheme.js +43 -3
- package/node/Alert/Alert.js +19 -11
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/FilledInput/FilledInput.js +1 -1
- package/node/Input/Input.js +1 -1
- package/node/OutlinedInput/OutlinedInput.js +13 -0
- package/node/Slider/Slider.js +9 -9
- package/node/Tabs/Tabs.js +10 -2
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +5 -1
- package/node/styles/experimental_extendTheme.js +43 -3
- package/package.json +4 -4
- package/styles/CssVarsProvider.d.ts +10 -28
- package/styles/CssVarsProvider.js +5 -1
- package/styles/createPalette.d.ts +0 -89
- package/styles/experimental_extendTheme.d.ts +225 -37
- package/styles/experimental_extendTheme.js +43 -3
- package/styles/index.d.ts +24 -1
- package/themeCssVarsAugmentation/index.d.ts +61 -0
- 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 +355 -173
- package/umd/material-ui.production.min.js +21 -21
- 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.8.
|
|
1
|
+
/** @license MUI v5.8.6
|
|
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.
|
|
@@ -4624,7 +4624,7 @@
|
|
|
4624
4624
|
injectFirst: PropTypes.bool
|
|
4625
4625
|
} ;
|
|
4626
4626
|
|
|
4627
|
-
function isEmpty$
|
|
4627
|
+
function isEmpty$4(obj) {
|
|
4628
4628
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
4629
4629
|
}
|
|
4630
4630
|
|
|
@@ -4633,7 +4633,7 @@
|
|
|
4633
4633
|
styles,
|
|
4634
4634
|
defaultTheme = {}
|
|
4635
4635
|
} = props;
|
|
4636
|
-
const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty$
|
|
4636
|
+
const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty$4(themeInput) ? defaultTheme : themeInput) : styles;
|
|
4637
4637
|
return /*#__PURE__*/jsxRuntime_1(Global, {
|
|
4638
4638
|
styles: globalStyles
|
|
4639
4639
|
});
|
|
@@ -5464,7 +5464,12 @@
|
|
|
5464
5464
|
return requiredInteger(props, propName, ...other);
|
|
5465
5465
|
}
|
|
5466
5466
|
|
|
5467
|
+
function validatorNoop() {
|
|
5468
|
+
return null;
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5467
5471
|
validator.isRequired = requiredInteger;
|
|
5472
|
+
validatorNoop.isRequired = validatorNoop;
|
|
5468
5473
|
var integerPropType = validator;
|
|
5469
5474
|
|
|
5470
5475
|
/**
|
|
@@ -5528,26 +5533,26 @@
|
|
|
5528
5533
|
var ClassNameGenerator$1 = ClassNameGenerator;
|
|
5529
5534
|
|
|
5530
5535
|
const globalStateClassesMapping = {
|
|
5531
|
-
active: '
|
|
5532
|
-
checked: '
|
|
5533
|
-
completed: '
|
|
5534
|
-
disabled: '
|
|
5535
|
-
error: '
|
|
5536
|
-
expanded: '
|
|
5537
|
-
focused: '
|
|
5538
|
-
focusVisible: '
|
|
5539
|
-
required: '
|
|
5540
|
-
selected: '
|
|
5541
|
-
};
|
|
5542
|
-
function generateUtilityClass(componentName, slot) {
|
|
5536
|
+
active: 'active',
|
|
5537
|
+
checked: 'checked',
|
|
5538
|
+
completed: 'completed',
|
|
5539
|
+
disabled: 'disabled',
|
|
5540
|
+
error: 'error',
|
|
5541
|
+
expanded: 'expanded',
|
|
5542
|
+
focused: 'focused',
|
|
5543
|
+
focusVisible: 'focusVisible',
|
|
5544
|
+
required: 'required',
|
|
5545
|
+
selected: 'selected'
|
|
5546
|
+
};
|
|
5547
|
+
function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
5543
5548
|
const globalStateClass = globalStateClassesMapping[slot];
|
|
5544
|
-
return globalStateClass
|
|
5549
|
+
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
|
|
5545
5550
|
}
|
|
5546
5551
|
|
|
5547
|
-
function generateUtilityClasses(componentName, slots) {
|
|
5552
|
+
function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
|
|
5548
5553
|
const result = {};
|
|
5549
5554
|
slots.forEach(slot => {
|
|
5550
|
-
result[slot] = generateUtilityClass(componentName, slot);
|
|
5555
|
+
result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
|
|
5551
5556
|
});
|
|
5552
5557
|
return result;
|
|
5553
5558
|
}
|
|
@@ -6845,7 +6850,7 @@
|
|
|
6845
6850
|
|
|
6846
6851
|
const _excluded$2i = ["variant"];
|
|
6847
6852
|
|
|
6848
|
-
function isEmpty$
|
|
6853
|
+
function isEmpty$3(string) {
|
|
6849
6854
|
return string.length === 0;
|
|
6850
6855
|
}
|
|
6851
6856
|
/**
|
|
@@ -6864,9 +6869,9 @@
|
|
|
6864
6869
|
let classKey = variant || '';
|
|
6865
6870
|
Object.keys(other).sort().forEach(key => {
|
|
6866
6871
|
if (key === 'color') {
|
|
6867
|
-
classKey += isEmpty$
|
|
6872
|
+
classKey += isEmpty$3(classKey) ? props[key] : capitalize(props[key]);
|
|
6868
6873
|
} else {
|
|
6869
|
-
classKey += `${isEmpty$
|
|
6874
|
+
classKey += `${isEmpty$3(classKey) ? key : capitalize(key)}${capitalize(props[key].toString())}`;
|
|
6870
6875
|
}
|
|
6871
6876
|
});
|
|
6872
6877
|
return classKey;
|
|
@@ -6876,7 +6881,7 @@
|
|
|
6876
6881
|
_excluded2$c = ["theme"],
|
|
6877
6882
|
_excluded3$1 = ["theme"];
|
|
6878
6883
|
|
|
6879
|
-
function isEmpty$
|
|
6884
|
+
function isEmpty$2(obj) {
|
|
6880
6885
|
return Object.keys(obj).length === 0;
|
|
6881
6886
|
}
|
|
6882
6887
|
|
|
@@ -6995,7 +7000,7 @@
|
|
|
6995
7000
|
other = _objectWithoutPropertiesLoose(_ref, _excluded2$c);
|
|
6996
7001
|
|
|
6997
7002
|
return stylesArg(_extends({
|
|
6998
|
-
theme: isEmpty$
|
|
7003
|
+
theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
|
|
6999
7004
|
}, other));
|
|
7000
7005
|
} : stylesArg;
|
|
7001
7006
|
}) : [];
|
|
@@ -7003,7 +7008,7 @@
|
|
|
7003
7008
|
|
|
7004
7009
|
if (componentName && overridesResolver) {
|
|
7005
7010
|
expressionsWithDefaultTheme.push(props => {
|
|
7006
|
-
const theme = isEmpty$
|
|
7011
|
+
const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
|
|
7007
7012
|
const styleOverrides = getStyleOverrides(componentName, theme);
|
|
7008
7013
|
|
|
7009
7014
|
if (styleOverrides) {
|
|
@@ -7022,14 +7027,14 @@
|
|
|
7022
7027
|
|
|
7023
7028
|
if (componentName && !skipVariantsResolver) {
|
|
7024
7029
|
expressionsWithDefaultTheme.push(props => {
|
|
7025
|
-
const theme = isEmpty$
|
|
7030
|
+
const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
|
|
7026
7031
|
return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
|
7027
7032
|
});
|
|
7028
7033
|
}
|
|
7029
7034
|
|
|
7030
7035
|
if (!skipSx) {
|
|
7031
7036
|
expressionsWithDefaultTheme.push(props => {
|
|
7032
|
-
const theme = isEmpty$
|
|
7037
|
+
const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
|
|
7033
7038
|
return styleFunctionSx(_extends({}, props, {
|
|
7034
7039
|
theme
|
|
7035
7040
|
}));
|
|
@@ -7056,7 +7061,7 @@
|
|
|
7056
7061
|
other = _objectWithoutPropertiesLoose(_ref2, _excluded3$1);
|
|
7057
7062
|
|
|
7058
7063
|
return styleArg(_extends({
|
|
7059
|
-
theme: isEmpty$
|
|
7064
|
+
theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
|
|
7060
7065
|
}, other));
|
|
7061
7066
|
};
|
|
7062
7067
|
}
|
|
@@ -7637,6 +7642,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7637
7642
|
const DEFAULT_ATTRIBUTE = 'data-color-scheme';
|
|
7638
7643
|
function getInitColorSchemeScript$1(options) {
|
|
7639
7644
|
const {
|
|
7645
|
+
enableColorScheme = true,
|
|
7640
7646
|
enableSystem = false,
|
|
7641
7647
|
defaultLightColorScheme = 'light',
|
|
7642
7648
|
defaultDarkColorScheme = 'dark',
|
|
@@ -7650,13 +7656,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7650
7656
|
dangerouslySetInnerHTML: {
|
|
7651
7657
|
__html: `(function() { try {
|
|
7652
7658
|
var mode = localStorage.getItem('${modeStorageKey}');
|
|
7659
|
+
var cssColorScheme = mode;
|
|
7653
7660
|
var colorScheme = '';
|
|
7654
7661
|
if (mode === 'system' || (!mode && !!${enableSystem})) {
|
|
7655
7662
|
// handle system mode
|
|
7656
7663
|
var mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
7657
7664
|
if (mql.matches) {
|
|
7665
|
+
cssColorScheme = 'dark';
|
|
7658
7666
|
colorScheme = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';
|
|
7659
7667
|
} else {
|
|
7668
|
+
cssColorScheme = 'light';
|
|
7660
7669
|
colorScheme = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';
|
|
7661
7670
|
}
|
|
7662
7671
|
}
|
|
@@ -7669,6 +7678,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7669
7678
|
if (colorScheme) {
|
|
7670
7679
|
${colorSchemeNode}.setAttribute('${attribute}', colorScheme);
|
|
7671
7680
|
}
|
|
7681
|
+
if (${enableColorScheme} && !!cssColorScheme) {
|
|
7682
|
+
${colorSchemeNode}.style.setProperty('color-scheme', cssColorScheme);
|
|
7683
|
+
}
|
|
7672
7684
|
} catch (e) {} })();`
|
|
7673
7685
|
}
|
|
7674
7686
|
});
|
|
@@ -8228,7 +8240,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8228
8240
|
const getInitColorSchemeScript = params => getInitColorSchemeScript$1(_extends({
|
|
8229
8241
|
attribute: defaultAttribute,
|
|
8230
8242
|
colorSchemeStorageKey: defaultColorSchemeStorageKey,
|
|
8231
|
-
modeStorageKey: defaultModeStorageKey
|
|
8243
|
+
modeStorageKey: defaultModeStorageKey,
|
|
8244
|
+
enableColorScheme: designSystemEnableColorScheme
|
|
8232
8245
|
}, params));
|
|
8233
8246
|
|
|
8234
8247
|
return {
|
|
@@ -8467,21 +8480,26 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8467
8480
|
return typeof element === 'string';
|
|
8468
8481
|
}
|
|
8469
8482
|
|
|
8483
|
+
/**
|
|
8484
|
+
* Type of the ownerState based on the type of an element it applies to.
|
|
8485
|
+
* This resolves to the provided OwnerState for React components and `undefined` for host components.
|
|
8486
|
+
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
|
|
8487
|
+
*/
|
|
8488
|
+
|
|
8470
8489
|
/**
|
|
8471
8490
|
* Appends the ownerState object to the props, merging with the existing one if necessary.
|
|
8472
8491
|
*
|
|
8473
|
-
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node, `ownerState`
|
|
8474
|
-
* @param
|
|
8492
|
+
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node, `ownerState` is not applied.
|
|
8493
|
+
* @param otherProps Props of the element.
|
|
8475
8494
|
* @param ownerState
|
|
8476
8495
|
*/
|
|
8477
|
-
|
|
8478
|
-
function appendOwnerState(elementType, existingProps = {}, ownerState) {
|
|
8496
|
+
function appendOwnerState(elementType, otherProps = {}, ownerState) {
|
|
8479
8497
|
if (isHostComponent(elementType)) {
|
|
8480
|
-
return
|
|
8498
|
+
return otherProps;
|
|
8481
8499
|
}
|
|
8482
8500
|
|
|
8483
|
-
return _extends({},
|
|
8484
|
-
ownerState: _extends({},
|
|
8501
|
+
return _extends({}, otherProps, {
|
|
8502
|
+
ownerState: _extends({}, otherProps.ownerState, ownerState)
|
|
8485
8503
|
});
|
|
8486
8504
|
}
|
|
8487
8505
|
|
|
@@ -8504,6 +8522,18 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8504
8522
|
return result;
|
|
8505
8523
|
}
|
|
8506
8524
|
|
|
8525
|
+
/**
|
|
8526
|
+
* If `componentProps` is a function, calls it with the provided `ownerState`.
|
|
8527
|
+
* Otherwise, just returns `componentProps`.
|
|
8528
|
+
*/
|
|
8529
|
+
function resolveComponentProps(componentProps, ownerState) {
|
|
8530
|
+
if (typeof componentProps === 'function') {
|
|
8531
|
+
return componentProps(ownerState);
|
|
8532
|
+
}
|
|
8533
|
+
|
|
8534
|
+
return componentProps;
|
|
8535
|
+
}
|
|
8536
|
+
|
|
8507
8537
|
/**
|
|
8508
8538
|
* Creates a type that is T with removed properties that are functions with names beginning with `on`.
|
|
8509
8539
|
* Note that it does not exactly follow the logic of `omitEventHandlers` as it also removes fields where
|
|
@@ -8556,12 +8586,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8556
8586
|
// so we can simply merge all the props without having to worry about extracting event handlers.
|
|
8557
8587
|
const joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className);
|
|
8558
8588
|
|
|
8559
|
-
const
|
|
8560
|
-
|
|
8561
|
-
});
|
|
8589
|
+
const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
|
|
8590
|
+
|
|
8591
|
+
const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);
|
|
8592
|
+
|
|
8593
|
+
if (joinedClasses.length > 0) {
|
|
8594
|
+
props.className = joinedClasses;
|
|
8595
|
+
}
|
|
8562
8596
|
|
|
8563
|
-
if (
|
|
8564
|
-
|
|
8597
|
+
if (Object.keys(mergedStyle).length > 0) {
|
|
8598
|
+
props.style = mergedStyle;
|
|
8565
8599
|
}
|
|
8566
8600
|
|
|
8567
8601
|
return {
|
|
@@ -8578,12 +8612,16 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8578
8612
|
const internalSlotProps = getSlotProps(eventHandlers);
|
|
8579
8613
|
const joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className, internalSlotProps == null ? void 0 : internalSlotProps.className);
|
|
8580
8614
|
|
|
8581
|
-
const
|
|
8582
|
-
|
|
8583
|
-
});
|
|
8615
|
+
const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
|
|
8616
|
+
|
|
8617
|
+
const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);
|
|
8584
8618
|
|
|
8585
|
-
if (joinedClasses.length
|
|
8586
|
-
|
|
8619
|
+
if (joinedClasses.length > 0) {
|
|
8620
|
+
props.className = joinedClasses;
|
|
8621
|
+
}
|
|
8622
|
+
|
|
8623
|
+
if (Object.keys(mergedStyle).length > 0) {
|
|
8624
|
+
props.style = mergedStyle;
|
|
8587
8625
|
}
|
|
8588
8626
|
|
|
8589
8627
|
return {
|
|
@@ -8592,18 +8630,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8592
8630
|
};
|
|
8593
8631
|
}
|
|
8594
8632
|
|
|
8595
|
-
/**
|
|
8596
|
-
* If `componentProps` is a function, calls it with the provided `ownerState`.
|
|
8597
|
-
* Otherwise, just returns `componentProps`.
|
|
8598
|
-
*/
|
|
8599
|
-
function resolveComponentProps(componentProps, ownerState) {
|
|
8600
|
-
if (typeof componentProps === 'function') {
|
|
8601
|
-
return componentProps(ownerState);
|
|
8602
|
-
}
|
|
8603
|
-
|
|
8604
|
-
return componentProps;
|
|
8605
|
-
}
|
|
8606
|
-
|
|
8607
8633
|
const _excluded$2d = ["elementType", "externalSlotProps", "ownerState"];
|
|
8608
8634
|
|
|
8609
8635
|
/**
|
|
@@ -12508,15 +12534,22 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
12508
12534
|
});
|
|
12509
12535
|
element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;
|
|
12510
12536
|
});
|
|
12511
|
-
}
|
|
12512
|
-
// https://css-tricks.com/snippets/css/force-vertical-scrollbar/
|
|
12537
|
+
}
|
|
12513
12538
|
|
|
12539
|
+
let scrollContainer;
|
|
12514
12540
|
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12541
|
+
if (container.parentNode instanceof DocumentFragment) {
|
|
12542
|
+
scrollContainer = ownerDocument(container).body;
|
|
12543
|
+
} else {
|
|
12544
|
+
// Improve Gatsby support
|
|
12545
|
+
// https://css-tricks.com/snippets/css/force-vertical-scrollbar/
|
|
12546
|
+
const parent = container.parentElement;
|
|
12547
|
+
const containerWindow = ownerWindow(container);
|
|
12548
|
+
scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;
|
|
12549
|
+
} // Block the scroll even if no scrollbar is visible to account for mobile keyboard
|
|
12518
12550
|
// screensize shrink.
|
|
12519
12551
|
|
|
12552
|
+
|
|
12520
12553
|
restoreStyle.push({
|
|
12521
12554
|
value: scrollContainer.style.overflow,
|
|
12522
12555
|
property: 'overflow',
|
|
@@ -13772,7 +13805,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13772
13805
|
onFocus: handleFocusVisible,
|
|
13773
13806
|
ref: focusVisibleRef
|
|
13774
13807
|
} = useIsFocusVisible();
|
|
13775
|
-
const [
|
|
13808
|
+
const [focusedThumbIndex, setFocusedThumbIndex] = React__namespace.useState(-1);
|
|
13776
13809
|
const sliderRef = React__namespace.useRef();
|
|
13777
13810
|
const handleFocusRef = useForkRef(focusVisibleRef, sliderRef);
|
|
13778
13811
|
const handleRef = useForkRef(ref, handleFocusRef);
|
|
@@ -13784,7 +13817,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13784
13817
|
handleFocusVisible(event);
|
|
13785
13818
|
|
|
13786
13819
|
if (isFocusVisibleRef.current === true) {
|
|
13787
|
-
|
|
13820
|
+
setFocusedThumbIndex(index);
|
|
13788
13821
|
}
|
|
13789
13822
|
|
|
13790
13823
|
setOpen(index);
|
|
@@ -13797,7 +13830,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13797
13830
|
handleBlurVisible(event);
|
|
13798
13831
|
|
|
13799
13832
|
if (isFocusVisibleRef.current === false) {
|
|
13800
|
-
|
|
13833
|
+
setFocusedThumbIndex(-1);
|
|
13801
13834
|
}
|
|
13802
13835
|
|
|
13803
13836
|
setOpen(-1);
|
|
@@ -13820,8 +13853,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13820
13853
|
setActive(-1);
|
|
13821
13854
|
}
|
|
13822
13855
|
|
|
13823
|
-
if (disabled &&
|
|
13824
|
-
|
|
13856
|
+
if (disabled && focusedThumbIndex !== -1) {
|
|
13857
|
+
setFocusedThumbIndex(-1);
|
|
13825
13858
|
}
|
|
13826
13859
|
|
|
13827
13860
|
const createHandleHiddenInputChange = otherHandlers => event => {
|
|
@@ -13870,7 +13903,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13870
13903
|
}
|
|
13871
13904
|
|
|
13872
13905
|
setValueState(newValue);
|
|
13873
|
-
|
|
13906
|
+
setFocusedThumbIndex(index);
|
|
13874
13907
|
|
|
13875
13908
|
if (handleChange) {
|
|
13876
13909
|
handleChange(event, newValue, index);
|
|
@@ -14181,13 +14214,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14181
14214
|
onMouseOver: createHandleMouseOver(otherHandlers || {}),
|
|
14182
14215
|
onMouseLeave: createHandleMouseLeave(otherHandlers || {})
|
|
14183
14216
|
};
|
|
14184
|
-
|
|
14185
|
-
const mergedEventHandlers = _extends({}, otherHandlers, ownEventHandlers);
|
|
14186
|
-
|
|
14187
|
-
return _extends({}, mergedEventHandlers);
|
|
14217
|
+
return _extends({}, otherHandlers, ownEventHandlers);
|
|
14188
14218
|
};
|
|
14189
14219
|
|
|
14190
14220
|
const getHiddenInputProps = (otherHandlers = {}) => {
|
|
14221
|
+
var _parameters$step;
|
|
14222
|
+
|
|
14191
14223
|
const ownEventHandlers = {
|
|
14192
14224
|
onChange: createHandleHiddenInputChange(otherHandlers || {}),
|
|
14193
14225
|
onFocus: createHandleHiddenInputFocus(otherHandlers || {}),
|
|
@@ -14206,7 +14238,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14206
14238
|
type: 'range',
|
|
14207
14239
|
min: parameters.min,
|
|
14208
14240
|
max: parameters.max,
|
|
14209
|
-
step: parameters.step,
|
|
14241
|
+
step: (_parameters$step = parameters.step) != null ? _parameters$step : undefined,
|
|
14210
14242
|
disabled
|
|
14211
14243
|
}, mergedEventHandlers, {
|
|
14212
14244
|
style: _extends({}, visuallyHidden$1, {
|
|
@@ -14223,7 +14255,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14223
14255
|
axis: axis,
|
|
14224
14256
|
axisProps,
|
|
14225
14257
|
dragging,
|
|
14226
|
-
|
|
14258
|
+
focusedThumbIndex,
|
|
14227
14259
|
getHiddenInputProps,
|
|
14228
14260
|
getRootProps,
|
|
14229
14261
|
getThumbProps,
|
|
@@ -14236,7 +14268,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14236
14268
|
};
|
|
14237
14269
|
}
|
|
14238
14270
|
|
|
14239
|
-
const _excluded$29 = ["aria-label", "aria-valuetext", "className", "component", "classes", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "
|
|
14271
|
+
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"];
|
|
14240
14272
|
|
|
14241
14273
|
const Identity = x => x;
|
|
14242
14274
|
|
|
@@ -14286,7 +14318,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14286
14318
|
marks: marksProp = false,
|
|
14287
14319
|
max = 100,
|
|
14288
14320
|
min = 0,
|
|
14289
|
-
onMouseDown,
|
|
14290
14321
|
orientation = 'horizontal',
|
|
14291
14322
|
scale = Identity,
|
|
14292
14323
|
step = 1,
|
|
@@ -14325,7 +14356,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14325
14356
|
active,
|
|
14326
14357
|
axis,
|
|
14327
14358
|
range,
|
|
14328
|
-
|
|
14359
|
+
focusedThumbIndex,
|
|
14329
14360
|
dragging,
|
|
14330
14361
|
marks,
|
|
14331
14362
|
values,
|
|
@@ -14336,37 +14367,69 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14336
14367
|
}));
|
|
14337
14368
|
ownerState.marked = marks.length > 0 && marks.some(mark => mark.label);
|
|
14338
14369
|
ownerState.dragging = dragging;
|
|
14370
|
+
ownerState.focusedThumbIndex = focusedThumbIndex;
|
|
14371
|
+
const classes = useUtilityClasses$1M(ownerState);
|
|
14339
14372
|
const Root = (_ref = component != null ? component : components.Root) != null ? _ref : 'span';
|
|
14340
|
-
const rootProps =
|
|
14373
|
+
const rootProps = useSlotProps({
|
|
14374
|
+
elementType: Root,
|
|
14375
|
+
getSlotProps: getRootProps,
|
|
14376
|
+
externalSlotProps: componentsProps.root,
|
|
14377
|
+
externalForwardedProps: other,
|
|
14378
|
+
ownerState,
|
|
14379
|
+
className: [classes.root, className]
|
|
14380
|
+
});
|
|
14341
14381
|
const Rail = (_components$Rail = components.Rail) != null ? _components$Rail : 'span';
|
|
14342
|
-
const railProps =
|
|
14382
|
+
const railProps = useSlotProps({
|
|
14383
|
+
elementType: Rail,
|
|
14384
|
+
externalSlotProps: componentsProps.rail,
|
|
14385
|
+
ownerState,
|
|
14386
|
+
className: classes.rail
|
|
14387
|
+
});
|
|
14343
14388
|
const Track = (_components$Track = components.Track) != null ? _components$Track : 'span';
|
|
14344
|
-
const trackProps =
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14389
|
+
const trackProps = useSlotProps({
|
|
14390
|
+
elementType: Track,
|
|
14391
|
+
externalSlotProps: componentsProps.track,
|
|
14392
|
+
additionalProps: {
|
|
14393
|
+
style: _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap))
|
|
14394
|
+
},
|
|
14395
|
+
ownerState,
|
|
14396
|
+
className: classes.track
|
|
14397
|
+
});
|
|
14348
14398
|
const Thumb = (_components$Thumb = components.Thumb) != null ? _components$Thumb : 'span';
|
|
14349
|
-
const thumbProps =
|
|
14399
|
+
const thumbProps = useSlotProps({
|
|
14400
|
+
elementType: Thumb,
|
|
14401
|
+
getSlotProps: getThumbProps,
|
|
14402
|
+
externalSlotProps: componentsProps.thumb,
|
|
14403
|
+
ownerState
|
|
14404
|
+
});
|
|
14350
14405
|
const ValueLabel = (_components$ValueLabe = components.ValueLabel) != null ? _components$ValueLabe : SliderValueLabelUnstyled;
|
|
14351
|
-
const valueLabelProps =
|
|
14406
|
+
const valueLabelProps = useSlotProps({
|
|
14407
|
+
elementType: ValueLabel,
|
|
14408
|
+
externalSlotProps: componentsProps.valueLabel,
|
|
14409
|
+
ownerState
|
|
14410
|
+
});
|
|
14352
14411
|
const Mark = (_components$Mark = components.Mark) != null ? _components$Mark : 'span';
|
|
14353
|
-
const markProps =
|
|
14412
|
+
const markProps = useSlotProps({
|
|
14413
|
+
elementType: Mark,
|
|
14414
|
+
externalSlotProps: componentsProps.mark,
|
|
14415
|
+
ownerState,
|
|
14416
|
+
className: classes.mark
|
|
14417
|
+
});
|
|
14354
14418
|
const MarkLabel = (_components$MarkLabel = components.MarkLabel) != null ? _components$MarkLabel : 'span';
|
|
14355
|
-
const markLabelProps =
|
|
14419
|
+
const markLabelProps = useSlotProps({
|
|
14420
|
+
elementType: MarkLabel,
|
|
14421
|
+
externalSlotProps: componentsProps.markLabel,
|
|
14422
|
+
ownerState
|
|
14423
|
+
});
|
|
14356
14424
|
const Input = components.Input || 'input';
|
|
14357
|
-
const inputProps =
|
|
14358
|
-
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14362
|
-
})
|
|
14363
|
-
|
|
14364
|
-
children: [/*#__PURE__*/jsxRuntime_1(Rail, _extends({}, railProps, {
|
|
14365
|
-
className: clsx(classes.rail, railProps.className)
|
|
14366
|
-
})), /*#__PURE__*/jsxRuntime_1(Track, _extends({}, trackProps, {
|
|
14367
|
-
className: clsx(classes.track, trackProps.className),
|
|
14368
|
-
style: _extends({}, trackStyle, trackProps.style)
|
|
14369
|
-
})), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {
|
|
14425
|
+
const inputProps = useSlotProps({
|
|
14426
|
+
elementType: Input,
|
|
14427
|
+
getSlotProps: getHiddenInputProps,
|
|
14428
|
+
externalSlotProps: componentsProps.input,
|
|
14429
|
+
ownerState
|
|
14430
|
+
});
|
|
14431
|
+
return /*#__PURE__*/jsxRuntime_2(Root, _extends({}, rootProps, {
|
|
14432
|
+
children: [/*#__PURE__*/jsxRuntime_1(Rail, _extends({}, railProps)), /*#__PURE__*/jsxRuntime_1(Track, _extends({}, trackProps)), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {
|
|
14370
14433
|
const percent = valueToPercent(mark.value, min, max);
|
|
14371
14434
|
const style = axisProps[axis].offset(percent);
|
|
14372
14435
|
let markActive;
|
|
@@ -14384,7 +14447,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14384
14447
|
markActive
|
|
14385
14448
|
}, {
|
|
14386
14449
|
style: _extends({}, style, markProps.style),
|
|
14387
|
-
className: clsx(
|
|
14450
|
+
className: clsx(markProps.className, markActive && classes.markActive)
|
|
14388
14451
|
})), mark.label != null ? /*#__PURE__*/jsxRuntime_1(MarkLabel, _extends({
|
|
14389
14452
|
"aria-hidden": true,
|
|
14390
14453
|
"data-index": index
|
|
@@ -14411,23 +14474,20 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14411
14474
|
}, valueLabelProps, {
|
|
14412
14475
|
className: clsx(classes.valueLabel, valueLabelProps.className),
|
|
14413
14476
|
children: /*#__PURE__*/jsxRuntime_1(Thumb, _extends({
|
|
14414
|
-
"data-index": index
|
|
14415
|
-
|
|
14416
|
-
|
|
14477
|
+
"data-index": index,
|
|
14478
|
+
"data-focusvisible": focusedThumbIndex === index
|
|
14479
|
+
}, thumbProps, {
|
|
14480
|
+
className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
|
|
14417
14481
|
style: _extends({}, style, {
|
|
14418
14482
|
pointerEvents: disableSwap && active !== index ? 'none' : undefined
|
|
14419
14483
|
}, thumbProps.style),
|
|
14420
|
-
children: /*#__PURE__*/jsxRuntime_1(Input, _extends({
|
|
14484
|
+
children: /*#__PURE__*/jsxRuntime_1(Input, _extends({
|
|
14421
14485
|
"data-index": index,
|
|
14422
14486
|
"aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
|
|
14423
14487
|
"aria-valuenow": scale(value),
|
|
14424
14488
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
|
|
14425
14489
|
value: values[index]
|
|
14426
|
-
},
|
|
14427
|
-
ownerState: _extends({}, ownerState, inputProps.ownerState)
|
|
14428
|
-
}, inputProps, {
|
|
14429
|
-
style: _extends({}, hiddenInputProps.style, inputProps.style)
|
|
14430
|
-
}))
|
|
14490
|
+
}, inputProps))
|
|
14431
14491
|
}))
|
|
14432
14492
|
}))
|
|
14433
14493
|
}, index);
|
|
@@ -14515,14 +14575,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14515
14575
|
* @default {}
|
|
14516
14576
|
*/
|
|
14517
14577
|
componentsProps: PropTypes.shape({
|
|
14518
|
-
input: PropTypes.object,
|
|
14519
|
-
mark: PropTypes.object,
|
|
14520
|
-
markLabel: PropTypes.object,
|
|
14521
|
-
rail: PropTypes.object,
|
|
14522
|
-
root: PropTypes.object,
|
|
14523
|
-
thumb: PropTypes.object,
|
|
14524
|
-
track: PropTypes.object,
|
|
14525
|
-
valueLabel: PropTypes.shape({
|
|
14578
|
+
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
14579
|
+
mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
14580
|
+
markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
14581
|
+
rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
14582
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
14583
|
+
thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
14584
|
+
track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
14585
|
+
valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
14526
14586
|
children: PropTypes.element,
|
|
14527
14587
|
className: PropTypes.string,
|
|
14528
14588
|
components: PropTypes.shape({
|
|
@@ -14532,7 +14592,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14532
14592
|
style: PropTypes.object,
|
|
14533
14593
|
value: PropTypes.number,
|
|
14534
14594
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
14535
|
-
})
|
|
14595
|
+
})])
|
|
14536
14596
|
}),
|
|
14537
14597
|
|
|
14538
14598
|
/**
|
|
@@ -14624,11 +14684,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14624
14684
|
*/
|
|
14625
14685
|
onChangeCommitted: PropTypes.func,
|
|
14626
14686
|
|
|
14627
|
-
/**
|
|
14628
|
-
* @ignore
|
|
14629
|
-
*/
|
|
14630
|
-
onMouseDown: PropTypes.func,
|
|
14631
|
-
|
|
14632
14687
|
/**
|
|
14633
14688
|
* The component orientation.
|
|
14634
14689
|
* @default 'horizontal'
|
|
@@ -14716,6 +14771,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14716
14771
|
transform: 'translateZ(0)'
|
|
14717
14772
|
}
|
|
14718
14773
|
};
|
|
14774
|
+
|
|
14775
|
+
function isEmpty$1(obj) {
|
|
14776
|
+
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
14777
|
+
}
|
|
14778
|
+
|
|
14719
14779
|
const TextareaAutosize = /*#__PURE__*/React__namespace.forwardRef(function TextareaAutosize(props, ref) {
|
|
14720
14780
|
const {
|
|
14721
14781
|
onChange,
|
|
@@ -14734,13 +14794,13 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14734
14794
|
const shadowRef = React__namespace.useRef(null);
|
|
14735
14795
|
const renders = React__namespace.useRef(0);
|
|
14736
14796
|
const [state, setState] = React__namespace.useState({});
|
|
14737
|
-
const
|
|
14797
|
+
const getUpdatedState = React__namespace.useCallback(() => {
|
|
14738
14798
|
const input = inputRef.current;
|
|
14739
14799
|
const containerWindow = ownerWindow(input);
|
|
14740
14800
|
const computedStyle = containerWindow.getComputedStyle(input); // If input's width is shrunk and it's not visible, don't sync height.
|
|
14741
14801
|
|
|
14742
14802
|
if (computedStyle.width === '0px') {
|
|
14743
|
-
return;
|
|
14803
|
+
return {};
|
|
14744
14804
|
}
|
|
14745
14805
|
|
|
14746
14806
|
const inputShallow = shadowRef.current;
|
|
@@ -14777,30 +14837,77 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14777
14837
|
|
|
14778
14838
|
const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);
|
|
14779
14839
|
const overflow = Math.abs(outerHeight - innerHeight) <= 1;
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
return {
|
|
14786
|
-
overflow,
|
|
14787
|
-
outerHeightStyle
|
|
14788
|
-
};
|
|
14789
|
-
}
|
|
14840
|
+
return {
|
|
14841
|
+
outerHeightStyle,
|
|
14842
|
+
overflow
|
|
14843
|
+
};
|
|
14844
|
+
}, [maxRows, minRows, props.placeholder]);
|
|
14790
14845
|
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14846
|
+
const updateState = (prevState, newState) => {
|
|
14847
|
+
const {
|
|
14848
|
+
outerHeightStyle,
|
|
14849
|
+
overflow
|
|
14850
|
+
} = newState; // Need a large enough difference to update the height.
|
|
14851
|
+
// This prevents infinite rendering loop.
|
|
14852
|
+
|
|
14853
|
+
if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {
|
|
14854
|
+
renders.current += 1;
|
|
14855
|
+
return {
|
|
14856
|
+
overflow,
|
|
14857
|
+
outerHeightStyle
|
|
14858
|
+
};
|
|
14859
|
+
}
|
|
14860
|
+
|
|
14861
|
+
{
|
|
14862
|
+
if (renders.current === 20) {
|
|
14863
|
+
console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\n'));
|
|
14795
14864
|
}
|
|
14865
|
+
}
|
|
14866
|
+
|
|
14867
|
+
return prevState;
|
|
14868
|
+
};
|
|
14869
|
+
|
|
14870
|
+
const syncHeight = React__namespace.useCallback(() => {
|
|
14871
|
+
const newState = getUpdatedState();
|
|
14796
14872
|
|
|
14797
|
-
|
|
14873
|
+
if (isEmpty$1(newState)) {
|
|
14874
|
+
return;
|
|
14875
|
+
}
|
|
14876
|
+
|
|
14877
|
+
setState(prevState => {
|
|
14878
|
+
return updateState(prevState, newState);
|
|
14798
14879
|
});
|
|
14799
|
-
}, [
|
|
14880
|
+
}, [getUpdatedState]);
|
|
14881
|
+
|
|
14882
|
+
const syncHeightWithFlushSycn = () => {
|
|
14883
|
+
const newState = getUpdatedState();
|
|
14884
|
+
|
|
14885
|
+
if (isEmpty$1(newState)) {
|
|
14886
|
+
return;
|
|
14887
|
+
} // In React 18, state updates in a ResizeObserver's callback are happening after the paint which causes flickering
|
|
14888
|
+
// when doing some visual updates in it. Using flushSync ensures that the dom will be painted after the states updates happen
|
|
14889
|
+
// Related issue - https://github.com/facebook/react/issues/24331
|
|
14890
|
+
|
|
14891
|
+
|
|
14892
|
+
ReactDOM.flushSync(() => {
|
|
14893
|
+
setState(prevState => {
|
|
14894
|
+
return updateState(prevState, newState);
|
|
14895
|
+
});
|
|
14896
|
+
});
|
|
14897
|
+
};
|
|
14898
|
+
|
|
14800
14899
|
React__namespace.useEffect(() => {
|
|
14801
14900
|
const handleResize = debounce$1(() => {
|
|
14802
|
-
renders.current = 0;
|
|
14803
|
-
|
|
14901
|
+
renders.current = 0; // If the TextareaAutosize component is replaced by Suspense with a fallback, the last
|
|
14902
|
+
// ResizeObserver's handler that runs because of the change in the layout is trying to
|
|
14903
|
+
// access a dom node that is no longer there (as the fallback component is being shown instead).
|
|
14904
|
+
// See https://github.com/mui/material-ui/issues/32640
|
|
14905
|
+
// TODO: Add tests that will ensure the component is not failing when
|
|
14906
|
+
// replaced by Suspense with a fallback, once React is updated to version 18
|
|
14907
|
+
|
|
14908
|
+
if (inputRef.current) {
|
|
14909
|
+
syncHeightWithFlushSycn();
|
|
14910
|
+
}
|
|
14804
14911
|
});
|
|
14805
14912
|
const containerWindow = ownerWindow(inputRef.current);
|
|
14806
14913
|
containerWindow.addEventListener('resize', handleResize);
|
|
@@ -14819,7 +14926,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14819
14926
|
resizeObserver.disconnect();
|
|
14820
14927
|
}
|
|
14821
14928
|
};
|
|
14822
|
-
}
|
|
14929
|
+
});
|
|
14823
14930
|
useEnhancedEffect$1(() => {
|
|
14824
14931
|
syncHeight();
|
|
14825
14932
|
});
|
|
@@ -16016,7 +16123,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16016
16123
|
palette: lightPalette,
|
|
16017
16124
|
opacity: _extends({
|
|
16018
16125
|
inputPlaceholder: 0.42,
|
|
16019
|
-
|
|
16126
|
+
inputUnderline: 0.42,
|
|
16020
16127
|
switchTrackDisabled: 0.12,
|
|
16021
16128
|
switchTrack: 0.38
|
|
16022
16129
|
}, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity),
|
|
@@ -16026,7 +16133,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16026
16133
|
palette: darkPalette,
|
|
16027
16134
|
opacity: _extends({
|
|
16028
16135
|
inputPlaceholder: 0.5,
|
|
16029
|
-
|
|
16136
|
+
inputUnderline: 0.7,
|
|
16030
16137
|
switchTrackDisabled: 0.2,
|
|
16031
16138
|
switchTrack: 0.3
|
|
16032
16139
|
}, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
|
|
@@ -16047,9 +16154,29 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16047
16154
|
} // assign component variables
|
|
16048
16155
|
|
|
16049
16156
|
|
|
16050
|
-
assignNode(palette, ['AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
16157
|
+
assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
16051
16158
|
|
|
16052
16159
|
if (key === 'light') {
|
|
16160
|
+
setColor(palette.Alert, 'errorColor', darken(palette.error.light, 0.6));
|
|
16161
|
+
setColor(palette.Alert, 'infoColor', darken(palette.info.light, 0.6));
|
|
16162
|
+
setColor(palette.Alert, 'successColor', darken(palette.success.light, 0.6));
|
|
16163
|
+
setColor(palette.Alert, 'warningColor', darken(palette.warning.light, 0.6));
|
|
16164
|
+
setColor(palette.Alert, 'errorFilledBg', 'var(--mui-palette-error-main)');
|
|
16165
|
+
setColor(palette.Alert, 'infoFilledBg', 'var(--mui-palette-info-main)');
|
|
16166
|
+
setColor(palette.Alert, 'successFilledBg', 'var(--mui-palette-success-main)');
|
|
16167
|
+
setColor(palette.Alert, 'warningFilledBg', 'var(--mui-palette-warning-main)');
|
|
16168
|
+
setColor(palette.Alert, 'errorFilledColor', lightPalette.getContrastText(palette.error.main));
|
|
16169
|
+
setColor(palette.Alert, 'infoFilledColor', lightPalette.getContrastText(palette.info.main));
|
|
16170
|
+
setColor(palette.Alert, 'successFilledColor', lightPalette.getContrastText(palette.success.main));
|
|
16171
|
+
setColor(palette.Alert, 'warningFilledColor', lightPalette.getContrastText(palette.warning.main));
|
|
16172
|
+
setColor(palette.Alert, 'errorStandardBg', lighten(palette.error.light, 0.9));
|
|
16173
|
+
setColor(palette.Alert, 'infoStandardBg', lighten(palette.info.light, 0.9));
|
|
16174
|
+
setColor(palette.Alert, 'successStandardBg', lighten(palette.success.light, 0.9));
|
|
16175
|
+
setColor(palette.Alert, 'warningStandardBg', lighten(palette.warning.light, 0.9));
|
|
16176
|
+
setColor(palette.Alert, 'errorIconColor', 'var(--mui-palette-error-light)');
|
|
16177
|
+
setColor(palette.Alert, 'infoIconColor', 'var(--mui-palette-info-light)');
|
|
16178
|
+
setColor(palette.Alert, 'successIconColor', 'var(--mui-palette-success-light)');
|
|
16179
|
+
setColor(palette.Alert, 'warningIconColor', 'var(--mui-palette-warning-light)');
|
|
16053
16180
|
setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-100)');
|
|
16054
16181
|
setColor(palette.Avatar, 'defaultBg', 'var(--mui-palette-grey-400)');
|
|
16055
16182
|
setColor(palette.Chip, 'defaultBorder', 'var(--mui-palette-grey-400)');
|
|
@@ -16086,6 +16213,26 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16086
16213
|
setColor(palette.TableCell, 'border', lighten(alpha(palette.divider, 1), 0.88));
|
|
16087
16214
|
setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
|
|
16088
16215
|
} else {
|
|
16216
|
+
setColor(palette.Alert, 'errorColor', lighten(palette.error.light, 0.6));
|
|
16217
|
+
setColor(palette.Alert, 'infoColor', lighten(palette.info.light, 0.6));
|
|
16218
|
+
setColor(palette.Alert, 'successColor', lighten(palette.success.light, 0.6));
|
|
16219
|
+
setColor(palette.Alert, 'warningColor', lighten(palette.warning.light, 0.6));
|
|
16220
|
+
setColor(palette.Alert, 'errorFilledBg', 'var(--mui-palette-error-dark)');
|
|
16221
|
+
setColor(palette.Alert, 'infoFilledBg', 'var(--mui-palette-info-dark)');
|
|
16222
|
+
setColor(palette.Alert, 'successFilledBg', 'var(--mui-palette-success-dark)');
|
|
16223
|
+
setColor(palette.Alert, 'warningFilledBg', 'var(--mui-palette-warning-dark)');
|
|
16224
|
+
setColor(palette.Alert, 'errorFilledColor', darkPalette.getContrastText(palette.error.dark));
|
|
16225
|
+
setColor(palette.Alert, 'infoFilledColor', darkPalette.getContrastText(palette.info.dark));
|
|
16226
|
+
setColor(palette.Alert, 'successFilledColor', darkPalette.getContrastText(palette.success.dark));
|
|
16227
|
+
setColor(palette.Alert, 'warningFilledColor', darkPalette.getContrastText(palette.warning.dark));
|
|
16228
|
+
setColor(palette.Alert, 'errorStandardBg', darken(palette.error.light, 0.9));
|
|
16229
|
+
setColor(palette.Alert, 'infoStandardBg', darken(palette.info.light, 0.9));
|
|
16230
|
+
setColor(palette.Alert, 'successStandardBg', darken(palette.success.light, 0.9));
|
|
16231
|
+
setColor(palette.Alert, 'warningStandardBg', darken(palette.warning.light, 0.9));
|
|
16232
|
+
setColor(palette.Alert, 'errorIconColor', 'var(--mui-palette-error-main)');
|
|
16233
|
+
setColor(palette.Alert, 'infoIconColor', 'var(--mui-palette-info-main)');
|
|
16234
|
+
setColor(palette.Alert, 'successIconColor', 'var(--mui-palette-success-main)');
|
|
16235
|
+
setColor(palette.Alert, 'warningIconColor', 'var(--mui-palette-warning-main)');
|
|
16089
16236
|
setColor(palette.AppBar, 'defaultBg', 'var(--mui-palette-grey-900)');
|
|
16090
16237
|
setColor(palette.AppBar, 'darkBg', 'var(--mui-palette-background-paper)'); // specific for dark mode
|
|
16091
16238
|
|
|
@@ -16194,7 +16341,11 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16194
16341
|
|
|
16195
16342
|
return newTheme;
|
|
16196
16343
|
},
|
|
16197
|
-
shouldSkipGeneratingVar: keys =>
|
|
16344
|
+
shouldSkipGeneratingVar: keys => {
|
|
16345
|
+
var _keys$;
|
|
16346
|
+
|
|
16347
|
+
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
16348
|
+
}
|
|
16198
16349
|
});
|
|
16199
16350
|
|
|
16200
16351
|
function getSvgIconUtilityClass(slot) {
|
|
@@ -19736,22 +19887,30 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
19736
19887
|
display: 'flex',
|
|
19737
19888
|
padding: '6px 16px'
|
|
19738
19889
|
}, color && ownerState.variant === 'standard' && {
|
|
19739
|
-
color: getColor(theme.palette[color].light, 0.6),
|
|
19740
|
-
backgroundColor: getBackgroundColor(theme.palette[color].light, 0.9),
|
|
19741
|
-
[`& .${alertClasses$1.icon}`]: {
|
|
19890
|
+
color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
|
|
19891
|
+
backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
|
|
19892
|
+
[`& .${alertClasses$1.icon}`]: theme.vars ? {
|
|
19893
|
+
color: theme.vars.palette.Alert[`${color}IconColor`]
|
|
19894
|
+
} : {
|
|
19742
19895
|
color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light
|
|
19743
19896
|
}
|
|
19744
19897
|
}, color && ownerState.variant === 'outlined' && {
|
|
19745
|
-
color: getColor(theme.palette[color].light, 0.6),
|
|
19746
|
-
border: `1px solid ${theme.palette[color].light}`,
|
|
19747
|
-
[`& .${alertClasses$1.icon}`]: {
|
|
19898
|
+
color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
|
|
19899
|
+
border: `1px solid ${(theme.vars || theme).palette[color].light}`,
|
|
19900
|
+
[`& .${alertClasses$1.icon}`]: theme.vars ? {
|
|
19901
|
+
color: theme.vars.palette.Alert[`${color}IconColor`]
|
|
19902
|
+
} : {
|
|
19748
19903
|
color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light
|
|
19749
19904
|
}
|
|
19750
|
-
}, color && ownerState.variant === 'filled' && {
|
|
19751
|
-
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
|
|
19905
|
+
}, color && ownerState.variant === 'filled' && _extends({
|
|
19906
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
19907
|
+
}, theme.vars ? {
|
|
19908
|
+
color: theme.vars.palette.Alert[`${color}FilledColor`],
|
|
19909
|
+
backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
|
|
19910
|
+
} : {
|
|
19911
|
+
backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
|
|
19912
|
+
color: theme.palette.getContrastText(theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main)
|
|
19913
|
+
}));
|
|
19755
19914
|
});
|
|
19756
19915
|
const AlertIcon = styled$1('div', {
|
|
19757
19916
|
name: 'MuiAlert',
|
|
@@ -29822,7 +29981,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29822
29981
|
|
|
29823
29982
|
},
|
|
29824
29983
|
'&:before': {
|
|
29825
|
-
borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.
|
|
29984
|
+
borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
|
|
29826
29985
|
left: 0,
|
|
29827
29986
|
bottom: 0,
|
|
29828
29987
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -33529,7 +33688,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
33529
33688
|
let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
33530
33689
|
|
|
33531
33690
|
if (theme.vars) {
|
|
33532
|
-
bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.
|
|
33691
|
+
bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;
|
|
33533
33692
|
}
|
|
33534
33693
|
|
|
33535
33694
|
return _extends({
|
|
@@ -38316,12 +38475,27 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
38316
38475
|
muiFormControl,
|
|
38317
38476
|
states: ['required']
|
|
38318
38477
|
});
|
|
38478
|
+
|
|
38479
|
+
const ownerState = _extends({}, props, {
|
|
38480
|
+
color: fcs.color || 'primary',
|
|
38481
|
+
disabled: fcs.disabled,
|
|
38482
|
+
error: fcs.error,
|
|
38483
|
+
focused: fcs.focused,
|
|
38484
|
+
formControl: muiFormControl,
|
|
38485
|
+
fullWidth,
|
|
38486
|
+
hiddenLabel: fcs.hiddenLabel,
|
|
38487
|
+
multiline,
|
|
38488
|
+
size: fcs.size,
|
|
38489
|
+
type
|
|
38490
|
+
});
|
|
38491
|
+
|
|
38319
38492
|
return /*#__PURE__*/jsxRuntime_1(InputBase$1, _extends({
|
|
38320
38493
|
components: _extends({
|
|
38321
38494
|
Root: OutlinedInputRoot,
|
|
38322
38495
|
Input: OutlinedInputInput
|
|
38323
38496
|
}, components),
|
|
38324
38497
|
renderSuffix: state => /*#__PURE__*/jsxRuntime_1(NotchedOutlineRoot, {
|
|
38498
|
+
ownerState: ownerState,
|
|
38325
38499
|
className: classes.notchedOutline,
|
|
38326
38500
|
label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
38327
38501
|
children: [label, "\xA0", '*']
|
|
@@ -42327,14 +42501,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
42327
42501
|
* @default {}
|
|
42328
42502
|
*/
|
|
42329
42503
|
componentsProps: PropTypes.shape({
|
|
42330
|
-
input: PropTypes.object,
|
|
42331
|
-
mark: PropTypes.object,
|
|
42332
|
-
markLabel: PropTypes.object,
|
|
42333
|
-
rail: PropTypes.object,
|
|
42334
|
-
root: PropTypes.object,
|
|
42335
|
-
thumb: PropTypes.object,
|
|
42336
|
-
track: PropTypes.object,
|
|
42337
|
-
valueLabel: PropTypes.shape({
|
|
42504
|
+
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
42505
|
+
mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
42506
|
+
markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
42507
|
+
rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
42508
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
42509
|
+
thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
42510
|
+
track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
42511
|
+
valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
42338
42512
|
children: PropTypes.element,
|
|
42339
42513
|
className: PropTypes.string,
|
|
42340
42514
|
components: PropTypes.shape({
|
|
@@ -42344,7 +42518,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
42344
42518
|
style: PropTypes.object,
|
|
42345
42519
|
value: PropTypes.number,
|
|
42346
42520
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
42347
|
-
})
|
|
42521
|
+
})])
|
|
42348
42522
|
}),
|
|
42349
42523
|
|
|
42350
42524
|
/**
|
|
@@ -50265,8 +50439,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
50265
50439
|
});
|
|
50266
50440
|
React__namespace.useEffect(() => {
|
|
50267
50441
|
const handleResize = debounce$1(() => {
|
|
50268
|
-
|
|
50269
|
-
|
|
50442
|
+
// If the Tabs component is replaced by Suspense with a fallback, the last
|
|
50443
|
+
// ResizeObserver's handler that runs because of the change in the layout is trying to
|
|
50444
|
+
// access a dom node that is no longer there (as the fallback component is being shown instead).
|
|
50445
|
+
// See https://github.com/mui/material-ui/issues/33276
|
|
50446
|
+
// TODO: Add tests that will ensure the component is not failing when
|
|
50447
|
+
// replaced by Suspense with a fallback, once React is updated to version 18
|
|
50448
|
+
if (tabsRef.current) {
|
|
50449
|
+
updateIndicatorState();
|
|
50450
|
+
updateScrollButtonState();
|
|
50451
|
+
}
|
|
50270
50452
|
});
|
|
50271
50453
|
const win = ownerWindow(tabsRef.current);
|
|
50272
50454
|
win.addEventListener('resize', handleResize);
|