@mui/material 9.0.0-alpha.4 → 9.0.0-beta.1
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 +1 -1
- package/Accordion/Accordion.d.ts +1 -1
- package/AccordionSummary/AccordionSummary.js +1 -0
- package/AccordionSummary/AccordionSummary.mjs +1 -0
- package/Backdrop/Backdrop.d.mts +1 -1
- package/Backdrop/Backdrop.d.ts +1 -1
- package/BottomNavigationAction/BottomNavigationAction.js +1 -0
- package/BottomNavigationAction/BottomNavigationAction.mjs +1 -0
- package/Breadcrumbs/BreadcrumbCollapsed.js +5 -1
- package/Breadcrumbs/BreadcrumbCollapsed.mjs +5 -1
- package/Button/Button.js +1 -0
- package/Button/Button.mjs +1 -0
- package/ButtonBase/ButtonBase.d.mts +5 -0
- package/ButtonBase/ButtonBase.d.ts +5 -0
- package/ButtonBase/ButtonBase.js +84 -85
- package/ButtonBase/ButtonBase.mjs +84 -85
- package/ButtonBase/useButtonBase.d.mts +91 -0
- package/ButtonBase/useButtonBase.d.ts +91 -0
- package/ButtonBase/useButtonBase.js +174 -0
- package/ButtonBase/useButtonBase.mjs +167 -0
- package/ButtonGroup/ButtonGroup.js +1 -9
- package/ButtonGroup/ButtonGroup.mjs +1 -9
- package/ButtonGroup/buttonGroupClasses.d.mts +0 -68
- package/ButtonGroup/buttonGroupClasses.d.ts +0 -68
- package/ButtonGroup/buttonGroupClasses.js +1 -1
- package/ButtonGroup/buttonGroupClasses.mjs +1 -1
- package/CHANGELOG.md +119 -4
- package/CardActionArea/CardActionArea.js +1 -0
- package/CardActionArea/CardActionArea.mjs +1 -0
- package/CardHeader/CardHeader.d.mts +13 -21
- package/CardHeader/CardHeader.d.ts +13 -21
- package/CardHeader/CardHeader.js +3 -21
- package/CardHeader/CardHeader.mjs +3 -21
- package/Checkbox/Checkbox.js +1 -7
- package/Checkbox/Checkbox.mjs +1 -7
- package/Chip/Chip.d.mts +7 -0
- package/Chip/Chip.d.ts +7 -0
- package/Chip/Chip.js +66 -55
- package/Chip/Chip.mjs +66 -55
- package/Chip/chipClasses.d.mts +0 -104
- package/Chip/chipClasses.d.ts +0 -104
- package/Chip/chipClasses.js +1 -1
- package/Chip/chipClasses.mjs +1 -1
- package/Dialog/Dialog.d.mts +8 -22
- package/Dialog/Dialog.d.ts +8 -22
- package/Dialog/Dialog.js +43 -72
- package/Dialog/Dialog.mjs +43 -72
- package/Dialog/dialogClasses.d.mts +0 -8
- package/Dialog/dialogClasses.d.ts +0 -8
- package/Dialog/dialogClasses.js +1 -1
- package/Dialog/dialogClasses.mjs +1 -1
- package/Divider/Divider.js +2 -10
- package/Divider/Divider.mjs +2 -10
- 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/Drawer/Drawer.d.mts +1 -13
- package/Drawer/Drawer.d.ts +1 -13
- package/Drawer/Drawer.js +6 -40
- package/Drawer/Drawer.mjs +6 -40
- package/Drawer/drawerClasses.d.mts +0 -32
- package/Drawer/drawerClasses.d.ts +0 -32
- package/Drawer/drawerClasses.js +1 -1
- package/Drawer/drawerClasses.mjs +1 -1
- package/Fab/Fab.js +1 -0
- package/Fab/Fab.mjs +1 -0
- package/FilledInput/FilledInput.js +4 -33
- package/FilledInput/FilledInput.mjs +4 -33
- package/Grid/Grid.d.mts +8 -3
- package/Grid/Grid.d.ts +8 -3
- package/Grid/Grid.js +8 -3
- package/Grid/Grid.mjs +8 -3
- package/Grid/gridClasses.js +1 -1
- package/Grid/gridClasses.mjs +1 -1
- package/IconButton/IconButton.js +1 -0
- package/IconButton/IconButton.mjs +1 -0
- package/ImageListItemBar/ImageListItemBar.js +4 -17
- package/ImageListItemBar/ImageListItemBar.mjs +4 -17
- package/ImageListItemBar/imageListItemBarClasses.d.mts +0 -16
- package/ImageListItemBar/imageListItemBarClasses.d.ts +0 -16
- package/ImageListItemBar/imageListItemBarClasses.js +1 -1
- package/ImageListItemBar/imageListItemBarClasses.mjs +1 -1
- package/Input/Input.js +4 -33
- package/Input/Input.mjs +4 -33
- package/Input/inputClasses.d.mts +0 -16
- package/Input/inputClasses.d.ts +0 -16
- package/InputAdornment/inputAdornmentClasses.d.mts +2 -2
- package/InputAdornment/inputAdornmentClasses.d.ts +2 -2
- package/InputBase/InputBase.d.mts +0 -27
- package/InputBase/InputBase.d.ts +0 -27
- package/InputBase/InputBase.js +6 -35
- package/InputBase/InputBase.mjs +6 -35
- package/InputBase/inputBaseClasses.d.mts +0 -20
- package/InputBase/inputBaseClasses.d.ts +0 -20
- package/InputBase/inputBaseClasses.js +1 -1
- package/InputBase/inputBaseClasses.mjs +1 -1
- package/InputLabel/InputLabel.js +1 -1
- package/InputLabel/InputLabel.mjs +1 -1
- package/LinearProgress/LinearProgress.js +6 -18
- package/LinearProgress/LinearProgress.mjs +6 -18
- package/LinearProgress/linearProgressClasses.d.mts +0 -36
- package/LinearProgress/linearProgressClasses.d.ts +0 -36
- package/LinearProgress/linearProgressClasses.js +1 -1
- package/LinearProgress/linearProgressClasses.mjs +1 -1
- package/Link/Link.d.mts +1 -1
- package/Link/Link.d.ts +1 -1
- package/ListItem/ListItem.d.mts +2 -36
- package/ListItem/ListItem.d.ts +2 -36
- package/ListItem/ListItem.js +27 -152
- package/ListItem/ListItem.mjs +27 -152
- package/ListItem/listItemClasses.d.mts +2 -4
- package/ListItem/listItemClasses.d.ts +2 -4
- package/ListItem/listItemClasses.js +1 -1
- package/ListItem/listItemClasses.mjs +1 -1
- package/ListItemButton/ListItemButton.d.mts +1 -2
- package/ListItemButton/ListItemButton.d.ts +1 -2
- package/ListItemButton/ListItemButton.js +2 -2
- package/ListItemButton/ListItemButton.mjs +2 -2
- package/ListItemIcon/ListItemIcon.js +1 -1
- package/ListItemIcon/ListItemIcon.mjs +1 -1
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.mts +10 -6
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +10 -6
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +7 -2
- package/ListItemSecondaryAction/ListItemSecondaryAction.mjs +7 -2
- package/ListItemText/ListItemText.d.mts +12 -20
- package/ListItemText/ListItemText.d.ts +12 -20
- package/ListItemText/ListItemText.js +2 -20
- package/ListItemText/ListItemText.mjs +2 -20
- package/ListSubheader/ListSubheader.js +0 -3
- package/ListSubheader/ListSubheader.mjs +0 -3
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +15 -32
- package/Menu/Menu.mjs +15 -32
- package/MenuItem/MenuItem.js +36 -26
- package/MenuItem/MenuItem.mjs +34 -26
- package/MenuList/MenuList.js +136 -101
- package/MenuList/MenuList.mjs +135 -100
- package/MenuList/MenuListContext.d.mts +11 -0
- package/MenuList/MenuListContext.d.ts +11 -0
- package/MenuList/MenuListContext.js +25 -0
- package/MenuList/MenuListContext.mjs +19 -0
- package/Modal/Modal.d.mts +1 -41
- package/Modal/Modal.d.ts +1 -41
- package/Modal/Modal.js +5 -58
- package/Modal/Modal.mjs +5 -58
- package/OutlinedInput/OutlinedInput.js +2 -14
- package/OutlinedInput/OutlinedInput.mjs +2 -14
- package/OutlinedInput/outlinedInputClasses.d.mts +0 -16
- package/OutlinedInput/outlinedInputClasses.d.ts +0 -16
- package/PaginationItem/PaginationItem.d.mts +5 -15
- package/PaginationItem/PaginationItem.d.ts +5 -15
- package/PaginationItem/PaginationItem.js +9 -24
- package/PaginationItem/PaginationItem.mjs +9 -24
- package/PaginationItem/paginationItemClasses.d.mts +0 -16
- package/PaginationItem/paginationItemClasses.d.ts +0 -16
- package/PaginationItem/paginationItemClasses.js +1 -1
- package/PaginationItem/paginationItemClasses.mjs +1 -1
- package/PigmentGrid/PigmentGrid.d.mts +1 -1
- package/PigmentGrid/PigmentGrid.d.ts +1 -1
- package/PigmentGrid/PigmentGrid.js +1 -1
- package/PigmentGrid/PigmentGrid.mjs +1 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/Popover/Popover.js +19 -7
- package/Popover/Popover.mjs +18 -6
- package/Radio/Radio.js +1 -13
- package/Radio/Radio.mjs +1 -13
- package/Rating/Rating.d.mts +0 -9
- package/Rating/Rating.d.ts +0 -9
- package/Rating/Rating.js +1 -17
- package/Rating/Rating.mjs +1 -17
- package/Select/SelectInput.js +2 -3
- package/Select/SelectInput.mjs +2 -3
- package/Select/selectClasses.d.mts +0 -12
- package/Select/selectClasses.d.ts +0 -12
- package/Select/selectClasses.js +1 -1
- package/Select/selectClasses.mjs +1 -1
- package/Slider/Slider.d.mts +0 -5
- package/Slider/Slider.d.ts +0 -5
- package/Slider/Slider.js +2 -8
- package/Slider/Slider.mjs +2 -8
- package/Slider/sliderClasses.d.mts +0 -28
- package/Slider/sliderClasses.d.ts +0 -28
- package/Slider/sliderClasses.js +1 -1
- package/Slider/sliderClasses.mjs +1 -1
- package/Snackbar/Snackbar.d.mts +1 -1
- package/Snackbar/Snackbar.d.ts +1 -1
- package/SpeedDial/SpeedDial.d.mts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/Stack/Stack.d.mts +2 -2
- package/Stack/Stack.d.ts +2 -2
- package/StepButton/StepButton.js +44 -14
- package/StepButton/StepButton.mjs +44 -14
- package/StepConnector/StepConnector.js +2 -8
- package/StepConnector/StepConnector.mjs +2 -8
- package/StepConnector/stepConnectorClasses.d.mts +0 -8
- package/StepConnector/stepConnectorClasses.d.ts +0 -8
- package/StepConnector/stepConnectorClasses.js +1 -1
- package/StepConnector/stepConnectorClasses.mjs +1 -1
- package/StepContent/StepContent.d.mts +2 -17
- package/StepContent/StepContent.d.ts +2 -17
- package/StepContent/StepContent.js +3 -22
- package/StepContent/StepContent.mjs +3 -22
- package/StepLabel/StepLabel.d.mts +0 -22
- package/StepLabel/StepLabel.d.ts +0 -22
- package/StepLabel/StepLabel.js +2 -31
- package/StepLabel/StepLabel.mjs +2 -31
- package/Stepper/Stepper.js +54 -22
- package/Stepper/Stepper.mjs +54 -22
- package/Stepper/StepperContext.d.mts +0 -5
- package/Stepper/StepperContext.d.ts +0 -5
- package/Stepper/StepperContext.js +1 -2
- package/Stepper/StepperContext.mjs +0 -1
- package/SvgIcon/createSvgIcon.d.mts +2 -0
- package/SvgIcon/createSvgIcon.d.ts +2 -0
- package/SvgIcon/createSvgIcon.js +31 -0
- package/SvgIcon/createSvgIcon.mjs +26 -0
- package/SvgIcon/index.d.mts +1 -0
- package/SvgIcon/index.d.ts +1 -0
- package/SvgIcon/index.js +8 -0
- package/SvgIcon/index.mjs +1 -0
- package/SwipeableDrawer/SwipeableDrawer.d.mts +0 -5
- package/SwipeableDrawer/SwipeableDrawer.d.ts +0 -5
- package/SwipeableDrawer/SwipeableDrawer.js +6 -37
- package/SwipeableDrawer/SwipeableDrawer.mjs +6 -37
- package/Switch/Switch.js +0 -11
- package/Switch/Switch.mjs +0 -11
- package/Tab/Tab.js +18 -4
- package/Tab/Tab.mjs +18 -4
- package/Tab/tabClasses.d.mts +0 -4
- package/Tab/tabClasses.d.ts +0 -4
- package/Tab/tabClasses.js +1 -1
- package/Tab/tabClasses.mjs +1 -1
- package/TabScrollButton/TabScrollButton.d.mts +1 -1
- package/TabScrollButton/TabScrollButton.d.ts +1 -1
- package/TabScrollButton/TabScrollButton.js +6 -2
- package/TabScrollButton/TabScrollButton.mjs +6 -2
- package/TablePagination/TablePagination.d.mts +0 -24
- package/TablePagination/TablePagination.d.ts +0 -24
- package/TablePagination/TablePagination.js +1 -29
- package/TablePagination/TablePagination.mjs +1 -29
- package/TablePaginationActions/TablePaginationActions.d.mts +0 -10
- package/TablePaginationActions/TablePaginationActions.d.ts +0 -10
- package/TablePaginationActions/TablePaginationActions.js +2 -14
- package/TablePaginationActions/TablePaginationActions.mjs +2 -14
- package/TableSortLabel/TableSortLabel.js +6 -8
- package/TableSortLabel/TableSortLabel.mjs +6 -8
- package/TableSortLabel/tableSortLabelClasses.d.mts +0 -8
- package/TableSortLabel/tableSortLabelClasses.d.ts +0 -8
- package/TableSortLabel/tableSortLabelClasses.js +1 -1
- package/TableSortLabel/tableSortLabelClasses.mjs +1 -1
- package/Tabs/Tabs.js +33 -24
- package/Tabs/Tabs.mjs +32 -23
- package/Tabs/tabsClasses.d.mts +0 -6
- package/Tabs/tabsClasses.d.ts +0 -6
- package/Tabs/tabsClasses.js +1 -1
- package/Tabs/tabsClasses.mjs +1 -1
- package/ToggleButton/ToggleButton.js +1 -0
- package/ToggleButton/ToggleButton.mjs +1 -0
- package/ToggleButtonGroup/ToggleButtonGroup.js +1 -4
- package/ToggleButtonGroup/ToggleButtonGroup.mjs +1 -4
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.mts +0 -8
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +0 -8
- package/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.mjs +1 -1
- package/Tooltip/Tooltip.d.mts +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Typography/Typography.d.mts +3 -3
- package/Typography/Typography.d.ts +3 -3
- package/Typography/Typography.js +2 -24
- package/Typography/Typography.mjs +3 -25
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/SwitchBase.d.mts +2 -12
- package/internal/SwitchBase.d.ts +2 -12
- package/internal/SwitchBase.js +6 -17
- package/internal/SwitchBase.mjs +6 -17
- package/locale/psAF.js +1 -1
- package/locale/psAF.mjs +1 -1
- package/package.json +7 -7
- package/styles/createThemeWithVars.js +10 -9
- package/styles/createThemeWithVars.mjs +10 -9
- package/styles/stringifyTheme.js +1 -1
- package/styles/stringifyTheme.mjs +1 -1
- package/useAutocomplete/useAutocomplete.js +8 -0
- package/useAutocomplete/useAutocomplete.mjs +8 -0
- package/utils/createSvgIcon.d.mts +4 -2
- package/utils/createSvgIcon.d.ts +4 -2
- package/utils/createSvgIcon.js +6 -24
- package/utils/createSvgIcon.mjs +2 -24
- package/utils/focusWithVisible.js +24 -0
- package/utils/focusWithVisible.mjs +19 -0
- package/utils/index.d.mts +0 -1
- package/utils/index.d.ts +0 -1
- package/utils/index.js +0 -7
- package/utils/index.mjs +0 -1
- package/utils/useFocusableWhenDisabled.d.mts +30 -0
- package/utils/useFocusableWhenDisabled.d.ts +30 -0
- package/utils/useFocusableWhenDisabled.js +47 -0
- package/utils/useFocusableWhenDisabled.mjs +41 -0
- package/utils/useRovingTabIndex.d.mts +1 -2
- package/utils/useRovingTabIndex.d.ts +1 -2
- package/utils/useRovingTabIndex.js +25 -4
- package/utils/useRovingTabIndex.mjs +1 -2
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
|
@@ -48,18 +48,6 @@ export interface StepLabelProps extends StandardProps<React.HTMLAttributes<HTMLD
|
|
|
48
48
|
* Override or extend the styles applied to the component.
|
|
49
49
|
*/
|
|
50
50
|
classes?: Partial<StepLabelClasses> | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* The props used for each slot inside.
|
|
53
|
-
* @default {}
|
|
54
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
55
|
-
*/
|
|
56
|
-
componentsProps?: {
|
|
57
|
-
/**
|
|
58
|
-
* Props applied to the label element.
|
|
59
|
-
* @default {}
|
|
60
|
-
*/
|
|
61
|
-
label?: React.HTMLProps<HTMLSpanElement> | undefined;
|
|
62
|
-
} | undefined;
|
|
63
51
|
/**
|
|
64
52
|
* If `true`, the step is marked as failed.
|
|
65
53
|
* @default false
|
|
@@ -73,16 +61,6 @@ export interface StepLabelProps extends StandardProps<React.HTMLAttributes<HTMLD
|
|
|
73
61
|
* The optional node to display.
|
|
74
62
|
*/
|
|
75
63
|
optional?: React.ReactNode;
|
|
76
|
-
/**
|
|
77
|
-
* The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
|
|
78
|
-
* @deprecated Use `slots.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
79
|
-
*/
|
|
80
|
-
StepIconComponent?: React.ElementType<StepIconProps> | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Props applied to the [`StepIcon`](https://mui.com/material-ui/api/step-icon/) element.
|
|
83
|
-
* @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
84
|
-
*/
|
|
85
|
-
StepIconProps?: Partial<StepIconProps> | undefined;
|
|
86
64
|
/**
|
|
87
65
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
88
66
|
*/
|
package/StepLabel/StepLabel.d.ts
CHANGED
|
@@ -48,18 +48,6 @@ export interface StepLabelProps extends StandardProps<React.HTMLAttributes<HTMLD
|
|
|
48
48
|
* Override or extend the styles applied to the component.
|
|
49
49
|
*/
|
|
50
50
|
classes?: Partial<StepLabelClasses> | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* The props used for each slot inside.
|
|
53
|
-
* @default {}
|
|
54
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
55
|
-
*/
|
|
56
|
-
componentsProps?: {
|
|
57
|
-
/**
|
|
58
|
-
* Props applied to the label element.
|
|
59
|
-
* @default {}
|
|
60
|
-
*/
|
|
61
|
-
label?: React.HTMLProps<HTMLSpanElement> | undefined;
|
|
62
|
-
} | undefined;
|
|
63
51
|
/**
|
|
64
52
|
* If `true`, the step is marked as failed.
|
|
65
53
|
* @default false
|
|
@@ -73,16 +61,6 @@ export interface StepLabelProps extends StandardProps<React.HTMLAttributes<HTMLD
|
|
|
73
61
|
* The optional node to display.
|
|
74
62
|
*/
|
|
75
63
|
optional?: React.ReactNode;
|
|
76
|
-
/**
|
|
77
|
-
* The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
|
|
78
|
-
* @deprecated Use `slots.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
79
|
-
*/
|
|
80
|
-
StepIconComponent?: React.ElementType<StepIconProps> | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Props applied to the [`StepIcon`](https://mui.com/material-ui/api/step-icon/) element.
|
|
83
|
-
* @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
84
|
-
*/
|
|
85
|
-
StepIconProps?: Partial<StepIconProps> | undefined;
|
|
86
64
|
/**
|
|
87
65
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
88
66
|
*/
|
package/StepLabel/StepLabel.js
CHANGED
|
@@ -119,14 +119,11 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
119
119
|
const {
|
|
120
120
|
children,
|
|
121
121
|
className,
|
|
122
|
-
componentsProps = {},
|
|
123
122
|
error = false,
|
|
124
123
|
icon: iconProp,
|
|
125
124
|
optional,
|
|
126
125
|
slots = {},
|
|
127
126
|
slotProps = {},
|
|
128
|
-
StepIconComponent: StepIconComponentProp,
|
|
129
|
-
StepIconProps,
|
|
130
127
|
...other
|
|
131
128
|
} = props;
|
|
132
129
|
const {
|
|
@@ -140,10 +137,6 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
140
137
|
icon: iconContext
|
|
141
138
|
} = React.useContext(_StepContext.default);
|
|
142
139
|
const icon = iconProp || iconContext;
|
|
143
|
-
let StepIconComponent = StepIconComponentProp;
|
|
144
|
-
if (icon && !StepIconComponent) {
|
|
145
|
-
StepIconComponent = _StepIcon.default;
|
|
146
|
-
}
|
|
147
140
|
const ownerState = {
|
|
148
141
|
...props,
|
|
149
142
|
active,
|
|
@@ -156,11 +149,7 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
156
149
|
const classes = useUtilityClasses(ownerState);
|
|
157
150
|
const externalForwardedProps = {
|
|
158
151
|
slots,
|
|
159
|
-
slotProps
|
|
160
|
-
stepIcon: StepIconProps,
|
|
161
|
-
...componentsProps,
|
|
162
|
-
...slotProps
|
|
163
|
-
}
|
|
152
|
+
slotProps
|
|
164
153
|
};
|
|
165
154
|
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
|
166
155
|
elementType: StepLabelRoot,
|
|
@@ -178,7 +167,7 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
178
167
|
ownerState
|
|
179
168
|
});
|
|
180
169
|
const [StepIconSlot, stepIconProps] = (0, _useSlot.default)('stepIcon', {
|
|
181
|
-
elementType:
|
|
170
|
+
elementType: icon ? _StepIcon.default : undefined,
|
|
182
171
|
externalForwardedProps,
|
|
183
172
|
ownerState
|
|
184
173
|
});
|
|
@@ -222,14 +211,6 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
222
211
|
* @ignore
|
|
223
212
|
*/
|
|
224
213
|
className: _propTypes.default.string,
|
|
225
|
-
/**
|
|
226
|
-
* The props used for each slot inside.
|
|
227
|
-
* @default {}
|
|
228
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
229
|
-
*/
|
|
230
|
-
componentsProps: _propTypes.default.shape({
|
|
231
|
-
label: _propTypes.default.object
|
|
232
|
-
}),
|
|
233
214
|
/**
|
|
234
215
|
* If `true`, the step is marked as failed.
|
|
235
216
|
* @default false
|
|
@@ -261,16 +242,6 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
261
242
|
root: _propTypes.default.elementType,
|
|
262
243
|
stepIcon: _propTypes.default.elementType
|
|
263
244
|
}),
|
|
264
|
-
/**
|
|
265
|
-
* The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
|
|
266
|
-
* @deprecated Use `slots.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
267
|
-
*/
|
|
268
|
-
StepIconComponent: _propTypes.default.elementType,
|
|
269
|
-
/**
|
|
270
|
-
* Props applied to the [`StepIcon`](https://mui.com/material-ui/api/step-icon/) element.
|
|
271
|
-
* @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
272
|
-
*/
|
|
273
|
-
StepIconProps: _propTypes.default.object,
|
|
274
245
|
/**
|
|
275
246
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
276
247
|
*/
|
package/StepLabel/StepLabel.mjs
CHANGED
|
@@ -112,14 +112,11 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
112
112
|
const {
|
|
113
113
|
children,
|
|
114
114
|
className,
|
|
115
|
-
componentsProps = {},
|
|
116
115
|
error = false,
|
|
117
116
|
icon: iconProp,
|
|
118
117
|
optional,
|
|
119
118
|
slots = {},
|
|
120
119
|
slotProps = {},
|
|
121
|
-
StepIconComponent: StepIconComponentProp,
|
|
122
|
-
StepIconProps,
|
|
123
120
|
...other
|
|
124
121
|
} = props;
|
|
125
122
|
const {
|
|
@@ -133,10 +130,6 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
133
130
|
icon: iconContext
|
|
134
131
|
} = React.useContext(StepContext);
|
|
135
132
|
const icon = iconProp || iconContext;
|
|
136
|
-
let StepIconComponent = StepIconComponentProp;
|
|
137
|
-
if (icon && !StepIconComponent) {
|
|
138
|
-
StepIconComponent = StepIcon;
|
|
139
|
-
}
|
|
140
133
|
const ownerState = {
|
|
141
134
|
...props,
|
|
142
135
|
active,
|
|
@@ -149,11 +142,7 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
149
142
|
const classes = useUtilityClasses(ownerState);
|
|
150
143
|
const externalForwardedProps = {
|
|
151
144
|
slots,
|
|
152
|
-
slotProps
|
|
153
|
-
stepIcon: StepIconProps,
|
|
154
|
-
...componentsProps,
|
|
155
|
-
...slotProps
|
|
156
|
-
}
|
|
145
|
+
slotProps
|
|
157
146
|
};
|
|
158
147
|
const [RootSlot, rootProps] = useSlot('root', {
|
|
159
148
|
elementType: StepLabelRoot,
|
|
@@ -171,7 +160,7 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
171
160
|
ownerState
|
|
172
161
|
});
|
|
173
162
|
const [StepIconSlot, stepIconProps] = useSlot('stepIcon', {
|
|
174
|
-
elementType:
|
|
163
|
+
elementType: icon ? StepIcon : undefined,
|
|
175
164
|
externalForwardedProps,
|
|
176
165
|
ownerState
|
|
177
166
|
});
|
|
@@ -215,14 +204,6 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
215
204
|
* @ignore
|
|
216
205
|
*/
|
|
217
206
|
className: PropTypes.string,
|
|
218
|
-
/**
|
|
219
|
-
* The props used for each slot inside.
|
|
220
|
-
* @default {}
|
|
221
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
222
|
-
*/
|
|
223
|
-
componentsProps: PropTypes.shape({
|
|
224
|
-
label: PropTypes.object
|
|
225
|
-
}),
|
|
226
207
|
/**
|
|
227
208
|
* If `true`, the step is marked as failed.
|
|
228
209
|
* @default false
|
|
@@ -254,16 +235,6 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
254
235
|
root: PropTypes.elementType,
|
|
255
236
|
stepIcon: PropTypes.elementType
|
|
256
237
|
}),
|
|
257
|
-
/**
|
|
258
|
-
* The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
|
|
259
|
-
* @deprecated Use `slots.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
260
|
-
*/
|
|
261
|
-
StepIconComponent: PropTypes.elementType,
|
|
262
|
-
/**
|
|
263
|
-
* Props applied to the [`StepIcon`](https://mui.com/material-ui/api/step-icon/) element.
|
|
264
|
-
* @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
265
|
-
*/
|
|
266
|
-
StepIconProps: PropTypes.object,
|
|
267
238
|
/**
|
|
268
239
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
269
240
|
*/
|
package/Stepper/Stepper.js
CHANGED
|
@@ -13,12 +13,12 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
13
13
|
var _integerPropType = _interopRequireDefault(require("@mui/utils/integerPropType"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
15
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
16
|
-
var _useRovingTabIndex = _interopRequireDefault(require("../utils/useRovingTabIndex"));
|
|
17
16
|
var _zeroStyled = require("../zero-styled");
|
|
18
17
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
18
|
+
var _useRovingTabIndex = require("../utils/useRovingTabIndex");
|
|
19
19
|
var _stepperClasses = require("./stepperClasses");
|
|
20
20
|
var _StepConnector = _interopRequireDefault(require("../StepConnector"));
|
|
21
|
-
var _StepperContext = require("./StepperContext");
|
|
21
|
+
var _StepperContext = _interopRequireDefault(require("./StepperContext"));
|
|
22
22
|
var _StepButton = _interopRequireDefault(require("../StepButton"));
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
24
|
const useUtilityClasses = ownerState => {
|
|
@@ -72,6 +72,37 @@ const StepperRoot = (0, _zeroStyled.styled)('ol', {
|
|
|
72
72
|
}]
|
|
73
73
|
});
|
|
74
74
|
const defaultConnector = /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepConnector.default, {});
|
|
75
|
+
function RovingStepper(props) {
|
|
76
|
+
// eslint-disable-next-line react/prop-types
|
|
77
|
+
const {
|
|
78
|
+
children,
|
|
79
|
+
className,
|
|
80
|
+
component,
|
|
81
|
+
forwardedRef,
|
|
82
|
+
isRtl,
|
|
83
|
+
orientation,
|
|
84
|
+
ownerState,
|
|
85
|
+
...other
|
|
86
|
+
} = props;
|
|
87
|
+
const rovingContainer = (0, _useRovingTabIndex.useRovingTabIndexRoot)({
|
|
88
|
+
orientation,
|
|
89
|
+
isRtl
|
|
90
|
+
});
|
|
91
|
+
const rovingContainerProps = rovingContainer.getContainerProps(forwardedRef);
|
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_useRovingTabIndex.RovingTabIndexContext.Provider, {
|
|
93
|
+
value: rovingContainer,
|
|
94
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepperRoot, {
|
|
95
|
+
as: component,
|
|
96
|
+
ownerState: ownerState,
|
|
97
|
+
className: className,
|
|
98
|
+
role: "tablist",
|
|
99
|
+
"aria-orientation": orientation,
|
|
100
|
+
...rovingContainerProps,
|
|
101
|
+
...other,
|
|
102
|
+
children: children
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
}
|
|
75
106
|
const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
|
|
76
107
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
77
108
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
@@ -119,14 +150,6 @@ const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
|
|
|
119
150
|
...step.props
|
|
120
151
|
});
|
|
121
152
|
});
|
|
122
|
-
const {
|
|
123
|
-
getContainerProps,
|
|
124
|
-
getItemProps
|
|
125
|
-
} = (0, _useRovingTabIndex.default)({
|
|
126
|
-
orientation,
|
|
127
|
-
isRtl
|
|
128
|
-
});
|
|
129
|
-
const rovingTabIndexContainerProps = getContainerProps(ref);
|
|
130
153
|
const contextValue = React.useMemo(() => ({
|
|
131
154
|
activeStep,
|
|
132
155
|
alternativeLabel,
|
|
@@ -134,21 +157,30 @@ const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
|
|
|
134
157
|
nonLinear,
|
|
135
158
|
orientation,
|
|
136
159
|
totalSteps,
|
|
137
|
-
getRovingTabIndexProps: getItemProps,
|
|
138
160
|
isTabList
|
|
139
|
-
}), [activeStep, alternativeLabel, connector, nonLinear, orientation, totalSteps,
|
|
140
|
-
|
|
161
|
+
}), [activeStep, alternativeLabel, connector, nonLinear, orientation, totalSteps, isTabList]);
|
|
162
|
+
if (!isTabList) {
|
|
163
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepperContext.default.Provider, {
|
|
164
|
+
value: contextValue,
|
|
165
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepperRoot, {
|
|
166
|
+
as: component,
|
|
167
|
+
ownerState: ownerState,
|
|
168
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
169
|
+
ref: ref,
|
|
170
|
+
...other,
|
|
171
|
+
children: steps
|
|
172
|
+
})
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepperContext.default.Provider, {
|
|
141
176
|
value: contextValue,
|
|
142
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
143
|
-
|
|
144
|
-
|
|
177
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(RovingStepper, {
|
|
178
|
+
forwardedRef: ref,
|
|
179
|
+
isRtl: isRtl,
|
|
145
180
|
className: (0, _clsx.default)(classes.root, className),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
'aria-orientation': orientation,
|
|
150
|
-
...rovingTabIndexContainerProps
|
|
151
|
-
}),
|
|
181
|
+
component: component,
|
|
182
|
+
orientation: orientation,
|
|
183
|
+
ownerState: ownerState,
|
|
152
184
|
...other,
|
|
153
185
|
children: steps
|
|
154
186
|
})
|
package/Stepper/Stepper.mjs
CHANGED
|
@@ -6,12 +6,12 @@ import clsx from 'clsx';
|
|
|
6
6
|
import integerPropType from '@mui/utils/integerPropType';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
9
|
-
import useRovingTabIndex from "../utils/useRovingTabIndex.mjs";
|
|
10
9
|
import { styled } from "../zero-styled/index.mjs";
|
|
11
10
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
11
|
+
import { RovingTabIndexContext, useRovingTabIndexRoot } from "../utils/useRovingTabIndex.mjs";
|
|
12
12
|
import { getStepperUtilityClass } from "./stepperClasses.mjs";
|
|
13
13
|
import StepConnector from "../StepConnector/index.mjs";
|
|
14
|
-
import
|
|
14
|
+
import StepperContext from "./StepperContext.mjs";
|
|
15
15
|
import StepButton from "../StepButton/index.mjs";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
const useUtilityClasses = ownerState => {
|
|
@@ -65,6 +65,37 @@ const StepperRoot = styled('ol', {
|
|
|
65
65
|
}]
|
|
66
66
|
});
|
|
67
67
|
const defaultConnector = /*#__PURE__*/_jsx(StepConnector, {});
|
|
68
|
+
function RovingStepper(props) {
|
|
69
|
+
// eslint-disable-next-line react/prop-types
|
|
70
|
+
const {
|
|
71
|
+
children,
|
|
72
|
+
className,
|
|
73
|
+
component,
|
|
74
|
+
forwardedRef,
|
|
75
|
+
isRtl,
|
|
76
|
+
orientation,
|
|
77
|
+
ownerState,
|
|
78
|
+
...other
|
|
79
|
+
} = props;
|
|
80
|
+
const rovingContainer = useRovingTabIndexRoot({
|
|
81
|
+
orientation,
|
|
82
|
+
isRtl
|
|
83
|
+
});
|
|
84
|
+
const rovingContainerProps = rovingContainer.getContainerProps(forwardedRef);
|
|
85
|
+
return /*#__PURE__*/_jsx(RovingTabIndexContext.Provider, {
|
|
86
|
+
value: rovingContainer,
|
|
87
|
+
children: /*#__PURE__*/_jsx(StepperRoot, {
|
|
88
|
+
as: component,
|
|
89
|
+
ownerState: ownerState,
|
|
90
|
+
className: className,
|
|
91
|
+
role: "tablist",
|
|
92
|
+
"aria-orientation": orientation,
|
|
93
|
+
...rovingContainerProps,
|
|
94
|
+
...other,
|
|
95
|
+
children: children
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
68
99
|
const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
|
|
69
100
|
const isRtl = useRtl();
|
|
70
101
|
const props = useDefaultProps({
|
|
@@ -112,14 +143,6 @@ const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
|
|
|
112
143
|
...step.props
|
|
113
144
|
});
|
|
114
145
|
});
|
|
115
|
-
const {
|
|
116
|
-
getContainerProps,
|
|
117
|
-
getItemProps
|
|
118
|
-
} = useRovingTabIndex({
|
|
119
|
-
orientation,
|
|
120
|
-
isRtl
|
|
121
|
-
});
|
|
122
|
-
const rovingTabIndexContainerProps = getContainerProps(ref);
|
|
123
146
|
const contextValue = React.useMemo(() => ({
|
|
124
147
|
activeStep,
|
|
125
148
|
alternativeLabel,
|
|
@@ -127,21 +150,30 @@ const Stepper = /*#__PURE__*/React.forwardRef(function Stepper(inProps, ref) {
|
|
|
127
150
|
nonLinear,
|
|
128
151
|
orientation,
|
|
129
152
|
totalSteps,
|
|
130
|
-
getRovingTabIndexProps: getItemProps,
|
|
131
153
|
isTabList
|
|
132
|
-
}), [activeStep, alternativeLabel, connector, nonLinear, orientation, totalSteps,
|
|
133
|
-
|
|
154
|
+
}), [activeStep, alternativeLabel, connector, nonLinear, orientation, totalSteps, isTabList]);
|
|
155
|
+
if (!isTabList) {
|
|
156
|
+
return /*#__PURE__*/_jsx(StepperContext.Provider, {
|
|
157
|
+
value: contextValue,
|
|
158
|
+
children: /*#__PURE__*/_jsx(StepperRoot, {
|
|
159
|
+
as: component,
|
|
160
|
+
ownerState: ownerState,
|
|
161
|
+
className: clsx(classes.root, className),
|
|
162
|
+
ref: ref,
|
|
163
|
+
...other,
|
|
164
|
+
children: steps
|
|
165
|
+
})
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return /*#__PURE__*/_jsx(StepperContext.Provider, {
|
|
134
169
|
value: contextValue,
|
|
135
|
-
children: /*#__PURE__*/_jsx(
|
|
136
|
-
|
|
137
|
-
|
|
170
|
+
children: /*#__PURE__*/_jsx(RovingStepper, {
|
|
171
|
+
forwardedRef: ref,
|
|
172
|
+
isRtl: isRtl,
|
|
138
173
|
className: clsx(classes.root, className),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
'aria-orientation': orientation,
|
|
143
|
-
...rovingTabIndexContainerProps
|
|
144
|
-
}),
|
|
174
|
+
component: component,
|
|
175
|
+
orientation: orientation,
|
|
176
|
+
ownerState: ownerState,
|
|
145
177
|
...other,
|
|
146
178
|
children: steps
|
|
147
179
|
})
|
|
@@ -6,10 +6,6 @@ export interface StepperContextType {
|
|
|
6
6
|
nonLinear: boolean;
|
|
7
7
|
orientation: 'horizontal' | 'vertical';
|
|
8
8
|
totalSteps: number;
|
|
9
|
-
getRovingTabIndexProps: (index: number, ref?: React.Ref<HTMLElement>) => {
|
|
10
|
-
ref: (element: HTMLElement | null) => void;
|
|
11
|
-
tabIndex: number;
|
|
12
|
-
};
|
|
13
9
|
isTabList: boolean;
|
|
14
10
|
}
|
|
15
11
|
/**
|
|
@@ -21,5 +17,4 @@ declare const StepperContext: React.Context<{} | StepperContextType>;
|
|
|
21
17
|
* has been defined in the component tree.
|
|
22
18
|
*/
|
|
23
19
|
export declare function useStepperContext(): StepperContextType | {};
|
|
24
|
-
export declare const StepperContextProvider: React.Provider<{} | StepperContextType>;
|
|
25
20
|
export default StepperContext;
|
|
@@ -6,10 +6,6 @@ export interface StepperContextType {
|
|
|
6
6
|
nonLinear: boolean;
|
|
7
7
|
orientation: 'horizontal' | 'vertical';
|
|
8
8
|
totalSteps: number;
|
|
9
|
-
getRovingTabIndexProps: (index: number, ref?: React.Ref<HTMLElement>) => {
|
|
10
|
-
ref: (element: HTMLElement | null) => void;
|
|
11
|
-
tabIndex: number;
|
|
12
|
-
};
|
|
13
9
|
isTabList: boolean;
|
|
14
10
|
}
|
|
15
11
|
/**
|
|
@@ -21,5 +17,4 @@ declare const StepperContext: React.Context<{} | StepperContextType>;
|
|
|
21
17
|
* has been defined in the component tree.
|
|
22
18
|
*/
|
|
23
19
|
export declare function useStepperContext(): StepperContextType | {};
|
|
24
|
-
export declare const StepperContextProvider: React.Provider<{} | StepperContextType>;
|
|
25
20
|
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 =
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
exports.useStepperContext = useStepperContext;
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
/**
|
|
@@ -23,5 +23,4 @@ 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;
|
|
27
26
|
var _default = exports.default = StepperContext;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.default = createSvgIcon;
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _SvgIcon = _interopRequireDefault(require("./SvgIcon"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
/**
|
|
14
|
+
* Private module reserved for @mui packages.
|
|
15
|
+
*/function createSvgIcon(path, displayName) {
|
|
16
|
+
function Component(props, ref) {
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, {
|
|
18
|
+
"data-testid": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,
|
|
19
|
+
ref: ref,
|
|
20
|
+
...props,
|
|
21
|
+
children: path
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
25
|
+
// Need to set `displayName` on the inner component for React.memo.
|
|
26
|
+
// React prior to 16.14 ignores `displayName` on the wrapper.
|
|
27
|
+
Component.displayName = `${displayName}Icon`;
|
|
28
|
+
}
|
|
29
|
+
Component.muiName = _SvgIcon.default.muiName;
|
|
30
|
+
return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));
|
|
31
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import SvgIcon from "./SvgIcon.mjs";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Private module reserved for @mui packages.
|
|
8
|
+
*/
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export default function createSvgIcon(path, displayName) {
|
|
11
|
+
function Component(props, ref) {
|
|
12
|
+
return /*#__PURE__*/_jsx(SvgIcon, {
|
|
13
|
+
"data-testid": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,
|
|
14
|
+
ref: ref,
|
|
15
|
+
...props,
|
|
16
|
+
children: path
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
20
|
+
// Need to set `displayName` on the inner component for React.memo.
|
|
21
|
+
// React prior to 16.14 ignores `displayName` on the wrapper.
|
|
22
|
+
Component.displayName = `${displayName}Icon`;
|
|
23
|
+
}
|
|
24
|
+
Component.muiName = SvgIcon.muiName;
|
|
25
|
+
return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));
|
|
26
|
+
}
|
package/SvgIcon/index.d.mts
CHANGED
package/SvgIcon/index.d.ts
CHANGED
package/SvgIcon/index.js
CHANGED
|
@@ -6,8 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
var _exportNames = {
|
|
9
|
+
createSvgIcon: true,
|
|
9
10
|
svgIconClasses: true
|
|
10
11
|
};
|
|
12
|
+
Object.defineProperty(exports, "createSvgIcon", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _createSvgIcon.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
11
18
|
Object.defineProperty(exports, "default", {
|
|
12
19
|
enumerable: true,
|
|
13
20
|
get: function () {
|
|
@@ -21,6 +28,7 @@ Object.defineProperty(exports, "svgIconClasses", {
|
|
|
21
28
|
}
|
|
22
29
|
});
|
|
23
30
|
var _SvgIcon = _interopRequireDefault(require("./SvgIcon"));
|
|
31
|
+
var _createSvgIcon = _interopRequireDefault(require("./createSvgIcon"));
|
|
24
32
|
var _svgIconClasses = _interopRequireWildcard(require("./svgIconClasses"));
|
|
25
33
|
Object.keys(_svgIconClasses).forEach(function (key) {
|
|
26
34
|
if (key === "default" || key === "__esModule") return;
|
package/SvgIcon/index.mjs
CHANGED
|
@@ -78,11 +78,6 @@ export interface SwipeableDrawerProps extends Omit<DrawerProps, 'onClose' | 'ope
|
|
|
78
78
|
* @default false
|
|
79
79
|
*/
|
|
80
80
|
open?: boolean | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* The element is used to intercept the touch events on the edge.
|
|
83
|
-
* @deprecated use the `slotProps.swipeArea` 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.
|
|
84
|
-
*/
|
|
85
|
-
SwipeAreaProps?: object | undefined;
|
|
86
81
|
/**
|
|
87
82
|
* The width of the left most (or right most) area in `px` that
|
|
88
83
|
* the drawer can be swiped open from.
|
|
@@ -78,11 +78,6 @@ export interface SwipeableDrawerProps extends Omit<DrawerProps, 'onClose' | 'ope
|
|
|
78
78
|
* @default false
|
|
79
79
|
*/
|
|
80
80
|
open?: boolean | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* The element is used to intercept the touch events on the edge.
|
|
83
|
-
* @deprecated use the `slotProps.swipeArea` 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.
|
|
84
|
-
*/
|
|
85
|
-
SwipeAreaProps?: object | undefined;
|
|
86
81
|
/**
|
|
87
82
|
* The width of the left most (or right most) area in `px` that
|
|
88
83
|
* the drawer can be swiped open from.
|