@mui/material 9.0.0 → 9.1.0

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 (278) hide show
  1. package/Accordion/Accordion.d.mts +2 -2
  2. package/Accordion/Accordion.d.ts +2 -2
  3. package/Accordion/Accordion.js +3 -2
  4. package/Accordion/Accordion.mjs +3 -2
  5. package/AccordionSummary/AccordionSummary.js +27 -29
  6. package/AccordionSummary/AccordionSummary.mjs +27 -29
  7. package/Autocomplete/Autocomplete.js +73 -17
  8. package/Autocomplete/Autocomplete.mjs +73 -17
  9. package/Avatar/Avatar.js +4 -0
  10. package/Avatar/Avatar.mjs +4 -0
  11. package/Backdrop/Backdrop.d.mts +2 -2
  12. package/Backdrop/Backdrop.d.ts +2 -2
  13. package/Badge/Badge.js +31 -24
  14. package/Badge/Badge.mjs +31 -24
  15. package/BottomNavigationAction/BottomNavigationAction.js +6 -2
  16. package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
  17. package/Button/Button.js +19 -6
  18. package/Button/Button.mjs +19 -6
  19. package/ButtonBase/ButtonBase.d.mts +7 -0
  20. package/ButtonBase/ButtonBase.d.ts +7 -0
  21. package/ButtonBase/ButtonBase.js +5 -2
  22. package/ButtonBase/ButtonBase.mjs +5 -2
  23. package/ButtonBase/Ripple.js +21 -11
  24. package/ButtonBase/Ripple.mjs +21 -11
  25. package/ButtonBase/TouchRipple.js +252 -116
  26. package/ButtonBase/TouchRipple.mjs +253 -117
  27. package/CHANGELOG.md +216 -1245
  28. package/CardActionArea/CardActionArea.js +2 -1
  29. package/CardActionArea/CardActionArea.mjs +2 -1
  30. package/Checkbox/Checkbox.js +2 -1
  31. package/Checkbox/Checkbox.mjs +2 -1
  32. package/Chip/Chip.js +2 -1
  33. package/Chip/Chip.mjs +2 -1
  34. package/CircularProgress/CircularProgress.d.mts +12 -2
  35. package/CircularProgress/CircularProgress.d.ts +12 -2
  36. package/CircularProgress/CircularProgress.js +115 -58
  37. package/CircularProgress/CircularProgress.mjs +114 -58
  38. package/ClickAwayListener/ClickAwayListener.js +3 -6
  39. package/ClickAwayListener/ClickAwayListener.mjs +3 -6
  40. package/Collapse/Collapse.d.mts +15 -3
  41. package/Collapse/Collapse.d.ts +15 -3
  42. package/Collapse/Collapse.js +44 -31
  43. package/Collapse/Collapse.mjs +43 -30
  44. package/Dialog/Dialog.d.mts +2 -2
  45. package/Dialog/Dialog.d.ts +2 -2
  46. package/Dialog/Dialog.js +13 -6
  47. package/Dialog/Dialog.mjs +13 -6
  48. package/Drawer/Drawer.d.mts +2 -2
  49. package/Drawer/Drawer.d.ts +2 -2
  50. package/Drawer/Drawer.js +18 -4
  51. package/Drawer/Drawer.mjs +18 -4
  52. package/Fab/Fab.js +9 -2
  53. package/Fab/Fab.mjs +9 -2
  54. package/Fade/Fade.d.mts +15 -2
  55. package/Fade/Fade.d.ts +15 -2
  56. package/Fade/Fade.js +46 -19
  57. package/Fade/Fade.mjs +45 -18
  58. package/FilledInput/FilledInput.d.mts +4 -0
  59. package/FilledInput/FilledInput.d.ts +4 -0
  60. package/FilledInput/FilledInput.js +22 -23
  61. package/FilledInput/FilledInput.mjs +22 -23
  62. package/FormControl/useFormControl.d.mts +12 -2
  63. package/FormControl/useFormControl.d.ts +12 -2
  64. package/FormControl/useFormControl.js +13 -0
  65. package/FormControl/useFormControl.mjs +12 -0
  66. package/FormControlLabel/FormControlLabel.js +5 -8
  67. package/FormControlLabel/FormControlLabel.mjs +5 -8
  68. package/FormGroup/FormGroup.js +2 -5
  69. package/FormGroup/FormGroup.mjs +2 -5
  70. package/FormHelperText/FormHelperText.js +2 -5
  71. package/FormHelperText/FormHelperText.mjs +2 -5
  72. package/FormLabel/FormLabel.js +2 -5
  73. package/FormLabel/FormLabel.mjs +2 -5
  74. package/Grow/Grow.d.mts +15 -2
  75. package/Grow/Grow.d.ts +15 -2
  76. package/Grow/Grow.js +45 -28
  77. package/Grow/Grow.mjs +44 -27
  78. package/IconButton/IconButton.js +3 -9
  79. package/IconButton/IconButton.mjs +3 -9
  80. package/Input/Input.d.mts +4 -0
  81. package/Input/Input.d.ts +4 -0
  82. package/Input/Input.js +9 -2
  83. package/Input/Input.mjs +9 -2
  84. package/InputBase/InputBase.d.mts +2 -1
  85. package/InputBase/InputBase.d.ts +2 -1
  86. package/InputBase/InputBase.js +52 -16
  87. package/InputBase/InputBase.mjs +52 -16
  88. package/InputLabel/InputLabel.js +7 -9
  89. package/InputLabel/InputLabel.mjs +7 -9
  90. package/LICENSE +1 -1
  91. package/LinearProgress/LinearProgress.d.mts +12 -2
  92. package/LinearProgress/LinearProgress.d.ts +12 -2
  93. package/LinearProgress/LinearProgress.js +225 -126
  94. package/LinearProgress/LinearProgress.mjs +224 -126
  95. package/List/List.js +2 -1
  96. package/List/List.mjs +2 -1
  97. package/ListItem/ListItem.js +2 -1
  98. package/ListItem/ListItem.mjs +2 -1
  99. package/ListItemButton/ListItemButton.js +9 -2
  100. package/ListItemButton/ListItemButton.mjs +9 -2
  101. package/Menu/Menu.d.mts +1 -1
  102. package/Menu/Menu.d.ts +1 -1
  103. package/MenuItem/MenuItem.js +7 -1
  104. package/MenuItem/MenuItem.mjs +7 -1
  105. package/MenuList/MenuList.js +2 -1
  106. package/MenuList/MenuList.mjs +2 -1
  107. package/MobileStepper/MobileStepper.js +2 -1
  108. package/MobileStepper/MobileStepper.mjs +2 -1
  109. package/NativeSelect/NativeSelect.js +2 -5
  110. package/NativeSelect/NativeSelect.mjs +2 -5
  111. package/OutlinedInput/NotchedOutline.js +4 -3
  112. package/OutlinedInput/NotchedOutline.mjs +4 -3
  113. package/OutlinedInput/OutlinedInput.js +13 -23
  114. package/OutlinedInput/OutlinedInput.mjs +13 -23
  115. package/PaginationItem/PaginationItem.js +2 -1
  116. package/PaginationItem/PaginationItem.mjs +2 -1
  117. package/Paper/Paper.js +2 -1
  118. package/Paper/Paper.mjs +2 -1
  119. package/PigmentContainer/PigmentContainer.js +0 -1
  120. package/PigmentContainer/PigmentContainer.mjs +0 -1
  121. package/Popover/Popover.d.mts +1 -1
  122. package/Popover/Popover.d.ts +1 -1
  123. package/Popper/BasePopper.js +23 -1
  124. package/Popper/BasePopper.mjs +23 -1
  125. package/README.md +3 -2
  126. package/Radio/RadioButtonIcon.js +3 -2
  127. package/Radio/RadioButtonIcon.mjs +3 -2
  128. package/Rating/Rating.js +2 -1
  129. package/Rating/Rating.mjs +2 -1
  130. package/Select/Select.js +2 -5
  131. package/Select/Select.mjs +2 -5
  132. package/Select/SelectInput.js +276 -24
  133. package/Select/SelectInput.mjs +276 -24
  134. package/Select/utils/closedTypeahead.js +73 -0
  135. package/Select/utils/closedTypeahead.mjs +63 -0
  136. package/Skeleton/Skeleton.js +22 -2
  137. package/Skeleton/Skeleton.mjs +22 -2
  138. package/Slide/Slide.d.mts +15 -2
  139. package/Slide/Slide.d.ts +15 -2
  140. package/Slide/Slide.js +97 -47
  141. package/Slide/Slide.mjs +97 -47
  142. package/Slider/Slider.js +14 -4
  143. package/Slider/Slider.mjs +14 -4
  144. package/Slider/useSlider.js +4 -3
  145. package/Slider/useSlider.mjs +4 -3
  146. package/Snackbar/Snackbar.d.mts +2 -2
  147. package/Snackbar/Snackbar.d.ts +2 -2
  148. package/SpeedDial/SpeedDial.d.mts +1 -1
  149. package/SpeedDial/SpeedDial.d.ts +1 -1
  150. package/SpeedDial/SpeedDial.js +6 -2
  151. package/SpeedDial/SpeedDial.mjs +6 -2
  152. package/SpeedDialAction/SpeedDialAction.js +11 -2
  153. package/SpeedDialAction/SpeedDialAction.mjs +12 -3
  154. package/SpeedDialIcon/SpeedDialIcon.js +40 -37
  155. package/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
  156. package/Step/Step.js +47 -15
  157. package/Step/Step.mjs +47 -15
  158. package/StepButton/StepButton.js +9 -3
  159. package/StepButton/StepButton.mjs +9 -3
  160. package/StepConnector/StepConnector.js +10 -0
  161. package/StepConnector/StepConnector.mjs +10 -0
  162. package/StepContent/StepContent.d.mts +2 -2
  163. package/StepContent/StepContent.d.ts +2 -2
  164. package/StepContent/StepContent.js +26 -2
  165. package/StepContent/StepContent.mjs +26 -2
  166. package/StepIcon/StepIcon.js +2 -1
  167. package/StepIcon/StepIcon.mjs +2 -1
  168. package/StepLabel/StepLabel.js +52 -7
  169. package/StepLabel/StepLabel.mjs +52 -7
  170. package/Stepper/Stepper.d.mts +2 -0
  171. package/Stepper/Stepper.d.ts +2 -0
  172. package/Stepper/Stepper.js +18 -0
  173. package/Stepper/Stepper.mjs +18 -0
  174. package/SvgIcon/SvgIcon.js +2 -1
  175. package/SvgIcon/SvgIcon.mjs +2 -1
  176. package/SwipeableDrawer/SwipeableDrawer.js +21 -6
  177. package/SwipeableDrawer/SwipeableDrawer.mjs +21 -6
  178. package/Switch/Switch.js +10 -8
  179. package/Switch/Switch.mjs +10 -8
  180. package/TableSortLabel/TableSortLabel.js +2 -1
  181. package/TableSortLabel/TableSortLabel.mjs +2 -1
  182. package/Tabs/ScrollbarSize.js +2 -1
  183. package/Tabs/ScrollbarSize.mjs +2 -1
  184. package/Tabs/Tabs.js +16 -4
  185. package/Tabs/Tabs.mjs +16 -4
  186. package/Tooltip/Tooltip.d.mts +2 -2
  187. package/Tooltip/Tooltip.d.ts +2 -2
  188. package/Tooltip/Tooltip.js +29 -108
  189. package/Tooltip/Tooltip.mjs +29 -108
  190. package/Unstable_TrapFocus/FocusTrap.js +60 -22
  191. package/Unstable_TrapFocus/FocusTrap.mjs +60 -22
  192. package/Zoom/Zoom.d.mts +15 -2
  193. package/Zoom/Zoom.d.ts +15 -2
  194. package/Zoom/Zoom.js +43 -16
  195. package/Zoom/Zoom.mjs +42 -15
  196. package/index.js +1 -1
  197. package/index.mjs +1 -1
  198. package/internal/Transition.d.mts +34 -0
  199. package/internal/Transition.d.ts +34 -0
  200. package/internal/Transition.js +444 -0
  201. package/internal/Transition.mjs +436 -0
  202. package/internal/react-transition-group.d.mts +8 -0
  203. package/internal/react-transition-group.d.ts +8 -0
  204. package/package.json +50 -50
  205. package/styles/createMotion.d.mts +8 -0
  206. package/styles/createMotion.d.ts +8 -0
  207. package/styles/createMotion.js +13 -0
  208. package/styles/createMotion.mjs +7 -0
  209. package/styles/createThemeFoundation.d.mts +2 -0
  210. package/styles/createThemeFoundation.d.ts +2 -0
  211. package/styles/createThemeNoVars.d.mts +3 -0
  212. package/styles/createThemeNoVars.d.ts +3 -0
  213. package/styles/createThemeNoVars.js +5 -0
  214. package/styles/createThemeNoVars.mjs +5 -0
  215. package/styles/createTransitions.d.mts +6 -2
  216. package/styles/createTransitions.d.ts +6 -2
  217. package/styles/createTransitions.js +12 -4
  218. package/styles/createTransitions.mjs +12 -4
  219. package/styles/enhanceHighContrast.d.mts +70 -0
  220. package/styles/enhanceHighContrast.d.ts +70 -0
  221. package/styles/enhanceHighContrast.js +502 -0
  222. package/styles/enhanceHighContrast.mjs +495 -0
  223. package/styles/index.d.mts +2 -0
  224. package/styles/index.d.ts +2 -0
  225. package/styles/index.js +8 -0
  226. package/styles/index.mjs +1 -0
  227. package/styles/reducedMotion.d.mts +7 -0
  228. package/styles/reducedMotion.d.ts +7 -0
  229. package/styles/reducedMotion.js +21 -0
  230. package/styles/reducedMotion.mjs +14 -0
  231. package/styles/responsiveFontSizes.js +19 -8
  232. package/styles/responsiveFontSizes.mjs +19 -8
  233. package/styles/shouldSkipGeneratingVar.js +1 -1
  234. package/styles/shouldSkipGeneratingVar.mjs +1 -1
  235. package/styles/stringifyTheme.js +1 -0
  236. package/styles/stringifyTheme.mjs +1 -0
  237. package/styles/useThemeProps.d.mts +3 -3
  238. package/styles/useThemeProps.d.ts +3 -3
  239. package/transitions/index.d.mts +1 -1
  240. package/transitions/index.d.ts +1 -1
  241. package/transitions/index.js +0 -11
  242. package/transitions/index.mjs +1 -1
  243. package/transitions/transition.d.mts +1 -12
  244. package/transitions/transition.d.ts +1 -12
  245. package/transitions/types.d.mts +73 -0
  246. package/transitions/types.d.ts +73 -0
  247. package/transitions/useReducedMotion.d.mts +14 -0
  248. package/transitions/useReducedMotion.d.ts +14 -0
  249. package/transitions/useReducedMotion.js +117 -0
  250. package/transitions/useReducedMotion.mjs +110 -0
  251. package/transitions/utils.d.mts +51 -2
  252. package/transitions/utils.d.ts +51 -2
  253. package/transitions/utils.js +97 -4
  254. package/transitions/utils.mjs +94 -4
  255. package/useAutocomplete/useAutocomplete.d.mts +12 -6
  256. package/useAutocomplete/useAutocomplete.d.ts +12 -6
  257. package/useAutocomplete/useAutocomplete.js +230 -55
  258. package/useAutocomplete/useAutocomplete.mjs +230 -55
  259. package/utils/contains.d.mts +2 -0
  260. package/utils/contains.d.ts +2 -0
  261. package/utils/contains.js +9 -0
  262. package/utils/contains.mjs +2 -0
  263. package/utils/focusable.d.mts +7 -0
  264. package/utils/focusable.d.ts +7 -0
  265. package/utils/focusable.js +20 -0
  266. package/utils/focusable.mjs +13 -0
  267. package/utils/getEventTarget.d.mts +2 -0
  268. package/utils/getEventTarget.d.ts +2 -0
  269. package/utils/getEventTarget.js +9 -0
  270. package/utils/getEventTarget.mjs +2 -0
  271. package/utils/mergeSlotProps.js +2 -8
  272. package/utils/mergeSlotProps.mjs +1 -8
  273. package/version/index.js +2 -2
  274. package/version/index.mjs +2 -2
  275. package/FormControl/formControlState.js +0 -21
  276. package/FormControl/formControlState.mjs +0 -15
  277. /package/transitions/{transition.js → types.js} +0 -0
  278. /package/transitions/{transition.mjs → types.mjs} +0 -0
