@mui/material 5.4.2 → 5.4.3

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 (197) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  9. package/Avatar/avatarClasses.d.ts +20 -20
  10. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  11. package/BottomNavigation/BottomNavigation.js +0 -0
  12. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  13. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  14. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  15. package/Button/buttonClasses.d.ts +76 -76
  16. package/ButtonBase/ButtonBase.d.ts +1 -1
  17. package/ButtonBase/ButtonBase.js +1 -1
  18. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  19. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  20. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  21. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  22. package/CHANGELOG.md +47 -0
  23. package/Card/cardClasses.d.ts +8 -8
  24. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  25. package/CardActions/cardActionsClasses.d.ts +10 -10
  26. package/CardContent/cardContentClasses.d.ts +8 -8
  27. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  28. package/CardMedia/cardMediaClasses.d.ts +12 -12
  29. package/Checkbox/checkboxClasses.d.ts +18 -18
  30. package/Chip/chipClasses.d.ts +80 -80
  31. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  32. package/ClickAwayListener/index.d.ts +2 -2
  33. package/Collapse/collapseClasses.d.ts +18 -18
  34. package/Container/containerClasses.d.ts +22 -22
  35. package/Dialog/Dialog.d.ts +4 -1
  36. package/Dialog/Dialog.js +10 -6
  37. package/Dialog/DialogContext.d.ts +6 -6
  38. package/Dialog/dialogClasses.d.ts +36 -36
  39. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  40. package/DialogContent/dialogContentClasses.d.ts +10 -10
  41. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  42. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  43. package/Divider/dividerClasses.d.ts +34 -34
  44. package/Drawer/Drawer.d.ts +4 -1
  45. package/Drawer/Drawer.js +11 -9
  46. package/Drawer/drawerClasses.d.ts +30 -30
  47. package/Fab/fabClasses.d.ts +26 -26
  48. package/Fade/Fade.d.ts +2 -2
  49. package/Fade/Fade.js +8 -8
  50. package/FilledInput/filledInputClasses.d.ts +40 -40
  51. package/FormControl/formControlClasses.d.ts +14 -14
  52. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  53. package/FormGroup/formGroupClasses.d.ts +12 -12
  54. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  55. package/FormLabel/formLabelClasses.d.ts +22 -22
  56. package/Grid/gridClasses.d.ts +48 -48
  57. package/Icon/iconClasses.d.ts +24 -24
  58. package/IconButton/iconButtonClasses.d.ts +26 -26
  59. package/ImageList/imageListClasses.d.ts +16 -16
  60. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  61. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  62. package/Input/inputClasses.d.ts +34 -34
  63. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  64. package/InputBase/inputBaseClasses.d.ts +44 -44
  65. package/InputLabel/inputLabelClasses.d.ts +32 -32
  66. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  67. package/Link/linkClasses.d.ts +18 -18
  68. package/List/listClasses.d.ts +14 -14
  69. package/ListItem/listItemClasses.d.ts +30 -30
  70. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  71. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  72. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  73. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  74. package/ListItemText/listItemTextClasses.d.ts +18 -18
  75. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  76. package/Menu/menuClasses.d.ts +12 -12
  77. package/MenuItem/menuItemClasses.d.ts +20 -20
  78. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  79. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  80. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  81. package/Pagination/paginationClasses.d.ts +14 -14
  82. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  83. package/Paper/paperClasses.d.ts +39 -39
  84. package/Popover/popoverClasses.d.ts +10 -10
  85. package/Popper/Popper.d.ts +17 -17
  86. package/Radio/radioClasses.d.ts +16 -16
  87. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  88. package/RadioGroup/useRadioGroup.d.ts +4 -4
  89. package/Rating/ratingClasses.d.ts +40 -40
  90. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  91. package/Select/selectClasses.d.ts +30 -30
  92. package/Skeleton/skeletonClasses.d.ts +24 -24
  93. package/Slide/Slide.d.ts +4 -4
  94. package/Slide/Slide.js +14 -14
  95. package/Snackbar/Snackbar.d.ts +2 -2
  96. package/Snackbar/Snackbar.js +8 -8
  97. package/Snackbar/snackbarClasses.d.ts +20 -20
  98. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  99. package/SpeedDial/SpeedDial.d.ts +2 -2
  100. package/SpeedDial/SpeedDial.js +9 -7
  101. package/SpeedDial/speedDialClasses.d.ts +22 -22
  102. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  103. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  104. package/Step/StepContext.d.ts +20 -0
  105. package/Step/StepContext.js +10 -2
  106. package/Step/index.d.ts +3 -0
  107. package/Step/index.js +3 -1
  108. package/Step/stepClasses.d.ts +16 -16
  109. package/StepButton/stepButtonClasses.d.ts +14 -14
  110. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  111. package/StepContent/stepContentClasses.d.ts +12 -12
  112. package/StepIcon/stepIconClasses.d.ts +16 -16
  113. package/StepLabel/stepLabelClasses.d.ts +28 -28
  114. package/Stepper/stepperClasses.d.ts +14 -14
  115. package/SvgIcon/svgIconClasses.d.ts +24 -24
  116. package/SwipeableDrawer/SwipeableDrawer.js +8 -6
  117. package/Switch/switchClasses.d.ts +32 -32
  118. package/Tab/tabClasses.d.ts +26 -26
  119. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  120. package/Table/tableClasses.d.ts +10 -10
  121. package/TableBody/tableBodyClasses.d.ts +8 -8
  122. package/TableCell/tableCellClasses.d.ts +32 -32
  123. package/TableContainer/tableContainerClasses.d.ts +8 -8
  124. package/TableFooter/tableFooterClasses.d.ts +8 -8
  125. package/TableHead/tableHeadClasses.d.ts +8 -8
  126. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  127. package/TableRow/tableRowClasses.d.ts +16 -16
  128. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  129. package/Tabs/tabsClasses.d.ts +32 -32
  130. package/TextField/textFieldClasses.d.ts +8 -8
  131. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  132. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  133. package/Toolbar/toolbarClasses.d.ts +14 -14
  134. package/Tooltip/tooltipClasses.d.ts +30 -30
  135. package/Typography/typographyClasses.d.ts +50 -50
  136. package/Zoom/Zoom.d.ts +2 -2
  137. package/Zoom/Zoom.js +8 -8
  138. package/darkScrollbar/index.d.ts +28 -28
  139. package/index.js +1 -1
  140. package/internal/switchBaseClasses.d.ts +12 -12
  141. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  142. package/legacy/ButtonBase/ButtonBase.js +1 -1
  143. package/legacy/Dialog/Dialog.js +10 -6
  144. package/legacy/Drawer/Drawer.js +11 -9
  145. package/legacy/Fade/Fade.js +8 -8
  146. package/legacy/Slide/Slide.js +14 -14
  147. package/legacy/Snackbar/Snackbar.js +8 -8
  148. package/legacy/SpeedDial/SpeedDial.js +9 -7
  149. package/legacy/Step/StepContext.js +10 -2
  150. package/legacy/Step/index.js +3 -1
  151. package/legacy/SwipeableDrawer/SwipeableDrawer.js +8 -6
  152. package/legacy/Zoom/Zoom.js +8 -8
  153. package/legacy/index.js +1 -1
  154. package/legacy/locale/index.js +86 -78
  155. package/locale/index.d.ts +68 -68
  156. package/locale/index.js +12 -6
  157. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  158. package/modern/ButtonBase/ButtonBase.js +1 -1
  159. package/modern/Dialog/Dialog.js +10 -6
  160. package/modern/Drawer/Drawer.js +11 -9
  161. package/modern/Fade/Fade.js +8 -8
  162. package/modern/Slide/Slide.js +14 -14
  163. package/modern/Snackbar/Snackbar.js +8 -8
  164. package/modern/SpeedDial/SpeedDial.js +9 -7
  165. package/modern/Step/StepContext.js +10 -2
  166. package/modern/Step/index.js +3 -1
  167. package/modern/SwipeableDrawer/SwipeableDrawer.js +8 -6
  168. package/modern/Zoom/Zoom.js +8 -8
  169. package/modern/index.js +1 -1
  170. package/modern/locale/index.js +12 -6
  171. package/node/BottomNavigation/BottomNavigation.js +0 -0
  172. package/node/ButtonBase/ButtonBase.js +1 -1
  173. package/node/Dialog/Dialog.js +11 -7
  174. package/node/Drawer/Drawer.js +11 -10
  175. package/node/Fade/Fade.js +7 -9
  176. package/node/Slide/Slide.js +14 -16
  177. package/node/Snackbar/Snackbar.js +8 -9
  178. package/node/SpeedDial/SpeedDial.js +9 -7
  179. package/node/Step/StepContext.js +11 -1
  180. package/node/Step/index.js +22 -1
  181. package/node/SwipeableDrawer/SwipeableDrawer.js +8 -7
  182. package/node/Zoom/Zoom.js +7 -9
  183. package/node/index.js +1 -1
  184. package/node/locale/index.js +12 -6
  185. package/package.json +2 -2
  186. package/transitions/index.d.ts +1 -1
  187. package/transitions/transition.d.ts +13 -13
  188. package/transitions/utils.d.ts +23 -23
  189. package/umd/material-ui.development.js +90 -66
  190. package/umd/material-ui.production.min.js +16 -16
  191. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  192. package/useTouchRipple/index.d.ts +1 -1
  193. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  194. package/utils/getScrollbarSize.d.ts +2 -2
  195. package/utils/ownerDocument.d.ts +2 -2
  196. package/utils/ownerWindow.d.ts +2 -2
  197. package/utils/setRef.d.ts +2 -2
