@mui/material 5.12.1 → 5.12.3
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 +71 -57
- package/Badge/Badge.d.ts +3 -6
- package/BottomNavigationAction/BottomNavigationAction.js +4 -1
- package/ButtonGroup/ButtonGroup.js +8 -2
- package/CHANGELOG.md +188 -0
- package/Chip/Chip.js +1 -1
- package/Divider/Divider.js +10 -11
- package/FormControl/FormControl.js +1 -1
- package/Input/inputClasses.d.ts +4 -0
- package/InputBase/InputBase.js +1 -1
- package/Modal/Modal.d.ts +6 -3
- package/Modal/Modal.js +11 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +1 -1
- package/OverridableComponent.d.ts +1 -1
- package/Paper/Paper.d.ts +6 -1
- package/Popper/Popper.d.ts +15 -5
- package/Popper/Popper.js +31 -6
- package/Popper/index.d.ts +1 -1
- package/Select/SelectInput.js +4 -1
- package/Slider/Slider.js +1 -1
- package/Snackbar/Snackbar.js +4 -3
- package/SwipeableDrawer/SwipeableDrawer.js +1 -1
- package/TextField/TextField.d.ts +21 -2
- package/TextField/TextField.js +7 -1
- package/index.js +1 -1
- package/legacy/ButtonGroup/ButtonGroup.js +7 -3
- package/legacy/Divider/Divider.js +17 -17
- package/legacy/Drawer/Drawer.js +4 -4
- package/legacy/FormControl/FormControl.js +1 -1
- package/legacy/InputBase/InputBase.js +1 -1
- package/legacy/ListItem/ListItem.js +4 -4
- package/legacy/Menu/Menu.js +4 -4
- package/legacy/Modal/Modal.js +11 -3
- package/legacy/Modal/index.js +1 -1
- package/legacy/Popover/Popover.js +4 -4
- package/legacy/Popper/Popper.js +32 -7
- package/legacy/Slider/Slider.js +1 -1
- package/legacy/Snackbar/Snackbar.js +16 -15
- package/legacy/SpeedDial/SpeedDial.js +8 -8
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/legacy/TextField/TextField.js +7 -1
- package/legacy/index.js +1 -1
- package/legacy/useMediaQuery/useMediaQuery.js +8 -0
- package/modern/BottomNavigationAction/BottomNavigationAction.js +4 -1
- package/modern/ButtonGroup/ButtonGroup.js +8 -2
- package/modern/Chip/Chip.js +1 -1
- package/modern/Divider/Divider.js +10 -11
- package/modern/FormControl/FormControl.js +1 -1
- package/modern/InputBase/InputBase.js +1 -1
- package/modern/Modal/Modal.js +11 -3
- package/modern/Modal/index.js +1 -1
- package/modern/Popper/Popper.js +31 -6
- package/modern/Select/SelectInput.js +4 -1
- package/modern/Slider/Slider.js +1 -1
- package/modern/Snackbar/Snackbar.js +4 -3
- package/modern/SwipeableDrawer/SwipeableDrawer.js +1 -1
- package/modern/TextField/TextField.js +7 -1
- package/modern/index.js +1 -1
- package/modern/useMediaQuery/useMediaQuery.js +8 -0
- package/node/BottomNavigationAction/BottomNavigationAction.js +4 -1
- package/node/ButtonBase/Ripple.js +1 -2
- package/node/ButtonGroup/ButtonGroup.js +8 -2
- package/node/Chip/Chip.js +1 -1
- package/node/Divider/Divider.js +10 -11
- package/node/FormControl/FormControl.js +1 -1
- package/node/Grid/Grid.js +10 -1
- package/node/Hidden/Hidden.js +2 -2
- package/node/Hidden/HiddenJs.js +1 -2
- package/node/InputBase/InputBase.js +1 -1
- package/node/Modal/Modal.js +13 -5
- package/node/Modal/index.js +15 -18
- package/node/Popper/Popper.js +31 -6
- package/node/Select/SelectInput.js +4 -1
- package/node/Slide/Slide.js +2 -3
- package/node/Slider/Slider.js +1 -1
- package/node/Snackbar/Snackbar.js +4 -3
- package/node/SpeedDialAction/SpeedDialAction.js +1 -1
- package/node/SwipeableDrawer/SwipeableDrawer.js +3 -4
- package/node/Switch/Switch.js +1 -1
- package/node/TabScrollButton/TabScrollButton.js +1 -0
- package/node/TablePagination/TablePaginationActions.js +2 -2
- package/node/TextField/TextField.js +7 -1
- package/node/ToggleButton/ToggleButton.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/index.js +5 -1
- package/node/useMediaQuery/useMediaQuery.js +12 -0
- package/node/utils/createSvgIcon.js +1 -2
- package/package.json +5 -5
- package/umd/material-ui.development.js +164 -103
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.js +8 -0
package/Popper/Popper.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PopperProps as BasePopperProps } from '@mui/base/Popper';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Theme } from '../styles';
|
|
5
|
-
export type PopperProps = Omit<
|
|
5
|
+
export type PopperProps = Omit<BasePopperProps, 'direction'> & {
|
|
6
|
+
/**
|
|
7
|
+
* The component used for the root node.
|
|
8
|
+
* Either a string to use a HTML element or a component.
|
|
9
|
+
*/
|
|
10
|
+
component?: React.ElementType;
|
|
6
11
|
/**
|
|
7
12
|
* The components used for each slot inside the Popper.
|
|
8
13
|
* Either a string to use a HTML element or a component.
|
|
@@ -15,7 +20,7 @@ export type PopperProps = Omit<PopperUnstyledProps, 'direction'> & {
|
|
|
15
20
|
* The props used for each slot inside the Popper.
|
|
16
21
|
* @default {}
|
|
17
22
|
*/
|
|
18
|
-
componentsProps?:
|
|
23
|
+
componentsProps?: BasePopperProps['slotProps'];
|
|
19
24
|
/**
|
|
20
25
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21
26
|
*/
|
|
@@ -33,7 +38,12 @@ export type PopperProps = Omit<PopperUnstyledProps, 'direction'> & {
|
|
|
33
38
|
*
|
|
34
39
|
* - [Popper API](https://mui.com/material-ui/api/popper/)
|
|
35
40
|
*/
|
|
36
|
-
declare const Popper: React.ForwardRefExoticComponent<Omit<
|
|
41
|
+
declare const Popper: React.ForwardRefExoticComponent<Omit<BasePopperProps<"div">, "direction"> & {
|
|
42
|
+
/**
|
|
43
|
+
* The component used for the root node.
|
|
44
|
+
* Either a string to use a HTML element or a component.
|
|
45
|
+
*/
|
|
46
|
+
component?: React.ElementType<any> | undefined;
|
|
37
47
|
/**
|
|
38
48
|
* The components used for each slot inside the Popper.
|
|
39
49
|
* Either a string to use a HTML element or a component.
|
|
@@ -46,7 +56,7 @@ declare const Popper: React.ForwardRefExoticComponent<Omit<PopperUnstyledProps<"
|
|
|
46
56
|
* The props used for each slot inside the Popper.
|
|
47
57
|
* @default {}
|
|
48
58
|
*/
|
|
49
|
-
componentsProps?:
|
|
59
|
+
componentsProps?: BasePopperProps['slotProps'];
|
|
50
60
|
/**
|
|
51
61
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
52
62
|
*/
|
package/Popper/Popper.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["components", "componentsProps", "slots", "slotProps"];
|
|
4
|
-
import
|
|
3
|
+
const _excluded = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"];
|
|
4
|
+
import BasePopper from '@mui/base/Popper';
|
|
5
5
|
import { useThemeWithoutDefault as useTheme } from '@mui/system';
|
|
6
6
|
import { HTMLElementType, refType } from '@mui/utils';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { styled, useThemeProps } from '../styles';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const PopperRoot = styled(
|
|
11
|
+
const PopperRoot = styled(BasePopper, {
|
|
12
12
|
name: 'MuiPopper',
|
|
13
13
|
slot: 'Root',
|
|
14
14
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -34,20 +34,44 @@ const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
|
|
|
34
34
|
name: 'MuiPopper'
|
|
35
35
|
});
|
|
36
36
|
const {
|
|
37
|
+
anchorEl,
|
|
38
|
+
component,
|
|
37
39
|
components,
|
|
38
40
|
componentsProps,
|
|
41
|
+
container,
|
|
42
|
+
disablePortal,
|
|
43
|
+
keepMounted,
|
|
44
|
+
modifiers,
|
|
45
|
+
open,
|
|
46
|
+
placement,
|
|
47
|
+
popperOptions,
|
|
48
|
+
popperRef,
|
|
49
|
+
transition,
|
|
39
50
|
slots,
|
|
40
51
|
slotProps
|
|
41
52
|
} = props,
|
|
42
53
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
43
54
|
const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;
|
|
55
|
+
const otherProps = _extends({
|
|
56
|
+
anchorEl,
|
|
57
|
+
container,
|
|
58
|
+
disablePortal,
|
|
59
|
+
keepMounted,
|
|
60
|
+
modifiers,
|
|
61
|
+
open,
|
|
62
|
+
placement,
|
|
63
|
+
popperOptions,
|
|
64
|
+
popperRef,
|
|
65
|
+
transition
|
|
66
|
+
}, other);
|
|
44
67
|
return /*#__PURE__*/_jsx(PopperRoot, _extends({
|
|
68
|
+
as: component,
|
|
45
69
|
direction: theme == null ? void 0 : theme.direction,
|
|
46
70
|
slots: {
|
|
47
71
|
root: RootComponent
|
|
48
72
|
},
|
|
49
73
|
slotProps: slotProps != null ? slotProps : componentsProps
|
|
50
|
-
},
|
|
74
|
+
}, otherProps, {
|
|
51
75
|
ref: ref
|
|
52
76
|
}));
|
|
53
77
|
});
|
|
@@ -68,9 +92,10 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
|
|
|
68
92
|
*/
|
|
69
93
|
children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),
|
|
70
94
|
/**
|
|
71
|
-
*
|
|
95
|
+
* The component used for the root node.
|
|
96
|
+
* Either a string to use a HTML element or a component.
|
|
72
97
|
*/
|
|
73
|
-
component: PropTypes
|
|
98
|
+
component: PropTypes.elementType,
|
|
74
99
|
/**
|
|
75
100
|
* The components used for each slot inside the Popper.
|
|
76
101
|
* Either a string to use a HTML element or a component.
|
package/Popper/index.d.ts
CHANGED
package/Select/SelectInput.js
CHANGED
|
@@ -134,7 +134,10 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
134
134
|
readOnly,
|
|
135
135
|
renderValue,
|
|
136
136
|
SelectDisplayProps = {},
|
|
137
|
-
tabIndex: tabIndexProp
|
|
137
|
+
tabIndex: tabIndexProp
|
|
138
|
+
// catching `type` from Input which makes no sense for SelectInput
|
|
139
|
+
,
|
|
140
|
+
|
|
138
141
|
value: valueProp,
|
|
139
142
|
variant = 'standard'
|
|
140
143
|
} = props,
|
package/Slider/Slider.js
CHANGED
|
@@ -509,7 +509,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
509
509
|
trackOffset,
|
|
510
510
|
trackLeap
|
|
511
511
|
} = useSlider(_extends({}, ownerState, {
|
|
512
|
-
ref
|
|
512
|
+
rootRef: ref
|
|
513
513
|
}));
|
|
514
514
|
ownerState.marked = marks.length > 0 && marks.some(mark => mark.label);
|
|
515
515
|
ownerState.dragging = dragging;
|
package/Snackbar/Snackbar.js
CHANGED
|
@@ -123,15 +123,16 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
123
123
|
const {
|
|
124
124
|
getRootProps,
|
|
125
125
|
onClickAway
|
|
126
|
-
} = useSnackbar(_extends({}, ownerState
|
|
127
|
-
ref
|
|
128
|
-
}));
|
|
126
|
+
} = useSnackbar(_extends({}, ownerState));
|
|
129
127
|
const [exited, setExited] = React.useState(true);
|
|
130
128
|
const rootProps = useSlotProps({
|
|
131
129
|
elementType: SnackbarRoot,
|
|
132
130
|
getSlotProps: getRootProps,
|
|
133
131
|
externalForwardedProps: other,
|
|
134
132
|
ownerState,
|
|
133
|
+
additionalProps: {
|
|
134
|
+
ref
|
|
135
|
+
},
|
|
135
136
|
className: [classes.root, className]
|
|
136
137
|
});
|
|
137
138
|
const handleExited = node => {
|
|
@@ -145,7 +145,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
145
145
|
SwipeAreaProps,
|
|
146
146
|
swipeAreaWidth = 20,
|
|
147
147
|
transitionDuration = transitionDurationDefault,
|
|
148
|
-
variant = 'temporary'
|
|
148
|
+
variant = 'temporary' // Mobile first.
|
|
149
149
|
} = props,
|
|
150
150
|
ModalPropsProp = _objectWithoutPropertiesLoose(props.ModalProps, _excluded),
|
|
151
151
|
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
package/TextField/TextField.d.ts
CHANGED
|
@@ -111,6 +111,10 @@ export interface BaseTextFieldProps
|
|
|
111
111
|
name?: string;
|
|
112
112
|
onBlur?: InputBaseProps['onBlur'];
|
|
113
113
|
onFocus?: StandardInputProps['onFocus'];
|
|
114
|
+
/**
|
|
115
|
+
* @ignore
|
|
116
|
+
*/
|
|
117
|
+
onClick?: InputBaseProps['onClick'];
|
|
114
118
|
/**
|
|
115
119
|
* The short hint displayed in the `input` before the user enters a value.
|
|
116
120
|
*/
|
|
@@ -226,7 +230,14 @@ export interface OutlinedTextFieldProps extends BaseTextFieldProps {
|
|
|
226
230
|
InputProps?: Partial<OutlinedInputProps>;
|
|
227
231
|
}
|
|
228
232
|
|
|
229
|
-
export type
|
|
233
|
+
export type TextFieldVariants = 'outlined' | 'standard' | 'filled';
|
|
234
|
+
|
|
235
|
+
export type TextFieldProps<Variant extends TextFieldVariants = TextFieldVariants> =
|
|
236
|
+
Variant extends 'filled'
|
|
237
|
+
? FilledTextFieldProps
|
|
238
|
+
: Variant extends 'standard'
|
|
239
|
+
? StandardTextFieldProps
|
|
240
|
+
: OutlinedTextFieldProps;
|
|
230
241
|
|
|
231
242
|
/**
|
|
232
243
|
* The `TextField` is a convenience wrapper for the most common cases (80%).
|
|
@@ -270,4 +281,12 @@ export type TextFieldProps = StandardTextFieldProps | FilledTextFieldProps | Out
|
|
|
270
281
|
* - [TextField API](https://mui.com/material-ui/api/text-field/)
|
|
271
282
|
* - inherits [FormControl API](https://mui.com/material-ui/api/form-control/)
|
|
272
283
|
*/
|
|
273
|
-
export default function TextField
|
|
284
|
+
export default function TextField<Variant extends TextFieldVariants>(
|
|
285
|
+
props: {
|
|
286
|
+
/**
|
|
287
|
+
* The variant to use.
|
|
288
|
+
* @default 'outlined'
|
|
289
|
+
*/
|
|
290
|
+
variant?: Variant;
|
|
291
|
+
} & Omit<TextFieldProps, 'variant'>,
|
|
292
|
+
): JSX.Element;
|
package/TextField/TextField.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"];
|
|
3
|
+
const _excluded = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -99,6 +99,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
99
99
|
name,
|
|
100
100
|
onBlur,
|
|
101
101
|
onChange,
|
|
102
|
+
onClick,
|
|
102
103
|
onFocus,
|
|
103
104
|
placeholder,
|
|
104
105
|
required = false,
|
|
@@ -163,6 +164,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
163
164
|
onBlur: onBlur,
|
|
164
165
|
onChange: onChange,
|
|
165
166
|
onFocus: onFocus,
|
|
167
|
+
onClick: onClick,
|
|
166
168
|
placeholder: placeholder,
|
|
167
169
|
inputProps: inputProps
|
|
168
170
|
}, InputMore, InputProps));
|
|
@@ -321,6 +323,10 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
321
323
|
* You can pull out the new value by accessing `event.target.value` (string).
|
|
322
324
|
*/
|
|
323
325
|
onChange: PropTypes.func,
|
|
326
|
+
/**
|
|
327
|
+
* @ignore
|
|
328
|
+
*/
|
|
329
|
+
onClick: PropTypes.func,
|
|
324
330
|
/**
|
|
325
331
|
* @ignore
|
|
326
332
|
*/
|
package/index.js
CHANGED
|
@@ -67,11 +67,15 @@ var ButtonGroupRoot = styled('div', {
|
|
|
67
67
|
}, ownerState.orientation === 'vertical' && {
|
|
68
68
|
borderBottomRightRadius: 0,
|
|
69
69
|
borderBottomLeftRadius: 0
|
|
70
|
-
}, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && {
|
|
70
|
+
}, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && _defineProperty({
|
|
71
71
|
borderRight: theme.vars ? "1px solid rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : "1px solid ".concat(theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')
|
|
72
|
-
},
|
|
72
|
+
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
73
|
+
borderRight: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
74
|
+
}), ownerState.variant === 'text' && ownerState.orientation === 'vertical' && _defineProperty({
|
|
73
75
|
borderBottom: theme.vars ? "1px solid rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : "1px solid ".concat(theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')
|
|
74
|
-
},
|
|
76
|
+
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
77
|
+
borderBottom: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
78
|
+
}), ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
75
79
|
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.5)") : alpha(theme.palette[ownerState.color].main, 0.5)
|
|
76
80
|
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
77
81
|
borderRightColor: 'transparent'
|
|
@@ -66,38 +66,38 @@ var DividerRoot = styled('div', {
|
|
|
66
66
|
height: 'auto'
|
|
67
67
|
});
|
|
68
68
|
}, function (_ref2) {
|
|
69
|
-
var
|
|
70
|
-
ownerState = _ref2.ownerState;
|
|
69
|
+
var ownerState = _ref2.ownerState;
|
|
71
70
|
return _extends({}, ownerState.children && {
|
|
72
71
|
display: 'flex',
|
|
73
72
|
whiteSpace: 'nowrap',
|
|
74
73
|
textAlign: 'center',
|
|
75
74
|
border: 0,
|
|
76
75
|
'&::before, &::after': {
|
|
77
|
-
position: 'relative',
|
|
78
|
-
width: '100%',
|
|
79
|
-
borderTop: "thin solid ".concat((theme.vars || theme).palette.divider),
|
|
80
|
-
top: '50%',
|
|
81
76
|
content: '""',
|
|
82
|
-
|
|
77
|
+
alignSelf: 'center'
|
|
83
78
|
}
|
|
84
79
|
});
|
|
85
80
|
}, function (_ref3) {
|
|
86
81
|
var theme = _ref3.theme,
|
|
87
82
|
ownerState = _ref3.ownerState;
|
|
83
|
+
return _extends({}, ownerState.children && ownerState.orientation !== 'vertical' && {
|
|
84
|
+
'&::before, &::after': {
|
|
85
|
+
width: '100%',
|
|
86
|
+
borderTop: "thin solid ".concat((theme.vars || theme).palette.divider)
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}, function (_ref4) {
|
|
90
|
+
var theme = _ref4.theme,
|
|
91
|
+
ownerState = _ref4.ownerState;
|
|
88
92
|
return _extends({}, ownerState.children && ownerState.orientation === 'vertical' && {
|
|
89
93
|
flexDirection: 'column',
|
|
90
94
|
'&::before, &::after': {
|
|
91
95
|
height: '100%',
|
|
92
|
-
|
|
93
|
-
left: '50%',
|
|
94
|
-
borderTop: 0,
|
|
95
|
-
borderLeft: "thin solid ".concat((theme.vars || theme).palette.divider),
|
|
96
|
-
transform: 'translateX(0%)'
|
|
96
|
+
borderLeft: "thin solid ".concat((theme.vars || theme).palette.divider)
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
}, function (
|
|
100
|
-
var ownerState =
|
|
99
|
+
}, function (_ref5) {
|
|
100
|
+
var ownerState = _ref5.ownerState;
|
|
101
101
|
return _extends({}, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && {
|
|
102
102
|
'&::before': {
|
|
103
103
|
width: '90%'
|
|
@@ -121,9 +121,9 @@ var DividerWrapper = styled('span', {
|
|
|
121
121
|
var ownerState = props.ownerState;
|
|
122
122
|
return [styles.wrapper, ownerState.orientation === 'vertical' && styles.wrapperVertical];
|
|
123
123
|
}
|
|
124
|
-
})(function (
|
|
125
|
-
var theme =
|
|
126
|
-
ownerState =
|
|
124
|
+
})(function (_ref6) {
|
|
125
|
+
var theme = _ref6.theme,
|
|
126
|
+
ownerState = _ref6.ownerState;
|
|
127
127
|
return _extends({
|
|
128
128
|
display: 'inline-block',
|
|
129
129
|
paddingLeft: "calc(".concat(theme.spacing(1), " * 1.2)"),
|
package/legacy/Drawer/Drawer.js
CHANGED
|
@@ -138,10 +138,10 @@ var Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) {
|
|
|
138
138
|
elevation = _props$elevation === void 0 ? 16 : _props$elevation,
|
|
139
139
|
_props$hideBackdrop = props.hideBackdrop,
|
|
140
140
|
hideBackdrop = _props$hideBackdrop === void 0 ? false : _props$hideBackdrop,
|
|
141
|
-
_props$ModalProps = props.ModalProps
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
ModalProps = _objectWithoutProperties(_props$
|
|
141
|
+
_props$ModalProps = props.ModalProps,
|
|
142
|
+
_props$ModalProps2 = _props$ModalProps === void 0 ? {} : _props$ModalProps,
|
|
143
|
+
BackdropPropsProp = _props$ModalProps2.BackdropProps,
|
|
144
|
+
ModalProps = _objectWithoutProperties(_props$ModalProps2, ["BackdropProps"]),
|
|
145
145
|
onClose = props.onClose,
|
|
146
146
|
_props$open = props.open,
|
|
147
147
|
open = _props$open === void 0 ? false : _props$open,
|
|
@@ -145,7 +145,7 @@ var FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, re
|
|
|
145
145
|
if (!isMuiElement(child, ['Input', 'Select'])) {
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
-
if (isFilled(child.props, true)) {
|
|
148
|
+
if (isFilled(child.props, true) || isFilled(child.props.inputProps, true)) {
|
|
149
149
|
initialFilled = true;
|
|
150
150
|
}
|
|
151
151
|
});
|
|
@@ -375,7 +375,7 @@ var InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
|
|
|
375
375
|
if (inputRef.current && event.currentTarget === event.target) {
|
|
376
376
|
inputRef.current.focus();
|
|
377
377
|
}
|
|
378
|
-
if (onClick) {
|
|
378
|
+
if (onClick && !fcs.disabled) {
|
|
379
379
|
onClick(event);
|
|
380
380
|
}
|
|
381
381
|
};
|
|
@@ -142,10 +142,10 @@ var ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
|
|
|
142
142
|
componentsProps = _props$componentsProp === void 0 ? {} : _props$componentsProp,
|
|
143
143
|
_props$ContainerCompo = props.ContainerComponent,
|
|
144
144
|
ContainerComponent = _props$ContainerCompo === void 0 ? 'li' : _props$ContainerCompo,
|
|
145
|
-
_props$ContainerProps = props.ContainerProps
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
ContainerProps = _objectWithoutProperties(_props$
|
|
145
|
+
_props$ContainerProps = props.ContainerProps,
|
|
146
|
+
_props$ContainerProps2 = _props$ContainerProps === void 0 ? {} : _props$ContainerProps,
|
|
147
|
+
ContainerClassName = _props$ContainerProps2.className,
|
|
148
|
+
ContainerProps = _objectWithoutProperties(_props$ContainerProps2, ["className"]),
|
|
149
149
|
_props$dense = props.dense,
|
|
150
150
|
dense = _props$dense === void 0 ? false : _props$dense,
|
|
151
151
|
_props$disabled = props.disabled,
|
package/legacy/Menu/Menu.js
CHANGED
|
@@ -84,10 +84,10 @@ var Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {
|
|
|
84
84
|
PopoverClasses = props.PopoverClasses,
|
|
85
85
|
_props$transitionDura = props.transitionDuration,
|
|
86
86
|
transitionDuration = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,
|
|
87
|
-
_props$TransitionProp = props.TransitionProps
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
TransitionProps = _objectWithoutProperties(_props$
|
|
87
|
+
_props$TransitionProp = props.TransitionProps,
|
|
88
|
+
_props$TransitionProp2 = _props$TransitionProp === void 0 ? {} : _props$TransitionProp,
|
|
89
|
+
onEntering = _props$TransitionProp2.onEntering,
|
|
90
|
+
TransitionProps = _objectWithoutProperties(_props$TransitionProp2, ["onEntering"]),
|
|
91
91
|
_props$variant = props.variant,
|
|
92
92
|
variant = _props$variant === void 0 ? 'selectedMenu' : _props$variant,
|
|
93
93
|
other = _objectWithoutProperties(props, ["autoFocus", "children", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant"]);
|
package/legacy/Modal/Modal.js
CHANGED
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/
|
|
6
|
+
import ModalUnstyled, { modalClasses as modalUnstyledClasses } from '@mui/base/Modal';
|
|
7
7
|
import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
|
|
8
8
|
import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
|
|
9
9
|
import styled from '../styles/styled';
|
|
@@ -69,6 +69,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
69
69
|
_props$closeAfterTran = props.closeAfterTransition,
|
|
70
70
|
closeAfterTransition = _props$closeAfterTran === void 0 ? false : _props$closeAfterTran,
|
|
71
71
|
children = props.children,
|
|
72
|
+
container = props.container,
|
|
72
73
|
component = props.component,
|
|
73
74
|
_props$components = props.components,
|
|
74
75
|
components = _props$components === void 0 ? {} : _props$components,
|
|
@@ -90,14 +91,18 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
90
91
|
hideBackdrop = _props$hideBackdrop === void 0 ? false : _props$hideBackdrop,
|
|
91
92
|
_props$keepMounted = props.keepMounted,
|
|
92
93
|
keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
|
94
|
+
onBackdropClick = props.onBackdropClick,
|
|
95
|
+
onClose = props.onClose,
|
|
96
|
+
open = props.open,
|
|
93
97
|
slotProps = props.slotProps,
|
|
94
98
|
slots = props.slots,
|
|
95
99
|
theme = props.theme,
|
|
96
|
-
other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "slotProps", "slots", "theme"]);
|
|
100
|
+
other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "open", "slotProps", "slots", "theme"]);
|
|
97
101
|
var _React$useState = React.useState(true),
|
|
98
102
|
exited = _React$useState[0],
|
|
99
103
|
setExited = _React$useState[1];
|
|
100
104
|
var commonProps = {
|
|
105
|
+
container: container,
|
|
101
106
|
closeAfterTransition: closeAfterTransition,
|
|
102
107
|
disableAutoFocus: disableAutoFocus,
|
|
103
108
|
disableEnforceFocus: disableEnforceFocus,
|
|
@@ -106,7 +111,10 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
106
111
|
disableRestoreFocus: disableRestoreFocus,
|
|
107
112
|
disableScrollLock: disableScrollLock,
|
|
108
113
|
hideBackdrop: hideBackdrop,
|
|
109
|
-
keepMounted: keepMounted
|
|
114
|
+
keepMounted: keepMounted,
|
|
115
|
+
onBackdropClick: onBackdropClick,
|
|
116
|
+
onClose: onClose,
|
|
117
|
+
open: open
|
|
110
118
|
};
|
|
111
119
|
var ownerState = _extends({}, props, commonProps, {
|
|
112
120
|
exited: exited
|
package/legacy/Modal/index.js
CHANGED
|
@@ -114,10 +114,10 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
114
114
|
TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,
|
|
115
115
|
_props$transitionDura = props.transitionDuration,
|
|
116
116
|
transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,
|
|
117
|
-
_props$TransitionProp = props.TransitionProps
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
TransitionProps = _objectWithoutProperties(_props$
|
|
117
|
+
_props$TransitionProp = props.TransitionProps,
|
|
118
|
+
_props$TransitionProp2 = _props$TransitionProp === void 0 ? {} : _props$TransitionProp,
|
|
119
|
+
onEntering = _props$TransitionProp2.onEntering,
|
|
120
|
+
TransitionProps = _objectWithoutProperties(_props$TransitionProp2, ["onEntering"]),
|
|
121
121
|
other = _objectWithoutProperties(props, ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"]);
|
|
122
122
|
var paperRef = React.useRef();
|
|
123
123
|
var handlePaperRef = useForkRef(paperRef, PaperProps.ref);
|
package/legacy/Popper/Popper.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import
|
|
3
|
+
import BasePopper from '@mui/base/Popper';
|
|
4
4
|
import { useThemeWithoutDefault as useTheme } from '@mui/system';
|
|
5
5
|
import { HTMLElementType, refType } from '@mui/utils';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { styled, useThemeProps } from '../styles';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
var PopperRoot = styled(
|
|
10
|
+
var PopperRoot = styled(BasePopper, {
|
|
11
11
|
name: 'MuiPopper',
|
|
12
12
|
slot: 'Root',
|
|
13
13
|
overridesResolver: function overridesResolver(props, styles) {
|
|
@@ -34,19 +34,43 @@ var Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
|
|
|
34
34
|
props: inProps,
|
|
35
35
|
name: 'MuiPopper'
|
|
36
36
|
});
|
|
37
|
-
var
|
|
37
|
+
var anchorEl = props.anchorEl,
|
|
38
|
+
component = props.component,
|
|
39
|
+
components = props.components,
|
|
38
40
|
componentsProps = props.componentsProps,
|
|
41
|
+
container = props.container,
|
|
42
|
+
disablePortal = props.disablePortal,
|
|
43
|
+
keepMounted = props.keepMounted,
|
|
44
|
+
modifiers = props.modifiers,
|
|
45
|
+
open = props.open,
|
|
46
|
+
placement = props.placement,
|
|
47
|
+
popperOptions = props.popperOptions,
|
|
48
|
+
popperRef = props.popperRef,
|
|
49
|
+
transition = props.transition,
|
|
39
50
|
slots = props.slots,
|
|
40
51
|
slotProps = props.slotProps,
|
|
41
|
-
other = _objectWithoutProperties(props, ["components", "componentsProps", "slots", "slotProps"]);
|
|
52
|
+
other = _objectWithoutProperties(props, ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"]);
|
|
42
53
|
var RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;
|
|
54
|
+
var otherProps = _extends({
|
|
55
|
+
anchorEl: anchorEl,
|
|
56
|
+
container: container,
|
|
57
|
+
disablePortal: disablePortal,
|
|
58
|
+
keepMounted: keepMounted,
|
|
59
|
+
modifiers: modifiers,
|
|
60
|
+
open: open,
|
|
61
|
+
placement: placement,
|
|
62
|
+
popperOptions: popperOptions,
|
|
63
|
+
popperRef: popperRef,
|
|
64
|
+
transition: transition
|
|
65
|
+
}, other);
|
|
43
66
|
return /*#__PURE__*/_jsx(PopperRoot, _extends({
|
|
67
|
+
as: component,
|
|
44
68
|
direction: theme == null ? void 0 : theme.direction,
|
|
45
69
|
slots: {
|
|
46
70
|
root: RootComponent
|
|
47
71
|
},
|
|
48
72
|
slotProps: slotProps != null ? slotProps : componentsProps
|
|
49
|
-
},
|
|
73
|
+
}, otherProps, {
|
|
50
74
|
ref: ref
|
|
51
75
|
}));
|
|
52
76
|
});
|
|
@@ -67,9 +91,10 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
|
|
|
67
91
|
*/
|
|
68
92
|
children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),
|
|
69
93
|
/**
|
|
70
|
-
*
|
|
94
|
+
* The component used for the root node.
|
|
95
|
+
* Either a string to use a HTML element or a component.
|
|
71
96
|
*/
|
|
72
|
-
component: PropTypes
|
|
97
|
+
component: PropTypes.elementType,
|
|
73
98
|
/**
|
|
74
99
|
* The components used for each slot inside the Popper.
|
|
75
100
|
* Either a string to use a HTML element or a component.
|
package/legacy/Slider/Slider.js
CHANGED
|
@@ -514,7 +514,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
514
514
|
valueLabelFormat: valueLabelFormat
|
|
515
515
|
});
|
|
516
516
|
var _useSlider = useSlider(_extends({}, ownerState, {
|
|
517
|
-
|
|
517
|
+
rootRef: ref
|
|
518
518
|
})),
|
|
519
519
|
axisProps = _useSlider.axisProps,
|
|
520
520
|
getRootProps = _useSlider.getRootProps,
|
|
@@ -76,13 +76,13 @@ var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
76
76
|
exit: theme.transitions.duration.leavingScreen
|
|
77
77
|
};
|
|
78
78
|
var action = props.action,
|
|
79
|
-
_props$anchorOrigin = props.anchorOrigin
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
horizontal = _props$
|
|
79
|
+
_props$anchorOrigin = props.anchorOrigin,
|
|
80
|
+
_props$anchorOrigin2 = _props$anchorOrigin === void 0 ? {
|
|
81
|
+
vertical: 'bottom',
|
|
82
|
+
horizontal: 'left'
|
|
83
|
+
} : _props$anchorOrigin,
|
|
84
|
+
vertical = _props$anchorOrigin2.vertical,
|
|
85
|
+
horizontal = _props$anchorOrigin2.horizontal,
|
|
86
86
|
_props$autoHideDurati = props.autoHideDuration,
|
|
87
87
|
autoHideDuration = _props$autoHideDurati === void 0 ? null : _props$autoHideDurati,
|
|
88
88
|
children = props.children,
|
|
@@ -103,11 +103,11 @@ var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
103
103
|
TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,
|
|
104
104
|
_props$transitionDura = props.transitionDuration,
|
|
105
105
|
transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,
|
|
106
|
-
_props$TransitionProp = props.TransitionProps
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
onExited = _props$
|
|
110
|
-
TransitionProps = _objectWithoutProperties(_props$
|
|
106
|
+
_props$TransitionProp = props.TransitionProps,
|
|
107
|
+
_props$TransitionProp2 = _props$TransitionProp === void 0 ? {} : _props$TransitionProp,
|
|
108
|
+
onEnter = _props$TransitionProp2.onEnter,
|
|
109
|
+
onExited = _props$TransitionProp2.onExited,
|
|
110
|
+
TransitionProps = _objectWithoutProperties(_props$TransitionProp2, ["onEnter", "onExited"]),
|
|
111
111
|
other = _objectWithoutProperties(props, ["action", "anchorOrigin", "autoHideDuration", "children", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"]);
|
|
112
112
|
var ownerState = _extends({}, props, {
|
|
113
113
|
anchorOrigin: {
|
|
@@ -120,9 +120,7 @@ var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
120
120
|
transitionDuration: transitionDuration
|
|
121
121
|
});
|
|
122
122
|
var classes = useUtilityClasses(ownerState);
|
|
123
|
-
var _useSnackbar = useSnackbar(_extends({}, ownerState,
|
|
124
|
-
ref: ref
|
|
125
|
-
})),
|
|
123
|
+
var _useSnackbar = useSnackbar(_extends({}, ownerState)),
|
|
126
124
|
getRootProps = _useSnackbar.getRootProps,
|
|
127
125
|
onClickAway = _useSnackbar.onClickAway;
|
|
128
126
|
var _React$useState = React.useState(true),
|
|
@@ -133,6 +131,9 @@ var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
133
131
|
getSlotProps: getRootProps,
|
|
134
132
|
externalForwardedProps: other,
|
|
135
133
|
ownerState: ownerState,
|
|
134
|
+
additionalProps: {
|
|
135
|
+
ref: ref
|
|
136
|
+
},
|
|
136
137
|
className: [classes.root, className]
|
|
137
138
|
});
|
|
138
139
|
var handleExited = function handleExited(node) {
|