@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
|
@@ -71,18 +71,35 @@ export interface AutocompleteRenderInputParams {
|
|
|
71
71
|
disabled: boolean;
|
|
72
72
|
fullWidth: boolean;
|
|
73
73
|
size: 'small' | undefined;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
slotProps: {
|
|
75
|
+
inputLabel: ReturnType<ReturnType<typeof useAutocomplete>['getInputLabelProps']>;
|
|
76
|
+
input: {
|
|
77
|
+
ref: React.Ref<any>;
|
|
78
|
+
className: string;
|
|
79
|
+
startAdornment: React.ReactNode;
|
|
80
|
+
endAdornment: React.ReactNode;
|
|
81
|
+
onMouseDown: React.MouseEventHandler;
|
|
82
|
+
};
|
|
83
|
+
htmlInput: ReturnType<ReturnType<typeof useAutocomplete>['getInputProps']>;
|
|
81
84
|
};
|
|
82
|
-
inputProps: ReturnType<ReturnType<typeof useAutocomplete>['getInputProps']>;
|
|
83
85
|
}
|
|
84
86
|
export interface AutocompletePropsSizeOverrides {}
|
|
85
87
|
export interface AutocompleteSlots {
|
|
88
|
+
/**
|
|
89
|
+
* The component that renders the root.
|
|
90
|
+
* @default 'div'
|
|
91
|
+
*/
|
|
92
|
+
root: React.ElementType;
|
|
93
|
+
/**
|
|
94
|
+
* The component used to render the clear indicator element.
|
|
95
|
+
* @default IconButton
|
|
96
|
+
*/
|
|
97
|
+
clearIndicator: React.JSXElementConstructor<IconButtonProps>;
|
|
98
|
+
/**
|
|
99
|
+
* The component used to render the popup indicator element.
|
|
100
|
+
* @default IconButton
|
|
101
|
+
*/
|
|
102
|
+
popupIndicator: React.JSXElementConstructor<IconButtonProps>;
|
|
86
103
|
/**
|
|
87
104
|
* The component used to render the listbox.
|
|
88
105
|
* @default 'ul'
|
|
@@ -100,6 +117,7 @@ export interface AutocompleteSlots {
|
|
|
100
117
|
popper: React.JSXElementConstructor<PopperProps & AutocompletePopperSlotPropsOverrides>;
|
|
101
118
|
}
|
|
102
119
|
export type AutocompleteSlotsAndSlotProps<Value, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']> = CreateSlotsAndSlotProps<AutocompleteSlots, {
|
|
120
|
+
root: SlotProps<'div', {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
103
121
|
chip: SlotProps<React.ElementType<Partial<ChipProps<ChipComponent>>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
104
122
|
clearIndicator: SlotProps<React.ElementType<Partial<IconButtonProps>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
105
123
|
/**
|
|
@@ -114,11 +132,6 @@ export type AutocompleteSlotsAndSlotProps<Value, Multiple extends boolean | unde
|
|
|
114
132
|
popupIndicator: SlotProps<React.ElementType<Partial<IconButtonProps>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
115
133
|
}>;
|
|
116
134
|
export interface AutocompleteProps<Value, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']> extends UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo>, StandardProps<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange' | 'children'>, AutocompleteSlotsAndSlotProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> {
|
|
117
|
-
/**
|
|
118
|
-
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
119
|
-
* @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.
|
|
120
|
-
*/
|
|
121
|
-
ChipProps?: ChipProps<ChipComponent> | undefined;
|
|
122
135
|
/**
|
|
123
136
|
* Override or extend the styles applied to the component.
|
|
124
137
|
*/
|
|
@@ -142,16 +155,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
142
155
|
* @default 'Close'
|
|
143
156
|
*/
|
|
144
157
|
closeText?: string | undefined;
|
|
145
|
-
/**
|
|
146
|
-
* The props used for each slot inside.
|
|
147
|
-
* @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.
|
|
148
|
-
*/
|
|
149
|
-
componentsProps?: {
|
|
150
|
-
clearIndicator?: Partial<IconButtonProps> | undefined;
|
|
151
|
-
paper?: PaperProps | undefined;
|
|
152
|
-
popper?: Partial<PopperProps> | undefined;
|
|
153
|
-
popupIndicator?: Partial<IconButtonProps> | undefined;
|
|
154
|
-
} | undefined;
|
|
155
158
|
/**
|
|
156
159
|
* If `true`, the component is disabled.
|
|
157
160
|
* @default false
|
|
@@ -180,20 +183,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
180
183
|
* @default (more) => `+${more}`
|
|
181
184
|
*/
|
|
182
185
|
getLimitTagsText?: ((more: number) => React.ReactNode) | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* The component used to render the listbox.
|
|
185
|
-
* @default 'ul'
|
|
186
|
-
* @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.
|
|
187
|
-
*/
|
|
188
|
-
ListboxComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
189
|
-
/**
|
|
190
|
-
* Props applied to the Listbox element.
|
|
191
|
-
* @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.
|
|
192
|
-
*/
|
|
193
|
-
ListboxProps?: (ReturnType<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
|
|
194
|
-
sx?: SxProps<Theme> | undefined;
|
|
195
|
-
ref?: React.Ref<Element> | undefined;
|
|
196
|
-
}) | undefined;
|
|
197
186
|
/**
|
|
198
187
|
* If `true`, the component is in a loading state.
|
|
199
188
|
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
@@ -230,18 +219,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
230
219
|
* @default 'Open'
|
|
231
220
|
*/
|
|
232
221
|
openText?: string | undefined;
|
|
233
|
-
/**
|
|
234
|
-
* The component used to render the body of the popup.
|
|
235
|
-
* @default Paper
|
|
236
|
-
* @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.
|
|
237
|
-
*/
|
|
238
|
-
PaperComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
239
|
-
/**
|
|
240
|
-
* The component used to position the popup.
|
|
241
|
-
* @default Popper
|
|
242
|
-
* @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.
|
|
243
|
-
*/
|
|
244
|
-
PopperComponent?: React.JSXElementConstructor<PopperProps> | undefined;
|
|
245
222
|
/**
|
|
246
223
|
* The icon to display in place of the default popup icon.
|
|
247
224
|
* @default <ArrowDropDownIcon />
|
|
@@ -285,17 +262,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
285
262
|
renderOption?: ((props: React.HTMLAttributes<HTMLLIElement> & {
|
|
286
263
|
key: React.Key;
|
|
287
264
|
}, option: Value, state: AutocompleteRenderOptionState, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
288
|
-
/**
|
|
289
|
-
* Render the selected value when doing multiple selections.
|
|
290
|
-
*
|
|
291
|
-
* @deprecated Use `renderValue` prop instead
|
|
292
|
-
*
|
|
293
|
-
* @param {Value[]} value The `value` provided to the component.
|
|
294
|
-
* @param {function} getTagProps A tag props getter.
|
|
295
|
-
* @param {object} ownerState The state of the Autocomplete component.
|
|
296
|
-
* @returns {ReactNode}
|
|
297
|
-
*/
|
|
298
|
-
renderTags?: ((value: Value[], getTagProps: AutocompleteRenderGetTagProps, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
299
265
|
/**
|
|
300
266
|
* Renders the selected value(s) as rich content in the input for both single and multiple selections.
|
|
301
267
|
*
|
|
@@ -71,18 +71,35 @@ export interface AutocompleteRenderInputParams {
|
|
|
71
71
|
disabled: boolean;
|
|
72
72
|
fullWidth: boolean;
|
|
73
73
|
size: 'small' | undefined;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
slotProps: {
|
|
75
|
+
inputLabel: ReturnType<ReturnType<typeof useAutocomplete>['getInputLabelProps']>;
|
|
76
|
+
input: {
|
|
77
|
+
ref: React.Ref<any>;
|
|
78
|
+
className: string;
|
|
79
|
+
startAdornment: React.ReactNode;
|
|
80
|
+
endAdornment: React.ReactNode;
|
|
81
|
+
onMouseDown: React.MouseEventHandler;
|
|
82
|
+
};
|
|
83
|
+
htmlInput: ReturnType<ReturnType<typeof useAutocomplete>['getInputProps']>;
|
|
81
84
|
};
|
|
82
|
-
inputProps: ReturnType<ReturnType<typeof useAutocomplete>['getInputProps']>;
|
|
83
85
|
}
|
|
84
86
|
export interface AutocompletePropsSizeOverrides {}
|
|
85
87
|
export interface AutocompleteSlots {
|
|
88
|
+
/**
|
|
89
|
+
* The component that renders the root.
|
|
90
|
+
* @default 'div'
|
|
91
|
+
*/
|
|
92
|
+
root: React.ElementType;
|
|
93
|
+
/**
|
|
94
|
+
* The component used to render the clear indicator element.
|
|
95
|
+
* @default IconButton
|
|
96
|
+
*/
|
|
97
|
+
clearIndicator: React.JSXElementConstructor<IconButtonProps>;
|
|
98
|
+
/**
|
|
99
|
+
* The component used to render the popup indicator element.
|
|
100
|
+
* @default IconButton
|
|
101
|
+
*/
|
|
102
|
+
popupIndicator: React.JSXElementConstructor<IconButtonProps>;
|
|
86
103
|
/**
|
|
87
104
|
* The component used to render the listbox.
|
|
88
105
|
* @default 'ul'
|
|
@@ -100,6 +117,7 @@ export interface AutocompleteSlots {
|
|
|
100
117
|
popper: React.JSXElementConstructor<PopperProps & AutocompletePopperSlotPropsOverrides>;
|
|
101
118
|
}
|
|
102
119
|
export type AutocompleteSlotsAndSlotProps<Value, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']> = CreateSlotsAndSlotProps<AutocompleteSlots, {
|
|
120
|
+
root: SlotProps<'div', {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
103
121
|
chip: SlotProps<React.ElementType<Partial<ChipProps<ChipComponent>>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
104
122
|
clearIndicator: SlotProps<React.ElementType<Partial<IconButtonProps>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
105
123
|
/**
|
|
@@ -114,11 +132,6 @@ export type AutocompleteSlotsAndSlotProps<Value, Multiple extends boolean | unde
|
|
|
114
132
|
popupIndicator: SlotProps<React.ElementType<Partial<IconButtonProps>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
115
133
|
}>;
|
|
116
134
|
export interface AutocompleteProps<Value, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']> extends UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo>, StandardProps<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange' | 'children'>, AutocompleteSlotsAndSlotProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> {
|
|
117
|
-
/**
|
|
118
|
-
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
119
|
-
* @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.
|
|
120
|
-
*/
|
|
121
|
-
ChipProps?: ChipProps<ChipComponent> | undefined;
|
|
122
135
|
/**
|
|
123
136
|
* Override or extend the styles applied to the component.
|
|
124
137
|
*/
|
|
@@ -142,16 +155,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
142
155
|
* @default 'Close'
|
|
143
156
|
*/
|
|
144
157
|
closeText?: string | undefined;
|
|
145
|
-
/**
|
|
146
|
-
* The props used for each slot inside.
|
|
147
|
-
* @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.
|
|
148
|
-
*/
|
|
149
|
-
componentsProps?: {
|
|
150
|
-
clearIndicator?: Partial<IconButtonProps> | undefined;
|
|
151
|
-
paper?: PaperProps | undefined;
|
|
152
|
-
popper?: Partial<PopperProps> | undefined;
|
|
153
|
-
popupIndicator?: Partial<IconButtonProps> | undefined;
|
|
154
|
-
} | undefined;
|
|
155
158
|
/**
|
|
156
159
|
* If `true`, the component is disabled.
|
|
157
160
|
* @default false
|
|
@@ -180,20 +183,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
180
183
|
* @default (more) => `+${more}`
|
|
181
184
|
*/
|
|
182
185
|
getLimitTagsText?: ((more: number) => React.ReactNode) | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* The component used to render the listbox.
|
|
185
|
-
* @default 'ul'
|
|
186
|
-
* @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.
|
|
187
|
-
*/
|
|
188
|
-
ListboxComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
189
|
-
/**
|
|
190
|
-
* Props applied to the Listbox element.
|
|
191
|
-
* @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.
|
|
192
|
-
*/
|
|
193
|
-
ListboxProps?: (ReturnType<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
|
|
194
|
-
sx?: SxProps<Theme> | undefined;
|
|
195
|
-
ref?: React.Ref<Element> | undefined;
|
|
196
|
-
}) | undefined;
|
|
197
186
|
/**
|
|
198
187
|
* If `true`, the component is in a loading state.
|
|
199
188
|
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
@@ -230,18 +219,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
230
219
|
* @default 'Open'
|
|
231
220
|
*/
|
|
232
221
|
openText?: string | undefined;
|
|
233
|
-
/**
|
|
234
|
-
* The component used to render the body of the popup.
|
|
235
|
-
* @default Paper
|
|
236
|
-
* @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.
|
|
237
|
-
*/
|
|
238
|
-
PaperComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
239
|
-
/**
|
|
240
|
-
* The component used to position the popup.
|
|
241
|
-
* @default Popper
|
|
242
|
-
* @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.
|
|
243
|
-
*/
|
|
244
|
-
PopperComponent?: React.JSXElementConstructor<PopperProps> | undefined;
|
|
245
222
|
/**
|
|
246
223
|
* The icon to display in place of the default popup icon.
|
|
247
224
|
* @default <ArrowDropDownIcon />
|
|
@@ -285,17 +262,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
285
262
|
renderOption?: ((props: React.HTMLAttributes<HTMLLIElement> & {
|
|
286
263
|
key: React.Key;
|
|
287
264
|
}, option: Value, state: AutocompleteRenderOptionState, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
288
|
-
/**
|
|
289
|
-
* Render the selected value when doing multiple selections.
|
|
290
|
-
*
|
|
291
|
-
* @deprecated Use `renderValue` prop instead
|
|
292
|
-
*
|
|
293
|
-
* @param {Value[]} value The `value` provided to the component.
|
|
294
|
-
* @param {function} getTagProps A tag props getter.
|
|
295
|
-
* @param {object} ownerState The state of the Autocomplete component.
|
|
296
|
-
* @returns {ReactNode}
|
|
297
|
-
*/
|
|
298
|
-
renderTags?: ((value: Value[], getTagProps: AutocompleteRenderGetTagProps, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
299
265
|
/**
|
|
300
266
|
* Renders the selected value(s) as rich content in the input for both single and multiple selections.
|
|
301
267
|
*
|
|
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "createFilterOptions", {
|
|
|
15
15
|
exports.default = void 0;
|
|
16
16
|
var React = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
18
|
var _integerPropType = _interopRequireDefault(require("@mui/utils/integerPropType"));
|
|
20
19
|
var _chainPropTypes = _interopRequireDefault(require("@mui/utils/chainPropTypes"));
|
|
21
20
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
@@ -418,7 +417,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
418
417
|
autoHighlight = false,
|
|
419
418
|
autoSelect = false,
|
|
420
419
|
blurOnSelect = false,
|
|
421
|
-
ChipProps: ChipPropsProp,
|
|
422
420
|
className,
|
|
423
421
|
clearIcon = _ClearIcon || (_ClearIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Close.default, {
|
|
424
422
|
fontSize: "small"
|
|
@@ -427,7 +425,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
427
425
|
clearOnEscape = false,
|
|
428
426
|
clearText = 'Clear',
|
|
429
427
|
closeText = 'Close',
|
|
430
|
-
componentsProps,
|
|
431
428
|
defaultValue = props.multiple ? [] : null,
|
|
432
429
|
disableClearable = false,
|
|
433
430
|
disableCloseOnSelect = false,
|
|
@@ -451,8 +448,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
451
448
|
includeInputInList = false,
|
|
452
449
|
inputValue: inputValueProp,
|
|
453
450
|
limitTags = -1,
|
|
454
|
-
ListboxComponent: ListboxComponentProp,
|
|
455
|
-
ListboxProps: ListboxPropsProp,
|
|
456
451
|
loading = false,
|
|
457
452
|
loadingText = 'Loading…',
|
|
458
453
|
multiple = false,
|
|
@@ -466,14 +461,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
466
461
|
openOnFocus = false,
|
|
467
462
|
openText = 'Open',
|
|
468
463
|
options,
|
|
469
|
-
PaperComponent: PaperComponentProp,
|
|
470
|
-
PopperComponent: PopperComponentProp,
|
|
471
464
|
popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowDropDown.default, {})),
|
|
472
465
|
readOnly = false,
|
|
473
466
|
renderGroup: renderGroupProp,
|
|
474
467
|
renderInput,
|
|
475
468
|
renderOption: renderOptionProp,
|
|
476
|
-
renderTags,
|
|
477
469
|
renderValue,
|
|
478
470
|
selectOnFocus = !props.freeSolo,
|
|
479
471
|
size = 'medium',
|
|
@@ -536,18 +528,20 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
536
528
|
};
|
|
537
529
|
const classes = useUtilityClasses(ownerState);
|
|
538
530
|
const externalForwardedProps = {
|
|
539
|
-
slots
|
|
540
|
-
|
|
541
|
-
popper: PopperComponentProp,
|
|
542
|
-
...slots
|
|
543
|
-
},
|
|
544
|
-
slotProps: {
|
|
545
|
-
chip: ChipPropsProp,
|
|
546
|
-
listbox: ListboxPropsProp,
|
|
547
|
-
...componentsProps,
|
|
548
|
-
...slotProps
|
|
549
|
-
}
|
|
531
|
+
slots,
|
|
532
|
+
slotProps
|
|
550
533
|
};
|
|
534
|
+
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
|
535
|
+
ref,
|
|
536
|
+
className: [classes.root, className],
|
|
537
|
+
elementType: AutocompleteRoot,
|
|
538
|
+
externalForwardedProps: {
|
|
539
|
+
...externalForwardedProps,
|
|
540
|
+
...other
|
|
541
|
+
},
|
|
542
|
+
getSlotProps: getRootProps,
|
|
543
|
+
ownerState
|
|
544
|
+
});
|
|
551
545
|
const [ListboxSlot, listboxProps] = (0, _useSlot.default)('listbox', {
|
|
552
546
|
elementType: AutocompleteListbox,
|
|
553
547
|
externalForwardedProps,
|
|
@@ -577,6 +571,31 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
577
571
|
open: popupOpen
|
|
578
572
|
}
|
|
579
573
|
});
|
|
574
|
+
const [ClearIndicatorSlot, clearIndicatorProps] = (0, _useSlot.default)('clearIndicator', {
|
|
575
|
+
elementType: AutocompleteClearIndicator,
|
|
576
|
+
externalForwardedProps,
|
|
577
|
+
ownerState,
|
|
578
|
+
className: classes.clearIndicator,
|
|
579
|
+
shouldForwardComponentProp: true,
|
|
580
|
+
additionalProps: {
|
|
581
|
+
...getClearProps(),
|
|
582
|
+
'aria-label': clearText,
|
|
583
|
+
title: clearText
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
const [PopupIndicatorSlot, popupIndicatorProps] = (0, _useSlot.default)('popupIndicator', {
|
|
587
|
+
elementType: AutocompletePopupIndicator,
|
|
588
|
+
externalForwardedProps,
|
|
589
|
+
ownerState,
|
|
590
|
+
className: classes.popupIndicator,
|
|
591
|
+
shouldForwardComponentProp: true,
|
|
592
|
+
additionalProps: {
|
|
593
|
+
...getPopupIndicatorProps(),
|
|
594
|
+
disabled,
|
|
595
|
+
'aria-label': popupOpen ? closeText : openText,
|
|
596
|
+
title: popupOpen ? closeText : openText
|
|
597
|
+
}
|
|
598
|
+
});
|
|
580
599
|
let startAdornment;
|
|
581
600
|
const getCustomizedItemProps = params => ({
|
|
582
601
|
className: classes.tag,
|
|
@@ -585,9 +604,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
585
604
|
});
|
|
586
605
|
if (multiple) {
|
|
587
606
|
if (value.length > 0) {
|
|
588
|
-
if (
|
|
589
|
-
startAdornment = renderTags(value, getCustomizedItemProps, ownerState);
|
|
590
|
-
} else if (renderValue) {
|
|
607
|
+
if (renderValue) {
|
|
591
608
|
startAdornment = renderValue(value, getCustomizedItemProps, ownerState);
|
|
592
609
|
} else {
|
|
593
610
|
startAdornment = value.map((option, index) => {
|
|
@@ -658,59 +675,45 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
658
675
|
inputValue
|
|
659
676
|
}, ownerState);
|
|
660
677
|
};
|
|
661
|
-
const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
|
|
662
|
-
const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
|
|
663
678
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
664
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
665
|
-
|
|
666
|
-
className: (0, _clsx.default)(classes.root, className),
|
|
667
|
-
ownerState: ownerState,
|
|
668
|
-
...getRootProps(other),
|
|
679
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RootSlot, {
|
|
680
|
+
...rootProps,
|
|
669
681
|
children: renderInput({
|
|
670
682
|
id,
|
|
671
683
|
disabled,
|
|
672
684
|
fullWidth: props.fullWidth ?? true,
|
|
673
685
|
size: size === 'small' ? 'small' : undefined,
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
children: [hasClearIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteClearIndicator, {
|
|
689
|
-
...getClearProps(),
|
|
690
|
-
"aria-label": clearText,
|
|
691
|
-
title: clearText,
|
|
692
|
-
ownerState: ownerState,
|
|
693
|
-
...clearIndicatorSlotProps,
|
|
694
|
-
className: (0, _clsx.default)(classes.clearIndicator, clearIndicatorSlotProps?.className),
|
|
695
|
-
children: clearIcon
|
|
696
|
-
}) : null, hasPopupIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopupIndicator, {
|
|
697
|
-
...getPopupIndicatorProps(),
|
|
698
|
-
disabled: disabled,
|
|
699
|
-
"aria-label": popupOpen ? closeText : openText,
|
|
700
|
-
title: popupOpen ? closeText : openText,
|
|
686
|
+
slotProps: {
|
|
687
|
+
inputLabel: getInputLabelProps(),
|
|
688
|
+
input: {
|
|
689
|
+
ref: setAnchorEl,
|
|
690
|
+
className: classes.inputRoot,
|
|
691
|
+
startAdornment,
|
|
692
|
+
onMouseDown: event => {
|
|
693
|
+
if (event.target === event.currentTarget) {
|
|
694
|
+
handleInputMouseDown(event);
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
...((hasClearIcon || hasPopupIcon) && {
|
|
698
|
+
endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsxs)(AutocompleteEndAdornment, {
|
|
699
|
+
className: classes.endAdornment,
|
|
701
700
|
ownerState: ownerState,
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
701
|
+
children: [hasClearIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ClearIndicatorSlot, {
|
|
702
|
+
...clearIndicatorProps,
|
|
703
|
+
children: clearIcon
|
|
704
|
+
}) : null, hasPopupIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(PopupIndicatorSlot, {
|
|
705
|
+
...popupIndicatorProps,
|
|
706
|
+
children: popupIcon
|
|
707
|
+
}) : null]
|
|
708
|
+
})
|
|
706
709
|
})
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
710
|
+
},
|
|
711
|
+
htmlInput: {
|
|
712
|
+
className: classes.input,
|
|
713
|
+
disabled,
|
|
714
|
+
readOnly,
|
|
715
|
+
...getInputProps()
|
|
716
|
+
}
|
|
714
717
|
}
|
|
715
718
|
})
|
|
716
719
|
}), anchorEl ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopper, {
|
|
@@ -733,7 +736,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
733
736
|
},
|
|
734
737
|
children: noOptionsText
|
|
735
738
|
}) : null, groupedOptions.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ListboxSlot, {
|
|
736
|
-
as: ListboxComponentProp,
|
|
737
739
|
...listboxProps,
|
|
738
740
|
children: groupedOptions.map((option, index) => {
|
|
739
741
|
if (groupBy) {
|
|
@@ -787,11 +789,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
787
789
|
* @default false
|
|
788
790
|
*/
|
|
789
791
|
blurOnSelect: _propTypes.default.oneOfType([_propTypes.default.oneOf(['mouse', 'touch']), _propTypes.default.bool]),
|
|
790
|
-
/**
|
|
791
|
-
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
792
|
-
* @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.
|
|
793
|
-
*/
|
|
794
|
-
ChipProps: _propTypes.default.object,
|
|
795
792
|
/**
|
|
796
793
|
* Override or extend the styles applied to the component.
|
|
797
794
|
*/
|
|
@@ -832,16 +829,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
832
829
|
* @default 'Close'
|
|
833
830
|
*/
|
|
834
831
|
closeText: _propTypes.default.string,
|
|
835
|
-
/**
|
|
836
|
-
* The props used for each slot inside.
|
|
837
|
-
* @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.
|
|
838
|
-
*/
|
|
839
|
-
componentsProps: _propTypes.default.shape({
|
|
840
|
-
clearIndicator: _propTypes.default.object,
|
|
841
|
-
paper: _propTypes.default.object,
|
|
842
|
-
popper: _propTypes.default.object,
|
|
843
|
-
popupIndicator: _propTypes.default.object
|
|
844
|
-
}),
|
|
845
832
|
/**
|
|
846
833
|
* The default value. Use when the component is not controlled.
|
|
847
834
|
* @default props.multiple ? [] : null
|
|
@@ -990,17 +977,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
990
977
|
* @default -1
|
|
991
978
|
*/
|
|
992
979
|
limitTags: _integerPropType.default,
|
|
993
|
-
/**
|
|
994
|
-
* The component used to render the listbox.
|
|
995
|
-
* @default 'ul'
|
|
996
|
-
* @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.
|
|
997
|
-
*/
|
|
998
|
-
ListboxComponent: _propTypes.default.elementType,
|
|
999
|
-
/**
|
|
1000
|
-
* Props applied to the Listbox element.
|
|
1001
|
-
* @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.
|
|
1002
|
-
*/
|
|
1003
|
-
ListboxProps: _propTypes.default.object,
|
|
1004
980
|
/**
|
|
1005
981
|
* If `true`, the component is in a loading state.
|
|
1006
982
|
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
@@ -1090,18 +1066,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1090
1066
|
* A list of options that will be shown in the Autocomplete.
|
|
1091
1067
|
*/
|
|
1092
1068
|
options: _propTypes.default.array.isRequired,
|
|
1093
|
-
/**
|
|
1094
|
-
* The component used to render the body of the popup.
|
|
1095
|
-
* @default Paper
|
|
1096
|
-
* @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.
|
|
1097
|
-
*/
|
|
1098
|
-
PaperComponent: _propTypes.default.elementType,
|
|
1099
|
-
/**
|
|
1100
|
-
* The component used to position the popup.
|
|
1101
|
-
* @default Popper
|
|
1102
|
-
* @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.
|
|
1103
|
-
*/
|
|
1104
|
-
PopperComponent: _propTypes.default.elementType,
|
|
1105
1069
|
/**
|
|
1106
1070
|
* The icon to display in place of the default popup icon.
|
|
1107
1071
|
* @default <ArrowDropDownIcon />
|
|
@@ -1143,17 +1107,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1143
1107
|
* @returns {ReactNode}
|
|
1144
1108
|
*/
|
|
1145
1109
|
renderOption: _propTypes.default.func,
|
|
1146
|
-
/**
|
|
1147
|
-
* Render the selected value when doing multiple selections.
|
|
1148
|
-
*
|
|
1149
|
-
* @deprecated Use `renderValue` prop instead
|
|
1150
|
-
*
|
|
1151
|
-
* @param {Value[]} value The `value` provided to the component.
|
|
1152
|
-
* @param {function} getTagProps A tag props getter.
|
|
1153
|
-
* @param {object} ownerState The state of the Autocomplete component.
|
|
1154
|
-
* @returns {ReactNode}
|
|
1155
|
-
*/
|
|
1156
|
-
renderTags: _propTypes.default.func,
|
|
1157
1110
|
/**
|
|
1158
1111
|
* Renders the selected value(s) as rich content in the input for both single and multiple selections.
|
|
1159
1112
|
*
|
|
@@ -1184,16 +1137,20 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1184
1137
|
listbox: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1185
1138
|
paper: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1186
1139
|
popper: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1187
|
-
popupIndicator: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
1140
|
+
popupIndicator: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1141
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
1188
1142
|
}),
|
|
1189
1143
|
/**
|
|
1190
1144
|
* The components used for each slot inside.
|
|
1191
1145
|
* @default {}
|
|
1192
1146
|
*/
|
|
1193
1147
|
slots: _propTypes.default.shape({
|
|
1148
|
+
clearIndicator: _propTypes.default.elementType,
|
|
1194
1149
|
listbox: _propTypes.default.elementType,
|
|
1195
1150
|
paper: _propTypes.default.elementType,
|
|
1196
|
-
popper: _propTypes.default.elementType
|
|
1151
|
+
popper: _propTypes.default.elementType,
|
|
1152
|
+
popupIndicator: _propTypes.default.elementType,
|
|
1153
|
+
root: _propTypes.default.elementType
|
|
1197
1154
|
}),
|
|
1198
1155
|
/**
|
|
1199
1156
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|