@mui/material 9.0.0-alpha.3 → 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 +10 -60
- package/Autocomplete/Autocomplete.d.ts +10 -60
- package/Autocomplete/Autocomplete.js +33 -99
- package/Autocomplete/Autocomplete.mjs +33 -99
- 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/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 +154 -0
- 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 +0 -6
- package/Divider/Divider.d.ts +0 -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/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 +2 -4
- package/MenuList/MenuList.mjs +2 -4
- 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/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/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 +8 -38
- package/Tabs/Tabs.mjs +8 -38
- 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 +0 -6
- package/Typography/Typography.d.ts +0 -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 +6 -20
- 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/useAutocomplete/useAutocomplete.d.mts +0 -12
- package/useAutocomplete/useAutocomplete.d.ts +0 -12
- package/useAutocomplete/useAutocomplete.js +29 -28
- package/useAutocomplete/useAutocomplete.mjs +29 -28
- 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,15 +71,17 @@ 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 {
|
|
@@ -130,11 +132,6 @@ export type AutocompleteSlotsAndSlotProps<Value, Multiple extends boolean | unde
|
|
|
130
132
|
popupIndicator: SlotProps<React.ElementType<Partial<IconButtonProps>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
131
133
|
}>;
|
|
132
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> {
|
|
133
|
-
/**
|
|
134
|
-
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
135
|
-
* @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.
|
|
136
|
-
*/
|
|
137
|
-
ChipProps?: ChipProps<ChipComponent> | undefined;
|
|
138
135
|
/**
|
|
139
136
|
* Override or extend the styles applied to the component.
|
|
140
137
|
*/
|
|
@@ -158,16 +155,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
158
155
|
* @default 'Close'
|
|
159
156
|
*/
|
|
160
157
|
closeText?: string | undefined;
|
|
161
|
-
/**
|
|
162
|
-
* The props used for each slot inside.
|
|
163
|
-
* @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.
|
|
164
|
-
*/
|
|
165
|
-
componentsProps?: {
|
|
166
|
-
clearIndicator?: Partial<IconButtonProps> | undefined;
|
|
167
|
-
paper?: PaperProps | undefined;
|
|
168
|
-
popper?: Partial<PopperProps> | undefined;
|
|
169
|
-
popupIndicator?: Partial<IconButtonProps> | undefined;
|
|
170
|
-
} | undefined;
|
|
171
158
|
/**
|
|
172
159
|
* If `true`, the component is disabled.
|
|
173
160
|
* @default false
|
|
@@ -196,20 +183,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
196
183
|
* @default (more) => `+${more}`
|
|
197
184
|
*/
|
|
198
185
|
getLimitTagsText?: ((more: number) => React.ReactNode) | undefined;
|
|
199
|
-
/**
|
|
200
|
-
* The component used to render the listbox.
|
|
201
|
-
* @default 'ul'
|
|
202
|
-
* @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.
|
|
203
|
-
*/
|
|
204
|
-
ListboxComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
205
|
-
/**
|
|
206
|
-
* Props applied to the Listbox element.
|
|
207
|
-
* @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.
|
|
208
|
-
*/
|
|
209
|
-
ListboxProps?: (ReturnType<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
|
|
210
|
-
sx?: SxProps<Theme> | undefined;
|
|
211
|
-
ref?: React.Ref<Element> | undefined;
|
|
212
|
-
}) | undefined;
|
|
213
186
|
/**
|
|
214
187
|
* If `true`, the component is in a loading state.
|
|
215
188
|
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
@@ -246,18 +219,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
246
219
|
* @default 'Open'
|
|
247
220
|
*/
|
|
248
221
|
openText?: string | undefined;
|
|
249
|
-
/**
|
|
250
|
-
* The component used to render the body of the popup.
|
|
251
|
-
* @default Paper
|
|
252
|
-
* @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.
|
|
253
|
-
*/
|
|
254
|
-
PaperComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
255
|
-
/**
|
|
256
|
-
* The component used to position the popup.
|
|
257
|
-
* @default Popper
|
|
258
|
-
* @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.
|
|
259
|
-
*/
|
|
260
|
-
PopperComponent?: React.JSXElementConstructor<PopperProps> | undefined;
|
|
261
222
|
/**
|
|
262
223
|
* The icon to display in place of the default popup icon.
|
|
263
224
|
* @default <ArrowDropDownIcon />
|
|
@@ -301,17 +262,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
301
262
|
renderOption?: ((props: React.HTMLAttributes<HTMLLIElement> & {
|
|
302
263
|
key: React.Key;
|
|
303
264
|
}, option: Value, state: AutocompleteRenderOptionState, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
304
|
-
/**
|
|
305
|
-
* Render the selected value when doing multiple selections.
|
|
306
|
-
*
|
|
307
|
-
* @deprecated Use `renderValue` prop instead
|
|
308
|
-
*
|
|
309
|
-
* @param {Value[]} value The `value` provided to the component.
|
|
310
|
-
* @param {function} getTagProps A tag props getter.
|
|
311
|
-
* @param {object} ownerState The state of the Autocomplete component.
|
|
312
|
-
* @returns {ReactNode}
|
|
313
|
-
*/
|
|
314
|
-
renderTags?: ((value: Value[], getTagProps: AutocompleteRenderGetTagProps, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
315
265
|
/**
|
|
316
266
|
* Renders the selected value(s) as rich content in the input for both single and multiple selections.
|
|
317
267
|
*
|
|
@@ -71,15 +71,17 @@ 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 {
|
|
@@ -130,11 +132,6 @@ export type AutocompleteSlotsAndSlotProps<Value, Multiple extends boolean | unde
|
|
|
130
132
|
popupIndicator: SlotProps<React.ElementType<Partial<IconButtonProps>>, {}, AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>>;
|
|
131
133
|
}>;
|
|
132
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> {
|
|
133
|
-
/**
|
|
134
|
-
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
135
|
-
* @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.
|
|
136
|
-
*/
|
|
137
|
-
ChipProps?: ChipProps<ChipComponent> | undefined;
|
|
138
135
|
/**
|
|
139
136
|
* Override or extend the styles applied to the component.
|
|
140
137
|
*/
|
|
@@ -158,16 +155,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
158
155
|
* @default 'Close'
|
|
159
156
|
*/
|
|
160
157
|
closeText?: string | undefined;
|
|
161
|
-
/**
|
|
162
|
-
* The props used for each slot inside.
|
|
163
|
-
* @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.
|
|
164
|
-
*/
|
|
165
|
-
componentsProps?: {
|
|
166
|
-
clearIndicator?: Partial<IconButtonProps> | undefined;
|
|
167
|
-
paper?: PaperProps | undefined;
|
|
168
|
-
popper?: Partial<PopperProps> | undefined;
|
|
169
|
-
popupIndicator?: Partial<IconButtonProps> | undefined;
|
|
170
|
-
} | undefined;
|
|
171
158
|
/**
|
|
172
159
|
* If `true`, the component is disabled.
|
|
173
160
|
* @default false
|
|
@@ -196,20 +183,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
196
183
|
* @default (more) => `+${more}`
|
|
197
184
|
*/
|
|
198
185
|
getLimitTagsText?: ((more: number) => React.ReactNode) | undefined;
|
|
199
|
-
/**
|
|
200
|
-
* The component used to render the listbox.
|
|
201
|
-
* @default 'ul'
|
|
202
|
-
* @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.
|
|
203
|
-
*/
|
|
204
|
-
ListboxComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
205
|
-
/**
|
|
206
|
-
* Props applied to the Listbox element.
|
|
207
|
-
* @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.
|
|
208
|
-
*/
|
|
209
|
-
ListboxProps?: (ReturnType<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
|
|
210
|
-
sx?: SxProps<Theme> | undefined;
|
|
211
|
-
ref?: React.Ref<Element> | undefined;
|
|
212
|
-
}) | undefined;
|
|
213
186
|
/**
|
|
214
187
|
* If `true`, the component is in a loading state.
|
|
215
188
|
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
@@ -246,18 +219,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
246
219
|
* @default 'Open'
|
|
247
220
|
*/
|
|
248
221
|
openText?: string | undefined;
|
|
249
|
-
/**
|
|
250
|
-
* The component used to render the body of the popup.
|
|
251
|
-
* @default Paper
|
|
252
|
-
* @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.
|
|
253
|
-
*/
|
|
254
|
-
PaperComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>> | undefined;
|
|
255
|
-
/**
|
|
256
|
-
* The component used to position the popup.
|
|
257
|
-
* @default Popper
|
|
258
|
-
* @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.
|
|
259
|
-
*/
|
|
260
|
-
PopperComponent?: React.JSXElementConstructor<PopperProps> | undefined;
|
|
261
222
|
/**
|
|
262
223
|
* The icon to display in place of the default popup icon.
|
|
263
224
|
* @default <ArrowDropDownIcon />
|
|
@@ -301,17 +262,6 @@ export interface AutocompleteProps<Value, Multiple extends boolean | undefined,
|
|
|
301
262
|
renderOption?: ((props: React.HTMLAttributes<HTMLLIElement> & {
|
|
302
263
|
key: React.Key;
|
|
303
264
|
}, option: Value, state: AutocompleteRenderOptionState, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
304
|
-
/**
|
|
305
|
-
* Render the selected value when doing multiple selections.
|
|
306
|
-
*
|
|
307
|
-
* @deprecated Use `renderValue` prop instead
|
|
308
|
-
*
|
|
309
|
-
* @param {Value[]} value The `value` provided to the component.
|
|
310
|
-
* @param {function} getTagProps A tag props getter.
|
|
311
|
-
* @param {object} ownerState The state of the Autocomplete component.
|
|
312
|
-
* @returns {ReactNode}
|
|
313
|
-
*/
|
|
314
|
-
renderTags?: ((value: Value[], getTagProps: AutocompleteRenderGetTagProps, ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>) => React.ReactNode) | undefined;
|
|
315
265
|
/**
|
|
316
266
|
* Renders the selected value(s) as rich content in the input for both single and multiple selections.
|
|
317
267
|
*
|
|
@@ -417,7 +417,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
417
417
|
autoHighlight = false,
|
|
418
418
|
autoSelect = false,
|
|
419
419
|
blurOnSelect = false,
|
|
420
|
-
ChipProps: ChipPropsProp,
|
|
421
420
|
className,
|
|
422
421
|
clearIcon = _ClearIcon || (_ClearIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Close.default, {
|
|
423
422
|
fontSize: "small"
|
|
@@ -426,7 +425,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
426
425
|
clearOnEscape = false,
|
|
427
426
|
clearText = 'Clear',
|
|
428
427
|
closeText = 'Close',
|
|
429
|
-
componentsProps,
|
|
430
428
|
defaultValue = props.multiple ? [] : null,
|
|
431
429
|
disableClearable = false,
|
|
432
430
|
disableCloseOnSelect = false,
|
|
@@ -450,8 +448,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
450
448
|
includeInputInList = false,
|
|
451
449
|
inputValue: inputValueProp,
|
|
452
450
|
limitTags = -1,
|
|
453
|
-
ListboxComponent: ListboxComponentProp,
|
|
454
|
-
ListboxProps: ListboxPropsProp,
|
|
455
451
|
loading = false,
|
|
456
452
|
loadingText = 'Loading…',
|
|
457
453
|
multiple = false,
|
|
@@ -465,14 +461,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
465
461
|
openOnFocus = false,
|
|
466
462
|
openText = 'Open',
|
|
467
463
|
options,
|
|
468
|
-
PaperComponent: PaperComponentProp,
|
|
469
|
-
PopperComponent: PopperComponentProp,
|
|
470
464
|
popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowDropDown.default, {})),
|
|
471
465
|
readOnly = false,
|
|
472
466
|
renderGroup: renderGroupProp,
|
|
473
467
|
renderInput,
|
|
474
468
|
renderOption: renderOptionProp,
|
|
475
|
-
renderTags,
|
|
476
469
|
renderValue,
|
|
477
470
|
selectOnFocus = !props.freeSolo,
|
|
478
471
|
size = 'medium',
|
|
@@ -535,17 +528,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
535
528
|
};
|
|
536
529
|
const classes = useUtilityClasses(ownerState);
|
|
537
530
|
const externalForwardedProps = {
|
|
538
|
-
slots
|
|
539
|
-
|
|
540
|
-
popper: PopperComponentProp,
|
|
541
|
-
...slots
|
|
542
|
-
},
|
|
543
|
-
slotProps: {
|
|
544
|
-
chip: ChipPropsProp,
|
|
545
|
-
listbox: ListboxPropsProp,
|
|
546
|
-
...componentsProps,
|
|
547
|
-
...slotProps
|
|
548
|
-
}
|
|
531
|
+
slots,
|
|
532
|
+
slotProps
|
|
549
533
|
};
|
|
550
534
|
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
|
551
535
|
ref,
|
|
@@ -620,9 +604,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
620
604
|
});
|
|
621
605
|
if (multiple) {
|
|
622
606
|
if (value.length > 0) {
|
|
623
|
-
if (
|
|
624
|
-
startAdornment = renderTags(value, getCustomizedItemProps, ownerState);
|
|
625
|
-
} else if (renderValue) {
|
|
607
|
+
if (renderValue) {
|
|
626
608
|
startAdornment = renderValue(value, getCustomizedItemProps, ownerState);
|
|
627
609
|
} else {
|
|
628
610
|
startAdornment = value.map((option, index) => {
|
|
@@ -701,35 +683,37 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
701
683
|
disabled,
|
|
702
684
|
fullWidth: props.fullWidth ?? true,
|
|
703
685
|
size: size === 'small' ? 'small' : undefined,
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
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,
|
|
700
|
+
ownerState: ownerState,
|
|
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
|
+
})
|
|
725
709
|
})
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
710
|
+
},
|
|
711
|
+
htmlInput: {
|
|
712
|
+
className: classes.input,
|
|
713
|
+
disabled,
|
|
714
|
+
readOnly,
|
|
715
|
+
...getInputProps()
|
|
716
|
+
}
|
|
733
717
|
}
|
|
734
718
|
})
|
|
735
719
|
}), anchorEl ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopper, {
|
|
@@ -752,7 +736,6 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
752
736
|
},
|
|
753
737
|
children: noOptionsText
|
|
754
738
|
}) : null, groupedOptions.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ListboxSlot, {
|
|
755
|
-
as: ListboxComponentProp,
|
|
756
739
|
...listboxProps,
|
|
757
740
|
children: groupedOptions.map((option, index) => {
|
|
758
741
|
if (groupBy) {
|
|
@@ -806,11 +789,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
806
789
|
* @default false
|
|
807
790
|
*/
|
|
808
791
|
blurOnSelect: _propTypes.default.oneOfType([_propTypes.default.oneOf(['mouse', 'touch']), _propTypes.default.bool]),
|
|
809
|
-
/**
|
|
810
|
-
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
811
|
-
* @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.
|
|
812
|
-
*/
|
|
813
|
-
ChipProps: _propTypes.default.object,
|
|
814
792
|
/**
|
|
815
793
|
* Override or extend the styles applied to the component.
|
|
816
794
|
*/
|
|
@@ -851,16 +829,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
851
829
|
* @default 'Close'
|
|
852
830
|
*/
|
|
853
831
|
closeText: _propTypes.default.string,
|
|
854
|
-
/**
|
|
855
|
-
* The props used for each slot inside.
|
|
856
|
-
* @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.
|
|
857
|
-
*/
|
|
858
|
-
componentsProps: _propTypes.default.shape({
|
|
859
|
-
clearIndicator: _propTypes.default.object,
|
|
860
|
-
paper: _propTypes.default.object,
|
|
861
|
-
popper: _propTypes.default.object,
|
|
862
|
-
popupIndicator: _propTypes.default.object
|
|
863
|
-
}),
|
|
864
832
|
/**
|
|
865
833
|
* The default value. Use when the component is not controlled.
|
|
866
834
|
* @default props.multiple ? [] : null
|
|
@@ -1009,17 +977,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1009
977
|
* @default -1
|
|
1010
978
|
*/
|
|
1011
979
|
limitTags: _integerPropType.default,
|
|
1012
|
-
/**
|
|
1013
|
-
* The component used to render the listbox.
|
|
1014
|
-
* @default 'ul'
|
|
1015
|
-
* @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.
|
|
1016
|
-
*/
|
|
1017
|
-
ListboxComponent: _propTypes.default.elementType,
|
|
1018
|
-
/**
|
|
1019
|
-
* Props applied to the Listbox element.
|
|
1020
|
-
* @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.
|
|
1021
|
-
*/
|
|
1022
|
-
ListboxProps: _propTypes.default.object,
|
|
1023
980
|
/**
|
|
1024
981
|
* If `true`, the component is in a loading state.
|
|
1025
982
|
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
@@ -1109,18 +1066,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1109
1066
|
* A list of options that will be shown in the Autocomplete.
|
|
1110
1067
|
*/
|
|
1111
1068
|
options: _propTypes.default.array.isRequired,
|
|
1112
|
-
/**
|
|
1113
|
-
* The component used to render the body of the popup.
|
|
1114
|
-
* @default Paper
|
|
1115
|
-
* @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.
|
|
1116
|
-
*/
|
|
1117
|
-
PaperComponent: _propTypes.default.elementType,
|
|
1118
|
-
/**
|
|
1119
|
-
* The component used to position the popup.
|
|
1120
|
-
* @default Popper
|
|
1121
|
-
* @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.
|
|
1122
|
-
*/
|
|
1123
|
-
PopperComponent: _propTypes.default.elementType,
|
|
1124
1069
|
/**
|
|
1125
1070
|
* The icon to display in place of the default popup icon.
|
|
1126
1071
|
* @default <ArrowDropDownIcon />
|
|
@@ -1162,17 +1107,6 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1162
1107
|
* @returns {ReactNode}
|
|
1163
1108
|
*/
|
|
1164
1109
|
renderOption: _propTypes.default.func,
|
|
1165
|
-
/**
|
|
1166
|
-
* Render the selected value when doing multiple selections.
|
|
1167
|
-
*
|
|
1168
|
-
* @deprecated Use `renderValue` prop instead
|
|
1169
|
-
*
|
|
1170
|
-
* @param {Value[]} value The `value` provided to the component.
|
|
1171
|
-
* @param {function} getTagProps A tag props getter.
|
|
1172
|
-
* @param {object} ownerState The state of the Autocomplete component.
|
|
1173
|
-
* @returns {ReactNode}
|
|
1174
|
-
*/
|
|
1175
|
-
renderTags: _propTypes.default.func,
|
|
1176
1110
|
/**
|
|
1177
1111
|
* Renders the selected value(s) as rich content in the input for both single and multiple selections.
|
|
1178
1112
|
*
|