@mui/material 5.14.5 → 5.14.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/CHANGELOG.md +121 -3
- package/Drawer/Drawer.d.ts +2 -0
- package/Drawer/Drawer.js +2 -0
- package/InputBase/InputBase.js +1 -1
- package/Modal/Modal.d.ts +117 -12
- package/Modal/Modal.js +97 -36
- package/Modal/index.d.ts +3 -0
- package/Modal/index.js +2 -1
- package/Modal/modalClasses.d.ts +12 -0
- package/Modal/modalClasses.js +7 -0
- package/README.md +2 -3
- package/Select/Select.js +5 -3
- package/Select/selectClasses.d.ts +2 -0
- package/Select/selectClasses.js +1 -1
- package/Skeleton/Skeleton.js +2 -2
- package/TextField/TextField.d.ts +0 -4
- package/TextField/TextField.js +2 -17
- package/index.js +1 -1
- package/legacy/Drawer/Drawer.js +2 -0
- package/legacy/InputBase/InputBase.js +1 -1
- package/legacy/Modal/Modal.js +93 -43
- package/legacy/Modal/index.js +2 -1
- package/legacy/Modal/modalClasses.js +7 -0
- package/legacy/Select/Select.js +4 -2
- package/legacy/Select/selectClasses.js +1 -1
- package/legacy/Skeleton/Skeleton.js +2 -2
- package/legacy/TextField/TextField.js +2 -17
- package/legacy/index.js +1 -1
- package/modern/Drawer/Drawer.js +2 -0
- package/modern/InputBase/InputBase.js +1 -1
- package/modern/Modal/Modal.js +97 -36
- package/modern/Modal/index.js +2 -1
- package/modern/Modal/modalClasses.js +7 -0
- package/modern/Select/Select.js +5 -3
- package/modern/Select/selectClasses.js +1 -1
- package/modern/Skeleton/Skeleton.js +2 -2
- package/modern/TextField/TextField.js +2 -17
- package/modern/index.js +1 -1
- package/node/Drawer/Drawer.js +2 -0
- package/node/InputBase/InputBase.js +1 -1
- package/node/Modal/Modal.js +100 -41
- package/node/Modal/index.js +14 -5
- package/node/Modal/modalClasses.js +16 -0
- package/node/Select/Select.js +5 -3
- package/node/Select/selectClasses.js +1 -1
- package/node/Skeleton/Skeleton.js +2 -2
- package/node/TextField/TextField.js +2 -17
- package/node/index.js +1 -1
- package/package.json +6 -6
- package/umd/material-ui.development.js +432 -647
- package/umd/material-ui.production.min.js +23 -23
package/modern/Select/Select.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"]
|
|
5
|
+
const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"],
|
|
6
|
+
_excluded2 = ["root"];
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import PropTypes from 'prop-types';
|
|
8
9
|
import clsx from 'clsx';
|
|
@@ -76,6 +77,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
76
77
|
classes: classesProp
|
|
77
78
|
});
|
|
78
79
|
const classes = useUtilityClasses(ownerState);
|
|
80
|
+
const restOfClasses = _objectWithoutPropertiesLoose(classes, _excluded2);
|
|
79
81
|
const InputComponent = input || {
|
|
80
82
|
standard: /*#__PURE__*/_jsx(StyledInput, {
|
|
81
83
|
ownerState: ownerState
|
|
@@ -118,13 +120,13 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
118
120
|
id
|
|
119
121
|
}, SelectDisplayProps)
|
|
120
122
|
}, inputProps, {
|
|
121
|
-
classes: inputProps ? deepmerge(
|
|
123
|
+
classes: inputProps ? deepmerge(restOfClasses, inputProps.classes) : restOfClasses
|
|
122
124
|
}, input ? input.props.inputProps : {})
|
|
123
125
|
}, multiple && native && variant === 'outlined' ? {
|
|
124
126
|
notched: true
|
|
125
127
|
} : {}, {
|
|
126
128
|
ref: inputComponentRef,
|
|
127
|
-
className: clsx(InputComponent.props.className, className)
|
|
129
|
+
className: clsx(InputComponent.props.className, className, classes.root)
|
|
128
130
|
}, !input && {
|
|
129
131
|
variant
|
|
130
132
|
}, other))
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getSelectUtilityClasses(slot) {
|
|
4
4
|
return generateUtilityClass('MuiSelect', slot);
|
|
5
5
|
}
|
|
6
|
-
const selectClasses = generateUtilityClasses('MuiSelect', ['select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
|
|
6
|
+
const selectClasses = generateUtilityClasses('MuiSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
|
|
7
7
|
export default selectClasses;
|
|
@@ -100,7 +100,7 @@ const SkeletonRoot = styled('span', {
|
|
|
100
100
|
}, ({
|
|
101
101
|
ownerState
|
|
102
102
|
}) => ownerState.animation === 'pulse' && css`
|
|
103
|
-
animation: ${pulseKeyframe}
|
|
103
|
+
animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
|
|
104
104
|
`, ({
|
|
105
105
|
ownerState,
|
|
106
106
|
theme
|
|
@@ -112,7 +112,7 @@ const SkeletonRoot = styled('span', {
|
|
|
112
112
|
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
113
113
|
|
|
114
114
|
&::after {
|
|
115
|
-
animation: ${waveKeyframe}
|
|
115
|
+
animation: ${waveKeyframe} 2s linear 0.5s infinite;
|
|
116
116
|
background: linear-gradient(
|
|
117
117
|
90deg,
|
|
118
118
|
transparent,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
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", "
|
|
5
|
+
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"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -101,7 +101,6 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
101
101
|
name,
|
|
102
102
|
onBlur,
|
|
103
103
|
onChange,
|
|
104
|
-
onClick,
|
|
105
104
|
onFocus,
|
|
106
105
|
placeholder,
|
|
107
106
|
required = false,
|
|
@@ -144,14 +143,6 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
144
143
|
}
|
|
145
144
|
InputMore['aria-describedby'] = undefined;
|
|
146
145
|
}
|
|
147
|
-
const handleClick = event => {
|
|
148
|
-
if (!disabled && onClick) {
|
|
149
|
-
// The `onClick` is registered both on the root and the input elements.
|
|
150
|
-
// Without stopping the propagation, the event could be triggered twice.
|
|
151
|
-
event.stopPropagation();
|
|
152
|
-
onClick(event);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
146
|
const id = useId(idOverride);
|
|
156
147
|
const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
|
|
157
148
|
const inputLabelId = label && id ? `${id}-label` : undefined;
|
|
@@ -174,7 +165,6 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
174
165
|
onBlur: onBlur,
|
|
175
166
|
onChange: onChange,
|
|
176
167
|
onFocus: onFocus,
|
|
177
|
-
onClick: handleClick,
|
|
178
168
|
placeholder: placeholder,
|
|
179
169
|
inputProps: inputProps
|
|
180
170
|
}, InputMore, InputProps));
|
|
@@ -187,8 +177,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
187
177
|
required: required,
|
|
188
178
|
color: color,
|
|
189
179
|
variant: variant,
|
|
190
|
-
ownerState: ownerState
|
|
191
|
-
onClick: handleClick
|
|
180
|
+
ownerState: ownerState
|
|
192
181
|
}, other, {
|
|
193
182
|
children: [label != null && label !== '' && /*#__PURE__*/_jsx(InputLabel, _extends({
|
|
194
183
|
htmlFor: id,
|
|
@@ -334,10 +323,6 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
334
323
|
* You can pull out the new value by accessing `event.target.value` (string).
|
|
335
324
|
*/
|
|
336
325
|
onChange: PropTypes.func,
|
|
337
|
-
/**
|
|
338
|
-
* @ignore
|
|
339
|
-
*/
|
|
340
|
-
onClick: PropTypes.func,
|
|
341
326
|
/**
|
|
342
327
|
* @ignore
|
|
343
328
|
*/
|
package/modern/index.js
CHANGED
package/node/Drawer/Drawer.js
CHANGED
|
@@ -278,8 +278,10 @@ process.env.NODE_ENV !== "production" ? Drawer.propTypes /* remove-proptypes */
|
|
|
278
278
|
ModalProps: _propTypes.default.object,
|
|
279
279
|
/**
|
|
280
280
|
* Callback fired when the component requests to be closed.
|
|
281
|
+
* The `reason` parameter can optionally be used to control the response to `onClose`.
|
|
281
282
|
*
|
|
282
283
|
* @param {object} event The event source of the callback.
|
|
284
|
+
* @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
|
|
283
285
|
*/
|
|
284
286
|
onClose: _propTypes.default.func,
|
|
285
287
|
/**
|
|
@@ -384,7 +384,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
384
384
|
if (inputRef.current && event.currentTarget === event.target) {
|
|
385
385
|
inputRef.current.focus();
|
|
386
386
|
}
|
|
387
|
-
if (onClick
|
|
387
|
+
if (onClick) {
|
|
388
388
|
onClick(event);
|
|
389
389
|
}
|
|
390
390
|
};
|
package/node/Modal/Modal.js
CHANGED
|
@@ -5,24 +5,38 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
14
|
+
var _utils = require("@mui/utils");
|
|
15
|
+
var _base = require("@mui/base");
|
|
16
|
+
var _unstable_useModal = require("@mui/base/unstable_useModal");
|
|
17
|
+
var _composeClasses = require("@mui/base/composeClasses");
|
|
18
|
+
var _Unstable_TrapFocus = _interopRequireDefault(require("../Unstable_TrapFocus"));
|
|
19
|
+
var _Portal = _interopRequireDefault(require("../Portal"));
|
|
17
20
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
18
21
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
19
22
|
var _Backdrop = _interopRequireDefault(require("../Backdrop"));
|
|
23
|
+
var _modalClasses = require("./modalClasses");
|
|
20
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
25
|
const _excluded = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "open", "slotProps", "slots", "theme"];
|
|
22
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
27
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
-
const
|
|
25
|
-
|
|
28
|
+
const useUtilityClasses = ownerState => {
|
|
29
|
+
const {
|
|
30
|
+
open,
|
|
31
|
+
exited,
|
|
32
|
+
classes
|
|
33
|
+
} = ownerState;
|
|
34
|
+
const slots = {
|
|
35
|
+
root: ['root', !open && exited && 'hidden'],
|
|
36
|
+
backdrop: ['backdrop']
|
|
37
|
+
};
|
|
38
|
+
return (0, _composeClasses.unstable_composeClasses)(slots, _modalClasses.getModalUtilityClass, classes);
|
|
39
|
+
};
|
|
26
40
|
const ModalRoot = (0, _styled.default)('div', {
|
|
27
41
|
name: 'MuiModal',
|
|
28
42
|
slot: 'Root',
|
|
@@ -77,7 +91,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
77
91
|
const {
|
|
78
92
|
BackdropComponent = ModalBackdrop,
|
|
79
93
|
BackdropProps,
|
|
80
|
-
classes,
|
|
81
94
|
className,
|
|
82
95
|
closeAfterTransition = false,
|
|
83
96
|
children,
|
|
@@ -94,17 +107,13 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
94
107
|
hideBackdrop = false,
|
|
95
108
|
keepMounted = false,
|
|
96
109
|
onBackdropClick,
|
|
97
|
-
onClose,
|
|
98
110
|
open,
|
|
99
111
|
slotProps,
|
|
100
|
-
slots
|
|
112
|
+
slots
|
|
101
113
|
// eslint-disable-next-line react/prop-types
|
|
102
|
-
theme
|
|
103
114
|
} = props,
|
|
104
115
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
105
|
-
const
|
|
106
|
-
const commonProps = {
|
|
107
|
-
container,
|
|
116
|
+
const propsWithDefaults = (0, _extends2.default)({}, props, {
|
|
108
117
|
closeAfterTransition,
|
|
109
118
|
disableAutoFocus,
|
|
110
119
|
disableEnforceFocus,
|
|
@@ -113,40 +122,90 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
113
122
|
disableRestoreFocus,
|
|
114
123
|
disableScrollLock,
|
|
115
124
|
hideBackdrop,
|
|
116
|
-
keepMounted
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
keepMounted
|
|
126
|
+
});
|
|
127
|
+
const {
|
|
128
|
+
getRootProps,
|
|
129
|
+
getBackdropProps,
|
|
130
|
+
getTransitionProps,
|
|
131
|
+
portalRef,
|
|
132
|
+
isTopModal,
|
|
133
|
+
exited,
|
|
134
|
+
hasTransition
|
|
135
|
+
} = (0, _unstable_useModal.unstable_useModal)((0, _extends2.default)({}, propsWithDefaults, {
|
|
136
|
+
rootRef: ref
|
|
137
|
+
}));
|
|
138
|
+
const ownerState = (0, _extends2.default)({}, propsWithDefaults, {
|
|
122
139
|
exited
|
|
123
140
|
});
|
|
141
|
+
const classes = useUtilityClasses(ownerState);
|
|
142
|
+
const childProps = {};
|
|
143
|
+
if (children.props.tabIndex === undefined) {
|
|
144
|
+
childProps.tabIndex = '-1';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// It's a Transition like component
|
|
148
|
+
if (hasTransition) {
|
|
149
|
+
const {
|
|
150
|
+
onEnter,
|
|
151
|
+
onExited
|
|
152
|
+
} = getTransitionProps();
|
|
153
|
+
childProps.onEnter = onEnter;
|
|
154
|
+
childProps.onExited = onExited;
|
|
155
|
+
}
|
|
124
156
|
const RootSlot = (_ref = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref : ModalRoot;
|
|
125
157
|
const BackdropSlot = (_ref2 = (_slots$backdrop = slots == null ? void 0 : slots.backdrop) != null ? _slots$backdrop : components.Backdrop) != null ? _ref2 : BackdropComponent;
|
|
126
158
|
const rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;
|
|
127
159
|
const backdropSlotProps = (_slotProps$backdrop = slotProps == null ? void 0 : slotProps.backdrop) != null ? _slotProps$backdrop : componentsProps.backdrop;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
160
|
+
const rootProps = (0, _base.useSlotProps)({
|
|
161
|
+
elementType: RootSlot,
|
|
162
|
+
externalSlotProps: rootSlotProps,
|
|
163
|
+
externalForwardedProps: other,
|
|
164
|
+
getSlotProps: getRootProps,
|
|
165
|
+
additionalProps: {
|
|
166
|
+
ref,
|
|
167
|
+
as: component
|
|
132
168
|
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
169
|
+
ownerState,
|
|
170
|
+
className: (0, _clsx.default)(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))
|
|
171
|
+
});
|
|
172
|
+
const backdropProps = (0, _base.useSlotProps)({
|
|
173
|
+
elementType: BackdropSlot,
|
|
174
|
+
externalSlotProps: backdropSlotProps,
|
|
175
|
+
additionalProps: BackdropProps,
|
|
176
|
+
getSlotProps: otherHandlers => {
|
|
177
|
+
return getBackdropProps((0, _extends2.default)({}, otherHandlers, {
|
|
178
|
+
onClick: e => {
|
|
179
|
+
if (onBackdropClick) {
|
|
180
|
+
onBackdropClick(e);
|
|
181
|
+
}
|
|
182
|
+
if (otherHandlers != null && otherHandlers.onClick) {
|
|
183
|
+
otherHandlers.onClick(e);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}));
|
|
143
187
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
188
|
+
className: (0, _clsx.default)(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),
|
|
189
|
+
ownerState
|
|
190
|
+
});
|
|
191
|
+
if (!keepMounted && !open && (!hasTransition || exited)) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Portal.default, {
|
|
195
|
+
ref: portalRef,
|
|
196
|
+
container: container,
|
|
197
|
+
disablePortal: disablePortal,
|
|
198
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, (0, _extends2.default)({}, rootProps, {
|
|
199
|
+
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(BackdropSlot, (0, _extends2.default)({}, backdropProps)) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Unstable_TrapFocus.default, {
|
|
200
|
+
disableEnforceFocus: disableEnforceFocus,
|
|
201
|
+
disableAutoFocus: disableAutoFocus,
|
|
202
|
+
disableRestoreFocus: disableRestoreFocus,
|
|
203
|
+
isEnabled: isTopModal,
|
|
204
|
+
open: open,
|
|
205
|
+
children: /*#__PURE__*/React.cloneElement(children, childProps)
|
|
206
|
+
})]
|
|
207
|
+
}))
|
|
208
|
+
});
|
|
150
209
|
});
|
|
151
210
|
process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ = {
|
|
152
211
|
// ----------------------------- Warning --------------------------------
|
|
@@ -176,7 +235,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
|
|
|
176
235
|
/**
|
|
177
236
|
* A single child content element.
|
|
178
237
|
*/
|
|
179
|
-
children:
|
|
238
|
+
children: _utils.elementAcceptingRef.isRequired,
|
|
180
239
|
/**
|
|
181
240
|
* Override or extend the styles applied to the component.
|
|
182
241
|
*/
|
|
@@ -227,7 +286,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
|
|
|
227
286
|
* By default, it uses the body of the top-level document object,
|
|
228
287
|
* so it's simply `document.body` most of the time.
|
|
229
288
|
*/
|
|
230
|
-
container: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([
|
|
289
|
+
container: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_utils.HTMLElementType, _propTypes.default.func]),
|
|
231
290
|
/**
|
|
232
291
|
* If `true`, the modal will not automatically shift focus to itself when it opens, and
|
|
233
292
|
* replace it to the last focused element when it closes.
|
package/node/Modal/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
var _exportNames = {
|
|
8
|
-
ModalManager: true
|
|
9
|
+
ModalManager: true,
|
|
10
|
+
modalClasses: true
|
|
9
11
|
};
|
|
10
12
|
Object.defineProperty(exports, "ModalManager", {
|
|
11
13
|
enumerable: true,
|
|
@@ -19,16 +21,23 @@ Object.defineProperty(exports, "default", {
|
|
|
19
21
|
return _Modal.default;
|
|
20
22
|
}
|
|
21
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "modalClasses", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _modalClasses.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
22
30
|
var _unstable_useModal = require("@mui/base/unstable_useModal");
|
|
23
|
-
var _Modal =
|
|
24
|
-
|
|
31
|
+
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
32
|
+
var _modalClasses = _interopRequireWildcard(require("./modalClasses"));
|
|
33
|
+
Object.keys(_modalClasses).forEach(function (key) {
|
|
25
34
|
if (key === "default" || key === "__esModule") return;
|
|
26
35
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
27
|
-
if (key in exports && exports[key] ===
|
|
36
|
+
if (key in exports && exports[key] === _modalClasses[key]) return;
|
|
28
37
|
Object.defineProperty(exports, key, {
|
|
29
38
|
enumerable: true,
|
|
30
39
|
get: function () {
|
|
31
|
-
return
|
|
40
|
+
return _modalClasses[key];
|
|
32
41
|
}
|
|
33
42
|
});
|
|
34
43
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
exports.getModalUtilityClass = getModalUtilityClass;
|
|
9
|
+
var _utils = require("@mui/utils");
|
|
10
|
+
var _generateUtilityClass = _interopRequireDefault(require("../generateUtilityClass"));
|
|
11
|
+
function getModalUtilityClass(slot) {
|
|
12
|
+
return (0, _generateUtilityClass.default)('MuiModal', slot);
|
|
13
|
+
}
|
|
14
|
+
const modalClasses = (0, _utils.unstable_generateUtilityClasses)('MuiModal', ['root', 'hidden', 'backdrop']);
|
|
15
|
+
var _default = modalClasses;
|
|
16
|
+
exports.default = _default;
|
package/node/Select/Select.js
CHANGED
|
@@ -24,7 +24,8 @@ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
|
24
24
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
25
25
|
var _styled = _interopRequireWildcard(require("../styles/styled"));
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
-
const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"]
|
|
27
|
+
const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"],
|
|
28
|
+
_excluded2 = ["root"];
|
|
28
29
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
31
|
const useUtilityClasses = ownerState => {
|
|
@@ -84,6 +85,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
84
85
|
classes: classesProp
|
|
85
86
|
});
|
|
86
87
|
const classes = useUtilityClasses(ownerState);
|
|
88
|
+
const restOfClasses = (0, _objectWithoutPropertiesLoose2.default)(classes, _excluded2);
|
|
87
89
|
const InputComponent = input || {
|
|
88
90
|
standard: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledInput, {
|
|
89
91
|
ownerState: ownerState
|
|
@@ -126,13 +128,13 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
126
128
|
id
|
|
127
129
|
}, SelectDisplayProps)
|
|
128
130
|
}, inputProps, {
|
|
129
|
-
classes: inputProps ? (0, _utils.deepmerge)(
|
|
131
|
+
classes: inputProps ? (0, _utils.deepmerge)(restOfClasses, inputProps.classes) : restOfClasses
|
|
130
132
|
}, input ? input.props.inputProps : {})
|
|
131
133
|
}, multiple && native && variant === 'outlined' ? {
|
|
132
134
|
notched: true
|
|
133
135
|
} : {}, {
|
|
134
136
|
ref: inputComponentRef,
|
|
135
|
-
className: (0, _clsx.default)(InputComponent.props.className, className)
|
|
137
|
+
className: (0, _clsx.default)(InputComponent.props.className, className, classes.root)
|
|
136
138
|
}, !input && {
|
|
137
139
|
variant
|
|
138
140
|
}, other))
|
|
@@ -11,6 +11,6 @@ var _generateUtilityClass = _interopRequireDefault(require("../generateUtilityCl
|
|
|
11
11
|
function getSelectUtilityClasses(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiSelect', slot);
|
|
13
13
|
}
|
|
14
|
-
const selectClasses = (0, _utils.unstable_generateUtilityClasses)('MuiSelect', ['select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
|
|
14
|
+
const selectClasses = (0, _utils.unstable_generateUtilityClasses)('MuiSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
|
|
15
15
|
var _default = selectClasses;
|
|
16
16
|
exports.default = _default;
|
|
@@ -108,7 +108,7 @@ const SkeletonRoot = (0, _styled.default)('span', {
|
|
|
108
108
|
}, ({
|
|
109
109
|
ownerState
|
|
110
110
|
}) => ownerState.animation === 'pulse' && (0, _system.css)`
|
|
111
|
-
animation: ${pulseKeyframe}
|
|
111
|
+
animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
|
|
112
112
|
`, ({
|
|
113
113
|
ownerState,
|
|
114
114
|
theme
|
|
@@ -120,7 +120,7 @@ const SkeletonRoot = (0, _styled.default)('span', {
|
|
|
120
120
|
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
121
121
|
|
|
122
122
|
&::after {
|
|
123
|
-
animation: ${waveKeyframe}
|
|
123
|
+
animation: ${waveKeyframe} 2s linear 0.5s infinite;
|
|
124
124
|
background: linear-gradient(
|
|
125
125
|
90deg,
|
|
126
126
|
transparent,
|
|
@@ -24,7 +24,7 @@ var _FormHelperText = _interopRequireDefault(require("../FormHelperText"));
|
|
|
24
24
|
var _Select = _interopRequireDefault(require("../Select"));
|
|
25
25
|
var _textFieldClasses = require("./textFieldClasses");
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
-
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", "
|
|
27
|
+
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"];
|
|
28
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
29
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
30
|
const variantComponent = {
|
|
@@ -108,7 +108,6 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
108
108
|
name,
|
|
109
109
|
onBlur,
|
|
110
110
|
onChange,
|
|
111
|
-
onClick,
|
|
112
111
|
onFocus,
|
|
113
112
|
placeholder,
|
|
114
113
|
required = false,
|
|
@@ -151,14 +150,6 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
151
150
|
}
|
|
152
151
|
InputMore['aria-describedby'] = undefined;
|
|
153
152
|
}
|
|
154
|
-
const handleClick = event => {
|
|
155
|
-
if (!disabled && onClick) {
|
|
156
|
-
// The `onClick` is registered both on the root and the input elements.
|
|
157
|
-
// Without stopping the propagation, the event could be triggered twice.
|
|
158
|
-
event.stopPropagation();
|
|
159
|
-
onClick(event);
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
153
|
const id = (0, _utils.unstable_useId)(idOverride);
|
|
163
154
|
const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
|
|
164
155
|
const inputLabelId = label && id ? `${id}-label` : undefined;
|
|
@@ -181,7 +172,6 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
181
172
|
onBlur: onBlur,
|
|
182
173
|
onChange: onChange,
|
|
183
174
|
onFocus: onFocus,
|
|
184
|
-
onClick: handleClick,
|
|
185
175
|
placeholder: placeholder,
|
|
186
176
|
inputProps: inputProps
|
|
187
177
|
}, InputMore, InputProps));
|
|
@@ -194,8 +184,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
194
184
|
required: required,
|
|
195
185
|
color: color,
|
|
196
186
|
variant: variant,
|
|
197
|
-
ownerState: ownerState
|
|
198
|
-
onClick: handleClick
|
|
187
|
+
ownerState: ownerState
|
|
199
188
|
}, other, {
|
|
200
189
|
children: [label != null && label !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, (0, _extends2.default)({
|
|
201
190
|
htmlFor: id,
|
|
@@ -341,10 +330,6 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
341
330
|
* You can pull out the new value by accessing `event.target.value` (string).
|
|
342
331
|
*/
|
|
343
332
|
onChange: _propTypes.default.func,
|
|
344
|
-
/**
|
|
345
|
-
* @ignore
|
|
346
|
-
*/
|
|
347
|
-
onClick: _propTypes.default.func,
|
|
348
333
|
/**
|
|
349
334
|
* @ignore
|
|
350
335
|
*/
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@babel/runtime": "^7.22.
|
|
49
|
-
"@mui/base": "5.0.0-beta.
|
|
50
|
-
"@mui/core-downloads-tracker": "^5.14.
|
|
51
|
-
"@mui/system": "^5.14.
|
|
48
|
+
"@babel/runtime": "^7.22.10",
|
|
49
|
+
"@mui/base": "5.0.0-beta.12",
|
|
50
|
+
"@mui/core-downloads-tracker": "^5.14.6",
|
|
51
|
+
"@mui/system": "^5.14.6",
|
|
52
52
|
"@mui/types": "^7.2.4",
|
|
53
|
-
"@mui/utils": "^5.14.
|
|
53
|
+
"@mui/utils": "^5.14.6",
|
|
54
54
|
"@types/react-transition-group": "^4.4.6",
|
|
55
55
|
"clsx": "^2.0.0",
|
|
56
56
|
"csstype": "^3.1.2",
|