@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.
- package/Accordion/Accordion.d.mts +0 -14
- package/Accordion/Accordion.d.ts +0 -14
- package/Accordion/Accordion.js +3 -25
- package/Accordion/Accordion.mjs +3 -25
- package/AccordionSummary/AccordionSummary.js +1 -1
- package/AccordionSummary/AccordionSummary.mjs +1 -1
- package/AccordionSummary/accordionSummaryClasses.d.mts +0 -5
- package/AccordionSummary/accordionSummaryClasses.d.ts +0 -5
- package/AccordionSummary/accordionSummaryClasses.js +1 -1
- package/AccordionSummary/accordionSummaryClasses.mjs +1 -1
- package/Alert/Alert.d.mts +0 -23
- package/Alert/Alert.d.ts +0 -23
- package/Alert/Alert.js +4 -36
- package/Alert/Alert.mjs +4 -36
- package/Alert/alertClasses.d.mts +0 -72
- package/Alert/alertClasses.d.ts +0 -72
- package/Alert/alertClasses.js +1 -1
- package/Alert/alertClasses.mjs +1 -1
- package/Autocomplete/Autocomplete.d.mts +26 -60
- package/Autocomplete/Autocomplete.d.ts +26 -60
- package/Autocomplete/Autocomplete.js +76 -119
- package/Autocomplete/Autocomplete.mjs +76 -119
- package/Avatar/Avatar.d.mts +0 -8
- package/Avatar/Avatar.d.ts +0 -8
- package/Avatar/Avatar.js +13 -35
- package/Avatar/Avatar.mjs +13 -35
- package/AvatarGroup/AvatarGroup.d.mts +0 -15
- package/AvatarGroup/AvatarGroup.d.ts +0 -15
- package/AvatarGroup/AvatarGroup.js +1 -18
- package/AvatarGroup/AvatarGroup.mjs +1 -18
- package/Backdrop/Backdrop.d.mts +1 -31
- package/Backdrop/Backdrop.d.ts +1 -31
- package/Backdrop/Backdrop.js +2 -42
- package/Backdrop/Backdrop.mjs +2 -42
- package/Badge/Badge.d.mts +0 -20
- package/Badge/Badge.d.ts +0 -20
- package/Badge/Badge.js +2 -35
- package/Badge/Badge.mjs +2 -35
- package/Box/Box.d.mts +1 -0
- package/Box/Box.d.ts +1 -0
- package/Button/Button.d.mts +1 -0
- package/Button/Button.d.ts +1 -0
- package/Button/Button.js +6 -6
- package/Button/Button.mjs +6 -6
- package/Button/buttonClasses.d.mts +0 -132
- package/Button/buttonClasses.d.ts +0 -132
- package/Button/buttonClasses.js +1 -1
- package/Button/buttonClasses.mjs +1 -1
- package/ButtonBase/ButtonBase.js +16 -2
- package/ButtonBase/ButtonBase.mjs +16 -2
- package/CHANGELOG.md +191 -0
- package/CardHeader/CardHeader.js +5 -1
- package/CardHeader/CardHeader.mjs +5 -1
- package/CircularProgress/CircularProgress.js +2 -2
- package/CircularProgress/CircularProgress.mjs +2 -2
- package/CircularProgress/circularProgressClasses.d.mts +0 -8
- package/CircularProgress/circularProgressClasses.d.ts +0 -8
- package/CircularProgress/circularProgressClasses.js +1 -1
- package/CircularProgress/circularProgressClasses.mjs +1 -1
- package/Divider/Divider.d.mts +1 -6
- package/Divider/Divider.d.ts +1 -6
- package/Divider/Divider.js +2 -18
- package/Divider/Divider.mjs +2 -18
- package/Divider/dividerClasses.d.mts +0 -4
- package/Divider/dividerClasses.d.ts +0 -4
- package/Divider/dividerClasses.js +1 -1
- package/Divider/dividerClasses.mjs +1 -1
- package/FormControlLabel/FormControlLabel.d.mts +1 -14
- package/FormControlLabel/FormControlLabel.d.ts +1 -14
- package/FormControlLabel/FormControlLabel.js +1 -13
- package/FormControlLabel/FormControlLabel.mjs +1 -13
- package/Input/Input.js +2 -1
- package/Input/Input.mjs +2 -1
- package/List/List.d.mts +1 -0
- package/List/List.d.ts +1 -0
- package/ListItemButton/ListItemButton.d.mts +1 -0
- package/ListItemButton/ListItemButton.d.ts +1 -0
- package/ListItemIcon/ListItemIcon.d.mts +1 -0
- package/ListItemIcon/ListItemIcon.d.ts +1 -0
- package/ListItemText/ListItemText.d.mts +1 -0
- package/ListItemText/ListItemText.d.ts +1 -0
- package/ListItemText/ListItemText.js +5 -1
- package/ListItemText/ListItemText.mjs +5 -1
- package/ListSubheader/ListSubheader.d.mts +1 -0
- package/ListSubheader/ListSubheader.d.ts +1 -0
- package/Menu/Menu.d.mts +0 -13
- package/Menu/Menu.d.ts +0 -13
- package/Menu/Menu.js +5 -44
- package/Menu/Menu.mjs +5 -44
- package/MenuItem/MenuItem.js +21 -1
- package/MenuItem/MenuItem.mjs +23 -1
- package/MenuList/MenuList.js +77 -109
- package/MenuList/MenuList.mjs +77 -109
- package/MobileStepper/MobileStepper.d.mts +0 -5
- package/MobileStepper/MobileStepper.d.ts +0 -5
- package/MobileStepper/MobileStepper.js +1 -10
- package/MobileStepper/MobileStepper.mjs +1 -10
- package/Paper/Paper.d.mts +1 -0
- package/Paper/Paper.d.ts +1 -0
- package/Popover/Popover.d.mts +4 -48
- package/Popover/Popover.d.ts +4 -48
- package/Popover/Popover.js +4 -64
- package/Popover/Popover.mjs +4 -64
- package/Popper/Popper.d.mts +0 -17
- package/Popper/Popper.d.ts +0 -17
- package/Popper/Popper.js +2 -26
- package/Popper/Popper.mjs +2 -26
- package/Popper/index.d.mts +1 -0
- package/Popper/index.d.ts +1 -0
- package/Popper/index.js +11 -2
- package/Popper/index.mjs +1 -0
- package/Select/SelectInput.js +50 -55
- package/Select/SelectInput.mjs +47 -52
- package/Select/index.d.mts +1 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +12 -0
- package/Select/index.mjs +1 -0
- package/Select/utils/SelectFocusSourceContext.d.mts +4 -0
- package/Select/utils/SelectFocusSourceContext.d.ts +4 -0
- package/Select/utils/SelectFocusSourceContext.js +19 -0
- package/Select/utils/SelectFocusSourceContext.mjs +13 -0
- package/Select/utils/areEqualValues.d.mts +1 -0
- package/Select/utils/areEqualValues.d.ts +1 -0
- package/Select/utils/areEqualValues.js +14 -0
- package/Select/utils/areEqualValues.mjs +8 -0
- package/Select/utils/getOpenInteractionType.d.mts +1 -0
- package/Select/utils/getOpenInteractionType.d.ts +1 -0
- package/Select/utils/getOpenInteractionType.js +18 -0
- package/Select/utils/getOpenInteractionType.mjs +12 -0
- package/Select/utils/index.d.mts +4 -0
- package/Select/utils/index.d.ts +4 -0
- package/Select/utils/index.js +40 -0
- package/Select/utils/index.mjs +4 -0
- package/Select/utils/isEmpty.d.mts +1 -0
- package/Select/utils/isEmpty.d.ts +1 -0
- package/Select/utils/isEmpty.js +9 -0
- package/Select/utils/isEmpty.mjs +3 -0
- package/Slider/Slider.d.mts +109 -77
- package/Slider/Slider.d.ts +109 -77
- package/Slider/Slider.js +42 -119
- package/Slider/Slider.mjs +42 -119
- package/Slider/sliderClasses.d.mts +7 -7
- package/Slider/sliderClasses.d.ts +7 -7
- package/Slider/useSlider.js +50 -14
- package/Slider/useSlider.mjs +50 -14
- package/Snackbar/Snackbar.d.mts +1 -27
- package/Snackbar/Snackbar.d.ts +1 -27
- package/Snackbar/Snackbar.js +5 -58
- package/Snackbar/Snackbar.mjs +5 -58
- package/SpeedDial/SpeedDial.d.mts +0 -13
- package/SpeedDial/SpeedDial.d.ts +0 -13
- package/SpeedDial/SpeedDial.js +15 -40
- package/SpeedDial/SpeedDial.mjs +15 -40
- package/SpeedDialAction/SpeedDialAction.d.mts +0 -28
- package/SpeedDialAction/SpeedDialAction.d.ts +0 -28
- package/SpeedDialAction/SpeedDialAction.js +5 -46
- package/SpeedDialAction/SpeedDialAction.mjs +5 -46
- package/Step/Step.js +7 -5
- package/Step/Step.mjs +7 -5
- package/StepButton/StepButton.js +16 -6
- package/StepButton/StepButton.mjs +16 -6
- package/StepConnector/StepConnector.js +2 -2
- package/StepConnector/StepConnector.mjs +2 -2
- package/StepContent/StepContent.js +2 -2
- package/StepContent/StepContent.mjs +2 -2
- package/StepLabel/StepLabel.js +2 -2
- package/StepLabel/StepLabel.mjs +2 -2
- package/Stepper/Stepper.js +44 -7
- package/Stepper/Stepper.mjs +44 -7
- package/Stepper/StepperContext.d.mts +7 -0
- package/Stepper/StepperContext.d.ts +7 -0
- package/Stepper/StepperContext.js +2 -1
- package/Stepper/StepperContext.mjs +1 -0
- package/Stepper/index.d.mts +0 -1
- package/Stepper/index.d.ts +0 -1
- package/Tab/Tab.js +0 -1
- package/Tab/Tab.mjs +0 -1
- package/TablePagination/TablePagination.d.mts +1 -1
- package/TablePagination/TablePagination.d.ts +1 -1
- package/TablePagination/TablePagination.js +4 -2
- package/TablePagination/TablePagination.mjs +4 -2
- package/Tabs/Tabs.d.mts +2 -33
- package/Tabs/Tabs.d.ts +2 -33
- package/Tabs/Tabs.js +54 -135
- package/Tabs/Tabs.mjs +54 -135
- package/TextField/TextField.d.mts +6 -49
- package/TextField/TextField.d.ts +6 -49
- package/TextField/TextField.js +18 -53
- package/TextField/TextField.mjs +18 -53
- package/Tooltip/Tooltip.d.mts +1 -55
- package/Tooltip/Tooltip.d.ts +1 -55
- package/Tooltip/Tooltip.js +9 -87
- package/Tooltip/Tooltip.mjs +9 -87
- package/Typography/Typography.d.mts +1 -6
- package/Typography/Typography.d.ts +1 -6
- package/Typography/Typography.js +3 -19
- package/Typography/Typography.mjs +3 -19
- package/Typography/typographyClasses.d.mts +0 -5
- package/Typography/typographyClasses.d.ts +0 -5
- package/Typography/typographyClasses.js +1 -1
- package/Typography/typographyClasses.mjs +1 -1
- package/index.d.mts +0 -2
- package/index.d.ts +0 -2
- package/index.js +1 -9
- package/index.mjs +1 -2
- package/locale/amET.js +4 -1
- package/locale/amET.mjs +3 -1
- package/locale/arEG.js +4 -1
- package/locale/arEG.mjs +3 -1
- package/locale/arSA.js +4 -1
- package/locale/arSA.mjs +3 -1
- package/locale/arSD.js +4 -1
- package/locale/arSD.mjs +3 -1
- package/locale/beBY.js +4 -1
- package/locale/beBY.mjs +3 -1
- package/locale/bnBD.js +4 -1
- package/locale/bnBD.mjs +3 -1
- package/locale/caES.js +4 -1
- package/locale/caES.mjs +3 -1
- package/locale/csCZ.js +4 -1
- package/locale/csCZ.mjs +3 -1
- package/locale/daDK.js +4 -1
- package/locale/daDK.mjs +3 -1
- package/locale/deDE.js +4 -1
- package/locale/deDE.mjs +3 -1
- package/locale/elGR.js +4 -1
- package/locale/elGR.mjs +3 -1
- package/locale/esES.js +4 -1
- package/locale/esES.mjs +3 -1
- package/locale/etEE.js +4 -1
- package/locale/etEE.mjs +3 -1
- package/locale/faIR.js +4 -1
- package/locale/faIR.mjs +3 -1
- package/locale/fiFI.js +4 -1
- package/locale/fiFI.mjs +3 -1
- package/locale/frFR.js +4 -1
- package/locale/frFR.mjs +3 -1
- package/locale/heIL.js +4 -1
- package/locale/heIL.mjs +3 -1
- package/locale/hiIN.js +4 -1
- package/locale/hiIN.mjs +3 -1
- package/locale/hrHR.js +5 -1
- package/locale/hrHR.mjs +4 -1
- package/locale/isIS.js +4 -1
- package/locale/isIS.mjs +3 -1
- package/locale/itIT.js +4 -1
- package/locale/itIT.mjs +3 -1
- package/locale/jaJP.js +4 -1
- package/locale/jaJP.mjs +3 -1
- package/locale/khKH.js +4 -1
- package/locale/khKH.mjs +3 -1
- package/locale/kkKZ.js +4 -1
- package/locale/kkKZ.mjs +3 -1
- package/locale/koKR.js +4 -1
- package/locale/koKR.mjs +3 -1
- package/locale/kuCKB.js +4 -1
- package/locale/kuCKB.mjs +3 -1
- package/locale/kuLatn.js +4 -1
- package/locale/kuLatn.mjs +3 -1
- package/locale/mkMK.js +5 -1
- package/locale/mkMK.mjs +4 -1
- package/locale/msMS.js +5 -1
- package/locale/msMS.mjs +4 -1
- package/locale/myMY.js +5 -1
- package/locale/myMY.mjs +4 -1
- package/locale/nbNO.js +4 -1
- package/locale/nbNO.mjs +3 -1
- package/locale/neNP.js +5 -1
- package/locale/neNP.mjs +4 -1
- package/locale/nlNL.js +4 -1
- package/locale/nlNL.mjs +3 -1
- package/locale/nnNO.js +4 -1
- package/locale/nnNO.mjs +3 -1
- package/locale/plPL.js +4 -1
- package/locale/plPL.mjs +3 -1
- package/locale/psAF.js +4 -1
- package/locale/psAF.mjs +3 -1
- package/locale/ptBR.js +4 -1
- package/locale/ptBR.mjs +3 -1
- package/locale/ptPT.js +4 -1
- package/locale/ptPT.mjs +3 -1
- package/locale/roRO.js +4 -1
- package/locale/roRO.mjs +3 -1
- package/locale/ruRU.js +4 -1
- package/locale/ruRU.mjs +3 -1
- package/locale/siLK.js +4 -1
- package/locale/siLK.mjs +3 -1
- package/locale/skSK.js +4 -1
- package/locale/skSK.mjs +3 -1
- package/locale/srRS.js +5 -1
- package/locale/srRS.mjs +4 -1
- package/locale/svSE.js +4 -1
- package/locale/svSE.mjs +3 -1
- package/locale/thTH.js +4 -1
- package/locale/thTH.mjs +3 -1
- package/locale/tlTL.js +5 -1
- package/locale/tlTL.mjs +4 -1
- package/locale/trTR.js +4 -1
- package/locale/trTR.mjs +3 -1
- package/locale/ukUA.js +4 -1
- package/locale/ukUA.mjs +3 -1
- package/locale/urPK.js +4 -1
- package/locale/urPK.mjs +3 -1
- package/locale/utils/buildFormatNumber.d.mts +2 -0
- package/locale/utils/buildFormatNumber.d.ts +2 -0
- package/locale/utils/buildFormatNumber.js +23 -0
- package/locale/utils/buildFormatNumber.mjs +17 -0
- package/locale/viVN.js +4 -1
- package/locale/viVN.mjs +3 -1
- package/locale/zhCN.js +4 -1
- package/locale/zhCN.mjs +3 -1
- package/locale/zhHK.js +4 -1
- package/locale/zhHK.mjs +3 -1
- package/locale/zhTW.js +4 -1
- package/locale/zhTW.mjs +3 -1
- package/package.json +236 -236
- package/styles/components.d.mts +0 -5
- package/styles/components.d.ts +0 -5
- package/styles/overrides.d.mts +0 -2
- package/styles/overrides.d.ts +0 -2
- package/styles/props.d.mts +0 -2
- package/styles/props.d.ts +0 -2
- package/themeCssVarsAugmentation/index.js +5 -0
- package/themeCssVarsAugmentation/index.mjs +5 -0
- package/useAutocomplete/useAutocomplete.d.mts +0 -12
- package/useAutocomplete/useAutocomplete.d.ts +0 -12
- package/useAutocomplete/useAutocomplete.js +53 -28
- package/useAutocomplete/useAutocomplete.mjs +53 -28
- package/utils/index.d.mts +2 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +14 -0
- package/utils/index.mjs +2 -0
- package/utils/useRovingTabIndex.d.mts +2 -0
- package/utils/useRovingTabIndex.d.ts +2 -0
- package/utils/useRovingTabIndex.js +9 -0
- package/utils/useRovingTabIndex.mjs +2 -0
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
- package/GridLegacy/GridLegacy.d.mts +0 -160
- package/GridLegacy/GridLegacy.d.ts +0 -160
- package/GridLegacy/GridLegacy.js +0 -601
- package/GridLegacy/GridLegacy.mjs +0 -588
- package/GridLegacy/GridLegacyContext.js +0 -17
- package/GridLegacy/GridLegacyContext.mjs +0 -12
- package/GridLegacy/gridLegacyClasses.d.mts +0 -48
- package/GridLegacy/gridLegacyClasses.d.ts +0 -48
- package/GridLegacy/gridLegacyClasses.js +0 -27
- package/GridLegacy/gridLegacyClasses.mjs +0 -19
- package/GridLegacy/index.d.mts +0 -4
- package/GridLegacy/index.d.ts +0 -4
- package/GridLegacy/index.js +0 -35
- package/GridLegacy/index.mjs +0 -3
package/Stepper/Stepper.mjs
CHANGED
|
@@ -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
|
|
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('
|
|
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 = '
|
|
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 ===
|
|
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
|
-
|
|
101
|
-
|
|
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;
|
package/Stepper/index.d.mts
CHANGED
|
@@ -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";
|
package/Stepper/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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'
|