@mui/material 5.14.13 → 5.14.15
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/AppBar/AppBar.d.ts +4 -1
- package/AppBar/AppBar.js +1 -1
- package/AppBar/appBarClasses.d.ts +8 -0
- package/AppBar/appBarClasses.js +1 -1
- package/AvatarGroup/AvatarGroup.d.ts +6 -0
- package/AvatarGroup/AvatarGroup.js +12 -3
- package/CHANGELOG.md +146 -0
- package/Checkbox/Checkbox.js +1 -1
- package/InputLabel/InputLabel.js +4 -3
- package/Pagination/Pagination.d.ts +3 -6
- package/Pagination/Pagination.js +1 -1
- package/Radio/Radio.js +1 -1
- package/Tabs/Tabs.js +30 -5
- package/ToggleButton/toggleButtonClasses.d.ts +2 -0
- package/ToggleButton/toggleButtonClasses.js +1 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -0
- package/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/index.js +1 -1
- package/legacy/AppBar/AppBar.js +1 -1
- package/legacy/AppBar/appBarClasses.js +1 -1
- package/legacy/AvatarGroup/AvatarGroup.js +12 -3
- package/legacy/Checkbox/Checkbox.js +1 -1
- package/legacy/InputLabel/InputLabel.js +4 -3
- package/legacy/Pagination/Pagination.js +1 -1
- package/legacy/Radio/Radio.js +1 -1
- package/legacy/Tabs/Tabs.js +30 -5
- package/legacy/ToggleButton/toggleButtonClasses.js +1 -1
- package/legacy/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +244 -166
- package/locale/index.d.ts +1 -0
- package/locale/index.js +120 -46
- package/modern/AppBar/AppBar.js +1 -1
- package/modern/AppBar/appBarClasses.js +1 -1
- package/modern/AvatarGroup/AvatarGroup.js +12 -3
- package/modern/Checkbox/Checkbox.js +1 -1
- package/modern/InputLabel/InputLabel.js +4 -3
- package/modern/Pagination/Pagination.js +1 -1
- package/modern/Radio/Radio.js +1 -1
- package/modern/Tabs/Tabs.js +27 -5
- package/modern/ToggleButton/toggleButtonClasses.js +1 -1
- package/modern/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +120 -46
- package/node/Accordion/Accordion.js +2 -2
- package/node/Accordion/AccordionContext.js +2 -2
- package/node/Accordion/index.js +2 -2
- package/node/AccordionActions/AccordionActions.js +2 -2
- package/node/AccordionActions/index.js +2 -2
- package/node/AccordionDetails/AccordionDetails.js +2 -2
- package/node/AccordionDetails/index.js +2 -2
- package/node/AccordionSummary/AccordionSummary.js +2 -2
- package/node/AccordionSummary/index.js +2 -2
- package/node/Alert/Alert.js +2 -2
- package/node/Alert/index.js +2 -2
- package/node/AlertTitle/AlertTitle.js +2 -2
- package/node/AlertTitle/index.js +2 -2
- package/node/AppBar/AppBar.js +3 -3
- package/node/AppBar/appBarClasses.js +1 -1
- package/node/AppBar/index.js +2 -2
- package/node/Autocomplete/Autocomplete.js +2 -2
- package/node/Autocomplete/index.js +2 -2
- package/node/Avatar/Avatar.js +2 -2
- package/node/Avatar/index.js +2 -2
- package/node/AvatarGroup/AvatarGroup.js +13 -5
- package/node/AvatarGroup/index.js +2 -2
- package/node/Backdrop/Backdrop.js +2 -2
- package/node/Backdrop/index.js +2 -2
- package/node/Badge/Badge.js +2 -2
- package/node/Badge/index.js +2 -2
- package/node/BottomNavigation/BottomNavigation.js +2 -2
- package/node/BottomNavigation/index.js +2 -2
- package/node/BottomNavigationAction/BottomNavigationAction.js +2 -2
- package/node/BottomNavigationAction/index.js +2 -2
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +2 -2
- package/node/Breadcrumbs/Breadcrumbs.js +2 -2
- package/node/Breadcrumbs/index.js +2 -2
- package/node/Button/Button.js +2 -2
- package/node/Button/index.js +2 -2
- package/node/ButtonBase/ButtonBase.js +2 -2
- package/node/ButtonBase/Ripple.js +2 -2
- package/node/ButtonBase/TouchRipple.js +2 -2
- package/node/ButtonBase/index.js +2 -2
- package/node/ButtonGroup/ButtonGroup.js +2 -2
- package/node/ButtonGroup/ButtonGroupButtonContext.js +2 -2
- package/node/ButtonGroup/ButtonGroupContext.js +2 -2
- package/node/ButtonGroup/index.js +2 -2
- package/node/Card/Card.js +2 -2
- package/node/Card/index.js +2 -2
- package/node/CardActionArea/CardActionArea.js +2 -2
- package/node/CardActionArea/index.js +2 -2
- package/node/CardActions/CardActions.js +2 -2
- package/node/CardActions/index.js +2 -2
- package/node/CardContent/CardContent.js +2 -2
- package/node/CardContent/index.js +2 -2
- package/node/CardHeader/CardHeader.js +2 -2
- package/node/CardHeader/index.js +2 -2
- package/node/CardMedia/CardMedia.js +2 -2
- package/node/CardMedia/index.js +2 -2
- package/node/Checkbox/Checkbox.js +3 -3
- package/node/Checkbox/index.js +2 -2
- package/node/Chip/Chip.js +2 -2
- package/node/Chip/index.js +2 -2
- package/node/CircularProgress/CircularProgress.js +2 -2
- package/node/CircularProgress/index.js +2 -2
- package/node/Collapse/Collapse.js +2 -2
- package/node/Collapse/index.js +2 -2
- package/node/Container/index.js +2 -2
- package/node/CssBaseline/CssBaseline.js +2 -2
- package/node/Dialog/Dialog.js +2 -2
- package/node/Dialog/DialogContext.js +2 -2
- package/node/Dialog/index.js +2 -2
- package/node/DialogActions/DialogActions.js +2 -2
- package/node/DialogActions/index.js +2 -2
- package/node/DialogContent/DialogContent.js +2 -2
- package/node/DialogContent/index.js +2 -2
- package/node/DialogContentText/DialogContentText.js +2 -2
- package/node/DialogContentText/index.js +2 -2
- package/node/DialogTitle/DialogTitle.js +2 -2
- package/node/DialogTitle/index.js +2 -2
- package/node/Divider/Divider.js +2 -2
- package/node/Divider/index.js +2 -2
- package/node/Drawer/Drawer.js +2 -2
- package/node/Drawer/index.js +2 -2
- package/node/Fab/Fab.js +2 -2
- package/node/Fab/index.js +2 -2
- package/node/Fade/Fade.js +2 -2
- package/node/FilledInput/FilledInput.js +2 -2
- package/node/FilledInput/index.js +2 -2
- package/node/FormControl/FormControl.js +2 -2
- package/node/FormControl/FormControlContext.js +2 -2
- package/node/FormControl/index.js +2 -2
- package/node/FormControl/useFormControl.js +2 -2
- package/node/FormControlLabel/FormControlLabel.js +2 -2
- package/node/FormControlLabel/index.js +2 -2
- package/node/FormGroup/FormGroup.js +2 -2
- package/node/FormGroup/index.js +2 -2
- package/node/FormHelperText/FormHelperText.js +2 -2
- package/node/FormHelperText/index.js +2 -2
- package/node/FormLabel/FormLabel.js +2 -2
- package/node/FormLabel/index.js +2 -2
- package/node/GlobalStyles/GlobalStyles.js +2 -2
- package/node/Grid/Grid.js +2 -2
- package/node/Grid/GridContext.js +2 -2
- package/node/Grid/index.js +2 -2
- package/node/Grow/Grow.js +2 -2
- package/node/Hidden/Hidden.js +2 -2
- package/node/Hidden/HiddenCss.js +2 -2
- package/node/Hidden/HiddenJs.js +2 -2
- package/node/Hidden/withWidth.js +2 -2
- package/node/Icon/Icon.js +2 -2
- package/node/Icon/index.js +2 -2
- package/node/IconButton/IconButton.js +2 -2
- package/node/IconButton/index.js +2 -2
- package/node/ImageList/ImageList.js +2 -2
- package/node/ImageList/ImageListContext.js +2 -2
- package/node/ImageList/index.js +2 -2
- package/node/ImageListItem/ImageListItem.js +2 -2
- package/node/ImageListItem/index.js +2 -2
- package/node/ImageListItemBar/ImageListItemBar.js +2 -2
- package/node/ImageListItemBar/index.js +2 -2
- package/node/Input/Input.js +2 -2
- package/node/Input/index.js +2 -2
- package/node/InputAdornment/InputAdornment.js +2 -2
- package/node/InputAdornment/index.js +2 -2
- package/node/InputBase/InputBase.js +2 -2
- package/node/InputBase/index.js +2 -2
- package/node/InputLabel/InputLabel.js +6 -5
- package/node/InputLabel/index.js +2 -2
- package/node/LinearProgress/LinearProgress.js +2 -2
- package/node/LinearProgress/index.js +2 -2
- package/node/Link/Link.js +2 -2
- package/node/Link/index.js +2 -2
- package/node/List/List.js +2 -2
- package/node/List/ListContext.js +2 -2
- package/node/List/index.js +2 -2
- package/node/ListItem/ListItem.js +2 -2
- package/node/ListItem/index.js +2 -2
- package/node/ListItemAvatar/ListItemAvatar.js +2 -2
- package/node/ListItemAvatar/index.js +2 -2
- package/node/ListItemButton/ListItemButton.js +2 -2
- package/node/ListItemButton/index.js +2 -2
- package/node/ListItemIcon/ListItemIcon.js +2 -2
- package/node/ListItemIcon/index.js +2 -2
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
- package/node/ListItemSecondaryAction/index.js +2 -2
- package/node/ListItemText/ListItemText.js +2 -2
- package/node/ListItemText/index.js +2 -2
- package/node/ListSubheader/ListSubheader.js +2 -2
- package/node/ListSubheader/index.js +2 -2
- package/node/Menu/Menu.js +2 -2
- package/node/Menu/index.js +2 -2
- package/node/MenuItem/MenuItem.js +2 -2
- package/node/MenuItem/index.js +2 -2
- package/node/MenuList/MenuList.js +2 -2
- package/node/MobileStepper/MobileStepper.js +2 -2
- package/node/MobileStepper/index.js +2 -2
- package/node/Modal/Modal.js +2 -2
- package/node/Modal/index.js +2 -2
- package/node/NativeSelect/NativeSelect.js +2 -2
- package/node/NativeSelect/NativeSelectInput.js +2 -2
- package/node/NativeSelect/index.js +2 -2
- package/node/OutlinedInput/NotchedOutline.js +2 -2
- package/node/OutlinedInput/OutlinedInput.js +2 -2
- package/node/OutlinedInput/index.js +2 -2
- package/node/Pagination/Pagination.js +3 -3
- package/node/Pagination/index.js +2 -2
- package/node/PaginationItem/PaginationItem.js +2 -2
- package/node/PaginationItem/index.js +2 -2
- package/node/Paper/Paper.js +2 -2
- package/node/Paper/index.js +2 -2
- package/node/Popover/Popover.js +2 -2
- package/node/Popover/index.js +2 -2
- package/node/Popper/Popper.js +2 -2
- package/node/Radio/Radio.js +3 -3
- package/node/Radio/RadioButtonIcon.js +2 -2
- package/node/Radio/index.js +2 -2
- package/node/RadioGroup/RadioGroup.js +2 -2
- package/node/RadioGroup/RadioGroupContext.js +2 -2
- package/node/RadioGroup/useRadioGroup.js +2 -2
- package/node/Rating/Rating.js +2 -2
- package/node/Rating/index.js +2 -2
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +2 -2
- package/node/ScopedCssBaseline/index.js +2 -2
- package/node/Select/Select.js +2 -2
- package/node/Select/SelectInput.js +2 -2
- package/node/Select/index.js +2 -2
- package/node/Skeleton/Skeleton.js +2 -2
- package/node/Skeleton/index.js +2 -2
- package/node/Slide/Slide.js +2 -2
- package/node/Slider/Slider.js +2 -2
- package/node/Slider/SliderValueLabel.js +2 -2
- package/node/Slider/index.js +2 -2
- package/node/Snackbar/Snackbar.js +2 -2
- package/node/Snackbar/index.js +2 -2
- package/node/SnackbarContent/SnackbarContent.js +2 -2
- package/node/SnackbarContent/index.js +2 -2
- package/node/SpeedDial/SpeedDial.js +2 -2
- package/node/SpeedDial/index.js +2 -2
- package/node/SpeedDialAction/SpeedDialAction.js +2 -2
- package/node/SpeedDialAction/index.js +2 -2
- package/node/SpeedDialIcon/SpeedDialIcon.js +2 -2
- package/node/SpeedDialIcon/index.js +2 -2
- package/node/Step/Step.js +2 -2
- package/node/Step/StepContext.js +2 -2
- package/node/Step/index.js +2 -2
- package/node/StepButton/StepButton.js +2 -2
- package/node/StepButton/index.js +2 -2
- package/node/StepConnector/StepConnector.js +2 -2
- package/node/StepConnector/index.js +2 -2
- package/node/StepContent/StepContent.js +2 -2
- package/node/StepContent/index.js +2 -2
- package/node/StepIcon/StepIcon.js +2 -2
- package/node/StepIcon/index.js +2 -2
- package/node/StepLabel/StepLabel.js +2 -2
- package/node/StepLabel/index.js +2 -2
- package/node/Stepper/Stepper.js +2 -2
- package/node/Stepper/StepperContext.js +2 -2
- package/node/Stepper/index.js +2 -2
- package/node/SvgIcon/SvgIcon.js +2 -2
- package/node/SvgIcon/index.js +2 -2
- package/node/SwipeableDrawer/SwipeArea.js +2 -2
- package/node/SwipeableDrawer/SwipeableDrawer.js +2 -2
- package/node/Switch/Switch.js +2 -2
- package/node/Switch/index.js +2 -2
- package/node/Tab/Tab.js +2 -2
- package/node/Tab/index.js +2 -2
- package/node/TabScrollButton/TabScrollButton.js +2 -2
- package/node/TabScrollButton/index.js +2 -2
- package/node/Table/Table.js +2 -2
- package/node/Table/TableContext.js +2 -2
- package/node/Table/Tablelvl2Context.js +2 -2
- package/node/Table/index.js +2 -2
- package/node/TableBody/TableBody.js +2 -2
- package/node/TableBody/index.js +2 -2
- package/node/TableCell/TableCell.js +2 -2
- package/node/TableCell/index.js +2 -2
- package/node/TableContainer/TableContainer.js +2 -2
- package/node/TableContainer/index.js +2 -2
- package/node/TableFooter/TableFooter.js +2 -2
- package/node/TableFooter/index.js +2 -2
- package/node/TableHead/TableHead.js +2 -2
- package/node/TableHead/index.js +2 -2
- package/node/TablePagination/TablePagination.js +2 -2
- package/node/TablePagination/TablePaginationActions.js +2 -2
- package/node/TablePagination/index.js +2 -2
- package/node/TableRow/TableRow.js +2 -2
- package/node/TableRow/index.js +2 -2
- package/node/TableSortLabel/TableSortLabel.js +2 -2
- package/node/TableSortLabel/index.js +2 -2
- package/node/Tabs/ScrollbarSize.js +2 -2
- package/node/Tabs/Tabs.js +32 -7
- package/node/Tabs/index.js +2 -2
- package/node/TextField/TextField.js +2 -2
- package/node/TextField/index.js +2 -2
- package/node/ToggleButton/ToggleButton.js +2 -2
- package/node/ToggleButton/index.js +2 -2
- package/node/ToggleButton/toggleButtonClasses.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +2 -2
- package/node/ToggleButtonGroup/index.js +2 -2
- package/node/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/node/Toolbar/Toolbar.js +2 -2
- package/node/Toolbar/index.js +2 -2
- package/node/Tooltip/Tooltip.js +2 -2
- package/node/Tooltip/index.js +2 -2
- package/node/Typography/Typography.js +2 -2
- package/node/Typography/index.js +2 -2
- package/node/Unstable_Grid2/index.js +2 -2
- package/node/Zoom/Zoom.js +2 -2
- package/node/index.js +3 -3
- package/node/internal/SwitchBase.js +2 -2
- package/node/internal/svg-icons/Add.js +2 -2
- package/node/internal/svg-icons/ArrowDownward.js +2 -2
- package/node/internal/svg-icons/ArrowDropDown.js +2 -2
- package/node/internal/svg-icons/Cancel.js +2 -2
- package/node/internal/svg-icons/CheckBox.js +2 -2
- package/node/internal/svg-icons/CheckBoxOutlineBlank.js +2 -2
- package/node/internal/svg-icons/CheckCircle.js +2 -2
- package/node/internal/svg-icons/Close.js +2 -2
- package/node/internal/svg-icons/ErrorOutline.js +2 -2
- package/node/internal/svg-icons/FirstPage.js +2 -2
- package/node/internal/svg-icons/IndeterminateCheckBox.js +2 -2
- package/node/internal/svg-icons/InfoOutlined.js +2 -2
- package/node/internal/svg-icons/KeyboardArrowLeft.js +2 -2
- package/node/internal/svg-icons/KeyboardArrowRight.js +2 -2
- package/node/internal/svg-icons/LastPage.js +2 -2
- package/node/internal/svg-icons/MoreHoriz.js +2 -2
- package/node/internal/svg-icons/NavigateBefore.js +2 -2
- package/node/internal/svg-icons/NavigateNext.js +2 -2
- package/node/internal/svg-icons/Person.js +2 -2
- package/node/internal/svg-icons/RadioButtonChecked.js +2 -2
- package/node/internal/svg-icons/RadioButtonUnchecked.js +2 -2
- package/node/internal/svg-icons/ReportProblemOutlined.js +2 -2
- package/node/internal/svg-icons/Star.js +2 -2
- package/node/internal/svg-icons/StarBorder.js +2 -2
- package/node/internal/svg-icons/SuccessOutlined.js +2 -2
- package/node/internal/svg-icons/Warning.js +2 -2
- package/node/locale/index.js +121 -47
- package/node/styles/ThemeProvider.js +2 -2
- package/node/styles/index.js +2 -2
- package/node/styles/useTheme.js +2 -2
- package/node/useAutocomplete/index.js +2 -2
- package/node/useMediaQuery/useMediaQuery.js +2 -2
- package/node/useScrollTrigger/useScrollTrigger.js +2 -2
- package/node/useTouchRipple/useTouchRipple.js +2 -2
- package/node/utils/createSvgIcon.js +2 -2
- package/package.json +7 -7
- package/umd/material-ui.development.js +72 -35
- package/umd/material-ui.production.min.js +6 -6
package/AppBar/AppBar.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ export interface AppBarOwnProps {
|
|
|
19
19
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
20
20
|
* @default 'primary'
|
|
21
21
|
*/
|
|
22
|
-
color?: OverridableStringUnion<
|
|
22
|
+
color?: OverridableStringUnion<
|
|
23
|
+
PropTypes.Color | 'transparent' | 'error' | 'info' | 'success' | 'warning',
|
|
24
|
+
AppBarPropsColorOverrides
|
|
25
|
+
>;
|
|
23
26
|
/**
|
|
24
27
|
* If true, the `color` prop is applied in dark mode.
|
|
25
28
|
* @default false
|
package/AppBar/AppBar.js
CHANGED
|
@@ -157,7 +157,7 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes /* remove-proptypes */
|
|
|
157
157
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
158
158
|
* @default 'primary'
|
|
159
159
|
*/
|
|
160
|
-
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent']), PropTypes.string]),
|
|
160
|
+
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
|
161
161
|
/**
|
|
162
162
|
* If true, the `color` prop is applied in dark mode.
|
|
163
163
|
* @default false
|
|
@@ -21,6 +21,14 @@ export interface AppBarClasses {
|
|
|
21
21
|
colorInherit: string;
|
|
22
22
|
/** Styles applied to the root element if `color="transparent"`. */
|
|
23
23
|
colorTransparent: string;
|
|
24
|
+
/** Styles applied to the root element if `color="error"`. */
|
|
25
|
+
colorError: string;
|
|
26
|
+
/** Styles applied to the root element if `color="info"`. */
|
|
27
|
+
colorInfo: string;
|
|
28
|
+
/** Styles applied to the root element if `color="success"`. */
|
|
29
|
+
colorSuccess: string;
|
|
30
|
+
/** Styles applied to the root element if `color="warning"`. */
|
|
31
|
+
colorWarning: string;
|
|
24
32
|
}
|
|
25
33
|
export type AppBarClassKey = keyof AppBarClasses;
|
|
26
34
|
export declare function getAppBarUtilityClass(slot: string): string;
|
package/AppBar/appBarClasses.js
CHANGED
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getAppBarUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiAppBar', slot);
|
|
5
5
|
}
|
|
6
|
-
const appBarClasses = generateUtilityClasses('MuiAppBar', ['root', 'positionFixed', 'positionAbsolute', 'positionSticky', 'positionStatic', 'positionRelative', 'colorDefault', 'colorPrimary', 'colorSecondary', 'colorInherit', 'colorTransparent']);
|
|
6
|
+
const appBarClasses = generateUtilityClasses('MuiAppBar', ['root', 'positionFixed', 'positionAbsolute', 'positionSticky', 'positionStatic', 'positionRelative', 'colorDefault', 'colorPrimary', 'colorSecondary', 'colorInherit', 'colorTransparent', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning']);
|
|
7
7
|
export default appBarClasses;
|
|
@@ -40,6 +40,12 @@ export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTM
|
|
|
40
40
|
* @default 5
|
|
41
41
|
*/
|
|
42
42
|
max?: number;
|
|
43
|
+
/**
|
|
44
|
+
* custom renderer of extraAvatars
|
|
45
|
+
* @param {number} surplus number of extra avatars
|
|
46
|
+
* @returns {React.ReactNode} custom element to display
|
|
47
|
+
*/
|
|
48
|
+
renderSurplus?: (surplus: number) => React.ReactNode;
|
|
43
49
|
/**
|
|
44
50
|
* The extra props for the slot components.
|
|
45
51
|
* You can override the existing props or add new ones.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
-
const _excluded = ["children", "className", "component", "componentsProps", "max", "slotProps", "spacing", "total", "variant"];
|
|
5
|
+
const _excluded = ["children", "className", "component", "componentsProps", "max", "renderSurplus", "slotProps", "spacing", "total", "variant"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { isFragment } from 'react-is';
|
|
@@ -13,6 +13,7 @@ import styled from '../styles/styled';
|
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
14
|
import Avatar, { avatarClasses } from '../Avatar';
|
|
15
15
|
import avatarGroupClasses, { getAvatarGroupUtilityClass } from './avatarGroupClasses';
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const SPACINGS = {
|
|
18
19
|
small: -16,
|
|
@@ -74,6 +75,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
74
75
|
component = 'div',
|
|
75
76
|
componentsProps = {},
|
|
76
77
|
max = 5,
|
|
78
|
+
renderSurplus,
|
|
77
79
|
slotProps = {},
|
|
78
80
|
spacing = 'medium',
|
|
79
81
|
total,
|
|
@@ -103,6 +105,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
103
105
|
clampedMax = Math.min(totalAvatars + 1, clampedMax);
|
|
104
106
|
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
|
105
107
|
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
|
108
|
+
const extraAvatarsElement = renderSurplus ? renderSurplus(extraAvatars) : `+${extraAvatars}`;
|
|
106
109
|
const marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
|
|
107
110
|
const additionalAvatarSlotProps = (_slotProps$additional = slotProps.additionalAvatar) != null ? _slotProps$additional : componentsProps.additionalAvatar;
|
|
108
111
|
return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
|
|
@@ -111,7 +114,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
111
114
|
className: clsx(classes.root, className),
|
|
112
115
|
ref: ref
|
|
113
116
|
}, other, {
|
|
114
|
-
children: [extraAvatars ? /*#__PURE__*/
|
|
117
|
+
children: [extraAvatars ? /*#__PURE__*/_jsx(AvatarGroupAvatar, _extends({
|
|
115
118
|
ownerState: ownerState,
|
|
116
119
|
variant: variant
|
|
117
120
|
}, additionalAvatarSlotProps, {
|
|
@@ -119,7 +122,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
119
122
|
style: _extends({
|
|
120
123
|
marginLeft
|
|
121
124
|
}, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.style),
|
|
122
|
-
children:
|
|
125
|
+
children: extraAvatarsElement
|
|
123
126
|
})) : null, children.slice(0, maxAvatars).reverse().map((child, index) => {
|
|
124
127
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
125
128
|
className: clsx(child.props.className, classes.avatar),
|
|
@@ -177,6 +180,12 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes /* remove-proptype
|
|
|
177
180
|
}
|
|
178
181
|
return null;
|
|
179
182
|
}),
|
|
183
|
+
/**
|
|
184
|
+
* custom renderer of extraAvatars
|
|
185
|
+
* @param {number} surplus number of extra avatars
|
|
186
|
+
* @returns {React.ReactNode} custom element to display
|
|
187
|
+
*/
|
|
188
|
+
renderSurplus: PropTypes.func,
|
|
180
189
|
/**
|
|
181
190
|
* The extra props for the slot components.
|
|
182
191
|
* You can override the existing props or add new ones.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,151 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.14.15
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.14.14..master -->
|
|
6
|
+
|
|
7
|
+
_Oct 24, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 17 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@5.14.15`
|
|
12
|
+
|
|
13
|
+
- ​<!-- 24 -->[Checkbox][Radio] Fix theme style overrides not working for different sizes (#39377) @gitstart
|
|
14
|
+
- ​<!-- 12 -->[InputLabel] InputLabel supports ownerState.focused for styleOverrides (#39470) @mj12albert
|
|
15
|
+
- ​<!-- 07 -->[ToggleButton] Add `fullWidth` to `toggleButtonClasses` and `toggleButtonGroupClasses` (#39536) @Semigradsky
|
|
16
|
+
|
|
17
|
+
### `@mui/base@5.0.0-beta.21`
|
|
18
|
+
|
|
19
|
+
- ​<!-- 29 -->[useAutocomplete] Correct keyboard navigation with multiple disabled options (#38788) @VadimZvf
|
|
20
|
+
- ​<!-- 28 -->[Select] Standardize box shadow on demos (#39509) @zanivan
|
|
21
|
+
- ​<!-- 27 -->[Slider] Refine demos (#39526) @zanivan
|
|
22
|
+
- ​<!-- 34 -->[Input] Update and port additional tests from material-ui (#39584) @mj12albert
|
|
23
|
+
|
|
24
|
+
### `@mui/material-next@6.0.0-alpha.107`
|
|
25
|
+
|
|
26
|
+
- ​<!-- 16 -->[FilledInput] Add FilledInput component (#39307) @mj12albert
|
|
27
|
+
- ​<!-- 13 -->[InputAdornment] Fix unstable_capitalize import (#39510) @DiegoAndai
|
|
28
|
+
- ​<!-- 08 -->[Snackbar] copy files to mui-material-next (#39232) @Best-Sardar
|
|
29
|
+
- ​<!-- 33 -->[Menu] Use useMenu hook (#38934) @mnajdova
|
|
30
|
+
|
|
31
|
+
### `@mui/joy@5.0.0-beta.12`
|
|
32
|
+
|
|
33
|
+
- ​<!-- 26 -->[Button] Fix button size being a decorator (#39529) @siriwatknp
|
|
34
|
+
- ​<!-- 25 -->[CardOverflow] Remove conditional CSS to support Next.js App dir (#39101) @siriwatknp
|
|
35
|
+
- ​<!-- 11 -->[Link] Apply `userSelect: none` only when it's a button (#39486) @mwskwong
|
|
36
|
+
|
|
37
|
+
### `@mui/lab@5.0.0-alpha.150`
|
|
38
|
+
|
|
39
|
+
- ​<!-- 09 -->Update peer dep of @mui/material (#39398) @brijeshb42
|
|
40
|
+
|
|
41
|
+
### `@mui/zero-runtime@0.0.1-alpha.0`
|
|
42
|
+
|
|
43
|
+
- ​<!-- 06 -->Implement typings for public runtime API (#39215) @brijeshb42
|
|
44
|
+
|
|
45
|
+
### `@mui/zero-vite-plugin@0.0.1-alpha.0`
|
|
46
|
+
|
|
47
|
+
- ​<!-- 05 -->Modify plugin to transform node_modules (#39517) @brijeshb42
|
|
48
|
+
|
|
49
|
+
### Docs
|
|
50
|
+
|
|
51
|
+
- ​<!-- 31 -->[base-ui] Standardize grey palette across demos (#39504) @zanivan
|
|
52
|
+
- ​<!-- 30 -->[base-ui] Overall demos design review (#38820) @zanivan
|
|
53
|
+
- ​<!-- 19 -->[joy-ui] Adjust the responsiveness of the template card (#39534) @danilo-leal
|
|
54
|
+
- ​<!-- 18 -->[material-ui] Typo fixes in overview page (#39540) @Evan151
|
|
55
|
+
- ​<!-- 35 -->[material-ui] Add stray design tweaks to the templates collection (#39583) @danilo-leal
|
|
56
|
+
- ​<!-- 17 -->[system] Revise the Box page (#39159) @danilo-leal
|
|
57
|
+
- ​<!-- 22 -->Fix git diff format @oliviertassinari
|
|
58
|
+
- ​<!-- 15 -->[I10n] Add Norwegian (nynorsk) (nn-NO) locale (#39481) @hjalti-lifekeys
|
|
59
|
+
- ​<!-- 10 -->[l10n] Fix double space typo in ar-EG @oliviertassinari
|
|
60
|
+
- ​<!-- 14 -->[I10n] Additions to Icelandic (is-IS) locale (#39480) @hjalti-lifekeys
|
|
61
|
+
|
|
62
|
+
### Core
|
|
63
|
+
|
|
64
|
+
- ​<!-- 23 -->[core] Replace a `useCallback` by `useRef` in useEventCallback (#39078) @romgrk
|
|
65
|
+
- ​<!-- 21 -->[docs-infra] Prevent docs crash (#39214) @alexfauquette
|
|
66
|
+
- ​<!-- 20 -->[docs-infra] Fix no-op autoprefixer warning (#39385) @oliviertassinari
|
|
67
|
+
- ​<!-- 32 -->[docs-infra] Refine the API page design (#39520) @alexfauquette
|
|
68
|
+
- ​<!-- 25 -->[docs-infra] Fix cut-off sponsors (#39572) @oliviertassinari
|
|
69
|
+
- ​<!-- 04 -->[website] Add missing h1 on page @oliviertassinari
|
|
70
|
+
- ​<!-- 03 -->[website] Fix unrecognized prop warning @oliviertassinari
|
|
71
|
+
- ​<!-- 02 -->[website] Store Engineer role filled @oliviertassinari
|
|
72
|
+
- ​<!-- 01 -->[website] Add stray design adjustments (#39496) @danilo-leal
|
|
73
|
+
|
|
74
|
+
All contributors of this release in alphabetical order: @alexfauquette, @Best-Sardar, @brijeshb42, @danilo-leal, @DiegoAndai, @Evan151, @gitstart, @hjalti-lifekeys, @mj12albert, @mnajdova, @mwskwong, @oliviertassinari, @romgrk, @Semigradsky, @siriwatknp, @VadimZvf, @zanivan
|
|
75
|
+
|
|
76
|
+
## 5.14.14
|
|
77
|
+
|
|
78
|
+
<!-- generated comparing v5.14.13..master -->
|
|
79
|
+
|
|
80
|
+
_Oct 17, 2023_
|
|
81
|
+
|
|
82
|
+
A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
|
|
83
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
84
|
+
|
|
85
|
+
### `@mui/material@5.14.14`
|
|
86
|
+
|
|
87
|
+
- ​<!-- 29 -->[material-ui][AppBar] Support all default palette colors in TypeScript (#39389) @BreakBB
|
|
88
|
+
- ​<!-- 28 -->[material-ui][AvatarGroup] Add `renderSurplus` prop (#39283) @uuxxx
|
|
89
|
+
- ​<!-- 25 -->[material-ui][Box] Fix system properties has incorrect `Theme` interface when applied directly (#39404) @Semigradsky
|
|
90
|
+
- ​<!-- 04 -->[material-ui][Pagination] Update `type` parameter of `getItemAriaLabel` prop (#39390) @Simer13
|
|
91
|
+
- ​<!-- 06 -->[material][tab] Show/hide scroll buttons for dynamically added children (#39415) @brijeshb42
|
|
92
|
+
|
|
93
|
+
### `@mui/base@5.0.0-beta.20`
|
|
94
|
+
|
|
95
|
+
- ​<!-- 26 -->[base-ui][Menu] Do not reopen the menu after clicking on a trigger in Safari (#39393) @michaldudak
|
|
96
|
+
|
|
97
|
+
### `@mui/material-next@6.0.0-alpha.106`
|
|
98
|
+
|
|
99
|
+
- ​<!-- 23 -->[Divider][material-next] Add Divider component (#39179) @Best-Sardar
|
|
100
|
+
|
|
101
|
+
### `@mui/joy@5.0.0-beta.11`
|
|
102
|
+
|
|
103
|
+
- ​<!-- 08 -->[joy-ui][List] Add the `marker` prop (#39313) @siriwatknp
|
|
104
|
+
- ​<!-- 07 -->[joy-ui][Skeleton] Fix semi-transparent scenario when with surface components and color inversion (#39400) @TheNatkat
|
|
105
|
+
- ​<!-- 06 -->[joy-ui][Textarea] Fix focus ring for error state (#39391) @vineetjk
|
|
106
|
+
|
|
107
|
+
### `@mui/icons-material@5.14.14`
|
|
108
|
+
|
|
109
|
+
- ​<!-- 09 -->[icons] Fix VoiceChatOutlined showing the wrong icon (#39418) @devuser200
|
|
110
|
+
|
|
111
|
+
### `@mui/system@5.14.14`
|
|
112
|
+
|
|
113
|
+
- ​<!-- 03 -->[mui-system][style] bug fix for style value check color in nullable object (#39457) @DarhkVoyd
|
|
114
|
+
|
|
115
|
+
### `@mui/styled-engine-sc@6.0.0-alpha.2`
|
|
116
|
+
|
|
117
|
+
- ​<!-- 05 -->[styled-engine-sc] Fix TS issues because of missing types (#39395) @mnajdova
|
|
118
|
+
|
|
119
|
+
### Docs
|
|
120
|
+
|
|
121
|
+
- ​<!-- 27 -->[docs][base-ui] Renaming demos to BaseXxx (#39104) @christophermorin
|
|
122
|
+
- ​<!-- 26 -->[docs] Accessibility in Base UI (#39264) @michaldudak
|
|
123
|
+
- ​<!-- 22 -->[docs] Fix 301 redirection @oliviertassinari
|
|
124
|
+
- ​<!-- 21 -->[docs] Improve Base UI table of contents for APIs (#39412) @ZeeshanTamboli
|
|
125
|
+
- ​<!-- 20 -->[docs] Adjust design kits-related content (#39367) @danilo-leal
|
|
126
|
+
- ​<!-- 19 -->[docs] Revise the Contributing Guide (#39190) @samuelsycamore
|
|
127
|
+
- ​<!-- 12 -->[docs][joy-ui] Fix row hover prop name in the Table page (#39431) @adrienbrault
|
|
128
|
+
- ​<!-- 11 -->[docs][joy-ui] Fix color inversion demos (#39403) @danilo-leal
|
|
129
|
+
- ​<!-- 10 -->[docs][material-ui] Remove irrelevant TODO from Snackbar demo (#39396) @ZeeshanTamboli
|
|
130
|
+
- ​<!-- 06 -->[docs][material-ui][Table] Bug in "Sorting & Selecting" demo (#39426) @codewithrabeeh
|
|
131
|
+
- ​<!-- 05 -->[docs][joy-ui][typography] Update docs after lineHeight changes (#39366) @zanivan
|
|
132
|
+
|
|
133
|
+
### Core
|
|
134
|
+
|
|
135
|
+
- ​<!-- 24 -->[core] Fix multiple typos across the repo (#39422) @parikshitadhikari
|
|
136
|
+
- ​<!-- 18 -->[docs-infra] Add refinements to the API content design (#39425) @danilo-leal
|
|
137
|
+
- ​<!-- 17 -->[docs-infra] Add a min height to the layout component (#39416) @danilo-leal
|
|
138
|
+
- ​<!-- 16 -->[docs-infra] Prevent horizontal scroll in the TOC (#39417) @danilo-leal
|
|
139
|
+
- ​<!-- 15 -->[docs-infra] Add a collapsible list & table views to the API content display (#38265) @alexfauquette
|
|
140
|
+
- ​<!-- 14 -->[docs-infra] Adjust the `kbd` tag styles (#39397) @danilo-leal
|
|
141
|
+
- ​<!-- 13 -->[docs-infra] Fix strong style regression (#39384) @oliviertassinari
|
|
142
|
+
- ​<!-- 04 -->[website] Add the LinkedIn profile to the contributors section on the About page (#39455) @chhawinder
|
|
143
|
+
- ​<!-- 03 -->[website] Update new role template (#39386) @oliviertassinari
|
|
144
|
+
- ​<!-- 02 -->[website] Add stray design fine-tunning to the Pricing page (#39472) @danilo-leal
|
|
145
|
+
- ​<!-- 01 -->[website] Fix career anchor link to perks & benefits @oliviertassinari
|
|
146
|
+
|
|
147
|
+
All contributors of this release in alphabetical order: @adrienbrault, @alexfauquette, @Best-Sardar, @BreakBB, @brijeshb42, @chhawinder, @christophermorin, @codewithrabeeh, @danilo-leal, @DarhkVoyd, @devuser200, @michaldudak, @mnajdova, @oliviertassinari, @parikshitadhikari, @samuelsycamore, @Semigradsky, @Simer13, @siriwatknp, @TheNatkat, @uuxxx, @vineetjk, @zanivan, @ZeeshanTamboli
|
|
148
|
+
|
|
3
149
|
## 5.14.13
|
|
4
150
|
|
|
5
151
|
<!-- generated comparing v5.14.12..master -->
|
package/Checkbox/Checkbox.js
CHANGED
|
@@ -39,7 +39,7 @@ const CheckboxRoot = styled(SwitchBase, {
|
|
|
39
39
|
const {
|
|
40
40
|
ownerState
|
|
41
41
|
} = props;
|
|
42
|
-
return [styles.root, ownerState.indeterminate && styles.indeterminate, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];
|
|
42
|
+
return [styles.root, ownerState.indeterminate && styles.indeterminate, styles[`size${capitalize(ownerState.size)}`], ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];
|
|
43
43
|
}
|
|
44
44
|
})(({
|
|
45
45
|
theme,
|
package/InputLabel/InputLabel.js
CHANGED
|
@@ -42,7 +42,7 @@ const InputLabelRoot = styled(FormLabel, {
|
|
|
42
42
|
} = props;
|
|
43
43
|
return [{
|
|
44
44
|
[`& .${formLabelClasses.asterisk}`]: styles.asterisk
|
|
45
|
-
}, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, styles[ownerState.variant]];
|
|
45
|
+
}, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, ownerState.focused && styles.focused, styles[ownerState.variant]];
|
|
46
46
|
}
|
|
47
47
|
})(({
|
|
48
48
|
theme,
|
|
@@ -125,7 +125,7 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
|
|
|
125
125
|
const fcs = formControlState({
|
|
126
126
|
props,
|
|
127
127
|
muiFormControl,
|
|
128
|
-
states: ['size', 'variant', 'required']
|
|
128
|
+
states: ['size', 'variant', 'required', 'focused']
|
|
129
129
|
});
|
|
130
130
|
const ownerState = _extends({}, props, {
|
|
131
131
|
disableAnimation,
|
|
@@ -133,7 +133,8 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
|
|
|
133
133
|
shrink,
|
|
134
134
|
size: fcs.size,
|
|
135
135
|
variant: fcs.variant,
|
|
136
|
-
required: fcs.required
|
|
136
|
+
required: fcs.required,
|
|
137
|
+
focused: fcs.focused
|
|
137
138
|
});
|
|
138
139
|
const classes = useUtilityClasses(ownerState);
|
|
139
140
|
return /*#__PURE__*/_jsx(InputLabelRoot, _extends({
|
|
@@ -41,16 +41,13 @@ export interface PaginationProps
|
|
|
41
41
|
* This is important for screen reader users.
|
|
42
42
|
*
|
|
43
43
|
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
|
|
44
|
-
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous'). Defaults to 'page'.
|
|
44
|
+
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis'). Defaults to 'page'.
|
|
45
45
|
* @param {number} page The page number to format.
|
|
46
46
|
* @param {bool} selected If true, the current page is selected.
|
|
47
47
|
* @returns {string}
|
|
48
48
|
*/
|
|
49
|
-
getItemAriaLabel?: (
|
|
50
|
-
|
|
51
|
-
page: number,
|
|
52
|
-
selected: boolean,
|
|
53
|
-
) => string;
|
|
49
|
+
getItemAriaLabel?: (type: UsePaginationItem['type'], page: number, selected: boolean) => string;
|
|
50
|
+
|
|
54
51
|
/**
|
|
55
52
|
* Render the item.
|
|
56
53
|
* @param {PaginationRenderItemParams} params The props to spread on a PaginationItem.
|
package/Pagination/Pagination.js
CHANGED
|
@@ -169,7 +169,7 @@ process.env.NODE_ENV !== "production" ? Pagination.propTypes /* remove-proptypes
|
|
|
169
169
|
* This is important for screen reader users.
|
|
170
170
|
*
|
|
171
171
|
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
|
|
172
|
-
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous'). Defaults to 'page'.
|
|
172
|
+
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis'). Defaults to 'page'.
|
|
173
173
|
* @param {number} page The page number to format.
|
|
174
174
|
* @param {bool} selected If true, the current page is selected.
|
|
175
175
|
* @returns {string}
|
package/Radio/Radio.js
CHANGED
|
@@ -37,7 +37,7 @@ const RadioRoot = styled(SwitchBase, {
|
|
|
37
37
|
const {
|
|
38
38
|
ownerState
|
|
39
39
|
} = props;
|
|
40
|
-
return [styles.root, styles[`color${capitalize(ownerState.color)}`]];
|
|
40
|
+
return [styles.root, ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], styles[`color${capitalize(ownerState.color)}`]];
|
|
41
41
|
}
|
|
42
42
|
})(({
|
|
43
43
|
theme,
|
package/Tabs/Tabs.js
CHANGED
|
@@ -501,23 +501,48 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
501
501
|
updateIndicatorState();
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
+
let resizeObserver;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @type {MutationCallback}
|
|
508
|
+
*/
|
|
509
|
+
const handleMutation = records => {
|
|
510
|
+
records.forEach(record => {
|
|
511
|
+
record.removedNodes.forEach(item => {
|
|
512
|
+
var _resizeObserver;
|
|
513
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.unobserve(item);
|
|
514
|
+
});
|
|
515
|
+
record.addedNodes.forEach(item => {
|
|
516
|
+
var _resizeObserver2;
|
|
517
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.observe(item);
|
|
518
|
+
});
|
|
519
|
+
});
|
|
520
|
+
handleResize();
|
|
521
|
+
updateScrollButtonState();
|
|
522
|
+
};
|
|
504
523
|
const win = ownerWindow(tabsRef.current);
|
|
505
524
|
win.addEventListener('resize', handleResize);
|
|
506
|
-
let
|
|
525
|
+
let mutationObserver;
|
|
507
526
|
if (typeof ResizeObserver !== 'undefined') {
|
|
508
527
|
resizeObserver = new ResizeObserver(handleResize);
|
|
509
528
|
Array.from(tabListRef.current.children).forEach(child => {
|
|
510
529
|
resizeObserver.observe(child);
|
|
511
530
|
});
|
|
512
531
|
}
|
|
532
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
533
|
+
mutationObserver = new MutationObserver(handleMutation);
|
|
534
|
+
mutationObserver.observe(tabListRef.current, {
|
|
535
|
+
childList: true
|
|
536
|
+
});
|
|
537
|
+
}
|
|
513
538
|
return () => {
|
|
539
|
+
var _mutationObserver, _resizeObserver3;
|
|
514
540
|
handleResize.clear();
|
|
515
541
|
win.removeEventListener('resize', handleResize);
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
542
|
+
(_mutationObserver = mutationObserver) == null || _mutationObserver.disconnect();
|
|
543
|
+
(_resizeObserver3 = resizeObserver) == null || _resizeObserver3.disconnect();
|
|
519
544
|
};
|
|
520
|
-
}, [updateIndicatorState]);
|
|
545
|
+
}, [updateIndicatorState, updateScrollButtonState]);
|
|
521
546
|
|
|
522
547
|
/**
|
|
523
548
|
* Toggle visibility of start and end scroll buttons
|
|
@@ -17,6 +17,8 @@ export interface ToggleButtonClasses {
|
|
|
17
17
|
sizeMedium: string;
|
|
18
18
|
/** Styles applied to the root element if `size="large"`. */
|
|
19
19
|
sizeLarge: string;
|
|
20
|
+
/** Styles applied to the root element if `fullWidth={true}`. */
|
|
21
|
+
fullWidth: string;
|
|
20
22
|
}
|
|
21
23
|
export type ToggleButtonClassKey = keyof ToggleButtonClasses;
|
|
22
24
|
export declare function getToggleButtonUtilityClass(slot: string): string;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getToggleButtonUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiToggleButton', slot);
|
|
5
5
|
}
|
|
6
|
-
const toggleButtonClasses = generateUtilityClasses('MuiToggleButton', ['root', 'disabled', 'selected', 'standard', 'primary', 'secondary', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
|
|
6
|
+
const toggleButtonClasses = generateUtilityClasses('MuiToggleButton', ['root', 'disabled', 'selected', 'standard', 'primary', 'secondary', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'fullWidth']);
|
|
7
7
|
export default toggleButtonClasses;
|
|
@@ -11,6 +11,8 @@ export interface ToggleButtonGroupClasses {
|
|
|
11
11
|
groupedHorizontal: string;
|
|
12
12
|
/** Styles applied to the children if `orientation="vertical"`. */
|
|
13
13
|
groupedVertical: string;
|
|
14
|
+
/** Styles applied to the root element if `fullWidth={true}`. */
|
|
15
|
+
fullWidth: string;
|
|
14
16
|
}
|
|
15
17
|
export type ToggleButtonGroupClassKey = keyof ToggleButtonGroupClasses;
|
|
16
18
|
export declare function getToggleButtonGroupUtilityClass(slot: string): string;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getToggleButtonGroupUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiToggleButtonGroup', slot);
|
|
5
5
|
}
|
|
6
|
-
const toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical']);
|
|
6
|
+
const toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth']);
|
|
7
7
|
export default toggleButtonGroupClasses;
|
package/index.js
CHANGED
package/legacy/AppBar/AppBar.js
CHANGED
|
@@ -154,7 +154,7 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes /* remove-proptypes */
|
|
|
154
154
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
155
155
|
* @default 'primary'
|
|
156
156
|
*/
|
|
157
|
-
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent']), PropTypes.string]),
|
|
157
|
+
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
|
158
158
|
/**
|
|
159
159
|
* If true, the `color` prop is applied in dark mode.
|
|
160
160
|
* @default false
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getAppBarUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiAppBar', slot);
|
|
5
5
|
}
|
|
6
|
-
var appBarClasses = generateUtilityClasses('MuiAppBar', ['root', 'positionFixed', 'positionAbsolute', 'positionSticky', 'positionStatic', 'positionRelative', 'colorDefault', 'colorPrimary', 'colorSecondary', 'colorInherit', 'colorTransparent']);
|
|
6
|
+
var appBarClasses = generateUtilityClasses('MuiAppBar', ['root', 'positionFixed', 'positionAbsolute', 'positionSticky', 'positionStatic', 'positionRelative', 'colorDefault', 'colorPrimary', 'colorSecondary', 'colorInherit', 'colorTransparent', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning']);
|
|
7
7
|
export default appBarClasses;
|
|
@@ -13,6 +13,7 @@ import styled from '../styles/styled';
|
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
14
|
import Avatar, { avatarClasses } from '../Avatar';
|
|
15
15
|
import avatarGroupClasses, { getAvatarGroupUtilityClass } from './avatarGroupClasses';
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
var SPACINGS = {
|
|
18
19
|
small: -16,
|
|
@@ -75,6 +76,7 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
|
|
|
75
76
|
componentsProps = _props$componentsProp === void 0 ? {} : _props$componentsProp,
|
|
76
77
|
_props$max = props.max,
|
|
77
78
|
max = _props$max === void 0 ? 5 : _props$max,
|
|
79
|
+
renderSurplus = props.renderSurplus,
|
|
78
80
|
_props$slotProps = props.slotProps,
|
|
79
81
|
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
80
82
|
_props$spacing = props.spacing,
|
|
@@ -82,7 +84,7 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
|
|
|
82
84
|
total = props.total,
|
|
83
85
|
_props$variant = props.variant,
|
|
84
86
|
variant = _props$variant === void 0 ? 'circular' : _props$variant,
|
|
85
|
-
other = _objectWithoutProperties(props, ["children", "className", "component", "componentsProps", "max", "slotProps", "spacing", "total", "variant"]);
|
|
87
|
+
other = _objectWithoutProperties(props, ["children", "className", "component", "componentsProps", "max", "renderSurplus", "slotProps", "spacing", "total", "variant"]);
|
|
86
88
|
var clampedMax = max < 2 ? 2 : max;
|
|
87
89
|
var ownerState = _extends({}, props, {
|
|
88
90
|
max: max,
|
|
@@ -106,6 +108,7 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
|
|
|
106
108
|
clampedMax = Math.min(totalAvatars + 1, clampedMax);
|
|
107
109
|
var maxAvatars = Math.min(children.length, clampedMax - 1);
|
|
108
110
|
var extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
|
111
|
+
var extraAvatarsElement = renderSurplus ? renderSurplus(extraAvatars) : "+".concat(extraAvatars);
|
|
109
112
|
var marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
|
|
110
113
|
var additionalAvatarSlotProps = (_slotProps$additional = slotProps.additionalAvatar) != null ? _slotProps$additional : componentsProps.additionalAvatar;
|
|
111
114
|
return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
|
|
@@ -114,7 +117,7 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
|
|
|
114
117
|
className: clsx(classes.root, className),
|
|
115
118
|
ref: ref
|
|
116
119
|
}, other, {
|
|
117
|
-
children: [extraAvatars ? /*#__PURE__*/
|
|
120
|
+
children: [extraAvatars ? /*#__PURE__*/_jsx(AvatarGroupAvatar, _extends({
|
|
118
121
|
ownerState: ownerState,
|
|
119
122
|
variant: variant
|
|
120
123
|
}, additionalAvatarSlotProps, {
|
|
@@ -122,7 +125,7 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
|
|
|
122
125
|
style: _extends({
|
|
123
126
|
marginLeft: marginLeft
|
|
124
127
|
}, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.style),
|
|
125
|
-
children:
|
|
128
|
+
children: extraAvatarsElement
|
|
126
129
|
})) : null, children.slice(0, maxAvatars).reverse().map(function (child, index) {
|
|
127
130
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
128
131
|
className: clsx(child.props.className, classes.avatar),
|
|
@@ -180,6 +183,12 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes /* remove-proptype
|
|
|
180
183
|
}
|
|
181
184
|
return null;
|
|
182
185
|
}),
|
|
186
|
+
/**
|
|
187
|
+
* custom renderer of extraAvatars
|
|
188
|
+
* @param {number} surplus number of extra avatars
|
|
189
|
+
* @returns {React.ReactNode} custom element to display
|
|
190
|
+
*/
|
|
191
|
+
renderSurplus: PropTypes.func,
|
|
183
192
|
/**
|
|
184
193
|
* The extra props for the slot components.
|
|
185
194
|
* You can override the existing props or add new ones.
|
|
@@ -37,7 +37,7 @@ var CheckboxRoot = styled(SwitchBase, {
|
|
|
37
37
|
slot: 'Root',
|
|
38
38
|
overridesResolver: function overridesResolver(props, styles) {
|
|
39
39
|
var ownerState = props.ownerState;
|
|
40
|
-
return [styles.root, ownerState.indeterminate && styles.indeterminate, ownerState.color !== 'default' && styles["color".concat(capitalize(ownerState.color))]];
|
|
40
|
+
return [styles.root, ownerState.indeterminate && styles.indeterminate, styles["size".concat(capitalize(ownerState.size))], ownerState.color !== 'default' && styles["color".concat(capitalize(ownerState.color))]];
|
|
41
41
|
}
|
|
42
42
|
})(function (_ref) {
|
|
43
43
|
var _ref2;
|
|
@@ -38,7 +38,7 @@ var InputLabelRoot = styled(FormLabel, {
|
|
|
38
38
|
slot: 'Root',
|
|
39
39
|
overridesResolver: function overridesResolver(props, styles) {
|
|
40
40
|
var ownerState = props.ownerState;
|
|
41
|
-
return [_defineProperty({}, "& .".concat(formLabelClasses.asterisk), styles.asterisk), styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, styles[ownerState.variant]];
|
|
41
|
+
return [_defineProperty({}, "& .".concat(formLabelClasses.asterisk), styles.asterisk), styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, ownerState.focused && styles.focused, styles[ownerState.variant]];
|
|
42
42
|
}
|
|
43
43
|
})(function (_ref2) {
|
|
44
44
|
var theme = _ref2.theme,
|
|
@@ -123,7 +123,7 @@ var InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref)
|
|
|
123
123
|
var fcs = formControlState({
|
|
124
124
|
props: props,
|
|
125
125
|
muiFormControl: muiFormControl,
|
|
126
|
-
states: ['size', 'variant', 'required']
|
|
126
|
+
states: ['size', 'variant', 'required', 'focused']
|
|
127
127
|
});
|
|
128
128
|
var ownerState = _extends({}, props, {
|
|
129
129
|
disableAnimation: disableAnimation,
|
|
@@ -131,7 +131,8 @@ var InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref)
|
|
|
131
131
|
shrink: shrink,
|
|
132
132
|
size: fcs.size,
|
|
133
133
|
variant: fcs.variant,
|
|
134
|
-
required: fcs.required
|
|
134
|
+
required: fcs.required,
|
|
135
|
+
focused: fcs.focused
|
|
135
136
|
});
|
|
136
137
|
var classes = useUtilityClasses(ownerState);
|
|
137
138
|
return /*#__PURE__*/_jsx(InputLabelRoot, _extends({
|
|
@@ -184,7 +184,7 @@ process.env.NODE_ENV !== "production" ? Pagination.propTypes /* remove-proptypes
|
|
|
184
184
|
* This is important for screen reader users.
|
|
185
185
|
*
|
|
186
186
|
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
|
|
187
|
-
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous'). Defaults to 'page'.
|
|
187
|
+
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis'). Defaults to 'page'.
|
|
188
188
|
* @param {number} page The page number to format.
|
|
189
189
|
* @param {bool} selected If true, the current page is selected.
|
|
190
190
|
* @returns {string}
|
package/legacy/Radio/Radio.js
CHANGED
|
@@ -36,7 +36,7 @@ var RadioRoot = styled(SwitchBase, {
|
|
|
36
36
|
slot: 'Root',
|
|
37
37
|
overridesResolver: function overridesResolver(props, styles) {
|
|
38
38
|
var ownerState = props.ownerState;
|
|
39
|
-
return [styles.root, styles["color".concat(capitalize(ownerState.color))]];
|
|
39
|
+
return [styles.root, ownerState.size !== 'medium' && styles["size".concat(capitalize(ownerState.size))], styles["color".concat(capitalize(ownerState.color))]];
|
|
40
40
|
}
|
|
41
41
|
})(function (_ref) {
|
|
42
42
|
var theme = _ref.theme,
|