@mui/material 9.0.0-alpha.2 → 9.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/Accordion/Accordion.d.mts +0 -14
  2. package/Accordion/Accordion.d.ts +0 -14
  3. package/Accordion/Accordion.js +3 -25
  4. package/Accordion/Accordion.mjs +3 -25
  5. package/AccordionSummary/AccordionSummary.js +1 -1
  6. package/AccordionSummary/AccordionSummary.mjs +1 -1
  7. package/AccordionSummary/accordionSummaryClasses.d.mts +0 -5
  8. package/AccordionSummary/accordionSummaryClasses.d.ts +0 -5
  9. package/AccordionSummary/accordionSummaryClasses.js +1 -1
  10. package/AccordionSummary/accordionSummaryClasses.mjs +1 -1
  11. package/Alert/Alert.d.mts +0 -23
  12. package/Alert/Alert.d.ts +0 -23
  13. package/Alert/Alert.js +4 -36
  14. package/Alert/Alert.mjs +4 -36
  15. package/Alert/alertClasses.d.mts +0 -72
  16. package/Alert/alertClasses.d.ts +0 -72
  17. package/Alert/alertClasses.js +1 -1
  18. package/Alert/alertClasses.mjs +1 -1
  19. package/Autocomplete/Autocomplete.d.mts +26 -60
  20. package/Autocomplete/Autocomplete.d.ts +26 -60
  21. package/Autocomplete/Autocomplete.js +76 -119
  22. package/Autocomplete/Autocomplete.mjs +76 -119
  23. package/Avatar/Avatar.d.mts +0 -8
  24. package/Avatar/Avatar.d.ts +0 -8
  25. package/Avatar/Avatar.js +13 -35
  26. package/Avatar/Avatar.mjs +13 -35
  27. package/AvatarGroup/AvatarGroup.d.mts +0 -15
  28. package/AvatarGroup/AvatarGroup.d.ts +0 -15
  29. package/AvatarGroup/AvatarGroup.js +1 -18
  30. package/AvatarGroup/AvatarGroup.mjs +1 -18
  31. package/Backdrop/Backdrop.d.mts +1 -31
  32. package/Backdrop/Backdrop.d.ts +1 -31
  33. package/Backdrop/Backdrop.js +2 -42
  34. package/Backdrop/Backdrop.mjs +2 -42
  35. package/Badge/Badge.d.mts +0 -20
  36. package/Badge/Badge.d.ts +0 -20
  37. package/Badge/Badge.js +2 -35
  38. package/Badge/Badge.mjs +2 -35
  39. package/Box/Box.d.mts +1 -0
  40. package/Box/Box.d.ts +1 -0
  41. package/Button/Button.d.mts +1 -0
  42. package/Button/Button.d.ts +1 -0
  43. package/Button/Button.js +6 -6
  44. package/Button/Button.mjs +6 -6
  45. package/Button/buttonClasses.d.mts +0 -132
  46. package/Button/buttonClasses.d.ts +0 -132
  47. package/Button/buttonClasses.js +1 -1
  48. package/Button/buttonClasses.mjs +1 -1
  49. package/ButtonBase/ButtonBase.js +16 -2
  50. package/ButtonBase/ButtonBase.mjs +16 -2
  51. package/CHANGELOG.md +191 -0
  52. package/CardHeader/CardHeader.js +5 -1
  53. package/CardHeader/CardHeader.mjs +5 -1
  54. package/CircularProgress/CircularProgress.js +2 -2
  55. package/CircularProgress/CircularProgress.mjs +2 -2
  56. package/CircularProgress/circularProgressClasses.d.mts +0 -8
  57. package/CircularProgress/circularProgressClasses.d.ts +0 -8
  58. package/CircularProgress/circularProgressClasses.js +1 -1
  59. package/CircularProgress/circularProgressClasses.mjs +1 -1
  60. package/Divider/Divider.d.mts +1 -6
  61. package/Divider/Divider.d.ts +1 -6
  62. package/Divider/Divider.js +2 -18
  63. package/Divider/Divider.mjs +2 -18
  64. package/Divider/dividerClasses.d.mts +0 -4
  65. package/Divider/dividerClasses.d.ts +0 -4
  66. package/Divider/dividerClasses.js +1 -1
  67. package/Divider/dividerClasses.mjs +1 -1
  68. package/FormControlLabel/FormControlLabel.d.mts +1 -14
  69. package/FormControlLabel/FormControlLabel.d.ts +1 -14
  70. package/FormControlLabel/FormControlLabel.js +1 -13
  71. package/FormControlLabel/FormControlLabel.mjs +1 -13
  72. package/Input/Input.js +2 -1
  73. package/Input/Input.mjs +2 -1
  74. package/List/List.d.mts +1 -0
  75. package/List/List.d.ts +1 -0
  76. package/ListItemButton/ListItemButton.d.mts +1 -0
  77. package/ListItemButton/ListItemButton.d.ts +1 -0
  78. package/ListItemIcon/ListItemIcon.d.mts +1 -0
  79. package/ListItemIcon/ListItemIcon.d.ts +1 -0
  80. package/ListItemText/ListItemText.d.mts +1 -0
  81. package/ListItemText/ListItemText.d.ts +1 -0
  82. package/ListItemText/ListItemText.js +5 -1
  83. package/ListItemText/ListItemText.mjs +5 -1
  84. package/ListSubheader/ListSubheader.d.mts +1 -0
  85. package/ListSubheader/ListSubheader.d.ts +1 -0
  86. package/Menu/Menu.d.mts +0 -13
  87. package/Menu/Menu.d.ts +0 -13
  88. package/Menu/Menu.js +5 -44
  89. package/Menu/Menu.mjs +5 -44
  90. package/MenuItem/MenuItem.js +21 -1
  91. package/MenuItem/MenuItem.mjs +23 -1
  92. package/MenuList/MenuList.js +77 -109
  93. package/MenuList/MenuList.mjs +77 -109
  94. package/MobileStepper/MobileStepper.d.mts +0 -5
  95. package/MobileStepper/MobileStepper.d.ts +0 -5
  96. package/MobileStepper/MobileStepper.js +1 -10
  97. package/MobileStepper/MobileStepper.mjs +1 -10
  98. package/Paper/Paper.d.mts +1 -0
  99. package/Paper/Paper.d.ts +1 -0
  100. package/Popover/Popover.d.mts +4 -48
  101. package/Popover/Popover.d.ts +4 -48
  102. package/Popover/Popover.js +4 -64
  103. package/Popover/Popover.mjs +4 -64
  104. package/Popper/Popper.d.mts +0 -17
  105. package/Popper/Popper.d.ts +0 -17
  106. package/Popper/Popper.js +2 -26
  107. package/Popper/Popper.mjs +2 -26
  108. package/Popper/index.d.mts +1 -0
  109. package/Popper/index.d.ts +1 -0
  110. package/Popper/index.js +11 -2
  111. package/Popper/index.mjs +1 -0
  112. package/Select/SelectInput.js +50 -55
  113. package/Select/SelectInput.mjs +47 -52
  114. package/Select/index.d.mts +1 -0
  115. package/Select/index.d.ts +1 -0
  116. package/Select/index.js +12 -0
  117. package/Select/index.mjs +1 -0
  118. package/Select/utils/SelectFocusSourceContext.d.mts +4 -0
  119. package/Select/utils/SelectFocusSourceContext.d.ts +4 -0
  120. package/Select/utils/SelectFocusSourceContext.js +19 -0
  121. package/Select/utils/SelectFocusSourceContext.mjs +13 -0
  122. package/Select/utils/areEqualValues.d.mts +1 -0
  123. package/Select/utils/areEqualValues.d.ts +1 -0
  124. package/Select/utils/areEqualValues.js +14 -0
  125. package/Select/utils/areEqualValues.mjs +8 -0
  126. package/Select/utils/getOpenInteractionType.d.mts +1 -0
  127. package/Select/utils/getOpenInteractionType.d.ts +1 -0
  128. package/Select/utils/getOpenInteractionType.js +18 -0
  129. package/Select/utils/getOpenInteractionType.mjs +12 -0
  130. package/Select/utils/index.d.mts +4 -0
  131. package/Select/utils/index.d.ts +4 -0
  132. package/Select/utils/index.js +40 -0
  133. package/Select/utils/index.mjs +4 -0
  134. package/Select/utils/isEmpty.d.mts +1 -0
  135. package/Select/utils/isEmpty.d.ts +1 -0
  136. package/Select/utils/isEmpty.js +9 -0
  137. package/Select/utils/isEmpty.mjs +3 -0
  138. package/Slider/Slider.d.mts +109 -77
  139. package/Slider/Slider.d.ts +109 -77
  140. package/Slider/Slider.js +42 -119
  141. package/Slider/Slider.mjs +42 -119
  142. package/Slider/sliderClasses.d.mts +7 -7
  143. package/Slider/sliderClasses.d.ts +7 -7
  144. package/Slider/useSlider.js +50 -14
  145. package/Slider/useSlider.mjs +50 -14
  146. package/Snackbar/Snackbar.d.mts +1 -27
  147. package/Snackbar/Snackbar.d.ts +1 -27
  148. package/Snackbar/Snackbar.js +5 -58
  149. package/Snackbar/Snackbar.mjs +5 -58
  150. package/SpeedDial/SpeedDial.d.mts +0 -13
  151. package/SpeedDial/SpeedDial.d.ts +0 -13
  152. package/SpeedDial/SpeedDial.js +15 -40
  153. package/SpeedDial/SpeedDial.mjs +15 -40
  154. package/SpeedDialAction/SpeedDialAction.d.mts +0 -28
  155. package/SpeedDialAction/SpeedDialAction.d.ts +0 -28
  156. package/SpeedDialAction/SpeedDialAction.js +5 -46
  157. package/SpeedDialAction/SpeedDialAction.mjs +5 -46
  158. package/Step/Step.js +7 -5
  159. package/Step/Step.mjs +7 -5
  160. package/StepButton/StepButton.js +16 -6
  161. package/StepButton/StepButton.mjs +16 -6
  162. package/StepConnector/StepConnector.js +2 -2
  163. package/StepConnector/StepConnector.mjs +2 -2
  164. package/StepContent/StepContent.js +2 -2
  165. package/StepContent/StepContent.mjs +2 -2
  166. package/StepLabel/StepLabel.js +2 -2
  167. package/StepLabel/StepLabel.mjs +2 -2
  168. package/Stepper/Stepper.js +44 -7
  169. package/Stepper/Stepper.mjs +44 -7
  170. package/Stepper/StepperContext.d.mts +7 -0
  171. package/Stepper/StepperContext.d.ts +7 -0
  172. package/Stepper/StepperContext.js +2 -1
  173. package/Stepper/StepperContext.mjs +1 -0
  174. package/Stepper/index.d.mts +0 -1
  175. package/Stepper/index.d.ts +0 -1
  176. package/Tab/Tab.js +0 -1
  177. package/Tab/Tab.mjs +0 -1
  178. package/TablePagination/TablePagination.d.mts +1 -1
  179. package/TablePagination/TablePagination.d.ts +1 -1
  180. package/TablePagination/TablePagination.js +4 -2
  181. package/TablePagination/TablePagination.mjs +4 -2
  182. package/Tabs/Tabs.d.mts +2 -33
  183. package/Tabs/Tabs.d.ts +2 -33
  184. package/Tabs/Tabs.js +54 -135
  185. package/Tabs/Tabs.mjs +54 -135
  186. package/TextField/TextField.d.mts +6 -49
  187. package/TextField/TextField.d.ts +6 -49
  188. package/TextField/TextField.js +18 -53
  189. package/TextField/TextField.mjs +18 -53
  190. package/Tooltip/Tooltip.d.mts +1 -55
  191. package/Tooltip/Tooltip.d.ts +1 -55
  192. package/Tooltip/Tooltip.js +9 -87
  193. package/Tooltip/Tooltip.mjs +9 -87
  194. package/Typography/Typography.d.mts +1 -6
  195. package/Typography/Typography.d.ts +1 -6
  196. package/Typography/Typography.js +3 -19
  197. package/Typography/Typography.mjs +3 -19
  198. package/Typography/typographyClasses.d.mts +0 -5
  199. package/Typography/typographyClasses.d.ts +0 -5
  200. package/Typography/typographyClasses.js +1 -1
  201. package/Typography/typographyClasses.mjs +1 -1
  202. package/index.d.mts +0 -2
  203. package/index.d.ts +0 -2
  204. package/index.js +1 -9
  205. package/index.mjs +1 -2
  206. package/locale/amET.js +4 -1
  207. package/locale/amET.mjs +3 -1
  208. package/locale/arEG.js +4 -1
  209. package/locale/arEG.mjs +3 -1
  210. package/locale/arSA.js +4 -1
  211. package/locale/arSA.mjs +3 -1
  212. package/locale/arSD.js +4 -1
  213. package/locale/arSD.mjs +3 -1
  214. package/locale/beBY.js +4 -1
  215. package/locale/beBY.mjs +3 -1
  216. package/locale/bnBD.js +4 -1
  217. package/locale/bnBD.mjs +3 -1
  218. package/locale/caES.js +4 -1
  219. package/locale/caES.mjs +3 -1
  220. package/locale/csCZ.js +4 -1
  221. package/locale/csCZ.mjs +3 -1
  222. package/locale/daDK.js +4 -1
  223. package/locale/daDK.mjs +3 -1
  224. package/locale/deDE.js +4 -1
  225. package/locale/deDE.mjs +3 -1
  226. package/locale/elGR.js +4 -1
  227. package/locale/elGR.mjs +3 -1
  228. package/locale/esES.js +4 -1
  229. package/locale/esES.mjs +3 -1
  230. package/locale/etEE.js +4 -1
  231. package/locale/etEE.mjs +3 -1
  232. package/locale/faIR.js +4 -1
  233. package/locale/faIR.mjs +3 -1
  234. package/locale/fiFI.js +4 -1
  235. package/locale/fiFI.mjs +3 -1
  236. package/locale/frFR.js +4 -1
  237. package/locale/frFR.mjs +3 -1
  238. package/locale/heIL.js +4 -1
  239. package/locale/heIL.mjs +3 -1
  240. package/locale/hiIN.js +4 -1
  241. package/locale/hiIN.mjs +3 -1
  242. package/locale/hrHR.js +5 -1
  243. package/locale/hrHR.mjs +4 -1
  244. package/locale/isIS.js +4 -1
  245. package/locale/isIS.mjs +3 -1
  246. package/locale/itIT.js +4 -1
  247. package/locale/itIT.mjs +3 -1
  248. package/locale/jaJP.js +4 -1
  249. package/locale/jaJP.mjs +3 -1
  250. package/locale/khKH.js +4 -1
  251. package/locale/khKH.mjs +3 -1
  252. package/locale/kkKZ.js +4 -1
  253. package/locale/kkKZ.mjs +3 -1
  254. package/locale/koKR.js +4 -1
  255. package/locale/koKR.mjs +3 -1
  256. package/locale/kuCKB.js +4 -1
  257. package/locale/kuCKB.mjs +3 -1
  258. package/locale/kuLatn.js +4 -1
  259. package/locale/kuLatn.mjs +3 -1
  260. package/locale/mkMK.js +5 -1
  261. package/locale/mkMK.mjs +4 -1
  262. package/locale/msMS.js +5 -1
  263. package/locale/msMS.mjs +4 -1
  264. package/locale/myMY.js +5 -1
  265. package/locale/myMY.mjs +4 -1
  266. package/locale/nbNO.js +4 -1
  267. package/locale/nbNO.mjs +3 -1
  268. package/locale/neNP.js +5 -1
  269. package/locale/neNP.mjs +4 -1
  270. package/locale/nlNL.js +4 -1
  271. package/locale/nlNL.mjs +3 -1
  272. package/locale/nnNO.js +4 -1
  273. package/locale/nnNO.mjs +3 -1
  274. package/locale/plPL.js +4 -1
  275. package/locale/plPL.mjs +3 -1
  276. package/locale/psAF.js +4 -1
  277. package/locale/psAF.mjs +3 -1
  278. package/locale/ptBR.js +4 -1
  279. package/locale/ptBR.mjs +3 -1
  280. package/locale/ptPT.js +4 -1
  281. package/locale/ptPT.mjs +3 -1
  282. package/locale/roRO.js +4 -1
  283. package/locale/roRO.mjs +3 -1
  284. package/locale/ruRU.js +4 -1
  285. package/locale/ruRU.mjs +3 -1
  286. package/locale/siLK.js +4 -1
  287. package/locale/siLK.mjs +3 -1
  288. package/locale/skSK.js +4 -1
  289. package/locale/skSK.mjs +3 -1
  290. package/locale/srRS.js +5 -1
  291. package/locale/srRS.mjs +4 -1
  292. package/locale/svSE.js +4 -1
  293. package/locale/svSE.mjs +3 -1
  294. package/locale/thTH.js +4 -1
  295. package/locale/thTH.mjs +3 -1
  296. package/locale/tlTL.js +5 -1
  297. package/locale/tlTL.mjs +4 -1
  298. package/locale/trTR.js +4 -1
  299. package/locale/trTR.mjs +3 -1
  300. package/locale/ukUA.js +4 -1
  301. package/locale/ukUA.mjs +3 -1
  302. package/locale/urPK.js +4 -1
  303. package/locale/urPK.mjs +3 -1
  304. package/locale/utils/buildFormatNumber.d.mts +2 -0
  305. package/locale/utils/buildFormatNumber.d.ts +2 -0
  306. package/locale/utils/buildFormatNumber.js +23 -0
  307. package/locale/utils/buildFormatNumber.mjs +17 -0
  308. package/locale/viVN.js +4 -1
  309. package/locale/viVN.mjs +3 -1
  310. package/locale/zhCN.js +4 -1
  311. package/locale/zhCN.mjs +3 -1
  312. package/locale/zhHK.js +4 -1
  313. package/locale/zhHK.mjs +3 -1
  314. package/locale/zhTW.js +4 -1
  315. package/locale/zhTW.mjs +3 -1
  316. package/package.json +236 -236
  317. package/styles/components.d.mts +0 -5
  318. package/styles/components.d.ts +0 -5
  319. package/styles/overrides.d.mts +0 -2
  320. package/styles/overrides.d.ts +0 -2
  321. package/styles/props.d.mts +0 -2
  322. package/styles/props.d.ts +0 -2
  323. package/themeCssVarsAugmentation/index.js +5 -0
  324. package/themeCssVarsAugmentation/index.mjs +5 -0
  325. package/useAutocomplete/useAutocomplete.d.mts +0 -12
  326. package/useAutocomplete/useAutocomplete.d.ts +0 -12
  327. package/useAutocomplete/useAutocomplete.js +53 -28
  328. package/useAutocomplete/useAutocomplete.mjs +53 -28
  329. package/utils/index.d.mts +2 -0
  330. package/utils/index.d.ts +2 -0
  331. package/utils/index.js +14 -0
  332. package/utils/index.mjs +2 -0
  333. package/utils/useRovingTabIndex.d.mts +2 -0
  334. package/utils/useRovingTabIndex.d.ts +2 -0
  335. package/utils/useRovingTabIndex.js +9 -0
  336. package/utils/useRovingTabIndex.mjs +2 -0
  337. package/version/index.js +2 -2
  338. package/version/index.mjs +2 -2
  339. package/GridLegacy/GridLegacy.d.mts +0 -160
  340. package/GridLegacy/GridLegacy.d.ts +0 -160
  341. package/GridLegacy/GridLegacy.js +0 -601
  342. package/GridLegacy/GridLegacy.mjs +0 -588
  343. package/GridLegacy/GridLegacyContext.js +0 -17
  344. package/GridLegacy/GridLegacyContext.mjs +0 -12
  345. package/GridLegacy/gridLegacyClasses.d.mts +0 -48
  346. package/GridLegacy/gridLegacyClasses.d.ts +0 -48
  347. package/GridLegacy/gridLegacyClasses.js +0 -27
  348. package/GridLegacy/gridLegacyClasses.mjs +0 -19
  349. package/GridLegacy/index.d.mts +0 -4
  350. package/GridLegacy/index.d.ts +0 -4
  351. package/GridLegacy/index.js +0 -35
  352. package/GridLegacy/index.mjs +0 -3
