@mui/material 5.11.16 → 5.12.1
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/Autocomplete.js +2 -2
- package/Autocomplete/autocompleteClasses.d.ts +56 -56
- 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/Box/Box.js +2 -0
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.js +4 -2
- 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 +147 -22
- 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/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/filledInputClasses.d.ts +42 -40
- package/FormControl/FormControlContext.d.ts +17 -17
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControl/useFormControl.d.ts +2 -2
- package/FormControlLabel/FormControlLabel.d.ts +4 -0
- package/FormControlLabel/FormControlLabel.js +34 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +24 -20
- package/FormControlLabel/formControlLabelClasses.js +1 -1
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/GlobalStyles/GlobalStyles.js +4 -4
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +34 -34
- 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/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/Menu.js +1 -1
- 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 +34 -34
- package/OutlinedInput/outlinedInputClasses.d.ts +38 -36
- package/OverridableComponent.d.ts +1 -1
- 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 +55 -55
- package/Popper/Popper.js +0 -4
- package/README.md +5 -5
- 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/Select.d.ts +1 -1
- package/Select/Select.js +1 -1
- package/Select/selectClasses.d.ts +32 -32
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/SliderValueLabel.d.ts +15 -15
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/sliderClasses.d.ts +58 -58
- 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/Stack/Stack.d.ts +1 -1
- package/Stack/Stack.js +1 -1
- package/Stack/stackClasses.d.ts +6 -6
- 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/ScrollbarSize.js +2 -2
- package/Tabs/Tabs.js +1 -1
- 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/Toolbar.d.ts +1 -1
- package/Toolbar/Toolbar.js +1 -1
- package/Toolbar/toolbarClasses.d.ts +14 -14
- 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/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/darkScrollbar/index.js +1 -1
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Autocomplete/Autocomplete.js +2 -2
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Box/Box.js +2 -0
- package/legacy/Button/Button.js +4 -2
- package/legacy/FormControlLabel/FormControlLabel.js +35 -14
- package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
- package/legacy/GlobalStyles/GlobalStyles.js +4 -4
- package/legacy/Menu/Menu.js +1 -1
- package/legacy/Popper/Popper.js +0 -4
- package/legacy/Select/Select.js +1 -1
- package/legacy/Stack/Stack.js +1 -1
- package/legacy/Tabs/ScrollbarSize.js +2 -2
- package/legacy/Tabs/Tabs.js +1 -1
- package/legacy/Toolbar/Toolbar.js +1 -1
- package/legacy/darkScrollbar/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +2 -0
- package/legacy/styles/ThemeProvider.js +26 -1
- package/legacy/styles/experimental_extendTheme.js +5 -1
- package/legacy/styles/identifier.js +1 -0
- package/legacy/styles/index.js +1 -0
- package/legacy/styles/styled.js +2 -0
- package/legacy/styles/useTheme.js +2 -1
- package/legacy/styles/useThemeProps.js +3 -1
- package/locale/index.d.ts +76 -76
- package/modern/Autocomplete/Autocomplete.js +2 -2
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Box/Box.js +2 -0
- package/modern/Button/Button.js +100 -96
- package/modern/FormControlLabel/FormControlLabel.js +33 -13
- package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
- package/modern/GlobalStyles/GlobalStyles.js +4 -4
- package/modern/Menu/Menu.js +1 -1
- package/modern/Popper/Popper.js +0 -4
- package/modern/Select/Select.js +1 -1
- package/modern/Stack/Stack.js +1 -1
- package/modern/Tabs/ScrollbarSize.js +2 -2
- package/modern/Tabs/Tabs.js +1 -1
- package/modern/Toolbar/Toolbar.js +1 -1
- package/modern/darkScrollbar/index.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +2 -0
- package/modern/styles/ThemeProvider.js +29 -1
- package/modern/styles/experimental_extendTheme.js +5 -1
- package/modern/styles/identifier.js +1 -0
- package/modern/styles/index.js +1 -0
- package/modern/styles/styled.js +2 -0
- package/modern/styles/useTheme.js +2 -1
- package/modern/styles/useThemeProps.js +3 -1
- package/node/Autocomplete/Autocomplete.js +2 -2
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Box/Box.js +2 -0
- package/node/Button/Button.js +4 -2
- package/node/FormControlLabel/FormControlLabel.js +35 -15
- package/node/FormControlLabel/formControlLabelClasses.js +1 -1
- package/node/GlobalStyles/GlobalStyles.js +4 -4
- package/node/Menu/Menu.js +1 -1
- package/node/Popper/Popper.js +0 -4
- package/node/Select/Select.js +1 -1
- package/node/Stack/Stack.js +1 -1
- package/node/Tabs/ScrollbarSize.js +1 -1
- package/node/Tabs/Tabs.js +1 -1
- package/node/Toolbar/Toolbar.js +1 -1
- package/node/darkScrollbar/index.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +2 -0
- package/node/styles/ThemeProvider.js +33 -7
- package/node/styles/experimental_extendTheme.js +5 -1
- package/node/styles/identifier.js +8 -0
- package/node/styles/index.js +8 -0
- package/node/styles/styled.js +2 -0
- package/node/styles/useTheme.js +2 -1
- package/node/styles/useThemeProps.js +3 -1
- package/package.json +6 -6
- package/styles/CssVarsProvider.d.ts +20 -15
- package/styles/CssVarsProvider.js +2 -0
- package/styles/ThemeProvider.js +29 -1
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/experimental_extendTheme.d.ts +8 -1
- package/styles/experimental_extendTheme.js +5 -1
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/styles/identifier.d.ts +2 -0
- package/styles/identifier.js +1 -0
- package/styles/index.d.ts +1 -0
- package/styles/index.js +1 -0
- package/styles/shouldSkipGeneratingVar.d.ts +1 -1
- package/styles/styled.js +2 -0
- package/styles/useTheme.js +2 -1
- package/styles/useThemeProps.js +3 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/types/OverridableComponentAugmentation.d.ts +31 -31
- package/umd/material-ui.development.js +672 -535
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +46 -46
- 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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v5.
|
|
2
|
+
* @mui/material v5.12.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -2358,6 +2358,8 @@
|
|
|
2358
2358
|
return result;
|
|
2359
2359
|
}
|
|
2360
2360
|
|
|
2361
|
+
var THEME_ID = '$$material';
|
|
2362
|
+
|
|
2361
2363
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2362
2364
|
if (source == null) return {};
|
|
2363
2365
|
var target = {};
|
|
@@ -2717,7 +2719,7 @@
|
|
|
2717
2719
|
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
2718
2720
|
|
|
2719
2721
|
if (unsafePseudoClasses) {
|
|
2720
|
-
var isNested = element.parent
|
|
2722
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
2721
2723
|
//
|
|
2722
2724
|
// considering this input:
|
|
2723
2725
|
// .a {
|
|
@@ -2733,7 +2735,7 @@
|
|
|
2733
2735
|
// .b {}
|
|
2734
2736
|
// }
|
|
2735
2737
|
|
|
2736
|
-
var commentContainer = isNested ?
|
|
2738
|
+
var commentContainer = isNested ? element.parent.children : // global rule at the root level
|
|
2737
2739
|
children;
|
|
2738
2740
|
|
|
2739
2741
|
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
@@ -5811,7 +5813,7 @@
|
|
|
5811
5813
|
function isEmpty$4(obj) {
|
|
5812
5814
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
5813
5815
|
}
|
|
5814
|
-
function GlobalStyles$
|
|
5816
|
+
function GlobalStyles$2(props) {
|
|
5815
5817
|
const {
|
|
5816
5818
|
styles,
|
|
5817
5819
|
defaultTheme = {}
|
|
@@ -5821,9 +5823,9 @@
|
|
|
5821
5823
|
styles: globalStyles
|
|
5822
5824
|
});
|
|
5823
5825
|
}
|
|
5824
|
-
GlobalStyles$
|
|
5826
|
+
GlobalStyles$2.propTypes = {
|
|
5825
5827
|
defaultTheme: PropTypes.object,
|
|
5826
|
-
styles: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func])
|
|
5828
|
+
styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])
|
|
5827
5829
|
} ;
|
|
5828
5830
|
|
|
5829
5831
|
function styled$3(tag, options) {
|
|
@@ -5850,6 +5852,90 @@
|
|
|
5850
5852
|
}
|
|
5851
5853
|
};
|
|
5852
5854
|
|
|
5855
|
+
const _excluded$2p = ["values", "unit", "step"];
|
|
5856
|
+
const sortBreakpointsValues = values => {
|
|
5857
|
+
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
5858
|
+
key,
|
|
5859
|
+
val: values[key]
|
|
5860
|
+
})) || [];
|
|
5861
|
+
// Sort in ascending order
|
|
5862
|
+
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
5863
|
+
return breakpointsAsArray.reduce((acc, obj) => {
|
|
5864
|
+
return _extends({}, acc, {
|
|
5865
|
+
[obj.key]: obj.val
|
|
5866
|
+
});
|
|
5867
|
+
}, {});
|
|
5868
|
+
};
|
|
5869
|
+
|
|
5870
|
+
// Keep in mind that @media is inclusive by the CSS specification.
|
|
5871
|
+
function createBreakpoints(breakpoints) {
|
|
5872
|
+
const {
|
|
5873
|
+
// The breakpoint **start** at this value.
|
|
5874
|
+
// For instance with the first breakpoint xs: [xs, sm).
|
|
5875
|
+
values = {
|
|
5876
|
+
xs: 0,
|
|
5877
|
+
// phone
|
|
5878
|
+
sm: 600,
|
|
5879
|
+
// tablet
|
|
5880
|
+
md: 900,
|
|
5881
|
+
// small laptop
|
|
5882
|
+
lg: 1200,
|
|
5883
|
+
// desktop
|
|
5884
|
+
xl: 1536 // large screen
|
|
5885
|
+
},
|
|
5886
|
+
|
|
5887
|
+
unit = 'px',
|
|
5888
|
+
step = 5
|
|
5889
|
+
} = breakpoints,
|
|
5890
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2p);
|
|
5891
|
+
const sortedValues = sortBreakpointsValues(values);
|
|
5892
|
+
const keys = Object.keys(sortedValues);
|
|
5893
|
+
function up(key) {
|
|
5894
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
5895
|
+
return `@media (min-width:${value}${unit})`;
|
|
5896
|
+
}
|
|
5897
|
+
function down(key) {
|
|
5898
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
5899
|
+
return `@media (max-width:${value - step / 100}${unit})`;
|
|
5900
|
+
}
|
|
5901
|
+
function between(start, end) {
|
|
5902
|
+
const endIndex = keys.indexOf(end);
|
|
5903
|
+
return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
|
|
5904
|
+
}
|
|
5905
|
+
function only(key) {
|
|
5906
|
+
if (keys.indexOf(key) + 1 < keys.length) {
|
|
5907
|
+
return between(key, keys[keys.indexOf(key) + 1]);
|
|
5908
|
+
}
|
|
5909
|
+
return up(key);
|
|
5910
|
+
}
|
|
5911
|
+
function not(key) {
|
|
5912
|
+
// handle first and last key separately, for better readability
|
|
5913
|
+
const keyIndex = keys.indexOf(key);
|
|
5914
|
+
if (keyIndex === 0) {
|
|
5915
|
+
return up(keys[1]);
|
|
5916
|
+
}
|
|
5917
|
+
if (keyIndex === keys.length - 1) {
|
|
5918
|
+
return down(keys[keyIndex]);
|
|
5919
|
+
}
|
|
5920
|
+
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
5921
|
+
}
|
|
5922
|
+
return _extends({
|
|
5923
|
+
keys,
|
|
5924
|
+
values: sortedValues,
|
|
5925
|
+
up,
|
|
5926
|
+
down,
|
|
5927
|
+
between,
|
|
5928
|
+
only,
|
|
5929
|
+
not,
|
|
5930
|
+
unit
|
|
5931
|
+
}, other);
|
|
5932
|
+
}
|
|
5933
|
+
|
|
5934
|
+
const shape = {
|
|
5935
|
+
borderRadius: 4
|
|
5936
|
+
};
|
|
5937
|
+
var shape$1 = shape;
|
|
5938
|
+
|
|
5853
5939
|
const responsivePropType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) ;
|
|
5854
5940
|
var responsivePropType$1 = responsivePropType;
|
|
5855
5941
|
|
|
@@ -6055,6 +6141,183 @@
|
|
|
6055
6141
|
return fn;
|
|
6056
6142
|
}
|
|
6057
6143
|
|
|
6144
|
+
function memoize(fn) {
|
|
6145
|
+
const cache = {};
|
|
6146
|
+
return arg => {
|
|
6147
|
+
if (cache[arg] === undefined) {
|
|
6148
|
+
cache[arg] = fn(arg);
|
|
6149
|
+
}
|
|
6150
|
+
return cache[arg];
|
|
6151
|
+
};
|
|
6152
|
+
}
|
|
6153
|
+
|
|
6154
|
+
const properties = {
|
|
6155
|
+
m: 'margin',
|
|
6156
|
+
p: 'padding'
|
|
6157
|
+
};
|
|
6158
|
+
const directions = {
|
|
6159
|
+
t: 'Top',
|
|
6160
|
+
r: 'Right',
|
|
6161
|
+
b: 'Bottom',
|
|
6162
|
+
l: 'Left',
|
|
6163
|
+
x: ['Left', 'Right'],
|
|
6164
|
+
y: ['Top', 'Bottom']
|
|
6165
|
+
};
|
|
6166
|
+
const aliases = {
|
|
6167
|
+
marginX: 'mx',
|
|
6168
|
+
marginY: 'my',
|
|
6169
|
+
paddingX: 'px',
|
|
6170
|
+
paddingY: 'py'
|
|
6171
|
+
};
|
|
6172
|
+
|
|
6173
|
+
// memoize() impact:
|
|
6174
|
+
// From 300,000 ops/sec
|
|
6175
|
+
// To 350,000 ops/sec
|
|
6176
|
+
const getCssProperties = memoize(prop => {
|
|
6177
|
+
// It's not a shorthand notation.
|
|
6178
|
+
if (prop.length > 2) {
|
|
6179
|
+
if (aliases[prop]) {
|
|
6180
|
+
prop = aliases[prop];
|
|
6181
|
+
} else {
|
|
6182
|
+
return [prop];
|
|
6183
|
+
}
|
|
6184
|
+
}
|
|
6185
|
+
const [a, b] = prop.split('');
|
|
6186
|
+
const property = properties[a];
|
|
6187
|
+
const direction = directions[b] || '';
|
|
6188
|
+
return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];
|
|
6189
|
+
});
|
|
6190
|
+
const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];
|
|
6191
|
+
const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
|
|
6192
|
+
const spacingKeys = [...marginKeys, ...paddingKeys];
|
|
6193
|
+
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
6194
|
+
var _getPath;
|
|
6195
|
+
const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
|
|
6196
|
+
if (typeof themeSpacing === 'number') {
|
|
6197
|
+
return abs => {
|
|
6198
|
+
if (typeof abs === 'string') {
|
|
6199
|
+
return abs;
|
|
6200
|
+
}
|
|
6201
|
+
{
|
|
6202
|
+
if (typeof abs !== 'number') {
|
|
6203
|
+
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
return themeSpacing * abs;
|
|
6207
|
+
};
|
|
6208
|
+
}
|
|
6209
|
+
if (Array.isArray(themeSpacing)) {
|
|
6210
|
+
return abs => {
|
|
6211
|
+
if (typeof abs === 'string') {
|
|
6212
|
+
return abs;
|
|
6213
|
+
}
|
|
6214
|
+
{
|
|
6215
|
+
if (!Number.isInteger(abs)) {
|
|
6216
|
+
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
|
|
6217
|
+
} else if (abs > themeSpacing.length - 1) {
|
|
6218
|
+
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
return themeSpacing[abs];
|
|
6222
|
+
};
|
|
6223
|
+
}
|
|
6224
|
+
if (typeof themeSpacing === 'function') {
|
|
6225
|
+
return themeSpacing;
|
|
6226
|
+
}
|
|
6227
|
+
{
|
|
6228
|
+
console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
|
|
6229
|
+
}
|
|
6230
|
+
return () => undefined;
|
|
6231
|
+
}
|
|
6232
|
+
function createUnarySpacing(theme) {
|
|
6233
|
+
return createUnaryUnit(theme, 'spacing', 8, 'spacing');
|
|
6234
|
+
}
|
|
6235
|
+
function getValue(transformer, propValue) {
|
|
6236
|
+
if (typeof propValue === 'string' || propValue == null) {
|
|
6237
|
+
return propValue;
|
|
6238
|
+
}
|
|
6239
|
+
const abs = Math.abs(propValue);
|
|
6240
|
+
const transformed = transformer(abs);
|
|
6241
|
+
if (propValue >= 0) {
|
|
6242
|
+
return transformed;
|
|
6243
|
+
}
|
|
6244
|
+
if (typeof transformed === 'number') {
|
|
6245
|
+
return -transformed;
|
|
6246
|
+
}
|
|
6247
|
+
return `-${transformed}`;
|
|
6248
|
+
}
|
|
6249
|
+
function getStyleFromPropValue(cssProperties, transformer) {
|
|
6250
|
+
return propValue => cssProperties.reduce((acc, cssProperty) => {
|
|
6251
|
+
acc[cssProperty] = getValue(transformer, propValue);
|
|
6252
|
+
return acc;
|
|
6253
|
+
}, {});
|
|
6254
|
+
}
|
|
6255
|
+
function resolveCssProperty(props, keys, prop, transformer) {
|
|
6256
|
+
// Using a hash computation over an array iteration could be faster, but with only 28 items,
|
|
6257
|
+
// it's doesn't worth the bundle size.
|
|
6258
|
+
if (keys.indexOf(prop) === -1) {
|
|
6259
|
+
return null;
|
|
6260
|
+
}
|
|
6261
|
+
const cssProperties = getCssProperties(prop);
|
|
6262
|
+
const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
|
6263
|
+
const propValue = props[prop];
|
|
6264
|
+
return handleBreakpoints(props, propValue, styleFromPropValue);
|
|
6265
|
+
}
|
|
6266
|
+
function style$1(props, keys) {
|
|
6267
|
+
const transformer = createUnarySpacing(props.theme);
|
|
6268
|
+
return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});
|
|
6269
|
+
}
|
|
6270
|
+
function margin(props) {
|
|
6271
|
+
return style$1(props, marginKeys);
|
|
6272
|
+
}
|
|
6273
|
+
margin.propTypes = marginKeys.reduce((obj, key) => {
|
|
6274
|
+
obj[key] = responsivePropType$1;
|
|
6275
|
+
return obj;
|
|
6276
|
+
}, {}) ;
|
|
6277
|
+
margin.filterProps = marginKeys;
|
|
6278
|
+
function padding(props) {
|
|
6279
|
+
return style$1(props, paddingKeys);
|
|
6280
|
+
}
|
|
6281
|
+
padding.propTypes = paddingKeys.reduce((obj, key) => {
|
|
6282
|
+
obj[key] = responsivePropType$1;
|
|
6283
|
+
return obj;
|
|
6284
|
+
}, {}) ;
|
|
6285
|
+
padding.filterProps = paddingKeys;
|
|
6286
|
+
spacingKeys.reduce((obj, key) => {
|
|
6287
|
+
obj[key] = responsivePropType$1;
|
|
6288
|
+
return obj;
|
|
6289
|
+
}, {}) ;
|
|
6290
|
+
|
|
6291
|
+
/* tslint:enable:unified-signatures */
|
|
6292
|
+
|
|
6293
|
+
function createSpacing(spacingInput = 8) {
|
|
6294
|
+
// Already transformed.
|
|
6295
|
+
if (spacingInput.mui) {
|
|
6296
|
+
return spacingInput;
|
|
6297
|
+
}
|
|
6298
|
+
|
|
6299
|
+
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
6300
|
+
// Smaller components, such as icons, can align to a 4dp grid.
|
|
6301
|
+
// https://m2.material.io/design/layout/understanding-layout.html
|
|
6302
|
+
const transform = createUnarySpacing({
|
|
6303
|
+
spacing: spacingInput
|
|
6304
|
+
});
|
|
6305
|
+
const spacing = (...argsInput) => {
|
|
6306
|
+
{
|
|
6307
|
+
if (!(argsInput.length <= 4)) {
|
|
6308
|
+
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
6309
|
+
}
|
|
6310
|
+
}
|
|
6311
|
+
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
6312
|
+
return args.map(argument => {
|
|
6313
|
+
const output = transform(argument);
|
|
6314
|
+
return typeof output === 'number' ? `${output}px` : output;
|
|
6315
|
+
}).join(' ');
|
|
6316
|
+
};
|
|
6317
|
+
spacing.mui = true;
|
|
6318
|
+
return spacing;
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6058
6321
|
function compose(...styles) {
|
|
6059
6322
|
const handlers = styles.reduce((acc, style) => {
|
|
6060
6323
|
style.filterProps.forEach(prop => {
|
|
@@ -6078,153 +6341,6 @@
|
|
|
6078
6341
|
return fn;
|
|
6079
6342
|
}
|
|
6080
6343
|
|
|
6081
|
-
function memoize(fn) {
|
|
6082
|
-
const cache = {};
|
|
6083
|
-
return arg => {
|
|
6084
|
-
if (cache[arg] === undefined) {
|
|
6085
|
-
cache[arg] = fn(arg);
|
|
6086
|
-
}
|
|
6087
|
-
return cache[arg];
|
|
6088
|
-
};
|
|
6089
|
-
}
|
|
6090
|
-
|
|
6091
|
-
const properties = {
|
|
6092
|
-
m: 'margin',
|
|
6093
|
-
p: 'padding'
|
|
6094
|
-
};
|
|
6095
|
-
const directions = {
|
|
6096
|
-
t: 'Top',
|
|
6097
|
-
r: 'Right',
|
|
6098
|
-
b: 'Bottom',
|
|
6099
|
-
l: 'Left',
|
|
6100
|
-
x: ['Left', 'Right'],
|
|
6101
|
-
y: ['Top', 'Bottom']
|
|
6102
|
-
};
|
|
6103
|
-
const aliases = {
|
|
6104
|
-
marginX: 'mx',
|
|
6105
|
-
marginY: 'my',
|
|
6106
|
-
paddingX: 'px',
|
|
6107
|
-
paddingY: 'py'
|
|
6108
|
-
};
|
|
6109
|
-
|
|
6110
|
-
// memoize() impact:
|
|
6111
|
-
// From 300,000 ops/sec
|
|
6112
|
-
// To 350,000 ops/sec
|
|
6113
|
-
const getCssProperties = memoize(prop => {
|
|
6114
|
-
// It's not a shorthand notation.
|
|
6115
|
-
if (prop.length > 2) {
|
|
6116
|
-
if (aliases[prop]) {
|
|
6117
|
-
prop = aliases[prop];
|
|
6118
|
-
} else {
|
|
6119
|
-
return [prop];
|
|
6120
|
-
}
|
|
6121
|
-
}
|
|
6122
|
-
const [a, b] = prop.split('');
|
|
6123
|
-
const property = properties[a];
|
|
6124
|
-
const direction = directions[b] || '';
|
|
6125
|
-
return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];
|
|
6126
|
-
});
|
|
6127
|
-
const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];
|
|
6128
|
-
const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
|
|
6129
|
-
const spacingKeys = [...marginKeys, ...paddingKeys];
|
|
6130
|
-
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
6131
|
-
var _getPath;
|
|
6132
|
-
const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
|
|
6133
|
-
if (typeof themeSpacing === 'number') {
|
|
6134
|
-
return abs => {
|
|
6135
|
-
if (typeof abs === 'string') {
|
|
6136
|
-
return abs;
|
|
6137
|
-
}
|
|
6138
|
-
{
|
|
6139
|
-
if (typeof abs !== 'number') {
|
|
6140
|
-
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
|
|
6141
|
-
}
|
|
6142
|
-
}
|
|
6143
|
-
return themeSpacing * abs;
|
|
6144
|
-
};
|
|
6145
|
-
}
|
|
6146
|
-
if (Array.isArray(themeSpacing)) {
|
|
6147
|
-
return abs => {
|
|
6148
|
-
if (typeof abs === 'string') {
|
|
6149
|
-
return abs;
|
|
6150
|
-
}
|
|
6151
|
-
{
|
|
6152
|
-
if (!Number.isInteger(abs)) {
|
|
6153
|
-
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
|
|
6154
|
-
} else if (abs > themeSpacing.length - 1) {
|
|
6155
|
-
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
|
|
6156
|
-
}
|
|
6157
|
-
}
|
|
6158
|
-
return themeSpacing[abs];
|
|
6159
|
-
};
|
|
6160
|
-
}
|
|
6161
|
-
if (typeof themeSpacing === 'function') {
|
|
6162
|
-
return themeSpacing;
|
|
6163
|
-
}
|
|
6164
|
-
{
|
|
6165
|
-
console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
|
|
6166
|
-
}
|
|
6167
|
-
return () => undefined;
|
|
6168
|
-
}
|
|
6169
|
-
function createUnarySpacing(theme) {
|
|
6170
|
-
return createUnaryUnit(theme, 'spacing', 8, 'spacing');
|
|
6171
|
-
}
|
|
6172
|
-
function getValue(transformer, propValue) {
|
|
6173
|
-
if (typeof propValue === 'string' || propValue == null) {
|
|
6174
|
-
return propValue;
|
|
6175
|
-
}
|
|
6176
|
-
const abs = Math.abs(propValue);
|
|
6177
|
-
const transformed = transformer(abs);
|
|
6178
|
-
if (propValue >= 0) {
|
|
6179
|
-
return transformed;
|
|
6180
|
-
}
|
|
6181
|
-
if (typeof transformed === 'number') {
|
|
6182
|
-
return -transformed;
|
|
6183
|
-
}
|
|
6184
|
-
return `-${transformed}`;
|
|
6185
|
-
}
|
|
6186
|
-
function getStyleFromPropValue(cssProperties, transformer) {
|
|
6187
|
-
return propValue => cssProperties.reduce((acc, cssProperty) => {
|
|
6188
|
-
acc[cssProperty] = getValue(transformer, propValue);
|
|
6189
|
-
return acc;
|
|
6190
|
-
}, {});
|
|
6191
|
-
}
|
|
6192
|
-
function resolveCssProperty(props, keys, prop, transformer) {
|
|
6193
|
-
// Using a hash computation over an array iteration could be faster, but with only 28 items,
|
|
6194
|
-
// it's doesn't worth the bundle size.
|
|
6195
|
-
if (keys.indexOf(prop) === -1) {
|
|
6196
|
-
return null;
|
|
6197
|
-
}
|
|
6198
|
-
const cssProperties = getCssProperties(prop);
|
|
6199
|
-
const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
|
6200
|
-
const propValue = props[prop];
|
|
6201
|
-
return handleBreakpoints(props, propValue, styleFromPropValue);
|
|
6202
|
-
}
|
|
6203
|
-
function style$1(props, keys) {
|
|
6204
|
-
const transformer = createUnarySpacing(props.theme);
|
|
6205
|
-
return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});
|
|
6206
|
-
}
|
|
6207
|
-
function margin(props) {
|
|
6208
|
-
return style$1(props, marginKeys);
|
|
6209
|
-
}
|
|
6210
|
-
margin.propTypes = marginKeys.reduce((obj, key) => {
|
|
6211
|
-
obj[key] = responsivePropType$1;
|
|
6212
|
-
return obj;
|
|
6213
|
-
}, {}) ;
|
|
6214
|
-
margin.filterProps = marginKeys;
|
|
6215
|
-
function padding(props) {
|
|
6216
|
-
return style$1(props, paddingKeys);
|
|
6217
|
-
}
|
|
6218
|
-
padding.propTypes = paddingKeys.reduce((obj, key) => {
|
|
6219
|
-
obj[key] = responsivePropType$1;
|
|
6220
|
-
return obj;
|
|
6221
|
-
}, {}) ;
|
|
6222
|
-
padding.filterProps = paddingKeys;
|
|
6223
|
-
spacingKeys.reduce((obj, key) => {
|
|
6224
|
-
obj[key] = responsivePropType$1;
|
|
6225
|
-
return obj;
|
|
6226
|
-
}, {}) ;
|
|
6227
|
-
|
|
6228
6344
|
function borderTransform(value) {
|
|
6229
6345
|
if (typeof value !== 'number') {
|
|
6230
6346
|
return value;
|
|
@@ -6852,168 +6968,7 @@
|
|
|
6852
6968
|
styleFunctionSx.filterProps = ['sx'];
|
|
6853
6969
|
var styleFunctionSx$1 = styleFunctionSx;
|
|
6854
6970
|
|
|
6855
|
-
const _excluded$2o = ["
|
|
6856
|
-
const splitProps = props => {
|
|
6857
|
-
var _props$theme$unstable, _props$theme;
|
|
6858
|
-
const result = {
|
|
6859
|
-
systemProps: {},
|
|
6860
|
-
otherProps: {}
|
|
6861
|
-
};
|
|
6862
|
-
const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig$1;
|
|
6863
|
-
Object.keys(props).forEach(prop => {
|
|
6864
|
-
if (config[prop]) {
|
|
6865
|
-
result.systemProps[prop] = props[prop];
|
|
6866
|
-
} else {
|
|
6867
|
-
result.otherProps[prop] = props[prop];
|
|
6868
|
-
}
|
|
6869
|
-
});
|
|
6870
|
-
return result;
|
|
6871
|
-
};
|
|
6872
|
-
function extendSxProp(props) {
|
|
6873
|
-
const {
|
|
6874
|
-
sx: inSx
|
|
6875
|
-
} = props,
|
|
6876
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$2o);
|
|
6877
|
-
const {
|
|
6878
|
-
systemProps,
|
|
6879
|
-
otherProps
|
|
6880
|
-
} = splitProps(other);
|
|
6881
|
-
let finalSx;
|
|
6882
|
-
if (Array.isArray(inSx)) {
|
|
6883
|
-
finalSx = [systemProps, ...inSx];
|
|
6884
|
-
} else if (typeof inSx === 'function') {
|
|
6885
|
-
finalSx = (...args) => {
|
|
6886
|
-
const result = inSx(...args);
|
|
6887
|
-
if (!isPlainObject(result)) {
|
|
6888
|
-
return systemProps;
|
|
6889
|
-
}
|
|
6890
|
-
return _extends({}, systemProps, result);
|
|
6891
|
-
};
|
|
6892
|
-
} else {
|
|
6893
|
-
finalSx = _extends({}, systemProps, inSx);
|
|
6894
|
-
}
|
|
6895
|
-
return _extends({}, otherProps, {
|
|
6896
|
-
sx: finalSx
|
|
6897
|
-
});
|
|
6898
|
-
}
|
|
6899
|
-
|
|
6900
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
6901
|
-
|
|
6902
|
-
const _excluded$2n = ["values", "unit", "step"];
|
|
6903
|
-
const sortBreakpointsValues = values => {
|
|
6904
|
-
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
6905
|
-
key,
|
|
6906
|
-
val: values[key]
|
|
6907
|
-
})) || [];
|
|
6908
|
-
// Sort in ascending order
|
|
6909
|
-
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
6910
|
-
return breakpointsAsArray.reduce((acc, obj) => {
|
|
6911
|
-
return _extends({}, acc, {
|
|
6912
|
-
[obj.key]: obj.val
|
|
6913
|
-
});
|
|
6914
|
-
}, {});
|
|
6915
|
-
};
|
|
6916
|
-
|
|
6917
|
-
// Keep in mind that @media is inclusive by the CSS specification.
|
|
6918
|
-
function createBreakpoints(breakpoints) {
|
|
6919
|
-
const {
|
|
6920
|
-
// The breakpoint **start** at this value.
|
|
6921
|
-
// For instance with the first breakpoint xs: [xs, sm).
|
|
6922
|
-
values = {
|
|
6923
|
-
xs: 0,
|
|
6924
|
-
// phone
|
|
6925
|
-
sm: 600,
|
|
6926
|
-
// tablet
|
|
6927
|
-
md: 900,
|
|
6928
|
-
// small laptop
|
|
6929
|
-
lg: 1200,
|
|
6930
|
-
// desktop
|
|
6931
|
-
xl: 1536 // large screen
|
|
6932
|
-
},
|
|
6933
|
-
|
|
6934
|
-
unit = 'px',
|
|
6935
|
-
step = 5
|
|
6936
|
-
} = breakpoints,
|
|
6937
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2n);
|
|
6938
|
-
const sortedValues = sortBreakpointsValues(values);
|
|
6939
|
-
const keys = Object.keys(sortedValues);
|
|
6940
|
-
function up(key) {
|
|
6941
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
6942
|
-
return `@media (min-width:${value}${unit})`;
|
|
6943
|
-
}
|
|
6944
|
-
function down(key) {
|
|
6945
|
-
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
6946
|
-
return `@media (max-width:${value - step / 100}${unit})`;
|
|
6947
|
-
}
|
|
6948
|
-
function between(start, end) {
|
|
6949
|
-
const endIndex = keys.indexOf(end);
|
|
6950
|
-
return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;
|
|
6951
|
-
}
|
|
6952
|
-
function only(key) {
|
|
6953
|
-
if (keys.indexOf(key) + 1 < keys.length) {
|
|
6954
|
-
return between(key, keys[keys.indexOf(key) + 1]);
|
|
6955
|
-
}
|
|
6956
|
-
return up(key);
|
|
6957
|
-
}
|
|
6958
|
-
function not(key) {
|
|
6959
|
-
// handle first and last key separately, for better readability
|
|
6960
|
-
const keyIndex = keys.indexOf(key);
|
|
6961
|
-
if (keyIndex === 0) {
|
|
6962
|
-
return up(keys[1]);
|
|
6963
|
-
}
|
|
6964
|
-
if (keyIndex === keys.length - 1) {
|
|
6965
|
-
return down(keys[keyIndex]);
|
|
6966
|
-
}
|
|
6967
|
-
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
6968
|
-
}
|
|
6969
|
-
return _extends({
|
|
6970
|
-
keys,
|
|
6971
|
-
values: sortedValues,
|
|
6972
|
-
up,
|
|
6973
|
-
down,
|
|
6974
|
-
between,
|
|
6975
|
-
only,
|
|
6976
|
-
not,
|
|
6977
|
-
unit
|
|
6978
|
-
}, other);
|
|
6979
|
-
}
|
|
6980
|
-
|
|
6981
|
-
const shape = {
|
|
6982
|
-
borderRadius: 4
|
|
6983
|
-
};
|
|
6984
|
-
var shape$1 = shape;
|
|
6985
|
-
|
|
6986
|
-
/* tslint:enable:unified-signatures */
|
|
6987
|
-
|
|
6988
|
-
function createSpacing(spacingInput = 8) {
|
|
6989
|
-
// Already transformed.
|
|
6990
|
-
if (spacingInput.mui) {
|
|
6991
|
-
return spacingInput;
|
|
6992
|
-
}
|
|
6993
|
-
|
|
6994
|
-
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
|
|
6995
|
-
// Smaller components, such as icons, can align to a 4dp grid.
|
|
6996
|
-
// https://m2.material.io/design/layout/understanding-layout.html
|
|
6997
|
-
const transform = createUnarySpacing({
|
|
6998
|
-
spacing: spacingInput
|
|
6999
|
-
});
|
|
7000
|
-
const spacing = (...argsInput) => {
|
|
7001
|
-
{
|
|
7002
|
-
if (!(argsInput.length <= 4)) {
|
|
7003
|
-
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
7004
|
-
}
|
|
7005
|
-
}
|
|
7006
|
-
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
7007
|
-
return args.map(argument => {
|
|
7008
|
-
const output = transform(argument);
|
|
7009
|
-
return typeof output === 'number' ? `${output}px` : output;
|
|
7010
|
-
}).join(' ');
|
|
7011
|
-
};
|
|
7012
|
-
spacing.mui = true;
|
|
7013
|
-
return spacing;
|
|
7014
|
-
}
|
|
7015
|
-
|
|
7016
|
-
const _excluded$2m = ["breakpoints", "palette", "spacing", "shape"];
|
|
6971
|
+
const _excluded$2o = ["breakpoints", "palette", "spacing", "shape"];
|
|
7017
6972
|
function createTheme$1(options = {}, ...args) {
|
|
7018
6973
|
const {
|
|
7019
6974
|
breakpoints: breakpointsInput = {},
|
|
@@ -7021,7 +6976,7 @@
|
|
|
7021
6976
|
spacing: spacingInput,
|
|
7022
6977
|
shape: shapeInput = {}
|
|
7023
6978
|
} = options,
|
|
7024
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
6979
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2o);
|
|
7025
6980
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
7026
6981
|
const spacing = createSpacing(spacingInput);
|
|
7027
6982
|
let muiTheme = deepmerge({
|
|
@@ -7046,95 +7001,100 @@
|
|
|
7046
7001
|
return muiTheme;
|
|
7047
7002
|
}
|
|
7048
7003
|
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
ThemeContext.displayName = 'ThemeContext';
|
|
7004
|
+
function isObjectEmpty(obj) {
|
|
7005
|
+
return Object.keys(obj).length === 0;
|
|
7052
7006
|
}
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
const theme = React__namespace.useContext(ThemeContext$1);
|
|
7057
|
-
{
|
|
7058
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
7059
|
-
React__namespace.useDebugValue(theme);
|
|
7060
|
-
}
|
|
7061
|
-
return theme;
|
|
7007
|
+
function useTheme$3(defaultTheme = null) {
|
|
7008
|
+
const contextTheme = React__namespace.useContext(ThemeContext$2);
|
|
7009
|
+
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
|
|
7062
7010
|
}
|
|
7063
7011
|
|
|
7064
|
-
const
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
function mergeOuterLocalTheme(outerTheme, localTheme) {
|
|
7068
|
-
if (typeof localTheme === 'function') {
|
|
7069
|
-
const mergedTheme = localTheme(outerTheme);
|
|
7070
|
-
{
|
|
7071
|
-
if (!mergedTheme) {
|
|
7072
|
-
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
|
|
7073
|
-
}
|
|
7074
|
-
}
|
|
7075
|
-
return mergedTheme;
|
|
7076
|
-
}
|
|
7077
|
-
return _extends({}, outerTheme, localTheme);
|
|
7012
|
+
const systemDefaultTheme$1 = createTheme$1();
|
|
7013
|
+
function useTheme$2(defaultTheme = systemDefaultTheme$1) {
|
|
7014
|
+
return useTheme$3(defaultTheme);
|
|
7078
7015
|
}
|
|
7079
7016
|
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
const
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
} = props;
|
|
7090
|
-
const outerTheme = useTheme$3();
|
|
7091
|
-
{
|
|
7092
|
-
if (outerTheme === null && typeof localTheme === 'function') {
|
|
7093
|
-
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
|
7094
|
-
}
|
|
7095
|
-
}
|
|
7096
|
-
const theme = React__namespace.useMemo(() => {
|
|
7097
|
-
const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
|
|
7098
|
-
if (output != null) {
|
|
7099
|
-
output[nested] = outerTheme !== null;
|
|
7100
|
-
}
|
|
7101
|
-
return output;
|
|
7102
|
-
}, [localTheme, outerTheme]);
|
|
7103
|
-
return /*#__PURE__*/jsxRuntime_1(ThemeContext$1.Provider, {
|
|
7104
|
-
value: theme,
|
|
7105
|
-
children: children
|
|
7017
|
+
function GlobalStyles$1({
|
|
7018
|
+
styles,
|
|
7019
|
+
themeId,
|
|
7020
|
+
defaultTheme = {}
|
|
7021
|
+
}) {
|
|
7022
|
+
const upperTheme = useTheme$2(defaultTheme);
|
|
7023
|
+
const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;
|
|
7024
|
+
return /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
7025
|
+
styles: globalStyles
|
|
7106
7026
|
});
|
|
7107
7027
|
}
|
|
7108
|
-
|
|
7028
|
+
GlobalStyles$1.propTypes /* remove-proptypes */ = {
|
|
7029
|
+
// ----------------------------- Warning --------------------------------
|
|
7030
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
7031
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
7032
|
+
// ----------------------------------------------------------------------
|
|
7109
7033
|
/**
|
|
7110
|
-
*
|
|
7034
|
+
* @ignore
|
|
7111
7035
|
*/
|
|
7112
|
-
|
|
7036
|
+
defaultTheme: PropTypes.object,
|
|
7113
7037
|
/**
|
|
7114
|
-
*
|
|
7038
|
+
* @ignore
|
|
7115
7039
|
*/
|
|
7116
|
-
|
|
7040
|
+
styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),
|
|
7041
|
+
/**
|
|
7042
|
+
* @ignore
|
|
7043
|
+
*/
|
|
7044
|
+
themeId: PropTypes.string
|
|
7117
7045
|
} ;
|
|
7118
|
-
{
|
|
7119
|
-
ThemeProvider$1.propTypes = exactProp(ThemeProvider$1.propTypes) ;
|
|
7120
|
-
}
|
|
7121
7046
|
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7047
|
+
const _excluded$2n = ["sx"];
|
|
7048
|
+
const splitProps = props => {
|
|
7049
|
+
var _props$theme$unstable, _props$theme;
|
|
7050
|
+
const result = {
|
|
7051
|
+
systemProps: {},
|
|
7052
|
+
otherProps: {}
|
|
7053
|
+
};
|
|
7054
|
+
const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig$1;
|
|
7055
|
+
Object.keys(props).forEach(prop => {
|
|
7056
|
+
if (config[prop]) {
|
|
7057
|
+
result.systemProps[prop] = props[prop];
|
|
7058
|
+
} else {
|
|
7059
|
+
result.otherProps[prop] = props[prop];
|
|
7060
|
+
}
|
|
7061
|
+
});
|
|
7062
|
+
return result;
|
|
7063
|
+
};
|
|
7064
|
+
function extendSxProp(props) {
|
|
7065
|
+
const {
|
|
7066
|
+
sx: inSx
|
|
7067
|
+
} = props,
|
|
7068
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2n);
|
|
7069
|
+
const {
|
|
7070
|
+
systemProps,
|
|
7071
|
+
otherProps
|
|
7072
|
+
} = splitProps(other);
|
|
7073
|
+
let finalSx;
|
|
7074
|
+
if (Array.isArray(inSx)) {
|
|
7075
|
+
finalSx = [systemProps, ...inSx];
|
|
7076
|
+
} else if (typeof inSx === 'function') {
|
|
7077
|
+
finalSx = (...args) => {
|
|
7078
|
+
const result = inSx(...args);
|
|
7079
|
+
if (!isPlainObject(result)) {
|
|
7080
|
+
return systemProps;
|
|
7081
|
+
}
|
|
7082
|
+
return _extends({}, systemProps, result);
|
|
7083
|
+
};
|
|
7084
|
+
} else {
|
|
7085
|
+
finalSx = _extends({}, systemProps, inSx);
|
|
7086
|
+
}
|
|
7087
|
+
return _extends({}, otherProps, {
|
|
7088
|
+
sx: finalSx
|
|
7089
|
+
});
|
|
7128
7090
|
}
|
|
7129
7091
|
|
|
7130
|
-
|
|
7131
|
-
function useTheme$1(defaultTheme = systemDefaultTheme$1) {
|
|
7132
|
-
return useTheme$2(defaultTheme);
|
|
7133
|
-
}
|
|
7092
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
7134
7093
|
|
|
7135
|
-
const _excluded$
|
|
7094
|
+
const _excluded$2m = ["className", "component"];
|
|
7136
7095
|
function createBox(options = {}) {
|
|
7137
7096
|
const {
|
|
7097
|
+
themeId,
|
|
7138
7098
|
defaultTheme,
|
|
7139
7099
|
defaultClassName = 'MuiBox-root',
|
|
7140
7100
|
generateClassName
|
|
@@ -7143,24 +7103,24 @@
|
|
|
7143
7103
|
shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
|
|
7144
7104
|
})(styleFunctionSx$1);
|
|
7145
7105
|
const Box = /*#__PURE__*/React__namespace.forwardRef(function Box(inProps, ref) {
|
|
7146
|
-
const theme = useTheme$
|
|
7106
|
+
const theme = useTheme$2(defaultTheme);
|
|
7147
7107
|
const _extendSxProp = extendSxProp(inProps),
|
|
7148
7108
|
{
|
|
7149
7109
|
className,
|
|
7150
7110
|
component = 'div'
|
|
7151
7111
|
} = _extendSxProp,
|
|
7152
|
-
other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$
|
|
7112
|
+
other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2m);
|
|
7153
7113
|
return /*#__PURE__*/jsxRuntime_1(BoxRoot, _extends({
|
|
7154
7114
|
as: component,
|
|
7155
7115
|
ref: ref,
|
|
7156
7116
|
className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
|
7157
|
-
theme: theme
|
|
7117
|
+
theme: themeId ? theme[themeId] || theme : theme
|
|
7158
7118
|
}, other));
|
|
7159
7119
|
});
|
|
7160
7120
|
return Box;
|
|
7161
7121
|
}
|
|
7162
7122
|
|
|
7163
|
-
const _excluded$
|
|
7123
|
+
const _excluded$2l = ["variant"];
|
|
7164
7124
|
function isEmpty$3(string) {
|
|
7165
7125
|
return string.length === 0;
|
|
7166
7126
|
}
|
|
@@ -7174,7 +7134,7 @@
|
|
|
7174
7134
|
const {
|
|
7175
7135
|
variant
|
|
7176
7136
|
} = props,
|
|
7177
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
7137
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2l);
|
|
7178
7138
|
let classKey = variant || '';
|
|
7179
7139
|
Object.keys(other).sort().forEach(key => {
|
|
7180
7140
|
if (key === 'color') {
|
|
@@ -7186,9 +7146,7 @@
|
|
|
7186
7146
|
return classKey;
|
|
7187
7147
|
}
|
|
7188
7148
|
|
|
7189
|
-
const _excluded$
|
|
7190
|
-
_excluded2$d = ["theme"],
|
|
7191
|
-
_excluded3$1 = ["theme"];
|
|
7149
|
+
const _excluded$2k = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
|
7192
7150
|
function isEmpty$2(obj) {
|
|
7193
7151
|
return Object.keys(obj).length === 0;
|
|
7194
7152
|
}
|
|
@@ -7250,16 +7208,26 @@
|
|
|
7250
7208
|
const lowercaseFirstLetter = string => {
|
|
7251
7209
|
return string.charAt(0).toLowerCase() + string.slice(1);
|
|
7252
7210
|
};
|
|
7211
|
+
function resolveTheme({
|
|
7212
|
+
defaultTheme,
|
|
7213
|
+
theme,
|
|
7214
|
+
themeId
|
|
7215
|
+
}) {
|
|
7216
|
+
return isEmpty$2(theme) ? defaultTheme : theme[themeId] || theme;
|
|
7217
|
+
}
|
|
7253
7218
|
function createStyled(input = {}) {
|
|
7254
7219
|
const {
|
|
7220
|
+
themeId,
|
|
7255
7221
|
defaultTheme = systemDefaultTheme,
|
|
7256
7222
|
rootShouldForwardProp = shouldForwardProp,
|
|
7257
7223
|
slotShouldForwardProp = shouldForwardProp
|
|
7258
7224
|
} = input;
|
|
7259
7225
|
const systemSx = props => {
|
|
7260
|
-
const theme = isEmpty$2(props.theme) ? defaultTheme : props.theme;
|
|
7261
7226
|
return styleFunctionSx$1(_extends({}, props, {
|
|
7262
|
-
theme
|
|
7227
|
+
theme: resolveTheme(_extends({}, props, {
|
|
7228
|
+
defaultTheme,
|
|
7229
|
+
themeId
|
|
7230
|
+
}))
|
|
7263
7231
|
}));
|
|
7264
7232
|
};
|
|
7265
7233
|
systemSx.__mui_systemSx = true;
|
|
@@ -7273,7 +7241,7 @@
|
|
|
7273
7241
|
skipSx: inputSkipSx,
|
|
7274
7242
|
overridesResolver
|
|
7275
7243
|
} = inputOptions,
|
|
7276
|
-
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$
|
|
7244
|
+
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2k);
|
|
7277
7245
|
|
|
7278
7246
|
// if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
7279
7247
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
|
|
@@ -7303,20 +7271,22 @@
|
|
|
7303
7271
|
// On the server Emotion doesn't use React.forwardRef for creating components, so the created
|
|
7304
7272
|
// component stays as a function. This condition makes sure that we do not interpolate functions
|
|
7305
7273
|
// which are basically components used as a selectors.
|
|
7306
|
-
return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ?
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
}, other));
|
|
7274
|
+
return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? props => {
|
|
7275
|
+
return stylesArg(_extends({}, props, {
|
|
7276
|
+
theme: resolveTheme(_extends({}, props, {
|
|
7277
|
+
defaultTheme,
|
|
7278
|
+
themeId
|
|
7279
|
+
}))
|
|
7280
|
+
}));
|
|
7314
7281
|
} : stylesArg;
|
|
7315
7282
|
}) : [];
|
|
7316
7283
|
let transformedStyleArg = styleArg;
|
|
7317
7284
|
if (componentName && overridesResolver) {
|
|
7318
7285
|
expressionsWithDefaultTheme.push(props => {
|
|
7319
|
-
const theme =
|
|
7286
|
+
const theme = resolveTheme(_extends({}, props, {
|
|
7287
|
+
defaultTheme,
|
|
7288
|
+
themeId
|
|
7289
|
+
}));
|
|
7320
7290
|
const styleOverrides = getStyleOverrides(componentName, theme);
|
|
7321
7291
|
if (styleOverrides) {
|
|
7322
7292
|
const resolvedStyleOverrides = {};
|
|
@@ -7332,7 +7302,10 @@
|
|
|
7332
7302
|
}
|
|
7333
7303
|
if (componentName && !skipVariantsResolver) {
|
|
7334
7304
|
expressionsWithDefaultTheme.push(props => {
|
|
7335
|
-
const theme =
|
|
7305
|
+
const theme = resolveTheme(_extends({}, props, {
|
|
7306
|
+
defaultTheme,
|
|
7307
|
+
themeId
|
|
7308
|
+
}));
|
|
7336
7309
|
return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
|
|
7337
7310
|
});
|
|
7338
7311
|
}
|
|
@@ -7351,15 +7324,12 @@
|
|
|
7351
7324
|
// which are basically components used as a selectors.
|
|
7352
7325
|
styleArg.__emotion_real !== styleArg) {
|
|
7353
7326
|
// If the type is function, we need to define the default theme.
|
|
7354
|
-
transformedStyleArg =
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
theme: isEmpty$2(themeInput) ? defaultTheme : themeInput
|
|
7361
|
-
}, other));
|
|
7362
|
-
};
|
|
7327
|
+
transformedStyleArg = props => styleArg(_extends({}, props, {
|
|
7328
|
+
theme: resolveTheme(_extends({}, props, {
|
|
7329
|
+
defaultTheme,
|
|
7330
|
+
themeId
|
|
7331
|
+
}))
|
|
7332
|
+
}));
|
|
7363
7333
|
}
|
|
7364
7334
|
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
|
7365
7335
|
{
|
|
@@ -7372,6 +7342,9 @@
|
|
|
7372
7342
|
}
|
|
7373
7343
|
Component.displayName = displayName;
|
|
7374
7344
|
}
|
|
7345
|
+
if (tag.muiName) {
|
|
7346
|
+
Component.muiName = tag.muiName;
|
|
7347
|
+
}
|
|
7375
7348
|
return Component;
|
|
7376
7349
|
};
|
|
7377
7350
|
if (defaultStyledResolver.withConfig) {
|
|
@@ -7399,9 +7372,13 @@
|
|
|
7399
7372
|
function useThemeProps$1({
|
|
7400
7373
|
props,
|
|
7401
7374
|
name,
|
|
7402
|
-
defaultTheme
|
|
7375
|
+
defaultTheme,
|
|
7376
|
+
themeId
|
|
7403
7377
|
}) {
|
|
7404
|
-
|
|
7378
|
+
let theme = useTheme$2(defaultTheme);
|
|
7379
|
+
if (themeId) {
|
|
7380
|
+
theme = theme[themeId] || theme;
|
|
7381
|
+
}
|
|
7405
7382
|
const mergedProps = getThemeProps({
|
|
7406
7383
|
theme,
|
|
7407
7384
|
name,
|
|
@@ -7735,38 +7712,132 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7735
7712
|
}
|
|
7736
7713
|
}
|
|
7737
7714
|
|
|
7738
|
-
const
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7715
|
+
const ThemeContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
7716
|
+
{
|
|
7717
|
+
ThemeContext.displayName = 'ThemeContext';
|
|
7718
|
+
}
|
|
7719
|
+
var ThemeContext$1 = ThemeContext;
|
|
7720
|
+
|
|
7721
|
+
function useTheme$1() {
|
|
7722
|
+
const theme = React__namespace.useContext(ThemeContext$1);
|
|
7723
|
+
{
|
|
7724
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
7725
|
+
React__namespace.useDebugValue(theme);
|
|
7726
|
+
}
|
|
7727
|
+
return theme;
|
|
7728
|
+
}
|
|
7729
|
+
|
|
7730
|
+
const hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
7731
|
+
var nested = hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';
|
|
7732
|
+
|
|
7733
|
+
function mergeOuterLocalTheme(outerTheme, localTheme) {
|
|
7734
|
+
if (typeof localTheme === 'function') {
|
|
7735
|
+
const mergedTheme = localTheme(outerTheme);
|
|
7736
|
+
{
|
|
7737
|
+
if (!mergedTheme) {
|
|
7738
|
+
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
|
|
7739
|
+
}
|
|
7740
|
+
}
|
|
7741
|
+
return mergedTheme;
|
|
7742
|
+
}
|
|
7743
|
+
return _extends({}, outerTheme, localTheme);
|
|
7744
|
+
}
|
|
7745
|
+
|
|
7746
|
+
/**
|
|
7747
|
+
* This component takes a `theme` prop.
|
|
7748
|
+
* It makes the `theme` available down the React tree thanks to React context.
|
|
7749
|
+
* This component should preferably be used at **the root of your component tree**.
|
|
7750
|
+
*/
|
|
7751
|
+
function ThemeProvider$2(props) {
|
|
7752
|
+
const {
|
|
7753
|
+
children,
|
|
7754
|
+
theme: localTheme
|
|
7755
|
+
} = props;
|
|
7756
|
+
const outerTheme = useTheme$1();
|
|
7757
|
+
{
|
|
7758
|
+
if (outerTheme === null && typeof localTheme === 'function') {
|
|
7759
|
+
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
|
7760
|
+
}
|
|
7761
|
+
}
|
|
7762
|
+
const theme = React__namespace.useMemo(() => {
|
|
7763
|
+
const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
|
|
7764
|
+
if (output != null) {
|
|
7765
|
+
output[nested] = outerTheme !== null;
|
|
7766
|
+
}
|
|
7767
|
+
return output;
|
|
7768
|
+
}, [localTheme, outerTheme]);
|
|
7769
|
+
return /*#__PURE__*/jsxRuntime_1(ThemeContext$1.Provider, {
|
|
7770
|
+
value: theme,
|
|
7771
|
+
children: children
|
|
7744
7772
|
});
|
|
7745
7773
|
}
|
|
7746
|
-
|
|
7774
|
+
ThemeProvider$2.propTypes = {
|
|
7747
7775
|
/**
|
|
7748
7776
|
* Your component tree.
|
|
7749
7777
|
*/
|
|
7750
|
-
children: PropTypes.node
|
|
7778
|
+
children: PropTypes.node,
|
|
7779
|
+
/**
|
|
7780
|
+
* A theme object. You can provide a function to extend the outer theme.
|
|
7781
|
+
*/
|
|
7782
|
+
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
|
|
7751
7783
|
} ;
|
|
7784
|
+
{
|
|
7785
|
+
ThemeProvider$2.propTypes = exactProp(ThemeProvider$2.propTypes) ;
|
|
7786
|
+
}
|
|
7787
|
+
|
|
7788
|
+
const EMPTY_THEME = {};
|
|
7789
|
+
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
7790
|
+
return React__namespace.useMemo(() => {
|
|
7791
|
+
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
7792
|
+
if (typeof localTheme === 'function') {
|
|
7793
|
+
const mergedTheme = localTheme(resolvedTheme);
|
|
7794
|
+
const result = themeId ? _extends({}, upperTheme, {
|
|
7795
|
+
[themeId]: mergedTheme
|
|
7796
|
+
}) : mergedTheme;
|
|
7797
|
+
// must return a function for the private theme to NOT merge with the upper theme.
|
|
7798
|
+
// see the test case "use provided theme from a callback" in ThemeProvider.test.js
|
|
7799
|
+
if (isPrivate) {
|
|
7800
|
+
return () => result;
|
|
7801
|
+
}
|
|
7802
|
+
return result;
|
|
7803
|
+
}
|
|
7804
|
+
return themeId ? _extends({}, upperTheme, {
|
|
7805
|
+
[themeId]: localTheme
|
|
7806
|
+
}) : _extends({}, upperTheme, localTheme);
|
|
7807
|
+
}, [themeId, upperTheme, localTheme, isPrivate]);
|
|
7808
|
+
}
|
|
7752
7809
|
|
|
7753
7810
|
/**
|
|
7754
7811
|
* This component makes the `theme` available down the React tree.
|
|
7755
7812
|
* It should preferably be used at **the root of your component tree**.
|
|
7813
|
+
*
|
|
7814
|
+
* <ThemeProvider theme={theme}> // existing use case
|
|
7815
|
+
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
|
7756
7816
|
*/
|
|
7757
|
-
function ThemeProvider(props) {
|
|
7817
|
+
function ThemeProvider$1(props) {
|
|
7758
7818
|
const {
|
|
7759
7819
|
children,
|
|
7760
|
-
theme: localTheme
|
|
7761
|
-
} = props;
|
|
7762
|
-
return /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, {
|
|
7763
7820
|
theme: localTheme,
|
|
7764
|
-
|
|
7821
|
+
themeId
|
|
7822
|
+
} = props;
|
|
7823
|
+
const upperTheme = useTheme$3(EMPTY_THEME);
|
|
7824
|
+
const upperPrivateTheme = useTheme$1() || EMPTY_THEME;
|
|
7825
|
+
{
|
|
7826
|
+
if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {
|
|
7827
|
+
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
|
7828
|
+
}
|
|
7829
|
+
}
|
|
7830
|
+
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
7831
|
+
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
7832
|
+
return /*#__PURE__*/jsxRuntime_1(ThemeProvider$2, {
|
|
7833
|
+
theme: privateTheme,
|
|
7834
|
+
children: /*#__PURE__*/jsxRuntime_1(ThemeContext$2.Provider, {
|
|
7835
|
+
value: engineTheme,
|
|
7765
7836
|
children: children
|
|
7766
7837
|
})
|
|
7767
7838
|
});
|
|
7768
7839
|
}
|
|
7769
|
-
ThemeProvider.propTypes /* remove-proptypes */ = {
|
|
7840
|
+
ThemeProvider$1.propTypes /* remove-proptypes */ = {
|
|
7770
7841
|
// ----------------------------- Warning --------------------------------
|
|
7771
7842
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
7772
7843
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -7778,10 +7849,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7778
7849
|
/**
|
|
7779
7850
|
* A theme object. You can provide a function to extend the outer theme.
|
|
7780
7851
|
*/
|
|
7781
|
-
theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired
|
|
7852
|
+
theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,
|
|
7853
|
+
/**
|
|
7854
|
+
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
|
7855
|
+
*/
|
|
7856
|
+
themeId: PropTypes.string
|
|
7782
7857
|
} ;
|
|
7783
7858
|
{
|
|
7784
|
-
ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) ;
|
|
7859
|
+
ThemeProvider$1.propTypes = exactProp(ThemeProvider$1.propTypes) ;
|
|
7785
7860
|
}
|
|
7786
7861
|
|
|
7787
7862
|
const DEFAULT_MODE_STORAGE_KEY = 'mode';
|
|
@@ -8043,10 +8118,11 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8043
8118
|
});
|
|
8044
8119
|
}
|
|
8045
8120
|
|
|
8046
|
-
const _excluded$
|
|
8121
|
+
const _excluded$2j = ["colorSchemes", "components", "generateCssVars", "cssVarPrefix"];
|
|
8047
8122
|
const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
|
|
8048
8123
|
function createCssVarsProvider(options) {
|
|
8049
8124
|
const {
|
|
8125
|
+
themeId,
|
|
8050
8126
|
theme: defaultTheme = {},
|
|
8051
8127
|
attribute: defaultAttribute = DEFAULT_ATTRIBUTE,
|
|
8052
8128
|
modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
|
@@ -8085,10 +8161,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8085
8161
|
disableStyleSheetGeneration = false
|
|
8086
8162
|
}) {
|
|
8087
8163
|
const hasMounted = React__namespace.useRef(false);
|
|
8088
|
-
const upperTheme = useTheme$
|
|
8164
|
+
const upperTheme = useTheme$1();
|
|
8089
8165
|
const ctx = React__namespace.useContext(ColorSchemeContext);
|
|
8090
8166
|
const nested = !!ctx && !disableNestedContext;
|
|
8091
|
-
const
|
|
8167
|
+
const scopedTheme = themeProp[themeId];
|
|
8168
|
+
const _ref = scopedTheme || themeProp,
|
|
8169
|
+
{
|
|
8092
8170
|
colorSchemes = {},
|
|
8093
8171
|
components = {},
|
|
8094
8172
|
generateCssVars = () => ({
|
|
@@ -8096,8 +8174,8 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8096
8174
|
css: {}
|
|
8097
8175
|
}),
|
|
8098
8176
|
cssVarPrefix
|
|
8099
|
-
} =
|
|
8100
|
-
restThemeProp = _objectWithoutPropertiesLoose(
|
|
8177
|
+
} = _ref,
|
|
8178
|
+
restThemeProp = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
|
|
8101
8179
|
const allColorSchemes = Object.keys(colorSchemes);
|
|
8102
8180
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
8103
8181
|
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
@@ -8263,16 +8341,17 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8263
8341
|
}
|
|
8264
8342
|
const element = /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
8265
8343
|
children: [shouldGenerateStyleSheet && /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
8266
|
-
children: [/*#__PURE__*/jsxRuntime_1(GlobalStyles$
|
|
8344
|
+
children: [/*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
8267
8345
|
styles: {
|
|
8268
8346
|
[colorSchemeSelector]: rootCss
|
|
8269
8347
|
}
|
|
8270
|
-
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$
|
|
8348
|
+
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
8271
8349
|
styles: defaultColorSchemeStyleSheet
|
|
8272
|
-
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$
|
|
8350
|
+
}), /*#__PURE__*/jsxRuntime_1(GlobalStyles$2, {
|
|
8273
8351
|
styles: otherColorSchemesStyleSheet
|
|
8274
8352
|
})]
|
|
8275
|
-
}), /*#__PURE__*/jsxRuntime_1(ThemeProvider, {
|
|
8353
|
+
}), /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, {
|
|
8354
|
+
themeId: scopedTheme ? themeId : undefined,
|
|
8276
8355
|
theme: resolveTheme ? resolveTheme(theme) : theme,
|
|
8277
8356
|
children: children
|
|
8278
8357
|
})]
|
|
@@ -8516,14 +8595,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8516
8595
|
};
|
|
8517
8596
|
}
|
|
8518
8597
|
|
|
8519
|
-
const _excluded$
|
|
8598
|
+
const _excluded$2i = ["colorSchemes", "components"],
|
|
8520
8599
|
_excluded2$c = ["light"];
|
|
8521
8600
|
function prepareCssVars(theme, parserConfig) {
|
|
8522
8601
|
// @ts-ignore - ignore components do not exist
|
|
8523
8602
|
const {
|
|
8524
8603
|
colorSchemes = {}
|
|
8525
8604
|
} = theme,
|
|
8526
|
-
otherTheme = _objectWithoutPropertiesLoose(theme, _excluded$
|
|
8605
|
+
otherTheme = _objectWithoutPropertiesLoose(theme, _excluded$2i);
|
|
8527
8606
|
const {
|
|
8528
8607
|
vars: rootVars,
|
|
8529
8608
|
css: rootCss,
|
|
@@ -8563,11 +8642,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8563
8642
|
const generateCssVars = colorScheme => {
|
|
8564
8643
|
if (!colorScheme) {
|
|
8565
8644
|
return {
|
|
8566
|
-
css: rootCss,
|
|
8645
|
+
css: _extends({}, rootCss),
|
|
8567
8646
|
vars: rootVars
|
|
8568
8647
|
};
|
|
8569
8648
|
}
|
|
8570
|
-
return
|
|
8649
|
+
return {
|
|
8650
|
+
css: _extends({}, colorSchemesMap[colorScheme].css),
|
|
8651
|
+
vars: colorSchemesMap[colorScheme].vars
|
|
8652
|
+
};
|
|
8571
8653
|
};
|
|
8572
8654
|
return {
|
|
8573
8655
|
vars: themeVars,
|
|
@@ -8575,7 +8657,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8575
8657
|
};
|
|
8576
8658
|
}
|
|
8577
8659
|
|
|
8578
|
-
const _excluded$
|
|
8660
|
+
const _excluded$2h = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
|
|
8579
8661
|
const defaultTheme$6 = createTheme$1();
|
|
8580
8662
|
const defaultCreateStyledComponent$2 = systemStyled('div', {
|
|
8581
8663
|
name: 'MuiContainer',
|
|
@@ -8671,7 +8753,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8671
8753
|
fixed = false,
|
|
8672
8754
|
maxWidth = 'lg'
|
|
8673
8755
|
} = props,
|
|
8674
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
8756
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2h);
|
|
8675
8757
|
const ownerState = _extends({}, props, {
|
|
8676
8758
|
component,
|
|
8677
8759
|
disableGutters,
|
|
@@ -8714,26 +8796,26 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8714
8796
|
return `Level${level}`;
|
|
8715
8797
|
}
|
|
8716
8798
|
function isNestedContainer(ownerState) {
|
|
8717
|
-
return ownerState.
|
|
8799
|
+
return ownerState.unstable_level > 0 && ownerState.container;
|
|
8718
8800
|
}
|
|
8719
8801
|
function createGetSelfSpacing(ownerState) {
|
|
8720
8802
|
return function getSelfSpacing(axis) {
|
|
8721
|
-
return `var(--Grid-${axis}Spacing${appendLevel(ownerState.
|
|
8803
|
+
return `var(--Grid-${axis}Spacing${appendLevel(ownerState.unstable_level)})`;
|
|
8722
8804
|
};
|
|
8723
8805
|
}
|
|
8724
8806
|
function createGetParentSpacing(ownerState) {
|
|
8725
8807
|
return function getParentSpacing(axis) {
|
|
8726
|
-
if (ownerState.
|
|
8808
|
+
if (ownerState.unstable_level === 0) {
|
|
8727
8809
|
return `var(--Grid-${axis}Spacing)`;
|
|
8728
8810
|
}
|
|
8729
|
-
return `var(--Grid-${axis}Spacing${appendLevel(ownerState.
|
|
8811
|
+
return `var(--Grid-${axis}Spacing${appendLevel(ownerState.unstable_level - 1)})`;
|
|
8730
8812
|
};
|
|
8731
8813
|
}
|
|
8732
8814
|
function getParentColumns(ownerState) {
|
|
8733
|
-
if (ownerState.
|
|
8815
|
+
if (ownerState.unstable_level === 0) {
|
|
8734
8816
|
return `var(--Grid-columns)`;
|
|
8735
8817
|
}
|
|
8736
|
-
return `var(--Grid-columns${appendLevel(ownerState.
|
|
8818
|
+
return `var(--Grid-columns${appendLevel(ownerState.unstable_level - 1)})`;
|
|
8737
8819
|
}
|
|
8738
8820
|
const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
8739
8821
|
const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
@@ -8841,13 +8923,13 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8841
8923
|
return {};
|
|
8842
8924
|
}
|
|
8843
8925
|
const styles = isNestedContainer(ownerState) ? {
|
|
8844
|
-
[`--Grid-columns${appendLevel(ownerState.
|
|
8926
|
+
[`--Grid-columns${appendLevel(ownerState.unstable_level)}`]: getParentColumns(ownerState)
|
|
8845
8927
|
} : {
|
|
8846
8928
|
'--Grid-columns': 12
|
|
8847
8929
|
};
|
|
8848
8930
|
traverseBreakpoints(theme.breakpoints, ownerState.columns, (appendStyle, value) => {
|
|
8849
8931
|
appendStyle(styles, {
|
|
8850
|
-
[`--Grid-columns${appendLevel(ownerState.
|
|
8932
|
+
[`--Grid-columns${appendLevel(ownerState.unstable_level)}`]: value
|
|
8851
8933
|
});
|
|
8852
8934
|
});
|
|
8853
8935
|
return styles;
|
|
@@ -8863,12 +8945,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8863
8945
|
const styles = isNestedContainer(ownerState) ? {
|
|
8864
8946
|
// Set the default spacing as its parent spacing.
|
|
8865
8947
|
// It will be overridden if spacing props are provided
|
|
8866
|
-
[`--Grid-rowSpacing${appendLevel(ownerState.
|
|
8948
|
+
[`--Grid-rowSpacing${appendLevel(ownerState.unstable_level)}`]: getParentSpacing('row')
|
|
8867
8949
|
} : {};
|
|
8868
8950
|
traverseBreakpoints(theme.breakpoints, ownerState.rowSpacing, (appendStyle, value) => {
|
|
8869
8951
|
var _theme$spacing;
|
|
8870
8952
|
appendStyle(styles, {
|
|
8871
|
-
[`--Grid-rowSpacing${appendLevel(ownerState.
|
|
8953
|
+
[`--Grid-rowSpacing${appendLevel(ownerState.unstable_level)}`]: typeof value === 'string' ? value : (_theme$spacing = theme.spacing) == null ? void 0 : _theme$spacing.call(theme, value)
|
|
8872
8954
|
});
|
|
8873
8955
|
});
|
|
8874
8956
|
return styles;
|
|
@@ -8884,12 +8966,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8884
8966
|
const styles = isNestedContainer(ownerState) ? {
|
|
8885
8967
|
// Set the default spacing as its parent spacing.
|
|
8886
8968
|
// It will be overridden if spacing props are provided
|
|
8887
|
-
[`--Grid-columnSpacing${appendLevel(ownerState.
|
|
8969
|
+
[`--Grid-columnSpacing${appendLevel(ownerState.unstable_level)}`]: getParentSpacing('column')
|
|
8888
8970
|
} : {};
|
|
8889
8971
|
traverseBreakpoints(theme.breakpoints, ownerState.columnSpacing, (appendStyle, value) => {
|
|
8890
8972
|
var _theme$spacing2;
|
|
8891
8973
|
appendStyle(styles, {
|
|
8892
|
-
[`--Grid-columnSpacing${appendLevel(ownerState.
|
|
8974
|
+
[`--Grid-columnSpacing${appendLevel(ownerState.unstable_level)}`]: typeof value === 'string' ? value : (_theme$spacing2 = theme.spacing) == null ? void 0 : _theme$spacing2.call(theme, value)
|
|
8893
8975
|
});
|
|
8894
8976
|
});
|
|
8895
8977
|
return styles;
|
|
@@ -8972,7 +9054,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8972
9054
|
return [`direction-xs-${String(direction)}`];
|
|
8973
9055
|
};
|
|
8974
9056
|
|
|
8975
|
-
const _excluded$
|
|
9057
|
+
const _excluded$2g = ["className", "children", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow", "unstable_level"];
|
|
8976
9058
|
const defaultTheme$5 = createTheme$1();
|
|
8977
9059
|
|
|
8978
9060
|
// widening Theme to any so that the consumer can own the theme structure.
|
|
@@ -8995,7 +9077,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8995
9077
|
useThemeProps = useThemePropsDefault$1,
|
|
8996
9078
|
componentName = 'MuiGrid'
|
|
8997
9079
|
} = options;
|
|
8998
|
-
const NestedContext = /*#__PURE__*/React__namespace.createContext(0);
|
|
8999
9080
|
const OverflowContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
9000
9081
|
const useUtilityClasses = (ownerState, theme) => {
|
|
9001
9082
|
const {
|
|
@@ -9013,13 +9094,13 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9013
9094
|
const GridRoot = createStyledComponent(generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridSizeStyles, generateGridDirectionStyles, generateGridStyles, generateGridOffsetStyles);
|
|
9014
9095
|
const Grid = /*#__PURE__*/React__namespace.forwardRef(function Grid(inProps, ref) {
|
|
9015
9096
|
var _inProps$columns, _inProps$spacing, _ref, _inProps$rowSpacing, _ref2, _inProps$columnSpacin, _ref3, _disableEqualOverflow;
|
|
9016
|
-
const theme = useTheme$
|
|
9097
|
+
const theme = useTheme$2();
|
|
9017
9098
|
const themeProps = useThemeProps(inProps);
|
|
9018
9099
|
const props = extendSxProp(themeProps); // `color` type conflicts with html color attribute.
|
|
9019
|
-
const level = React__namespace.useContext(NestedContext);
|
|
9020
9100
|
const overflow = React__namespace.useContext(OverflowContext);
|
|
9021
9101
|
const {
|
|
9022
9102
|
className,
|
|
9103
|
+
children,
|
|
9023
9104
|
columns: columnsProp = 12,
|
|
9024
9105
|
container = false,
|
|
9025
9106
|
component = 'div',
|
|
@@ -9028,9 +9109,10 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9028
9109
|
spacing: spacingProp = 0,
|
|
9029
9110
|
rowSpacing: rowSpacingProp = spacingProp,
|
|
9030
9111
|
columnSpacing: columnSpacingProp = spacingProp,
|
|
9031
|
-
disableEqualOverflow: themeDisableEqualOverflow
|
|
9112
|
+
disableEqualOverflow: themeDisableEqualOverflow,
|
|
9113
|
+
unstable_level: level = 0
|
|
9032
9114
|
} = props,
|
|
9033
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
9115
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2g);
|
|
9034
9116
|
// Because `disableEqualOverflow` can be set from the theme's defaultProps, the **nested** grid should look at the instance props instead.
|
|
9035
9117
|
let disableEqualOverflow = themeDisableEqualOverflow;
|
|
9036
9118
|
if (level && themeDisableEqualOverflow !== undefined) {
|
|
@@ -9075,13 +9157,17 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9075
9157
|
as: component,
|
|
9076
9158
|
ownerState: ownerState,
|
|
9077
9159
|
className: clsx(classes.root, className)
|
|
9078
|
-
}, other
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9160
|
+
}, other, {
|
|
9161
|
+
children: React__namespace.Children.map(children, child => {
|
|
9162
|
+
if ( /*#__PURE__*/React__namespace.isValidElement(child) && isMuiElement(child, ['Grid'])) {
|
|
9163
|
+
var _child$props$unstable;
|
|
9164
|
+
return /*#__PURE__*/React__namespace.cloneElement(child, {
|
|
9165
|
+
unstable_level: (_child$props$unstable = child.props.unstable_level) != null ? _child$props$unstable : level + 1
|
|
9166
|
+
});
|
|
9167
|
+
}
|
|
9168
|
+
return child;
|
|
9169
|
+
})
|
|
9170
|
+
}));
|
|
9085
9171
|
if (disableEqualOverflow !== undefined && disableEqualOverflow !== (overflow != null ? overflow : false)) {
|
|
9086
9172
|
// There are 2 possibilities that should wrap with the OverflowContext to communicate with the nested grids:
|
|
9087
9173
|
// 1. It is the root grid with `disableEqualOverflow`.
|
|
@@ -9117,10 +9203,13 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9117
9203
|
xs: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),
|
|
9118
9204
|
xsOffset: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
9119
9205
|
} ;
|
|
9206
|
+
|
|
9207
|
+
// @ts-ignore internal logic for nested grid
|
|
9208
|
+
Grid.muiName = 'Grid';
|
|
9120
9209
|
return Grid;
|
|
9121
9210
|
}
|
|
9122
9211
|
|
|
9123
|
-
const _excluded$
|
|
9212
|
+
const _excluded$2f = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"];
|
|
9124
9213
|
const defaultTheme$4 = createTheme$1();
|
|
9125
9214
|
// widening Theme to any so that the consumer can own the theme structure.
|
|
9126
9215
|
const defaultCreateStyledComponent = systemStyled('div', {
|
|
@@ -9249,7 +9338,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9249
9338
|
className,
|
|
9250
9339
|
useFlexGap = false
|
|
9251
9340
|
} = props,
|
|
9252
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
9341
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2f);
|
|
9253
9342
|
const ownerState = {
|
|
9254
9343
|
direction,
|
|
9255
9344
|
spacing,
|
|
@@ -9275,7 +9364,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9275
9364
|
return Stack;
|
|
9276
9365
|
}
|
|
9277
9366
|
|
|
9278
|
-
const _excluded$
|
|
9367
|
+
const _excluded$2e = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
|
|
9279
9368
|
_excluded2$b = ["type", "mode"];
|
|
9280
9369
|
function adaptV4Theme(inputTheme) {
|
|
9281
9370
|
{
|
|
@@ -9289,7 +9378,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9289
9378
|
props = {},
|
|
9290
9379
|
styleOverrides = {}
|
|
9291
9380
|
} = inputTheme,
|
|
9292
|
-
other = _objectWithoutPropertiesLoose(inputTheme, _excluded$
|
|
9381
|
+
other = _objectWithoutPropertiesLoose(inputTheme, _excluded$2e);
|
|
9293
9382
|
const theme = _extends({}, other, {
|
|
9294
9383
|
components: {}
|
|
9295
9384
|
});
|
|
@@ -9370,7 +9459,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9370
9459
|
}, mixins);
|
|
9371
9460
|
}
|
|
9372
9461
|
|
|
9373
|
-
const _excluded$
|
|
9462
|
+
const _excluded$2d = ["mode", "contrastThreshold", "tonalOffset"];
|
|
9374
9463
|
const light = {
|
|
9375
9464
|
// The colors used to style the text.
|
|
9376
9465
|
text: {
|
|
@@ -9539,7 +9628,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9539
9628
|
contrastThreshold = 3,
|
|
9540
9629
|
tonalOffset = 0.2
|
|
9541
9630
|
} = palette,
|
|
9542
|
-
other = _objectWithoutPropertiesLoose(palette, _excluded$
|
|
9631
|
+
other = _objectWithoutPropertiesLoose(palette, _excluded$2d);
|
|
9543
9632
|
const primary = palette.primary || getDefaultPrimary(mode);
|
|
9544
9633
|
const secondary = palette.secondary || getDefaultSecondary(mode);
|
|
9545
9634
|
const error = palette.error || getDefaultError(mode);
|
|
@@ -9663,7 +9752,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9663
9752
|
return paletteOutput;
|
|
9664
9753
|
}
|
|
9665
9754
|
|
|
9666
|
-
const _excluded$
|
|
9755
|
+
const _excluded$2c = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
|
|
9667
9756
|
function round$2(value) {
|
|
9668
9757
|
return Math.round(value * 1e5) / 1e5;
|
|
9669
9758
|
}
|
|
@@ -9694,7 +9783,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9694
9783
|
allVariants,
|
|
9695
9784
|
pxToRem: pxToRem2
|
|
9696
9785
|
} = _ref,
|
|
9697
|
-
other = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9786
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded$2c);
|
|
9698
9787
|
{
|
|
9699
9788
|
if (typeof fontSize !== 'number') {
|
|
9700
9789
|
console.error('MUI: `fontSize` is required to be a number.');
|
|
@@ -9761,7 +9850,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9761
9850
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
|
9762
9851
|
var shadows$1 = shadows;
|
|
9763
9852
|
|
|
9764
|
-
const _excluded$
|
|
9853
|
+
const _excluded$2b = ["duration", "easing", "delay"];
|
|
9765
9854
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
9766
9855
|
// to learn the context in which each easing should be used.
|
|
9767
9856
|
const easing = {
|
|
@@ -9812,7 +9901,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9812
9901
|
easing: easingOption = mergedEasing.easeInOut,
|
|
9813
9902
|
delay = 0
|
|
9814
9903
|
} = options,
|
|
9815
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
9904
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2b);
|
|
9816
9905
|
{
|
|
9817
9906
|
const isString = value => typeof value === 'string';
|
|
9818
9907
|
// IE11 support, replace with Number.isNaN
|
|
@@ -9859,7 +9948,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9859
9948
|
};
|
|
9860
9949
|
var zIndex$1 = zIndex;
|
|
9861
9950
|
|
|
9862
|
-
const _excluded$
|
|
9951
|
+
const _excluded$2a = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
|
9863
9952
|
function createTheme(options = {}, ...args) {
|
|
9864
9953
|
const {
|
|
9865
9954
|
mixins: mixinsInput = {},
|
|
@@ -9867,7 +9956,7 @@ const theme2 = createTheme({ palette: {
|
|
|
9867
9956
|
transitions: transitionsInput = {},
|
|
9868
9957
|
typography: typographyInput = {}
|
|
9869
9958
|
} = options,
|
|
9870
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
9959
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2a);
|
|
9871
9960
|
if (options.vars) {
|
|
9872
9961
|
throw new Error(`MUI: \`vars\` is a private field used for CSS variables support.
|
|
9873
9962
|
Please use another name.` );
|
|
@@ -10139,12 +10228,12 @@ Use unitless line heights instead.` );
|
|
|
10139
10228
|
var defaultTheme$3 = defaultTheme$2;
|
|
10140
10229
|
|
|
10141
10230
|
function useTheme() {
|
|
10142
|
-
const theme = useTheme$
|
|
10231
|
+
const theme = useTheme$2(defaultTheme$3);
|
|
10143
10232
|
{
|
|
10144
10233
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
10145
10234
|
React__namespace.useDebugValue(theme);
|
|
10146
10235
|
}
|
|
10147
|
-
return theme;
|
|
10236
|
+
return theme[THEME_ID] || theme;
|
|
10148
10237
|
}
|
|
10149
10238
|
|
|
10150
10239
|
function useThemeProps({
|
|
@@ -10154,18 +10243,43 @@ Use unitless line heights instead.` );
|
|
|
10154
10243
|
return useThemeProps$1({
|
|
10155
10244
|
props,
|
|
10156
10245
|
name,
|
|
10157
|
-
defaultTheme: defaultTheme$3
|
|
10246
|
+
defaultTheme: defaultTheme$3,
|
|
10247
|
+
themeId: THEME_ID
|
|
10158
10248
|
});
|
|
10159
10249
|
}
|
|
10160
10250
|
|
|
10161
10251
|
const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
|
|
10162
10252
|
const slotShouldForwardProp = shouldForwardProp;
|
|
10163
10253
|
const styled = createStyled({
|
|
10254
|
+
themeId: THEME_ID,
|
|
10164
10255
|
defaultTheme: defaultTheme$3,
|
|
10165
10256
|
rootShouldForwardProp
|
|
10166
10257
|
});
|
|
10167
10258
|
var styled$1 = styled;
|
|
10168
10259
|
|
|
10260
|
+
const _excluded$29 = ["theme"];
|
|
10261
|
+
function ThemeProvider(_ref) {
|
|
10262
|
+
let {
|
|
10263
|
+
theme: themeInput
|
|
10264
|
+
} = _ref,
|
|
10265
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$29);
|
|
10266
|
+
const scopedTheme = themeInput[THEME_ID];
|
|
10267
|
+
return /*#__PURE__*/jsxRuntime_1(ThemeProvider$1, _extends({}, props, {
|
|
10268
|
+
themeId: scopedTheme ? THEME_ID : undefined,
|
|
10269
|
+
theme: scopedTheme || themeInput
|
|
10270
|
+
}));
|
|
10271
|
+
}
|
|
10272
|
+
ThemeProvider.propTypes = {
|
|
10273
|
+
/**
|
|
10274
|
+
* Your component tree.
|
|
10275
|
+
*/
|
|
10276
|
+
children: PropTypes.node,
|
|
10277
|
+
/**
|
|
10278
|
+
* A theme object. You can provide a function to extend the outer theme.
|
|
10279
|
+
*/
|
|
10280
|
+
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
|
|
10281
|
+
} ;
|
|
10282
|
+
|
|
10169
10283
|
function makeStyles() {
|
|
10170
10284
|
throw new Error(`MUI: makeStyles is no longer exported from @mui/material/styles.
|
|
10171
10285
|
You have to import it from @mui/styles.
|
|
@@ -10308,7 +10422,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
10308
10422
|
}
|
|
10309
10423
|
|
|
10310
10424
|
// assign component variables
|
|
10311
|
-
assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
10425
|
+
assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Button', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
10312
10426
|
if (key === 'light') {
|
|
10313
10427
|
setColor(palette.Alert, 'errorColor', private_safeDarken(palette.error.light, 0.6));
|
|
10314
10428
|
setColor(palette.Alert, 'infoColor', private_safeDarken(palette.info.light, 0.6));
|
|
@@ -10332,6 +10446,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
10332
10446
|
setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));
|
|
10333
10447
|
setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));
|
|
10334
10448
|
setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));
|
|
10449
|
+
setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-300'));
|
|
10450
|
+
setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-A100'));
|
|
10335
10451
|
setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));
|
|
10336
10452
|
setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));
|
|
10337
10453
|
setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));
|
|
@@ -10392,6 +10508,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
10392
10508
|
setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode
|
|
10393
10509
|
setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode
|
|
10394
10510
|
setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));
|
|
10511
|
+
setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-800'));
|
|
10512
|
+
setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-700'));
|
|
10395
10513
|
setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));
|
|
10396
10514
|
setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));
|
|
10397
10515
|
setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));
|
|
@@ -10504,6 +10622,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
10504
10622
|
useColorScheme,
|
|
10505
10623
|
getInitColorSchemeScript
|
|
10506
10624
|
} = createCssVarsProvider({
|
|
10625
|
+
themeId: THEME_ID,
|
|
10507
10626
|
theme: defaultTheme$1,
|
|
10508
10627
|
attribute: 'data-mui-color-scheme',
|
|
10509
10628
|
modeStorageKey: 'mui-mode',
|
|
@@ -10681,7 +10800,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
10681
10800
|
const internalSlotProps = getSlotProps(eventHandlers);
|
|
10682
10801
|
|
|
10683
10802
|
// The order of classes is important here.
|
|
10684
|
-
// Emotion (that we use in libraries consuming
|
|
10803
|
+
// Emotion (that we use in libraries consuming Base UI) depends on this order
|
|
10685
10804
|
// to properly override style. It requires the most important classes to be last
|
|
10686
10805
|
// (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
|
|
10687
10806
|
const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
|
|
@@ -13320,7 +13439,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
13320
13439
|
}
|
|
13321
13440
|
generateUtilityClasses('MuiPopper', ['root']);
|
|
13322
13441
|
|
|
13323
|
-
const _excluded$26 = ["anchorEl", "children", "component", "direction", "disablePortal", "modifiers", "open", "
|
|
13442
|
+
const _excluded$26 = ["anchorEl", "children", "component", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"],
|
|
13324
13443
|
_excluded2$9 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
|
|
13325
13444
|
function flipPlacement(placement, direction) {
|
|
13326
13445
|
if (direction === 'ltr') {
|
|
@@ -13365,7 +13484,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
13365
13484
|
disablePortal,
|
|
13366
13485
|
modifiers,
|
|
13367
13486
|
open,
|
|
13368
|
-
ownerState,
|
|
13369
13487
|
placement: initialPlacement,
|
|
13370
13488
|
popperOptions,
|
|
13371
13489
|
popperRef: popperRefProp,
|
|
@@ -13468,7 +13586,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
13468
13586
|
role: 'tooltip',
|
|
13469
13587
|
ref: ownRef
|
|
13470
13588
|
},
|
|
13471
|
-
ownerState:
|
|
13589
|
+
ownerState: props,
|
|
13472
13590
|
className: classes.root
|
|
13473
13591
|
});
|
|
13474
13592
|
return /*#__PURE__*/jsxRuntime_1(Root, _extends({}, rootProps, {
|
|
@@ -14135,7 +14253,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
14135
14253
|
return null;
|
|
14136
14254
|
}
|
|
14137
14255
|
return /*#__PURE__*/jsxRuntime_1(Portal$1
|
|
14138
|
-
// @ts-expect-error TODO: include ref to
|
|
14256
|
+
// @ts-expect-error TODO: include ref to Base UI Portal props
|
|
14139
14257
|
, {
|
|
14140
14258
|
ref: handlePortalRef,
|
|
14141
14259
|
container: container,
|
|
@@ -15208,7 +15326,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
15208
15326
|
return updateState(prevState, newState);
|
|
15209
15327
|
});
|
|
15210
15328
|
}, [getUpdatedState]);
|
|
15211
|
-
const
|
|
15329
|
+
const syncHeightWithFlushSync = () => {
|
|
15212
15330
|
const newState = getUpdatedState();
|
|
15213
15331
|
if (isEmpty$1(newState)) {
|
|
15214
15332
|
return;
|
|
@@ -15232,7 +15350,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
15232
15350
|
// access a dom node that is no longer there (as the fallback component is being shown instead).
|
|
15233
15351
|
// See https://github.com/mui/material-ui/issues/32640
|
|
15234
15352
|
if (inputRef.current) {
|
|
15235
|
-
|
|
15353
|
+
syncHeightWithFlushSync();
|
|
15236
15354
|
}
|
|
15237
15355
|
});
|
|
15238
15356
|
let resizeObserver;
|
|
@@ -16217,7 +16335,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
16217
16335
|
onFocus: handleFocus,
|
|
16218
16336
|
onChange: handleInputChange,
|
|
16219
16337
|
onMouseDown: handleInputMouseDown,
|
|
16220
|
-
// if open then this is handled
|
|
16338
|
+
// if open then this is handled imperatively so don't let react override
|
|
16221
16339
|
// only have an opinion about this when closed
|
|
16222
16340
|
'aria-activedescendant': popupOpen ? '' : null,
|
|
16223
16341
|
'aria-autocomplete': autoComplete ? 'both' : 'list',
|
|
@@ -20451,7 +20569,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20451
20569
|
*/
|
|
20452
20570
|
const Popper = /*#__PURE__*/React__namespace.forwardRef(function Popper(inProps, ref) {
|
|
20453
20571
|
var _slots$root;
|
|
20454
|
-
const theme = useTheme$
|
|
20572
|
+
const theme = useTheme$3();
|
|
20455
20573
|
const props = useThemeProps({
|
|
20456
20574
|
props: inProps,
|
|
20457
20575
|
name: 'MuiPopper'
|
|
@@ -20553,10 +20671,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
20553
20671
|
* If `true`, the component is shown.
|
|
20554
20672
|
*/
|
|
20555
20673
|
open: PropTypes.bool.isRequired,
|
|
20556
|
-
/**
|
|
20557
|
-
* @ignore
|
|
20558
|
-
*/
|
|
20559
|
-
ownerState: PropTypes.any,
|
|
20560
20674
|
/**
|
|
20561
20675
|
* Popper placement.
|
|
20562
20676
|
* @default 'bottom'
|
|
@@ -21260,7 +21374,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
21260
21374
|
|
|
21261
21375
|
function GlobalStyles(props) {
|
|
21262
21376
|
return /*#__PURE__*/jsxRuntime_1(GlobalStyles$1, _extends({}, props, {
|
|
21263
|
-
defaultTheme: defaultTheme$3
|
|
21377
|
+
defaultTheme: defaultTheme$3,
|
|
21378
|
+
themeId: THEME_ID
|
|
21264
21379
|
}));
|
|
21265
21380
|
}
|
|
21266
21381
|
GlobalStyles.propTypes /* remove-proptypes */ = {
|
|
@@ -21271,9 +21386,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
21271
21386
|
/**
|
|
21272
21387
|
* The styles you want to apply globally.
|
|
21273
21388
|
*/
|
|
21274
|
-
styles: PropTypes
|
|
21275
|
-
__emotion_styles: PropTypes.any.isRequired
|
|
21276
|
-
}), PropTypes.string, PropTypes.bool])
|
|
21389
|
+
styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])
|
|
21277
21390
|
} ;
|
|
21278
21391
|
|
|
21279
21392
|
// Supports determination of isControlled().
|
|
@@ -22143,7 +22256,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
22143
22256
|
paddingRight: 52 + 4 + 9
|
|
22144
22257
|
},
|
|
22145
22258
|
[`& .${autocompleteClasses$1.input}`]: {
|
|
22146
|
-
padding: '7.5px 4px 7.5px
|
|
22259
|
+
padding: '7.5px 4px 7.5px 5px'
|
|
22147
22260
|
},
|
|
22148
22261
|
[`& .${autocompleteClasses$1.endAdornment}`]: {
|
|
22149
22262
|
right: 9
|
|
@@ -22156,7 +22269,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
22156
22269
|
paddingBottom: 6,
|
|
22157
22270
|
paddingLeft: 6,
|
|
22158
22271
|
[`& .${autocompleteClasses$1.input}`]: {
|
|
22159
|
-
padding: '2.5px 4px 2.5px
|
|
22272
|
+
padding: '2.5px 4px 2.5px 8px'
|
|
22160
22273
|
}
|
|
22161
22274
|
},
|
|
22162
22275
|
[`& .${filledInputClasses$1.root}`]: {
|
|
@@ -24511,6 +24624,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24511
24624
|
|
|
24512
24625
|
const defaultTheme = createTheme();
|
|
24513
24626
|
const Box = createBox({
|
|
24627
|
+
themeId: THEME_ID,
|
|
24514
24628
|
defaultTheme,
|
|
24515
24629
|
defaultClassName: 'MuiBox-root',
|
|
24516
24630
|
generateClassName: ClassNameGenerator$1.generate
|
|
@@ -24911,6 +25025,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24911
25025
|
ownerState
|
|
24912
25026
|
}) => {
|
|
24913
25027
|
var _theme$palette$getCon, _theme$palette;
|
|
25028
|
+
const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];
|
|
25029
|
+
const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];
|
|
24914
25030
|
return _extends({}, theme.typography.button, {
|
|
24915
25031
|
minWidth: 64,
|
|
24916
25032
|
padding: '6px 16px',
|
|
@@ -24939,7 +25055,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24939
25055
|
backgroundColor: 'transparent'
|
|
24940
25056
|
}
|
|
24941
25057
|
}, ownerState.variant === 'contained' && {
|
|
24942
|
-
backgroundColor:
|
|
25058
|
+
backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,
|
|
24943
25059
|
boxShadow: (theme.vars || theme).shadows[4],
|
|
24944
25060
|
// Reset on touch devices, it doesn't add specificity
|
|
24945
25061
|
'@media (hover: none)': {
|
|
@@ -24982,7 +25098,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24982
25098
|
color: theme.vars ?
|
|
24983
25099
|
// this is safe because grey does not change between default light/dark mode
|
|
24984
25100
|
theme.vars.palette.text.primary : (_theme$palette$getCon = (_theme$palette = theme.palette).getContrastText) == null ? void 0 : _theme$palette$getCon.call(_theme$palette, theme.palette.grey[300]),
|
|
24985
|
-
backgroundColor:
|
|
25101
|
+
backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
|
|
24986
25102
|
boxShadow: (theme.vars || theme).shadows[2]
|
|
24987
25103
|
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
24988
25104
|
color: (theme.vars || theme).palette[ownerState.color].contrastText,
|
|
@@ -27023,7 +27139,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
27023
27139
|
enableColorScheme: PropTypes.bool
|
|
27024
27140
|
} ;
|
|
27025
27141
|
|
|
27026
|
-
// track, thumb and active are
|
|
27142
|
+
// track, thumb and active are derived from macOS 10.15.7
|
|
27027
27143
|
const scrollBar = {
|
|
27028
27144
|
track: '#2b2b2b',
|
|
27029
27145
|
thumb: '#6b6b6b',
|
|
@@ -29829,20 +29945,22 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29829
29945
|
function getFormControlLabelUtilityClasses(slot) {
|
|
29830
29946
|
return generateUtilityClass('MuiFormControlLabel', slot);
|
|
29831
29947
|
}
|
|
29832
|
-
const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error']);
|
|
29948
|
+
const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']);
|
|
29833
29949
|
var formControlLabelClasses$1 = formControlLabelClasses;
|
|
29834
29950
|
|
|
29835
|
-
const _excluded$1g = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "slotProps", "value"];
|
|
29951
|
+
const _excluded$1g = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"];
|
|
29836
29952
|
const useUtilityClasses$13 = ownerState => {
|
|
29837
29953
|
const {
|
|
29838
29954
|
classes,
|
|
29839
29955
|
disabled,
|
|
29840
29956
|
labelPlacement,
|
|
29841
|
-
error
|
|
29957
|
+
error,
|
|
29958
|
+
required
|
|
29842
29959
|
} = ownerState;
|
|
29843
29960
|
const slots = {
|
|
29844
|
-
root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error'],
|
|
29845
|
-
label: ['label', disabled && 'disabled']
|
|
29961
|
+
root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error', required && 'required'],
|
|
29962
|
+
label: ['label', disabled && 'disabled'],
|
|
29963
|
+
asterisk: ['asterisk', error && 'error']
|
|
29846
29964
|
};
|
|
29847
29965
|
return composeClasses(slots, getFormControlLabelUtilityClasses, classes);
|
|
29848
29966
|
};
|
|
@@ -29891,13 +30009,24 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29891
30009
|
}
|
|
29892
30010
|
}
|
|
29893
30011
|
}));
|
|
30012
|
+
const AsteriskComponent$1 = styled$1('span', {
|
|
30013
|
+
name: 'MuiFormControlLabel',
|
|
30014
|
+
slot: 'Asterisk',
|
|
30015
|
+
overridesResolver: (props, styles) => styles.asterisk
|
|
30016
|
+
})(({
|
|
30017
|
+
theme
|
|
30018
|
+
}) => ({
|
|
30019
|
+
[`&.${formControlLabelClasses$1.error}`]: {
|
|
30020
|
+
color: (theme.vars || theme).palette.error.main
|
|
30021
|
+
}
|
|
30022
|
+
}));
|
|
29894
30023
|
|
|
29895
30024
|
/**
|
|
29896
30025
|
* Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component.
|
|
29897
30026
|
* Use this component if you want to display an extra label.
|
|
29898
30027
|
*/
|
|
29899
30028
|
const FormControlLabel = /*#__PURE__*/React__namespace.forwardRef(function FormControlLabel(inProps, ref) {
|
|
29900
|
-
var _slotProps$typography;
|
|
30029
|
+
var _ref, _slotProps$typography;
|
|
29901
30030
|
const props = useThemeProps({
|
|
29902
30031
|
props: inProps,
|
|
29903
30032
|
name: 'MuiFormControlLabel'
|
|
@@ -29910,19 +30039,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29910
30039
|
disableTypography,
|
|
29911
30040
|
label: labelProp,
|
|
29912
30041
|
labelPlacement = 'end',
|
|
30042
|
+
required: requiredProp,
|
|
29913
30043
|
slotProps = {}
|
|
29914
30044
|
} = props,
|
|
29915
30045
|
other = _objectWithoutPropertiesLoose(props, _excluded$1g);
|
|
29916
30046
|
const muiFormControl = useFormControl();
|
|
29917
|
-
|
|
29918
|
-
|
|
29919
|
-
disabled = control.props.disabled;
|
|
29920
|
-
}
|
|
29921
|
-
if (typeof disabled === 'undefined' && muiFormControl) {
|
|
29922
|
-
disabled = muiFormControl.disabled;
|
|
29923
|
-
}
|
|
30047
|
+
const disabled = (_ref = disabledProp != null ? disabledProp : control.props.disabled) != null ? _ref : muiFormControl == null ? void 0 : muiFormControl.disabled;
|
|
30048
|
+
const required = requiredProp != null ? requiredProp : control.props.required;
|
|
29924
30049
|
const controlProps = {
|
|
29925
|
-
disabled
|
|
30050
|
+
disabled,
|
|
30051
|
+
required
|
|
29926
30052
|
};
|
|
29927
30053
|
['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => {
|
|
29928
30054
|
if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {
|
|
@@ -29937,6 +30063,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29937
30063
|
const ownerState = _extends({}, props, {
|
|
29938
30064
|
disabled,
|
|
29939
30065
|
labelPlacement,
|
|
30066
|
+
required,
|
|
29940
30067
|
error: fcs.error
|
|
29941
30068
|
});
|
|
29942
30069
|
const classes = useUtilityClasses$13(ownerState);
|
|
@@ -29955,7 +30082,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
29955
30082
|
ownerState: ownerState,
|
|
29956
30083
|
ref: ref
|
|
29957
30084
|
}, other, {
|
|
29958
|
-
children: [/*#__PURE__*/React__namespace.cloneElement(control, controlProps), label
|
|
30085
|
+
children: [/*#__PURE__*/React__namespace.cloneElement(control, controlProps), label, required && /*#__PURE__*/jsxRuntime_2(AsteriskComponent$1, {
|
|
30086
|
+
ownerState: ownerState,
|
|
30087
|
+
"aria-hidden": true,
|
|
30088
|
+
className: classes.asterisk,
|
|
30089
|
+
children: ["\u2009", '*']
|
|
30090
|
+
})]
|
|
29959
30091
|
}));
|
|
29960
30092
|
});
|
|
29961
30093
|
FormControlLabel.propTypes /* remove-proptypes */ = {
|
|
@@ -30018,6 +30150,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
30018
30150
|
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
30019
30151
|
*/
|
|
30020
30152
|
onChange: PropTypes.func,
|
|
30153
|
+
/**
|
|
30154
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
30155
|
+
*/
|
|
30156
|
+
required: PropTypes.bool,
|
|
30021
30157
|
/**
|
|
30022
30158
|
* The props used for each slot inside.
|
|
30023
30159
|
* @default {}
|
|
@@ -31388,7 +31524,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
31388
31524
|
return match;
|
|
31389
31525
|
}
|
|
31390
31526
|
function useMediaQuery(queryInput, options = {}) {
|
|
31391
|
-
const theme = useTheme$
|
|
31527
|
+
const theme = useTheme$3();
|
|
31392
31528
|
// Wait for jsdom to support the match media feature.
|
|
31393
31529
|
// All the browsers MUI support have this built-in.
|
|
31394
31530
|
// This defensive check is here for simplicity.
|
|
@@ -35814,7 +35950,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
35814
35950
|
overridesResolver: (props, styles) => styles.paper
|
|
35815
35951
|
})({
|
|
35816
35952
|
// specZ: The maximum height of a simple menu should be one or more rows less than the view
|
|
35817
|
-
// height. This ensures a
|
|
35953
|
+
// height. This ensures a tappable area outside of the simple menu with which to dismiss
|
|
35818
35954
|
// the menu.
|
|
35819
35955
|
maxHeight: 'calc(100% - 96px)',
|
|
35820
35956
|
// Add iOS momentum scrolling for iOS < 13.0
|
|
@@ -39934,7 +40070,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
39934
40070
|
onChange: PropTypes.func,
|
|
39935
40071
|
/**
|
|
39936
40072
|
* Callback fired when the component requests to be closed.
|
|
39937
|
-
* Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select
|
|
40073
|
+
* Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).
|
|
39938
40074
|
*
|
|
39939
40075
|
* @param {object} event The event source of the callback.
|
|
39940
40076
|
*/
|
|
@@ -43445,7 +43581,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
43445
43581
|
/**
|
|
43446
43582
|
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
43447
43583
|
*
|
|
43448
|
-
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack
|
|
43584
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
43449
43585
|
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
43450
43586
|
*
|
|
43451
43587
|
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
@@ -46533,7 +46669,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
46533
46669
|
// ----------------------------------------------------------------------
|
|
46534
46670
|
/**
|
|
46535
46671
|
* The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
|
|
46536
|
-
* The Toolbar is a flex container, allowing flex item
|
|
46672
|
+
* The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
|
|
46537
46673
|
*/
|
|
46538
46674
|
children: PropTypes.node,
|
|
46539
46675
|
/**
|
|
@@ -47408,7 +47544,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
47408
47544
|
const setMeasurements = () => {
|
|
47409
47545
|
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
|
|
47410
47546
|
};
|
|
47411
|
-
|
|
47547
|
+
useEnhancedEffect$1(() => {
|
|
47412
47548
|
const handleResize = debounce$1(() => {
|
|
47413
47549
|
const prevHeight = scrollbarHeight.current;
|
|
47414
47550
|
setMeasurements();
|
|
@@ -47985,7 +48121,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
47985
48121
|
moveTabsScroll(getScrollSize());
|
|
47986
48122
|
};
|
|
47987
48123
|
|
|
47988
|
-
// TODO Remove <ScrollbarSize /> as browser support for
|
|
48124
|
+
// TODO Remove <ScrollbarSize /> as browser support for hiding the scrollbar
|
|
47989
48125
|
// with CSS improves.
|
|
47990
48126
|
const handleScrollbarSizeChange = React__namespace.useCallback(scrollbarWidth => {
|
|
47991
48127
|
setScrollerStyle({
|
|
@@ -49359,6 +49495,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
49359
49495
|
exports.SvgIcon = SvgIcon$1;
|
|
49360
49496
|
exports.SwipeableDrawer = SwipeableDrawer$1;
|
|
49361
49497
|
exports.Switch = Switch$1;
|
|
49498
|
+
exports.THEME_ID = THEME_ID;
|
|
49362
49499
|
exports.Tab = Tab$1;
|
|
49363
49500
|
exports.TabScrollButton = TabScrollButton$1;
|
|
49364
49501
|
exports.Table = Table$1;
|