package/locale/index.d.ts CHANGED
@@ -1,68 +1,68 @@
1
- import { ComponentsPropsList } from '../styles/props';
2
- export interface Localization {
3
- components?: {
4
- MuiAlert?: {
5
- defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
- };
7
- MuiBreadcrumbs?: {
8
- defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
- };
10
- MuiTablePagination?: {
11
- defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
- };
13
- MuiRating?: {
14
- defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
- };
16
- MuiAutocomplete?: {
17
- defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
- };
19
- MuiPagination?: {
20
- defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
- };
22
- };
23
- }
24
- export declare const amET: Localization;
25
- export declare const arEG: Localization;
26
- export declare const arSD: Localization;
27
- export declare const azAZ: Localization;
28
- export declare const bnBD: Localization;
29
- export declare const bgBG: Localization;
30
- export declare const caES: Localization;
31
- export declare const csCZ: Localization;
32
- export declare const daDK: Localization;
33
- export declare const deDE: Localization;
34
- export declare const elGR: Localization;
35
- export declare const enUS: Localization;
36
- export declare const esES: Localization;
37
- export declare const etEE: Localization;
38
- export declare const faIR: Localization;
39
- export declare const fiFI: Localization;
40
- export declare const frFR: Localization;
41
- export declare const heIL: Localization;
42
- export declare const hiIN: Localization;
43
- export declare const huHU: Localization;
44
- export declare const hyAM: Localization;
45
- export declare const idID: Localization;
46
- export declare const isIS: Localization;
47
- export declare const itIT: Localization;
48
- export declare const jaJP: Localization;
49
- export declare const khKH: Localization;
50
- export declare const koKR: Localization;
51
- export declare const kzKZ: Localization;
52
- export declare const nbNO: Localization;
53
- export declare const nlNL: Localization;
54
- export declare const plPL: Localization;
55
- export declare const ptBR: Localization;
56
- export declare const ptPT: Localization;
57
- export declare const roRO: Localization;
58
- export declare const ruRU: Localization;
59
- export declare const siLK: Localization;
60
- export declare const skSK: Localization;
61
- export declare const svSE: Localization;
62
- export declare const thTH: Localization;
63
- export declare const trTR: Localization;
64
- export declare const ukUA: Localization;
65
- export declare const viVN: Localization;
66
- export declare const zhCN: Localization;
67
- export declare const zhHK: Localization;
68
- export declare const zhTW: Localization;
1
+ import { ComponentsPropsList } from '../styles/props';
2
+ export interface Localization {
3
+ components?: {
4
+ MuiAlert?: {
5
+ defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
+ };
7
+ MuiBreadcrumbs?: {
8
+ defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
+ };
10
+ MuiTablePagination?: {
11
+ defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
+ };
13
+ MuiRating?: {
14
+ defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
+ };
16
+ MuiAutocomplete?: {
17
+ defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
+ };
19
+ MuiPagination?: {
20
+ defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
+ };
22
+ };
23
+ }
24
+ export declare const amET: Localization;
25
+ export declare const arEG: Localization;
26
+ export declare const arSD: Localization;
27
+ export declare const azAZ: Localization;
28
+ export declare const bnBD: Localization;
29
+ export declare const bgBG: Localization;
30
+ export declare const caES: Localization;
31
+ export declare const csCZ: Localization;
32
+ export declare const daDK: Localization;
33
+ export declare const deDE: Localization;
34
+ export declare const elGR: Localization;
35
+ export declare const enUS: Localization;
36
+ export declare const esES: Localization;
37
+ export declare const etEE: Localization;
38
+ export declare const faIR: Localization;
39
+ export declare const fiFI: Localization;
40
+ export declare const frFR: Localization;
41
+ export declare const heIL: Localization;
42
+ export declare const hiIN: Localization;
43
+ export declare const huHU: Localization;
44
+ export declare const hyAM: Localization;
45
+ export declare const idID: Localization;
46
+ export declare const isIS: Localization;
47
+ export declare const itIT: Localization;
48
+ export declare const jaJP: Localization;
49
+ export declare const khKH: Localization;
50
+ export declare const koKR: Localization;
51
+ export declare const kzKZ: Localization;
52
+ export declare const nbNO: Localization;
53
+ export declare const nlNL: Localization;
54
+ export declare const plPL: Localization;
55
+ export declare const ptBR: Localization;
56
+ export declare const ptPT: Localization;
57
+ export declare const roRO: Localization;
58
+ export declare const ruRU: Localization;
59
+ export declare const siLK: Localization;
60
+ export declare const skSK: Localization;
61
+ export declare const svSE: Localization;
62
+ export declare const thTH: Localization;
63
+ export declare const trTR: Localization;
64
+ export declare const ukUA: Localization;
65
+ export declare const viVN: Localization;
66
+ export declare const zhCN: Localization;
67
+ export declare const zhHK: Localization;
68
+ export declare const zhTW: Localization;
package/locale/index.js CHANGED
@@ -1813,9 +1813,12 @@ export const itIT = {
1813
1813
 
1814
1814
  return 'Vai alla pagina precedente';
1815
1815
  },