@@ -5,11 +5,14 @@ import PropTypes from 'prop-types';
5
5
  import clsx from 'clsx';
6
6
  import integerPropType from '@mui/utils/integerPropType';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
+ import { useRtl } from '@mui/system/RtlProvider';
9
+ import useRovingTabIndex from "../utils/useRovingTabIndex.mjs";
8
10
  import { styled } from "../zero-styled/index.mjs";
9
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
10
12
  import { getStepperUtilityClass } from "./stepperClasses.mjs";
11
13
  import StepConnector from "../StepConnector/index.mjs";
12
- import StepperContext from "./StepperContext.mjs";
14
+ import { StepperContextProvider } from "./StepperContext.mjs";
15
+ import StepButton from "../StepButton/index.mjs";
13
16
  import { jsx as _jsx } from "react/jsx-runtime";
14
17
  const useUtilityClasses = ownerState => {
15
18
  const {
@@ -23,7 +26,7 @@ const useUtilityClasses = ownerState => {
23
26
  };
24
27
  return composeClasses(slots, getStepperUtilityClass, classes);
25
28
  };
26
- const StepperRoot = styled('div', {
29
+ const StepperRoot = styled('ol', {
27
30
  name: 'MuiStepper',
28
31
  slot: 'Root',
29
32
  overridesResolver: (props, styles) => {
@@ -34,6 +37,9 @@ const StepperRoot = styled('div', {
34
37
  }
35
38
  })({
36
39
  display: 'flex',
40
+ listStyle: 'none',
41
+ margin: 0,
42
+ padding: 0,
37
43
  variants: [{
38
44
  props: {
39
45
  orientation: 'horizontal'
@@ -60,6 +66,7 @@ const StepperRoot = styled('div', {
60
66
  });
61
67
  const defaultConnector = /*#__PURE__*/_jsx(StepConnector, {});
62
68
  const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
69
+ const isRtl = useRtl();
63
70
  const props = useDefaultProps({
64
71
  props: inProps,
65
72
  name: 'MuiStepper'
@@ -69,7 +76,7 @@ const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
69
76
  alternativeLabel = false,
70
77
  children,
71
78
  className,
72
- component = 'div',
79
+ component = 'ol',
73
80
  connector = defaultConnector,
74
81
  nonLinear = false,
75
82
  orientation = 'horizontal',
@@ -84,27 +91,57 @@ const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
84
91
  };
85
92
  const classes = useUtilityClasses(ownerState);
86
93
  const childrenArray = React.Children.toArray(children).filter(Boolean);
94
+ const totalSteps = childrenArray.length;
95
+ const isTabList = childrenArray.some(child => {
96
+ if (! /*#__PURE__*/React.isValidElement(child)) {
97
+ return false;
98
+ }
99
+ if (child.type === StepButton) {
100
+ return true;
101
+ }
102
+ const grandChildren = child.props.children;
103
+ if (grandChildren) {
104
+ return React.Children.toArray(grandChildren).some(grandChild => /*#__PURE__*/React.isValidElement(grandChild) && grandChild.type === StepButton);
105
+ }
106
+ return false;
107
+ });
87
108
  const steps = childrenArray.map((step, index) => {
88
109
  return /*#__PURE__*/React.cloneElement(step, {
89
110
  index,
90
- last: index + 1 === childrenArray.length,
111
+ last: index + 1 === totalSteps,
91
112
  ...step.props
92
113
  });
93
114
  });
115
+ const {
116
+ getContainerProps,
117
+ getItemProps
118
+ } = useRovingTabIndex({
119
+ orientation,
120
+ isRtl
121
+ });
122
+ const rovingTabIndexContainerProps = getContainerProps(ref);
94
123
  const contextValue = React.useMemo(() => ({
95
124
  activeStep,
96
125
  alternativeLabel,
97
126
  connector,
98
127
  nonLinear,
99
- orientation
100
- }), [activeStep, alternativeLabel, connector, nonLinear, orientation]);
101
- return /*#__PURE__*/_jsx(StepperContext.Provider, {
128
+ orientation,
129
+ totalSteps,
130
+ getRovingTabIndexProps: getItemProps,
131
+ isTabList
132
+ }), [activeStep, alternativeLabel, connector, nonLinear, orientation, totalSteps, getItemProps, isTabList]);
133
+ return /*#__PURE__*/_jsx(StepperContextProvider, {
102
134
  value: contextValue,
103
135
  children: /*#__PURE__*/_jsx(StepperRoot, {
104
136
  as: component,
105
137
  ownerState: ownerState,
106
138
  className: clsx(classes.root, className),
107
139
  ref: ref,
140
+ ...(isTabList && {
141
+ role: 'tablist',
142
+ 'aria-orientation': orientation,
143
+ ...rovingTabIndexContainerProps
144
+ }),
108
145
  ...other,
109
146
  children: steps
110
147
  })
@@ -5,6 +5,12 @@ export interface StepperContextType {
5
5
  connector: React.ReactNode;
6
6
  nonLinear: boolean;
7
7
  orientation: 'horizontal' | 'vertical';
8
+ totalSteps: number;
9
+ getRovingTabIndexProps: (index: number, ref?: React.Ref<HTMLElement>) => {
10
+ ref: (element: HTMLElement | null) => void;
11
+ tabIndex: number;
12
+ };
13
+ isTabList: boolean;
8
14
  }
9
15
  /**
10
16
  * Provides information about the current step in Stepper.
@@ -15,4 +21,5 @@ declare const StepperContext: React.Context<{} | StepperContextType>;
15
21
  * has been defined in the component tree.
16
22
  */
17
23
  export declare function useStepperContext(): StepperContextType | {};
24
+ export declare const StepperContextProvider: React.Provider<{} | StepperContextType>;
18
25
  export default StepperContext;
@@ -5,6 +5,12 @@ export interface StepperContextType {
5
5
  connector: React.ReactNode;
6
6
  nonLinear: boolean;
7
7
  orientation: 'horizontal' | 'vertical';
8
+ totalSteps: number;
9
+ getRovingTabIndexProps: (index: number, ref?: React.Ref<HTMLElement>) => {
10
+ ref: (element: HTMLElement | null) => void;
11
+ tabIndex: number;
12
+ };
13
+ isTabList: boolean;
8
14
  }
9
15
  /**
10
16
  * Provides information about the current step in Stepper.
@@ -15,4 +21,5 @@ declare const StepperContext: React.Context<{} | StepperContextType>;
15
21
  * has been defined in the component tree.
16
22
  */
17
23
  export declare function useStepperContext(): StepperContextType | {};
24
+ export declare const StepperContextProvider: React.Provider<{} | StepperContextType>;
18
25
  export default StepperContext;
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = void 0;
8
+ exports.default = exports.StepperContextProvider = void 0;
9
9
  exports.useStepperContext = useStepperContext;
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  /**
@@ -23,4 +23,5 @@ if (process.env.NODE_ENV !== 'production') {
23
23
  function useStepperContext() {
24
24
  return React.useContext(StepperContext);
25
25
  }
26
+ const StepperContextProvider = exports.StepperContextProvider = StepperContext.Provider;
26
27
  var _default = exports.default = StepperContext;
@@ -16,4 +16,5 @@ if (process.env.NODE_ENV !== 'production') {
16
16
  export function useStepperContext() {
17
17
  return React.useContext(StepperContext);
18
18
  }
19
+ export const StepperContextProvider = StepperContext.Provider;
19
20
  export default StepperContext;
@@ -2,5 +2,4 @@ export { default } from "./Stepper.mjs";
2
2
  export * from "./Stepper.mjs";
3
3
  export { default as stepperClasses } from "./stepperClasses.mjs";
4
4
  export * from "./stepperClasses.mjs";
5
- export { default as StepperContext } from "./StepperContext.mjs";
6
5
  export * from "./StepperContext.mjs";
@@ -2,5 +2,4 @@ export { default } from "./Stepper.js";
2
2
  export * from "./Stepper.js";
3
3
  export { default as stepperClasses } from "./stepperClasses.js";
4
4
  export * from "./stepperClasses.js";
5
- export { default as StepperContext } from "./StepperContext.js";
6
5
  export * from "./StepperContext.js";
package/Tab/Tab.js CHANGED
@@ -257,7 +257,6 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
257
257
  onClick: handleClick,
258
258
  onFocus: handleFocus,
259
259
  ownerState: ownerState,
260
- tabIndex: selected ? 0 : -1,
261
260
  ...other,
262
261
  children: [iconPosition === 'top' || iconPosition === 'start' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
263
262
  children: [icon, label]
package/Tab/Tab.mjs CHANGED
@@ -250,7 +250,6 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
250
250
  onClick: handleClick,
251
251
  onFocus: handleFocus,
252
252
  ownerState: ownerState,
253
- tabIndex: selected ? 0 : -1,
254
253
  ...other,
255
254
  children: [iconPosition === 'top' || iconPosition === 'start' ? /*#__PURE__*/_jsxs(React.Fragment, {
256
255
  children: [icon, label]
@@ -162,7 +162,7 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
162
162
  *
163
163
  * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
164
164
  * @default function defaultLabelDisplayedRows({ from, to, count }) {
165
- * return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
165
+ * return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
166
166
  * }
167
167
  */
168
168
  labelDisplayedRows?: ((paginationInfo: LabelDisplayedRowsArgs) => React.ReactNode) | undefined;
@@ -162,7 +162,7 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
162
162
  *
163
163
  * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
164
164
  * @default function defaultLabelDisplayedRows({ from, to, count }) {
165
- * return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
165
+ * return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
166
166
  * }
167
167
  */
168
168
  labelDisplayedRows?: ((paginationInfo: LabelDisplayedRowsArgs) => React.ReactNode) | undefined;
@@ -26,8 +26,10 @@ var _TablePaginationActions = _interopRequireDefault(require("../TablePagination
26
26
  var _useId = _interopRequireDefault(require("../utils/useId"));
27
27
  var _tablePaginationClasses = _interopRequireWildcard(require("./tablePaginationClasses"));
28
28
  var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
29
+ var _buildFormatNumber = _interopRequireDefault(require("../locale/utils/buildFormatNumber"));
29
30
  var _jsxRuntime = require("react/jsx-runtime");
30
31
  var _InputBase;
32
+ const formatNumber = (0, _buildFormatNumber.default)('en-US');
31
33
  const TablePaginationRoot = (0, _zeroStyled.styled)(_TableCell.default, {
32
34
  name: 'MuiTablePagination',
33
35
  slot: 'Root'
@@ -121,7 +123,7 @@ function defaultLabelDisplayedRows({
121
123
  to,
122
124
  count
123
125
  }) {
124
- return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
126
+ return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
125
127
  }
126
128
  function defaultGetAriaLabel(type) {
127
129
  return `Go to ${type} page`;
@@ -369,7 +371,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
369
371
  *
370
372
  * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
371
373
  * @default function defaultLabelDisplayedRows({ from, to, count }) {
372
- * return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
374
+ * return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
373
375
  * }
374
376
  */
375
377
  labelDisplayedRows: _propTypes.default.func,
@@ -19,8 +19,10 @@ import TablePaginationActions from "../TablePaginationActions/index.mjs";
19
19
  import useId from "../utils/useId.mjs";
20
20
  import tablePaginationClasses, { getTablePaginationUtilityClass } from "./tablePaginationClasses.mjs";
21
21
  import useSlot from "../utils/useSlot.mjs";
22
+ import buildFormatNumber from "../locale/utils/buildFormatNumber.mjs";
22
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
24
  import { createElement as _createElement } from "react";
25
+ const formatNumber = buildFormatNumber('en-US');
24
26
  const TablePaginationRoot = styled(TableCell, {
25
27
  name: 'MuiTablePagination',
26
28
  slot: 'Root'
@@ -114,7 +116,7 @@ function defaultLabelDisplayedRows({
114
116
  to,
115
117
  count
116
118
  }) {
117
- return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
119
+ return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
118
120
  }
119
121
  function defaultGetAriaLabel(type) {
120
122
  return `Go to ${type} page`;
@@ -362,7 +364,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
362
364
  *
363
365
  * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
364
366
  * @default function defaultLabelDisplayedRows({ from, to, count }) {
365
- * return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
367
+ * return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
366
368
  * }
367
369
  */
368
370
  labelDisplayedRows: PropTypes.func,
package/Tabs/Tabs.d.mts CHANGED
@@ -3,7 +3,7 @@ import { SxProps } from '@mui/system';
3
3
  import { OverridableStringUnion } from '@mui/types';
4
4
  import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
5
5
  import { Theme } from "../styles/index.mjs";
6
- import TabScrollButton, { TabScrollButtonProps } from "../TabScrollButton/index.mjs";
6
+ import TabScrollButton from "../TabScrollButton/index.mjs";
7
7
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.mjs";
8
8
  import { TabsClasses } from "./tabsClasses.mjs";
9
9
  import SvgIcon from "../SvgIcon/index.mjs";
@@ -102,18 +102,7 @@ export type TabsSlotsAndSlotProps = CreateSlotsAndSlotProps<TabsSlots, {
102
102
  * By default, the available props are based on the [SvgIcon](https://mui.com/material-ui/api/svg-icon/#props) component.
103
103
  */
104
104
  endScrollButtonIcon: SlotProps<typeof SvgIcon, TabsEndScrollButtonIconSlotPropsOverrides, TabsOwnerState>;
105
- }> & {
106
- slots?: {
107
- /**
108
- * @deprecated Use `slots.startScrollButtonIcon` instead.
109
- */
110
- StartScrollButtonIcon?: React.ElementType | undefined;
111
- /**
112
- * @deprecated Use `slots.endScrollButtonIcon` instead.
113
- */
114
- EndScrollButtonIcon?: React.ElementType | undefined;
115
- } | undefined;
116
- };
105
+ }>;
117
106
  export interface TabsOwnerState extends Omit<TabsProps, 'slots' | 'slotProps'> {
118
107
  vertical: boolean;
119
108
  fixed: boolean;
@@ -178,12 +167,6 @@ export interface TabsOwnProps extends TabsSlotsAndSlotProps {
178
167
  * @default 'horizontal'
179
168
  */
180
169
  orientation?: 'horizontal' | 'vertical' | undefined;
181
- /**
182
- * The component used to render the scroll buttons.
183
- * @deprecated use the `slots.scrollButtons` 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.
184
- * @default TabScrollButton
185
- */
186
- ScrollButtonComponent?: React.ElementType | undefined;
187
170
  /**
188
171
  * Determine behavior of scroll buttons when tabs are set to scroll:
189
172
  *
@@ -201,20 +184,6 @@ export interface TabsOwnProps extends TabsSlotsAndSlotProps {
201
184
  * changes on activation.
202
185
  */
203
186
  selectionFollowsFocus?: boolean | undefined;
204
- /**
205
- * Props applied to the tab indicator element.
206
- * @deprecated use the `slotProps.indicator` 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.
207
- * @default {}
208
- */
209
- TabIndicatorProps?: (React.HTMLAttributes<HTMLDivElement> & {
210
- sx?: SxProps<Theme> | undefined;
211
- }) | undefined;
212
- /**
213
- * Props applied to the [`TabScrollButton`](https://mui.com/material-ui/api/tab-scroll-button/) element.
214
- * @deprecated use the `slotProps.scrollButtons` 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.
215
- * @default {}
216
- */
217
- TabScrollButtonProps?: Partial<TabScrollButtonProps> | undefined;
218
187
  /**
219
188
  * Determines the color of the `Tab`.
220
189
  * @default 'primary'
package/Tabs/Tabs.d.ts CHANGED
@@ -3,7 +3,7 @@ import { SxProps } from '@mui/system';
3
3
  import { OverridableStringUnion } from '@mui/types';
4
4
  import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
5
5
  import { Theme } from "../styles/index.js";
6
- import TabScrollButton, { TabScrollButtonProps } from "../TabScrollButton/index.js";
6
+ import TabScrollButton from "../TabScrollButton/index.js";
7
7
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
8
8
  import { TabsClasses } from "./tabsClasses.js";
9
9
  import SvgIcon from "../SvgIcon/index.js";
@@ -102,18 +102,7 @@ export type TabsSlotsAndSlotProps = CreateSlotsAndSlotProps<TabsSlots, {
102
102
  * By default, the available props are based on the [SvgIcon](https://mui.com/material-ui/api/svg-icon/#props) component.
103
103
  */
104
104
  endScrollButtonIcon: SlotProps<typeof SvgIcon, TabsEndScrollButtonIconSlotPropsOverrides, TabsOwnerState>;
105
- }> & {
106
- slots?: {
107
- /**
108
- * @deprecated Use `slots.startScrollButtonIcon` instead.
109
- */
110
- StartScrollButtonIcon?: React.ElementType | undefined;
111
- /**
112
- * @deprecated Use `slots.endScrollButtonIcon` instead.
113
- */
114
- EndScrollButtonIcon?: React.ElementType | undefined;
115
- } | undefined;
116
- };
105
+ }>;
117
106
  export interface TabsOwnerState extends Omit<TabsProps, 'slots' | 'slotProps'> {
118
107
  vertical: boolean;
119
108
  fixed: boolean;
@@ -178,12 +167,6 @@ export interface TabsOwnProps extends TabsSlotsAndSlotProps {
178
167
  * @default 'horizontal'
179
168
  */
180
169
  orientation?: 'horizontal' | 'vertical' | undefined;
181
- /**
182
- * The component used to render the scroll buttons.
183
- * @deprecated use the `slots.scrollButtons` 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.
184
- * @default TabScrollButton
185
- */
186
- ScrollButtonComponent?: React.ElementType | undefined;
187
170
  /**
188
171
  * Determine behavior of scroll buttons when tabs are set to scroll:
189
172
  *
@@ -201,20 +184,6 @@ export interface TabsOwnProps extends TabsSlotsAndSlotProps {
201
184
  * changes on activation.
202
185
  */
203
186
  selectionFollowsFocus?: boolean | undefined;
204
- /**
205
- * Props applied to the tab indicator element.
206
- * @deprecated use the `slotProps.indicator` 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.
207
- * @default {}
208
- */
209
- TabIndicatorProps?: (React.HTMLAttributes<HTMLDivElement> & {
210
- sx?: SxProps<Theme> | undefined;
211
- }) | undefined;
212
- /**
213
- * Props applied to the [`TabScrollButton`](https://mui.com/material-ui/api/tab-scroll-button/) element.
214
- * @deprecated use the `slotProps.scrollButtons` 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.
215
- * @default {}
216
- */
217
- TabScrollButtonProps?: Partial<TabScrollButtonProps> | undefined;
218
187
  /**
219
188
  * Determines the color of the `Tab`.
220
189
  * @default 'primary'