@mui/material 5.1.1 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +76 -76
- 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 +93 -2
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +80 -80
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +22 -22
- 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 +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +18 -18
- package/FormGroup/formGroupClasses.d.ts +10 -10
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/IconButton.js +6 -4
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/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 +17 -17
- package/Popper/Popper.js +4 -23
- 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/SelectInput.js +1 -1
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/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/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/IconButton/IconButton.js +6 -4
- package/legacy/Popper/Popper.js +4 -23
- package/legacy/Select/SelectInput.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +191 -108
- package/legacy/useMediaQuery/useMediaQuery.js +83 -31
- package/locale/index.d.ts +66 -65
- package/locale/index.js +80 -0
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/IconButton/IconButton.js +6 -4
- package/modern/Popper/Popper.js +4 -23
- package/modern/Select/SelectInput.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +80 -0
- package/modern/useMediaQuery/useMediaQuery.js +65 -26
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/IconButton/IconButton.js +6 -4
- package/node/Popper/Popper.js +3 -22
- package/node/Select/SelectInput.js +1 -1
- package/node/index.js +1 -1
- package/node/locale/index.js +82 -1
- package/node/useMediaQuery/useMediaQuery.js +65 -26
- package/package.json +5 -5
- package/styles/variants.d.ts +3 -2
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +14 -14
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +1086 -137
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +31 -27
- package/useMediaQuery/useMediaQuery.js +65 -26
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.
|
|
1
|
+
/** @license MUI v5.2.0
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -4659,9 +4659,7 @@
|
|
|
4659
4659
|
}
|
|
4660
4660
|
|
|
4661
4661
|
function isPlainObject(item) {
|
|
4662
|
-
return item !== null && typeof item === 'object' &&
|
|
4663
|
-
// @ts-expect-error
|
|
4664
|
-
item.constructor === Object;
|
|
4662
|
+
return item !== null && typeof item === 'object' && item.constructor === Object;
|
|
4665
4663
|
}
|
|
4666
4664
|
function deepmerge(target, source, options = {
|
|
4667
4665
|
clone: true
|
|
@@ -5000,7 +4998,7 @@
|
|
|
5000
4998
|
const useEnhancedEffect = typeof window !== 'undefined' ? React__namespace.useLayoutEffect : React__namespace.useEffect;
|
|
5001
4999
|
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
5002
5000
|
|
|
5003
|
-
function
|
|
5001
|
+
function useRandomId(idOverride) {
|
|
5004
5002
|
const [defaultId, setDefaultId] = React__namespace.useState(idOverride);
|
|
5005
5003
|
const id = idOverride || defaultId;
|
|
5006
5004
|
React__namespace.useEffect(() => {
|
|
@@ -5013,6 +5011,24 @@
|
|
|
5013
5011
|
}, [defaultId]);
|
|
5014
5012
|
return id;
|
|
5015
5013
|
}
|
|
5014
|
+
/**
|
|
5015
|
+
*
|
|
5016
|
+
* @example <div id={useId()} />
|
|
5017
|
+
* @param idOverride
|
|
5018
|
+
* @returns {string}
|
|
5019
|
+
*/
|
|
5020
|
+
|
|
5021
|
+
|
|
5022
|
+
function useReactId(idOverride) {
|
|
5023
|
+
// TODO: Remove `React as any` once `useId` is part of stable types.
|
|
5024
|
+
if (React__namespace.useId !== undefined) {
|
|
5025
|
+
const reactId = React__namespace.useId();
|
|
5026
|
+
return idOverride != null ? idOverride : reactId;
|
|
5027
|
+
} // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
|
|
5028
|
+
|
|
5029
|
+
|
|
5030
|
+
return useRandomId(idOverride);
|
|
5031
|
+
}
|
|
5016
5032
|
|
|
5017
5033
|
function unsupportedProp(props, propName, componentName, location, propFullName) {
|
|
5018
5034
|
|
|
@@ -5508,7 +5524,7 @@
|
|
|
5508
5524
|
function removeUnusedBreakpoints(breakpointKeys, style) {
|
|
5509
5525
|
return breakpointKeys.reduce((acc, key) => {
|
|
5510
5526
|
const breakpointOutput = acc[key];
|
|
5511
|
-
const isBreakpointUnused = Object.keys(breakpointOutput).length === 0;
|
|
5527
|
+
const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;
|
|
5512
5528
|
|
|
5513
5529
|
if (isBreakpointUnused) {
|
|
5514
5530
|
delete acc[key];
|
|
@@ -6264,27 +6280,29 @@
|
|
|
6264
6280
|
Object.keys(sxObject).forEach(styleKey => {
|
|
6265
6281
|
const value = callIfFn(sxObject[styleKey], theme);
|
|
6266
6282
|
|
|
6267
|
-
if (
|
|
6268
|
-
if (
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
const breakpointsValues = handleBreakpoints({
|
|
6272
|
-
theme
|
|
6273
|
-
}, value, x => ({
|
|
6274
|
-
[styleKey]: x
|
|
6275
|
-
}));
|
|
6276
|
-
|
|
6277
|
-
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
6278
|
-
css[styleKey] = styleFunctionSx({
|
|
6279
|
-
sx: value,
|
|
6280
|
-
theme
|
|
6281
|
-
});
|
|
6283
|
+
if (value !== null && value !== undefined) {
|
|
6284
|
+
if (typeof value === 'object') {
|
|
6285
|
+
if (propToStyleFunction[styleKey]) {
|
|
6286
|
+
css = merge(css, getThemeValue(styleKey, value, theme));
|
|
6282
6287
|
} else {
|
|
6283
|
-
|
|
6288
|
+
const breakpointsValues = handleBreakpoints({
|
|
6289
|
+
theme
|
|
6290
|
+
}, value, x => ({
|
|
6291
|
+
[styleKey]: x
|
|
6292
|
+
}));
|
|
6293
|
+
|
|
6294
|
+
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
6295
|
+
css[styleKey] = styleFunctionSx({
|
|
6296
|
+
sx: value,
|
|
6297
|
+
theme
|
|
6298
|
+
});
|
|
6299
|
+
} else {
|
|
6300
|
+
css = merge(css, breakpointsValues);
|
|
6301
|
+
}
|
|
6284
6302
|
}
|
|
6303
|
+
} else {
|
|
6304
|
+
css = merge(css, getThemeValue(styleKey, value, theme));
|
|
6285
6305
|
}
|
|
6286
|
-
} else {
|
|
6287
|
-
css = merge(css, getThemeValue(styleKey, value, theme));
|
|
6288
6306
|
}
|
|
6289
6307
|
});
|
|
6290
6308
|
return removeUnusedBreakpoints(breakpointsKeys, css);
|
|
@@ -6295,7 +6313,7 @@
|
|
|
6295
6313
|
|
|
6296
6314
|
styleFunctionSx.filterProps = ['sx'];
|
|
6297
6315
|
|
|
6298
|
-
const _excluded$
|
|
6316
|
+
const _excluded$2t = ["sx"];
|
|
6299
6317
|
|
|
6300
6318
|
const splitProps = props => {
|
|
6301
6319
|
const result = {
|
|
@@ -6316,7 +6334,7 @@
|
|
|
6316
6334
|
const {
|
|
6317
6335
|
sx: inSx
|
|
6318
6336
|
} = props,
|
|
6319
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
6337
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2t);
|
|
6320
6338
|
|
|
6321
6339
|
const {
|
|
6322
6340
|
systemProps,
|
|
@@ -6386,7 +6404,7 @@
|
|
|
6386
6404
|
return str;
|
|
6387
6405
|
}
|
|
6388
6406
|
|
|
6389
|
-
const _excluded$
|
|
6407
|
+
const _excluded$2s = ["values", "unit", "step"];
|
|
6390
6408
|
|
|
6391
6409
|
function createBreakpoints(breakpoints) {
|
|
6392
6410
|
const {
|
|
@@ -6407,7 +6425,7 @@
|
|
|
6407
6425
|
unit = 'px',
|
|
6408
6426
|
step = 5
|
|
6409
6427
|
} = breakpoints,
|
|
6410
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$
|
|
6428
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$2s);
|
|
6411
6429
|
|
|
6412
6430
|
const keys = Object.keys(values);
|
|
6413
6431
|
|
|
@@ -6482,7 +6500,7 @@
|
|
|
6482
6500
|
return spacing;
|
|
6483
6501
|
}
|
|
6484
6502
|
|
|
6485
|
-
const _excluded$
|
|
6503
|
+
const _excluded$2r = ["breakpoints", "palette", "spacing", "shape"];
|
|
6486
6504
|
|
|
6487
6505
|
function createTheme$1(options = {}, ...args) {
|
|
6488
6506
|
const {
|
|
@@ -6491,7 +6509,7 @@
|
|
|
6491
6509
|
spacing: spacingInput,
|
|
6492
6510
|
shape: shapeInput = {}
|
|
6493
6511
|
} = options,
|
|
6494
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
6512
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$2r);
|
|
6495
6513
|
|
|
6496
6514
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
6497
6515
|
const spacing = createSpacing(spacingInput);
|
|
@@ -6613,7 +6631,7 @@
|
|
|
6613
6631
|
return useTheme$2(defaultTheme);
|
|
6614
6632
|
}
|
|
6615
6633
|
|
|
6616
|
-
const _excluded$
|
|
6634
|
+
const _excluded$2q = ["className", "component"];
|
|
6617
6635
|
function createBox(options = {}) {
|
|
6618
6636
|
const {
|
|
6619
6637
|
defaultTheme,
|
|
@@ -6629,7 +6647,7 @@
|
|
|
6629
6647
|
className,
|
|
6630
6648
|
component = 'div'
|
|
6631
6649
|
} = _extendSxProp,
|
|
6632
|
-
other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$
|
|
6650
|
+
other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$2q);
|
|
6633
6651
|
|
|
6634
6652
|
return /*#__PURE__*/jsxRuntime_1(BoxRoot, _extends({
|
|
6635
6653
|
as: component,
|
|
@@ -6660,12 +6678,12 @@
|
|
|
6660
6678
|
/**
|
|
6661
6679
|
* @ignore
|
|
6662
6680
|
*/
|
|
6663
|
-
sx: propTypes.oneOfType([propTypes.object, propTypes.array])
|
|
6681
|
+
sx: propTypes.oneOfType([propTypes.object, propTypes.array, propTypes.func])
|
|
6664
6682
|
} ;
|
|
6665
6683
|
return Box;
|
|
6666
6684
|
}
|
|
6667
6685
|
|
|
6668
|
-
const _excluded$
|
|
6686
|
+
const _excluded$2p = ["variant"];
|
|
6669
6687
|
|
|
6670
6688
|
function isEmpty$2(string) {
|
|
6671
6689
|
return string.length === 0;
|
|
@@ -6681,7 +6699,7 @@
|
|
|
6681
6699
|
const {
|
|
6682
6700
|
variant
|
|
6683
6701
|
} = props,
|
|
6684
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
6702
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2p);
|
|
6685
6703
|
|
|
6686
6704
|
let classKey = variant || '';
|
|
6687
6705
|
Object.keys(other).sort().forEach(key => {
|
|
@@ -6694,7 +6712,7 @@
|
|
|
6694
6712
|
return classKey;
|
|
6695
6713
|
}
|
|
6696
6714
|
|
|
6697
|
-
const _excluded$
|
|
6715
|
+
const _excluded$2o = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
|
|
6698
6716
|
_excluded2$b = ["theme"],
|
|
6699
6717
|
_excluded3$1 = ["theme"];
|
|
6700
6718
|
|
|
@@ -6775,7 +6793,7 @@
|
|
|
6775
6793
|
skipSx: inputSkipSx,
|
|
6776
6794
|
overridesResolver
|
|
6777
6795
|
} = inputOptions,
|
|
6778
|
-
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$
|
|
6796
|
+
options = _objectWithoutPropertiesLoose(inputOptions, _excluded$2o); // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
|
|
6779
6797
|
|
|
6780
6798
|
|
|
6781
6799
|
const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
|
|
@@ -7277,7 +7295,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7277
7295
|
ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) ;
|
|
7278
7296
|
}
|
|
7279
7297
|
|
|
7280
|
-
const _excluded$
|
|
7298
|
+
const _excluded$2n = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
|
|
7281
7299
|
_excluded2$a = ["type", "mode"];
|
|
7282
7300
|
function adaptV4Theme(inputTheme) {
|
|
7283
7301
|
{
|
|
@@ -7292,7 +7310,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7292
7310
|
props = {},
|
|
7293
7311
|
styleOverrides = {}
|
|
7294
7312
|
} = inputTheme,
|
|
7295
|
-
other = _objectWithoutPropertiesLoose(inputTheme, _excluded$
|
|
7313
|
+
other = _objectWithoutPropertiesLoose(inputTheme, _excluded$2n);
|
|
7296
7314
|
|
|
7297
7315
|
const theme = _extends({}, other, {
|
|
7298
7316
|
components: {}
|
|
@@ -7458,7 +7476,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
7458
7476
|
selectOnFocus = !props.freeSolo,
|
|
7459
7477
|
value: valueProp
|
|
7460
7478
|
} = props;
|
|
7461
|
-
const id =
|
|
7479
|
+
const id = useReactId(idProp);
|
|
7462
7480
|
let getOptionLabel = getOptionLabelProp;
|
|
7463
7481
|
|
|
7464
7482
|
getOptionLabel = option => {
|
|
@@ -8463,9 +8481,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8463
8481
|
const backdropUnstyledClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
|
|
8464
8482
|
var backdropUnstyledClasses$1 = backdropUnstyledClasses;
|
|
8465
8483
|
|
|
8466
|
-
const _excluded$
|
|
8484
|
+
const _excluded$2m = ["classes", "className", "invisible", "component", "components", "componentsProps", "theme"];
|
|
8467
8485
|
|
|
8468
|
-
const useUtilityClasses$
|
|
8486
|
+
const useUtilityClasses$1T = ownerState => {
|
|
8469
8487
|
const {
|
|
8470
8488
|
classes,
|
|
8471
8489
|
invisible
|
|
@@ -8488,14 +8506,14 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8488
8506
|
/* eslint-disable react/prop-types */
|
|
8489
8507
|
theme
|
|
8490
8508
|
} = props,
|
|
8491
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
8509
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2m);
|
|
8492
8510
|
|
|
8493
8511
|
const ownerState = _extends({}, props, {
|
|
8494
8512
|
classes: classesProp,
|
|
8495
8513
|
invisible
|
|
8496
8514
|
});
|
|
8497
8515
|
|
|
8498
|
-
const classes = useUtilityClasses$
|
|
8516
|
+
const classes = useUtilityClasses$1T(ownerState);
|
|
8499
8517
|
const Root = components.Root || component;
|
|
8500
8518
|
const rootProps = componentsProps.root || {};
|
|
8501
8519
|
return /*#__PURE__*/jsxRuntime_1(Root, _extends({
|
|
@@ -8569,9 +8587,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8569
8587
|
const badgeUnstyledClasses = generateUtilityClasses('MuiBadge', ['root', 'badge', 'dot', 'standard', 'anchorOriginTopLeftCircular', 'anchorOriginTopLeftRectangular', 'anchorOriginTopRightCircular', 'anchorOriginTopRightRectangular', 'anchorOriginBottomLeftCircular', 'anchorOriginBottomLeftRectangular', 'anchorOriginBottomRightCircular', 'anchorOriginBottomRightRectangular', 'invisible']);
|
|
8570
8588
|
var badgeUnstyledClasses$1 = badgeUnstyledClasses;
|
|
8571
8589
|
|
|
8572
|
-
const _excluded$
|
|
8590
|
+
const _excluded$2l = ["anchorOrigin", "classes", "badgeContent", "component", "children", "className", "components", "componentsProps", "invisible", "max", "overlap", "showZero", "variant", "theme"];
|
|
8573
8591
|
|
|
8574
|
-
const useUtilityClasses$
|
|
8592
|
+
const useUtilityClasses$1S = ownerState => {
|
|
8575
8593
|
const {
|
|
8576
8594
|
variant,
|
|
8577
8595
|
anchorOrigin,
|
|
@@ -8608,7 +8626,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8608
8626
|
/* eslint-disable react/prop-types */
|
|
8609
8627
|
theme
|
|
8610
8628
|
} = props,
|
|
8611
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
8629
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2l);
|
|
8612
8630
|
|
|
8613
8631
|
const prevProps = usePreviousProps$1({
|
|
8614
8632
|
anchorOrigin: anchorOriginProp,
|
|
@@ -8647,7 +8665,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
8647
8665
|
displayValue = badgeContent > max ? `${max}+` : badgeContent;
|
|
8648
8666
|
}
|
|
8649
8667
|
|
|
8650
|
-
const classes = useUtilityClasses$
|
|
8668
|
+
const classes = useUtilityClasses$1S(ownerState);
|
|
8651
8669
|
const Root = components.Root || component;
|
|
8652
8670
|
const rootProps = componentsProps.root || {};
|
|
8653
8671
|
const Badge = components.Badge || 'span';
|
|
@@ -9005,9 +9023,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9005
9023
|
});
|
|
9006
9024
|
}
|
|
9007
9025
|
|
|
9008
|
-
const _excluded$
|
|
9026
|
+
const _excluded$2k = ["className", "component", "components", "componentsProps", "children", "disabled", "action", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseLeave"];
|
|
9009
9027
|
|
|
9010
|
-
const useUtilityClasses$
|
|
9028
|
+
const useUtilityClasses$1R = ownerState => {
|
|
9011
9029
|
const {
|
|
9012
9030
|
active,
|
|
9013
9031
|
disabled,
|
|
@@ -9042,7 +9060,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9042
9060
|
children,
|
|
9043
9061
|
action
|
|
9044
9062
|
} = props,
|
|
9045
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
9063
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2k);
|
|
9046
9064
|
|
|
9047
9065
|
const buttonRef = React__namespace.useRef();
|
|
9048
9066
|
const handleRef = useForkRef(buttonRef, ref);
|
|
@@ -9068,7 +9086,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9068
9086
|
|
|
9069
9087
|
const ButtonRoot = (_ref = component != null ? component : components.Root) != null ? _ref : 'button';
|
|
9070
9088
|
const buttonRootProps = appendOwnerState(ButtonRoot, _extends({}, other, componentsProps.root), ownerState);
|
|
9071
|
-
const classes = useUtilityClasses$
|
|
9089
|
+
const classes = useUtilityClasses$1R(ownerState);
|
|
9072
9090
|
return /*#__PURE__*/jsxRuntime_1(ButtonRoot, _extends({}, getRootProps(), buttonRootProps, {
|
|
9073
9091
|
className: clsx(classes.root, className, buttonRootProps.className),
|
|
9074
9092
|
children: children
|
|
@@ -9158,7 +9176,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9158
9176
|
const formControlUnstyledClasses = generateUtilityClasses('MuiFormControl', ['root', 'disabled']);
|
|
9159
9177
|
var classes$2 = formControlUnstyledClasses;
|
|
9160
9178
|
|
|
9161
|
-
const _excluded$
|
|
9179
|
+
const _excluded$2j = ["defaultValue", "children", "className", "component", "components", "componentsProps", "disabled", "error", "focused", "onChange", "required", "value"];
|
|
9162
9180
|
|
|
9163
9181
|
function hasValue$1(value) {
|
|
9164
9182
|
return value != null && !(Array.isArray(value) && value.length === 0) && value !== '';
|
|
@@ -9208,12 +9226,12 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9208
9226
|
componentsProps = {},
|
|
9209
9227
|
disabled = false,
|
|
9210
9228
|
error = false,
|
|
9211
|
-
focused: visuallyFocused
|
|
9229
|
+
focused: visuallyFocused,
|
|
9212
9230
|
onChange,
|
|
9213
9231
|
required = false,
|
|
9214
9232
|
value: incomingValue
|
|
9215
9233
|
} = props,
|
|
9216
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
9234
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2j);
|
|
9217
9235
|
|
|
9218
9236
|
const [value, setValue] = useControlled({
|
|
9219
9237
|
controlled: incomingValue,
|
|
@@ -9540,7 +9558,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9540
9558
|
};
|
|
9541
9559
|
}
|
|
9542
9560
|
|
|
9543
|
-
const _excluded$
|
|
9561
|
+
const _excluded$2i = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "component", "components", "componentsProps", "defaultValue", "disabled", "endAdornment", "error", "id", "maxRows", "minRows", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "rows", "type", "startAdornment", "value"];
|
|
9544
9562
|
const InputUnstyled = /*#__PURE__*/React__namespace.forwardRef(function InputUnstyled(props, ref) {
|
|
9545
9563
|
var _componentsProps$inpu, _ref, _componentsProps$root, _components$Input, _componentsProps$inpu2;
|
|
9546
9564
|
|
|
@@ -9577,7 +9595,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
9577
9595
|
startAdornment,
|
|
9578
9596
|
value
|
|
9579
9597
|
} = props,
|
|
9580
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
9598
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2i);
|
|
9581
9599
|
|
|
9582
9600
|
const {
|
|
9583
9601
|
getRootProps,
|
|
@@ -10521,9 +10539,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
10521
10539
|
const modalUnstyledClasses = generateUtilityClasses('MuiModal', ['root', 'hidden']);
|
|
10522
10540
|
var modalUnstyledClasses$1 = modalUnstyledClasses;
|
|
10523
10541
|
|
|
10524
|
-
const _excluded$
|
|
10542
|
+
const _excluded$2h = ["BackdropComponent", "BackdropProps", "children", "classes", "className", "closeAfterTransition", "component", "components", "componentsProps", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "theme", "onTransitionEnter", "onTransitionExited"];
|
|
10525
10543
|
|
|
10526
|
-
const useUtilityClasses$
|
|
10544
|
+
const useUtilityClasses$1Q = ownerState => {
|
|
10527
10545
|
const {
|
|
10528
10546
|
open,
|
|
10529
10547
|
exited,
|
|
@@ -10593,7 +10611,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
10593
10611
|
onTransitionEnter,
|
|
10594
10612
|
onTransitionExited
|
|
10595
10613
|
} = props,
|
|
10596
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
10614
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2h);
|
|
10597
10615
|
|
|
10598
10616
|
const [exited, setExited] = React__namespace.useState(true);
|
|
10599
10617
|
const modal = React__namespace.useRef({});
|
|
@@ -10670,7 +10688,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
10670
10688
|
keepMounted
|
|
10671
10689
|
});
|
|
10672
10690
|
|
|
10673
|
-
const classes = useUtilityClasses$
|
|
10691
|
+
const classes = useUtilityClasses$1Q(ownerState);
|
|
10674
10692
|
|
|
10675
10693
|
if (!keepMounted && !open && (!hasTransition || exited)) {
|
|
10676
10694
|
return null;
|
|
@@ -12852,7 +12870,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
12852
12870
|
defaultModifiers: defaultModifiers
|
|
12853
12871
|
}); // eslint-disable-next-line import/no-unused-modules
|
|
12854
12872
|
|
|
12855
|
-
const _excluded$
|
|
12873
|
+
const _excluded$2g = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "TransitionProps"],
|
|
12856
12874
|
_excluded2$9 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition"];
|
|
12857
12875
|
|
|
12858
12876
|
function flipPlacement(placement, direction) {
|
|
@@ -12878,7 +12896,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
12878
12896
|
}
|
|
12879
12897
|
}
|
|
12880
12898
|
|
|
12881
|
-
function resolveAnchorEl$
|
|
12899
|
+
function resolveAnchorEl$1(anchorEl) {
|
|
12882
12900
|
return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
|
12883
12901
|
}
|
|
12884
12902
|
|
|
@@ -12898,7 +12916,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
12898
12916
|
popperRef: popperRefProp,
|
|
12899
12917
|
TransitionProps
|
|
12900
12918
|
} = props,
|
|
12901
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
12919
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2g);
|
|
12902
12920
|
|
|
12903
12921
|
const tooltipRef = React__namespace.useRef(null);
|
|
12904
12922
|
const ownRef = useForkRef(tooltipRef, ref);
|
|
@@ -12930,7 +12948,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
12930
12948
|
setPlacement(data.placement);
|
|
12931
12949
|
};
|
|
12932
12950
|
|
|
12933
|
-
const resolvedAnchorEl = resolveAnchorEl$
|
|
12951
|
+
const resolvedAnchorEl = resolveAnchorEl$1(anchorEl);
|
|
12934
12952
|
|
|
12935
12953
|
{
|
|
12936
12954
|
if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
|
|
@@ -12971,7 +12989,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
12971
12989
|
popperModifiers = popperModifiers.concat(popperOptions.modifiers);
|
|
12972
12990
|
}
|
|
12973
12991
|
|
|
12974
|
-
const popper = createPopper(resolveAnchorEl$
|
|
12992
|
+
const popper = createPopper(resolveAnchorEl$1(anchorEl), tooltipRef.current, _extends({
|
|
12975
12993
|
placement: rtlPlacement
|
|
12976
12994
|
}, popperOptions, {
|
|
12977
12995
|
modifiers: popperModifiers
|
|
@@ -13038,7 +13056,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13038
13056
|
// If neither are provided let the Modal take care of choosing the container
|
|
13039
13057
|
|
|
13040
13058
|
|
|
13041
|
-
const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl$
|
|
13059
|
+
const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl$1(anchorEl)).body : undefined);
|
|
13042
13060
|
return /*#__PURE__*/jsxRuntime_1(Portal$1, {
|
|
13043
13061
|
disablePortal: disablePortal,
|
|
13044
13062
|
container: container,
|
|
@@ -13086,7 +13104,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13086
13104
|
*/
|
|
13087
13105
|
anchorEl: chainPropTypes(propTypes.oneOfType([HTMLElementType, propTypes.object, propTypes.func]), props => {
|
|
13088
13106
|
if (props.open) {
|
|
13089
|
-
const resolvedAnchorEl = resolveAnchorEl$
|
|
13107
|
+
const resolvedAnchorEl = resolveAnchorEl$1(props.anchorEl);
|
|
13090
13108
|
|
|
13091
13109
|
if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
|
|
13092
13110
|
const box = resolvedAnchorEl.getBoundingClientRect();
|
|
@@ -13256,7 +13274,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13256
13274
|
value: propTypes.node
|
|
13257
13275
|
} ;
|
|
13258
13276
|
|
|
13259
|
-
const _excluded$
|
|
13277
|
+
const _excluded$2f = ["aria-label", "aria-labelledby", "aria-valuetext", "className", "component", "classes", "defaultValue", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat", "isRtl", "components", "componentsProps"];
|
|
13260
13278
|
const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;
|
|
13261
13279
|
|
|
13262
13280
|
function asc(a, b) {
|
|
@@ -13416,7 +13434,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13416
13434
|
return cachedSupportsTouchActionNone;
|
|
13417
13435
|
}
|
|
13418
13436
|
|
|
13419
|
-
const useUtilityClasses$
|
|
13437
|
+
const useUtilityClasses$1P = ownerState => {
|
|
13420
13438
|
const {
|
|
13421
13439
|
disabled,
|
|
13422
13440
|
dragging,
|
|
@@ -13478,7 +13496,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13478
13496
|
components = {},
|
|
13479
13497
|
componentsProps = {}
|
|
13480
13498
|
} = props,
|
|
13481
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13499
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2f);
|
|
13482
13500
|
|
|
13483
13501
|
const touchId = React__namespace.useRef(); // We can't use the :active browser pseudo-classes.
|
|
13484
13502
|
// - The active state isn't triggered when clicking on the rail.
|
|
@@ -13908,7 +13926,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
13908
13926
|
valueLabelFormat
|
|
13909
13927
|
});
|
|
13910
13928
|
|
|
13911
|
-
const classes = useUtilityClasses$
|
|
13929
|
+
const classes = useUtilityClasses$1P(ownerState);
|
|
13912
13930
|
return /*#__PURE__*/jsxRuntime_2(Root, _extends({
|
|
13913
13931
|
ref: handleRef,
|
|
13914
13932
|
onMouseDown: handleMouseDown
|
|
@@ -14374,7 +14392,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14374
14392
|
const switchUnstyledClasses = generateUtilityClasses('MuiSwitch', ['root', 'input', 'track', 'thumb', 'checked', 'disabled', 'focusVisible', 'readOnly']);
|
|
14375
14393
|
var classes = switchUnstyledClasses;
|
|
14376
14394
|
|
|
14377
|
-
const _excluded$
|
|
14395
|
+
const _excluded$2e = ["checked", "className", "component", "components", "componentsProps", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required"];
|
|
14378
14396
|
|
|
14379
14397
|
/**
|
|
14380
14398
|
* The foundation for building custom-styled switches.
|
|
@@ -14404,7 +14422,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14404
14422
|
onFocusVisible,
|
|
14405
14423
|
readOnly: readOnlyProp
|
|
14406
14424
|
} = props,
|
|
14407
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
14425
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$2e);
|
|
14408
14426
|
|
|
14409
14427
|
const useSwitchProps = {
|
|
14410
14428
|
checked: checkedProp,
|
|
@@ -14544,7 +14562,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14544
14562
|
} ;
|
|
14545
14563
|
var SwitchUnstyled$1 = SwitchUnstyled;
|
|
14546
14564
|
|
|
14547
|
-
const _excluded$
|
|
14565
|
+
const _excluded$2d = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
14548
14566
|
|
|
14549
14567
|
function getStyleValue(computedStyle, property) {
|
|
14550
14568
|
return parseInt(computedStyle[property], 10) || 0;
|
|
@@ -14573,7 +14591,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14573
14591
|
style,
|
|
14574
14592
|
value
|
|
14575
14593
|
} = props,
|
|
14576
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
14594
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2d);
|
|
14577
14595
|
|
|
14578
14596
|
const {
|
|
14579
14597
|
current: isControlled
|
|
@@ -14759,6 +14777,895 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
14759
14777
|
} ;
|
|
14760
14778
|
var TextareaAutosize$1 = TextareaAutosize;
|
|
14761
14779
|
|
|
14780
|
+
function getTabsUnstyledUtilityClass(slot) {
|
|
14781
|
+
return generateUtilityClass('TabsUnstyled', slot);
|
|
14782
|
+
}
|
|
14783
|
+
const tabsUnstyledClasses = generateUtilityClasses('TabsUnstyled', ['root', 'horizontal', 'vertical']);
|
|
14784
|
+
var tabsUnstyledClasses$1 = tabsUnstyledClasses;
|
|
14785
|
+
|
|
14786
|
+
const useTabs = props => {
|
|
14787
|
+
const {
|
|
14788
|
+
value: valueProp,
|
|
14789
|
+
defaultValue,
|
|
14790
|
+
onChange,
|
|
14791
|
+
orientation,
|
|
14792
|
+
direction,
|
|
14793
|
+
selectionFollowsFocus
|
|
14794
|
+
} = props;
|
|
14795
|
+
const [value, setValue] = useControlled({
|
|
14796
|
+
controlled: valueProp,
|
|
14797
|
+
default: defaultValue,
|
|
14798
|
+
name: 'Tabs',
|
|
14799
|
+
state: 'value'
|
|
14800
|
+
});
|
|
14801
|
+
const idPrefix = useReactId();
|
|
14802
|
+
const onSelected = React__namespace.useCallback((e, newValue) => {
|
|
14803
|
+
setValue(newValue);
|
|
14804
|
+
|
|
14805
|
+
if (onChange) {
|
|
14806
|
+
onChange(e, newValue);
|
|
14807
|
+
}
|
|
14808
|
+
}, [onChange, setValue]);
|
|
14809
|
+
|
|
14810
|
+
const getRootProps = () => {
|
|
14811
|
+
return {};
|
|
14812
|
+
};
|
|
14813
|
+
|
|
14814
|
+
const tabsContextValue = React__namespace.useMemo(() => {
|
|
14815
|
+
return {
|
|
14816
|
+
idPrefix,
|
|
14817
|
+
value,
|
|
14818
|
+
onSelected,
|
|
14819
|
+
orientation,
|
|
14820
|
+
direction,
|
|
14821
|
+
selectionFollowsFocus
|
|
14822
|
+
};
|
|
14823
|
+
}, [idPrefix, value, onSelected, orientation, direction, selectionFollowsFocus]);
|
|
14824
|
+
return {
|
|
14825
|
+
getRootProps,
|
|
14826
|
+
tabsContextValue
|
|
14827
|
+
};
|
|
14828
|
+
};
|
|
14829
|
+
|
|
14830
|
+
var useTabs$1 = useTabs;
|
|
14831
|
+
|
|
14832
|
+
/**
|
|
14833
|
+
* @ignore - internal component.
|
|
14834
|
+
*/
|
|
14835
|
+
const Context = /*#__PURE__*/React__namespace.createContext(null);
|
|
14836
|
+
|
|
14837
|
+
{
|
|
14838
|
+
Context.displayName = 'TabsContext';
|
|
14839
|
+
}
|
|
14840
|
+
/**
|
|
14841
|
+
* @returns {unknown}
|
|
14842
|
+
*/
|
|
14843
|
+
|
|
14844
|
+
|
|
14845
|
+
function useTabContext() {
|
|
14846
|
+
return React__namespace.useContext(Context);
|
|
14847
|
+
}
|
|
14848
|
+
function getPanelId(context, value) {
|
|
14849
|
+
const {
|
|
14850
|
+
idPrefix
|
|
14851
|
+
} = context;
|
|
14852
|
+
|
|
14853
|
+
if (idPrefix === null) {
|
|
14854
|
+
return null;
|
|
14855
|
+
}
|
|
14856
|
+
|
|
14857
|
+
return `${context.idPrefix}-P-${value}`;
|
|
14858
|
+
}
|
|
14859
|
+
function getTabId(context, value) {
|
|
14860
|
+
const {
|
|
14861
|
+
idPrefix
|
|
14862
|
+
} = context;
|
|
14863
|
+
|
|
14864
|
+
if (idPrefix === null) {
|
|
14865
|
+
return null;
|
|
14866
|
+
}
|
|
14867
|
+
|
|
14868
|
+
return `${context.idPrefix}-T-${value}`;
|
|
14869
|
+
}
|
|
14870
|
+
var Context$1 = Context;
|
|
14871
|
+
|
|
14872
|
+
const _excluded$2c = ["children", "className", "value", "defaultValue", "orientation", "direction", "component", "components", "componentsProps", "onChange", "selectionFollowsFocus"];
|
|
14873
|
+
|
|
14874
|
+
const useUtilityClasses$1O = ownerState => {
|
|
14875
|
+
const {
|
|
14876
|
+
orientation
|
|
14877
|
+
} = ownerState;
|
|
14878
|
+
const slots = {
|
|
14879
|
+
root: ['root', orientation]
|
|
14880
|
+
};
|
|
14881
|
+
return composeClasses(slots, getTabsUnstyledUtilityClass, {});
|
|
14882
|
+
};
|
|
14883
|
+
/**
|
|
14884
|
+
*
|
|
14885
|
+
* Demos:
|
|
14886
|
+
*
|
|
14887
|
+
* - [Tabs](https://mui.com/components/tabs/)
|
|
14888
|
+
*
|
|
14889
|
+
* API:
|
|
14890
|
+
*
|
|
14891
|
+
* - [TabsUnstyled API](https://mui.com/api/tabs-unstyled/)
|
|
14892
|
+
*/
|
|
14893
|
+
|
|
14894
|
+
|
|
14895
|
+
const TabsUnstyled = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
14896
|
+
var _ref, _componentsProps$root;
|
|
14897
|
+
|
|
14898
|
+
const {
|
|
14899
|
+
children,
|
|
14900
|
+
className,
|
|
14901
|
+
orientation = 'horizontal',
|
|
14902
|
+
direction = 'ltr',
|
|
14903
|
+
component,
|
|
14904
|
+
components = {},
|
|
14905
|
+
componentsProps = {}
|
|
14906
|
+
} = props,
|
|
14907
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2c);
|
|
14908
|
+
|
|
14909
|
+
const {
|
|
14910
|
+
tabsContextValue,
|
|
14911
|
+
getRootProps
|
|
14912
|
+
} = useTabs$1(props);
|
|
14913
|
+
|
|
14914
|
+
const ownerState = _extends({}, props, {
|
|
14915
|
+
orientation,
|
|
14916
|
+
direction
|
|
14917
|
+
});
|
|
14918
|
+
|
|
14919
|
+
const classes = useUtilityClasses$1O(ownerState);
|
|
14920
|
+
const TabsRoot = (_ref = component != null ? component : components.Root) != null ? _ref : 'div';
|
|
14921
|
+
const tabsRootProps = appendOwnerState(TabsRoot, _extends({}, other, componentsProps.root), ownerState);
|
|
14922
|
+
return /*#__PURE__*/jsxRuntime_1(TabsRoot, _extends({}, getRootProps(), tabsRootProps, {
|
|
14923
|
+
ref: ref,
|
|
14924
|
+
className: clsx(classes.root, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className, className),
|
|
14925
|
+
children: /*#__PURE__*/jsxRuntime_1(Context$1.Provider, {
|
|
14926
|
+
value: tabsContextValue,
|
|
14927
|
+
children: children
|
|
14928
|
+
})
|
|
14929
|
+
}));
|
|
14930
|
+
});
|
|
14931
|
+
TabsUnstyled.propTypes
|
|
14932
|
+
/* remove-proptypes */
|
|
14933
|
+
= {
|
|
14934
|
+
// ----------------------------- Warning --------------------------------
|
|
14935
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
14936
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
14937
|
+
// ----------------------------------------------------------------------
|
|
14938
|
+
|
|
14939
|
+
/**
|
|
14940
|
+
* The content of the component.
|
|
14941
|
+
*/
|
|
14942
|
+
children: propTypes.node,
|
|
14943
|
+
|
|
14944
|
+
/**
|
|
14945
|
+
* @ignore
|
|
14946
|
+
*/
|
|
14947
|
+
className: propTypes.string,
|
|
14948
|
+
|
|
14949
|
+
/**
|
|
14950
|
+
* The component used for the root node.
|
|
14951
|
+
* Either a string to use a HTML element or a component.
|
|
14952
|
+
*/
|
|
14953
|
+
component: propTypes.elementType,
|
|
14954
|
+
|
|
14955
|
+
/**
|
|
14956
|
+
* The components used for each slot inside the Tabs.
|
|
14957
|
+
* Either a string to use a HTML element or a component.
|
|
14958
|
+
* @default {}
|
|
14959
|
+
*/
|
|
14960
|
+
components: propTypes.shape({
|
|
14961
|
+
Root: propTypes.elementType
|
|
14962
|
+
}),
|
|
14963
|
+
|
|
14964
|
+
/**
|
|
14965
|
+
* The props used for each slot inside the Tabs.
|
|
14966
|
+
* @default {}
|
|
14967
|
+
*/
|
|
14968
|
+
componentsProps: propTypes.object,
|
|
14969
|
+
|
|
14970
|
+
/**
|
|
14971
|
+
* The default value. Use when the component is not controlled.
|
|
14972
|
+
*/
|
|
14973
|
+
defaultValue: propTypes.oneOfType([propTypes.oneOf([false]), propTypes.number, propTypes.string]),
|
|
14974
|
+
|
|
14975
|
+
/**
|
|
14976
|
+
* The direction of the text.
|
|
14977
|
+
* @default 'ltr'
|
|
14978
|
+
*/
|
|
14979
|
+
direction: propTypes.oneOf(['ltr', 'rtl']),
|
|
14980
|
+
|
|
14981
|
+
/**
|
|
14982
|
+
* Callback invoked when new value is being set.
|
|
14983
|
+
*/
|
|
14984
|
+
onChange: propTypes.func,
|
|
14985
|
+
|
|
14986
|
+
/**
|
|
14987
|
+
* The component orientation (layout flow direction).
|
|
14988
|
+
* @default 'horizontal'
|
|
14989
|
+
*/
|
|
14990
|
+
orientation: propTypes.oneOf(['horizontal', 'vertical']),
|
|
14991
|
+
|
|
14992
|
+
/**
|
|
14993
|
+
* If `true` the selected tab changes on focus. Otherwise it only
|
|
14994
|
+
* changes on activation.
|
|
14995
|
+
*/
|
|
14996
|
+
selectionFollowsFocus: propTypes.bool,
|
|
14997
|
+
|
|
14998
|
+
/**
|
|
14999
|
+
* The value of the currently selected `Tab`.
|
|
15000
|
+
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
15001
|
+
*/
|
|
15002
|
+
value: propTypes.oneOfType([propTypes.oneOf([false]), propTypes.number, propTypes.string])
|
|
15003
|
+
} ;
|
|
15004
|
+
var TabsUnstyled$1 = TabsUnstyled;
|
|
15005
|
+
|
|
15006
|
+
function getTabUnstyledUtilityClass(slot) {
|
|
15007
|
+
return generateUtilityClass('TabUnstyled', slot);
|
|
15008
|
+
}
|
|
15009
|
+
const tabUnstyledClasses = generateUtilityClasses('TabUnstyled', ['root', 'selected', 'disabled']);
|
|
15010
|
+
var tabUnstyledClasses$1 = tabUnstyledClasses;
|
|
15011
|
+
|
|
15012
|
+
const _excluded$2b = ["getRootProps"];
|
|
15013
|
+
|
|
15014
|
+
const useTab = props => {
|
|
15015
|
+
const {
|
|
15016
|
+
value: valueProp,
|
|
15017
|
+
onChange,
|
|
15018
|
+
onClick,
|
|
15019
|
+
onFocus
|
|
15020
|
+
} = props;
|
|
15021
|
+
|
|
15022
|
+
const _useButton = useButton(props),
|
|
15023
|
+
{
|
|
15024
|
+
getRootProps: getRootPropsButton
|
|
15025
|
+
} = _useButton,
|
|
15026
|
+
otherButtonProps = _objectWithoutPropertiesLoose(_useButton, _excluded$2b);
|
|
15027
|
+
|
|
15028
|
+
const context = useTabContext();
|
|
15029
|
+
|
|
15030
|
+
if (context === null) {
|
|
15031
|
+
throw new Error('No TabContext provided');
|
|
15032
|
+
}
|
|
15033
|
+
|
|
15034
|
+
const value = valueProp != null ? valueProp : 0;
|
|
15035
|
+
const selected = context.value === value;
|
|
15036
|
+
const selectionFollowsFocus = context.selectionFollowsFocus;
|
|
15037
|
+
const a11yAttributes = {
|
|
15038
|
+
role: 'tab',
|
|
15039
|
+
'aria-controls': getPanelId(context, value),
|
|
15040
|
+
id: getTabId(context, value),
|
|
15041
|
+
'aria-selected': selected,
|
|
15042
|
+
disabled: otherButtonProps.disabled
|
|
15043
|
+
};
|
|
15044
|
+
|
|
15045
|
+
const handleFocus = event => {
|
|
15046
|
+
if (selectionFollowsFocus && !selected) {
|
|
15047
|
+
if (onChange) {
|
|
15048
|
+
onChange(event, value);
|
|
15049
|
+
}
|
|
15050
|
+
|
|
15051
|
+
context.onSelected(event, value);
|
|
15052
|
+
}
|
|
15053
|
+
|
|
15054
|
+
if (onFocus) {
|
|
15055
|
+
onFocus(event);
|
|
15056
|
+
}
|
|
15057
|
+
};
|
|
15058
|
+
|
|
15059
|
+
const handleClick = event => {
|
|
15060
|
+
if (!selected) {
|
|
15061
|
+
if (onChange) {
|
|
15062
|
+
onChange(event, value);
|
|
15063
|
+
}
|
|
15064
|
+
|
|
15065
|
+
context.onSelected(event, value);
|
|
15066
|
+
}
|
|
15067
|
+
|
|
15068
|
+
if (onClick) {
|
|
15069
|
+
onClick(event);
|
|
15070
|
+
}
|
|
15071
|
+
};
|
|
15072
|
+
|
|
15073
|
+
const getRootProps = otherHandlers => {
|
|
15074
|
+
const buttonResolvedProps = getRootPropsButton(_extends({
|
|
15075
|
+
onClick: handleClick,
|
|
15076
|
+
onFocus: handleFocus
|
|
15077
|
+
}, otherHandlers));
|
|
15078
|
+
return _extends({}, buttonResolvedProps, a11yAttributes);
|
|
15079
|
+
};
|
|
15080
|
+
|
|
15081
|
+
return _extends({
|
|
15082
|
+
getRootProps
|
|
15083
|
+
}, otherButtonProps, {
|
|
15084
|
+
selected
|
|
15085
|
+
});
|
|
15086
|
+
};
|
|
15087
|
+
|
|
15088
|
+
var useTab$1 = useTab;
|
|
15089
|
+
|
|
15090
|
+
const _excluded$2a = ["action", "children", "value", "className", "disabled", "onChange", "onClick", "onFocus", "component", "components", "componentsProps"];
|
|
15091
|
+
|
|
15092
|
+
const useUtilityClasses$1N = ownerState => {
|
|
15093
|
+
const {
|
|
15094
|
+
selected,
|
|
15095
|
+
disabled
|
|
15096
|
+
} = ownerState;
|
|
15097
|
+
const slots = {
|
|
15098
|
+
root: ['root', selected && 'selected', disabled && 'disabled']
|
|
15099
|
+
};
|
|
15100
|
+
return composeClasses(slots, getTabUnstyledUtilityClass, {});
|
|
15101
|
+
};
|
|
15102
|
+
/**
|
|
15103
|
+
*
|
|
15104
|
+
* Demos:
|
|
15105
|
+
*
|
|
15106
|
+
* - [Tabs](https://mui.com/components/tabs/)
|
|
15107
|
+
*
|
|
15108
|
+
* API:
|
|
15109
|
+
*
|
|
15110
|
+
* - [TabUnstyled API](https://mui.com/api/tab-unstyled/)
|
|
15111
|
+
*/
|
|
15112
|
+
|
|
15113
|
+
|
|
15114
|
+
const TabUnstyled = /*#__PURE__*/React__namespace.forwardRef(function TabUnstyled(props, ref) {
|
|
15115
|
+
var _ref, _componentsProps$root;
|
|
15116
|
+
|
|
15117
|
+
const {
|
|
15118
|
+
action,
|
|
15119
|
+
children,
|
|
15120
|
+
className,
|
|
15121
|
+
disabled = false,
|
|
15122
|
+
component,
|
|
15123
|
+
components = {},
|
|
15124
|
+
componentsProps = {}
|
|
15125
|
+
} = props,
|
|
15126
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$2a);
|
|
15127
|
+
|
|
15128
|
+
const tabRef = React__namespace.useRef();
|
|
15129
|
+
const handleRef = useForkRef(tabRef, ref);
|
|
15130
|
+
const {
|
|
15131
|
+
active,
|
|
15132
|
+
focusVisible,
|
|
15133
|
+
setFocusVisible,
|
|
15134
|
+
selected,
|
|
15135
|
+
getRootProps
|
|
15136
|
+
} = useTab$1(_extends({}, props, {
|
|
15137
|
+
ref: handleRef
|
|
15138
|
+
}));
|
|
15139
|
+
React__namespace.useImperativeHandle(action, () => ({
|
|
15140
|
+
focusVisible: () => {
|
|
15141
|
+
setFocusVisible(true);
|
|
15142
|
+
tabRef.current.focus();
|
|
15143
|
+
}
|
|
15144
|
+
}), [setFocusVisible]);
|
|
15145
|
+
|
|
15146
|
+
const ownerState = _extends({}, props, {
|
|
15147
|
+
active,
|
|
15148
|
+
focusVisible,
|
|
15149
|
+
disabled,
|
|
15150
|
+
selected
|
|
15151
|
+
});
|
|
15152
|
+
|
|
15153
|
+
const classes = useUtilityClasses$1N(ownerState);
|
|
15154
|
+
const TabRoot = (_ref = component != null ? component : components.Root) != null ? _ref : 'button';
|
|
15155
|
+
const tabRootProps = appendOwnerState(TabRoot, _extends({}, other, componentsProps.root), ownerState);
|
|
15156
|
+
return /*#__PURE__*/jsxRuntime_1(TabRoot, _extends({}, getRootProps(), tabRootProps, {
|
|
15157
|
+
className: clsx(classes.root, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className, className),
|
|
15158
|
+
ref: ref,
|
|
15159
|
+
children: children
|
|
15160
|
+
}));
|
|
15161
|
+
});
|
|
15162
|
+
TabUnstyled.propTypes
|
|
15163
|
+
/* remove-proptypes */
|
|
15164
|
+
= {
|
|
15165
|
+
// ----------------------------- Warning --------------------------------
|
|
15166
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
15167
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
15168
|
+
// ----------------------------------------------------------------------
|
|
15169
|
+
|
|
15170
|
+
/**
|
|
15171
|
+
* A ref for imperative actions. It currently only supports `focusVisible()` action.
|
|
15172
|
+
*/
|
|
15173
|
+
action: propTypes.oneOfType([propTypes.func, propTypes.shape({
|
|
15174
|
+
current: propTypes.shape({
|
|
15175
|
+
focusVisible: propTypes.func.isRequired
|
|
15176
|
+
})
|
|
15177
|
+
})]),
|
|
15178
|
+
|
|
15179
|
+
/**
|
|
15180
|
+
* @ignore
|
|
15181
|
+
*/
|
|
15182
|
+
children: propTypes.node,
|
|
15183
|
+
|
|
15184
|
+
/**
|
|
15185
|
+
* @ignore
|
|
15186
|
+
*/
|
|
15187
|
+
className: propTypes.string,
|
|
15188
|
+
|
|
15189
|
+
/**
|
|
15190
|
+
* The component used for the root node.
|
|
15191
|
+
* Either a string to use a HTML element or a component.
|
|
15192
|
+
*/
|
|
15193
|
+
component: propTypes.elementType,
|
|
15194
|
+
|
|
15195
|
+
/**
|
|
15196
|
+
* The components used for each slot inside the Tab.
|
|
15197
|
+
* Either a string to use a HTML element or a component.
|
|
15198
|
+
* @default {}
|
|
15199
|
+
*/
|
|
15200
|
+
components: propTypes.shape({
|
|
15201
|
+
Root: propTypes.elementType
|
|
15202
|
+
}),
|
|
15203
|
+
|
|
15204
|
+
/**
|
|
15205
|
+
* The props used for each slot inside the Tab.
|
|
15206
|
+
* @default {}
|
|
15207
|
+
*/
|
|
15208
|
+
componentsProps: propTypes.object,
|
|
15209
|
+
|
|
15210
|
+
/**
|
|
15211
|
+
* If `true`, the component is disabled.
|
|
15212
|
+
* @default false
|
|
15213
|
+
*/
|
|
15214
|
+
disabled: propTypes.bool,
|
|
15215
|
+
|
|
15216
|
+
/**
|
|
15217
|
+
* Callback invoked when new value is being set.
|
|
15218
|
+
*/
|
|
15219
|
+
onChange: propTypes.func,
|
|
15220
|
+
|
|
15221
|
+
/**
|
|
15222
|
+
* @ignore
|
|
15223
|
+
*/
|
|
15224
|
+
onClick: propTypes.func,
|
|
15225
|
+
|
|
15226
|
+
/**
|
|
15227
|
+
* @ignore
|
|
15228
|
+
*/
|
|
15229
|
+
onFocus: propTypes.func,
|
|
15230
|
+
|
|
15231
|
+
/**
|
|
15232
|
+
* You can provide your own value. Otherwise, we fall back to the child position index.
|
|
15233
|
+
*/
|
|
15234
|
+
value: propTypes.oneOfType([propTypes.number, propTypes.string])
|
|
15235
|
+
} ;
|
|
15236
|
+
var TabUnstyled$1 = TabUnstyled;
|
|
15237
|
+
|
|
15238
|
+
function getTabsListUnstyledUtilityClass(slot) {
|
|
15239
|
+
return generateUtilityClass('TabsListUnstyled', slot);
|
|
15240
|
+
}
|
|
15241
|
+
const tabsListUnstyledClasses = generateUtilityClasses('TabsListUnstyled', ['root', 'horizontal', 'vertical']);
|
|
15242
|
+
var tabsListUnstyledClasses$1 = tabsListUnstyledClasses;
|
|
15243
|
+
|
|
15244
|
+
const nextItem$2 = (list, item) => {
|
|
15245
|
+
if (!list) {
|
|
15246
|
+
return null;
|
|
15247
|
+
}
|
|
15248
|
+
|
|
15249
|
+
if (list === item) {
|
|
15250
|
+
return list.firstChild;
|
|
15251
|
+
}
|
|
15252
|
+
|
|
15253
|
+
if (item && item.nextElementSibling) {
|
|
15254
|
+
return item.nextElementSibling;
|
|
15255
|
+
}
|
|
15256
|
+
|
|
15257
|
+
return list.firstChild;
|
|
15258
|
+
};
|
|
15259
|
+
|
|
15260
|
+
const previousItem$2 = (list, item) => {
|
|
15261
|
+
if (!list) {
|
|
15262
|
+
return null;
|
|
15263
|
+
}
|
|
15264
|
+
|
|
15265
|
+
if (list === item) {
|
|
15266
|
+
return list.lastChild;
|
|
15267
|
+
}
|
|
15268
|
+
|
|
15269
|
+
if (item && item.previousElementSibling) {
|
|
15270
|
+
return item.previousElementSibling;
|
|
15271
|
+
}
|
|
15272
|
+
|
|
15273
|
+
return list.lastChild;
|
|
15274
|
+
};
|
|
15275
|
+
|
|
15276
|
+
const moveFocus$2 = (list, currentFocus, traversalFunction) => {
|
|
15277
|
+
let wrappedOnce = false;
|
|
15278
|
+
let nextFocus = traversalFunction(list, currentFocus);
|
|
15279
|
+
|
|
15280
|
+
while (list && nextFocus) {
|
|
15281
|
+
// Prevent infinite loop.
|
|
15282
|
+
if (nextFocus === list.firstChild) {
|
|
15283
|
+
if (wrappedOnce) {
|
|
15284
|
+
return;
|
|
15285
|
+
}
|
|
15286
|
+
|
|
15287
|
+
wrappedOnce = true;
|
|
15288
|
+
} // Same logic as useAutocomplete.js
|
|
15289
|
+
|
|
15290
|
+
|
|
15291
|
+
const nextFocusDisabled = nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';
|
|
15292
|
+
|
|
15293
|
+
if (!nextFocus.hasAttribute('tabindex') || nextFocusDisabled) {
|
|
15294
|
+
// Move to the next element.
|
|
15295
|
+
nextFocus = traversalFunction(list, nextFocus);
|
|
15296
|
+
} else {
|
|
15297
|
+
nextFocus.focus();
|
|
15298
|
+
return;
|
|
15299
|
+
}
|
|
15300
|
+
}
|
|
15301
|
+
};
|
|
15302
|
+
|
|
15303
|
+
const useTabsList = props => {
|
|
15304
|
+
const {
|
|
15305
|
+
'aria-label': ariaLabel,
|
|
15306
|
+
'aria-labelledby': ariaLabelledBy,
|
|
15307
|
+
children,
|
|
15308
|
+
ref
|
|
15309
|
+
} = props;
|
|
15310
|
+
const tabsListRef = /*#__PURE__*/React__namespace.createRef();
|
|
15311
|
+
const handleRef = useForkRef(tabsListRef, ref);
|
|
15312
|
+
const context = useTabContext();
|
|
15313
|
+
|
|
15314
|
+
if (context === null) {
|
|
15315
|
+
throw new Error('No TabContext provided');
|
|
15316
|
+
}
|
|
15317
|
+
|
|
15318
|
+
const {
|
|
15319
|
+
value,
|
|
15320
|
+
orientation = 'horizontal',
|
|
15321
|
+
direction = 'ltr'
|
|
15322
|
+
} = context;
|
|
15323
|
+
const isRtl = direction === 'rtl';
|
|
15324
|
+
|
|
15325
|
+
const handleKeyDown = event => {
|
|
15326
|
+
const list = tabsListRef.current;
|
|
15327
|
+
const currentFocus = ownerDocument(list).activeElement; // Keyboard navigation assumes that [role="tab"] are siblings
|
|
15328
|
+
// though we might warn in the future about nested, interactive elements
|
|
15329
|
+
// as a a11y violation
|
|
15330
|
+
|
|
15331
|
+
const role = currentFocus == null ? void 0 : currentFocus.getAttribute('role');
|
|
15332
|
+
|
|
15333
|
+
if (role !== 'tab') {
|
|
15334
|
+
return;
|
|
15335
|
+
}
|
|
15336
|
+
|
|
15337
|
+
let previousItemKey = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
|
|
15338
|
+
let nextItemKey = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
|
|
15339
|
+
|
|
15340
|
+
if (orientation === 'horizontal' && isRtl) {
|
|
15341
|
+
// swap previousItemKey with nextItemKey
|
|
15342
|
+
previousItemKey = 'ArrowRight';
|
|
15343
|
+
nextItemKey = 'ArrowLeft';
|
|
15344
|
+
}
|
|
15345
|
+
|
|
15346
|
+
switch (event.key) {
|
|
15347
|
+
case previousItemKey:
|
|
15348
|
+
event.preventDefault();
|
|
15349
|
+
moveFocus$2(list, currentFocus, previousItem$2);
|
|
15350
|
+
break;
|
|
15351
|
+
|
|
15352
|
+
case nextItemKey:
|
|
15353
|
+
event.preventDefault();
|
|
15354
|
+
moveFocus$2(list, currentFocus, nextItem$2);
|
|
15355
|
+
break;
|
|
15356
|
+
|
|
15357
|
+
case 'Home':
|
|
15358
|
+
event.preventDefault();
|
|
15359
|
+
moveFocus$2(list, null, nextItem$2);
|
|
15360
|
+
break;
|
|
15361
|
+
|
|
15362
|
+
case 'End':
|
|
15363
|
+
event.preventDefault();
|
|
15364
|
+
moveFocus$2(list, null, previousItem$2);
|
|
15365
|
+
break;
|
|
15366
|
+
}
|
|
15367
|
+
};
|
|
15368
|
+
|
|
15369
|
+
const createHandleKeyDown = otherHandlers => event => {
|
|
15370
|
+
var _otherHandlers$onKeyD;
|
|
15371
|
+
|
|
15372
|
+
handleKeyDown(event);
|
|
15373
|
+
(_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);
|
|
15374
|
+
};
|
|
15375
|
+
|
|
15376
|
+
const getRootProps = otherHandlers => {
|
|
15377
|
+
const propsEventHandlers = extractEventHandlers(props);
|
|
15378
|
+
|
|
15379
|
+
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);
|
|
15380
|
+
|
|
15381
|
+
const ownEventHandlers = {
|
|
15382
|
+
onKeyDown: createHandleKeyDown(externalEventHandlers)
|
|
15383
|
+
};
|
|
15384
|
+
|
|
15385
|
+
const mergedEventHandlers = _extends({}, externalEventHandlers, ownEventHandlers);
|
|
15386
|
+
|
|
15387
|
+
return _extends({
|
|
15388
|
+
'aria-label': ariaLabel,
|
|
15389
|
+
'aria-labelledby': ariaLabelledBy,
|
|
15390
|
+
'aria-orientation': orientation === 'vertical' ? 'vertical' : null,
|
|
15391
|
+
role: 'tablist',
|
|
15392
|
+
ref: handleRef
|
|
15393
|
+
}, mergedEventHandlers);
|
|
15394
|
+
};
|
|
15395
|
+
|
|
15396
|
+
const processChildren = React__namespace.useCallback(() => {
|
|
15397
|
+
const valueToIndex = new Map();
|
|
15398
|
+
let childIndex = 0;
|
|
15399
|
+
const processedChildren = React__namespace.Children.map(children, child => {
|
|
15400
|
+
if (! /*#__PURE__*/React__namespace.isValidElement(child)) {
|
|
15401
|
+
return null;
|
|
15402
|
+
}
|
|
15403
|
+
|
|
15404
|
+
{
|
|
15405
|
+
if (reactIs_2(child)) {
|
|
15406
|
+
console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
|
|
15407
|
+
}
|
|
15408
|
+
}
|
|
15409
|
+
|
|
15410
|
+
const childValue = child.props.value === undefined ? childIndex : child.props.value;
|
|
15411
|
+
valueToIndex.set(childValue, childIndex);
|
|
15412
|
+
childIndex += 1;
|
|
15413
|
+
return /*#__PURE__*/React__namespace.cloneElement(child, _extends({
|
|
15414
|
+
value: childValue
|
|
15415
|
+
}, childIndex === 1 && value === false && !child.props.tabIndex || value === childValue ? {
|
|
15416
|
+
tabIndex: 0
|
|
15417
|
+
} : {
|
|
15418
|
+
tabIndex: -1
|
|
15419
|
+
}));
|
|
15420
|
+
});
|
|
15421
|
+
return processedChildren;
|
|
15422
|
+
}, [children, value]);
|
|
15423
|
+
return {
|
|
15424
|
+
isRtl,
|
|
15425
|
+
orientation,
|
|
15426
|
+
value,
|
|
15427
|
+
processChildren,
|
|
15428
|
+
getRootProps
|
|
15429
|
+
};
|
|
15430
|
+
};
|
|
15431
|
+
|
|
15432
|
+
var useTabsList$1 = useTabsList;
|
|
15433
|
+
|
|
15434
|
+
const _excluded$29 = ["className", "children", "component", "components", "componentsProps"];
|
|
15435
|
+
|
|
15436
|
+
const useUtilityClasses$1M = ownerState => {
|
|
15437
|
+
const {
|
|
15438
|
+
orientation
|
|
15439
|
+
} = ownerState;
|
|
15440
|
+
const slots = {
|
|
15441
|
+
root: ['root', orientation]
|
|
15442
|
+
};
|
|
15443
|
+
return composeClasses(slots, getTabsListUnstyledUtilityClass, {});
|
|
15444
|
+
};
|
|
15445
|
+
/**
|
|
15446
|
+
*
|
|
15447
|
+
* Demos:
|
|
15448
|
+
*
|
|
15449
|
+
* - [Tabs](https://mui.com/components/tabs/)
|
|
15450
|
+
*
|
|
15451
|
+
* API:
|
|
15452
|
+
*
|
|
15453
|
+
* - [TabsListUnstyled API](https://mui.com/api/tabs-list-unstyled/)
|
|
15454
|
+
*/
|
|
15455
|
+
|
|
15456
|
+
|
|
15457
|
+
const TabsListUnstyled = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
15458
|
+
var _ref, _componentsProps$root;
|
|
15459
|
+
|
|
15460
|
+
const {
|
|
15461
|
+
className,
|
|
15462
|
+
component,
|
|
15463
|
+
components = {},
|
|
15464
|
+
componentsProps = {}
|
|
15465
|
+
} = props,
|
|
15466
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$29);
|
|
15467
|
+
|
|
15468
|
+
const {
|
|
15469
|
+
isRtl,
|
|
15470
|
+
orientation,
|
|
15471
|
+
getRootProps,
|
|
15472
|
+
processChildren
|
|
15473
|
+
} = useTabsList$1(_extends({}, props, {
|
|
15474
|
+
ref
|
|
15475
|
+
}));
|
|
15476
|
+
|
|
15477
|
+
const ownerState = _extends({}, props, {
|
|
15478
|
+
isRtl,
|
|
15479
|
+
orientation
|
|
15480
|
+
});
|
|
15481
|
+
|
|
15482
|
+
const classes = useUtilityClasses$1M(ownerState);
|
|
15483
|
+
const TabsListRoot = (_ref = component != null ? component : components.Root) != null ? _ref : 'div';
|
|
15484
|
+
const tabsListRootProps = appendOwnerState(TabsListRoot, _extends({}, other, componentsProps.root), ownerState);
|
|
15485
|
+
const processedChildren = processChildren();
|
|
15486
|
+
return /*#__PURE__*/jsxRuntime_1(TabsListRoot, _extends({}, getRootProps(), tabsListRootProps, {
|
|
15487
|
+
className: clsx(className, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className, classes.root),
|
|
15488
|
+
children: processedChildren
|
|
15489
|
+
}));
|
|
15490
|
+
});
|
|
15491
|
+
TabsListUnstyled.propTypes
|
|
15492
|
+
/* remove-proptypes */
|
|
15493
|
+
= {
|
|
15494
|
+
// ----------------------------- Warning --------------------------------
|
|
15495
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
15496
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
15497
|
+
// ----------------------------------------------------------------------
|
|
15498
|
+
|
|
15499
|
+
/**
|
|
15500
|
+
* The content of the component.
|
|
15501
|
+
*/
|
|
15502
|
+
children: propTypes.node,
|
|
15503
|
+
|
|
15504
|
+
/**
|
|
15505
|
+
* @ignore
|
|
15506
|
+
*/
|
|
15507
|
+
className: propTypes.string,
|
|
15508
|
+
|
|
15509
|
+
/**
|
|
15510
|
+
* The component used for the root node.
|
|
15511
|
+
* Either a string to use a HTML element or a component.
|
|
15512
|
+
*/
|
|
15513
|
+
component: propTypes.elementType,
|
|
15514
|
+
|
|
15515
|
+
/**
|
|
15516
|
+
* The components used for each slot inside the TabsList.
|
|
15517
|
+
* Either a string to use a HTML element or a component.
|
|
15518
|
+
* @default {}
|
|
15519
|
+
*/
|
|
15520
|
+
components: propTypes.shape({
|
|
15521
|
+
Root: propTypes.elementType
|
|
15522
|
+
}),
|
|
15523
|
+
|
|
15524
|
+
/**
|
|
15525
|
+
* The props used for each slot inside the TabsList.
|
|
15526
|
+
* @default {}
|
|
15527
|
+
*/
|
|
15528
|
+
componentsProps: propTypes.object
|
|
15529
|
+
} ;
|
|
15530
|
+
var TabsListUnstyled$1 = TabsListUnstyled;
|
|
15531
|
+
|
|
15532
|
+
function getTabPanelUnstyledUtilityClass(slot) {
|
|
15533
|
+
return generateUtilityClass('TabPanelUnstyled', slot);
|
|
15534
|
+
}
|
|
15535
|
+
const tabPanelUnstyledClasses = generateUtilityClasses('TabPanelUnstyled', ['root', 'hidden']);
|
|
15536
|
+
var tabPanelUnstyledClasses$1 = tabPanelUnstyledClasses;
|
|
15537
|
+
|
|
15538
|
+
const useTabPanel = props => {
|
|
15539
|
+
const {
|
|
15540
|
+
value
|
|
15541
|
+
} = props;
|
|
15542
|
+
const context = useTabContext();
|
|
15543
|
+
|
|
15544
|
+
if (context === null) {
|
|
15545
|
+
throw new Error('No TabContext provided');
|
|
15546
|
+
}
|
|
15547
|
+
|
|
15548
|
+
const hidden = value !== context.value;
|
|
15549
|
+
const id = getPanelId(context, value);
|
|
15550
|
+
const tabId = getTabId(context, value);
|
|
15551
|
+
|
|
15552
|
+
const getRootProps = () => {
|
|
15553
|
+
return {
|
|
15554
|
+
'aria-labelledby': tabId,
|
|
15555
|
+
hidden,
|
|
15556
|
+
id
|
|
15557
|
+
};
|
|
15558
|
+
};
|
|
15559
|
+
|
|
15560
|
+
return {
|
|
15561
|
+
hidden,
|
|
15562
|
+
getRootProps
|
|
15563
|
+
};
|
|
15564
|
+
};
|
|
15565
|
+
|
|
15566
|
+
var useTabPanel$1 = useTabPanel;
|
|
15567
|
+
|
|
15568
|
+
const _excluded$28 = ["children", "className", "value", "components", "componentsProps", "component"];
|
|
15569
|
+
|
|
15570
|
+
const useUtilityClasses$1L = ownerState => {
|
|
15571
|
+
const {
|
|
15572
|
+
hidden
|
|
15573
|
+
} = ownerState;
|
|
15574
|
+
const slots = {
|
|
15575
|
+
root: ['root', hidden && 'hidden']
|
|
15576
|
+
};
|
|
15577
|
+
return composeClasses(slots, getTabPanelUnstyledUtilityClass, {});
|
|
15578
|
+
};
|
|
15579
|
+
/**
|
|
15580
|
+
*
|
|
15581
|
+
* Demos:
|
|
15582
|
+
*
|
|
15583
|
+
* - [Tabs](https://mui.com/components/tabs/)
|
|
15584
|
+
*
|
|
15585
|
+
* API:
|
|
15586
|
+
*
|
|
15587
|
+
* - [TabPanelUnstyled API](https://mui.com/api/tab-panel-unstyled/)
|
|
15588
|
+
*/
|
|
15589
|
+
|
|
15590
|
+
|
|
15591
|
+
const TabPanelUnstyled = /*#__PURE__*/React__namespace.forwardRef(function TabPanelUnstyled(props, ref) {
|
|
15592
|
+
var _ref, _componentsProps$root;
|
|
15593
|
+
|
|
15594
|
+
const {
|
|
15595
|
+
children,
|
|
15596
|
+
className,
|
|
15597
|
+
components = {},
|
|
15598
|
+
componentsProps = {},
|
|
15599
|
+
component
|
|
15600
|
+
} = props,
|
|
15601
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$28);
|
|
15602
|
+
|
|
15603
|
+
const {
|
|
15604
|
+
hidden,
|
|
15605
|
+
getRootProps
|
|
15606
|
+
} = useTabPanel$1(props);
|
|
15607
|
+
|
|
15608
|
+
const ownerState = _extends({}, props, {
|
|
15609
|
+
hidden
|
|
15610
|
+
});
|
|
15611
|
+
|
|
15612
|
+
const classes = useUtilityClasses$1L(ownerState);
|
|
15613
|
+
const TabPanelRoot = (_ref = component != null ? component : components.Root) != null ? _ref : 'div';
|
|
15614
|
+
const tabPanelRootProps = appendOwnerState(TabPanelRoot, _extends({}, other, componentsProps.root), ownerState);
|
|
15615
|
+
return /*#__PURE__*/jsxRuntime_1(TabPanelRoot, _extends({}, getRootProps(), {
|
|
15616
|
+
ref: ref,
|
|
15617
|
+
role: "tabpanel"
|
|
15618
|
+
}, tabPanelRootProps, {
|
|
15619
|
+
className: clsx(classes.root, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className, className),
|
|
15620
|
+
children: !hidden && children
|
|
15621
|
+
}));
|
|
15622
|
+
});
|
|
15623
|
+
TabPanelUnstyled.propTypes
|
|
15624
|
+
/* remove-proptypes */
|
|
15625
|
+
= {
|
|
15626
|
+
// ----------------------------- Warning --------------------------------
|
|
15627
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
15628
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
15629
|
+
// ----------------------------------------------------------------------
|
|
15630
|
+
|
|
15631
|
+
/**
|
|
15632
|
+
* The content of the component.
|
|
15633
|
+
*/
|
|
15634
|
+
children: propTypes.node,
|
|
15635
|
+
|
|
15636
|
+
/**
|
|
15637
|
+
* @ignore
|
|
15638
|
+
*/
|
|
15639
|
+
className: propTypes.string,
|
|
15640
|
+
|
|
15641
|
+
/**
|
|
15642
|
+
* The component used for the root node.
|
|
15643
|
+
* Either a string to use a HTML element or a component.
|
|
15644
|
+
*/
|
|
15645
|
+
component: propTypes.elementType,
|
|
15646
|
+
|
|
15647
|
+
/**
|
|
15648
|
+
* The components used for each slot inside the TabPanel.
|
|
15649
|
+
* Either a string to use a HTML element or a component.
|
|
15650
|
+
* @default {}
|
|
15651
|
+
*/
|
|
15652
|
+
components: propTypes.shape({
|
|
15653
|
+
Root: propTypes.elementType
|
|
15654
|
+
}),
|
|
15655
|
+
|
|
15656
|
+
/**
|
|
15657
|
+
* The props used for each slot inside the TabPanel.
|
|
15658
|
+
* @default {}
|
|
15659
|
+
*/
|
|
15660
|
+
componentsProps: propTypes.object,
|
|
15661
|
+
|
|
15662
|
+
/**
|
|
15663
|
+
* The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected.
|
|
15664
|
+
*/
|
|
15665
|
+
value: propTypes.oneOfType([propTypes.number, propTypes.string]).isRequired
|
|
15666
|
+
} ;
|
|
15667
|
+
var TabPanelUnstyled$1 = TabPanelUnstyled;
|
|
15668
|
+
|
|
14762
15669
|
function createMixins(breakpoints, spacing, mixins) {
|
|
14763
15670
|
return _extends({
|
|
14764
15671
|
toolbar: {
|
|
@@ -19072,7 +19979,8 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
19072
19979
|
color: theme.palette.action.active,
|
|
19073
19980
|
transition: theme.transitions.create('background-color', {
|
|
19074
19981
|
duration: theme.transitions.duration.shortest
|
|
19075
|
-
})
|
|
19982
|
+
})
|
|
19983
|
+
}, !ownerState.disableRipple && {
|
|
19076
19984
|
'&:hover': {
|
|
19077
19985
|
backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
19078
19986
|
// Reset on touch devices, it doesn't add specificity
|
|
@@ -19089,8 +19997,9 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
19089
19997
|
ownerState
|
|
19090
19998
|
}) => _extends({}, ownerState.color === 'inherit' && {
|
|
19091
19999
|
color: 'inherit'
|
|
19092
|
-
}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && {
|
|
19093
|
-
color: theme.palette[ownerState.color].main
|
|
20000
|
+
}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && _extends({
|
|
20001
|
+
color: theme.palette[ownerState.color].main
|
|
20002
|
+
}, !ownerState.disableRipple && {
|
|
19094
20003
|
'&:hover': {
|
|
19095
20004
|
backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
19096
20005
|
// Reset on touch devices, it doesn't add specificity
|
|
@@ -19098,7 +20007,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
19098
20007
|
backgroundColor: 'transparent'
|
|
19099
20008
|
}
|
|
19100
20009
|
}
|
|
19101
|
-
}, ownerState.size === 'small' && {
|
|
20010
|
+
}), ownerState.size === 'small' && {
|
|
19102
20011
|
padding: 5,
|
|
19103
20012
|
fontSize: theme.typography.pxToRem(18)
|
|
19104
20013
|
}, ownerState.size === 'large' && {
|
|
@@ -19999,11 +20908,6 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
19999
20908
|
ref: ref
|
|
20000
20909
|
}));
|
|
20001
20910
|
});
|
|
20002
|
-
|
|
20003
|
-
function resolveAnchorEl$1(anchorEl) {
|
|
20004
|
-
return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
|
20005
|
-
}
|
|
20006
|
-
|
|
20007
20911
|
Popper.propTypes
|
|
20008
20912
|
/* remove-proptypes */
|
|
20009
20913
|
= {
|
|
@@ -20018,23 +20922,9 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
20018
20922
|
* It's used to set the position of the popper.
|
|
20019
20923
|
* The return value will passed as the reference object of the Popper instance.
|
|
20020
20924
|
*/
|
|
20021
|
-
anchorEl:
|
|
20022
|
-
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
|
|
20026
|
-
const box = resolvedAnchorEl.getBoundingClientRect();
|
|
20027
|
-
|
|
20028
|
-
if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
|
|
20029
|
-
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
20030
|
-
}
|
|
20031
|
-
} else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {
|
|
20032
|
-
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\n'));
|
|
20033
|
-
}
|
|
20034
|
-
}
|
|
20035
|
-
|
|
20036
|
-
return null;
|
|
20037
|
-
}),
|
|
20925
|
+
anchorEl: propTypes
|
|
20926
|
+
/* @typescript-to-proptypes-ignore */
|
|
20927
|
+
.oneOfType([HTMLElementType, propTypes.object, propTypes.func]),
|
|
20038
20928
|
|
|
20039
20929
|
/**
|
|
20040
20930
|
* Popper render function or node.
|
|
@@ -26851,7 +27741,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
26851
27741
|
}
|
|
26852
27742
|
};
|
|
26853
27743
|
|
|
26854
|
-
const ariaLabelledby =
|
|
27744
|
+
const ariaLabelledby = useReactId(ariaLabelledbyProp);
|
|
26855
27745
|
const dialogContextValue = React__namespace.useMemo(() => {
|
|
26856
27746
|
return {
|
|
26857
27747
|
titleId: ariaLabelledby
|
|
@@ -31507,32 +32397,8 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
31507
32397
|
* @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.
|
|
31508
32398
|
*/
|
|
31509
32399
|
|
|
31510
|
-
function
|
|
31511
|
-
const theme = useTheme$2(); // Wait for jsdom to support the match media feature.
|
|
31512
|
-
// All the browsers MUI support have this built-in.
|
|
31513
|
-
// This defensive check is here for simplicity.
|
|
31514
|
-
// Most of the time, the match media logic isn't central to people tests.
|
|
31515
|
-
|
|
32400
|
+
function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
|
|
31516
32401
|
const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
31517
|
-
const {
|
|
31518
|
-
defaultMatches = false,
|
|
31519
|
-
matchMedia = supportMatchMedia ? window.matchMedia : null,
|
|
31520
|
-
noSsr = false,
|
|
31521
|
-
ssrMatchMedia = null
|
|
31522
|
-
} = getThemeProps({
|
|
31523
|
-
name: 'MuiUseMediaQuery',
|
|
31524
|
-
props: options,
|
|
31525
|
-
theme
|
|
31526
|
-
});
|
|
31527
|
-
|
|
31528
|
-
{
|
|
31529
|
-
if (typeof queryInput === 'function' && theme === null) {
|
|
31530
|
-
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
31531
|
-
}
|
|
31532
|
-
}
|
|
31533
|
-
|
|
31534
|
-
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
31535
|
-
query = query.replace(/^@media( ?)/m, '');
|
|
31536
32402
|
const [match, setMatch] = React__namespace.useState(() => {
|
|
31537
32403
|
if (noSsr && supportMatchMedia) {
|
|
31538
32404
|
return matchMedia(query).matches;
|
|
@@ -31564,13 +32430,76 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
31564
32430
|
}
|
|
31565
32431
|
};
|
|
31566
32432
|
|
|
31567
|
-
updateMatch();
|
|
32433
|
+
updateMatch(); // TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
32434
|
+
|
|
31568
32435
|
queryList.addListener(updateMatch);
|
|
31569
32436
|
return () => {
|
|
31570
32437
|
active = false;
|
|
31571
32438
|
queryList.removeListener(updateMatch);
|
|
31572
32439
|
};
|
|
31573
32440
|
}, [query, matchMedia, supportMatchMedia]);
|
|
32441
|
+
return match;
|
|
32442
|
+
}
|
|
32443
|
+
|
|
32444
|
+
function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) {
|
|
32445
|
+
const getDefaultSnapshot = React__namespace.useCallback(() => defaultMatches, [defaultMatches]);
|
|
32446
|
+
const getServerSnapshot = React__namespace.useMemo(() => {
|
|
32447
|
+
if (ssrMatchMedia !== null) {
|
|
32448
|
+
const {
|
|
32449
|
+
matches
|
|
32450
|
+
} = ssrMatchMedia(query);
|
|
32451
|
+
return () => matches;
|
|
32452
|
+
}
|
|
32453
|
+
|
|
32454
|
+
return getDefaultSnapshot;
|
|
32455
|
+
}, [getDefaultSnapshot, query, ssrMatchMedia]);
|
|
32456
|
+
const [getSnapshot, subscribe] = React__namespace.useMemo(() => {
|
|
32457
|
+
if (matchMedia === null) {
|
|
32458
|
+
return [getDefaultSnapshot, () => () => {}];
|
|
32459
|
+
}
|
|
32460
|
+
|
|
32461
|
+
const mediaQueryList = matchMedia(query);
|
|
32462
|
+
return [() => mediaQueryList.matches, notify => {
|
|
32463
|
+
// TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
32464
|
+
mediaQueryList.addListener(notify);
|
|
32465
|
+
return () => {
|
|
32466
|
+
mediaQueryList.removeListener(notify);
|
|
32467
|
+
};
|
|
32468
|
+
}];
|
|
32469
|
+
}, [getDefaultSnapshot, matchMedia, query]);
|
|
32470
|
+
const match = React__namespace.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
32471
|
+
return match;
|
|
32472
|
+
}
|
|
32473
|
+
|
|
32474
|
+
function useMediaQuery(queryInput, options = {}) {
|
|
32475
|
+
const theme = useTheme$2(); // Wait for jsdom to support the match media feature.
|
|
32476
|
+
// All the browsers MUI support have this built-in.
|
|
32477
|
+
// This defensive check is here for simplicity.
|
|
32478
|
+
// Most of the time, the match media logic isn't central to people tests.
|
|
32479
|
+
|
|
32480
|
+
const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
32481
|
+
const {
|
|
32482
|
+
defaultMatches = false,
|
|
32483
|
+
matchMedia = supportMatchMedia ? window.matchMedia : null,
|
|
32484
|
+
ssrMatchMedia = null,
|
|
32485
|
+
noSsr
|
|
32486
|
+
} = getThemeProps({
|
|
32487
|
+
name: 'MuiUseMediaQuery',
|
|
32488
|
+
props: options,
|
|
32489
|
+
theme
|
|
32490
|
+
});
|
|
32491
|
+
|
|
32492
|
+
{
|
|
32493
|
+
if (typeof queryInput === 'function' && theme === null) {
|
|
32494
|
+
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
32495
|
+
}
|
|
32496
|
+
}
|
|
32497
|
+
|
|
32498
|
+
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
32499
|
+
query = query.replace(/^@media( ?)/m, ''); // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
|
|
32500
|
+
|
|
32501
|
+
const useMediaQueryImplementation = React__namespace.useSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
|
|
32502
|
+
const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
|
|
31574
32503
|
|
|
31575
32504
|
{
|
|
31576
32505
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -39009,7 +39938,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
39009
39938
|
}
|
|
39010
39939
|
};
|
|
39011
39940
|
|
|
39012
|
-
const name =
|
|
39941
|
+
const name = useReactId(nameProp);
|
|
39013
39942
|
return /*#__PURE__*/jsxRuntime_1(RadioGroupContext$1.Provider, {
|
|
39014
39943
|
value: {
|
|
39015
39944
|
name,
|
|
@@ -39267,7 +40196,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
39267
40196
|
const isHovered = itemValue <= hover;
|
|
39268
40197
|
const isFocused = itemValue <= focus;
|
|
39269
40198
|
const isChecked = itemValue === ratingValueRounded;
|
|
39270
|
-
const id =
|
|
40199
|
+
const id = useReactId();
|
|
39271
40200
|
|
|
39272
40201
|
const container = /*#__PURE__*/jsxRuntime_1(RatingIcon, {
|
|
39273
40202
|
as: IconContainerComponent,
|
|
@@ -39381,7 +40310,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
39381
40310
|
} = props,
|
|
39382
40311
|
other = _objectWithoutPropertiesLoose(props, _excluded2$3);
|
|
39383
40312
|
|
|
39384
|
-
const name =
|
|
40313
|
+
const name = useReactId(nameProp);
|
|
39385
40314
|
const [valueDerived, setValueState] = useControlled({
|
|
39386
40315
|
controlled: valueProp,
|
|
39387
40316
|
default: defaultValue,
|
|
@@ -40238,7 +41167,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
40238
41167
|
}
|
|
40239
41168
|
|
|
40240
41169
|
return /*#__PURE__*/React__namespace.cloneElement(child, {
|
|
40241
|
-
'aria-selected': selected ? 'true' :
|
|
41170
|
+
'aria-selected': selected ? 'true' : 'false',
|
|
40242
41171
|
onClick: handleItemClick(child),
|
|
40243
41172
|
onKeyUp: event => {
|
|
40244
41173
|
if (event.key === ' ') {
|
|
@@ -43270,7 +44199,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
43270
44199
|
}, [title, childNode, isControlled]);
|
|
43271
44200
|
}
|
|
43272
44201
|
|
|
43273
|
-
const id =
|
|
44202
|
+
const id = useReactId(idProp);
|
|
43274
44203
|
const prevUserSelect = React__namespace.useRef();
|
|
43275
44204
|
const stopTouchInteraction = React__namespace.useCallback(() => {
|
|
43276
44205
|
if (prevUserSelect.current !== undefined) {
|
|
@@ -48060,8 +48989,8 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
48060
48989
|
colSpan = colSpanProp || 1000; // col-span over everything
|
|
48061
48990
|
}
|
|
48062
48991
|
|
|
48063
|
-
const selectId =
|
|
48064
|
-
const labelId =
|
|
48992
|
+
const selectId = useReactId(SelectProps.id);
|
|
48993
|
+
const labelId = useReactId(SelectProps.labelId);
|
|
48065
48994
|
|
|
48066
48995
|
const getLabelDisplayedRowsTo = () => {
|
|
48067
48996
|
if (count === -1) {
|
|
@@ -50782,7 +51711,9 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
50782
51711
|
exports.Switch = Switch$1;
|
|
50783
51712
|
exports.SwitchUnstyled = SwitchUnstyled$1;
|
|
50784
51713
|
exports.Tab = Tab$1;
|
|
51714
|
+
exports.TabPanelUnstyled = TabPanelUnstyled$1;
|
|
50785
51715
|
exports.TabScrollButton = TabScrollButton$1;
|
|
51716
|
+
exports.TabUnstyled = TabUnstyled$1;
|
|
50786
51717
|
exports.Table = Table$1;
|
|
50787
51718
|
exports.TableBody = TableBody$1;
|
|
50788
51719
|
exports.TableCell = TableCell$1;
|
|
@@ -50793,6 +51724,9 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
50793
51724
|
exports.TableRow = TableRow$1;
|
|
50794
51725
|
exports.TableSortLabel = TableSortLabel$1;
|
|
50795
51726
|
exports.Tabs = Tabs$1;
|
|
51727
|
+
exports.TabsContext = Context$1;
|
|
51728
|
+
exports.TabsListUnstyled = TabsListUnstyled$1;
|
|
51729
|
+
exports.TabsUnstyled = TabsUnstyled$1;
|
|
50796
51730
|
exports.TextField = TextField$1;
|
|
50797
51731
|
exports.TextareaAutosize = TextareaAutosize$1;
|
|
50798
51732
|
exports.ThemeProvider = ThemeProvider;
|
|
@@ -50950,6 +51884,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
50950
51884
|
exports.getOutlinedInputUtilityClass = getOutlinedInputUtilityClass;
|
|
50951
51885
|
exports.getPaginationItemUtilityClass = getPaginationItemUtilityClass;
|
|
50952
51886
|
exports.getPaginationUtilityClass = getPaginationUtilityClass;
|
|
51887
|
+
exports.getPanelId = getPanelId;
|
|
50953
51888
|
exports.getPaperUtilityClass = getPaperUtilityClass;
|
|
50954
51889
|
exports.getPopoverUtilityClass = getPopoverUtilityClass;
|
|
50955
51890
|
exports.getRadioUtilityClass = getRadioUtilityClass;
|
|
@@ -50973,7 +51908,10 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
50973
51908
|
exports.getSvgIconUtilityClass = getSvgIconUtilityClass;
|
|
50974
51909
|
exports.getSwitchUnstyledUtilityClass = getSwitchUnstyledUtilityClass;
|
|
50975
51910
|
exports.getSwitchUtilityClass = getSwitchUtilityClass;
|
|
51911
|
+
exports.getTabId = getTabId;
|
|
51912
|
+
exports.getTabPanelUnstyledUtilityClass = getTabPanelUnstyledUtilityClass;
|
|
50976
51913
|
exports.getTabScrollButtonUtilityClass = getTabScrollButtonUtilityClass;
|
|
51914
|
+
exports.getTabUnstyledUtilityClass = getTabUnstyledUtilityClass;
|
|
50977
51915
|
exports.getTabUtilityClass = getTabUtilityClass;
|
|
50978
51916
|
exports.getTableBodyUtilityClass = getTableBodyUtilityClass;
|
|
50979
51917
|
exports.getTableCellUtilityClass = getTableCellUtilityClass;
|
|
@@ -50984,6 +51922,8 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
50984
51922
|
exports.getTableRowUtilityClass = getTableRowUtilityClass;
|
|
50985
51923
|
exports.getTableSortLabelUtilityClass = getTableSortLabelUtilityClass;
|
|
50986
51924
|
exports.getTableUtilityClass = getTableUtilityClass;
|
|
51925
|
+
exports.getTabsListUnstyledUtilityClass = getTabsListUnstyledUtilityClass;
|
|
51926
|
+
exports.getTabsUnstyledUtilityClass = getTabsUnstyledUtilityClass;
|
|
50987
51927
|
exports.getTabsUtilityClass = getTabsUtilityClass;
|
|
50988
51928
|
exports.getTextFieldUtilityClass = getTextFieldUtilityClass;
|
|
50989
51929
|
exports.getToggleButtonGroupUtilityClass = getToggleButtonGroupUtilityClass;
|
|
@@ -51062,7 +52002,9 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
51062
52002
|
exports.switchClasses = switchClasses$1;
|
|
51063
52003
|
exports.switchUnstyledClasses = classes;
|
|
51064
52004
|
exports.tabClasses = tabClasses$1;
|
|
52005
|
+
exports.tabPanelUnstyledClasses = tabPanelUnstyledClasses$1;
|
|
51065
52006
|
exports.tabScrollButtonClasses = tabScrollButtonClasses$1;
|
|
52007
|
+
exports.tabUnstyledClasses = tabUnstyledClasses$1;
|
|
51066
52008
|
exports.tableBodyClasses = tableBodyClasses$1;
|
|
51067
52009
|
exports.tableCellClasses = tableCellClasses$1;
|
|
51068
52010
|
exports.tableClasses = tableClasses$1;
|
|
@@ -51073,6 +52015,8 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
51073
52015
|
exports.tableRowClasses = tableRowClasses$1;
|
|
51074
52016
|
exports.tableSortLabelClasses = tableSortLabelClasses$1;
|
|
51075
52017
|
exports.tabsClasses = tabsClasses$1;
|
|
52018
|
+
exports.tabsListUnstyledClasses = tabsListUnstyledClasses$1;
|
|
52019
|
+
exports.tabsUnstyledClasses = tabsUnstyledClasses$1;
|
|
51076
52020
|
exports.textFieldClasses = textFieldClasses$1;
|
|
51077
52021
|
exports.toggleButtonClasses = toggleButtonClasses$1;
|
|
51078
52022
|
exports.toggleButtonGroupClasses = toggleButtonGroupClasses$1;
|
|
@@ -51086,7 +52030,7 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
51086
52030
|
exports.unstable_getUnit = getUnit;
|
|
51087
52031
|
exports.unstable_toUnitless = toUnitless;
|
|
51088
52032
|
exports.unstable_useEnhancedEffect = useEnhancedEffect$1;
|
|
51089
|
-
exports.unstable_useId =
|
|
52033
|
+
exports.unstable_useId = useReactId;
|
|
51090
52034
|
exports.unsupportedProp = unsupportedProp;
|
|
51091
52035
|
exports.useAutocomplete = useAutocomplete;
|
|
51092
52036
|
exports.useButton = useButton;
|
|
@@ -51102,6 +52046,11 @@ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` )
|
|
|
51102
52046
|
exports.useRadioGroup = useRadioGroup;
|
|
51103
52047
|
exports.useScrollTrigger = useScrollTrigger;
|
|
51104
52048
|
exports.useSwitch = useSwitch;
|
|
52049
|
+
exports.useTab = useTab$1;
|
|
52050
|
+
exports.useTabContext = useTabContext;
|
|
52051
|
+
exports.useTabPanel = useTabPanel$1;
|
|
52052
|
+
exports.useTabs = useTabs$1;
|
|
52053
|
+
exports.useTabsList = useTabsList$1;
|
|
51105
52054
|
exports.useTheme = useTheme;
|
|
51106
52055
|
exports.useThemeProps = useThemeProps;
|
|
51107
52056
|
exports.withStyles = withStyles;
|