@mui/material 7.0.1 → 7.0.2

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.
Files changed (606) hide show
  1. package/Autocomplete/Autocomplete.d.ts +31 -1
  2. package/Autocomplete/Autocomplete.js +39 -27
  3. package/AvatarGroup/AvatarGroup.js +10 -2
  4. package/CHANGELOG.md +60 -0
  5. package/Dialog/dialogClasses.d.ts +6 -2
  6. package/SvgIcon/SvgIcon.d.ts +1 -1
  7. package/SvgIcon/SvgIcon.js +1 -1
  8. package/esm/Autocomplete/Autocomplete.d.ts +31 -1
  9. package/esm/Autocomplete/Autocomplete.js +39 -27
  10. package/esm/AvatarGroup/AvatarGroup.js +10 -2
  11. package/esm/Dialog/dialogClasses.d.ts +6 -2
  12. package/esm/SvgIcon/SvgIcon.d.ts +1 -1
  13. package/esm/SvgIcon/SvgIcon.js +1 -1
  14. package/esm/index.d.ts +0 -1
  15. package/esm/index.js +1 -1
  16. package/esm/useAutocomplete/useAutocomplete.d.ts +26 -0
  17. package/esm/useAutocomplete/useAutocomplete.js +88 -42
  18. package/esm/utils/memoTheme.d.ts +1 -1
  19. package/esm/version/index.js +2 -2
  20. package/index.d.ts +0 -1
  21. package/index.js +1 -1
  22. package/modern/Autocomplete/Autocomplete.d.ts +31 -1
  23. package/modern/Dialog/dialogClasses.d.ts +6 -2
  24. package/modern/SvgIcon/SvgIcon.d.ts +1 -1
  25. package/modern/index.d.ts +0 -1
  26. package/modern/useAutocomplete/useAutocomplete.d.ts +26 -0
  27. package/modern/utils/memoTheme.d.ts +1 -1
  28. package/package.json +8 -20
  29. package/useAutocomplete/useAutocomplete.d.ts +26 -0
  30. package/useAutocomplete/useAutocomplete.js +88 -42
  31. package/utils/memoTheme.d.ts +1 -1
  32. package/version/index.js +2 -2
  33. package/modern/Accordion/Accordion.js +0 -328
  34. package/modern/Accordion/AccordionContext.js +0 -13
  35. package/modern/Accordion/accordionClasses.js +0 -7
  36. package/modern/Accordion/index.js +0 -3
  37. package/modern/AccordionActions/AccordionActions.js +0 -93
  38. package/modern/AccordionActions/accordionActionsClasses.js +0 -7
  39. package/modern/AccordionActions/index.js +0 -3
  40. package/modern/AccordionDetails/AccordionDetails.js +0 -70
  41. package/modern/AccordionDetails/accordionDetailsClasses.js +0 -7
  42. package/modern/AccordionDetails/index.js +0 -3
  43. package/modern/AccordionSummary/AccordionSummary.js +0 -250
  44. package/modern/AccordionSummary/accordionSummaryClasses.js +0 -7
  45. package/modern/AccordionSummary/index.js +0 -3
  46. package/modern/Alert/Alert.js +0 -386
  47. package/modern/Alert/alertClasses.js +0 -7
  48. package/modern/Alert/index.js +0 -3
  49. package/modern/AlertTitle/AlertTitle.js +0 -76
  50. package/modern/AlertTitle/alertTitleClasses.js +0 -7
  51. package/modern/AlertTitle/index.js +0 -3
  52. package/modern/AppBar/AppBar.js +0 -227
  53. package/modern/AppBar/appBarClasses.js +0 -7
  54. package/modern/AppBar/index.js +0 -3
  55. package/modern/Autocomplete/Autocomplete.js +0 -1186
  56. package/modern/Autocomplete/autocompleteClasses.js +0 -7
  57. package/modern/Autocomplete/index.js +0 -3
  58. package/modern/Avatar/Avatar.js +0 -299
  59. package/modern/Avatar/avatarClasses.js +0 -7
  60. package/modern/Avatar/index.js +0 -3
  61. package/modern/AvatarGroup/AvatarGroup.js +0 -223
  62. package/modern/AvatarGroup/avatarGroupClasses.js +0 -7
  63. package/modern/AvatarGroup/index.js +0 -3
  64. package/modern/Backdrop/Backdrop.js +0 -205
  65. package/modern/Backdrop/backdropClasses.js +0 -7
  66. package/modern/Backdrop/index.js +0 -3
  67. package/modern/Badge/Badge.js +0 -428
  68. package/modern/Badge/badgeClasses.js +0 -9
  69. package/modern/Badge/index.js +0 -3
  70. package/modern/Badge/useBadge.js +0 -41
  71. package/modern/Badge/useBadge.types.js +0 -1
  72. package/modern/BottomNavigation/BottomNavigation.js +0 -123
  73. package/modern/BottomNavigation/bottomNavigationClasses.js +0 -7
  74. package/modern/BottomNavigation/index.js +0 -3
  75. package/modern/BottomNavigationAction/BottomNavigationAction.js +0 -187
  76. package/modern/BottomNavigationAction/bottomNavigationActionClasses.js +0 -7
  77. package/modern/BottomNavigationAction/index.js +0 -3
  78. package/modern/Box/Box.js +0 -35
  79. package/modern/Box/boxClasses.js +0 -3
  80. package/modern/Box/index.js +0 -3
  81. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +0 -90
  82. package/modern/Breadcrumbs/Breadcrumbs.js +0 -240
  83. package/modern/Breadcrumbs/breadcrumbsClasses.js +0 -7
  84. package/modern/Breadcrumbs/index.js +0 -3
  85. package/modern/Button/Button.js +0 -688
  86. package/modern/Button/buttonClasses.js +0 -7
  87. package/modern/Button/index.js +0 -3
  88. package/modern/ButtonBase/ButtonBase.js +0 -447
  89. package/modern/ButtonBase/Ripple.js +0 -88
  90. package/modern/ButtonBase/TouchRipple.js +0 -324
  91. package/modern/ButtonBase/buttonBaseClasses.js +0 -7
  92. package/modern/ButtonBase/index.js +0 -5
  93. package/modern/ButtonBase/touchRippleClasses.js +0 -7
  94. package/modern/ButtonGroup/ButtonGroup.js +0 -390
  95. package/modern/ButtonGroup/ButtonGroupButtonContext.js +0 -11
  96. package/modern/ButtonGroup/ButtonGroupContext.js +0 -11
  97. package/modern/ButtonGroup/buttonGroupClasses.js +0 -7
  98. package/modern/ButtonGroup/index.js +0 -5
  99. package/modern/Card/Card.js +0 -84
  100. package/modern/Card/cardClasses.js +0 -7
  101. package/modern/Card/index.js +0 -3
  102. package/modern/CardActionArea/CardActionArea.js +0 -117
  103. package/modern/CardActionArea/cardActionAreaClasses.js +0 -7
  104. package/modern/CardActionArea/index.js +0 -3
  105. package/modern/CardActions/CardActions.js +0 -94
  106. package/modern/CardActions/cardActionsClasses.js +0 -7
  107. package/modern/CardActions/index.js +0 -3
  108. package/modern/CardContent/CardContent.js +0 -80
  109. package/modern/CardContent/cardContentClasses.js +0 -7
  110. package/modern/CardContent/index.js +0 -3
  111. package/modern/CardHeader/CardHeader.js +0 -267
  112. package/modern/CardHeader/cardHeaderClasses.js +0 -7
  113. package/modern/CardHeader/index.js +0 -3
  114. package/modern/CardMedia/CardMedia.js +0 -145
  115. package/modern/CardMedia/cardMediaClasses.js +0 -7
  116. package/modern/CardMedia/index.js +0 -3
  117. package/modern/Checkbox/Checkbox.js +0 -280
  118. package/modern/Checkbox/checkboxClasses.js +0 -7
  119. package/modern/Checkbox/index.js +0 -3
  120. package/modern/Chip/Chip.js +0 -576
  121. package/modern/Chip/chipClasses.js +0 -7
  122. package/modern/Chip/index.js +0 -3
  123. package/modern/CircularProgress/CircularProgress.js +0 -285
  124. package/modern/CircularProgress/circularProgressClasses.js +0 -7
  125. package/modern/CircularProgress/index.js +0 -3
  126. package/modern/ClickAwayListener/ClickAwayListener.js +0 -174
  127. package/modern/ClickAwayListener/index.js +0 -1
  128. package/modern/Collapse/Collapse.js +0 -411
  129. package/modern/Collapse/collapseClasses.js +0 -7
  130. package/modern/Collapse/index.js +0 -3
  131. package/modern/Container/Container.js +0 -67
  132. package/modern/Container/containerClasses.js +0 -7
  133. package/modern/Container/index.js +0 -3
  134. package/modern/CssBaseline/CssBaseline.js +0 -161
  135. package/modern/CssBaseline/index.js +0 -1
  136. package/modern/DefaultPropsProvider/DefaultPropsProvider.js +0 -29
  137. package/modern/DefaultPropsProvider/index.js +0 -1
  138. package/modern/Dialog/Dialog.js +0 -513
  139. package/modern/Dialog/DialogContext.js +0 -8
  140. package/modern/Dialog/dialogClasses.js +0 -7
  141. package/modern/Dialog/index.js +0 -3
  142. package/modern/DialogActions/DialogActions.js +0 -96
  143. package/modern/DialogActions/dialogActionsClasses.js +0 -7
  144. package/modern/DialogActions/index.js +0 -3
  145. package/modern/DialogContent/DialogContent.js +0 -109
  146. package/modern/DialogContent/dialogContentClasses.js +0 -7
  147. package/modern/DialogContent/index.js +0 -3
  148. package/modern/DialogContentText/DialogContentText.js +0 -77
  149. package/modern/DialogContentText/dialogContentTextClasses.js +0 -7
  150. package/modern/DialogContentText/index.js +0 -3
  151. package/modern/DialogTitle/DialogTitle.js +0 -81
  152. package/modern/DialogTitle/dialogTitleClasses.js +0 -7
  153. package/modern/DialogTitle/index.js +0 -3
  154. package/modern/Divider/Divider.js +0 -314
  155. package/modern/Divider/dividerClasses.js +0 -7
  156. package/modern/Divider/index.js +0 -3
  157. package/modern/Drawer/Drawer.js +0 -434
  158. package/modern/Drawer/drawerClasses.js +0 -7
  159. package/modern/Drawer/index.js +0 -3
  160. package/modern/Fab/Fab.js +0 -271
  161. package/modern/Fab/fabClasses.js +0 -7
  162. package/modern/Fab/index.js +0 -3
  163. package/modern/Fade/Fade.js +0 -210
  164. package/modern/Fade/index.js +0 -1
  165. package/modern/FilledInput/FilledInput.js +0 -516
  166. package/modern/FilledInput/filledInputClasses.js +0 -11
  167. package/modern/FilledInput/index.js +0 -3
  168. package/modern/FormControl/FormControl.js +0 -305
  169. package/modern/FormControl/FormControlContext.js +0 -11
  170. package/modern/FormControl/formControlClasses.js +0 -7
  171. package/modern/FormControl/formControlState.js +0 -15
  172. package/modern/FormControl/index.js +0 -4
  173. package/modern/FormControl/useFormControl.js +0 -7
  174. package/modern/FormControlLabel/FormControlLabel.js +0 -283
  175. package/modern/FormControlLabel/formControlLabelClasses.js +0 -7
  176. package/modern/FormControlLabel/index.js +0 -3
  177. package/modern/FormGroup/FormGroup.js +0 -108
  178. package/modern/FormGroup/formGroupClasses.js +0 -7
  179. package/modern/FormGroup/index.js +0 -3
  180. package/modern/FormHelperText/FormHelperText.js +0 -186
  181. package/modern/FormHelperText/formHelperTextClasses.js +0 -7
  182. package/modern/FormHelperText/index.js +0 -3
  183. package/modern/FormLabel/FormLabel.js +0 -182
  184. package/modern/FormLabel/formLabelClasses.js +0 -7
  185. package/modern/FormLabel/index.js +0 -4
  186. package/modern/GlobalStyles/GlobalStyles.js +0 -26
  187. package/modern/GlobalStyles/index.js +0 -1
  188. package/modern/Grid/Grid.js +0 -138
  189. package/modern/Grid/gridClasses.js +0 -19
  190. package/modern/Grid/index.js +0 -4
  191. package/modern/GridLegacy/GridLegacy.js +0 -588
  192. package/modern/GridLegacy/GridLegacyContext.js +0 -12
  193. package/modern/GridLegacy/gridLegacyClasses.js +0 -19
  194. package/modern/GridLegacy/index.js +0 -3
  195. package/modern/Grow/Grow.js +0 -262
  196. package/modern/Grow/index.js +0 -1
  197. package/modern/Icon/Icon.js +0 -185
  198. package/modern/Icon/iconClasses.js +0 -7
  199. package/modern/Icon/index.js +0 -3
  200. package/modern/IconButton/IconButton.js +0 -322
  201. package/modern/IconButton/iconButtonClasses.js +0 -7
  202. package/modern/IconButton/index.js +0 -3
  203. package/modern/ImageList/ImageList.js +0 -150
  204. package/modern/ImageList/ImageListContext.js +0 -13
  205. package/modern/ImageList/imageListClasses.js +0 -7
  206. package/modern/ImageList/index.js +0 -3
  207. package/modern/ImageListItem/ImageListItem.js +0 -188
  208. package/modern/ImageListItem/imageListItemClasses.js +0 -7
  209. package/modern/ImageListItem/index.js +0 -3
  210. package/modern/ImageListItemBar/ImageListItemBar.js +0 -253
  211. package/modern/ImageListItemBar/imageListItemBarClasses.js +0 -7
  212. package/modern/ImageListItemBar/index.js +0 -3
  213. package/modern/InitColorSchemeScript/InitColorSchemeScript.js +0 -16
  214. package/modern/InitColorSchemeScript/index.js +0 -1
  215. package/modern/Input/Input.js +0 -361
  216. package/modern/Input/index.js +0 -3
  217. package/modern/Input/inputClasses.js +0 -11
  218. package/modern/InputAdornment/InputAdornment.js +0 -186
  219. package/modern/InputAdornment/index.js +0 -3
  220. package/modern/InputAdornment/inputAdornmentClasses.js +0 -7
  221. package/modern/InputBase/InputBase.js +0 -749
  222. package/modern/InputBase/index.js +0 -3
  223. package/modern/InputBase/inputBaseClasses.js +0 -7
  224. package/modern/InputBase/utils.js +0 -30
  225. package/modern/InputLabel/InputLabel.js +0 -283
  226. package/modern/InputLabel/index.js +0 -3
  227. package/modern/InputLabel/inputLabelClasses.js +0 -7
  228. package/modern/LinearProgress/LinearProgress.js +0 -455
  229. package/modern/LinearProgress/index.js +0 -3
  230. package/modern/LinearProgress/linearProgressClasses.js +0 -7
  231. package/modern/Link/Link.js +0 -283
  232. package/modern/Link/getTextDecoration.js +0 -16
  233. package/modern/Link/index.js +0 -3
  234. package/modern/Link/linkClasses.js +0 -7
  235. package/modern/List/List.js +0 -134
  236. package/modern/List/ListContext.js +0 -12
  237. package/modern/List/index.js +0 -3
  238. package/modern/List/listClasses.js +0 -7
  239. package/modern/ListItem/ListItem.js +0 -388
  240. package/modern/ListItem/index.js +0 -3
  241. package/modern/ListItem/listItemClasses.js +0 -7
  242. package/modern/ListItemAvatar/ListItemAvatar.js +0 -91
  243. package/modern/ListItemAvatar/index.js +0 -3
  244. package/modern/ListItemAvatar/listItemAvatarClasses.js +0 -7
  245. package/modern/ListItemButton/ListItemButton.js +0 -264
  246. package/modern/ListItemButton/index.js +0 -3
  247. package/modern/ListItemButton/listItemButtonClasses.js +0 -7
  248. package/modern/ListItemIcon/ListItemIcon.js +0 -97
  249. package/modern/ListItemIcon/index.js +0 -3
  250. package/modern/ListItemIcon/listItemIconClasses.js +0 -7
  251. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +0 -96
  252. package/modern/ListItemSecondaryAction/index.js +0 -3
  253. package/modern/ListItemSecondaryAction/listItemSecondaryActionClasses.js +0 -7
  254. package/modern/ListItemText/ListItemText.js +0 -227
  255. package/modern/ListItemText/index.js +0 -3
  256. package/modern/ListItemText/listItemTextClasses.js +0 -7
  257. package/modern/ListSubheader/ListSubheader.js +0 -167
  258. package/modern/ListSubheader/index.js +0 -3
  259. package/modern/ListSubheader/listSubheaderClasses.js +0 -7
  260. package/modern/Menu/Menu.js +0 -341
  261. package/modern/Menu/index.js +0 -3
  262. package/modern/Menu/menuClasses.js +0 -7
  263. package/modern/MenuItem/MenuItem.js +0 -283
  264. package/modern/MenuItem/index.js +0 -3
  265. package/modern/MenuItem/menuItemClasses.js +0 -7
  266. package/modern/MenuList/MenuList.js +0 -290
  267. package/modern/MenuList/index.js +0 -1
  268. package/modern/MobileStepper/MobileStepper.js +0 -306
  269. package/modern/MobileStepper/index.js +0 -3
  270. package/modern/MobileStepper/mobileStepperClasses.js +0 -7
  271. package/modern/Modal/Modal.js +0 -396
  272. package/modern/Modal/ModalManager.js +0 -211
  273. package/modern/Modal/index.js +0 -4
  274. package/modern/Modal/modalClasses.js +0 -7
  275. package/modern/Modal/useModal.js +0 -200
  276. package/modern/Modal/useModal.types.js +0 -1
  277. package/modern/NativeSelect/NativeSelect.js +0 -133
  278. package/modern/NativeSelect/NativeSelectInput.js +0 -240
  279. package/modern/NativeSelect/index.js +0 -3
  280. package/modern/NativeSelect/nativeSelectClasses.js +0 -7
  281. package/modern/NoSsr/NoSsr.js +0 -70
  282. package/modern/NoSsr/NoSsr.types.js +0 -1
  283. package/modern/NoSsr/index.js +0 -1
  284. package/modern/OutlinedInput/NotchedOutline.js +0 -154
  285. package/modern/OutlinedInput/OutlinedInput.js +0 -410
  286. package/modern/OutlinedInput/index.js +0 -3
  287. package/modern/OutlinedInput/outlinedInputClasses.js +0 -11
  288. package/modern/OverridableComponent/index.js +0 -1
  289. package/modern/Pagination/Pagination.js +0 -245
  290. package/modern/Pagination/index.js +0 -3
  291. package/modern/Pagination/paginationClasses.js +0 -7
  292. package/modern/PaginationItem/PaginationItem.js +0 -472
  293. package/modern/PaginationItem/index.js +0 -3
  294. package/modern/PaginationItem/paginationItemClasses.js +0 -7
  295. package/modern/Paper/Paper.js +0 -170
  296. package/modern/Paper/index.js +0 -3
  297. package/modern/Paper/paperClasses.js +0 -7
  298. package/modern/PigmentContainer/PigmentContainer.js +0 -98
  299. package/modern/PigmentContainer/index.js +0 -3
  300. package/modern/PigmentGrid/PigmentGrid.js +0 -126
  301. package/modern/PigmentGrid/index.js +0 -3
  302. package/modern/PigmentStack/PigmentStack.js +0 -81
  303. package/modern/PigmentStack/index.js +0 -3
  304. package/modern/Popover/Popover.js +0 -583
  305. package/modern/Popover/index.js +0 -4
  306. package/modern/Popover/popoverClasses.js +0 -7
  307. package/modern/Popper/BasePopper.js +0 -370
  308. package/modern/Popper/BasePopper.types.js +0 -1
  309. package/modern/Popper/Popper.js +0 -210
  310. package/modern/Popper/index.js +0 -2
  311. package/modern/Popper/popperClasses.js +0 -7
  312. package/modern/Portal/Portal.js +0 -86
  313. package/modern/Portal/Portal.types.js +0 -1
  314. package/modern/Portal/index.js +0 -1
  315. package/modern/Radio/Radio.js +0 -309
  316. package/modern/Radio/RadioButtonIcon.js +0 -87
  317. package/modern/Radio/index.js +0 -3
  318. package/modern/Radio/radioClasses.js +0 -7
  319. package/modern/RadioGroup/RadioGroup.js +0 -114
  320. package/modern/RadioGroup/RadioGroupContext.js +0 -11
  321. package/modern/RadioGroup/index.js +0 -4
  322. package/modern/RadioGroup/radioGroupClasses.js +0 -7
  323. package/modern/RadioGroup/useRadioGroup.js +0 -7
  324. package/modern/Rating/Rating.js +0 -777
  325. package/modern/Rating/index.js +0 -3
  326. package/modern/Rating/ratingClasses.js +0 -7
  327. package/modern/ScopedCssBaseline/ScopedCssBaseline.js +0 -120
  328. package/modern/ScopedCssBaseline/index.js +0 -3
  329. package/modern/ScopedCssBaseline/scopedCssBaselineClasses.js +0 -7
  330. package/modern/Select/Select.js +0 -300
  331. package/modern/Select/SelectInput.js +0 -673
  332. package/modern/Select/index.js +0 -3
  333. package/modern/Select/selectClasses.js +0 -7
  334. package/modern/Skeleton/Skeleton.js +0 -269
  335. package/modern/Skeleton/index.js +0 -3
  336. package/modern/Skeleton/skeletonClasses.js +0 -7
  337. package/modern/Slide/Slide.js +0 -338
  338. package/modern/Slide/index.js +0 -1
  339. package/modern/Slider/Slider.js +0 -1095
  340. package/modern/Slider/SliderValueLabel.js +0 -53
  341. package/modern/Slider/SliderValueLabel.types.js +0 -1
  342. package/modern/Slider/index.js +0 -4
  343. package/modern/Slider/sliderClasses.js +0 -7
  344. package/modern/Slider/useSlider.js +0 -704
  345. package/modern/Slider/useSlider.types.js +0 -1
  346. package/modern/Snackbar/Snackbar.js +0 -426
  347. package/modern/Snackbar/index.js +0 -3
  348. package/modern/Snackbar/snackbarClasses.js +0 -7
  349. package/modern/Snackbar/useSnackbar.js +0 -133
  350. package/modern/Snackbar/useSnackbar.types.js +0 -1
  351. package/modern/SnackbarContent/SnackbarContent.js +0 -132
  352. package/modern/SnackbarContent/index.js +0 -3
  353. package/modern/SnackbarContent/snackbarContentClasses.js +0 -7
  354. package/modern/SpeedDial/SpeedDial.js +0 -579
  355. package/modern/SpeedDial/index.js +0 -3
  356. package/modern/SpeedDial/speedDialClasses.js +0 -7
  357. package/modern/SpeedDialAction/SpeedDialAction.js +0 -351
  358. package/modern/SpeedDialAction/index.js +0 -3
  359. package/modern/SpeedDialAction/speedDialActionClasses.js +0 -7
  360. package/modern/SpeedDialIcon/SpeedDialIcon.js +0 -156
  361. package/modern/SpeedDialIcon/index.js +0 -3
  362. package/modern/SpeedDialIcon/speedDialIconClasses.js +0 -7
  363. package/modern/Stack/Stack.js +0 -62
  364. package/modern/Stack/index.js +0 -2
  365. package/modern/Stack/stackClasses.js +0 -7
  366. package/modern/Step/Step.js +0 -176
  367. package/modern/Step/StepContext.js +0 -19
  368. package/modern/Step/index.js +0 -5
  369. package/modern/Step/stepClasses.js +0 -7
  370. package/modern/StepButton/StepButton.js +0 -133
  371. package/modern/StepButton/index.js +0 -3
  372. package/modern/StepButton/stepButtonClasses.js +0 -7
  373. package/modern/StepConnector/StepConnector.js +0 -152
  374. package/modern/StepConnector/index.js +0 -3
  375. package/modern/StepConnector/stepConnectorClasses.js +0 -7
  376. package/modern/StepContent/StepContent.js +0 -187
  377. package/modern/StepContent/index.js +0 -3
  378. package/modern/StepContent/stepContentClasses.js +0 -7
  379. package/modern/StepIcon/StepIcon.js +0 -161
  380. package/modern/StepIcon/index.js +0 -3
  381. package/modern/StepIcon/stepIconClasses.js +0 -7
  382. package/modern/StepLabel/StepLabel.js +0 -280
  383. package/modern/StepLabel/index.js +0 -3
  384. package/modern/StepLabel/stepLabelClasses.js +0 -7
  385. package/modern/Stepper/Stepper.js +0 -167
  386. package/modern/Stepper/StepperContext.js +0 -19
  387. package/modern/Stepper/index.js +0 -5
  388. package/modern/Stepper/stepperClasses.js +0 -7
  389. package/modern/SvgIcon/SvgIcon.js +0 -234
  390. package/modern/SvgIcon/index.js +0 -3
  391. package/modern/SvgIcon/svgIconClasses.js +0 -7
  392. package/modern/SwipeableDrawer/SwipeArea.js +0 -104
  393. package/modern/SwipeableDrawer/SwipeableDrawer.js +0 -661
  394. package/modern/SwipeableDrawer/index.js +0 -1
  395. package/modern/Switch/Switch.js +0 -407
  396. package/modern/Switch/index.js +0 -3
  397. package/modern/Switch/switchClasses.js +0 -7
  398. package/modern/Tab/Tab.js +0 -338
  399. package/modern/Tab/index.js +0 -3
  400. package/modern/Tab/tabClasses.js +0 -7
  401. package/modern/TabScrollButton/TabScrollButton.js +0 -172
  402. package/modern/TabScrollButton/index.js +0 -3
  403. package/modern/TabScrollButton/tabScrollButtonClasses.js +0 -7
  404. package/modern/Table/Table.js +0 -136
  405. package/modern/Table/TableContext.js +0 -12
  406. package/modern/Table/Tablelvl2Context.js +0 -12
  407. package/modern/Table/index.js +0 -3
  408. package/modern/Table/tableClasses.js +0 -7
  409. package/modern/TableBody/TableBody.js +0 -86
  410. package/modern/TableBody/index.js +0 -3
  411. package/modern/TableBody/tableBodyClasses.js +0 -7
  412. package/modern/TableCell/TableCell.js +0 -270
  413. package/modern/TableCell/index.js +0 -3
  414. package/modern/TableCell/tableCellClasses.js +0 -7
  415. package/modern/TableContainer/TableContainer.js +0 -78
  416. package/modern/TableContainer/index.js +0 -3
  417. package/modern/TableContainer/tableContainerClasses.js +0 -7
  418. package/modern/TableFooter/TableFooter.js +0 -86
  419. package/modern/TableFooter/index.js +0 -3
  420. package/modern/TableFooter/tableFooterClasses.js +0 -7
  421. package/modern/TableHead/TableHead.js +0 -86
  422. package/modern/TableHead/index.js +0 -3
  423. package/modern/TableHead/tableHeadClasses.js +0 -7
  424. package/modern/TablePagination/TablePagination.js +0 -505
  425. package/modern/TablePagination/TablePaginationActions.js +0 -194
  426. package/modern/TablePagination/index.js +0 -3
  427. package/modern/TablePagination/tablePaginationClasses.js +0 -7
  428. package/modern/TableRow/TableRow.js +0 -127
  429. package/modern/TableRow/index.js +0 -3
  430. package/modern/TableRow/tableRowClasses.js +0 -7
  431. package/modern/TableSortLabel/TableSortLabel.js +0 -212
  432. package/modern/TableSortLabel/index.js +0 -3
  433. package/modern/TableSortLabel/tableSortLabelClasses.js +0 -7
  434. package/modern/Tabs/ScrollbarSize.js +0 -58
  435. package/modern/Tabs/Tabs.js +0 -956
  436. package/modern/Tabs/index.js +0 -3
  437. package/modern/Tabs/tabsClasses.js +0 -7
  438. package/modern/TextField/TextField.js +0 -457
  439. package/modern/TextField/index.js +0 -3
  440. package/modern/TextField/textFieldClasses.js +0 -7
  441. package/modern/TextareaAutosize/TextareaAutosize.js +0 -243
  442. package/modern/TextareaAutosize/TextareaAutosize.types.js +0 -1
  443. package/modern/TextareaAutosize/index.js +0 -1
  444. package/modern/ToggleButton/ToggleButton.js +0 -268
  445. package/modern/ToggleButton/index.js +0 -3
  446. package/modern/ToggleButton/toggleButtonClasses.js +0 -7
  447. package/modern/ToggleButtonGroup/ToggleButtonGroup.js +0 -281
  448. package/modern/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +0 -11
  449. package/modern/ToggleButtonGroup/ToggleButtonGroupContext.js +0 -11
  450. package/modern/ToggleButtonGroup/index.js +0 -3
  451. package/modern/ToggleButtonGroup/isValueSelected.js +0 -11
  452. package/modern/ToggleButtonGroup/toggleButtonGroupClasses.js +0 -7
  453. package/modern/Toolbar/Toolbar.js +0 -129
  454. package/modern/Toolbar/index.js +0 -3
  455. package/modern/Toolbar/toolbarClasses.js +0 -7
  456. package/modern/Tooltip/Tooltip.js +0 -898
  457. package/modern/Tooltip/index.js +0 -3
  458. package/modern/Tooltip/tooltipClasses.js +0 -7
  459. package/modern/Typography/Typography.js +0 -268
  460. package/modern/Typography/index.js +0 -3
  461. package/modern/Typography/typographyClasses.js +0 -7
  462. package/modern/Unstable_TrapFocus/FocusTrap.js +0 -329
  463. package/modern/Unstable_TrapFocus/FocusTrap.types.js +0 -1
  464. package/modern/Unstable_TrapFocus/index.js +0 -1
  465. package/modern/Zoom/Zoom.js +0 -210
  466. package/modern/Zoom/index.js +0 -1
  467. package/modern/className/index.js +0 -2
  468. package/modern/colors/amber.js +0 -17
  469. package/modern/colors/blue.js +0 -17
  470. package/modern/colors/blueGrey.js +0 -17
  471. package/modern/colors/brown.js +0 -17
  472. package/modern/colors/common.js +0 -5
  473. package/modern/colors/cyan.js +0 -17
  474. package/modern/colors/deepOrange.js +0 -17
  475. package/modern/colors/deepPurple.js +0 -17
  476. package/modern/colors/green.js +0 -17
  477. package/modern/colors/grey.js +0 -17
  478. package/modern/colors/index.js +0 -20
  479. package/modern/colors/indigo.js +0 -17
  480. package/modern/colors/lightBlue.js +0 -17
  481. package/modern/colors/lightGreen.js +0 -17
  482. package/modern/colors/lime.js +0 -17
  483. package/modern/colors/orange.js +0 -17
  484. package/modern/colors/pink.js +0 -17
  485. package/modern/colors/purple.js +0 -17
  486. package/modern/colors/red.js +0 -17
  487. package/modern/colors/teal.js +0 -17
  488. package/modern/colors/yellow.js +0 -17
  489. package/modern/darkScrollbar/index.js +0 -32
  490. package/modern/generateUtilityClass/index.js +0 -1
  491. package/modern/generateUtilityClasses/index.js +0 -1
  492. package/modern/index.js +0 -286
  493. package/modern/internal/SwitchBase.js +0 -355
  494. package/modern/internal/animate.js +0 -39
  495. package/modern/internal/svg-icons/Add.js +0 -12
  496. package/modern/internal/svg-icons/ArrowDownward.js +0 -12
  497. package/modern/internal/svg-icons/ArrowDropDown.js +0 -12
  498. package/modern/internal/svg-icons/Cancel.js +0 -12
  499. package/modern/internal/svg-icons/CheckBox.js +0 -12
  500. package/modern/internal/svg-icons/CheckBoxOutlineBlank.js +0 -12
  501. package/modern/internal/svg-icons/CheckCircle.js +0 -12
  502. package/modern/internal/svg-icons/Close.js +0 -14
  503. package/modern/internal/svg-icons/ErrorOutline.js +0 -12
  504. package/modern/internal/svg-icons/FirstPage.js +0 -12
  505. package/modern/internal/svg-icons/IndeterminateCheckBox.js +0 -12
  506. package/modern/internal/svg-icons/InfoOutlined.js +0 -12
  507. package/modern/internal/svg-icons/KeyboardArrowLeft.js +0 -12
  508. package/modern/internal/svg-icons/KeyboardArrowRight.js +0 -12
  509. package/modern/internal/svg-icons/LastPage.js +0 -12
  510. package/modern/internal/svg-icons/MoreHoriz.js +0 -12
  511. package/modern/internal/svg-icons/NavigateBefore.js +0 -12
  512. package/modern/internal/svg-icons/NavigateNext.js +0 -12
  513. package/modern/internal/svg-icons/Person.js +0 -12
  514. package/modern/internal/svg-icons/RadioButtonChecked.js +0 -12
  515. package/modern/internal/svg-icons/RadioButtonUnchecked.js +0 -12
  516. package/modern/internal/svg-icons/ReportProblemOutlined.js +0 -12
  517. package/modern/internal/svg-icons/Star.js +0 -12
  518. package/modern/internal/svg-icons/StarBorder.js +0 -12
  519. package/modern/internal/svg-icons/SuccessOutlined.js +0 -12
  520. package/modern/internal/svg-icons/Warning.js +0 -12
  521. package/modern/internal/switchBaseClasses.js +0 -7
  522. package/modern/locale/index.js +0 -4324
  523. package/modern/package.json +0 -1
  524. package/modern/styles/ThemeProvider.js +0 -40
  525. package/modern/styles/ThemeProviderNoVars.js +0 -17
  526. package/modern/styles/ThemeProviderWithVars.js +0 -91
  527. package/modern/styles/adaptV4Theme.js +0 -83
  528. package/modern/styles/components.js +0 -1
  529. package/modern/styles/createColorScheme.js +0 -41
  530. package/modern/styles/createGetSelector.js +0 -60
  531. package/modern/styles/createMixins.js +0 -16
  532. package/modern/styles/createMuiStrictModeTheme.js +0 -7
  533. package/modern/styles/createPalette.js +0 -302
  534. package/modern/styles/createStyles.js +0 -10
  535. package/modern/styles/createTheme.js +0 -98
  536. package/modern/styles/createThemeNoVars.js +0 -91
  537. package/modern/styles/createThemeWithVars.js +0 -386
  538. package/modern/styles/createTransitions.js +0 -89
  539. package/modern/styles/createTypography.js +0 -92
  540. package/modern/styles/cssUtils.js +0 -125
  541. package/modern/styles/defaultTheme.js +0 -5
  542. package/modern/styles/excludeVariablesFromRoot.js +0 -5
  543. package/modern/styles/experimental_extendTheme.js +0 -9
  544. package/modern/styles/getOverlayAlpha.js +0 -10
  545. package/modern/styles/identifier.js +0 -1
  546. package/modern/styles/index.js +0 -37
  547. package/modern/styles/makeStyles.js +0 -4
  548. package/modern/styles/overrides.js +0 -1
  549. package/modern/styles/props.js +0 -1
  550. package/modern/styles/responsiveFontSizes.js +0 -67
  551. package/modern/styles/rootShouldForwardProp.js +0 -3
  552. package/modern/styles/shadows.js +0 -10
  553. package/modern/styles/shouldSkipGeneratingVar.js +0 -5
  554. package/modern/styles/slotShouldForwardProp.js +0 -5
  555. package/modern/styles/stringifyTheme.js +0 -54
  556. package/modern/styles/styled.js +0 -14
  557. package/modern/styles/useTheme.js +0 -15
  558. package/modern/styles/useThemeProps.js +0 -16
  559. package/modern/styles/variants.js +0 -1
  560. package/modern/styles/withStyles.js +0 -4
  561. package/modern/styles/withTheme.js +0 -4
  562. package/modern/styles/zIndex.js +0 -13
  563. package/modern/transitions/index.js +0 -1
  564. package/modern/transitions/transition.js +0 -1
  565. package/modern/transitions/utils.js +0 -13
  566. package/modern/types/OverridableComponentAugmentation.js +0 -1
  567. package/modern/useAutocomplete/index.js +0 -1
  568. package/modern/useAutocomplete/useAutocomplete.js +0 -973
  569. package/modern/useLazyRipple/index.js +0 -3
  570. package/modern/useLazyRipple/useLazyRipple.js +0 -85
  571. package/modern/useMediaQuery/index.js +0 -6
  572. package/modern/usePagination/index.js +0 -1
  573. package/modern/usePagination/usePagination.js +0 -113
  574. package/modern/useScrollTrigger/index.js +0 -1
  575. package/modern/useScrollTrigger/useScrollTrigger.js +0 -55
  576. package/modern/utils/PolymorphicComponent.js +0 -1
  577. package/modern/utils/areArraysEqual.js +0 -4
  578. package/modern/utils/capitalize.js +0 -2
  579. package/modern/utils/createChainedFunction.js +0 -2
  580. package/modern/utils/createSimplePaletteValueFilter.js +0 -41
  581. package/modern/utils/createSvgIcon.js +0 -26
  582. package/modern/utils/debounce.js +0 -2
  583. package/modern/utils/deprecatedPropType.js +0 -2
  584. package/modern/utils/getScrollbarSize.js +0 -2
  585. package/modern/utils/index.js +0 -31
  586. package/modern/utils/isHostComponent.js +0 -7
  587. package/modern/utils/isMuiElement.js +0 -2
  588. package/modern/utils/memoTheme.js +0 -3
  589. package/modern/utils/mergeSlotProps.js +0 -75
  590. package/modern/utils/omitEventHandlers.js +0 -18
  591. package/modern/utils/ownerDocument.js +0 -2
  592. package/modern/utils/ownerWindow.js +0 -2
  593. package/modern/utils/requirePropFactory.js +0 -2
  594. package/modern/utils/setRef.js +0 -2
  595. package/modern/utils/shouldSpreadAdditionalProps.js +0 -5
  596. package/modern/utils/types.js +0 -1
  597. package/modern/utils/unsupportedProp.js +0 -2
  598. package/modern/utils/useControlled.js +0 -4
  599. package/modern/utils/useEnhancedEffect.js +0 -4
  600. package/modern/utils/useEventCallback.js +0 -4
  601. package/modern/utils/useForkRef.js +0 -4
  602. package/modern/utils/useId.js +0 -4
  603. package/modern/utils/useSlot.js +0 -80
  604. package/modern/version/index.js +0 -6
  605. package/modern/zero-styled/index.js +0 -27
  606. package/tsconfig.build.tsbuildinfo +0 -1
