@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
|
@@ -11,10 +11,8 @@ exports.reset = reset;
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var _elementTypeAcceptingRef = _interopRequireDefault(require("@mui/utils/elementTypeAcceptingRef"));
|
|
15
14
|
var _NoSsr = _interopRequireDefault(require("../NoSsr"));
|
|
16
15
|
var _Drawer = _interopRequireWildcard(require("../Drawer/Drawer"));
|
|
17
|
-
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
18
16
|
var _ownerDocument = _interopRequireDefault(require("../utils/ownerDocument"));
|
|
19
17
|
var _ownerWindow = _interopRequireDefault(require("../utils/ownerWindow"));
|
|
20
18
|
var _useEventCallback = _interopRequireDefault(require("../utils/useEventCallback"));
|
|
@@ -141,15 +139,10 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
141
139
|
hysteresis = 0.52,
|
|
142
140
|
allowSwipeInChildren = false,
|
|
143
141
|
minFlingVelocity = 450,
|
|
144
|
-
ModalProps: {
|
|
145
|
-
BackdropProps,
|
|
146
|
-
...ModalPropsProp
|
|
147
|
-
} = {},
|
|
142
|
+
ModalProps: ModalPropsProp = {},
|
|
148
143
|
onClose,
|
|
149
144
|
onOpen,
|
|
150
145
|
open = false,
|
|
151
|
-
PaperProps = {},
|
|
152
|
-
SwipeAreaProps,
|
|
153
146
|
swipeAreaWidth = 20,
|
|
154
147
|
transitionDuration = transitionDurationDefault,
|
|
155
148
|
variant = 'temporary',
|
|
@@ -165,7 +158,6 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
165
158
|
const swipeAreaRef = React.useRef();
|
|
166
159
|
const backdropRef = React.useRef();
|
|
167
160
|
const paperRef = React.useRef();
|
|
168
|
-
const handleRef = (0, _useForkRef.default)(PaperProps.ref, paperRef);
|
|
169
161
|
const touchDetected = React.useRef(false);
|
|
170
162
|
|
|
171
163
|
// Ref for transition duration based on / to match swipe speed
|
|
@@ -467,10 +459,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
467
459
|
ownerState: props,
|
|
468
460
|
externalForwardedProps: {
|
|
469
461
|
slots,
|
|
470
|
-
slotProps
|
|
471
|
-
swipeArea: SwipeAreaProps,
|
|
472
|
-
...slotProps
|
|
473
|
-
}
|
|
462
|
+
slotProps
|
|
474
463
|
},
|
|
475
464
|
additionalProps: {
|
|
476
465
|
width: swipeAreaWidth,
|
|
@@ -482,10 +471,6 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
482
471
|
open: variant === 'temporary' && maybeSwiping ? true : open,
|
|
483
472
|
variant: variant,
|
|
484
473
|
ModalProps: {
|
|
485
|
-
BackdropProps: {
|
|
486
|
-
...BackdropProps,
|
|
487
|
-
ref: backdropRef
|
|
488
|
-
},
|
|
489
474
|
// Ensures that paperRef.current will be defined inside the touch start event handler
|
|
490
475
|
// See https://github.com/mui/material-ui/issues/30414 for more information
|
|
491
476
|
...(variant === 'temporary' && {
|
|
@@ -501,14 +486,14 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
501
486
|
slots: slots,
|
|
502
487
|
slotProps: {
|
|
503
488
|
...slotProps,
|
|
504
|
-
backdrop: (0, _utils2.mergeSlotProps)(slotProps.backdrop
|
|
489
|
+
backdrop: (0, _utils2.mergeSlotProps)(slotProps.backdrop, {
|
|
505
490
|
ref: backdropRef
|
|
506
491
|
}),
|
|
507
|
-
paper: (0, _utils2.mergeSlotProps)(slotProps.paper
|
|
492
|
+
paper: (0, _utils2.mergeSlotProps)(slotProps.paper, {
|
|
508
493
|
style: {
|
|
509
494
|
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''
|
|
510
495
|
},
|
|
511
|
-
ref:
|
|
496
|
+
ref: paperRef
|
|
512
497
|
})
|
|
513
498
|
},
|
|
514
499
|
...other
|
|
@@ -583,11 +568,7 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
583
568
|
/**
|
|
584
569
|
* @ignore
|
|
585
570
|
*/
|
|
586
|
-
ModalProps: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({
|
|
587
|
-
BackdropProps: _propTypes.default.shape({
|
|
588
|
-
component: _elementTypeAcceptingRef.default
|
|
589
|
-
})
|
|
590
|
-
}),
|
|
571
|
+
ModalProps: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({}),
|
|
591
572
|
/**
|
|
592
573
|
* Callback fired when the component requests to be closed.
|
|
593
574
|
*
|
|
@@ -605,13 +586,6 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
605
586
|
* @default false
|
|
606
587
|
*/
|
|
607
588
|
open: _propTypes.default.bool,
|
|
608
|
-
/**
|
|
609
|
-
* @ignore
|
|
610
|
-
*/
|
|
611
|
-
PaperProps: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({
|
|
612
|
-
component: _elementTypeAcceptingRef.default,
|
|
613
|
-
style: _propTypes.default.object
|
|
614
|
-
}),
|
|
615
589
|
/**
|
|
616
590
|
* The props used for each slot inside.
|
|
617
591
|
* @default {}
|
|
@@ -636,11 +610,6 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
636
610
|
swipeArea: _propTypes.default.elementType,
|
|
637
611
|
transition: _propTypes.default.elementType
|
|
638
612
|
}),
|
|
639
|
-
/**
|
|
640
|
-
* The element is used to intercept the touch events on the edge.
|
|
641
|
-
* @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.
|
|
642
|
-
*/
|
|
643
|
-
SwipeAreaProps: _propTypes.default.object,
|
|
644
613
|
/**
|
|
645
614
|
* The width of the left most (or right most) area in `px` that
|
|
646
615
|
* the drawer can be swiped open from.
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';
|
|
7
6
|
import NoSsr from "../NoSsr/index.mjs";
|
|
8
7
|
import Drawer, { getAnchor, isHorizontal } from "../Drawer/Drawer.mjs";
|
|
9
|
-
import useForkRef from "../utils/useForkRef.mjs";
|
|
10
8
|
import ownerDocument from "../utils/ownerDocument.mjs";
|
|
11
9
|
import ownerWindow from "../utils/ownerWindow.mjs";
|
|
12
10
|
import useEventCallback from "../utils/useEventCallback.mjs";
|
|
@@ -134,15 +132,10 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
134
132
|
hysteresis = 0.52,
|
|
135
133
|
allowSwipeInChildren = false,
|
|
136
134
|
minFlingVelocity = 450,
|
|
137
|
-
ModalProps: {
|
|
138
|
-
BackdropProps,
|
|
139
|
-
...ModalPropsProp
|
|
140
|
-
} = {},
|
|
135
|
+
ModalProps: ModalPropsProp = {},
|
|
141
136
|
onClose,
|
|
142
137
|
onOpen,
|
|
143
138
|
open = false,
|
|
144
|
-
PaperProps = {},
|
|
145
|
-
SwipeAreaProps,
|
|
146
139
|
swipeAreaWidth = 20,
|
|
147
140
|
transitionDuration = transitionDurationDefault,
|
|
148
141
|
variant = 'temporary',
|
|
@@ -158,7 +151,6 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
158
151
|
const swipeAreaRef = React.useRef();
|
|
159
152
|
const backdropRef = React.useRef();
|
|
160
153
|
const paperRef = React.useRef();
|
|
161
|
-
const handleRef = useForkRef(PaperProps.ref, paperRef);
|
|
162
154
|
const touchDetected = React.useRef(false);
|
|
163
155
|
|
|
164
156
|
// Ref for transition duration based on / to match swipe speed
|
|
@@ -460,10 +452,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
460
452
|
ownerState: props,
|
|
461
453
|
externalForwardedProps: {
|
|
462
454
|
slots,
|
|
463
|
-
slotProps
|
|
464
|
-
swipeArea: SwipeAreaProps,
|
|
465
|
-
...slotProps
|
|
466
|
-
}
|
|
455
|
+
slotProps
|
|
467
456
|
},
|
|
468
457
|
additionalProps: {
|
|
469
458
|
width: swipeAreaWidth,
|
|
@@ -475,10 +464,6 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
475
464
|
open: variant === 'temporary' && maybeSwiping ? true : open,
|
|
476
465
|
variant: variant,
|
|
477
466
|
ModalProps: {
|
|
478
|
-
BackdropProps: {
|
|
479
|
-
...BackdropProps,
|
|
480
|
-
ref: backdropRef
|
|
481
|
-
},
|
|
482
467
|
// Ensures that paperRef.current will be defined inside the touch start event handler
|
|
483
468
|
// See https://github.com/mui/material-ui/issues/30414 for more information
|
|
484
469
|
...(variant === 'temporary' && {
|
|
@@ -494,14 +479,14 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
494
479
|
slots: slots,
|
|
495
480
|
slotProps: {
|
|
496
481
|
...slotProps,
|
|
497
|
-
backdrop: mergeSlotProps(slotProps.backdrop
|
|
482
|
+
backdrop: mergeSlotProps(slotProps.backdrop, {
|
|
498
483
|
ref: backdropRef
|
|
499
484
|
}),
|
|
500
|
-
paper: mergeSlotProps(slotProps.paper
|
|
485
|
+
paper: mergeSlotProps(slotProps.paper, {
|
|
501
486
|
style: {
|
|
502
487
|
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''
|
|
503
488
|
},
|
|
504
|
-
ref:
|
|
489
|
+
ref: paperRef
|
|
505
490
|
})
|
|
506
491
|
},
|
|
507
492
|
...other
|
|
@@ -576,11 +561,7 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
576
561
|
/**
|
|
577
562
|
* @ignore
|
|
578
563
|
*/
|
|
579
|
-
ModalProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({
|
|
580
|
-
BackdropProps: PropTypes.shape({
|
|
581
|
-
component: elementTypeAcceptingRef
|
|
582
|
-
})
|
|
583
|
-
}),
|
|
564
|
+
ModalProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({}),
|
|
584
565
|
/**
|
|
585
566
|
* Callback fired when the component requests to be closed.
|
|
586
567
|
*
|
|
@@ -598,13 +579,6 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
598
579
|
* @default false
|
|
599
580
|
*/
|
|
600
581
|
open: PropTypes.bool,
|
|
601
|
-
/**
|
|
602
|
-
* @ignore
|
|
603
|
-
*/
|
|
604
|
-
PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({
|
|
605
|
-
component: elementTypeAcceptingRef,
|
|
606
|
-
style: PropTypes.object
|
|
607
|
-
}),
|
|
608
582
|
/**
|
|
609
583
|
* The props used for each slot inside.
|
|
610
584
|
* @default {}
|
|
@@ -629,11 +603,6 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
629
603
|
swipeArea: PropTypes.elementType,
|
|
630
604
|
transition: PropTypes.elementType
|
|
631
605
|
}),
|
|
632
|
-
/**
|
|
633
|
-
* The element is used to intercept the touch events on the edge.
|
|
634
|
-
* @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.
|
|
635
|
-
*/
|
|
636
|
-
SwipeAreaProps: PropTypes.object,
|
|
637
606
|
/**
|
|
638
607
|
* The width of the left most (or right most) area in `px` that
|
|
639
608
|
* the drawer can be swiped open from.
|
package/Switch/Switch.js
CHANGED
|
@@ -11,7 +11,6 @@ exports.default = void 0;
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
-
var _refType = _interopRequireDefault(require("@mui/utils/refType"));
|
|
15
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
15
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
17
16
|
var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/createSimplePaletteValueFilter"));
|
|
@@ -350,16 +349,6 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */
|
|
|
350
349
|
* The id of the `input` element.
|
|
351
350
|
*/
|
|
352
351
|
id: _propTypes.default.string,
|
|
353
|
-
/**
|
|
354
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
|
|
355
|
-
* @deprecated Use `slotProps.input` 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.
|
|
356
|
-
*/
|
|
357
|
-
inputProps: _propTypes.default.object,
|
|
358
|
-
/**
|
|
359
|
-
* Pass a ref to the `input` element.
|
|
360
|
-
* @deprecated Use `slotProps.input.ref` 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.
|
|
361
|
-
*/
|
|
362
|
-
inputRef: _refType.default,
|
|
363
352
|
/**
|
|
364
353
|
* Callback fired when the state is changed.
|
|
365
354
|
*
|
package/Switch/Switch.mjs
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import refType from '@mui/utils/refType';
|
|
8
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
8
|
import capitalize from "../utils/capitalize.mjs";
|
|
10
9
|
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.mjs";
|
|
@@ -343,16 +342,6 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */
|
|
|
343
342
|
* The id of the `input` element.
|
|
344
343
|
*/
|
|
345
344
|
id: PropTypes.string,
|
|
346
|
-
/**
|
|
347
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
|
|
348
|
-
* @deprecated Use `slotProps.input` 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.
|
|
349
|
-
*/
|
|
350
|
-
inputProps: PropTypes.object,
|
|
351
|
-
/**
|
|
352
|
-
* Pass a ref to the `input` element.
|
|
353
|
-
* @deprecated Use `slotProps.input.ref` 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.
|
|
354
|
-
*/
|
|
355
|
-
inputRef: refType,
|
|
356
345
|
/**
|
|
357
346
|
* Callback fired when the state is changed.
|
|
358
347
|
*
|
package/Tab/Tab.js
CHANGED
|
@@ -17,6 +17,7 @@ var _zeroStyled = require("../zero-styled");
|
|
|
17
17
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
18
18
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
19
19
|
var _unsupportedProp = _interopRequireDefault(require("../utils/unsupportedProp"));
|
|
20
|
+
var _useRovingTabIndex = require("../utils/useRovingTabIndex");
|
|
20
21
|
var _tabClasses = _interopRequireWildcard(require("./tabClasses"));
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const useUtilityClasses = ownerState => {
|
|
@@ -32,7 +33,7 @@ const useUtilityClasses = ownerState => {
|
|
|
32
33
|
} = ownerState;
|
|
33
34
|
const slots = {
|
|
34
35
|
root: ['root', icon && label && 'labelIcon', `textColor${(0, _capitalize.default)(textColor)}`, fullWidth && 'fullWidth', wrapped && 'wrapped', selected && 'selected', disabled && 'disabled'],
|
|
35
|
-
icon: ['
|
|
36
|
+
icon: ['icon']
|
|
36
37
|
};
|
|
37
38
|
return (0, _composeClasses.default)(slots, _tabClasses.getTabUtilityClass, classes);
|
|
38
39
|
};
|
|
@@ -44,8 +45,6 @@ const TabRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
44
45
|
ownerState
|
|
45
46
|
} = props;
|
|
46
47
|
return [styles.root, ownerState.label && ownerState.icon && styles.labelIcon, styles[`textColor${(0, _capitalize.default)(ownerState.textColor)}`], ownerState.fullWidth && styles.fullWidth, ownerState.wrapped && styles.wrapped, {
|
|
47
|
-
[`& .${_tabClasses.default.iconWrapper}`]: styles.iconWrapper
|
|
48
|
-
}, {
|
|
49
48
|
[`& .${_tabClasses.default.icon}`]: styles.icon
|
|
50
49
|
}];
|
|
51
50
|
}
|
|
@@ -215,6 +214,19 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
215
214
|
wrapped = false,
|
|
216
215
|
...other
|
|
217
216
|
} = props;
|
|
217
|
+
const rovingContext = (0, _useRovingTabIndex.useRovingTabIndexContext)();
|
|
218
|
+
const rovingItemProps = (0, _useRovingTabIndex.useRovingTabIndexItem)({
|
|
219
|
+
id: value,
|
|
220
|
+
ref,
|
|
221
|
+
disabled,
|
|
222
|
+
selected
|
|
223
|
+
});
|
|
224
|
+
// On the server, and on the first client render before registration effects run,
|
|
225
|
+
// the roving item map is still empty. In that window, fall back to `tabIndex={0}`
|
|
226
|
+
// for the selected tab so the rendered markup is immediately keyboard-accessible
|
|
227
|
+
// and hydration stays consistent until item registration takes over.
|
|
228
|
+
const shouldUseSelectedTabStopFallback = rovingContext.getItemMap().size === 0 && selected;
|
|
229
|
+
const tabIndex = shouldUseSelectedTabStopFallback ? 0 : rovingItemProps.tabIndex;
|
|
218
230
|
const ownerState = {
|
|
219
231
|
...props,
|
|
220
232
|
disabled,
|
|
@@ -248,14 +260,16 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
248
260
|
}
|
|
249
261
|
};
|
|
250
262
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TabRoot, {
|
|
263
|
+
internalNativeButton: true,
|
|
251
264
|
focusRipple: !disableFocusRipple,
|
|
252
265
|
className: (0, _clsx.default)(classes.root, className),
|
|
253
|
-
ref: ref,
|
|
266
|
+
ref: rovingItemProps.ref,
|
|
254
267
|
role: "tab",
|
|
255
268
|
"aria-selected": selected,
|
|
256
269
|
disabled: disabled,
|
|
257
270
|
onClick: handleClick,
|
|
258
271
|
onFocus: handleFocus,
|
|
272
|
+
tabIndex: tabIndex,
|
|
259
273
|
ownerState: ownerState,
|
|
260
274
|
...other,
|
|
261
275
|
children: [iconPosition === 'top' || iconPosition === 'start' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
package/Tab/Tab.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { styled } from "../zero-styled/index.mjs";
|
|
|
10
10
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
11
11
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
12
12
|
import unsupportedProp from "../utils/unsupportedProp.mjs";
|
|
13
|
+
import { useRovingTabIndexContext, useRovingTabIndexItem } from "../utils/useRovingTabIndex.mjs";
|
|
13
14
|
import tabClasses, { getTabUtilityClass } from "./tabClasses.mjs";
|
|
14
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
16
|
const useUtilityClasses = ownerState => {
|
|
@@ -25,7 +26,7 @@ const useUtilityClasses = ownerState => {
|
|
|
25
26
|
} = ownerState;
|
|
26
27
|
const slots = {
|
|
27
28
|
root: ['root', icon && label && 'labelIcon', `textColor${capitalize(textColor)}`, fullWidth && 'fullWidth', wrapped && 'wrapped', selected && 'selected', disabled && 'disabled'],
|
|
28
|
-
icon: ['
|
|
29
|
+
icon: ['icon']
|
|
29
30
|
};
|
|
30
31
|
return composeClasses(slots, getTabUtilityClass, classes);
|
|
31
32
|
};
|
|
@@ -37,8 +38,6 @@ const TabRoot = styled(ButtonBase, {
|
|
|
37
38
|
ownerState
|
|
38
39
|
} = props;
|
|
39
40
|
return [styles.root, ownerState.label && ownerState.icon && styles.labelIcon, styles[`textColor${capitalize(ownerState.textColor)}`], ownerState.fullWidth && styles.fullWidth, ownerState.wrapped && styles.wrapped, {
|
|
40
|
-
[`& .${tabClasses.iconWrapper}`]: styles.iconWrapper
|
|
41
|
-
}, {
|
|
42
41
|
[`& .${tabClasses.icon}`]: styles.icon
|
|
43
42
|
}];
|
|
44
43
|
}
|
|
@@ -208,6 +207,19 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
208
207
|
wrapped = false,
|
|
209
208
|
...other
|
|
210
209
|
} = props;
|
|
210
|
+
const rovingContext = useRovingTabIndexContext();
|
|
211
|
+
const rovingItemProps = useRovingTabIndexItem({
|
|
212
|
+
id: value,
|
|
213
|
+
ref,
|
|
214
|
+
disabled,
|
|
215
|
+
selected
|
|
216
|
+
});
|
|
217
|
+
// On the server, and on the first client render before registration effects run,
|
|
218
|
+
// the roving item map is still empty. In that window, fall back to `tabIndex={0}`
|
|
219
|
+
// for the selected tab so the rendered markup is immediately keyboard-accessible
|
|
220
|
+
// and hydration stays consistent until item registration takes over.
|
|
221
|
+
const shouldUseSelectedTabStopFallback = rovingContext.getItemMap().size === 0 && selected;
|
|
222
|
+
const tabIndex = shouldUseSelectedTabStopFallback ? 0 : rovingItemProps.tabIndex;
|
|
211
223
|
const ownerState = {
|
|
212
224
|
...props,
|
|
213
225
|
disabled,
|
|
@@ -241,14 +253,16 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
241
253
|
}
|
|
242
254
|
};
|
|
243
255
|
return /*#__PURE__*/_jsxs(TabRoot, {
|
|
256
|
+
internalNativeButton: true,
|
|
244
257
|
focusRipple: !disableFocusRipple,
|
|
245
258
|
className: clsx(classes.root, className),
|
|
246
|
-
ref: ref,
|
|
259
|
+
ref: rovingItemProps.ref,
|
|
247
260
|
role: "tab",
|
|
248
261
|
"aria-selected": selected,
|
|
249
262
|
disabled: disabled,
|
|
250
263
|
onClick: handleClick,
|
|
251
264
|
onFocus: handleFocus,
|
|
265
|
+
tabIndex: tabIndex,
|
|
252
266
|
ownerState: ownerState,
|
|
253
267
|
...other,
|
|
254
268
|
children: [iconPosition === 'top' || iconPosition === 'start' ? /*#__PURE__*/_jsxs(React.Fragment, {
|
package/Tab/tabClasses.d.mts
CHANGED
|
@@ -17,10 +17,6 @@ export interface TabClasses {
|
|
|
17
17
|
fullWidth: string;
|
|
18
18
|
/** Styles applied to the root element if `wrapped={true}`. */
|
|
19
19
|
wrapped: string;
|
|
20
|
-
/** Styles applied to the `icon` HTML element if both `icon` and `label` are provided.
|
|
21
|
-
* @deprecated Use `icon` class instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details
|
|
22
|
-
*/
|
|
23
|
-
iconWrapper: string;
|
|
24
20
|
/** Styles applied to the `icon` HTML element if both `icon` and `label` are provided. */
|
|
25
21
|
icon: string;
|
|
26
22
|
}
|
package/Tab/tabClasses.d.ts
CHANGED
|
@@ -17,10 +17,6 @@ export interface TabClasses {
|
|
|
17
17
|
fullWidth: string;
|
|
18
18
|
/** Styles applied to the root element if `wrapped={true}`. */
|
|
19
19
|
wrapped: string;
|
|
20
|
-
/** Styles applied to the `icon` HTML element if both `icon` and `label` are provided.
|
|
21
|
-
* @deprecated Use `icon` class instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details
|
|
22
|
-
*/
|
|
23
|
-
iconWrapper: string;
|
|
24
20
|
/** Styles applied to the `icon` HTML element if both `icon` and `label` are provided. */
|
|
25
21
|
icon: string;
|
|
26
22
|
}
|
package/Tab/tabClasses.js
CHANGED
|
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
11
11
|
function getTabUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiTab', slot);
|
|
13
13
|
}
|
|
14
|
-
const tabClasses = (0, _generateUtilityClasses.default)('MuiTab', ['root', 'labelIcon', 'textColorInherit', 'textColorPrimary', 'textColorSecondary', 'selected', 'disabled', 'fullWidth', 'wrapped', '
|
|
14
|
+
const tabClasses = (0, _generateUtilityClasses.default)('MuiTab', ['root', 'labelIcon', 'textColorInherit', 'textColorPrimary', 'textColorSecondary', 'selected', 'disabled', 'fullWidth', 'wrapped', 'icon']);
|
|
15
15
|
var _default = exports.default = tabClasses;
|
package/Tab/tabClasses.mjs
CHANGED
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getTabUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiTab', slot);
|
|
5
5
|
}
|
|
6
|
-
const tabClasses = generateUtilityClasses('MuiTab', ['root', 'labelIcon', 'textColorInherit', 'textColorPrimary', 'textColorSecondary', 'selected', 'disabled', 'fullWidth', 'wrapped', '
|
|
6
|
+
const tabClasses = generateUtilityClasses('MuiTab', ['root', 'labelIcon', 'textColorInherit', 'textColorPrimary', 'textColorSecondary', 'selected', 'disabled', 'fullWidth', 'wrapped', 'icon']);
|
|
7
7
|
export default tabClasses;
|
|
@@ -10,7 +10,7 @@ export interface TabScrollButtonEndIconSlotPropsOverrides {}
|
|
|
10
10
|
export interface TabScrollButtonOwnerState extends TabScrollButtonProps {
|
|
11
11
|
isRtl: boolean;
|
|
12
12
|
}
|
|
13
|
-
export interface TabScrollButtonProps extends ButtonBaseProps {
|
|
13
|
+
export interface TabScrollButtonProps extends Omit<ButtonBaseProps, 'nativeButton'> {
|
|
14
14
|
/**
|
|
15
15
|
* The content of the component.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ export interface TabScrollButtonEndIconSlotPropsOverrides {}
|
|
|
10
10
|
export interface TabScrollButtonOwnerState extends TabScrollButtonProps {
|
|
11
11
|
isRtl: boolean;
|
|
12
12
|
}
|
|
13
|
-
export interface TabScrollButtonProps extends ButtonBaseProps {
|
|
13
|
+
export interface TabScrollButtonProps extends Omit<ButtonBaseProps, 'nativeButton'> {
|
|
14
14
|
/**
|
|
15
15
|
* The content of the component.
|
|
16
16
|
*/
|
|
@@ -75,6 +75,10 @@ const TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(i
|
|
|
75
75
|
disabled,
|
|
76
76
|
...other
|
|
77
77
|
} = props;
|
|
78
|
+
const {
|
|
79
|
+
nativeButton,
|
|
80
|
+
...buttonBaseProps
|
|
81
|
+
} = other;
|
|
78
82
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
79
83
|
const ownerState = {
|
|
80
84
|
isRtl,
|
|
@@ -106,9 +110,9 @@ const TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(i
|
|
|
106
110
|
role: null,
|
|
107
111
|
ownerState: ownerState,
|
|
108
112
|
tabIndex: null,
|
|
109
|
-
...
|
|
113
|
+
...buttonBaseProps,
|
|
110
114
|
style: {
|
|
111
|
-
...
|
|
115
|
+
...buttonBaseProps.style,
|
|
112
116
|
...(orientation === 'vertical' && {
|
|
113
117
|
'--TabScrollButton-svgRotate': `rotate(${isRtl ? -90 : 90}deg)`
|
|
114
118
|
})
|
|
@@ -68,6 +68,10 @@ const TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(i
|
|
|
68
68
|
disabled,
|
|
69
69
|
...other
|
|
70
70
|
} = props;
|
|
71
|
+
const {
|
|
72
|
+
nativeButton,
|
|
73
|
+
...buttonBaseProps
|
|
74
|
+
} = other;
|
|
71
75
|
const isRtl = useRtl();
|
|
72
76
|
const ownerState = {
|
|
73
77
|
isRtl,
|
|
@@ -99,9 +103,9 @@ const TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(i
|
|
|
99
103
|
role: null,
|
|
100
104
|
ownerState: ownerState,
|
|
101
105
|
tabIndex: null,
|
|
102
|
-
...
|
|
106
|
+
...buttonBaseProps,
|
|
103
107
|
style: {
|
|
104
|
-
...
|
|
108
|
+
...buttonBaseProps.style,
|
|
105
109
|
...(orientation === 'vertical' && {
|
|
106
110
|
'--TabScrollButton-svgRotate': `rotate(${isRtl ? -90 : 90}deg)`
|
|
107
111
|
})
|
|
@@ -4,7 +4,6 @@ import { Theme } from "../styles/index.mjs";
|
|
|
4
4
|
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.mjs";
|
|
5
5
|
import { TablePaginationActionsProps, TablePaginationActionsSlots } from "../TablePaginationActions/index.mjs";
|
|
6
6
|
import { TableCellProps } from "../TableCell/index.mjs";
|
|
7
|
-
import { IconButtonProps } from "../IconButton/index.mjs";
|
|
8
7
|
import { SelectProps } from "../Select/index.mjs";
|
|
9
8
|
import { TablePaginationClasses } from "./tablePaginationClasses.mjs";
|
|
10
9
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
|
|
@@ -122,13 +121,6 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
122
121
|
* @default TablePaginationActions
|
|
123
122
|
*/
|
|
124
123
|
ActionsComponent?: React.ElementType<TablePaginationActionsProps> | undefined;
|
|
125
|
-
/**
|
|
126
|
-
* Props applied to the back arrow [`IconButton`](https://mui.com/material-ui/api/icon-button/) component.
|
|
127
|
-
*
|
|
128
|
-
* This prop is an alias for `slotProps.actions.previousButton` and will be overridden by it if both are used.
|
|
129
|
-
* @deprecated Use `slotProps.actions.previousButton` instead.
|
|
130
|
-
*/
|
|
131
|
-
backIconButtonProps?: Partial<IconButtonProps> | undefined;
|
|
132
124
|
/**
|
|
133
125
|
* Override or extend the styles applied to the component.
|
|
134
126
|
*/
|
|
@@ -173,13 +165,6 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
173
165
|
* @default 'Rows per page:'
|
|
174
166
|
*/
|
|
175
167
|
labelRowsPerPage?: React.ReactNode;
|
|
176
|
-
/**
|
|
177
|
-
* Props applied to the next arrow [`IconButton`](https://mui.com/material-ui/api/icon-button/) element.
|
|
178
|
-
*
|
|
179
|
-
* This prop is an alias for `slotProps.actions.nextButton` and will be overridden by it if both are used.
|
|
180
|
-
* @deprecated Use `slotProps.actions.nextButton` instead.
|
|
181
|
-
*/
|
|
182
|
-
nextIconButtonProps?: Partial<IconButtonProps> | undefined;
|
|
183
168
|
/**
|
|
184
169
|
* Callback fired when the page is changed.
|
|
185
170
|
*
|
|
@@ -213,15 +198,6 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
213
198
|
value: number;
|
|
214
199
|
label: string;
|
|
215
200
|
}> | undefined;
|
|
216
|
-
/**
|
|
217
|
-
* Props applied to the rows per page [`Select`](https://mui.com/material-ui/api/select/) element.
|
|
218
|
-
*
|
|
219
|
-
* This prop is an alias for `slotProps.select` and will be overridden by it if both are used.
|
|
220
|
-
* @deprecated Use `slotProps.select` instead.
|
|
221
|
-
*
|
|
222
|
-
* @default {}
|
|
223
|
-
*/
|
|
224
|
-
SelectProps?: Partial<SelectProps> | undefined;
|
|
225
201
|
/**
|
|
226
202
|
* If `true`, show the first-page button.
|
|
227
203
|
* @default false
|
|
@@ -4,7 +4,6 @@ import { Theme } from "../styles/index.js";
|
|
|
4
4
|
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
|
|
5
5
|
import { TablePaginationActionsProps, TablePaginationActionsSlots } from "../TablePaginationActions/index.js";
|
|
6
6
|
import { TableCellProps } from "../TableCell/index.js";
|
|
7
|
-
import { IconButtonProps } from "../IconButton/index.js";
|
|
8
7
|
import { SelectProps } from "../Select/index.js";
|
|
9
8
|
import { TablePaginationClasses } from "./tablePaginationClasses.js";
|
|
10
9
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
|
|
@@ -122,13 +121,6 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
122
121
|
* @default TablePaginationActions
|
|
123
122
|
*/
|
|
124
123
|
ActionsComponent?: React.ElementType<TablePaginationActionsProps> | undefined;
|
|
125
|
-
/**
|
|
126
|
-
* Props applied to the back arrow [`IconButton`](https://mui.com/material-ui/api/icon-button/) component.
|
|
127
|
-
*
|
|
128
|
-
* This prop is an alias for `slotProps.actions.previousButton` and will be overridden by it if both are used.
|
|
129
|
-
* @deprecated Use `slotProps.actions.previousButton` instead.
|
|
130
|
-
*/
|
|
131
|
-
backIconButtonProps?: Partial<IconButtonProps> | undefined;
|
|
132
124
|
/**
|
|
133
125
|
* Override or extend the styles applied to the component.
|
|
134
126
|
*/
|
|
@@ -173,13 +165,6 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
173
165
|
* @default 'Rows per page:'
|
|
174
166
|
*/
|
|
175
167
|
labelRowsPerPage?: React.ReactNode;
|
|
176
|
-
/**
|
|
177
|
-
* Props applied to the next arrow [`IconButton`](https://mui.com/material-ui/api/icon-button/) element.
|
|
178
|
-
*
|
|
179
|
-
* This prop is an alias for `slotProps.actions.nextButton` and will be overridden by it if both are used.
|
|
180
|
-
* @deprecated Use `slotProps.actions.nextButton` instead.
|
|
181
|
-
*/
|
|
182
|
-
nextIconButtonProps?: Partial<IconButtonProps> | undefined;
|
|
183
168
|
/**
|
|
184
169
|
* Callback fired when the page is changed.
|
|
185
170
|
*
|
|
@@ -213,15 +198,6 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
213
198
|
value: number;
|
|
214
199
|
label: string;
|
|
215
200
|
}> | undefined;
|
|
216
|
-
/**
|
|
217
|
-
* Props applied to the rows per page [`Select`](https://mui.com/material-ui/api/select/) element.
|
|
218
|
-
*
|
|
219
|
-
* This prop is an alias for `slotProps.select` and will be overridden by it if both are used.
|
|
220
|
-
* @deprecated Use `slotProps.select` instead.
|
|
221
|
-
*
|
|
222
|
-
* @default {}
|
|
223
|
-
*/
|
|
224
|
-
SelectProps?: Partial<SelectProps> | undefined;
|
|
225
201
|
/**
|
|
226
202
|
* If `true`, show the first-page button.
|
|
227
203
|
* @default false
|