@mui/material 5.5.3 → 5.6.0
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/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.d.ts +20 -7
- package/Badge/Badge.js +43 -21
- package/Badge/badgeClasses.d.ts +24 -0
- package/Badge/badgeClasses.js +8 -0
- package/Badge/index.d.ts +3 -0
- package/Badge/index.js +2 -1
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.js +101 -96
- package/Button/buttonClasses.d.ts +76 -76
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +74 -0
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +80 -80
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +22 -22
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/Link.js +12 -5
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/ListItemButton.js +1 -0
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +29 -29
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/TextField.d.ts +0 -1
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/className/index.d.ts +8 -8
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Badge/Badge.js +44 -21
- package/legacy/Badge/badgeClasses.js +8 -0
- package/legacy/Badge/index.js +2 -1
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Button/Button.js +30 -29
- package/legacy/Link/Link.js +12 -4
- package/legacy/ListItemButton/ListItemButton.js +1 -0
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +115 -111
- package/legacy/styles/CssVarsProvider.js +31 -0
- package/legacy/styles/experimental_extendTheme.js +96 -0
- package/legacy/styles/index.js +3 -1
- package/locale/index.d.ts +71 -71
- package/locale/index.js +6 -3
- package/modern/Badge/Badge.js +40 -18
- package/modern/Badge/badgeClasses.js +8 -0
- package/modern/Badge/index.js +2 -1
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Button/Button.js +29 -28
- package/modern/Link/Link.js +12 -5
- package/modern/ListItemButton/ListItemButton.js +1 -0
- package/modern/index.js +1 -1
- package/modern/locale/index.js +6 -3
- package/modern/styles/CssVarsProvider.js +28 -0
- package/modern/styles/experimental_extendTheme.js +89 -0
- package/modern/styles/index.js +3 -1
- package/node/Badge/Badge.js +53 -32
- package/node/Badge/badgeClasses.js +22 -0
- package/node/Badge/index.js +17 -5
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Button/Button.js +101 -96
- package/node/Link/Link.js +13 -5
- package/node/ListItemButton/ListItemButton.js +1 -0
- package/node/index.js +1 -1
- package/node/locale/index.js +6 -3
- package/node/styles/CssVarsProvider.js +41 -0
- package/node/styles/experimental_extendTheme.js +105 -0
- package/node/styles/index.js +58 -0
- package/package.json +7 -7
- package/styles/CssVarsProvider.d.ts +28 -0
- package/styles/CssVarsProvider.js +28 -0
- package/styles/createPalette.d.ts +26 -0
- package/styles/experimental_extendTheme.d.ts +90 -0
- package/styles/experimental_extendTheme.js +91 -0
- package/styles/index.d.ts +5 -0
- package/styles/index.js +3 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +1075 -258
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
package/Badge/Badge.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["anchorOrigin", "component", "components", "componentsProps", "overlap", "color", "invisible", "badgeContent", "showZero", "variant"];
|
|
3
|
+
const _excluded = ["anchorOrigin", "className", "component", "components", "componentsProps", "overlap", "color", "invisible", "max", "badgeContent", "showZero", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { usePreviousProps } from '@mui/utils';
|
|
8
|
-
import
|
|
9
|
-
import BadgeUnstyled, { badgeUnstyledClasses, getBadgeUtilityClass } from '@mui/base/BadgeUnstyled';
|
|
8
|
+
import BadgeUnstyled from '@mui/base/BadgeUnstyled';
|
|
10
9
|
import styled from '../styles/styled';
|
|
11
10
|
import useThemeProps from '../styles/useThemeProps';
|
|
12
11
|
import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
|
|
13
12
|
import capitalize from '../utils/capitalize';
|
|
13
|
+
import badgeClasses, { getBadgeUtilityClass } from './badgeClasses';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
export const badgeClasses = _extends({}, badgeUnstyledClasses, generateUtilityClasses('MuiBadge', ['colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular', // TODO: v6 remove the overlap value from these class keys
|
|
16
|
-
'anchorOriginTopLeftCircular', 'anchorOriginTopLeftRectangular', 'anchorOriginTopRightCircular', 'anchorOriginTopRightRectangular', 'anchorOriginBottomLeftCircular', 'anchorOriginBottomLeftRectangular', 'anchorOriginBottomRightCircular', 'anchorOriginBottomRightRectangular']));
|
|
17
15
|
const RADIUS_STANDARD = 10;
|
|
18
16
|
const RADIUS_DOT = 4;
|
|
19
17
|
|
|
@@ -21,12 +19,15 @@ const extendUtilityClasses = ownerState => {
|
|
|
21
19
|
const {
|
|
22
20
|
color,
|
|
23
21
|
anchorOrigin,
|
|
22
|
+
invisible,
|
|
24
23
|
overlap,
|
|
24
|
+
variant,
|
|
25
25
|
classes = {}
|
|
26
26
|
} = ownerState;
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
return {
|
|
28
|
+
root: clsx(classes.root, 'root'),
|
|
29
|
+
badge: clsx(classes.badge, getBadgeUtilityClass('badge'), getBadgeUtilityClass(variant), `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}`, getBadgeUtilityClass(`anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}${capitalize(overlap)}`), getBadgeUtilityClass(`overlap${capitalize(overlap)}`), color !== 'default' && [getBadgeUtilityClass(`color${capitalize(color)}`), classes[`color${capitalize(color)}`]], invisible && getBadgeUtilityClass('invisible'))
|
|
30
|
+
};
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
const BadgeRoot = styled('span', {
|
|
@@ -154,7 +155,7 @@ const BadgeBadge = styled('span', {
|
|
|
154
155
|
})
|
|
155
156
|
}));
|
|
156
157
|
const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
157
|
-
var _componentsProps$root, _componentsProps$badg;
|
|
158
|
+
var _componentsProps$root, _componentsProps$root2, _componentsProps$badg, _componentsProps$badg2;
|
|
158
159
|
|
|
159
160
|
const props = useThemeProps({
|
|
160
161
|
props: inProps,
|
|
@@ -166,12 +167,14 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
166
167
|
vertical: 'top',
|
|
167
168
|
horizontal: 'right'
|
|
168
169
|
},
|
|
170
|
+
className,
|
|
169
171
|
component = 'span',
|
|
170
172
|
components = {},
|
|
171
173
|
componentsProps = {},
|
|
172
174
|
overlap: overlapProp = 'rectangular',
|
|
173
175
|
color: colorProp = 'default',
|
|
174
176
|
invisible: invisibleProp = false,
|
|
177
|
+
max,
|
|
175
178
|
badgeContent: badgeContentProp,
|
|
176
179
|
showZero = false,
|
|
177
180
|
variant: variantProp = 'standard'
|
|
@@ -181,7 +184,8 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
181
184
|
const prevProps = usePreviousProps({
|
|
182
185
|
anchorOrigin: anchorOriginProp,
|
|
183
186
|
color: colorProp,
|
|
184
|
-
overlap: overlapProp
|
|
187
|
+
overlap: overlapProp,
|
|
188
|
+
variant: variantProp
|
|
185
189
|
});
|
|
186
190
|
let invisible = invisibleProp;
|
|
187
191
|
|
|
@@ -192,44 +196,57 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
192
196
|
const {
|
|
193
197
|
color = colorProp,
|
|
194
198
|
overlap = overlapProp,
|
|
195
|
-
anchorOrigin = anchorOriginProp
|
|
199
|
+
anchorOrigin = anchorOriginProp,
|
|
200
|
+
variant = variantProp
|
|
196
201
|
} = invisible ? prevProps : props;
|
|
197
202
|
|
|
198
203
|
const ownerState = _extends({}, props, {
|
|
199
204
|
anchorOrigin,
|
|
200
205
|
invisible,
|
|
201
206
|
color,
|
|
202
|
-
overlap
|
|
207
|
+
overlap,
|
|
208
|
+
variant
|
|
203
209
|
});
|
|
204
210
|
|
|
205
211
|
const classes = extendUtilityClasses(ownerState);
|
|
212
|
+
let displayValue;
|
|
213
|
+
|
|
214
|
+
if (variant !== 'dot') {
|
|
215
|
+
displayValue = badgeContentProp && Number(badgeContentProp) > max ? `${max}+` : badgeContentProp;
|
|
216
|
+
}
|
|
217
|
+
|
|
206
218
|
return /*#__PURE__*/_jsx(BadgeUnstyled, _extends({
|
|
207
|
-
anchorOrigin: anchorOrigin,
|
|
208
219
|
invisible: invisibleProp,
|
|
209
|
-
badgeContent:
|
|
220
|
+
badgeContent: displayValue,
|
|
210
221
|
showZero: showZero,
|
|
211
|
-
|
|
222
|
+
max: max
|
|
212
223
|
}, other, {
|
|
213
224
|
components: _extends({
|
|
214
225
|
Root: BadgeRoot,
|
|
215
226
|
Badge: BadgeBadge
|
|
216
227
|
}, components),
|
|
228
|
+
className: clsx(className, classes.root, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className),
|
|
217
229
|
componentsProps: {
|
|
218
230
|
root: _extends({}, componentsProps.root, shouldSpreadAdditionalProps(components.Root) && {
|
|
219
231
|
as: component,
|
|
220
|
-
ownerState: _extends({}, (_componentsProps$
|
|
232
|
+
ownerState: _extends({}, (_componentsProps$root2 = componentsProps.root) == null ? void 0 : _componentsProps$root2.ownerState, {
|
|
233
|
+
anchorOrigin,
|
|
221
234
|
color,
|
|
222
|
-
overlap
|
|
235
|
+
overlap,
|
|
236
|
+
variant
|
|
223
237
|
})
|
|
224
238
|
}),
|
|
225
|
-
badge: _extends({}, componentsProps.badge,
|
|
226
|
-
|
|
239
|
+
badge: _extends({}, componentsProps.badge, {
|
|
240
|
+
className: clsx(classes.badge, (_componentsProps$badg = componentsProps.badge) == null ? void 0 : _componentsProps$badg.className)
|
|
241
|
+
}, shouldSpreadAdditionalProps(components.Badge) && {
|
|
242
|
+
ownerState: _extends({}, (_componentsProps$badg2 = componentsProps.badge) == null ? void 0 : _componentsProps$badg2.ownerState, {
|
|
243
|
+
anchorOrigin,
|
|
227
244
|
color,
|
|
228
|
-
overlap
|
|
245
|
+
overlap,
|
|
246
|
+
variant
|
|
229
247
|
})
|
|
230
248
|
})
|
|
231
249
|
},
|
|
232
|
-
classes: classes,
|
|
233
250
|
ref: ref
|
|
234
251
|
}));
|
|
235
252
|
});
|
|
@@ -268,6 +285,11 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
268
285
|
*/
|
|
269
286
|
classes: PropTypes.object,
|
|
270
287
|
|
|
288
|
+
/**
|
|
289
|
+
* @ignore
|
|
290
|
+
*/
|
|
291
|
+
className: PropTypes.string,
|
|
292
|
+
|
|
271
293
|
/**
|
|
272
294
|
* The color of the component.
|
|
273
295
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface BadgeClasses {
|
|
2
|
+
/** Class name applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Class name applied to the badge `span` element. */
|
|
5
|
+
badge: string;
|
|
6
|
+
/** Class name applied to the badge `span` element if `variant="dot"`. */
|
|
7
|
+
dot: string;
|
|
8
|
+
/** Class name applied to the badge `span` element if `variant="standard"`. */
|
|
9
|
+
standard: string;
|
|
10
|
+
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }}`. */
|
|
11
|
+
anchorOriginTopRight: string;
|
|
12
|
+
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }}`. */
|
|
13
|
+
anchorOriginBottomRight: string;
|
|
14
|
+
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }}`. */
|
|
15
|
+
anchorOriginTopLeft: string;
|
|
16
|
+
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }}`. */
|
|
17
|
+
anchorOriginBottomLeft: string;
|
|
18
|
+
/** State class applied to the badge `span` element if `invisible={true}`. */
|
|
19
|
+
invisible: string;
|
|
20
|
+
}
|
|
21
|
+
export declare type BadgeClassKey = keyof BadgeClasses;
|
|
22
|
+
export declare function getBadgeUtilityClass(slot: string): string;
|
|
23
|
+
declare const badgeClasses: BadgeClasses;
|
|
24
|
+
export default badgeClasses;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import generateUtilityClasses from '@mui/base/generateUtilityClasses';
|
|
2
|
+
import generateUtilityClass from '@mui/base/generateUtilityClass';
|
|
3
|
+
export function getBadgeUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiBadge', slot);
|
|
5
|
+
}
|
|
6
|
+
const badgeClasses = generateUtilityClasses('MuiBadge', ['root', 'badge', 'dot', 'standard', 'anchorOriginTopRight', 'anchorOriginBottomRight', 'anchorOriginTopLeft', 'anchorOriginBottomLeft', 'invisible', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular', // TODO: v6 remove the overlap value from these class keys
|
|
7
|
+
'anchorOriginTopLeftCircular', 'anchorOriginTopLeftRectangular', 'anchorOriginTopRightCircular', 'anchorOriginTopRightRectangular', 'anchorOriginBottomLeftCircular', 'anchorOriginBottomLeftRectangular', 'anchorOriginBottomRightCircular', 'anchorOriginBottomRightRectangular']);
|
|
8
|
+
export default badgeClasses;
|
package/Badge/index.d.ts
CHANGED
package/Badge/index.js
CHANGED
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface BottomNavigationClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
}
|
|
5
|
-
export declare type BottomNavigationClassKey = keyof BottomNavigationClasses;
|
|
6
|
-
export declare function getBottomNavigationUtilityClass(slot: string): string;
|
|
7
|
-
declare const bottomNavigationClasses: BottomNavigationClasses;
|
|
8
|
-
export default bottomNavigationClasses;
|
|
1
|
+
export interface BottomNavigationClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type BottomNavigationClassKey = keyof BottomNavigationClasses;
|
|
6
|
+
export declare function getBottomNavigationUtilityClass(slot: string): string;
|
|
7
|
+
declare const bottomNavigationClasses: BottomNavigationClasses;
|
|
8
|
+
export default bottomNavigationClasses;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export interface BottomNavigationActionClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
/** State class applied to the root element if selected. */
|
|
5
|
-
selected: string;
|
|
6
|
-
/** State class applied to the root element if `showLabel={false}` and not selected. */
|
|
7
|
-
iconOnly: string;
|
|
8
|
-
/** Styles applied to the label's span element. */
|
|
9
|
-
label: string;
|
|
10
|
-
}
|
|
11
|
-
export declare type BottomNavigationActionClassKey = keyof BottomNavigationActionClasses;
|
|
12
|
-
export declare function getBottomNavigationActionUtilityClass(slot: string): string;
|
|
13
|
-
declare const bottomNavigationActionClasses: BottomNavigationActionClasses;
|
|
14
|
-
export default bottomNavigationActionClasses;
|
|
1
|
+
export interface BottomNavigationActionClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** State class applied to the root element if selected. */
|
|
5
|
+
selected: string;
|
|
6
|
+
/** State class applied to the root element if `showLabel={false}` and not selected. */
|
|
7
|
+
iconOnly: string;
|
|
8
|
+
/** Styles applied to the label's span element. */
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
export declare type BottomNavigationActionClassKey = keyof BottomNavigationActionClasses;
|
|
12
|
+
export declare function getBottomNavigationActionUtilityClass(slot: string): string;
|
|
13
|
+
declare const bottomNavigationActionClasses: BottomNavigationActionClasses;
|
|
14
|
+
export default bottomNavigationActionClasses;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export interface BreadcrumbsClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
/** Styles applied to the ol element. */
|
|
5
|
-
ol: string;
|
|
6
|
-
/** Styles applied to the li element. */
|
|
7
|
-
li: string;
|
|
8
|
-
/** Styles applied to the separator element. */
|
|
9
|
-
separator: string;
|
|
10
|
-
}
|
|
11
|
-
export declare type BreadcrumbsClassKey = keyof BreadcrumbsClasses;
|
|
12
|
-
export declare function getBreadcrumbsUtilityClass(slot: string): string;
|
|
13
|
-
declare const breadcrumbsClasses: BreadcrumbsClasses;
|
|
14
|
-
export default breadcrumbsClasses;
|
|
1
|
+
export interface BreadcrumbsClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the ol element. */
|
|
5
|
+
ol: string;
|
|
6
|
+
/** Styles applied to the li element. */
|
|
7
|
+
li: string;
|
|
8
|
+
/** Styles applied to the separator element. */
|
|
9
|
+
separator: string;
|
|
10
|
+
}
|
|
11
|
+
export declare type BreadcrumbsClassKey = keyof BreadcrumbsClasses;
|
|
12
|
+
export declare function getBreadcrumbsUtilityClass(slot: string): string;
|
|
13
|
+
declare const breadcrumbsClasses: BreadcrumbsClasses;
|
|
14
|
+
export default breadcrumbsClasses;
|
package/Button/Button.js
CHANGED
|
@@ -62,106 +62,111 @@ const ButtonRoot = styled(ButtonBase, {
|
|
|
62
62
|
})(({
|
|
63
63
|
theme,
|
|
64
64
|
ownerState
|
|
65
|
-
}) =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
backgroundColor:
|
|
78
|
-
|
|
65
|
+
}) => {
|
|
66
|
+
var _theme$palette$getCon, _theme$palette;
|
|
67
|
+
|
|
68
|
+
return _extends({}, theme.typography.button, {
|
|
69
|
+
minWidth: 64,
|
|
70
|
+
padding: '6px 16px',
|
|
71
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
72
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
|
|
73
|
+
duration: theme.transitions.duration.short
|
|
74
|
+
}),
|
|
75
|
+
'&:hover': _extends({
|
|
76
|
+
textDecoration: 'none',
|
|
77
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
|
|
78
|
+
// Reset on touch devices, it doesn't add specificity
|
|
79
|
+
'@media (hover: none)': {
|
|
80
|
+
backgroundColor: 'transparent'
|
|
81
|
+
}
|
|
82
|
+
}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
83
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
84
|
+
// Reset on touch devices, it doesn't add specificity
|
|
85
|
+
'@media (hover: none)': {
|
|
86
|
+
backgroundColor: 'transparent'
|
|
87
|
+
}
|
|
88
|
+
}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
|
|
89
|
+
border: `1px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
|
|
90
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
91
|
+
// Reset on touch devices, it doesn't add specificity
|
|
92
|
+
'@media (hover: none)': {
|
|
93
|
+
backgroundColor: 'transparent'
|
|
94
|
+
}
|
|
95
|
+
}, ownerState.variant === 'contained' && {
|
|
96
|
+
backgroundColor: (theme.vars || theme).palette.grey.A100,
|
|
97
|
+
boxShadow: (theme.vars || theme).shadows[4],
|
|
98
|
+
// Reset on touch devices, it doesn't add specificity
|
|
99
|
+
'@media (hover: none)': {
|
|
100
|
+
boxShadow: (theme.vars || theme).shadows[2],
|
|
101
|
+
backgroundColor: (theme.vars || theme).palette.grey[300]
|
|
102
|
+
}
|
|
103
|
+
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
104
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
|
|
105
|
+
// Reset on touch devices, it doesn't add specificity
|
|
106
|
+
'@media (hover: none)': {
|
|
107
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
108
|
+
}
|
|
109
|
+
}),
|
|
110
|
+
'&:active': _extends({}, ownerState.variant === 'contained' && {
|
|
111
|
+
boxShadow: (theme.vars || theme).shadows[8]
|
|
112
|
+
}),
|
|
113
|
+
[`&.${buttonClasses.focusVisible}`]: _extends({}, ownerState.variant === 'contained' && {
|
|
114
|
+
boxShadow: (theme.vars || theme).shadows[6]
|
|
115
|
+
}),
|
|
116
|
+
[`&.${buttonClasses.disabled}`]: _extends({
|
|
117
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
118
|
+
}, ownerState.variant === 'outlined' && {
|
|
119
|
+
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
120
|
+
}, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
|
|
121
|
+
border: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
122
|
+
}, ownerState.variant === 'contained' && {
|
|
123
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
124
|
+
boxShadow: (theme.vars || theme).shadows[0],
|
|
125
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
126
|
+
})
|
|
127
|
+
}, ownerState.variant === 'text' && {
|
|
128
|
+
padding: '6px 8px'
|
|
79
129
|
}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
130
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
131
|
+
}, ownerState.variant === 'outlined' && {
|
|
132
|
+
padding: '5px 15px',
|
|
133
|
+
border: '1px solid currentColor'
|
|
85
134
|
}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
// Reset on touch devices, it doesn't add specificity
|
|
89
|
-
'@media (hover: none)': {
|
|
90
|
-
backgroundColor: 'transparent'
|
|
91
|
-
}
|
|
135
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
136
|
+
border: theme.vars ? `1px solid rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : `1px solid ${alpha(theme.palette[ownerState.color].main, 0.5)}`
|
|
92
137
|
}, ownerState.variant === 'contained' && {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
boxShadow: theme.shadows[2],
|
|
98
|
-
backgroundColor: theme.palette.grey[300]
|
|
99
|
-
}
|
|
138
|
+
color: theme.vars ? // this is safe because grey does not change between default light/dark mode
|
|
139
|
+
theme.vars.palette.text.primary : (_theme$palette$getCon = (_theme$palette = theme.palette).getContrastText) == null ? void 0 : _theme$palette$getCon.call(_theme$palette, theme.palette.grey[300]),
|
|
140
|
+
backgroundColor: (theme.vars || theme).palette.grey[300],
|
|
141
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
100
142
|
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}, ownerState.variant === 'outlined' && {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}, ownerState.
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
}, ownerState.variant === 'outlined' && {
|
|
129
|
-
padding: '5px 15px',
|
|
130
|
-
border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`
|
|
131
|
-
}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
|
|
132
|
-
color: theme.palette[ownerState.color].main,
|
|
133
|
-
border: `1px solid ${alpha(theme.palette[ownerState.color].main, 0.5)}`
|
|
134
|
-
}, ownerState.variant === 'contained' && {
|
|
135
|
-
color: theme.palette.getContrastText(theme.palette.grey[300]),
|
|
136
|
-
backgroundColor: theme.palette.grey[300],
|
|
137
|
-
boxShadow: theme.shadows[2]
|
|
138
|
-
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
139
|
-
color: theme.palette[ownerState.color].contrastText,
|
|
140
|
-
backgroundColor: theme.palette[ownerState.color].main
|
|
141
|
-
}, ownerState.color === 'inherit' && {
|
|
142
|
-
color: 'inherit',
|
|
143
|
-
borderColor: 'currentColor'
|
|
144
|
-
}, ownerState.size === 'small' && ownerState.variant === 'text' && {
|
|
145
|
-
padding: '4px 5px',
|
|
146
|
-
fontSize: theme.typography.pxToRem(13)
|
|
147
|
-
}, ownerState.size === 'large' && ownerState.variant === 'text' && {
|
|
148
|
-
padding: '8px 11px',
|
|
149
|
-
fontSize: theme.typography.pxToRem(15)
|
|
150
|
-
}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
|
|
151
|
-
padding: '3px 9px',
|
|
152
|
-
fontSize: theme.typography.pxToRem(13)
|
|
153
|
-
}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
|
|
154
|
-
padding: '7px 21px',
|
|
155
|
-
fontSize: theme.typography.pxToRem(15)
|
|
156
|
-
}, ownerState.size === 'small' && ownerState.variant === 'contained' && {
|
|
157
|
-
padding: '4px 10px',
|
|
158
|
-
fontSize: theme.typography.pxToRem(13)
|
|
159
|
-
}, ownerState.size === 'large' && ownerState.variant === 'contained' && {
|
|
160
|
-
padding: '8px 22px',
|
|
161
|
-
fontSize: theme.typography.pxToRem(15)
|
|
162
|
-
}, ownerState.fullWidth && {
|
|
163
|
-
width: '100%'
|
|
164
|
-
}), ({
|
|
143
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText,
|
|
144
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
145
|
+
}, ownerState.color === 'inherit' && {
|
|
146
|
+
color: 'inherit',
|
|
147
|
+
borderColor: 'currentColor'
|
|
148
|
+
}, ownerState.size === 'small' && ownerState.variant === 'text' && {
|
|
149
|
+
padding: '4px 5px',
|
|
150
|
+
fontSize: theme.typography.pxToRem(13)
|
|
151
|
+
}, ownerState.size === 'large' && ownerState.variant === 'text' && {
|
|
152
|
+
padding: '8px 11px',
|
|
153
|
+
fontSize: theme.typography.pxToRem(15)
|
|
154
|
+
}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
|
|
155
|
+
padding: '3px 9px',
|
|
156
|
+
fontSize: theme.typography.pxToRem(13)
|
|
157
|
+
}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
|
|
158
|
+
padding: '7px 21px',
|
|
159
|
+
fontSize: theme.typography.pxToRem(15)
|
|
160
|
+
}, ownerState.size === 'small' && ownerState.variant === 'contained' && {
|
|
161
|
+
padding: '4px 10px',
|
|
162
|
+
fontSize: theme.typography.pxToRem(13)
|
|
163
|
+
}, ownerState.size === 'large' && ownerState.variant === 'contained' && {
|
|
164
|
+
padding: '8px 22px',
|
|
165
|
+
fontSize: theme.typography.pxToRem(15)
|
|
166
|
+
}, ownerState.fullWidth && {
|
|
167
|
+
width: '100%'
|
|
168
|
+
});
|
|
169
|
+
}, ({
|
|
165
170
|
ownerState
|
|
166
171
|
}) => ownerState.disableElevation && {
|
|
167
172
|
boxShadow: 'none',
|