@@ -21,6 +21,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
21
21
  var _filledInputClasses = _interopRequireWildcard(require("./filledInputClasses"));
22
22
  var _InputBase2 = require("../InputBase/InputBase");
23
23
  var _utils = require("../utils");
24
+ var _utils2 = require("../transitions/utils");
24
25
  var _jsxRuntime = require("react/jsx-runtime");
25
26
  const useUtilityClasses = ownerState => {
26
27
  const {
@@ -66,7 +67,7 @@ const FilledInputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
66
67
  backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
67
68
  borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
68
69
  borderTopRightRadius: (theme.vars || theme).shape.borderRadius,
69
- transition: theme.transitions.create('background-color', {
70
+ ...(0, _utils2.getTransitionStyles)(theme, 'background-color', {
70
71
  duration: theme.transitions.duration.shorter,
71
72
  easing: theme.transitions.easing.easeOut
72
73
  }),
@@ -95,7 +96,7 @@ const FilledInputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
95
96
  position: 'absolute',
96
97
  right: 0,
97
98
  transform: 'scaleX(0)',
98
- transition: theme.transitions.create('transform', {
99
+ ...(0, _utils2.getTransitionStyles)(theme, 'transform', {
99
100
  duration: theme.transitions.duration.shorter,
100
101
  easing: theme.transitions.easing.easeOut
101
102
  }),
@@ -118,7 +119,7 @@ const FilledInputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
118
119
  content: '""',
119
120
  position: 'absolute',
120
121
  right: 0,
121
- transition: theme.transitions.create('border-bottom-color', {
122
+ ...(0, _utils2.getTransitionStyles)(theme, 'border-bottom-color', {
122
123
  duration: theme.transitions.duration.shorter
123
124
  }),
124
125
  pointerEvents: 'none' // Transparent to the hover style.
@@ -201,28 +202,20 @@ const FilledInputInput = (0, _zeroStyled.styled)(_InputBase2.InputBaseInput, {
201
202
  paddingRight: 12,
202
203
  paddingBottom: 8,
203
204
  paddingLeft: 12,
204
- ...(!theme.vars && {
205
- '&:-webkit-autofill': {
205
+ '&:-webkit-autofill': {
206
+ ...(!theme.vars && {
206
207
  WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
207
208
  WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
208
- caretColor: theme.palette.mode === 'light' ? null : '#fff',
209
- borderTopLeftRadius: 'inherit',
210
- borderTopRightRadius: 'inherit'
211
- }
212
- }),
213
- ...(theme.vars && {
214
- '&:-webkit-autofill': {
215
- borderTopLeftRadius: 'inherit',
216
- borderTopRightRadius: 'inherit'
217
- },
218
- [theme.getColorSchemeSelector('dark')]: {
219
- '&:-webkit-autofill': {
220
- WebkitBoxShadow: '0 0 0 100px #266798 inset',
221
- WebkitTextFillColor: '#fff',
222
- caretColor: '#fff'
223
- }
224
- }
225
- }),
209
+ caretColor: theme.palette.mode === 'light' ? null : '#fff'
210
+ }),
211
+ borderTopLeftRadius: 'inherit',
212
+ borderTopRightRadius: 'inherit',
213
+ ...(theme.vars && theme.applyStyles('dark', {
214
+ WebkitBoxShadow: '0 0 0 100px #266798 inset',
215
+ WebkitTextFillColor: '#fff',
216
+ caretColor: '#fff'
217
+ }))
218
+ },
226
219
  variants: [{
227
220
  props: {
228
221
  size: 'small'
@@ -285,6 +278,8 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
285
278
  // declare here to prevent spreading to DOM
286
279
  inputComponent = 'input',
287
280
  multiline = false,
281
+ notched,
282
+ // declare here to prevent spreading to DOM
288
283
  slotProps,
289
284
  slots = {},
290
285
  type = 'text',
@@ -428,6 +423,10 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
428
423
  * Name attribute of the `input` element.
429
424
  */
430
425
  name: _propTypes.default.string,
426
+ /**
427
+ * @internal
428
+ */
429
+ notched: _propTypes.default.bool,
431
430
  /**
432
431
  * Callback fired when the value is changed.
433
432
  *
@@ -14,6 +14,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
14
14
  import filledInputClasses, { getFilledInputUtilityClass } from "./filledInputClasses.mjs";
15
15
  import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.mjs";
16
16
  import { capitalize } from "../utils/index.mjs";
17
+ import { getTransitionStyles } from "../transitions/utils.mjs";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
19
20
  const {
@@ -59,7 +60,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
59
60
  backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
60
61
  borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
61
62
  borderTopRightRadius: (theme.vars || theme).shape.borderRadius,
62
- transition: theme.transitions.create('background-color', {
63
+ ...getTransitionStyles(theme, 'background-color', {
63
64
  duration: theme.transitions.duration.shorter,
64
65
  easing: theme.transitions.easing.easeOut
65
66
  }),
@@ -88,7 +89,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
88
89
  position: 'absolute',
89
90
  right: 0,
90
91
  transform: 'scaleX(0)',
91
- transition: theme.transitions.create('transform', {
92
+ ...getTransitionStyles(theme, 'transform', {
92
93
  duration: theme.transitions.duration.shorter,
93
94
  easing: theme.transitions.easing.easeOut
94
95
  }),
@@ -111,7 +112,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
111
112
  content: '""',
112
113
  position: 'absolute',
113
114
  right: 0,
114
- transition: theme.transitions.create('border-bottom-color', {
115
+ ...getTransitionStyles(theme, 'border-bottom-color', {
115
116
  duration: theme.transitions.duration.shorter
116
117
  }),
117
118
  pointerEvents: 'none' // Transparent to the hover style.
@@ -194,28 +195,20 @@ const FilledInputInput = styled(InputBaseInput, {
194
195
  paddingRight: 12,
195
196
  paddingBottom: 8,
196
197
  paddingLeft: 12,
197
- ...(!theme.vars && {
198
- '&:-webkit-autofill': {
198
+ '&:-webkit-autofill': {
199
+ ...(!theme.vars && {
199
200
  WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
200
201
  WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
201
- caretColor: theme.palette.mode === 'light' ? null : '#fff',
202
- borderTopLeftRadius: 'inherit',
203
- borderTopRightRadius: 'inherit'
204
- }
205
- }),
206
- ...(theme.vars && {
207
- '&:-webkit-autofill': {
208
- borderTopLeftRadius: 'inherit',
209
- borderTopRightRadius: 'inherit'
210
- },
211
- [theme.getColorSchemeSelector('dark')]: {
212
- '&:-webkit-autofill': {
213
- WebkitBoxShadow: '0 0 0 100px #266798 inset',
214
- WebkitTextFillColor: '#fff',
215
- caretColor: '#fff'
216
- }
217
- }
218
- }),
202
+ caretColor: theme.palette.mode === 'light' ? null : '#fff'
203
+ }),
204
+ borderTopLeftRadius: 'inherit',
205
+ borderTopRightRadius: 'inherit',
206
+ ...(theme.vars && theme.applyStyles('dark', {
207
+ WebkitBoxShadow: '0 0 0 100px #266798 inset',
208
+ WebkitTextFillColor: '#fff',
209
+ caretColor: '#fff'
210
+ }))
211
+ },
219
212
  variants: [{
220
213
  props: {
221
214
  size: 'small'
@@ -278,6 +271,8 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
278
271
  // declare here to prevent spreading to DOM
279
272
  inputComponent = 'input',
280
273
  multiline = false,
274
+ notched,
275
+ // declare here to prevent spreading to DOM
281
276
  slotProps,
282
277
  slots = {},
283
278
  type = 'text',
@@ -421,6 +416,10 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
421
416
  * Name attribute of the `input` element.
422
417
  */
423
418
  name: PropTypes.string,
419
+ /**
420
+ * @internal
421
+ */
422
+ notched: PropTypes.bool,
424
423
  /**
425
424
  * Callback fired when the value is changed.
426
425
  *
@@ -1,2 +1,12 @@
1
- import { FormControlState } from "./FormControlContext.mjs";
2
- export default function useFormControl(): FormControlState | undefined;
1
+ import { type FormControlState } from "./FormControlContext.mjs";
2
+ type FormControlStateKey = keyof FormControlState;
3
+ type FormControlStateResult<Props, States extends readonly FormControlStateKey[]> = { [State in States[number]]: State extends keyof Props ? Props[State] | FormControlState[State] : FormControlState[State] };
4
+ export default function useFormControl(): FormControlState | undefined;
5
+ export declare function useFormControlState<Props, States extends readonly FormControlStateKey[]>({
6
+ props,
7
+ states
8
+ }: {
9
+ props: Props;
10
+ states: States;
11
+ }): [FormControlStateResult<Props, States>, FormControlState | undefined];
12
+ export {};
@@ -1,2 +1,12 @@
1
- import { FormControlState } from "./FormControlContext.js";
2
- export default function useFormControl(): FormControlState | undefined;
1
+ import { type FormControlState } from "./FormControlContext.js";
2
+ type FormControlStateKey = keyof FormControlState;
3
+ type FormControlStateResult<Props, States extends readonly FormControlStateKey[]> = { [State in States[number]]: State extends keyof Props ? Props[State] | FormControlState[State] : FormControlState[State] };
4
+ export default function useFormControl(): FormControlState | undefined;
5
+ export declare function useFormControlState<Props, States extends readonly FormControlStateKey[]>({
6
+ props,
7
+ states
8
+ }: {
9
+ props: Props;
10
+ states: States;
11
+ }): [FormControlStateResult<Props, States>, FormControlState | undefined];
12
+ export {};
@@ -7,8 +7,21 @@ Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
9
  exports.default = useFormControl;
10
+ exports.useFormControlState = useFormControlState;
10
11
  var React = _interopRequireWildcard(require("react"));
11
12
  var _FormControlContext = _interopRequireDefault(require("./FormControlContext"));
12
13
  function useFormControl() {
13
14
  return React.useContext(_FormControlContext.default);
15
+ }
16
+ function useFormControlState({
17
+ props,
18
+ states
19
+ }) {
20
+ const muiFormControl = React.useContext(_FormControlContext.default);
21
+ const result = {};
22
+ states.forEach(state => {
23
+ const value = props[state];
24
+ result[state] = value === undefined && muiFormControl ? muiFormControl[state] : value;
25
+ });
26
+ return [result, muiFormControl];
14
27
  }
@@ -4,4 +4,16 @@ import * as React from 'react';
4
4
  import FormControlContext from "./FormControlContext.mjs";
5
5
  export default function useFormControl() {
6
6
  return React.useContext(FormControlContext);
7
+ }
8
+ export function useFormControlState({
9
+ props,
10
+ states
11
+ }) {
12
+ const muiFormControl = React.useContext(FormControlContext);
13
+ const result = {};
14
+ states.forEach(state => {
15
+ const value = props[state];
16
+ result[state] = value === undefined && muiFormControl ? muiFormControl[state] : value;
17
+ });
18
+ return [result, muiFormControl];
7
19
  }
@@ -12,14 +12,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _clsx = _interopRequireDefault(require("clsx"));
13
13
  var _refType = _interopRequireDefault(require("@mui/utils/refType"));
14
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
- var _FormControl = require("../FormControl");
15
+ var _useFormControl = require("../FormControl/useFormControl");
16
16
  var _zeroStyled = require("../zero-styled");
17
17
  var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
18
18
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
19
19
  var _Typography = _interopRequireDefault(require("../Typography"));
20
20
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
21
21
  var _formControlLabelClasses = _interopRequireWildcard(require("./formControlLabelClasses"));
22
- var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
23
22
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
24
23
  var _jsxRuntime = require("react/jsx-runtime");
25
24
  const useUtilityClasses = ownerState => {
@@ -136,7 +135,10 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
136
135
  value,
137
136
  ...other
138
137
  } = props;
139
- const muiFormControl = (0, _FormControl.useFormControl)();
138
+ const [fcs, muiFormControl] = (0, _useFormControl.useFormControlState)({
139
+ props,
140
+ states: ['error']
141
+ });
140
142
  const disabled = disabledProp ?? control.props.disabled ?? muiFormControl?.disabled;
141
143
  const required = requiredProp ?? control.props.required;
142
144
  const controlProps = {
@@ -148,11 +150,6 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
148
150
  controlProps[key] = props[key];
149
151
  }
150
152
  });
151
- const fcs = (0, _formControlState.default)({
152
- props,
153
- muiFormControl,
154
- states: ['error']
155
- });
156
153
  const ownerState = {
157
154
  ...props,
158
155
  disabled,
@@ -5,14 +5,13 @@ import PropTypes from 'prop-types';
5
5
  import clsx from 'clsx';
6
6
  import refType from '@mui/utils/refType';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
- import { useFormControl } from "../FormControl/index.mjs";
8
+ import { useFormControlState } from "../FormControl/useFormControl.mjs";
9
9
  import { styled } from "../zero-styled/index.mjs";
10
10
  import memoTheme from "../utils/memoTheme.mjs";
11
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
12
12
  import Typography from "../Typography/index.mjs";
13
13
  import capitalize from "../utils/capitalize.mjs";
14
14
  import formControlLabelClasses, { getFormControlLabelUtilityClasses } from "./formControlLabelClasses.mjs";
15
- import formControlState from "../FormControl/formControlState.mjs";
16
15
  import useSlot from "../utils/useSlot.mjs";
17
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
17
  const useUtilityClasses = ownerState => {
@@ -129,7 +128,10 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
129
128
  value,
130
129
  ...other
131
130
  } = props;
132
- const muiFormControl = useFormControl();
131
+ const [fcs, muiFormControl] = useFormControlState({
132
+ props,
133
+ states: ['error']
134
+ });
133
135
  const disabled = disabledProp ?? control.props.disabled ?? muiFormControl?.disabled;
134
136
  const required = requiredProp ?? control.props.required;
135
137
  const controlProps = {
@@ -141,11 +143,6 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
141
143
  controlProps[key] = props[key];
142
144
  }
143
145
  });
144
- const fcs = formControlState({
145
- props,
146
- muiFormControl,
147
- states: ['error']
148
- });
149
146
  const ownerState = {
150
147
  ...props,
151
148
  disabled,
@@ -14,8 +14,7 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
14
14
  var _zeroStyled = require("../zero-styled");
15
15
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
16
16
  var _formGroupClasses = require("./formGroupClasses");
17
- var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
18
- var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
17
+ var _useFormControl = require("../FormControl/useFormControl");
19
18
  var _jsxRuntime = require("react/jsx-runtime");
20
19
  const useUtilityClasses = ownerState => {
21
20
  const {
@@ -66,10 +65,8 @@ const FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(inProps, ref)
66
65
  row = false,
67
66
  ...other
68
67
  } = props;
69
- const muiFormControl = (0, _useFormControl.default)();
70
- const fcs = (0, _formControlState.default)({
68
+ const [fcs] = (0, _useFormControl.useFormControlState)({
71
69
  props,
72
- muiFormControl,
73
70
  states: ['error']
74
71
  });
75
72
  const ownerState = {
@@ -7,8 +7,7 @@ import composeClasses from '@mui/utils/composeClasses';
7
7
  import { styled } from "../zero-styled/index.mjs";
8
8
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
9
9
  import { getFormGroupUtilityClass } from "./formGroupClasses.mjs";
10
- import useFormControl from "../FormControl/useFormControl.mjs";
11
- import formControlState from "../FormControl/formControlState.mjs";
10
+ import { useFormControlState } from "../FormControl/useFormControl.mjs";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
13
12
  const useUtilityClasses = ownerState => {
14
13
  const {
@@ -59,10 +58,8 @@ const FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(inProps, ref)
59
58
  row = false,
60
59
  ...other
61
60
  } = props;
62
- const muiFormControl = useFormControl();
63
- const fcs = formControlState({
61
+ const [fcs] = useFormControlState({
64
62
  props,
65
- muiFormControl,
66
63
  states: ['error']
67
64
  });
68
65
  const ownerState = {
@@ -11,8 +11,7 @@ var React = _interopRequireWildcard(require("react"));
11
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _clsx = _interopRequireDefault(require("clsx"));
13
13
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
- var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
15
- var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
14
+ var _useFormControl = require("../FormControl/useFormControl");
16
15
  var _zeroStyled = require("../zero-styled");
17
16
  var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
18
17
  var _DefaultPropsProvider = require("../DefaultPropsProvider");
@@ -96,10 +95,8 @@ const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inP
96
95
  variant,
97
96
  ...other
98
97
  } = props;
99
- const muiFormControl = (0, _useFormControl.default)();
100
- const fcs = (0, _formControlState.default)({
98
+ const [fcs] = (0, _useFormControl.useFormControlState)({
101
99
  props,
102
- muiFormControl,
103
100
  states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']
104
101
  });
105
102
  const ownerState = {
@@ -5,8 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
- import formControlState from "../FormControl/formControlState.mjs";
9
- import useFormControl from "../FormControl/useFormControl.mjs";
8
+ import { useFormControlState } from "../FormControl/useFormControl.mjs";
10
9
  import { styled } from "../zero-styled/index.mjs";
11
10
  import memoTheme from "../utils/memoTheme.mjs";
12
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
@@ -89,10 +88,8 @@ const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inP
89
88
  variant,
90
89
  ...other
91
90
  } = props;
92
- const muiFormControl = useFormControl();
93
- const fcs = formControlState({
91
+ const [fcs] = useFormControlState({
94
92
  props,
95
- muiFormControl,
96
93
  states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']
97
94
  });
98
95
  const ownerState = {
@@ -11,8 +11,7 @@ var React = _interopRequireWildcard(require("react"));
11
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _clsx = _interopRequireDefault(require("clsx"));
13
13
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
- var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
15
- var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
14
+ var _useFormControl = require("../FormControl/useFormControl");
16
15
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
17
16
  var _zeroStyled = require("../zero-styled");
18
17
  var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
@@ -101,10 +100,8 @@ const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref)
101
100
  required,
102
101
  ...other
103
102
  } = props;
104
- const muiFormControl = (0, _useFormControl.default)();
105
- const fcs = (0, _formControlState.default)({
103
+ const [fcs] = (0, _useFormControl.useFormControlState)({
106
104
  props,
107
- muiFormControl,
108
105
  states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']
109
106
  });
110
107
  const ownerState = {
@@ -4,8 +4,7 @@ import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import clsx from 'clsx';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
- import formControlState from "../FormControl/formControlState.mjs";
8
- import useFormControl from "../FormControl/useFormControl.mjs";
7
+ import { useFormControlState } from "../FormControl/useFormControl.mjs";
9
8
  import capitalize from "../utils/capitalize.mjs";
10
9
  import { styled } from "../zero-styled/index.mjs";
11
10
  import memoTheme from "../utils/memoTheme.mjs";
@@ -94,10 +93,8 @@ const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref)
94
93
  required,
95
94
  ...other
96
95
  } = props;
97
- const muiFormControl = useFormControl();
98
- const fcs = formControlState({
96
+ const [fcs] = useFormControlState({
99
97
  props,
100
- muiFormControl,
101
98
  states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']
102
99
  });
103
100
  const ownerState = {
package/Grow/Grow.d.mts CHANGED
@@ -1,6 +1,15 @@
1
1
  import * as React from 'react';
2
- import { TransitionProps } from "../transitions/transition.mjs";
2
+ import { TransitionProps } from "../transitions/types.mjs";
3
3
  export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
4
+ /**
5
+ * Add a custom transition end trigger.
6
+ * Use it when you need custom logic to decide when the transition has ended.
7
+ * Note: Timeouts are still used as a fallback if provided.
8
+ *
9
+ * @param {HTMLElement} node The transitioning DOM node.
10
+ * @param {Function} done Call this when the transition has finished.
11
+ */
12
+ addEndListener?: TransitionProps['addEndListener'] | undefined;
4
13
  /**
5
14
  * Perform the enter transition when it first mounts if `in` is also `true`.
6
15
  * Set this to `false` to disable this behavior.
@@ -11,6 +20,11 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
11
20
  * A single child content element.
12
21
  */
13
22
  children: React.ReactElement<unknown, any>;
23
+ /**
24
+ * If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
25
+ * @default false
26
+ */
27
+ disablePrefersReducedMotion?: boolean | undefined;
14
28
  /**
15
29
  * The transition timing function.
16
30
  * You may specify a single easing or a object containing enter and exit values.
@@ -34,7 +48,6 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
34
48
  /**
35
49
  * The Grow transition is used by the [Tooltip](https://mui.com/material-ui/react-tooltip/) and
36
50
  * [Popover](https://mui.com/material-ui/react-popover/) components.
37
- * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
38
51
  *
39
52
  * Demos:
40
53
  *
package/Grow/Grow.d.ts CHANGED
@@ -1,6 +1,15 @@
1
1
  import * as React from 'react';
2
- import { TransitionProps } from "../transitions/transition.js";
2
+ import { TransitionProps } from "../transitions/types.js";
3
3
  export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
4
+ /**
5
+ * Add a custom transition end trigger.
6
+ * Use it when you need custom logic to decide when the transition has ended.
7
+ * Note: Timeouts are still used as a fallback if provided.
8
+ *
9
+ * @param {HTMLElement} node The transitioning DOM node.
10
+ * @param {Function} done Call this when the transition has finished.
11
+ */
12
+ addEndListener?: TransitionProps['addEndListener'] | undefined;
4
13
  /**
5
14
  * Perform the enter transition when it first mounts if `in` is also `true`.
6
15
  * Set this to `false` to disable this behavior.
@@ -11,6 +20,11 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
11
20
  * A single child content element.
12
21
  */
13
22
  children: React.ReactElement<unknown, any>;
23
+ /**
24
+ * If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
25
+ * @default false
26
+ */
27
+ disablePrefersReducedMotion?: boolean | undefined;
14
28
  /**
15
29
  * The transition timing function.
16
30
  * You may specify a single easing or a object containing enter and exit values.
@@ -34,7 +48,6 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
34
48
  /**
35
49
  * The Grow transition is used by the [Tooltip](https://mui.com/material-ui/react-tooltip/) and
36
50
  * [Popover](https://mui.com/material-ui/react-popover/) components.
37
- * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
38
51
  *
39
52
  * Demos:
40
53
  *