@@ -1,1186 +0,0 @@
1
- 'use client';
2
-
3
- var _ClearIcon, _ArrowDropDownIcon;
4
- import * as React from 'react';
5
- import PropTypes from 'prop-types';
6
- import clsx from 'clsx';
7
- import integerPropType from '@mui/utils/integerPropType';
8
- import chainPropTypes from '@mui/utils/chainPropTypes';
9
- import composeClasses from '@mui/utils/composeClasses';
10
- import { alpha } from '@mui/system/colorManipulator';
11
- import useAutocomplete, { createFilterOptions } from "../useAutocomplete/index.js";
12
- import Popper from "../Popper/index.js";
13
- import ListSubheader from "../ListSubheader/index.js";
14
- import Paper from "../Paper/index.js";
15
- import IconButton from "../IconButton/index.js";
16
- import Chip from "../Chip/index.js";
17
- import inputClasses from "../Input/inputClasses.js";
18
- import inputBaseClasses from "../InputBase/inputBaseClasses.js";
19
- import outlinedInputClasses from "../OutlinedInput/outlinedInputClasses.js";
20
- import filledInputClasses from "../FilledInput/filledInputClasses.js";
21
- import ClearIcon from "../internal/svg-icons/Close.js";
22
- import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.js";
23
- import { styled } from "../zero-styled/index.js";
24
- import memoTheme from "../utils/memoTheme.js";
25
- import { useDefaultProps } from "../DefaultPropsProvider/index.js";
26
- import autocompleteClasses, { getAutocompleteUtilityClass } from "./autocompleteClasses.js";
27
- import capitalize from "../utils/capitalize.js";
28
- import useSlot from "../utils/useSlot.js";
29
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
- const useUtilityClasses = ownerState => {
31
- const {
32
- classes,
33
- disablePortal,
34
- expanded,
35
- focused,
36
- fullWidth,
37
- hasClearIcon,
38
- hasPopupIcon,
39
- inputFocused,
40
- popupOpen,
41
- size
42
- } = ownerState;
43
- const slots = {
44
- root: ['root', expanded && 'expanded', focused && 'focused', fullWidth && 'fullWidth', hasClearIcon && 'hasClearIcon', hasPopupIcon && 'hasPopupIcon'],
45
- inputRoot: ['inputRoot'],
46
- input: ['input', inputFocused && 'inputFocused'],
47
- tag: ['tag', `tagSize${capitalize(size)}`],
48
- endAdornment: ['endAdornment'],
49
- clearIndicator: ['clearIndicator'],
50
- popupIndicator: ['popupIndicator', popupOpen && 'popupIndicatorOpen'],
51
- popper: ['popper', disablePortal && 'popperDisablePortal'],
52
- paper: ['paper'],
53
- listbox: ['listbox'],
54
- loading: ['loading'],
55
- noOptions: ['noOptions'],
56
- option: ['option'],
57
- groupLabel: ['groupLabel'],
58
- groupUl: ['groupUl']
59
- };
60
- return composeClasses(slots, getAutocompleteUtilityClass, classes);
61
- };
62
- const AutocompleteRoot = styled('div', {
63
- name: 'MuiAutocomplete',
64
- slot: 'Root',
65
- overridesResolver: (props, styles) => {
66
- const {
67
- ownerState
68
- } = props;
69
- const {
70
- fullWidth,
71
- hasClearIcon,
72
- hasPopupIcon,
73
- inputFocused,
74
- size
75
- } = ownerState;
76
- return [{
77
- [`& .${autocompleteClasses.tag}`]: styles.tag
78
- }, {
79
- [`& .${autocompleteClasses.tag}`]: styles[`tagSize${capitalize(size)}`]
80
- }, {
81
- [`& .${autocompleteClasses.inputRoot}`]: styles.inputRoot
82
- }, {
83
- [`& .${autocompleteClasses.input}`]: styles.input
84
- }, {
85
- [`& .${autocompleteClasses.input}`]: inputFocused && styles.inputFocused
86
- }, styles.root, fullWidth && styles.fullWidth, hasPopupIcon && styles.hasPopupIcon, hasClearIcon && styles.hasClearIcon];
87
- }
88
- })({
89
- [`&.${autocompleteClasses.focused} .${autocompleteClasses.clearIndicator}`]: {
90
- visibility: 'visible'
91
- },
92
- /* Avoid double tap issue on iOS */
93
- '@media (pointer: fine)': {
94
- [`&:hover .${autocompleteClasses.clearIndicator}`]: {
95
- visibility: 'visible'
96
- }
97
- },
98
- [`& .${autocompleteClasses.tag}`]: {
99
- margin: 3,
100
- maxWidth: 'calc(100% - 6px)'
101
- },
102
- [`& .${autocompleteClasses.inputRoot}`]: {
103
- [`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
104
- paddingRight: 26 + 4
105
- },
106
- [`.${autocompleteClasses.hasPopupIcon}.${autocompleteClasses.hasClearIcon}&`]: {
107
- paddingRight: 52 + 4
108
- },
109
- [`& .${autocompleteClasses.input}`]: {
110
- width: 0,
111
- minWidth: 30
112
- }
113
- },
114
- [`& .${inputClasses.root}`]: {
115
- paddingBottom: 1,
116
- '& .MuiInput-input': {
117
- padding: '4px 4px 4px 0px'
118
- }
119
- },
120
- [`& .${inputClasses.root}.${inputBaseClasses.sizeSmall}`]: {
121
- [`& .${inputClasses.input}`]: {
122
- padding: '2px 4px 3px 0'
123
- }
124
- },
125
- [`& .${outlinedInputClasses.root}`]: {
126
- padding: 9,
127
- [`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
128
- paddingRight: 26 + 4 + 9
129
- },
130
- [`.${autocompleteClasses.hasPopupIcon}.${autocompleteClasses.hasClearIcon}&`]: {
131
- paddingRight: 52 + 4 + 9
132
- },
133
- [`& .${autocompleteClasses.input}`]: {
134
- padding: '7.5px 4px 7.5px 5px'
135
- },
136
- [`& .${autocompleteClasses.endAdornment}`]: {
137
- right: 9
138
- }
139
- },
140
- [`& .${outlinedInputClasses.root}.${inputBaseClasses.sizeSmall}`]: {
141
- // Don't specify paddingRight, as it overrides the default value set when there is only
142
- // one of the popup or clear icon as the specificity is equal so the latter one wins
143
- paddingTop: 6,
144
- paddingBottom: 6,
145
- paddingLeft: 6,
146
- [`& .${autocompleteClasses.input}`]: {
147
- padding: '2.5px 4px 2.5px 8px'
148
- }
149
- },
150
- [`& .${filledInputClasses.root}`]: {
151
- paddingTop: 19,
152
- paddingLeft: 8,
153
- [`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
154
- paddingRight: 26 + 4 + 9
155
- },
156
- [`.${autocompleteClasses.hasPopupIcon}.${autocompleteClasses.hasClearIcon}&`]: {
157
- paddingRight: 52 + 4 + 9
158
- },
159
- [`& .${filledInputClasses.input}`]: {
160
- padding: '7px 4px'
161
- },
162
- [`& .${autocompleteClasses.endAdornment}`]: {
163
- right: 9
164
- }
165
- },
166
- [`& .${filledInputClasses.root}.${inputBaseClasses.sizeSmall}`]: {
167
- paddingBottom: 1,
168
- [`& .${filledInputClasses.input}`]: {
169
- padding: '2.5px 4px'
170
- }
171
- },
172
- [`& .${inputBaseClasses.hiddenLabel}`]: {
173
- paddingTop: 8
174
- },
175
- [`& .${filledInputClasses.root}.${inputBaseClasses.hiddenLabel}`]: {
176
- paddingTop: 0,
177
- paddingBottom: 0,
178
- [`& .${autocompleteClasses.input}`]: {
179
- paddingTop: 16,
180
- paddingBottom: 17
181
- }
182
- },
183
- [`& .${filledInputClasses.root}.${inputBaseClasses.hiddenLabel}.${inputBaseClasses.sizeSmall}`]: {
184
- [`& .${autocompleteClasses.input}`]: {
185
- paddingTop: 8,
186
- paddingBottom: 9
187
- }
188
- },
189
- [`& .${autocompleteClasses.input}`]: {
190
- flexGrow: 1,
191
- textOverflow: 'ellipsis',
192
- opacity: 0
193
- },
194
- variants: [{
195
- props: {
196
- fullWidth: true
197
- },
198
- style: {
199
- width: '100%'
200
- }
201
- }, {
202
- props: {
203
- size: 'small'
204
- },
205
- style: {
206
- [`& .${autocompleteClasses.tag}`]: {
207
- margin: 2,
208
- maxWidth: 'calc(100% - 4px)'
209
- }
210
- }
211
- }, {
212
- props: {
213
- inputFocused: true
214
- },
215
- style: {
216
- [`& .${autocompleteClasses.input}`]: {
217
- opacity: 1
218
- }
219
- }
220
- }, {
221
- props: {
222
- multiple: true
223
- },
224
- style: {
225
- [`& .${autocompleteClasses.inputRoot}`]: {
226
- flexWrap: 'wrap'
227
- }
228
- }
229
- }]
230
- });
231
- const AutocompleteEndAdornment = styled('div', {
232
- name: 'MuiAutocomplete',
233
- slot: 'EndAdornment',
234
- overridesResolver: (props, styles) => styles.endAdornment
235
- })({
236
- // We use a position absolute to support wrapping tags.
237
- position: 'absolute',
238
- right: 0,
239
- top: '50%',
240
- transform: 'translate(0, -50%)'
241
- });
242
- const AutocompleteClearIndicator = styled(IconButton, {
243
- name: 'MuiAutocomplete',
244
- slot: 'ClearIndicator',
245
- overridesResolver: (props, styles) => styles.clearIndicator
246
- })({
247
- marginRight: -2,
248
- padding: 4,
249
- visibility: 'hidden'
250
- });
251
- const AutocompletePopupIndicator = styled(IconButton, {
252
- name: 'MuiAutocomplete',
253
- slot: 'PopupIndicator',
254
- overridesResolver: (props, styles) => {
255
- const {
256
- ownerState
257
- } = props;
258
- return [styles.popupIndicator, ownerState.popupOpen && styles.popupIndicatorOpen];
259
- }
260
- })({
261
- padding: 2,
262
- marginRight: -2,
263
- variants: [{
264
- props: {
265
- popupOpen: true
266
- },
267
- style: {
268
- transform: 'rotate(180deg)'
269
- }
270
- }]
271
- });
272
- const AutocompletePopper = styled(Popper, {
273
- name: 'MuiAutocomplete',
274
- slot: 'Popper',
275
- overridesResolver: (props, styles) => {
276
- const {
277
- ownerState
278
- } = props;
279
- return [{
280
- [`& .${autocompleteClasses.option}`]: styles.option
281
- }, styles.popper, ownerState.disablePortal && styles.popperDisablePortal];
282
- }
283
- })(memoTheme(({
284
- theme
285
- }) => ({
286
- zIndex: (theme.vars || theme).zIndex.modal,
287
- variants: [{
288
- props: {
289
- disablePortal: true
290
- },
291
- style: {
292
- position: 'absolute'
293
- }
294
- }]
295
- })));
296
- const AutocompletePaper = styled(Paper, {
297
- name: 'MuiAutocomplete',
298
- slot: 'Paper',
299
- overridesResolver: (props, styles) => styles.paper
300
- })(memoTheme(({
301
- theme
302
- }) => ({
303
- ...theme.typography.body1,
304
- overflow: 'auto'
305
- })));
306
- const AutocompleteLoading = styled('div', {
307
- name: 'MuiAutocomplete',
308
- slot: 'Loading',
309
- overridesResolver: (props, styles) => styles.loading
310
- })(memoTheme(({
311
- theme
312
- }) => ({
313
- color: (theme.vars || theme).palette.text.secondary,
314
- padding: '14px 16px'
315
- })));
316
- const AutocompleteNoOptions = styled('div', {
317
- name: 'MuiAutocomplete',
318
- slot: 'NoOptions',
319
- overridesResolver: (props, styles) => styles.noOptions
320
- })(memoTheme(({
321
- theme
322
- }) => ({
323
- color: (theme.vars || theme).palette.text.secondary,
324
- padding: '14px 16px'
325
- })));
326
- const AutocompleteListbox = styled('ul', {
327
- name: 'MuiAutocomplete',
328
- slot: 'Listbox',
329
- overridesResolver: (props, styles) => styles.listbox
330
- })(memoTheme(({
331
- theme
332
- }) => ({
333
- listStyle: 'none',
334
- margin: 0,
335
- padding: '8px 0',
336
- maxHeight: '40vh',
337
- overflow: 'auto',
338
- position: 'relative',
339
- [`& .${autocompleteClasses.option}`]: {
340
- minHeight: 48,
341
- display: 'flex',
342
- overflow: 'hidden',
343
- justifyContent: 'flex-start',
344
- alignItems: 'center',
345
- cursor: 'pointer',
346
- paddingTop: 6,
347
- boxSizing: 'border-box',
348
- outline: '0',
349
- WebkitTapHighlightColor: 'transparent',
350
- paddingBottom: 6,
351
- paddingLeft: 16,
352
- paddingRight: 16,
353
- [theme.breakpoints.up('sm')]: {
354
- minHeight: 'auto'
355
- },
356
- [`&.${autocompleteClasses.focused}`]: {
357
- backgroundColor: (theme.vars || theme).palette.action.hover,
358
- // Reset on touch devices, it doesn't add specificity
359
- '@media (hover: none)': {
360
- backgroundColor: 'transparent'
361
- }
362
- },
363
- '&[aria-disabled="true"]': {
364
- opacity: (theme.vars || theme).palette.action.disabledOpacity,
365
- pointerEvents: 'none'
366
- },
367
- [`&.${autocompleteClasses.focusVisible}`]: {
368
- backgroundColor: (theme.vars || theme).palette.action.focus
369
- },
370
- '&[aria-selected="true"]': {
371
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
372
- [`&.${autocompleteClasses.focused}`]: {
373
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
374
- // Reset on touch devices, it doesn't add specificity
375
- '@media (hover: none)': {
376
- backgroundColor: (theme.vars || theme).palette.action.selected
377
- }
378
- },
379
- [`&.${autocompleteClasses.focusVisible}`]: {
380
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
381
- }
382
- }
383
- }
384
- })));
385
- const AutocompleteGroupLabel = styled(ListSubheader, {
386
- name: 'MuiAutocomplete',
387
- slot: 'GroupLabel',
388
- overridesResolver: (props, styles) => styles.groupLabel
389
- })(memoTheme(({
390
- theme
391
- }) => ({
392
- backgroundColor: (theme.vars || theme).palette.background.paper,
393
- top: -8
394
- })));
395
- const AutocompleteGroupUl = styled('ul', {
396
- name: 'MuiAutocomplete',
397
- slot: 'GroupUl',
398
- overridesResolver: (props, styles) => styles.groupUl
399
- })({
400
- padding: 0,
401
- [`& .${autocompleteClasses.option}`]: {
402
- paddingLeft: 24
403
- }
404
- });
405
- export { createFilterOptions };
406
- const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
407
- const props = useDefaultProps({
408
- props: inProps,
409
- name: 'MuiAutocomplete'
410
- });
411
-
412
- /* eslint-disable @typescript-eslint/no-unused-vars */
413
- const {
414
- autoComplete = false,
415
- autoHighlight = false,
416
- autoSelect = false,
417
- blurOnSelect = false,
418
- ChipProps: ChipPropsProp,
419
- className,
420
- clearIcon = _ClearIcon || (_ClearIcon = /*#__PURE__*/_jsx(ClearIcon, {
421
- fontSize: "small"
422
- })),
423
- clearOnBlur = !props.freeSolo,
424
- clearOnEscape = false,
425
- clearText = 'Clear',
426
- closeText = 'Close',
427
- componentsProps,
428
- defaultValue = props.multiple ? [] : null,
429
- disableClearable = false,
430
- disableCloseOnSelect = false,
431
- disabled = false,
432
- disabledItemsFocusable = false,
433
- disableListWrap = false,
434
- disablePortal = false,
435
- filterOptions,
436
- filterSelectedOptions = false,
437
- forcePopupIcon = 'auto',
438
- freeSolo = false,
439
- fullWidth = false,
440
- getLimitTagsText = more => `+${more}`,
441
- getOptionDisabled,
442
- getOptionKey,
443
- getOptionLabel: getOptionLabelProp,
444
- isOptionEqualToValue,
445
- groupBy,
446
- handleHomeEndKeys = !props.freeSolo,
447
- id: idProp,
448
- includeInputInList = false,
449
- inputValue: inputValueProp,
450
- limitTags = -1,
451
- ListboxComponent: ListboxComponentProp,
452
- ListboxProps: ListboxPropsProp,
453
- loading = false,
454
- loadingText = 'Loading…',
455
- multiple = false,
456
- noOptionsText = 'No options',
457
- onChange,
458
- onClose,
459
- onHighlightChange,
460
- onInputChange,
461
- onOpen,
462
- open,
463
- openOnFocus = false,
464
- openText = 'Open',
465
- options,
466
- PaperComponent: PaperComponentProp,
467
- PopperComponent: PopperComponentProp,
468
- popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/_jsx(ArrowDropDownIcon, {})),
469
- readOnly = false,
470
- renderGroup: renderGroupProp,
471
- renderInput,
472
- renderOption: renderOptionProp,
473
- renderTags,
474
- selectOnFocus = !props.freeSolo,
475
- size = 'medium',
476
- slots = {},
477
- slotProps = {},
478
- value: valueProp,
479
- ...other
480
- } = props;
481
- /* eslint-enable @typescript-eslint/no-unused-vars */
482
-
483
- const {
484
- getRootProps,
485
- getInputProps,
486
- getInputLabelProps,
487
- getPopupIndicatorProps,
488
- getClearProps,
489
- getTagProps,
490
- getListboxProps,
491
- getOptionProps,
492
- value,
493
- dirty,
494
- expanded,
495
- id,
496
- popupOpen,
497
- focused,
498
- focusedTag,
499
- anchorEl,
500
- setAnchorEl,
501
- inputValue,
502
- groupedOptions
503
- } = useAutocomplete({
504
- ...props,
505
- componentName: 'Autocomplete'
506
- });
507
- const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
508
- const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
509
- const {
510
- onMouseDown: handleInputMouseDown
511
- } = getInputProps();
512
- const {
513
- ref: listboxRef,
514
- ...otherListboxProps
515
- } = getListboxProps();
516
- const defaultGetOptionLabel = option => option.label ?? option;
517
- const getOptionLabel = getOptionLabelProp || defaultGetOptionLabel;
518
-
519
- // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
520
- const ownerState = {
521
- ...props,
522
- disablePortal,
523
- expanded,
524
- focused,
525
- fullWidth,
526
- getOptionLabel,
527
- hasClearIcon,
528
- hasPopupIcon,
529
- inputFocused: focusedTag === -1,
530
- popupOpen,
531
- size
532
- };
533
- const classes = useUtilityClasses(ownerState);
534
- const externalForwardedProps = {
535
- slots: {
536
- paper: PaperComponentProp,
537
- popper: PopperComponentProp,
538
- ...slots
539
- },
540
- slotProps: {
541
- chip: ChipPropsProp,
542
- listbox: ListboxPropsProp,
543
- ...componentsProps,
544
- ...slotProps
545
- }
546
- };
547
- const [ListboxSlot, listboxProps] = useSlot('listbox', {
548
- elementType: AutocompleteListbox,
549
- externalForwardedProps,
550
- ownerState,
551
- className: classes.listbox,
552
- additionalProps: otherListboxProps,
553
- ref: listboxRef
554
- });
555
- const [PaperSlot, paperProps] = useSlot('paper', {
556
- elementType: Paper,
557
- externalForwardedProps,
558
- ownerState,
559
- className: classes.paper
560
- });
561
- const [PopperSlot, popperProps] = useSlot('popper', {
562
- elementType: Popper,
563
- externalForwardedProps,
564
- ownerState,
565
- className: classes.popper,
566
- additionalProps: {
567
- disablePortal,
568
- style: {
569
- width: anchorEl ? anchorEl.clientWidth : null
570
- },
571
- role: 'presentation',
572
- anchorEl,
573
- open: popupOpen
574
- }
575
- });
576
- let startAdornment;
577
- if (multiple && value.length > 0) {
578
- const getCustomizedTagProps = params => ({
579
- className: classes.tag,
580
- disabled,
581
- ...getTagProps(params)
582
- });
583
- if (renderTags) {
584
- startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
585
- } else {
586
- startAdornment = value.map((option, index) => {
587
- const {
588
- key,
589
- ...customTagProps
590
- } = getCustomizedTagProps({
591
- index
592
- });
593
- return /*#__PURE__*/_jsx(Chip, {
594
- label: getOptionLabel(option),
595
- size: size,
596
- ...customTagProps,
597
- ...externalForwardedProps.slotProps.chip
598
- }, key);
599
- });
600
- }
601
- }
602
- if (limitTags > -1 && Array.isArray(startAdornment)) {
603
- const more = startAdornment.length - limitTags;
604
- if (!focused && more > 0) {
605
- startAdornment = startAdornment.splice(0, limitTags);
606
- startAdornment.push(/*#__PURE__*/_jsx("span", {
607
- className: classes.tag,
608
- children: getLimitTagsText(more)
609
- }, startAdornment.length));
610
- }
611
- }
612
- const defaultRenderGroup = params => /*#__PURE__*/_jsxs("li", {
613
- children: [/*#__PURE__*/_jsx(AutocompleteGroupLabel, {
614
- className: classes.groupLabel,
615
- ownerState: ownerState,
616
- component: "div",
617
- children: params.group
618
- }), /*#__PURE__*/_jsx(AutocompleteGroupUl, {
619
- className: classes.groupUl,
620
- ownerState: ownerState,
621
- children: params.children
622
- })]
623
- }, params.key);
624
- const renderGroup = renderGroupProp || defaultRenderGroup;
625
- const defaultRenderOption = (props2, option) => {
626
- // Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
627
- const {
628
- key,
629
- ...otherProps
630
- } = props2;
631
- return /*#__PURE__*/_jsx("li", {
632
- ...otherProps,
633
- children: getOptionLabel(option)
634
- }, key);
635
- };
636
- const renderOption = renderOptionProp || defaultRenderOption;
637
- const renderListOption = (option, index) => {
638
- const optionProps = getOptionProps({
639
- option,
640
- index
641
- });
642
- return renderOption({
643
- ...optionProps,
644
- className: classes.option
645
- }, option, {
646
- selected: optionProps['aria-selected'],
647
- index,
648
- inputValue
649
- }, ownerState);
650
- };
651
- const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
652
- const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
653
- return /*#__PURE__*/_jsxs(React.Fragment, {
654
- children: [/*#__PURE__*/_jsx(AutocompleteRoot, {
655
- ref: ref,
656
- className: clsx(classes.root, className),
657
- ownerState: ownerState,
658
- ...getRootProps(other),
659
- children: renderInput({
660
- id,
661
- disabled,
662
- fullWidth: true,
663
- size: size === 'small' ? 'small' : undefined,
664
- InputLabelProps: getInputLabelProps(),
665
- InputProps: {
666
- ref: setAnchorEl,
667
- className: classes.inputRoot,
668
- startAdornment,
669
- onMouseDown: event => {
670
- if (event.target === event.currentTarget) {
671
- handleInputMouseDown(event);
672
- }
673
- },
674
- ...((hasClearIcon || hasPopupIcon) && {
675
- endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
676
- className: classes.endAdornment,
677
- ownerState: ownerState,
678
- children: [hasClearIcon ? /*#__PURE__*/_jsx(AutocompleteClearIndicator, {
679
- ...getClearProps(),
680
- "aria-label": clearText,
681
- title: clearText,
682
- ownerState: ownerState,
683
- ...clearIndicatorSlotProps,
684
- className: clsx(classes.clearIndicator, clearIndicatorSlotProps?.className),
685
- children: clearIcon
686
- }) : null, hasPopupIcon ? /*#__PURE__*/_jsx(AutocompletePopupIndicator, {
687
- ...getPopupIndicatorProps(),
688
- disabled: disabled,
689
- "aria-label": popupOpen ? closeText : openText,
690
- title: popupOpen ? closeText : openText,
691
- ownerState: ownerState,
692
- ...popupIndicatorSlotProps,
693
- className: clsx(classes.popupIndicator, popupIndicatorSlotProps?.className),
694
- children: popupIcon
695
- }) : null]
696
- })
697
- })
698
- },
699
- inputProps: {
700
- className: classes.input,
701
- disabled,
702
- readOnly,
703
- ...getInputProps()
704
- }
705
- })
706
- }), anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
707
- as: PopperSlot,
708
- ...popperProps,
709
- children: /*#__PURE__*/_jsxs(AutocompletePaper, {
710
- as: PaperSlot,
711
- ...paperProps,
712
- children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
713
- className: classes.loading,
714
- ownerState: ownerState,
715
- children: loadingText
716
- }) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/_jsx(AutocompleteNoOptions, {
717
- className: classes.noOptions,
718
- ownerState: ownerState,
719
- role: "presentation",
720
- onMouseDown: event => {
721
- // Prevent input blur when interacting with the "no options" content
722
- event.preventDefault();
723
- },
724
- children: noOptionsText
725
- }) : null, groupedOptions.length > 0 ? /*#__PURE__*/_jsx(ListboxSlot, {
726
- as: ListboxComponentProp,
727
- ...listboxProps,
728
- children: groupedOptions.map((option, index) => {
729
- if (groupBy) {
730
- return renderGroup({
731
- key: option.key,
732
- group: option.group,
733
- children: option.options.map((option2, index2) => renderListOption(option2, option.index + index2))
734
- });
735
- }
736
- return renderListOption(option, index);
737
- })
738
- }) : null]
739
- })
740
- }) : null]
741
- });
742
- });
743
- process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptypes */ = {
744
- // ┌────────────────────────────── Warning ──────────────────────────────┐
745
- // │ These PropTypes are generated from the TypeScript type definitions. │
746
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
747
- // └─────────────────────────────────────────────────────────────────────┘
748
- /**
749
- * If `true`, the portion of the selected suggestion that the user hasn't typed,
750
- * known as the completion string, appears inline after the input cursor in the textbox.
751
- * The inline completion string is visually highlighted and has a selected state.
752
- * @default false
753
- */
754
- autoComplete: PropTypes.bool,
755
- /**
756
- * If `true`, the first option is automatically highlighted.
757
- * @default false
758
- */
759
- autoHighlight: PropTypes.bool,
760
- /**
761
- * If `true`, the selected option becomes the value of the input
762
- * when the Autocomplete loses focus unless the user chooses
763
- * a different option or changes the character string in the input.
764
- *
765
- * When using the `freeSolo` mode, the typed value will be the input value
766
- * if the Autocomplete loses focus without highlighting an option.
767
- * @default false
768
- */
769
- autoSelect: PropTypes.bool,
770
- /**
771
- * Control if the input should be blurred when an option is selected:
772
- *
773
- * - `false` the input is not blurred.
774
- * - `true` the input is always blurred.
775
- * - `touch` the input is blurred after a touch event.
776
- * - `mouse` the input is blurred after a mouse event.
777
- * @default false
778
- */
779
- blurOnSelect: PropTypes.oneOfType([PropTypes.oneOf(['mouse', 'touch']), PropTypes.bool]),
780
- /**
781
- * Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
782
- * @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.
783
- */
784
- ChipProps: PropTypes.object,
785
- /**
786
- * Override or extend the styles applied to the component.
787
- */
788
- classes: PropTypes.object,
789
- /**
790
- * @ignore
791
- */
792
- className: PropTypes.string,
793
- /**
794
- * The icon to display in place of the default clear icon.
795
- * @default <ClearIcon fontSize="small" />
796
- */
797
- clearIcon: PropTypes.node,
798
- /**
799
- * If `true`, the input's text is cleared on blur if no value is selected.
800
- *
801
- * Set it to `true` if you want to help the user enter a new value.
802
- * Set it to `false` if you want to help the user resume their search.
803
- * @default !props.freeSolo
804
- */
805
- clearOnBlur: PropTypes.bool,
806
- /**
807
- * If `true`, clear all values when the user presses escape and the popup is closed.
808
- * @default false
809
- */
810
- clearOnEscape: PropTypes.bool,
811
- /**
812
- * Override the default text for the *clear* icon button.
813
- *
814
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
815
- * @default 'Clear'
816
- */
817
- clearText: PropTypes.string,
818
- /**
819
- * Override the default text for the *close popup* icon button.
820
- *
821
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
822
- * @default 'Close'
823
- */
824
- closeText: PropTypes.string,
825
- /**
826
- * The props used for each slot inside.
827
- * @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.
828
- */
829
- componentsProps: PropTypes.shape({
830
- clearIndicator: PropTypes.object,
831
- paper: PropTypes.object,
832
- popper: PropTypes.object,
833
- popupIndicator: PropTypes.object
834
- }),
835
- /**
836
- * The default value. Use when the component is not controlled.
837
- * @default props.multiple ? [] : null
838
- */
839
- defaultValue: chainPropTypes(PropTypes.any, props => {
840
- if (props.multiple && props.defaultValue !== undefined && !Array.isArray(props.defaultValue)) {
841
- return new Error(['MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.', `However, ${props.defaultValue} was provided.`].join('\n'));
842
- }
843
- return null;
844
- }),
845
- /**
846
- * If `true`, the input can't be cleared.
847
- * @default false
848
- */
849
- disableClearable: PropTypes.bool,
850
- /**
851
- * If `true`, the popup won't close when a value is selected.
852
- * @default false
853
- */
854
- disableCloseOnSelect: PropTypes.bool,
855
- /**
856
- * If `true`, the component is disabled.
857
- * @default false
858
- */
859
- disabled: PropTypes.bool,
860
- /**
861
- * If `true`, will allow focus on disabled items.
862
- * @default false
863
- */
864
- disabledItemsFocusable: PropTypes.bool,
865
- /**
866
- * If `true`, the list box in the popup will not wrap focus.
867
- * @default false
868
- */
869
- disableListWrap: PropTypes.bool,
870
- /**
871
- * If `true`, the `Popper` content will be under the DOM hierarchy of the parent component.
872
- * @default false
873
- */
874
- disablePortal: PropTypes.bool,
875
- /**
876
- * A function that determines the filtered options to be rendered on search.
877
- *
878
- * @default createFilterOptions()
879
- * @param {Value[]} options The options to render.
880
- * @param {object} state The state of the component.
881
- * @returns {Value[]}
882
- */
883
- filterOptions: PropTypes.func,
884
- /**
885
- * If `true`, hide the selected options from the list box.
886
- * @default false
887
- */
888
- filterSelectedOptions: PropTypes.bool,
889
- /**
890
- * Force the visibility display of the popup icon.
891
- * @default 'auto'
892
- */
893
- forcePopupIcon: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.bool]),
894
- /**
895
- * If `true`, the Autocomplete is free solo, meaning that the user input is not bound to provided options.
896
- * @default false
897
- */
898
- freeSolo: PropTypes.bool,
899
- /**
900
- * If `true`, the input will take up the full width of its container.
901
- * @default false
902
- */
903
- fullWidth: PropTypes.bool,
904
- /**
905
- * The label to display when the tags are truncated (`limitTags`).
906
- *
907
- * @param {number} more The number of truncated tags.
908
- * @returns {ReactNode}
909
- * @default (more) => `+${more}`
910
- */
911
- getLimitTagsText: PropTypes.func,
912
- /**
913
- * Used to determine the disabled state for a given option.
914
- *
915
- * @param {Value} option The option to test.
916
- * @returns {boolean}
917
- */
918
- getOptionDisabled: PropTypes.func,
919
- /**
920
- * Used to determine the key for a given option.
921
- * This can be useful when the labels of options are not unique (since labels are used as keys by default).
922
- *
923
- * @param {Value} option The option to get the key for.
924
- * @returns {string | number}
925
- */
926
- getOptionKey: PropTypes.func,
927
- /**
928
- * Used to determine the string value for a given option.
929
- * It's used to fill the input (and the list box options if `renderOption` is not provided).
930
- *
931
- * If used in free solo mode, it must accept both the type of the options and a string.
932
- *
933
- * @param {Value} option
934
- * @returns {string}
935
- * @default (option) => option.label ?? option
936
- */
937
- getOptionLabel: PropTypes.func,
938
- /**
939
- * If provided, the options will be grouped under the returned string.
940
- * The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
941
- *
942
- * @param {Value} option The Autocomplete option.
943
- * @returns {string}
944
- */
945
- groupBy: PropTypes.func,
946
- /**
947
- * If `true`, the component handles the "Home" and "End" keys when the popup is open.
948
- * It should move focus to the first option and last option, respectively.
949
- * @default !props.freeSolo
950
- */
951
- handleHomeEndKeys: PropTypes.bool,
952
- /**
953
- * This prop is used to help implement the accessibility logic.
954
- * If you don't provide an id it will fall back to a randomly generated one.
955
- */
956
- id: PropTypes.string,
957
- /**
958
- * If `true`, the highlight can move to the input.
959
- * @default false
960
- */
961
- includeInputInList: PropTypes.bool,
962
- /**
963
- * The input value.
964
- */
965
- inputValue: PropTypes.string,
966
- /**
967
- * Used to determine if the option represents the given value.
968
- * Uses strict equality by default.
969
- * ⚠️ Both arguments need to be handled, an option can only match with one value.
970
- *
971
- * @param {Value} option The option to test.
972
- * @param {Value} value The value to test against.
973
- * @returns {boolean}
974
- */
975
- isOptionEqualToValue: PropTypes.func,
976
- /**
977
- * The maximum number of tags that will be visible when not focused.
978
- * Set `-1` to disable the limit.
979
- * @default -1
980
- */
981
- limitTags: integerPropType,
982
- /**
983
- * The component used to render the listbox.
984
- * @default 'ul'
985
- * @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.
986
- */
987
- ListboxComponent: PropTypes.elementType,
988
- /**
989
- * Props applied to the Listbox element.
990
- * @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.
991
- */
992
- ListboxProps: PropTypes.object,
993
- /**
994
- * If `true`, the component is in a loading state.
995
- * This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
996
- * @default false
997
- */
998
- loading: PropTypes.bool,
999
- /**
1000
- * Text to display when in a loading state.
1001
- *
1002
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
1003
- * @default 'Loading…'
1004
- */
1005
- loadingText: PropTypes.node,
1006
- /**
1007
- * If `true`, `value` must be an array and the menu will support multiple selections.
1008
- * @default false
1009
- */
1010
- multiple: PropTypes.bool,
1011
- /**
1012
- * Text to display when there are no options.
1013
- *
1014
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
1015
- * @default 'No options'
1016
- */
1017
- noOptionsText: PropTypes.node,
1018
- /**
1019
- * Callback fired when the value changes.
1020
- *
1021
- * @param {React.SyntheticEvent} event The event source of the callback.
1022
- * @param {Value|Value[]} value The new value of the component.
1023
- * @param {string} reason One of "createOption", "selectOption", "removeOption", "blur" or "clear".
1024
- * @param {string} [details]
1025
- */
1026
- onChange: PropTypes.func,
1027
- /**
1028
- * Callback fired when the popup requests to be closed.
1029
- * Use in controlled mode (see open).
1030
- *
1031
- * @param {React.SyntheticEvent} event The event source of the callback.
1032
- * @param {string} reason Can be: `"toggleInput"`, `"escape"`, `"selectOption"`, `"removeOption"`, `"blur"`.
1033
- */
1034
- onClose: PropTypes.func,
1035
- /**
1036
- * Callback fired when the highlight option changes.
1037
- *
1038
- * @param {React.SyntheticEvent} event The event source of the callback.
1039
- * @param {Value} option The highlighted option.
1040
- * @param {string} reason Can be: `"keyboard"`, `"mouse"`, `"touch"`.
1041
- */
1042
- onHighlightChange: PropTypes.func,
1043
- /**
1044
- * Callback fired when the input value changes.
1045
- *
1046
- * @param {React.SyntheticEvent} event The event source of the callback.
1047
- * @param {string} value The new value of the text input.
1048
- * @param {string} reason Can be: `"input"` (user input), `"reset"` (programmatic change), `"clear"`, `"blur"`, `"selectOption"`, `"removeOption"`
1049
- */
1050
- onInputChange: PropTypes.func,
1051
- /**
1052
- * @ignore
1053
- */
1054
- onKeyDown: PropTypes.func,
1055
- /**
1056
- * Callback fired when the popup requests to be opened.
1057
- * Use in controlled mode (see open).
1058
- *
1059
- * @param {React.SyntheticEvent} event The event source of the callback.
1060
- */
1061
- onOpen: PropTypes.func,
1062
- /**
1063
- * If `true`, the component is shown.
1064
- */
1065
- open: PropTypes.bool,
1066
- /**
1067
- * If `true`, the popup will open on input focus.
1068
- * @default false
1069
- */
1070
- openOnFocus: PropTypes.bool,
1071
- /**
1072
- * Override the default text for the *open popup* icon button.
1073
- *
1074
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
1075
- * @default 'Open'
1076
- */
1077
- openText: PropTypes.string,
1078
- /**
1079
- * A list of options that will be shown in the Autocomplete.
1080
- */
1081
- options: PropTypes.array.isRequired,
1082
- /**
1083
- * The component used to render the body of the popup.
1084
- * @default Paper
1085
- * @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.
1086
- */
1087
- PaperComponent: PropTypes.elementType,
1088
- /**
1089
- * The component used to position the popup.
1090
- * @default Popper
1091
- * @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.
1092
- */
1093
- PopperComponent: PropTypes.elementType,
1094
- /**
1095
- * The icon to display in place of the default popup icon.
1096
- * @default <ArrowDropDownIcon />
1097
- */
1098
- popupIcon: PropTypes.node,
1099
- /**
1100
- * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
1101
- * @default false
1102
- */
1103
- readOnly: PropTypes.bool,
1104
- /**
1105
- * Render the group.
1106
- *
1107
- * @param {AutocompleteRenderGroupParams} params The group to render.
1108
- * @returns {ReactNode}
1109
- */
1110
- renderGroup: PropTypes.func,
1111
- /**
1112
- * Render the input.
1113
- *
1114
- * @param {object} params
1115
- * @returns {ReactNode}
1116
- */
1117
- renderInput: PropTypes.func.isRequired,
1118
- /**
1119
- * Render the option, use `getOptionLabel` by default.
1120
- *
1121
- * @param {object} props The props to apply on the li element.
1122
- * @param {Value} option The option to render.
1123
- * @param {object} state The state of each option.
1124
- * @param {object} ownerState The state of the Autocomplete component.
1125
- * @returns {ReactNode}
1126
- */
1127
- renderOption: PropTypes.func,
1128
- /**
1129
- * Render the selected value.
1130
- *
1131
- * @param {Value[]} value The `value` provided to the component.
1132
- * @param {function} getTagProps A tag props getter.
1133
- * @param {object} ownerState The state of the Autocomplete component.
1134
- * @returns {ReactNode}
1135
- */
1136
- renderTags: PropTypes.func,
1137
- /**
1138
- * If `true`, the input's text is selected on focus.
1139
- * It helps the user clear the selected value.
1140
- * @default !props.freeSolo
1141
- */
1142
- selectOnFocus: PropTypes.bool,
1143
- /**
1144
- * The size of the component.
1145
- * @default 'medium'
1146
- */
1147
- size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium']), PropTypes.string]),
1148
- /**
1149
- * The props used for each slot inside.
1150
- * @default {}
1151
- */
1152
- slotProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({
1153
- chip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1154
- clearIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1155
- listbox: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1156
- paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1157
- popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1158
- popupIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
1159
- }),
1160
- /**
1161
- * The components used for each slot inside.
1162
- * @default {}
1163
- */
1164
- slots: PropTypes.shape({
1165
- listbox: PropTypes.elementType,
1166
- paper: PropTypes.elementType,
1167
- popper: PropTypes.elementType
1168
- }),
1169
- /**
1170
- * The system prop that allows defining system overrides as well as additional CSS styles.
1171
- */
1172
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
1173
- /**
1174
- * The value of the autocomplete.
1175
- *
1176
- * The value must have reference equality with the option in order to be selected.
1177
- * You can customize the equality behavior with the `isOptionEqualToValue` prop.
1178
- */
1179
- value: chainPropTypes(PropTypes.any, props => {
1180
- if (props.multiple && props.value !== undefined && !Array.isArray(props.value)) {
1181
- return new Error(['MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.', `However, ${props.value} was provided.`].join('\n'));
1182
- }
1183
- return null;
1184
- })
1185
- } : void 0;
1186
- export default Autocomplete;