1816
- labelRowsPerPage: 'Righe per pagina:' // labelDisplayedRows: ({ from, to, count }) =>
1817
- // `${from}–${to} di ${count !== -1 ? count : `more than ${to}`}`,
1818
-
1816
+ labelRowsPerPage: 'Righe per pagina:',
1817
+ labelDisplayedRows: ({
1818
+ from,
1819
+ to,
1820
+ count
1821
+ }) => `${from}–${to} di ${count !== -1 ? count : `più di ${to}`}`
1819
1822
  }
1820
1823
  },
1821
1824
  MuiRating: {
@@ -2374,9 +2377,12 @@ export const plPL = {
2374
2377
 
2375
2378
  return 'Przejdź do poprzedniej strony';
2376
2379
  },
2377
- labelRowsPerPage: 'Wierszy na stronę:' // labelDisplayedRows: ({ from, to, count }) =>
2378
- // `${from}–${to} z ${count !== -1 ? count : `more than ${to}`}`,
2379
-
2380
+ labelRowsPerPage: 'Wierszy na stronę:',
2381
+ labelDisplayedRows: ({
2382
+ from,
2383
+ to,
2384
+ count
2385
+ }) => `${from}–${to} z ${count !== -1 ? count : `ponad ${to}`}`
2380
2386
  }
