@mui/material 9.0.0-alpha.2 → 9.0.0-alpha.4
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/Accordion.d.mts +0 -14
- package/Accordion/Accordion.d.ts +0 -14
- package/Accordion/Accordion.js +3 -25
- package/Accordion/Accordion.mjs +3 -25
- package/AccordionSummary/AccordionSummary.js +1 -1
- package/AccordionSummary/AccordionSummary.mjs +1 -1
- package/AccordionSummary/accordionSummaryClasses.d.mts +0 -5
- package/AccordionSummary/accordionSummaryClasses.d.ts +0 -5
- package/AccordionSummary/accordionSummaryClasses.js +1 -1
- package/AccordionSummary/accordionSummaryClasses.mjs +1 -1
- package/Alert/Alert.d.mts +0 -23
- package/Alert/Alert.d.ts +0 -23
- package/Alert/Alert.js +4 -36
- package/Alert/Alert.mjs +4 -36
- package/Alert/alertClasses.d.mts +0 -72
- package/Alert/alertClasses.d.ts +0 -72
- package/Alert/alertClasses.js +1 -1
- package/Alert/alertClasses.mjs +1 -1
- package/Autocomplete/Autocomplete.d.mts +26 -60
- package/Autocomplete/Autocomplete.d.ts +26 -60
- package/Autocomplete/Autocomplete.js +76 -119
- package/Autocomplete/Autocomplete.mjs +76 -119
- package/Avatar/Avatar.d.mts +0 -8
- package/Avatar/Avatar.d.ts +0 -8
- package/Avatar/Avatar.js +13 -35
- package/Avatar/Avatar.mjs +13 -35
- package/AvatarGroup/AvatarGroup.d.mts +0 -15
- package/AvatarGroup/AvatarGroup.d.ts +0 -15
- package/AvatarGroup/AvatarGroup.js +1 -18
- package/AvatarGroup/AvatarGroup.mjs +1 -18
- package/Backdrop/Backdrop.d.mts +1 -31
- package/Backdrop/Backdrop.d.ts +1 -31
- package/Backdrop/Backdrop.js +2 -42
- package/Backdrop/Backdrop.mjs +2 -42
- package/Badge/Badge.d.mts +0 -20
- package/Badge/Badge.d.ts +0 -20
- package/Badge/Badge.js +2 -35
- package/Badge/Badge.mjs +2 -35
- package/Box/Box.d.mts +1 -0
- package/Box/Box.d.ts +1 -0
- package/Button/Button.d.mts +1 -0
- package/Button/Button.d.ts +1 -0
- package/Button/Button.js +6 -6
- package/Button/Button.mjs +6 -6
- package/Button/buttonClasses.d.mts +0 -132
- package/Button/buttonClasses.d.ts +0 -132
- package/Button/buttonClasses.js +1 -1
- package/Button/buttonClasses.mjs +1 -1
- package/ButtonBase/ButtonBase.js +16 -2
- package/ButtonBase/ButtonBase.mjs +16 -2
- package/CHANGELOG.md +191 -0
- package/CardHeader/CardHeader.js +5 -1
- package/CardHeader/CardHeader.mjs +5 -1
- package/CircularProgress/CircularProgress.js +2 -2
- package/CircularProgress/CircularProgress.mjs +2 -2
- package/CircularProgress/circularProgressClasses.d.mts +0 -8
- package/CircularProgress/circularProgressClasses.d.ts +0 -8
- package/CircularProgress/circularProgressClasses.js +1 -1
- package/CircularProgress/circularProgressClasses.mjs +1 -1
- package/Divider/Divider.d.mts +1 -6
- package/Divider/Divider.d.ts +1 -6
- package/Divider/Divider.js +2 -18
- package/Divider/Divider.mjs +2 -18
- package/Divider/dividerClasses.d.mts +0 -4
- package/Divider/dividerClasses.d.ts +0 -4
- package/Divider/dividerClasses.js +1 -1
- package/Divider/dividerClasses.mjs +1 -1
- package/FormControlLabel/FormControlLabel.d.mts +1 -14
- package/FormControlLabel/FormControlLabel.d.ts +1 -14
- package/FormControlLabel/FormControlLabel.js +1 -13
- package/FormControlLabel/FormControlLabel.mjs +1 -13
- package/Input/Input.js +2 -1
- package/Input/Input.mjs +2 -1
- package/List/List.d.mts +1 -0
- package/List/List.d.ts +1 -0
- package/ListItemButton/ListItemButton.d.mts +1 -0
- package/ListItemButton/ListItemButton.d.ts +1 -0
- package/ListItemIcon/ListItemIcon.d.mts +1 -0
- package/ListItemIcon/ListItemIcon.d.ts +1 -0
- package/ListItemText/ListItemText.d.mts +1 -0
- package/ListItemText/ListItemText.d.ts +1 -0
- package/ListItemText/ListItemText.js +5 -1
- package/ListItemText/ListItemText.mjs +5 -1
- package/ListSubheader/ListSubheader.d.mts +1 -0
- package/ListSubheader/ListSubheader.d.ts +1 -0
- package/Menu/Menu.d.mts +0 -13
- package/Menu/Menu.d.ts +0 -13
- package/Menu/Menu.js +5 -44
- package/Menu/Menu.mjs +5 -44
- package/MenuItem/MenuItem.js +21 -1
- package/MenuItem/MenuItem.mjs +23 -1
- package/MenuList/MenuList.js +77 -109
- package/MenuList/MenuList.mjs +77 -109
- package/MobileStepper/MobileStepper.d.mts +0 -5
- package/MobileStepper/MobileStepper.d.ts +0 -5
- package/MobileStepper/MobileStepper.js +1 -10
- package/MobileStepper/MobileStepper.mjs +1 -10
- package/Paper/Paper.d.mts +1 -0
- package/Paper/Paper.d.ts +1 -0
- package/Popover/Popover.d.mts +4 -48
- package/Popover/Popover.d.ts +4 -48
- package/Popover/Popover.js +4 -64
- package/Popover/Popover.mjs +4 -64
- package/Popper/Popper.d.mts +0 -17
- package/Popper/Popper.d.ts +0 -17
- package/Popper/Popper.js +2 -26
- package/Popper/Popper.mjs +2 -26
- package/Popper/index.d.mts +1 -0
- package/Popper/index.d.ts +1 -0
- package/Popper/index.js +11 -2
- package/Popper/index.mjs +1 -0
- package/Select/SelectInput.js +50 -55
- package/Select/SelectInput.mjs +47 -52
- package/Select/index.d.mts +1 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +12 -0
- package/Select/index.mjs +1 -0
- package/Select/utils/SelectFocusSourceContext.d.mts +4 -0
- package/Select/utils/SelectFocusSourceContext.d.ts +4 -0
- package/Select/utils/SelectFocusSourceContext.js +19 -0
- package/Select/utils/SelectFocusSourceContext.mjs +13 -0
- package/Select/utils/areEqualValues.d.mts +1 -0
- package/Select/utils/areEqualValues.d.ts +1 -0
- package/Select/utils/areEqualValues.js +14 -0
- package/Select/utils/areEqualValues.mjs +8 -0
- package/Select/utils/getOpenInteractionType.d.mts +1 -0
- package/Select/utils/getOpenInteractionType.d.ts +1 -0
- package/Select/utils/getOpenInteractionType.js +18 -0
- package/Select/utils/getOpenInteractionType.mjs +12 -0
- package/Select/utils/index.d.mts +4 -0
- package/Select/utils/index.d.ts +4 -0
- package/Select/utils/index.js +40 -0
- package/Select/utils/index.mjs +4 -0
- package/Select/utils/isEmpty.d.mts +1 -0
- package/Select/utils/isEmpty.d.ts +1 -0
- package/Select/utils/isEmpty.js +9 -0
- package/Select/utils/isEmpty.mjs +3 -0
- package/Slider/Slider.d.mts +109 -77
- package/Slider/Slider.d.ts +109 -77
- package/Slider/Slider.js +42 -119
- package/Slider/Slider.mjs +42 -119
- package/Slider/sliderClasses.d.mts +7 -7
- package/Slider/sliderClasses.d.ts +7 -7
- package/Slider/useSlider.js +50 -14
- package/Slider/useSlider.mjs +50 -14
- package/Snackbar/Snackbar.d.mts +1 -27
- package/Snackbar/Snackbar.d.ts +1 -27
- package/Snackbar/Snackbar.js +5 -58
- package/Snackbar/Snackbar.mjs +5 -58
- package/SpeedDial/SpeedDial.d.mts +0 -13
- package/SpeedDial/SpeedDial.d.ts +0 -13
- package/SpeedDial/SpeedDial.js +15 -40
- package/SpeedDial/SpeedDial.mjs +15 -40
- package/SpeedDialAction/SpeedDialAction.d.mts +0 -28
- package/SpeedDialAction/SpeedDialAction.d.ts +0 -28
- package/SpeedDialAction/SpeedDialAction.js +5 -46
- package/SpeedDialAction/SpeedDialAction.mjs +5 -46
- package/Step/Step.js +7 -5
- package/Step/Step.mjs +7 -5
- package/StepButton/StepButton.js +16 -6
- package/StepButton/StepButton.mjs +16 -6
- package/StepConnector/StepConnector.js +2 -2
- package/StepConnector/StepConnector.mjs +2 -2
- package/StepContent/StepContent.js +2 -2
- package/StepContent/StepContent.mjs +2 -2
- package/StepLabel/StepLabel.js +2 -2
- package/StepLabel/StepLabel.mjs +2 -2
- package/Stepper/Stepper.js +44 -7
- package/Stepper/Stepper.mjs +44 -7
- package/Stepper/StepperContext.d.mts +7 -0
- package/Stepper/StepperContext.d.ts +7 -0
- package/Stepper/StepperContext.js +2 -1
- package/Stepper/StepperContext.mjs +1 -0
- package/Stepper/index.d.mts +0 -1
- package/Stepper/index.d.ts +0 -1
- package/Tab/Tab.js +0 -1
- package/Tab/Tab.mjs +0 -1
- package/TablePagination/TablePagination.d.mts +1 -1
- package/TablePagination/TablePagination.d.ts +1 -1
- package/TablePagination/TablePagination.js +4 -2
- package/TablePagination/TablePagination.mjs +4 -2
- package/Tabs/Tabs.d.mts +2 -33
- package/Tabs/Tabs.d.ts +2 -33
- package/Tabs/Tabs.js +54 -135
- package/Tabs/Tabs.mjs +54 -135
- package/TextField/TextField.d.mts +6 -49
- package/TextField/TextField.d.ts +6 -49
- package/TextField/TextField.js +18 -53
- package/TextField/TextField.mjs +18 -53
- package/Tooltip/Tooltip.d.mts +1 -55
- package/Tooltip/Tooltip.d.ts +1 -55
- package/Tooltip/Tooltip.js +9 -87
- package/Tooltip/Tooltip.mjs +9 -87
- package/Typography/Typography.d.mts +1 -6
- package/Typography/Typography.d.ts +1 -6
- package/Typography/Typography.js +3 -19
- package/Typography/Typography.mjs +3 -19
- package/Typography/typographyClasses.d.mts +0 -5
- package/Typography/typographyClasses.d.ts +0 -5
- package/Typography/typographyClasses.js +1 -1
- package/Typography/typographyClasses.mjs +1 -1
- package/index.d.mts +0 -2
- package/index.d.ts +0 -2
- package/index.js +1 -9
- package/index.mjs +1 -2
- package/locale/amET.js +4 -1
- package/locale/amET.mjs +3 -1
- package/locale/arEG.js +4 -1
- package/locale/arEG.mjs +3 -1
- package/locale/arSA.js +4 -1
- package/locale/arSA.mjs +3 -1
- package/locale/arSD.js +4 -1
- package/locale/arSD.mjs +3 -1
- package/locale/beBY.js +4 -1
- package/locale/beBY.mjs +3 -1
- package/locale/bnBD.js +4 -1
- package/locale/bnBD.mjs +3 -1
- package/locale/caES.js +4 -1
- package/locale/caES.mjs +3 -1
- package/locale/csCZ.js +4 -1
- package/locale/csCZ.mjs +3 -1
- package/locale/daDK.js +4 -1
- package/locale/daDK.mjs +3 -1
- package/locale/deDE.js +4 -1
- package/locale/deDE.mjs +3 -1
- package/locale/elGR.js +4 -1
- package/locale/elGR.mjs +3 -1
- package/locale/esES.js +4 -1
- package/locale/esES.mjs +3 -1
- package/locale/etEE.js +4 -1
- package/locale/etEE.mjs +3 -1
- package/locale/faIR.js +4 -1
- package/locale/faIR.mjs +3 -1
- package/locale/fiFI.js +4 -1
- package/locale/fiFI.mjs +3 -1
- package/locale/frFR.js +4 -1
- package/locale/frFR.mjs +3 -1
- package/locale/heIL.js +4 -1
- package/locale/heIL.mjs +3 -1
- package/locale/hiIN.js +4 -1
- package/locale/hiIN.mjs +3 -1
- package/locale/hrHR.js +5 -1
- package/locale/hrHR.mjs +4 -1
- package/locale/isIS.js +4 -1
- package/locale/isIS.mjs +3 -1
- package/locale/itIT.js +4 -1
- package/locale/itIT.mjs +3 -1
- package/locale/jaJP.js +4 -1
- package/locale/jaJP.mjs +3 -1
- package/locale/khKH.js +4 -1
- package/locale/khKH.mjs +3 -1
- package/locale/kkKZ.js +4 -1
- package/locale/kkKZ.mjs +3 -1
- package/locale/koKR.js +4 -1
- package/locale/koKR.mjs +3 -1
- package/locale/kuCKB.js +4 -1
- package/locale/kuCKB.mjs +3 -1
- package/locale/kuLatn.js +4 -1
- package/locale/kuLatn.mjs +3 -1
- package/locale/mkMK.js +5 -1
- package/locale/mkMK.mjs +4 -1
- package/locale/msMS.js +5 -1
- package/locale/msMS.mjs +4 -1
- package/locale/myMY.js +5 -1
- package/locale/myMY.mjs +4 -1
- package/locale/nbNO.js +4 -1
- package/locale/nbNO.mjs +3 -1
- package/locale/neNP.js +5 -1
- package/locale/neNP.mjs +4 -1
- package/locale/nlNL.js +4 -1
- package/locale/nlNL.mjs +3 -1
- package/locale/nnNO.js +4 -1
- package/locale/nnNO.mjs +3 -1
- package/locale/plPL.js +4 -1
- package/locale/plPL.mjs +3 -1
- package/locale/psAF.js +4 -1
- package/locale/psAF.mjs +3 -1
- package/locale/ptBR.js +4 -1
- package/locale/ptBR.mjs +3 -1
- package/locale/ptPT.js +4 -1
- package/locale/ptPT.mjs +3 -1
- package/locale/roRO.js +4 -1
- package/locale/roRO.mjs +3 -1
- package/locale/ruRU.js +4 -1
- package/locale/ruRU.mjs +3 -1
- package/locale/siLK.js +4 -1
- package/locale/siLK.mjs +3 -1
- package/locale/skSK.js +4 -1
- package/locale/skSK.mjs +3 -1
- package/locale/srRS.js +5 -1
- package/locale/srRS.mjs +4 -1
- package/locale/svSE.js +4 -1
- package/locale/svSE.mjs +3 -1
- package/locale/thTH.js +4 -1
- package/locale/thTH.mjs +3 -1
- package/locale/tlTL.js +5 -1
- package/locale/tlTL.mjs +4 -1
- package/locale/trTR.js +4 -1
- package/locale/trTR.mjs +3 -1
- package/locale/ukUA.js +4 -1
- package/locale/ukUA.mjs +3 -1
- package/locale/urPK.js +4 -1
- package/locale/urPK.mjs +3 -1
- package/locale/utils/buildFormatNumber.d.mts +2 -0
- package/locale/utils/buildFormatNumber.d.ts +2 -0
- package/locale/utils/buildFormatNumber.js +23 -0
- package/locale/utils/buildFormatNumber.mjs +17 -0
- package/locale/viVN.js +4 -1
- package/locale/viVN.mjs +3 -1
- package/locale/zhCN.js +4 -1
- package/locale/zhCN.mjs +3 -1
- package/locale/zhHK.js +4 -1
- package/locale/zhHK.mjs +3 -1
- package/locale/zhTW.js +4 -1
- package/locale/zhTW.mjs +3 -1
- package/package.json +236 -236
- package/styles/components.d.mts +0 -5
- package/styles/components.d.ts +0 -5
- package/styles/overrides.d.mts +0 -2
- package/styles/overrides.d.ts +0 -2
- package/styles/props.d.mts +0 -2
- package/styles/props.d.ts +0 -2
- package/themeCssVarsAugmentation/index.js +5 -0
- package/themeCssVarsAugmentation/index.mjs +5 -0
- package/useAutocomplete/useAutocomplete.d.mts +0 -12
- package/useAutocomplete/useAutocomplete.d.ts +0 -12
- package/useAutocomplete/useAutocomplete.js +53 -28
- package/useAutocomplete/useAutocomplete.mjs +53 -28
- package/utils/index.d.mts +2 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +14 -0
- package/utils/index.mjs +2 -0
- package/utils/useRovingTabIndex.d.mts +2 -0
- package/utils/useRovingTabIndex.d.ts +2 -0
- package/utils/useRovingTabIndex.js +9 -0
- package/utils/useRovingTabIndex.mjs +2 -0
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
- package/GridLegacy/GridLegacy.d.mts +0 -160
- package/GridLegacy/GridLegacy.d.ts +0 -160
- package/GridLegacy/GridLegacy.js +0 -601
- package/GridLegacy/GridLegacy.mjs +0 -588
- package/GridLegacy/GridLegacyContext.js +0 -17
- package/GridLegacy/GridLegacyContext.mjs +0 -12
- package/GridLegacy/gridLegacyClasses.d.mts +0 -48
- package/GridLegacy/gridLegacyClasses.d.ts +0 -48
- package/GridLegacy/gridLegacyClasses.js +0 -27
- package/GridLegacy/gridLegacyClasses.mjs +0 -19
- package/GridLegacy/index.d.mts +0 -4
- package/GridLegacy/index.d.ts +0 -4
- package/GridLegacy/index.js +0 -35
- package/GridLegacy/index.mjs +0 -3
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
6
|
import integerPropType from '@mui/utils/integerPropType';
|
|
8
7
|
import chainPropTypes from '@mui/utils/chainPropTypes';
|
|
9
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
@@ -406,7 +405,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
406
405
|
autoHighlight = false,
|
|
407
406
|
autoSelect = false,
|
|
408
407
|
blurOnSelect = false,
|
|
409
|
-
ChipProps: ChipPropsProp,
|
|
410
408
|
className,
|
|
411
409
|
clearIcon = _ClearIcon || (_ClearIcon = /*#__PURE__*/_jsx(ClearIcon, {
|
|
412
410
|
fontSize: "small"
|
|
@@ -415,7 +413,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
415
413
|
clearOnEscape = false,
|
|
416
414
|
clearText = 'Clear',
|
|
417
415
|
closeText = 'Close',
|
|
418
|
-
componentsProps,
|
|
419
416
|
defaultValue = props.multiple ? [] : null,
|
|
420
417
|
disableClearable = false,
|
|
421
418
|
disableCloseOnSelect = false,
|
|
@@ -439,8 +436,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
439
436
|
includeInputInList = false,
|
|
440
437
|
inputValue: inputValueProp,
|
|
441
438
|
limitTags = -1,
|
|
442
|
-
ListboxComponent: ListboxComponentProp,
|
|
443
|
-
ListboxProps: ListboxPropsProp,
|
|
444
439
|
loading = false,
|
|
445
440
|
loadingText = 'Loading…',
|
|
446
441
|
multiple = false,
|
|
@@ -454,14 +449,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
454
449
|
openOnFocus = false,
|
|
455
450
|
openText = 'Open',
|
|
456
451
|
options,
|
|
457
|
-
PaperComponent: PaperComponentProp,
|
|
458
|
-
PopperComponent: PopperComponentProp,
|
|
459
452
|
popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/_jsx(ArrowDropDownIcon, {})),
|
|
460
453
|
readOnly = false,
|
|
461
454
|
renderGroup: renderGroupProp,
|
|
462
455
|
renderInput,
|
|
463
456
|
renderOption: renderOptionProp,
|
|
464
|
-
renderTags,
|
|
465
457
|
renderValue,
|
|
466
458
|
selectOnFocus = !props.freeSolo,
|
|
467
459
|
size = 'medium',
|
|
@@ -524,18 +516,20 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
524
516
|
};
|
|
525
517
|
const classes = useUtilityClasses(ownerState);
|
|
526
518
|
const externalForwardedProps = {
|
|
527
|
-
slots
|
|
528
|
-
|
|
529
|
-
popper: PopperComponentProp,
|
|
530
|
-
...slots
|
|
531
|
-
},
|
|
532
|
-
slotProps: {
|
|
533
|
-
chip: ChipPropsProp,
|
|
534
|
-
listbox: ListboxPropsProp,
|
|
535
|
-
...componentsProps,
|
|
536
|
-
...slotProps
|
|
537
|
-
}
|
|
519
|
+
slots,
|
|
520
|
+
slotProps
|
|
538
521
|
};
|
|
522
|
+
const [RootSlot, rootProps] = useSlot('root', {
|
|
523
|
+
ref,
|
|
524
|
+
className: [classes.root, className],
|
|
525
|
+
elementType: AutocompleteRoot,
|
|
526
|
+
externalForwardedProps: {
|
|
527
|
+
...externalForwardedProps,
|
|
528
|
+
...other
|
|
529
|
+
},
|
|
530
|
+
getSlotProps: getRootProps,
|
|
531
|
+
ownerState
|
|
532
|
+
});
|
|
539
533
|
const [ListboxSlot, listboxProps] = useSlot('listbox', {
|
|
540
534
|
elementType: AutocompleteListbox,
|
|
541
535
|
externalForwardedProps,
|
|
@@ -565,6 +559,31 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
565
559
|
open: popupOpen
|
|
566
560
|
}
|
|
567
561
|
});
|
|
562
|
+
const [ClearIndicatorSlot, clearIndicatorProps] = useSlot('clearIndicator', {
|
|
563
|
+
elementType: AutocompleteClearIndicator,
|
|
564
|
+
externalForwardedProps,
|
|
565
|
+
ownerState,
|
|
566
|
+
className: classes.clearIndicator,
|
|
567
|
+
shouldForwardComponentProp: true,
|
|
568
|
+
additionalProps: {
|
|
569
|
+
...getClearProps(),
|
|
570
|
+
'aria-label': clearText,
|
|
571
|
+
title: clearText
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
const [PopupIndicatorSlot, popupIndicatorProps] = useSlot('popupIndicator', {
|
|
575
|
+
elementType: AutocompletePopupIndicator,
|
|
576
|
+
externalForwardedProps,
|
|
577
|
+
ownerState,
|
|
578
|
+
className: classes.popupIndicator,
|
|
579
|
+
shouldForwardComponentProp: true,
|
|
580
|
+
additionalProps: {
|
|
581
|
+
...getPopupIndicatorProps(),
|
|
582
|
+
disabled,
|
|
583
|
+
'aria-label': popupOpen ? closeText : openText,
|
|
584
|
+
title: popupOpen ? closeText : openText
|
|
585
|
+
}
|
|
586
|
+
});
|
|
568
587
|
let startAdornment;
|
|
569
588
|
const getCustomizedItemProps = params => ({
|
|
570
589
|
className: classes.tag,
|
|
@@ -573,9 +592,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
573
592
|
});
|
|
574
593
|
if (multiple) {
|
|
575
594
|
if (value.length > 0) {
|
|
576
|
-
if (
|
|
577
|
-
startAdornment = renderTags(value, getCustomizedItemProps, ownerState);
|
|
578
|
-
} else if (renderValue) {
|
|
595
|
+
if (renderValue) {
|
|
579
596
|
startAdornment = renderValue(value, getCustomizedItemProps, ownerState);
|
|
580
597
|
} else {
|
|
581
598
|
startAdornment = value.map((option, index) => {
|
|
@@ -646,59 +663,45 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
646
663
|
inputValue
|
|
647
664
|
}, ownerState);
|
|
648
665
|
};
|
|
649
|
-
const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
|
|
650
|
-
const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
|
|
651
666
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
652
|
-
children: [/*#__PURE__*/_jsx(
|
|
653
|
-
|
|
654
|
-
className: clsx(classes.root, className),
|
|
655
|
-
ownerState: ownerState,
|
|
656
|
-
...getRootProps(other),
|
|
667
|
+
children: [/*#__PURE__*/_jsx(RootSlot, {
|
|
668
|
+
...rootProps,
|
|
657
669
|
children: renderInput({
|
|
658
670
|
id,
|
|
659
671
|
disabled,
|
|
660
672
|
fullWidth: props.fullWidth ?? true,
|
|
661
673
|
size: size === 'small' ? 'small' : undefined,
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
children: [hasClearIcon ? /*#__PURE__*/_jsx(AutocompleteClearIndicator, {
|
|
677
|
-
...getClearProps(),
|
|
678
|
-
"aria-label": clearText,
|
|
679
|
-
title: clearText,
|
|
680
|
-
ownerState: ownerState,
|
|
681
|
-
...clearIndicatorSlotProps,
|
|
682
|
-
className: clsx(classes.clearIndicator, clearIndicatorSlotProps?.className),
|
|
683
|
-
children: clearIcon
|
|
684
|
-
}) : null, hasPopupIcon ? /*#__PURE__*/_jsx(AutocompletePopupIndicator, {
|
|
685
|
-
...getPopupIndicatorProps(),
|
|
686
|
-
disabled: disabled,
|
|
687
|
-
"aria-label": popupOpen ? closeText : openText,
|
|
688
|
-
title: popupOpen ? closeText : openText,
|
|
674
|
+
slotProps: {
|
|
675
|
+
inputLabel: getInputLabelProps(),
|
|
676
|
+
input: {
|
|
677
|
+
ref: setAnchorEl,
|
|
678
|
+
className: classes.inputRoot,
|
|
679
|
+
startAdornment,
|
|
680
|
+
onMouseDown: event => {
|
|
681
|
+
if (event.target === event.currentTarget) {
|
|
682
|
+
handleInputMouseDown(event);
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
...((hasClearIcon || hasPopupIcon) && {
|
|
686
|
+
endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
|
|
687
|
+
className: classes.endAdornment,
|
|
689
688
|
ownerState: ownerState,
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
689
|
+
children: [hasClearIcon ? /*#__PURE__*/_jsx(ClearIndicatorSlot, {
|
|
690
|
+
...clearIndicatorProps,
|
|
691
|
+
children: clearIcon
|
|
692
|
+
}) : null, hasPopupIcon ? /*#__PURE__*/_jsx(PopupIndicatorSlot, {
|
|
693
|
+
...popupIndicatorProps,
|
|
694
|
+
children: popupIcon
|
|
695
|
+
}) : null]
|
|
696
|
+
})
|
|
694
697
|
})
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
698
|
+
},
|
|
699
|
+
htmlInput: {
|
|
700
|
+
className: classes.input,
|
|
701
|
+
disabled,
|
|
702
|
+
readOnly,
|
|
703
|
+
...getInputProps()
|
|
704
|
+
}
|
|
702
705
|
}
|
|
703
706
|
})
|
|
704
707
|
}), anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
|
|
@@ -721,7 +724,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
721
724
|
},
|
|
722
725
|
children: noOptionsText
|
|
723
726
|
}) : null, groupedOptions.length > 0 ? /*#__PURE__*/_jsx(ListboxSlot, {
|
|
724
|
-
as: ListboxComponentProp,
|
|
725
727
|
...listboxProps,
|
|
726
728
|
children: groupedOptions.map((option, index) => {
|
|
727
729
|
if (groupBy) {
|
|
@@ -775,11 +777,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
775
777
|
* @default false
|
|
776
778
|
*/
|
|
777
779
|
blurOnSelect: PropTypes.oneOfType([PropTypes.oneOf(['mouse', 'touch']), PropTypes.bool]),
|
|
778
|
-
/**
|
|
779
|
-
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
780
|
-
* @deprecated Use `slotProps.chip` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
781
|
-
*/
|
|
782
|
-
ChipProps: PropTypes.object,
|
|
783
780
|
/**
|
|
784
781
|
* Override or extend the styles applied to the component.
|
|
785
782
|
*/
|
|
@@ -820,16 +817,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
820
817
|
* @default 'Close'
|
|
821
818
|
*/
|
|
822
819
|
closeText: PropTypes.string,
|
|
823
|
-
/**
|
|
824
|
-
* The props used for each slot inside.
|
|
825
|
-
* @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
826
|
-
*/
|
|
827
|
-
componentsProps: PropTypes.shape({
|
|
828
|
-
clearIndicator: PropTypes.object,
|
|
829
|
-
paper: PropTypes.object,
|
|
830
|
-
popper: PropTypes.object,
|
|
831
|
-
popupIndicator: PropTypes.object
|
|
832
|
-
}),
|
|
833
820
|
/**
|
|
834
821
|
* The default value. Use when the component is not controlled.
|
|
835
822
|
* @default props.multiple ? [] : null
|
|
@@ -978,17 +965,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
978
965
|
* @default -1
|
|
979
966
|
*/
|
|
980
967
|
limitTags: integerPropType,
|
|
981
|
-
/**
|
|
982
|
-
* The component used to render the listbox.
|
|
983
|
-
* @default 'ul'
|
|
984
|
-
* @deprecated Use `slotProps.listbox.component` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
985
|
-
*/
|
|
986
|
-
ListboxComponent: PropTypes.elementType,
|
|
987
|
-
/**
|
|
988
|
-
* Props applied to the Listbox element.
|
|
989
|
-
* @deprecated Use `slotProps.listbox` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
990
|
-
*/
|
|
991
|
-
ListboxProps: PropTypes.object,
|
|
992
968
|
/**
|
|
993
969
|
* If `true`, the component is in a loading state.
|
|
994
970
|
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
@@ -1078,18 +1054,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1078
1054
|
* A list of options that will be shown in the Autocomplete.
|
|
1079
1055
|
*/
|
|
1080
1056
|
options: PropTypes.array.isRequired,
|
|
1081
|
-
/**
|
|
1082
|
-
* The component used to render the body of the popup.
|
|
1083
|
-
* @default Paper
|
|
1084
|
-
* @deprecated Use `slots.paper` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1085
|
-
*/
|
|
1086
|
-
PaperComponent: PropTypes.elementType,
|
|
1087
|
-
/**
|
|
1088
|
-
* The component used to position the popup.
|
|
1089
|
-
* @default Popper
|
|
1090
|
-
* @deprecated Use `slots.popper` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1091
|
-
*/
|
|
1092
|
-
PopperComponent: PropTypes.elementType,
|
|
1093
1057
|
/**
|
|
1094
1058
|
* The icon to display in place of the default popup icon.
|
|
1095
1059
|
* @default <ArrowDropDownIcon />
|
|
@@ -1131,17 +1095,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1131
1095
|
* @returns {ReactNode}
|
|
1132
1096
|
*/
|
|
1133
1097
|
renderOption: PropTypes.func,
|
|
1134
|
-
/**
|
|
1135
|
-
* Render the selected value when doing multiple selections.
|
|
1136
|
-
*
|
|
1137
|
-
* @deprecated Use `renderValue` prop instead
|
|
1138
|
-
*
|
|
1139
|
-
* @param {Value[]} value The `value` provided to the component.
|
|
1140
|
-
* @param {function} getTagProps A tag props getter.
|
|
1141
|
-
* @param {object} ownerState The state of the Autocomplete component.
|
|
1142
|
-
* @returns {ReactNode}
|
|
1143
|
-
*/
|
|
1144
|
-
renderTags: PropTypes.func,
|
|
1145
1098
|
/**
|
|
1146
1099
|
* Renders the selected value(s) as rich content in the input for both single and multiple selections.
|
|
1147
1100
|
*
|
|
@@ -1172,16 +1125,20 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1172
1125
|
listbox: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
1173
1126
|
paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
1174
1127
|
popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
1175
|
-
popupIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
1128
|
+
popupIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
1129
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
1176
1130
|
}),
|
|
1177
1131
|
/**
|
|
1178
1132
|
* The components used for each slot inside.
|
|
1179
1133
|
* @default {}
|
|
1180
1134
|
*/
|
|
1181
1135
|
slots: PropTypes.shape({
|
|
1136
|
+
clearIndicator: PropTypes.elementType,
|
|
1182
1137
|
listbox: PropTypes.elementType,
|
|
1183
1138
|
paper: PropTypes.elementType,
|
|
1184
|
-
popper: PropTypes.elementType
|
|
1139
|
+
popper: PropTypes.elementType,
|
|
1140
|
+
popupIndicator: PropTypes.elementType,
|
|
1141
|
+
root: PropTypes.elementType
|
|
1185
1142
|
}),
|
|
1186
1143
|
/**
|
|
1187
1144
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
package/Avatar/Avatar.d.mts
CHANGED
|
@@ -59,14 +59,6 @@ export interface AvatarOwnProps {
|
|
|
59
59
|
* Override or extend the styles applied to the component.
|
|
60
60
|
*/
|
|
61
61
|
classes?: Partial<AvatarClasses> | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
64
|
-
* It can be used to listen for the loading error event.
|
|
65
|
-
* @deprecated Use `slotProps.img` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
66
|
-
*/
|
|
67
|
-
imgProps?: (React.ImgHTMLAttributes<HTMLImageElement> & {
|
|
68
|
-
sx?: SxProps<Theme> | undefined;
|
|
69
|
-
}) | undefined;
|
|
70
62
|
/**
|
|
71
63
|
* The `sizes` attribute for the `img` element.
|
|
72
64
|
*/
|
package/Avatar/Avatar.d.ts
CHANGED
|
@@ -59,14 +59,6 @@ export interface AvatarOwnProps {
|
|
|
59
59
|
* Override or extend the styles applied to the component.
|
|
60
60
|
*/
|
|
61
61
|
classes?: Partial<AvatarClasses> | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
64
|
-
* It can be used to listen for the loading error event.
|
|
65
|
-
* @deprecated Use `slotProps.img` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
66
|
-
*/
|
|
67
|
-
imgProps?: (React.ImgHTMLAttributes<HTMLImageElement> & {
|
|
68
|
-
sx?: SxProps<Theme> | undefined;
|
|
69
|
-
}) | undefined;
|
|
70
62
|
/**
|
|
71
63
|
* The `sizes` attribute for the `img` element.
|
|
72
64
|
*/
|
package/Avatar/Avatar.js
CHANGED
|
@@ -108,12 +108,7 @@ const AvatarFallback = (0, _zeroStyled.styled)(_Person.default, {
|
|
|
108
108
|
width: '75%',
|
|
109
109
|
height: '75%'
|
|
110
110
|
});
|
|
111
|
-
function useLoaded({
|
|
112
|
-
crossOrigin,
|
|
113
|
-
referrerPolicy,
|
|
114
|
-
src,
|
|
115
|
-
srcSet
|
|
116
|
-
}) {
|
|
111
|
+
function useLoaded(src, srcSet, crossOrigin, referrerPolicy) {
|
|
117
112
|
const [loaded, setLoaded] = React.useState(false);
|
|
118
113
|
React.useEffect(() => {
|
|
119
114
|
if (!src && !srcSet) {
|
|
@@ -158,7 +153,6 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
158
153
|
component = 'div',
|
|
159
154
|
slots = {},
|
|
160
155
|
slotProps = {},
|
|
161
|
-
imgProps,
|
|
162
156
|
sizes,
|
|
163
157
|
src,
|
|
164
158
|
srcSet,
|
|
@@ -171,27 +165,28 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
171
165
|
component,
|
|
172
166
|
variant
|
|
173
167
|
};
|
|
174
|
-
|
|
168
|
+
const {
|
|
169
|
+
crossOrigin,
|
|
170
|
+
referrerPolicy
|
|
171
|
+
} = (typeof slotProps.img === 'function' ? slotProps.img(ownerState) : slotProps.img) ?? {};
|
|
175
172
|
// Use a hook instead of onError on the img element to support server-side rendering.
|
|
176
|
-
const loaded = useLoaded(
|
|
177
|
-
...imgProps,
|
|
178
|
-
...(typeof slotProps.img === 'function' ? slotProps.img(ownerState) : slotProps.img),
|
|
179
|
-
src,
|
|
180
|
-
srcSet
|
|
181
|
-
});
|
|
173
|
+
const loaded = useLoaded(src, srcSet, crossOrigin, referrerPolicy);
|
|
182
174
|
const hasImg = src || srcSet;
|
|
183
175
|
const hasImgNotFailing = hasImg && loaded !== 'error';
|
|
184
176
|
ownerState.colorDefault = !hasImgNotFailing;
|
|
185
177
|
// This issue explains why this is required: https://github.com/mui/material-ui/issues/42184
|
|
186
178
|
delete ownerState.ownerState;
|
|
187
179
|
const classes = useUtilityClasses(ownerState);
|
|
180
|
+
const externalForwardedProps = {
|
|
181
|
+
slots,
|
|
182
|
+
slotProps
|
|
183
|
+
};
|
|
188
184
|
const [RootSlot, rootSlotProps] = (0, _useSlot.default)('root', {
|
|
189
185
|
ref,
|
|
190
186
|
className: (0, _clsx.default)(classes.root, className),
|
|
191
187
|
elementType: AvatarRoot,
|
|
192
188
|
externalForwardedProps: {
|
|
193
|
-
|
|
194
|
-
slotProps,
|
|
189
|
+
...externalForwardedProps,
|
|
195
190
|
component,
|
|
196
191
|
...other
|
|
197
192
|
},
|
|
@@ -200,15 +195,7 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
200
195
|
const [ImgSlot, imgSlotProps] = (0, _useSlot.default)('img', {
|
|
201
196
|
className: classes.img,
|
|
202
197
|
elementType: AvatarImg,
|
|
203
|
-
externalForwardedProps
|
|
204
|
-
slots,
|
|
205
|
-
slotProps: {
|
|
206
|
-
img: {
|
|
207
|
-
...imgProps,
|
|
208
|
-
...slotProps.img
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
198
|
+
externalForwardedProps,
|
|
212
199
|
additionalProps: {
|
|
213
200
|
alt,
|
|
214
201
|
src,
|
|
@@ -220,10 +207,7 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
220
207
|
const [FallbackSlot, fallbackSlotProps] = (0, _useSlot.default)('fallback', {
|
|
221
208
|
className: classes.fallback,
|
|
222
209
|
elementType: AvatarFallback,
|
|
223
|
-
externalForwardedProps
|
|
224
|
-
slots,
|
|
225
|
-
slotProps
|
|
226
|
-
},
|
|
210
|
+
externalForwardedProps,
|
|
227
211
|
shouldForwardComponentProp: true,
|
|
228
212
|
ownerState
|
|
229
213
|
});
|
|
@@ -275,12 +259,6 @@ process.env.NODE_ENV !== "production" ? Avatar.propTypes /* remove-proptypes */
|
|
|
275
259
|
* Either a string to use a HTML element or a component.
|
|
276
260
|
*/
|
|
277
261
|
component: _propTypes.default.elementType,
|
|
278
|
-
/**
|
|
279
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
280
|
-
* It can be used to listen for the loading error event.
|
|
281
|
-
* @deprecated Use `slotProps.img` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
282
|
-
*/
|
|
283
|
-
imgProps: _propTypes.default.object,
|
|
284
262
|
/**
|
|
285
263
|
* The `sizes` attribute for the `img` element.
|
|
286
264
|
*/
|
package/Avatar/Avatar.mjs
CHANGED
|
@@ -101,12 +101,7 @@ const AvatarFallback = styled(Person, {
|
|
|
101
101
|
width: '75%',
|
|
102
102
|
height: '75%'
|
|
103
103
|
});
|
|
104
|
-
function useLoaded({
|
|
105
|
-
crossOrigin,
|
|
106
|
-
referrerPolicy,
|
|
107
|
-
src,
|
|
108
|
-
srcSet
|
|
109
|
-
}) {
|
|
104
|
+
function useLoaded(src, srcSet, crossOrigin, referrerPolicy) {
|
|
110
105
|
const [loaded, setLoaded] = React.useState(false);
|
|
111
106
|
React.useEffect(() => {
|
|
112
107
|
if (!src && !srcSet) {
|
|
@@ -151,7 +146,6 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
151
146
|
component = 'div',
|
|
152
147
|
slots = {},
|
|
153
148
|
slotProps = {},
|
|
154
|
-
imgProps,
|
|
155
149
|
sizes,
|
|
156
150
|
src,
|
|
157
151
|
srcSet,
|
|
@@ -164,27 +158,28 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
164
158
|
component,
|
|
165
159
|
variant
|
|
166
160
|
};
|
|
167
|
-
|
|
161
|
+
const {
|
|
162
|
+
crossOrigin,
|
|
163
|
+
referrerPolicy
|
|
164
|
+
} = (typeof slotProps.img === 'function' ? slotProps.img(ownerState) : slotProps.img) ?? {};
|
|
168
165
|
// Use a hook instead of onError on the img element to support server-side rendering.
|
|
169
|
-
const loaded = useLoaded(
|
|
170
|
-
...imgProps,
|
|
171
|
-
...(typeof slotProps.img === 'function' ? slotProps.img(ownerState) : slotProps.img),
|
|
172
|
-
src,
|
|
173
|
-
srcSet
|
|
174
|
-
});
|
|
166
|
+
const loaded = useLoaded(src, srcSet, crossOrigin, referrerPolicy);
|
|
175
167
|
const hasImg = src || srcSet;
|
|
176
168
|
const hasImgNotFailing = hasImg && loaded !== 'error';
|
|
177
169
|
ownerState.colorDefault = !hasImgNotFailing;
|
|
178
170
|
// This issue explains why this is required: https://github.com/mui/material-ui/issues/42184
|
|
179
171
|
delete ownerState.ownerState;
|
|
180
172
|
const classes = useUtilityClasses(ownerState);
|
|
173
|
+
const externalForwardedProps = {
|
|
174
|
+
slots,
|
|
175
|
+
slotProps
|
|
176
|
+
};
|
|
181
177
|
const [RootSlot, rootSlotProps] = useSlot('root', {
|
|
182
178
|
ref,
|
|
183
179
|
className: clsx(classes.root, className),
|
|
184
180
|
elementType: AvatarRoot,
|
|
185
181
|
externalForwardedProps: {
|
|
186
|
-
|
|
187
|
-
slotProps,
|
|
182
|
+
...externalForwardedProps,
|
|
188
183
|
component,
|
|
189
184
|
...other
|
|
190
185
|
},
|
|
@@ -193,15 +188,7 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
193
188
|
const [ImgSlot, imgSlotProps] = useSlot('img', {
|
|
194
189
|
className: classes.img,
|
|
195
190
|
elementType: AvatarImg,
|
|
196
|
-
externalForwardedProps
|
|
197
|
-
slots,
|
|
198
|
-
slotProps: {
|
|
199
|
-
img: {
|
|
200
|
-
...imgProps,
|
|
201
|
-
...slotProps.img
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
},
|
|
191
|
+
externalForwardedProps,
|
|
205
192
|
additionalProps: {
|
|
206
193
|
alt,
|
|
207
194
|
src,
|
|
@@ -213,10 +200,7 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
213
200
|
const [FallbackSlot, fallbackSlotProps] = useSlot('fallback', {
|
|
214
201
|
className: classes.fallback,
|
|
215
202
|
elementType: AvatarFallback,
|
|
216
|
-
externalForwardedProps
|
|
217
|
-
slots,
|
|
218
|
-
slotProps
|
|
219
|
-
},
|
|
203
|
+
externalForwardedProps,
|
|
220
204
|
shouldForwardComponentProp: true,
|
|
221
205
|
ownerState
|
|
222
206
|
});
|
|
@@ -268,12 +252,6 @@ process.env.NODE_ENV !== "production" ? Avatar.propTypes /* remove-proptypes */
|
|
|
268
252
|
* Either a string to use a HTML element or a component.
|
|
269
253
|
*/
|
|
270
254
|
component: PropTypes.elementType,
|
|
271
|
-
/**
|
|
272
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
273
|
-
* It can be used to listen for the loading error event.
|
|
274
|
-
* @deprecated Use `slotProps.img` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
275
|
-
*/
|
|
276
|
-
imgProps: PropTypes.object,
|
|
277
255
|
/**
|
|
278
256
|
* The `sizes` attribute for the `img` element.
|
|
279
257
|
*/
|
|
@@ -11,10 +11,6 @@ export interface AvatarGroupSlots {
|
|
|
11
11
|
surplus: React.ElementType;
|
|
12
12
|
}
|
|
13
13
|
export type AvatarGroupSlotsAndSlotProps = CreateSlotsAndSlotProps<AvatarGroupSlots, {
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated use `slotProps.surplus` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
16
|
-
* */
|
|
17
|
-
additionalAvatar: React.ComponentPropsWithRef<typeof Avatar> & AvatarGroupComponentsPropsOverrides;
|
|
18
14
|
surplus: SlotProps<React.ElementType<React.ComponentPropsWithRef<typeof Avatar>>, AvatarGroupComponentsPropsOverrides, AvatarGroupOwnerState>;
|
|
19
15
|
}>;
|
|
20
16
|
export interface AvatarGroupOwnProps extends AvatarGroupSlotsAndSlotProps {
|
|
@@ -31,17 +27,6 @@ export interface AvatarGroupOwnProps extends AvatarGroupSlotsAndSlotProps {
|
|
|
31
27
|
* Either a string to use a HTML element or a component.
|
|
32
28
|
*/
|
|
33
29
|
component?: React.ElementType | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* The extra props for the slot components.
|
|
36
|
-
* You can override the existing props or add new ones.
|
|
37
|
-
*
|
|
38
|
-
* This prop is an alias for the `slotProps` prop.
|
|
39
|
-
*
|
|
40
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
41
|
-
*/
|
|
42
|
-
componentsProps?: {
|
|
43
|
-
additionalAvatar?: (React.ComponentPropsWithRef<typeof Avatar> & AvatarGroupComponentsPropsOverrides) | undefined;
|
|
44
|
-
} | undefined;
|
|
45
30
|
/**
|
|
46
31
|
* Max avatars to show before +x.
|
|
47
32
|
* @default 5
|
|
@@ -11,10 +11,6 @@ export interface AvatarGroupSlots {
|
|
|
11
11
|
surplus: React.ElementType;
|
|
12
12
|
}
|
|
13
13
|
export type AvatarGroupSlotsAndSlotProps = CreateSlotsAndSlotProps<AvatarGroupSlots, {
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated use `slotProps.surplus` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
16
|
-
* */
|
|
17
|
-
additionalAvatar: React.ComponentPropsWithRef<typeof Avatar> & AvatarGroupComponentsPropsOverrides;
|
|
18
14
|
surplus: SlotProps<React.ElementType<React.ComponentPropsWithRef<typeof Avatar>>, AvatarGroupComponentsPropsOverrides, AvatarGroupOwnerState>;
|
|
19
15
|
}>;
|
|
20
16
|
export interface AvatarGroupOwnProps extends AvatarGroupSlotsAndSlotProps {
|
|
@@ -31,17 +27,6 @@ export interface AvatarGroupOwnProps extends AvatarGroupSlotsAndSlotProps {
|
|
|
31
27
|
* Either a string to use a HTML element or a component.
|
|
32
28
|
*/
|
|
33
29
|
component?: React.ElementType | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* The extra props for the slot components.
|
|
36
|
-
* You can override the existing props or add new ones.
|
|
37
|
-
*
|
|
38
|
-
* This prop is an alias for the `slotProps` prop.
|
|
39
|
-
*
|
|
40
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
41
|
-
*/
|
|
42
|
-
componentsProps?: {
|
|
43
|
-
additionalAvatar?: (React.ComponentPropsWithRef<typeof Avatar> & AvatarGroupComponentsPropsOverrides) | undefined;
|
|
44
|
-
} | undefined;
|
|
45
30
|
/**
|
|
46
31
|
* Max avatars to show before +x.
|
|
47
32
|
* @default 5
|
|
@@ -65,7 +65,6 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
65
65
|
children: childrenProp,
|
|
66
66
|
className,
|
|
67
67
|
component = 'div',
|
|
68
|
-
componentsProps,
|
|
69
68
|
max = 5,
|
|
70
69
|
renderSurplus,
|
|
71
70
|
slotProps = {},
|
|
@@ -110,11 +109,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
110
109
|
}
|
|
111
110
|
const externalForwardedProps = {
|
|
112
111
|
slots,
|
|
113
|
-
slotProps
|
|
114
|
-
surplus: slotProps.additionalAvatar ?? componentsProps?.additionalAvatar,
|
|
115
|
-
...componentsProps,
|
|
116
|
-
...slotProps
|
|
117
|
-
}
|
|
112
|
+
slotProps
|
|
118
113
|
};
|
|
119
114
|
const [SurplusSlot, surplusProps] = (0, _useSlot.default)('surplus', {
|
|
120
115
|
elementType: _Avatar.default,
|
|
@@ -169,17 +164,6 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes /* remove-proptype
|
|
|
169
164
|
* Either a string to use a HTML element or a component.
|
|
170
165
|
*/
|
|
171
166
|
component: _propTypes.default.elementType,
|
|
172
|
-
/**
|
|
173
|
-
* The extra props for the slot components.
|
|
174
|
-
* You can override the existing props or add new ones.
|
|
175
|
-
*
|
|
176
|
-
* This prop is an alias for the `slotProps` prop.
|
|
177
|
-
*
|
|
178
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
179
|
-
*/
|
|
180
|
-
componentsProps: _propTypes.default.shape({
|
|
181
|
-
additionalAvatar: _propTypes.default.object
|
|
182
|
-
}),
|
|
183
167
|
/**
|
|
184
168
|
* Max avatars to show before +x.
|
|
185
169
|
* @default 5
|
|
@@ -201,7 +185,6 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes /* remove-proptype
|
|
|
201
185
|
* @default {}
|
|
202
186
|
*/
|
|
203
187
|
slotProps: _propTypes.default.shape({
|
|
204
|
-
additionalAvatar: _propTypes.default.object,
|
|
205
188
|
surplus: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
206
189
|
}),
|
|
207
190
|
/**
|