@mui/material 6.0.0-alpha.4 → 6.0.0-alpha.6
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.ts +2 -2
- package/Accordion/Accordion.js +2 -2
- package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/Alert/Alert.d.ts +2 -2
- package/Alert/Alert.js +2 -2
- package/Alert/alertClasses.d.ts +12 -12
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +1 -1
- package/Backdrop/Backdrop.d.ts +1 -1
- package/Backdrop/Backdrop.js +1 -1
- package/Badge/Badge.d.ts +2 -2
- package/Badge/Badge.js +2 -2
- package/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/Button/Button.js +1 -1
- package/Button/buttonClasses.d.ts +33 -33
- package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/CHANGELOG.md +86 -0
- package/Checkbox/Checkbox.js +3 -1
- package/Chip/chipClasses.d.ts +28 -26
- package/Chip/chipClasses.js +1 -1
- package/Collapse/Collapse.js +66 -35
- package/Dialog/Dialog.js +105 -61
- package/DialogActions/DialogActions.js +16 -12
- package/DialogContent/DialogContent.js +25 -15
- package/DialogContentText/DialogContentText.js +3 -2
- package/DialogTitle/DialogTitle.js +2 -2
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +1 -1
- package/Drawer/Drawer.js +73 -32
- package/Fab/Fab.js +1 -1
- package/FilledInput/FilledInput.d.ts +1 -0
- package/FilledInput/FilledInput.js +170 -87
- package/FormControlLabel/FormControlLabel.d.ts +21 -14
- package/FormControlLabel/FormControlLabel.js +22 -4
- package/FormHelperText/FormHelperText.js +2 -2
- package/FormLabel/FormLabel.js +23 -13
- package/Grow/Grow.js +3 -1
- package/Icon/Icon.js +63 -23
- package/ImageList/ImageList.js +2 -2
- package/ImageListItem/ImageListItem.js +2 -2
- package/ImageListItemBar/ImageListItemBar.js +2 -2
- package/Input/Input.d.ts +1 -0
- package/Input/Input.js +84 -61
- package/InputAdornment/InputAdornment.js +37 -21
- package/InputBase/InputBase.js +58 -28
- package/InputLabel/InputLabel.js +120 -58
- package/Link/Link.js +99 -54
- package/Link/getTextDecoration.d.ts +2 -8
- package/Link/getTextDecoration.js +16 -8
- package/List/List.js +22 -13
- package/ListItem/ListItem.js +2 -2
- package/ListItemAvatar/ListItemAvatar.js +2 -2
- package/ListItemButton/ListItemButton.js +3 -2
- package/ListItemIcon/ListItemIcon.js +14 -9
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
- package/ListItemText/ListItemText.js +2 -2
- package/ListSubheader/ListSubheader.js +5 -3
- package/Menu/Menu.js +3 -2
- package/MenuItem/MenuItem.js +47 -27
- package/NativeSelect/NativeSelectInput.js +78 -49
- package/OutlinedInput/NotchedOutline.js +60 -43
- package/OutlinedInput/OutlinedInput.js +97 -39
- package/Pagination/Pagination.js +2 -2
- package/PaginationItem/PaginationItem.d.ts +26 -14
- package/PaginationItem/PaginationItem.js +64 -20
- package/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/Paper/Paper.js +44 -21
- package/Radio/Radio.js +5 -3
- package/Radio/RadioButtonIcon.js +1 -1
- package/Rating/Rating.js +3 -2
- package/Select/Select.js +2 -1
- package/Select/SelectInput.js +8 -6
- package/Skeleton/Skeleton.js +109 -61
- package/Slider/Slider.d.ts +2 -2
- package/Slider/Slider.js +2 -2
- package/Snackbar/Snackbar.js +66 -40
- package/SnackbarContent/SnackbarContent.js +2 -2
- package/SpeedDial/SpeedDial.d.ts +28 -1
- package/SpeedDial/SpeedDial.js +107 -49
- package/SpeedDialAction/SpeedDialAction.js +50 -24
- package/SpeedDialIcon/SpeedDialIcon.js +37 -16
- package/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/StepLabel/StepLabel.d.ts +3 -3
- package/StepLabel/StepLabel.js +3 -3
- package/SvgIcon/SvgIcon.js +73 -21
- package/SwipeableDrawer/SwipeArea.js +39 -18
- package/Tab/Tab.js +127 -55
- package/TabScrollButton/TabScrollButton.js +27 -15
- package/Table/Table.js +2 -2
- package/TableBody/TableBody.js +2 -2
- package/TableCell/TableCell.js +2 -2
- package/TableContainer/TableContainer.js +2 -2
- package/TableFooter/TableFooter.js +2 -2
- package/TableHead/TableHead.js +2 -2
- package/TablePagination/TablePagination.js +2 -2
- package/TableRow/TableRow.js +2 -2
- package/TableSortLabel/TableSortLabel.js +2 -2
- package/Tabs/Tabs.js +107 -54
- package/TextField/TextField.js +2 -2
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
- package/Toolbar/Toolbar.js +3 -7
- package/Tooltip/Tooltip.js +185 -88
- package/Typography/Typography.js +89 -39
- package/index.js +1 -1
- package/internal/SwitchBase.js +39 -11
- package/modern/Accordion/Accordion.js +2 -2
- package/modern/Alert/Alert.js +2 -2
- package/modern/Avatar/Avatar.js +1 -1
- package/modern/Backdrop/Backdrop.js +1 -1
- package/modern/Badge/Badge.js +2 -2
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/modern/Button/Button.js +1 -1
- package/modern/Checkbox/Checkbox.js +3 -1
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/Collapse/Collapse.js +66 -35
- package/modern/Dialog/Dialog.js +105 -61
- package/modern/DialogActions/DialogActions.js +16 -12
- package/modern/DialogContent/DialogContent.js +25 -15
- package/modern/DialogContentText/DialogContentText.js +3 -2
- package/modern/DialogTitle/DialogTitle.js +2 -2
- package/modern/Divider/Divider.js +1 -1
- package/modern/Drawer/Drawer.js +73 -32
- package/modern/Fab/Fab.js +1 -1
- package/modern/FilledInput/FilledInput.js +170 -87
- package/modern/FormControlLabel/FormControlLabel.js +22 -4
- package/modern/FormHelperText/FormHelperText.js +2 -2
- package/modern/FormLabel/FormLabel.js +23 -13
- package/modern/Grow/Grow.js +3 -1
- package/modern/Icon/Icon.js +63 -23
- package/modern/ImageList/ImageList.js +2 -2
- package/modern/ImageListItem/ImageListItem.js +2 -2
- package/modern/ImageListItemBar/ImageListItemBar.js +2 -2
- package/modern/Input/Input.js +84 -61
- package/modern/InputAdornment/InputAdornment.js +37 -21
- package/modern/InputBase/InputBase.js +58 -28
- package/modern/InputLabel/InputLabel.js +120 -58
- package/modern/Link/Link.js +99 -54
- package/modern/Link/getTextDecoration.js +16 -8
- package/modern/List/List.js +22 -13
- package/modern/ListItem/ListItem.js +2 -2
- package/modern/ListItemAvatar/ListItemAvatar.js +2 -2
- package/modern/ListItemButton/ListItemButton.js +3 -2
- package/modern/ListItemIcon/ListItemIcon.js +14 -9
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
- package/modern/ListItemText/ListItemText.js +2 -2
- package/modern/ListSubheader/ListSubheader.js +5 -3
- package/modern/Menu/Menu.js +3 -2
- package/modern/MenuItem/MenuItem.js +47 -27
- package/modern/NativeSelect/NativeSelectInput.js +78 -49
- package/modern/OutlinedInput/NotchedOutline.js +60 -43
- package/modern/OutlinedInput/OutlinedInput.js +97 -39
- package/modern/Pagination/Pagination.js +2 -2
- package/modern/PaginationItem/PaginationItem.js +64 -20
- package/modern/Paper/Paper.js +44 -21
- package/modern/Radio/Radio.js +5 -3
- package/modern/Radio/RadioButtonIcon.js +1 -1
- package/modern/Rating/Rating.js +3 -2
- package/modern/Select/Select.js +2 -1
- package/modern/Select/SelectInput.js +8 -6
- package/modern/Skeleton/Skeleton.js +109 -61
- package/modern/Slider/Slider.js +2 -2
- package/modern/Snackbar/Snackbar.js +66 -40
- package/modern/SnackbarContent/SnackbarContent.js +2 -2
- package/modern/SpeedDial/SpeedDial.js +107 -49
- package/modern/SpeedDialAction/SpeedDialAction.js +50 -24
- package/modern/SpeedDialIcon/SpeedDialIcon.js +37 -16
- package/modern/StepLabel/StepLabel.js +3 -3
- package/modern/SvgIcon/SvgIcon.js +73 -21
- package/modern/SwipeableDrawer/SwipeArea.js +39 -18
- package/modern/Tab/Tab.js +127 -55
- package/modern/TabScrollButton/TabScrollButton.js +27 -15
- package/modern/Table/Table.js +2 -2
- package/modern/TableBody/TableBody.js +2 -2
- package/modern/TableCell/TableCell.js +2 -2
- package/modern/TableContainer/TableContainer.js +2 -2
- package/modern/TableFooter/TableFooter.js +2 -2
- package/modern/TableHead/TableHead.js +2 -2
- package/modern/TablePagination/TablePagination.js +2 -2
- package/modern/TableRow/TableRow.js +2 -2
- package/modern/TableSortLabel/TableSortLabel.js +2 -2
- package/modern/Tabs/Tabs.js +107 -54
- package/modern/TextField/TextField.js +2 -2
- package/modern/Toolbar/Toolbar.js +3 -7
- package/modern/Tooltip/Tooltip.js +185 -88
- package/modern/Typography/Typography.js +89 -39
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +39 -11
- package/node/Accordion/Accordion.js +2 -2
- package/node/Alert/Alert.js +2 -2
- package/node/Avatar/Avatar.js +1 -1
- package/node/Backdrop/Backdrop.js +1 -1
- package/node/Badge/Badge.js +2 -2
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -3
- package/node/Button/Button.js +2 -2
- package/node/Checkbox/Checkbox.js +3 -1
- package/node/Chip/chipClasses.js +1 -1
- package/node/Collapse/Collapse.js +70 -39
- package/node/Dialog/Dialog.js +110 -66
- package/node/DialogActions/DialogActions.js +18 -14
- package/node/DialogContent/DialogContent.js +27 -17
- package/node/DialogContentText/DialogContentText.js +6 -5
- package/node/DialogTitle/DialogTitle.js +4 -4
- package/node/Divider/Divider.js +1 -1
- package/node/Drawer/Drawer.js +78 -37
- package/node/Fab/Fab.js +2 -2
- package/node/FilledInput/FilledInput.js +176 -91
- package/node/FormControlLabel/FormControlLabel.js +23 -5
- package/node/FormHelperText/FormHelperText.js +4 -4
- package/node/FormLabel/FormLabel.js +26 -16
- package/node/Grow/Grow.js +3 -1
- package/node/Icon/Icon.js +65 -25
- package/node/ImageList/ImageList.js +4 -4
- package/node/ImageListItem/ImageListItem.js +4 -4
- package/node/ImageListItemBar/ImageListItemBar.js +8 -8
- package/node/Input/Input.js +87 -64
- package/node/InputAdornment/InputAdornment.js +39 -23
- package/node/InputBase/InputBase.js +61 -31
- package/node/InputLabel/InputLabel.js +123 -61
- package/node/Link/Link.js +101 -56
- package/node/Link/getTextDecoration.js +18 -10
- package/node/List/List.js +24 -15
- package/node/ListItem/ListItem.js +5 -5
- package/node/ListItemAvatar/ListItemAvatar.js +4 -4
- package/node/ListItemButton/ListItemButton.js +6 -5
- package/node/ListItemIcon/ListItemIcon.js +16 -11
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
- package/node/ListItemText/ListItemText.js +4 -4
- package/node/ListSubheader/ListSubheader.js +7 -5
- package/node/Menu/Menu.js +8 -7
- package/node/MenuItem/MenuItem.js +50 -30
- package/node/NativeSelect/NativeSelectInput.js +80 -53
- package/node/OutlinedInput/NotchedOutline.js +64 -47
- package/node/OutlinedInput/OutlinedInput.js +101 -43
- package/node/Pagination/Pagination.js +5 -5
- package/node/PaginationItem/PaginationItem.js +65 -20
- package/node/Paper/Paper.js +49 -28
- package/node/Radio/Radio.js +6 -4
- package/node/Radio/RadioButtonIcon.js +2 -2
- package/node/Rating/Rating.js +9 -8
- package/node/Select/Select.js +6 -5
- package/node/Select/SelectInput.js +9 -7
- package/node/Skeleton/Skeleton.js +113 -65
- package/node/Slider/Slider.js +2 -2
- package/node/Snackbar/Snackbar.js +68 -42
- package/node/SnackbarContent/SnackbarContent.js +6 -6
- package/node/SpeedDial/SpeedDial.js +111 -53
- package/node/SpeedDialAction/SpeedDialAction.js +54 -28
- package/node/SpeedDialIcon/SpeedDialIcon.js +39 -18
- package/node/StepLabel/StepLabel.js +3 -3
- package/node/SvgIcon/SvgIcon.js +79 -24
- package/node/SwipeableDrawer/SwipeArea.js +41 -20
- package/node/Tab/Tab.js +129 -57
- package/node/TabScrollButton/TabScrollButton.js +29 -17
- package/node/Table/Table.js +4 -4
- package/node/TableBody/TableBody.js +4 -4
- package/node/TableCell/TableCell.js +4 -4
- package/node/TableContainer/TableContainer.js +4 -4
- package/node/TableFooter/TableFooter.js +4 -4
- package/node/TableHead/TableHead.js +4 -4
- package/node/TablePagination/TablePagination.js +10 -10
- package/node/TableRow/TableRow.js +4 -4
- package/node/TableSortLabel/TableSortLabel.js +5 -5
- package/node/Tabs/Tabs.js +113 -60
- package/node/TextField/TextField.js +4 -4
- package/node/Toolbar/Toolbar.js +5 -9
- package/node/Tooltip/Tooltip.js +189 -92
- package/node/Typography/Typography.js +90 -40
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +41 -13
- package/package.json +6 -6
- package/umd/material-ui.development.js +2777 -1334
- package/umd/material-ui.production.min.js +4 -4
|
@@ -9,11 +9,11 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import ButtonBase from '../ButtonBase';
|
|
11
11
|
import ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';
|
|
12
|
-
import styled from '../
|
|
13
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
12
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
13
|
import capitalize from '../utils/capitalize';
|
|
15
14
|
import tableSortLabelClasses, { getTableSortLabelUtilityClass } from './tableSortLabelClasses';
|
|
16
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const useThemeProps = createUseThemeProps('MuiTableSortLabel');
|
|
17
17
|
const useUtilityClasses = ownerState => {
|
|
18
18
|
const {
|
|
19
19
|
classes,
|
package/Tabs/Tabs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "slots", "slotProps", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { isFragment } from 'react-is';
|
|
@@ -11,8 +11,7 @@ import refType from '@mui/utils/refType';
|
|
|
11
11
|
import { useSlotProps } from '@mui/base/utils';
|
|
12
12
|
import composeClasses from '@mui/utils/composeClasses';
|
|
13
13
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
14
|
-
import styled from '../
|
|
15
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
14
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
16
15
|
import useTheme from '../styles/useTheme';
|
|
17
16
|
import debounce from '../utils/debounce';
|
|
18
17
|
import { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';
|
|
@@ -24,6 +23,7 @@ import tabsClasses, { getTabsUtilityClass } from './tabsClasses';
|
|
|
24
23
|
import ownerDocument from '../utils/ownerDocument';
|
|
25
24
|
import ownerWindow from '../utils/ownerWindow';
|
|
26
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
const useThemeProps = createUseThemeProps('MuiTabs');
|
|
27
27
|
const nextItem = (list, item) => {
|
|
28
28
|
if (list === item) {
|
|
29
29
|
return list.firstChild;
|
|
@@ -101,22 +101,32 @@ const TabsRoot = styled('div', {
|
|
|
101
101
|
}, styles.root, ownerState.vertical && styles.vertical];
|
|
102
102
|
}
|
|
103
103
|
})(({
|
|
104
|
-
ownerState,
|
|
105
104
|
theme
|
|
106
|
-
}) =>
|
|
105
|
+
}) => ({
|
|
107
106
|
overflow: 'hidden',
|
|
108
107
|
minHeight: 48,
|
|
109
108
|
// Add iOS momentum scrolling for iOS < 13.0
|
|
110
109
|
WebkitOverflowScrolling: 'touch',
|
|
111
|
-
display: 'flex'
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
display: 'flex',
|
|
111
|
+
variants: [{
|
|
112
|
+
props: ({
|
|
113
|
+
ownerState
|
|
114
|
+
}) => ownerState.vertical,
|
|
115
|
+
style: {
|
|
116
|
+
flexDirection: 'column'
|
|
118
117
|
}
|
|
119
|
-
}
|
|
118
|
+
}, {
|
|
119
|
+
props: ({
|
|
120
|
+
ownerState
|
|
121
|
+
}) => ownerState.scrollButtonsHideMobile,
|
|
122
|
+
style: {
|
|
123
|
+
[`& .${tabsClasses.scrollButtons}`]: {
|
|
124
|
+
[theme.breakpoints.down('sm')]: {
|
|
125
|
+
display: 'none'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}]
|
|
120
130
|
}));
|
|
121
131
|
const TabsScroller = styled('div', {
|
|
122
132
|
name: 'MuiTabs',
|
|
@@ -127,30 +137,49 @@ const TabsScroller = styled('div', {
|
|
|
127
137
|
} = props;
|
|
128
138
|
return [styles.scroller, ownerState.fixed && styles.fixed, ownerState.hideScrollbar && styles.hideScrollbar, ownerState.scrollableX && styles.scrollableX, ownerState.scrollableY && styles.scrollableY];
|
|
129
139
|
}
|
|
130
|
-
})(
|
|
131
|
-
ownerState
|
|
132
|
-
}) => _extends({
|
|
140
|
+
})({
|
|
133
141
|
position: 'relative',
|
|
134
142
|
display: 'inline-block',
|
|
135
143
|
flex: '1 1 auto',
|
|
136
|
-
whiteSpace: 'nowrap'
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
whiteSpace: 'nowrap',
|
|
145
|
+
variants: [{
|
|
146
|
+
props: ({
|
|
147
|
+
ownerState
|
|
148
|
+
}) => ownerState.fixed,
|
|
149
|
+
style: {
|
|
150
|
+
overflowX: 'hidden',
|
|
151
|
+
width: '100%'
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
props: ({
|
|
155
|
+
ownerState
|
|
156
|
+
}) => ownerState.hideScrollbar,
|
|
157
|
+
style: {
|
|
158
|
+
// Hide dimensionless scrollbar on macOS
|
|
159
|
+
scrollbarWidth: 'none',
|
|
160
|
+
// Firefox
|
|
161
|
+
'&::-webkit-scrollbar': {
|
|
162
|
+
display: 'none' // Safari + Chrome
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
props: ({
|
|
167
|
+
ownerState
|
|
168
|
+
}) => ownerState.scrollableX,
|
|
169
|
+
style: {
|
|
170
|
+
overflowX: 'auto',
|
|
171
|
+
overflowY: 'hidden'
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
props: ({
|
|
175
|
+
ownerState
|
|
176
|
+
}) => ownerState.scrollableY,
|
|
177
|
+
style: {
|
|
178
|
+
overflowY: 'auto',
|
|
179
|
+
overflowX: 'hidden'
|
|
180
|
+
}
|
|
181
|
+
}]
|
|
182
|
+
});
|
|
154
183
|
const FlexContainer = styled('div', {
|
|
155
184
|
name: 'MuiTabs',
|
|
156
185
|
slot: 'FlexContainer',
|
|
@@ -160,36 +189,60 @@ const FlexContainer = styled('div', {
|
|
|
160
189
|
} = props;
|
|
161
190
|
return [styles.flexContainer, ownerState.vertical && styles.flexContainerVertical, ownerState.centered && styles.centered];
|
|
162
191
|
}
|
|
163
|
-
})(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
192
|
+
})({
|
|
193
|
+
display: 'flex',
|
|
194
|
+
variants: [{
|
|
195
|
+
props: ({
|
|
196
|
+
ownerState
|
|
197
|
+
}) => ownerState.vertical,
|
|
198
|
+
style: {
|
|
199
|
+
flexDirection: 'column'
|
|
200
|
+
}
|
|
201
|
+
}, {
|
|
202
|
+
props: ({
|
|
203
|
+
ownerState
|
|
204
|
+
}) => ownerState.centered,
|
|
205
|
+
style: {
|
|
206
|
+
justifyContent: 'center'
|
|
207
|
+
}
|
|
208
|
+
}]
|
|
209
|
+
});
|
|
172
210
|
const TabsIndicator = styled('span', {
|
|
173
211
|
name: 'MuiTabs',
|
|
174
212
|
slot: 'Indicator',
|
|
175
213
|
overridesResolver: (props, styles) => styles.indicator
|
|
176
214
|
})(({
|
|
177
|
-
ownerState,
|
|
178
215
|
theme
|
|
179
|
-
}) =>
|
|
216
|
+
}) => ({
|
|
180
217
|
position: 'absolute',
|
|
181
218
|
height: 2,
|
|
182
219
|
bottom: 0,
|
|
183
220
|
width: '100%',
|
|
184
|
-
transition: theme.transitions.create()
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
221
|
+
transition: theme.transitions.create(),
|
|
222
|
+
variants: [{
|
|
223
|
+
props: {
|
|
224
|
+
indicatorColor: 'primary'
|
|
225
|
+
},
|
|
226
|
+
style: {
|
|
227
|
+
backgroundColor: (theme.vars || theme).palette.primary.main
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
props: {
|
|
231
|
+
indicatorColor: 'secondary'
|
|
232
|
+
},
|
|
233
|
+
style: {
|
|
234
|
+
backgroundColor: (theme.vars || theme).palette.secondary.main
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
props: ({
|
|
238
|
+
ownerState
|
|
239
|
+
}) => ownerState.vertical,
|
|
240
|
+
style: {
|
|
241
|
+
height: '100%',
|
|
242
|
+
width: 2,
|
|
243
|
+
right: 0
|
|
244
|
+
}
|
|
245
|
+
}]
|
|
193
246
|
}));
|
|
194
247
|
const TabsScrollbarSize = styled(ScrollbarSize)({
|
|
195
248
|
overflowX: 'auto',
|
package/TextField/TextField.js
CHANGED
|
@@ -9,8 +9,7 @@ import clsx from 'clsx';
|
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import useId from '@mui/utils/useId';
|
|
11
11
|
import refType from '@mui/utils/refType';
|
|
12
|
-
import styled from '../
|
|
13
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
12
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
13
|
import Input from '../Input';
|
|
15
14
|
import FilledInput from '../FilledInput';
|
|
16
15
|
import OutlinedInput from '../OutlinedInput';
|
|
@@ -20,6 +19,7 @@ import FormHelperText from '../FormHelperText';
|
|
|
20
19
|
import Select from '../Select';
|
|
21
20
|
import { getTextFieldUtilityClass } from './textFieldClasses';
|
|
22
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
const useThemeProps = createUseThemeProps('MuiTextField');
|
|
23
23
|
const variantComponent = {
|
|
24
24
|
standard: Input,
|
|
25
25
|
filled: FilledInput,
|
|
@@ -10,11 +10,11 @@ export interface ToggleButtonGroupClasses {
|
|
|
10
10
|
/** Styles applied to the children. */
|
|
11
11
|
grouped: string;
|
|
12
12
|
/** Styles applied to the children if `orientation="horizontal"`.
|
|
13
|
-
* @deprecated Combine the [.MuiToggleButtonGroup-horizontal](/material-ui/api/toggle-button-group/#toggle-button-group-classes-horizontal) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. [
|
|
13
|
+
* @deprecated Combine the [.MuiToggleButtonGroup-horizontal](/material-ui/api/toggle-button-group/#toggle-button-group-classes-horizontal) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
14
14
|
*/
|
|
15
15
|
groupedHorizontal: string;
|
|
16
16
|
/** Styles applied to the children if `orientation="vertical"`.
|
|
17
|
-
* @deprecated Combine the [.MuiToggleButtonGroup-vertical](/material-ui/api/toggle-button-group/#toggle-button-group-classes-vertical) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. [
|
|
17
|
+
* @deprecated Combine the [.MuiToggleButtonGroup-vertical](/material-ui/api/toggle-button-group/#toggle-button-group-classes-vertical) and [.MuiToggleButtonGroup-grouped](/material-ui/api/toggle-button-group/#toggle-button-group-classes-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
18
18
|
*/
|
|
19
19
|
groupedVertical: string;
|
|
20
20
|
/** Styles applied to the root element if `fullWidth={true}`. */
|
package/Toolbar/Toolbar.js
CHANGED
|
@@ -7,10 +7,10 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import
|
|
11
|
-
import styled from '../styles/styled';
|
|
10
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
12
11
|
import { getToolbarUtilityClass } from './toolbarClasses';
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
const useThemeProps = createUseThemeProps('MuiToolbar');
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
16
16
|
classes,
|
|
@@ -56,11 +56,7 @@ const ToolbarRoot = styled('div', {
|
|
|
56
56
|
style: {
|
|
57
57
|
minHeight: 48
|
|
58
58
|
}
|
|
59
|
-
}
|
|
60
|
-
}), ({
|
|
61
|
-
theme
|
|
62
|
-
}) => ({
|
|
63
|
-
variants: [{
|
|
59
|
+
}, {
|
|
64
60
|
props: {
|
|
65
61
|
variant: 'regular'
|
|
66
62
|
},
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -12,9 +12,8 @@ import { appendOwnerState } from '@mui/base/utils';
|
|
|
12
12
|
import composeClasses from '@mui/utils/composeClasses';
|
|
13
13
|
import { alpha } from '@mui/system/colorManipulator';
|
|
14
14
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
15
|
-
import styled from '../
|
|
15
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
16
16
|
import useTheme from '../styles/useTheme';
|
|
17
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
18
17
|
import capitalize from '../utils/capitalize';
|
|
19
18
|
import Grow from '../Grow';
|
|
20
19
|
import Popper from '../Popper';
|
|
@@ -25,6 +24,7 @@ import useIsFocusVisible from '../utils/useIsFocusVisible';
|
|
|
25
24
|
import useControlled from '../utils/useControlled';
|
|
26
25
|
import tooltipClasses, { getTooltipUtilityClass } from './tooltipClasses';
|
|
27
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
const useThemeProps = createUseThemeProps('MuiTooltip');
|
|
28
28
|
function round(value) {
|
|
29
29
|
return Math.round(value * 1e5) / 1e5;
|
|
30
30
|
}
|
|
@@ -53,57 +53,99 @@ const TooltipPopper = styled(Popper, {
|
|
|
53
53
|
return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];
|
|
54
54
|
}
|
|
55
55
|
})(({
|
|
56
|
-
theme
|
|
57
|
-
|
|
58
|
-
open
|
|
59
|
-
}) => _extends({
|
|
56
|
+
theme
|
|
57
|
+
}) => ({
|
|
60
58
|
zIndex: (theme.vars || theme).zIndex.tooltip,
|
|
61
|
-
pointerEvents: 'none'
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
top: 0,
|
|
69
|
-
marginTop: '-0.71em',
|
|
70
|
-
'&::before': {
|
|
71
|
-
transformOrigin: '0 100%'
|
|
59
|
+
pointerEvents: 'none',
|
|
60
|
+
variants: [{
|
|
61
|
+
props: ({
|
|
62
|
+
ownerState
|
|
63
|
+
}) => !ownerState.disableInteractive,
|
|
64
|
+
style: {
|
|
65
|
+
pointerEvents: 'auto'
|
|
72
66
|
}
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
}, {
|
|
68
|
+
props: ({
|
|
69
|
+
open
|
|
70
|
+
}) => !open,
|
|
71
|
+
style: {
|
|
72
|
+
pointerEvents: 'none'
|
|
79
73
|
}
|
|
80
|
-
},
|
|
81
|
-
[`&[data-popper-placement*="right"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {
|
|
82
|
-
left: 0,
|
|
83
|
-
marginLeft: '-0.71em'
|
|
84
|
-
} : {
|
|
85
|
-
right: 0,
|
|
86
|
-
marginRight: '-0.71em'
|
|
87
74
|
}, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
75
|
+
props: ({
|
|
76
|
+
ownerState
|
|
77
|
+
}) => ownerState.arrow,
|
|
78
|
+
style: {
|
|
79
|
+
[`&[data-popper-placement*="bottom"] .${tooltipClasses.arrow}`]: {
|
|
80
|
+
top: 0,
|
|
81
|
+
marginTop: '-0.71em',
|
|
82
|
+
'&::before': {
|
|
83
|
+
transformOrigin: '0 100%'
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
[`&[data-popper-placement*="top"] .${tooltipClasses.arrow}`]: {
|
|
87
|
+
bottom: 0,
|
|
88
|
+
marginBottom: '-0.71em',
|
|
89
|
+
'&::before': {
|
|
90
|
+
transformOrigin: '100% 0'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
[`&[data-popper-placement*="right"] .${tooltipClasses.arrow}`]: {
|
|
94
|
+
height: '1em',
|
|
95
|
+
width: '0.71em',
|
|
96
|
+
'&::before': {
|
|
97
|
+
transformOrigin: '100% 100%'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
[`&[data-popper-placement*="left"] .${tooltipClasses.arrow}`]: {
|
|
101
|
+
height: '1em',
|
|
102
|
+
width: '0.71em',
|
|
103
|
+
'&::before': {
|
|
104
|
+
transformOrigin: '0 0'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
92
107
|
}
|
|
93
|
-
}),
|
|
94
|
-
[`&[data-popper-placement*="left"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {
|
|
95
|
-
right: 0,
|
|
96
|
-
marginRight: '-0.71em'
|
|
97
|
-
} : {
|
|
98
|
-
left: 0,
|
|
99
|
-
marginLeft: '-0.71em'
|
|
100
108
|
}, {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
props: ({
|
|
110
|
+
ownerState
|
|
111
|
+
}) => ownerState.arrow && !ownerState.isRtl,
|
|
112
|
+
style: {
|
|
113
|
+
[`&[data-popper-placement*="right"] .${tooltipClasses.arrow}`]: {
|
|
114
|
+
left: 0,
|
|
115
|
+
marginLeft: '-0.71em'
|
|
116
|
+
}
|
|
105
117
|
}
|
|
106
|
-
}
|
|
118
|
+
}, {
|
|
119
|
+
props: ({
|
|
120
|
+
ownerState
|
|
121
|
+
}) => ownerState.arrow && !!ownerState.isRtl,
|
|
122
|
+
style: {
|
|
123
|
+
[`&[data-popper-placement*="right"] .${tooltipClasses.arrow}`]: {
|
|
124
|
+
right: 0,
|
|
125
|
+
marginRight: '-0.71em'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
props: ({
|
|
130
|
+
ownerState
|
|
131
|
+
}) => ownerState.arrow && !ownerState.isRtl,
|
|
132
|
+
style: {
|
|
133
|
+
[`&[data-popper-placement*="left"] .${tooltipClasses.arrow}`]: {
|
|
134
|
+
right: 0,
|
|
135
|
+
marginRight: '-0.71em'
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, {
|
|
139
|
+
props: ({
|
|
140
|
+
ownerState
|
|
141
|
+
}) => ownerState.arrow && !!ownerState.isRtl,
|
|
142
|
+
style: {
|
|
143
|
+
[`&[data-popper-placement*="left"] .${tooltipClasses.arrow}`]: {
|
|
144
|
+
left: 0,
|
|
145
|
+
marginLeft: '-0.71em'
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}]
|
|
107
149
|
}));
|
|
108
150
|
const TooltipTooltip = styled('div', {
|
|
109
151
|
name: 'MuiTooltip',
|
|
@@ -115,9 +157,8 @@ const TooltipTooltip = styled('div', {
|
|
|
115
157
|
return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];
|
|
116
158
|
}
|
|
117
159
|
})(({
|
|
118
|
-
theme
|
|
119
|
-
|
|
120
|
-
}) => _extends({
|
|
160
|
+
theme
|
|
161
|
+
}) => ({
|
|
121
162
|
backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),
|
|
122
163
|
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
123
164
|
color: (theme.vars || theme).palette.common.white,
|
|
@@ -127,50 +168,106 @@ const TooltipTooltip = styled('div', {
|
|
|
127
168
|
maxWidth: 300,
|
|
128
169
|
margin: 2,
|
|
129
170
|
wordWrap: 'break-word',
|
|
130
|
-
fontWeight: theme.typography.fontWeightMedium
|
|
131
|
-
}
|
|
132
|
-
position: 'relative',
|
|
133
|
-
margin: 0
|
|
134
|
-
}, ownerState.touch && {
|
|
135
|
-
padding: '8px 16px',
|
|
136
|
-
fontSize: theme.typography.pxToRem(14),
|
|
137
|
-
lineHeight: `${round(16 / 14)}em`,
|
|
138
|
-
fontWeight: theme.typography.fontWeightRegular
|
|
139
|
-
}, {
|
|
140
|
-
[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: _extends({
|
|
171
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
172
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: {
|
|
141
173
|
transformOrigin: 'right center'
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
}, ownerState.touch && {
|
|
145
|
-
marginRight: '24px'
|
|
146
|
-
}) : _extends({
|
|
147
|
-
marginLeft: '14px'
|
|
148
|
-
}, ownerState.touch && {
|
|
149
|
-
marginLeft: '24px'
|
|
150
|
-
})),
|
|
151
|
-
[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: _extends({
|
|
174
|
+
},
|
|
175
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: {
|
|
152
176
|
transformOrigin: 'left center'
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
}, ownerState.touch && {
|
|
156
|
-
marginLeft: '24px'
|
|
157
|
-
}) : _extends({
|
|
158
|
-
marginRight: '14px'
|
|
159
|
-
}, ownerState.touch && {
|
|
160
|
-
marginRight: '24px'
|
|
161
|
-
})),
|
|
162
|
-
[`.${tooltipClasses.popper}[data-popper-placement*="top"] &`]: _extends({
|
|
177
|
+
},
|
|
178
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="top"] &`]: {
|
|
163
179
|
transformOrigin: 'center bottom',
|
|
164
180
|
marginBottom: '14px'
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
[`.${tooltipClasses.popper}[data-popper-placement*="bottom"] &`]: _extends({
|
|
181
|
+
},
|
|
182
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="bottom"] &`]: {
|
|
169
183
|
transformOrigin: 'center top',
|
|
170
184
|
marginTop: '14px'
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
},
|
|
186
|
+
variants: [{
|
|
187
|
+
props: ({
|
|
188
|
+
ownerState
|
|
189
|
+
}) => ownerState.arrow,
|
|
190
|
+
style: {
|
|
191
|
+
position: 'relative',
|
|
192
|
+
margin: 0
|
|
193
|
+
}
|
|
194
|
+
}, {
|
|
195
|
+
props: ({
|
|
196
|
+
ownerState
|
|
197
|
+
}) => ownerState.touch,
|
|
198
|
+
style: {
|
|
199
|
+
padding: '8px 16px',
|
|
200
|
+
fontSize: theme.typography.pxToRem(14),
|
|
201
|
+
lineHeight: `${round(16 / 14)}em`,
|
|
202
|
+
fontWeight: theme.typography.fontWeightRegular
|
|
203
|
+
}
|
|
204
|
+
}, {
|
|
205
|
+
props: ({
|
|
206
|
+
ownerState
|
|
207
|
+
}) => !ownerState.isRtl,
|
|
208
|
+
style: {
|
|
209
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: {
|
|
210
|
+
marginRight: '14px'
|
|
211
|
+
},
|
|
212
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: {
|
|
213
|
+
marginLeft: '14px'
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
props: ({
|
|
218
|
+
ownerState
|
|
219
|
+
}) => !ownerState.isRtl && ownerState.touch,
|
|
220
|
+
style: {
|
|
221
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: {
|
|
222
|
+
marginRight: '24px'
|
|
223
|
+
},
|
|
224
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: {
|
|
225
|
+
marginLeft: '24px'
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}, {
|
|
229
|
+
props: ({
|
|
230
|
+
ownerState
|
|
231
|
+
}) => !!ownerState.isRtl,
|
|
232
|
+
style: {
|
|
233
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: {
|
|
234
|
+
marginLeft: '14px'
|
|
235
|
+
},
|
|
236
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: {
|
|
237
|
+
marginRight: '14px'
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}, {
|
|
241
|
+
props: ({
|
|
242
|
+
ownerState
|
|
243
|
+
}) => !!ownerState.isRtl && ownerState.touch,
|
|
244
|
+
style: {
|
|
245
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: {
|
|
246
|
+
marginLeft: '24px'
|
|
247
|
+
},
|
|
248
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: {
|
|
249
|
+
marginRight: '24px'
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}, {
|
|
253
|
+
props: ({
|
|
254
|
+
ownerState
|
|
255
|
+
}) => ownerState.touch,
|
|
256
|
+
style: {
|
|
257
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="top"] &`]: {
|
|
258
|
+
marginBottom: '24px'
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}, {
|
|
262
|
+
props: ({
|
|
263
|
+
ownerState
|
|
264
|
+
}) => ownerState.touch,
|
|
265
|
+
style: {
|
|
266
|
+
[`.${tooltipClasses.popper}[data-popper-placement*="bottom"] &`]: {
|
|
267
|
+
marginTop: '24px'
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}]
|
|
174
271
|
}));
|
|
175
272
|
const TooltipArrow = styled('span', {
|
|
176
273
|
name: 'MuiTooltip',
|