2381
2387
  },
2382
2388
  MuiRating: {
File without changes
@@ -529,7 +529,7 @@ process.env.NODE_ENV !== "production" ? ButtonBase.propTypes
529
529
  TouchRippleProps: PropTypes.object,
530
530
 
531
531
  /**
532
- * A ref that points to the `TouchRippple` element.
532
+ * A ref that points to the `TouchRipple` element.
533
533
  */
534
534
  touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
535
535
  current: PropTypes.shape({
@@ -9,13 +9,13 @@ import { unstable_useId as useId } from '@mui/utils';
9
9
  import capitalize from '../utils/capitalize';
10
10
  import Modal from '../Modal';
11
11
  import Fade from '../Fade';
12
- import { duration } from '../styles/createTransitions';
13
12
  import Paper from '../Paper';
14
13
  import useThemeProps from '../styles/useThemeProps';
15
14
  import styled from '../styles/styled';
16
15
  import dialogClasses, { getDialogUtilityClass } from './dialogClasses';
17
16
  import DialogContext from './DialogContext';
18
17
  import Backdrop from '../Backdrop';
18
+ import useTheme from '../styles/useTheme';
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  const DialogBackdrop = styled(Backdrop, {
21
21
  name: 'MuiDialog',
@@ -146,10 +146,6 @@ const DialogPaper = styled(Paper, {
146
146
  maxWidth: '100%'
147
147
  }
148
148
  }));
149
- const defaultTransitionDuration = {
150
- enter: duration.enteringScreen,
151
- exit: duration.leavingScreen
152
- };
153
149
  /**
154
150
  * Dialogs are overlaid modal paper based components with a backdrop.
155
151
  */
@@ -159,6 +155,11 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
159
155
  props: inProps,
160
156
  name: 'MuiDialog'
161
157
  });
158
+ const theme = useTheme();
159
+ const defaultTransitionDuration = {
160
+ enter: theme.transitions.duration.enteringScreen,
161
+ exit: theme.transitions.duration.leavingScreen
162
+ };
162
163
 
163
164
  const {
164
165
  'aria-describedby': ariaDescribedby,
@@ -399,7 +400,10 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
399
400
  /**
400
401
  * The duration for the transition, in milliseconds.
401
402
  * You may specify a single timeout for all transitions, or individually with an object.
402
- * @default { enter: duration.enteringScreen, exit: duration.leavingScreen }
403
+ * @default {
404
+ * enter: theme.transitions.duration.enteringScreen,
405
+ * exit: theme.transitions.duration.leavingScreen,
406
+ * }
403
407
  */
404
408
  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
405
409
  appear: PropTypes.number,
@@ -11,7 +11,6 @@ import Modal from '../Modal';
11
11
  import Slide from '../Slide';
12
12
  import Paper from '../Paper';
13
13
  import capitalize from '../utils/capitalize';
14
- import { duration } from '../styles/createTransitions';
15
14
  import useTheme from '../styles/useTheme';
16
15
  import useThemeProps from '../styles/useThemeProps';
17
16
  import styled, { rootShouldForwardProp } from '../styles/styled';
@@ -124,10 +123,6 @@ export function isHorizontal(anchor) {
124
123
  export function getAnchor(theme, anchor) {
125
124
  return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;
126
125
  }
127
- const defaultTransitionDuration = {
128
- enter: duration.enteringScreen,
129
- exit: duration.leavingScreen
130
- };
131
126
  /**
132
127
  * The props of the [Modal](/api/modal/) component are available
133
128
  * when `variant="temporary"` is set.
@@ -138,6 +133,11 @@ const Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) {
138
133
  props: inProps,
139
134
  name: 'MuiDrawer'
140
135
  });
136
+ const theme = useTheme();
137
+ const defaultTransitionDuration = {
138
+ enter: theme.transitions.duration.enteringScreen,
139
+ exit: theme.transitions.duration.leavingScreen
140
+ };
141
141
 
142
142
  const {
143
143
  anchor: anchorProp = 'left',
@@ -159,12 +159,11 @@ const Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) {
159
159
  variant = 'temporary'
160
160
  } = props,
161
161
  ModalProps = _objectWithoutPropertiesLoose(props.ModalProps, _excluded),
162
- other = _objectWithoutPropertiesLoose(props, _excluded2);
163
-
164
- const theme = useTheme(); // Let's assume that the Drawer will always be rendered on user space.
162
+ other = _objectWithoutPropertiesLoose(props, _excluded2); // Let's assume that the Drawer will always be rendered on user space.
165
163
  // We use this state is order to skip the appear transition during the
166
164
  // initial mount of the component.
167
165
 
166
+
168
167
  const mounted = React.useRef(false);
169
168
  React.useEffect(() => {
170
169
  mounted.current = true;
@@ -318,7 +317,10 @@ process.env.NODE_ENV !== "production" ? Drawer.propTypes
318
317
  /**
319
318
  * The duration for the transition, in milliseconds.
320
319
  * You may specify a single timeout for all transitions, or individually with an object.
321
- * @default { enter: duration.enteringScreen, exit: duration.leavingScreen }
320
+ * @default {
321
+ * enter: theme.transitions.duration.enteringScreen,
322
+ * exit: theme.transitions.duration.leavingScreen,
323
+ * }
322
324
  */
323
325
  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
324
326
  appear: PropTypes.number,
@@ -5,7 +5,6 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { Transition } from 'react-transition-group';
7
7
  import { elementAcceptingRef } from '@mui/utils';
8
- import { duration } from '../styles/createTransitions';
9
8
  import useTheme from '../styles/useTheme';
10
9
  import { reflow, getTransitionProps } from '../transitions/utils';
11
10
  import useForkRef from '../utils/useForkRef';
@@ -18,16 +17,18 @@ const styles = {
18
17
  opacity: 1
19
18
  }
20
19
  };
21
- const defaultTimeout = {
22
- enter: duration.enteringScreen,
23
- exit: duration.leavingScreen
24
- };
25
20
  /**
26
21
  * The Fade transition is used by the [Modal](/components/modal/) component.
27
22
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
28
23
  */
29
24
 
30
25
  const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
26
+ const theme = useTheme();
27
+ const defaultTimeout = {
28
+ enter: theme.transitions.duration.enteringScreen,
29
+ exit: theme.transitions.duration.leavingScreen
30
+ };
31
+
31
32
  const {
32
33
  addEndListener,
33
34
  appear = true,
@@ -47,7 +48,6 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
47
48
  } = props,
48
49
  other = _objectWithoutPropertiesLoose(props, _excluded);
49
50
 
50
- const theme = useTheme();
51
51
  const enableStrictModeCompat = true;
52
52
  const nodeRef = React.useRef(null);
53
53
  const foreignRef = useForkRef(children.ref, ref);
@@ -213,8 +213,8 @@ process.env.NODE_ENV !== "production" ? Fade.propTypes
213
213
  * The duration for the transition, in milliseconds.
214
214
  * You may specify a single timeout for all transitions, or individually with an object.
215
215
  * @default {
216
- * enter: duration.enteringScreen,
217
- * exit: duration.leavingScreen,
216
+ * enter: theme.transitions.duration.enteringScreen,
217
+ * exit: theme.transitions.duration.leavingScreen,
218
218
  * }
219
219
  */
220
220
  timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
@@ -8,7 +8,6 @@ import { elementAcceptingRef, HTMLElementType, chainPropTypes } from '@mui/utils
8
8
  import debounce from '../utils/debounce';
9
9
  import useForkRef from '../utils/useForkRef';
10
10
  import useTheme from '../styles/useTheme';
11
- import { duration, easing } from '../styles/createTransitions';
12
11
  import { reflow, getTransitionProps } from '../transitions/utils';
13
12
  import { ownerWindow } from '../utils'; // Translate the node so it can't be seen on the screen.
14
13
  // Later, we're going to translate the node back to its original location with `none`.
@@ -82,20 +81,22 @@ export function setTranslateValue(direction, node, containerProp) {
82
81
  node.style.transform = transform;
83
82
  }
84
83
  }
85
- const defaultEasing = {
86
- enter: easing.easeOut,
87
- exit: easing.sharp
88
- };
89
- const defaultTimeout = {
90
- enter: duration.enteringScreen,
91
- exit: duration.leavingScreen
92
- };
93
84
  /**
94
85
  * The Slide transition is used by the [Drawer](/components/drawers/) component.
95
86
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
96
87
  */
97
88
 
98
89
  const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
90
+ const theme = useTheme();
91
+ const defaultEasing = {
92
+ enter: theme.transitions.easing.easeOut,
93
+ exit: theme.transitions.easing.sharp
94
+ };
95
+ const defaultTimeout = {
96
+ enter: theme.transitions.duration.enteringScreen,
97
+ exit: theme.transitions.duration.leavingScreen
98
+ };
99
+
99
100
  const {
100
101
  addEndListener,
101
102
  appear = true,
@@ -117,7 +118,6 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
117
118
  } = props,
118
119
  other = _objectWithoutPropertiesLoose(props, _excluded);
119
120
 
120
- const theme = useTheme();
121
121
  const childrenRef = React.useRef(null);
122
122
  const handleRefIntermediary = useForkRef(children.ref, childrenRef);
123
123
  const handleRef = useForkRef(handleRefIntermediary, ref);
@@ -305,8 +305,8 @@ process.env.NODE_ENV !== "production" ? Slide.propTypes
305
305
  * The transition timing function.
306
306
  * You may specify a single easing or a object containing enter and exit values.
307
307
  * @default {
308
- * enter: easing.easeOut,
309
- * exit: easing.sharp,
308
+ * enter: theme.transitions.easing.easeOut,
309
+ * exit: theme.transitions.easing.sharp,
310
310
  * }
311
311
  */
312
312
  easing: PropTypes.oneOfType([PropTypes.shape({
@@ -358,8 +358,8 @@ process.env.NODE_ENV !== "production" ? Slide.propTypes
358
358
  * The duration for the transition, in milliseconds.
359
359
  * You may specify a single timeout for all transitions, or individually with an object.
360
360
  * @default {
361
- * enter: duration.enteringScreen,
362
- * exit: duration.leavingScreen,
361
+ * enter: theme.transitions.duration.enteringScreen,
362
+ * exit: theme.transitions.duration.leavingScreen,
363
363
  * }
364
364
  */
365
365
  timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
@@ -10,7 +10,6 @@ import ClickAwayListener from '@mui/base/ClickAwayListener';
10
10
  import styled from '../styles/styled';
11
11
  import useTheme from '../styles/useTheme';
12
12
  import useThemeProps from '../styles/useThemeProps';
13
- import { duration } from '../styles/createTransitions';
14
13
  import useEventCallback from '../utils/useEventCallback';
15
14
  import capitalize from '../utils/capitalize';
16
15
  import Grow from '../Grow';
@@ -93,6 +92,11 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
93
92
  props: inProps,
94
93
  name: 'MuiSnackbar'
95
94
  });
95
+ const theme = useTheme();
96
+ const defaultTransitionDuration = {
97
+ enter: theme.transitions.duration.enteringScreen,
98
+ exit: theme.transitions.duration.leavingScreen
99
+ };
96
100
 
97
101
  const {
98
102
  action,
@@ -118,10 +122,7 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
118
122
  open,
119
123
  resumeHideDuration,
120
124
  TransitionComponent = Grow,
121
- transitionDuration = {
122
- enter: duration.enteringScreen,
123
- exit: duration.leavingScreen
124
- },
125
+ transitionDuration = defaultTransitionDuration,
125
126
  TransitionProps: {
126
127
  onEnter,
127
128
  onExited
@@ -130,7 +131,6 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
130
131
  TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),
131
132
  other = _objectWithoutPropertiesLoose(props, _excluded2);
132
133
 
133
- const theme = useTheme();
134
134
  const isRtl = theme.direction === 'rtl';
135
135
 
136
136
  const ownerState = _extends({}, props, {
@@ -449,8 +449,8 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes
449
449
  * The duration for the transition, in milliseconds.
450
450
  * You may specify a single timeout for all transitions, or individually with an object.
451
451
  * @default {
452
- * enter: duration.enteringScreen,
453
- * exit: duration.leavingScreen,
452
+ * enter: theme.transitions.duration.enteringScreen,
453
+ * exit: theme.transitions.duration.leavingScreen,
454
454
  * }
455
455
  */
456
456
  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
@@ -10,7 +10,7 @@ import clsx from 'clsx';
10
10
  import { unstable_composeClasses as composeClasses } from '@mui/base';
11
11
  import styled from '../styles/styled';
12
12
  import useThemeProps from '../styles/useThemeProps';
13
- import { duration } from '../styles/createTransitions';
13
+ import useTheme from '../styles/useTheme';
14
14
  import Zoom from '../Zoom';
15
15
  import Fab from '../Fab';
16
16
  import capitalize from '../utils/capitalize';
@@ -137,6 +137,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
137
137
  props: inProps,
138
138
  name: 'MuiSpeedDial'
139
139
  });
140
+ const theme = useTheme();
141
+ const defaultTransitionDuration = {
142
+ enter: theme.transitions.duration.enteringScreen,
143
+ exit: theme.transitions.duration.leavingScreen
144
+ };
140
145
 
141
146
  const {
142
147
  ariaLabel,
@@ -157,10 +162,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
157
162
  onOpen,
158
163
  open: openProp,
159
164
  TransitionComponent = Zoom,
160
- transitionDuration = {
161
- enter: duration.enteringScreen,
162
- exit: duration.leavingScreen
163
- },
165
+ transitionDuration = defaultTransitionDuration,
164
166
  TransitionProps
165
167
  } = props,
166
168
  FabProps = _objectWithoutPropertiesLoose(props.FabProps, _excluded),
@@ -542,8 +544,8 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes
542
544
  * The duration for the transition, in milliseconds.
543
545
  * You may specify a single timeout for all transitions, or individually with an object.
544
546
  * @default {
545
- * enter: duration.enteringScreen,
546
- * exit: duration.leavingScreen,
547
+ * enter: theme.transitions.duration.enteringScreen,
548
+ * exit: theme.transitions.duration.leavingScreen,
547
549
  * }
548
550
  */
549
551
  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
@@ -1,12 +1,20 @@
1
1
  import * as React from 'react';
2
+
2
3
  /**
3
- * @ignore - internal component.
4
+ * Provides information about the current step in Stepper.
4
5
  */
5
-
6
6
  const StepContext = /*#__PURE__*/React.createContext({});
7
7
 
8
8
  if (process.env.NODE_ENV !== 'production') {
9
9
  StepContext.displayName = 'StepContext';
10
10
  }
11
+ /**
12
+ * Returns the current StepContext or an empty object if no StepContext
13
+ * has been defined in the component tree.
14
+ */
15
+
11
16
 
17
+ export function useStepContext() {
18
+ return React.useContext(StepContext);
19
+ }
12
20
  export default StepContext;
@@ -1,3 +1,5 @@
1
1
  export { default } from './Step';
2
2
  export { default as stepClasses } from './stepClasses';
3
- export * from './stepClasses';
3
+ export * from './stepClasses';
4
+ export { default as StepContext } from './StepContext';
5
+ export * from './StepContext';
@@ -12,7 +12,6 @@ import ownerDocument from '../utils/ownerDocument';
12
12
  import ownerWindow from '../utils/ownerWindow';
13
13
  import useEventCallback from '../utils/useEventCallback';
14
14
  import useEnhancedEffect from '../utils/useEnhancedEffect';
15
- import { duration } from '../styles/createTransitions';
16
15
  import useTheme from '../styles/useTheme';
17
16
  import { getTransitionProps } from '../transitions/utils';
18
17
  import SwipeArea from './SwipeArea'; // This value is closed to what browsers are using internally to
@@ -125,16 +124,16 @@ function computeHasNativeHandler({
125
124
  }
126
125
 
127
126
  const iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);
128
- const transitionDurationDefault = {
129
- enter: duration.enteringScreen,
130
- exit: duration.leavingScreen
131
- };
132
127
  const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {
133
128
  const props = useThemeProps({
134
129
  name: 'MuiSwipeableDrawer',
135
130
  props: inProps
136
131
  });
137
132
  const theme = useTheme();
133
+ const transitionDurationDefault = {
134
+ enter: theme.transitions.duration.enteringScreen,
135
+ exit: theme.transitions.duration.leavingScreen
136
+ };
138
137
 
139
138
  const {
140
139
  anchor = 'left',
@@ -612,7 +611,10 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes
612
611
  /**
613
612
  * The duration for the transition, in milliseconds.
614
613
  * You may specify a single timeout for all transitions, or individually with an object.
615
- * @default { enter: duration.enteringScreen, exit: duration.leavingScreen }
614
+ * @default {
615
+ * enter: theme.transitions.duration.enteringScreen,
616
+ * exit: theme.transitions.duration.leavingScreen,
617
+ * }
616
618
  */
617
619
  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
618
620
  appear: PropTypes.number,
@@ -5,7 +5,6 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { Transition } from 'react-transition-group';
7
7
  import { elementAcceptingRef } from '@mui/utils';
8
- import { duration } from '../styles/createTransitions';
9
8
  import useTheme from '../styles/useTheme';
10
9
  import { reflow, getTransitionProps } from '../transitions/utils';
11
10
  import useForkRef from '../utils/useForkRef';
@@ -18,10 +17,6 @@ const styles = {
18
17
  transform: 'none'
19
18
  }
20
19
  };
21
- const defaultTimeout = {
22
- enter: duration.enteringScreen,
23
- exit: duration.leavingScreen
24
- };
25
20
  /**
26
21
  * The Zoom transition can be used for the floating variant of the
27
22
  * [Button](/components/buttons/#floating-action-buttons) component.
@@ -29,6 +24,12 @@ const defaultTimeout = {
29
24
  */
30
25
 
31
26
  const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
27
+ const theme = useTheme();
28
+ const defaultTimeout = {
29
+ enter: theme.transitions.duration.enteringScreen,
30
+ exit: theme.transitions.duration.leavingScreen
31
+ };
32
+
32
33
  const {
33
34
  addEndListener,
34
35
  appear = true,
@@ -48,7 +49,6 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
48
49
  } = props,
49
50
  other = _objectWithoutPropertiesLoose(props, _excluded);
50
51
 
51
- const theme = useTheme();
52
52
  const nodeRef = React.useRef(null);
53
53
  const foreignRef = useForkRef(children.ref, ref);
54
54
  const handleRef = useForkRef(nodeRef, foreignRef);
@@ -213,8 +213,8 @@ process.env.NODE_ENV !== "production" ? Zoom.propTypes
213
213
  * The duration for the transition, in milliseconds.
214
214
  * You may specify a single timeout for all transitions, or individually with an object.
215
215
  * @default {
216
- * enter: duration.enteringScreen,
217
- * exit: duration.leavingScreen,
216
+ * enter: theme.transitions.duration.enteringScreen,
217
+ * exit: theme.transitions.duration.leavingScreen,
218
218
  * }
219
219
  */
220
220
  timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.4.2
1
+ /** @license MUI v5.4.3
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -1813,9 +1813,12 @@ export const itIT = {
1813
1813
 
1814
1814
  return 'Vai alla pagina precedente';
1815
1815
  },
1816
- labelRowsPerPage: 'Righe per pagina:' // labelDisplayedRows: ({ from, to, count }) =>
1817
- // `${from}–${to} di ${count !== -1 ? count : `more than ${to}`}`,
1818
-
1816
+ labelRowsPerPage: 'Righe per pagina:',
1817
+ labelDisplayedRows: ({
1818
+ from,
1819
+ to,
1820
+ count
1821
+ }) => `${from}–${to} di ${count !== -1 ? count : `più di ${to}`}`
1819
1822
  }
1820
1823
  },
1821
1824
  MuiRating: {
@@ -2374,9 +2377,12 @@ export const plPL = {
2374
2377
 
2375
2378
  return 'Przejdź do poprzedniej strony';
2376
2379
  },
2377
- labelRowsPerPage: 'Wierszy na stronę:' // labelDisplayedRows: ({ from, to, count }) =>
2378
- // `${from}–${to} z ${count !== -1 ? count : `more than ${to}`}`,
2379
-
2380
+ labelRowsPerPage: 'Wierszy na stronę:',
2381
+ labelDisplayedRows: ({
2382
+ from,
2383
+ to,
2384
+ count
2385
+ }) => `${from}–${to} z ${count !== -1 ? count : `ponad ${to}`}`
2380
2386
  }
2381
2387
  },
2382
2388
  MuiRating: {
File without changes