@mui/material 5.15.5 → 5.15.7
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/index.js +0 -2
- package/AccordionActions/index.js +0 -2
- package/AccordionDetails/index.js +0 -2
- package/AccordionSummary/index.js +0 -2
- package/Avatar/Avatar.js +33 -16
- package/AvatarGroup/AvatarGroup.js +19 -39
- package/Badge/Badge.js +2 -2
- package/ButtonBase/TouchRipple.js +9 -14
- package/CHANGELOG.md +401 -249
- package/Collapse/Collapse.js +3 -8
- package/Grow/Grow.js +3 -8
- package/PaginationItem/PaginationItem.js +1 -1
- package/PaginationItem/paginationItemClasses.d.ts +20 -4
- package/PaginationItem/paginationItemClasses.js +1 -1
- package/README.md +5 -5
- package/Rating/Rating.js +1 -0
- package/Rating/index.js +0 -2
- package/Select/Select.js +1 -1
- package/SpeedDial/SpeedDial.js +7 -12
- package/TablePagination/TablePagination.d.ts +1 -1
- package/Toolbar/index.js +0 -2
- package/Tooltip/Tooltip.js +29 -40
- package/index.js +1 -3
- package/legacy/Accordion/index.js +0 -2
- package/legacy/AccordionActions/index.js +0 -2
- package/legacy/AccordionDetails/index.js +0 -2
- package/legacy/AccordionSummary/index.js +0 -2
- package/legacy/Avatar/Avatar.js +33 -16
- package/legacy/AvatarGroup/AvatarGroup.js +6 -31
- package/legacy/Badge/Badge.js +2 -2
- package/legacy/ButtonBase/TouchRipple.js +9 -14
- package/legacy/Collapse/Collapse.js +3 -8
- package/legacy/Grow/Grow.js +3 -8
- package/legacy/PaginationItem/PaginationItem.js +1 -1
- package/legacy/PaginationItem/paginationItemClasses.js +1 -1
- package/legacy/Rating/Rating.js +1 -0
- package/legacy/Rating/index.js +0 -2
- package/legacy/Select/Select.js +1 -1
- package/legacy/SpeedDial/SpeedDial.js +7 -12
- package/legacy/Toolbar/index.js +0 -2
- package/legacy/Tooltip/Tooltip.js +29 -38
- package/legacy/index.js +1 -3
- package/legacy/zero-styled/index.js +7 -2
- package/modern/Accordion/index.js +0 -2
- package/modern/AccordionActions/index.js +0 -2
- package/modern/AccordionDetails/index.js +0 -2
- package/modern/AccordionSummary/index.js +0 -2
- package/modern/Avatar/Avatar.js +33 -16
- package/modern/AvatarGroup/AvatarGroup.js +19 -39
- package/modern/Badge/Badge.js +2 -2
- package/modern/ButtonBase/TouchRipple.js +9 -14
- package/modern/Collapse/Collapse.js +3 -8
- package/modern/Grow/Grow.js +3 -8
- package/modern/PaginationItem/PaginationItem.js +1 -1
- package/modern/PaginationItem/paginationItemClasses.js +1 -1
- package/modern/Rating/Rating.js +1 -0
- package/modern/Rating/index.js +0 -2
- package/modern/Select/Select.js +1 -1
- package/modern/SpeedDial/SpeedDial.js +7 -12
- package/modern/Toolbar/index.js +0 -2
- package/modern/Tooltip/Tooltip.js +29 -40
- package/modern/index.js +1 -3
- package/modern/zero-styled/index.js +7 -2
- package/node/Accordion/index.js +0 -1
- package/node/AccordionActions/index.js +0 -1
- package/node/AccordionDetails/index.js +0 -1
- package/node/AccordionSummary/index.js +0 -1
- package/node/Avatar/Avatar.js +33 -16
- package/node/AvatarGroup/AvatarGroup.js +19 -39
- package/node/Badge/Badge.js +2 -2
- package/node/ButtonBase/TouchRipple.js +9 -14
- package/node/Collapse/Collapse.js +2 -7
- package/node/Grow/Grow.js +2 -7
- package/node/PaginationItem/PaginationItem.js +1 -1
- package/node/PaginationItem/paginationItemClasses.js +1 -1
- package/node/Rating/Rating.js +1 -0
- package/node/Rating/index.js +0 -1
- package/node/Select/Select.js +1 -1
- package/node/SpeedDial/SpeedDial.js +6 -11
- package/node/Toolbar/index.js +0 -1
- package/node/Tooltip/Tooltip.js +28 -39
- package/node/index.js +1 -3
- package/node/zero-styled/index.js +7 -1
- package/package.json +7 -7
- package/styles/experimental_extendTheme.d.ts +3 -2
- package/umd/material-ui.development.js +400 -292
- package/umd/material-ui.production.min.js +4 -4
- package/zero-styled/index.d.ts +2 -1
- package/zero-styled/index.js +7 -2
|
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _reactTransitionGroup = require("react-transition-group");
|
|
14
14
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
15
|
var _system = require("@mui/system");
|
|
16
|
+
var _utils = require("@mui/utils");
|
|
16
17
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
17
18
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
18
19
|
var _Ripple = _interopRequireDefault(require("./Ripple"));
|
|
@@ -159,18 +160,11 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
159
160
|
const ignoringMouseDown = React.useRef(false);
|
|
160
161
|
// We use a timer in order to only show the ripples for touch "click" like events.
|
|
161
162
|
// We don't want to display the ripple for touch scroll events.
|
|
162
|
-
const startTimer =
|
|
163
|
+
const startTimer = (0, _utils.unstable_useTimeout)();
|
|
163
164
|
|
|
164
165
|
// This is the hook called once the previous timeout is ready.
|
|
165
166
|
const startTimerCommit = React.useRef(null);
|
|
166
167
|
const container = React.useRef(null);
|
|
167
|
-
React.useEffect(() => {
|
|
168
|
-
return () => {
|
|
169
|
-
if (startTimer.current) {
|
|
170
|
-
clearTimeout(startTimer.current);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
}, []);
|
|
174
168
|
const startCommit = React.useCallback(params => {
|
|
175
169
|
const {
|
|
176
170
|
pulsate,
|
|
@@ -263,12 +257,13 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
263
257
|
});
|
|
264
258
|
};
|
|
265
259
|
// Delay the execution of the ripple effect.
|
|
266
|
-
|
|
260
|
+
// We have to make a tradeoff with this delay value.
|
|
261
|
+
startTimer.start(DELAY_RIPPLE, () => {
|
|
267
262
|
if (startTimerCommit.current) {
|
|
268
263
|
startTimerCommit.current();
|
|
269
264
|
startTimerCommit.current = null;
|
|
270
265
|
}
|
|
271
|
-
}
|
|
266
|
+
});
|
|
272
267
|
}
|
|
273
268
|
} else {
|
|
274
269
|
startCommit({
|
|
@@ -279,21 +274,21 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
279
274
|
cb
|
|
280
275
|
});
|
|
281
276
|
}
|
|
282
|
-
}, [centerProp, startCommit]);
|
|
277
|
+
}, [centerProp, startCommit, startTimer]);
|
|
283
278
|
const pulsate = React.useCallback(() => {
|
|
284
279
|
start({}, {
|
|
285
280
|
pulsate: true
|
|
286
281
|
});
|
|
287
282
|
}, [start]);
|
|
288
283
|
const stop = React.useCallback((event, cb) => {
|
|
289
|
-
|
|
284
|
+
startTimer.clear();
|
|
290
285
|
|
|
291
286
|
// The touch interaction occurs too quickly.
|
|
292
287
|
// We still want to show ripple effect.
|
|
293
288
|
if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) {
|
|
294
289
|
startTimerCommit.current();
|
|
295
290
|
startTimerCommit.current = null;
|
|
296
|
-
startTimer.
|
|
291
|
+
startTimer.start(0, () => {
|
|
297
292
|
stop(event, cb);
|
|
298
293
|
});
|
|
299
294
|
return;
|
|
@@ -306,7 +301,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
306
301
|
return oldRipples;
|
|
307
302
|
});
|
|
308
303
|
rippleCallback.current = cb;
|
|
309
|
-
}, []);
|
|
304
|
+
}, [startTimer]);
|
|
310
305
|
React.useImperativeHandle(ref, () => ({
|
|
311
306
|
pulsate,
|
|
312
307
|
start,
|
|
@@ -131,17 +131,12 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
131
131
|
});
|
|
132
132
|
const classes = useUtilityClasses(ownerState);
|
|
133
133
|
const theme = (0, _useTheme.default)();
|
|
134
|
-
const timer =
|
|
134
|
+
const timer = (0, _utils.unstable_useTimeout)();
|
|
135
135
|
const wrapperRef = React.useRef(null);
|
|
136
136
|
const autoTransitionDuration = React.useRef();
|
|
137
137
|
const collapsedSize = typeof collapsedSizeProp === 'number' ? `${collapsedSizeProp}px` : collapsedSizeProp;
|
|
138
138
|
const isHorizontal = orientation === 'horizontal';
|
|
139
139
|
const size = isHorizontal ? 'width' : 'height';
|
|
140
|
-
React.useEffect(() => {
|
|
141
|
-
return () => {
|
|
142
|
-
clearTimeout(timer.current);
|
|
143
|
-
};
|
|
144
|
-
}, []);
|
|
145
140
|
const nodeRef = React.useRef(null);
|
|
146
141
|
const handleRef = (0, _utils3.useForkRef)(ref, nodeRef);
|
|
147
142
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
@@ -238,7 +233,7 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
238
233
|
});
|
|
239
234
|
const handleAddEndListener = next => {
|
|
240
235
|
if (timeout === 'auto') {
|
|
241
|
-
timer.
|
|
236
|
+
timer.start(autoTransitionDuration.current || 0, next);
|
|
242
237
|
}
|
|
243
238
|
if (addEndListener) {
|
|
244
239
|
// Old call signature before `react-transition-group` implemented `nodeRef`
|
package/node/Grow/Grow.js
CHANGED
|
@@ -63,7 +63,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
63
63
|
TransitionComponent = _reactTransitionGroup.Transition
|
|
64
64
|
} = props,
|
|
65
65
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
66
|
-
const timer =
|
|
66
|
+
const timer = (0, _utils.unstable_useTimeout)();
|
|
67
67
|
const autoTimeout = React.useRef();
|
|
68
68
|
const theme = (0, _useTheme.default)();
|
|
69
69
|
const nodeRef = React.useRef(null);
|
|
@@ -152,18 +152,13 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
152
152
|
const handleExited = normalizedTransitionCallback(onExited);
|
|
153
153
|
const handleAddEndListener = next => {
|
|
154
154
|
if (timeout === 'auto') {
|
|
155
|
-
timer.
|
|
155
|
+
timer.start(autoTimeout.current || 0, next);
|
|
156
156
|
}
|
|
157
157
|
if (addEndListener) {
|
|
158
158
|
// Old call signature before `react-transition-group` implemented `nodeRef`
|
|
159
159
|
addEndListener(nodeRef.current, next);
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
|
-
React.useEffect(() => {
|
|
163
|
-
return () => {
|
|
164
|
-
clearTimeout(timer.current);
|
|
165
|
-
};
|
|
166
|
-
}, []);
|
|
167
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionComponent, (0, _extends2.default)({
|
|
168
163
|
appear: appear,
|
|
169
164
|
in: inProp,
|
|
@@ -45,7 +45,7 @@ const useUtilityClasses = ownerState => {
|
|
|
45
45
|
variant
|
|
46
46
|
} = ownerState;
|
|
47
47
|
const slots = {
|
|
48
|
-
root: ['root', `size${(0, _capitalize.default)(size)}`, variant, shape, color !== 'standard' && `${variant}${(0, _capitalize.default)(color)}`, disabled && 'disabled', selected && 'selected', {
|
|
48
|
+
root: ['root', `size${(0, _capitalize.default)(size)}`, variant, shape, color !== 'standard' && `color${(0, _capitalize.default)(color)}`, color !== 'standard' && `${variant}${(0, _capitalize.default)(color)}`, disabled && 'disabled', selected && 'selected', {
|
|
49
49
|
page: 'page',
|
|
50
50
|
first: 'firstLast',
|
|
51
51
|
last: 'firstLast',
|
|
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
11
11
|
function getPaginationItemUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiPaginationItem', slot);
|
|
13
13
|
}
|
|
14
|
-
const paginationItemClasses = (0, _generateUtilityClasses.default)('MuiPaginationItem', ['root', 'page', 'sizeSmall', 'sizeLarge', 'text', 'textPrimary', 'textSecondary', 'outlined', 'outlinedPrimary', 'outlinedSecondary', 'rounded', 'ellipsis', 'firstLast', 'previousNext', 'focusVisible', 'disabled', 'selected', 'icon']);
|
|
14
|
+
const paginationItemClasses = (0, _generateUtilityClasses.default)('MuiPaginationItem', ['root', 'page', 'sizeSmall', 'sizeLarge', 'text', 'textPrimary', 'textSecondary', 'outlined', 'outlinedPrimary', 'outlinedSecondary', 'rounded', 'ellipsis', 'firstLast', 'previousNext', 'focusVisible', 'disabled', 'selected', 'icon', 'colorPrimary', 'colorSecondary']);
|
|
15
15
|
var _default = exports.default = paginationItemClasses;
|
package/node/Rating/Rating.js
CHANGED
|
@@ -82,6 +82,7 @@ const RatingRoot = (0, _styled.default)('span', {
|
|
|
82
82
|
color: '#faaf00',
|
|
83
83
|
cursor: 'pointer',
|
|
84
84
|
textAlign: 'left',
|
|
85
|
+
width: 'min-content',
|
|
85
86
|
WebkitTapHighlightColor: 'transparent',
|
|
86
87
|
[`&.${_ratingClasses.default.disabled}`]: {
|
|
87
88
|
opacity: (theme.vars || theme).palette.action.disabledOpacity,
|
package/node/Rating/index.js
CHANGED
package/node/Select/Select.js
CHANGED
|
@@ -130,7 +130,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
130
130
|
}, inputProps, {
|
|
131
131
|
classes: inputProps ? (0, _utils.deepmerge)(restOfClasses, inputProps.classes) : restOfClasses
|
|
132
132
|
}, input ? input.props.inputProps : {})
|
|
133
|
-
}, multiple && native && variant === 'outlined' ? {
|
|
133
|
+
}, (multiple && native || displayEmpty) && variant === 'outlined' ? {
|
|
134
134
|
notched: true
|
|
135
135
|
} : {}, {
|
|
136
136
|
ref: inputComponentRef,
|
|
@@ -170,12 +170,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
170
170
|
direction
|
|
171
171
|
});
|
|
172
172
|
const classes = useUtilityClasses(ownerState);
|
|
173
|
-
const eventTimer =
|
|
174
|
-
React.useEffect(() => {
|
|
175
|
-
return () => {
|
|
176
|
-
clearTimeout(eventTimer.current);
|
|
177
|
-
};
|
|
178
|
-
}, []);
|
|
173
|
+
const eventTimer = (0, _utils.unstable_useTimeout)();
|
|
179
174
|
|
|
180
175
|
/**
|
|
181
176
|
* an index in actions.current
|
|
@@ -259,9 +254,9 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
259
254
|
if (event.type === 'blur' && onBlur) {
|
|
260
255
|
onBlur(event);
|
|
261
256
|
}
|
|
262
|
-
|
|
257
|
+
eventTimer.clear();
|
|
263
258
|
if (event.type === 'blur') {
|
|
264
|
-
eventTimer.
|
|
259
|
+
eventTimer.start(0, () => {
|
|
265
260
|
setOpenState(false);
|
|
266
261
|
if (onClose) {
|
|
267
262
|
onClose(event, 'blur');
|
|
@@ -278,7 +273,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
278
273
|
if (FabProps.onClick) {
|
|
279
274
|
FabProps.onClick(event);
|
|
280
275
|
}
|
|
281
|
-
|
|
276
|
+
eventTimer.clear();
|
|
282
277
|
if (open) {
|
|
283
278
|
setOpenState(false);
|
|
284
279
|
if (onClose) {
|
|
@@ -302,10 +297,10 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
302
297
|
// When moving the focus between two items,
|
|
303
298
|
// a chain if blur and focus event is triggered.
|
|
304
299
|
// We only handle the last event.
|
|
305
|
-
|
|
300
|
+
eventTimer.clear();
|
|
306
301
|
if (!open) {
|
|
307
302
|
// Wait for a future focus or click event
|
|
308
|
-
eventTimer.
|
|
303
|
+
eventTimer.start(0, () => {
|
|
309
304
|
setOpenState(true);
|
|
310
305
|
if (onOpen) {
|
|
311
306
|
const eventMap = {
|
package/node/Toolbar/index.js
CHANGED
package/node/Tooltip/Tooltip.js
CHANGED
|
@@ -202,14 +202,14 @@ const TooltipArrow = (0, _styled.default)('span', {
|
|
|
202
202
|
}
|
|
203
203
|
}));
|
|
204
204
|
let hystersisOpen = false;
|
|
205
|
-
|
|
205
|
+
const hystersisTimer = new _utils.unstable_Timeout();
|
|
206
206
|
let cursorPosition = {
|
|
207
207
|
x: 0,
|
|
208
208
|
y: 0
|
|
209
209
|
};
|
|
210
210
|
function testReset() {
|
|
211
211
|
hystersisOpen = false;
|
|
212
|
-
|
|
212
|
+
hystersisTimer.clear();
|
|
213
213
|
}
|
|
214
214
|
function composeEventHandler(handler, eventHandler) {
|
|
215
215
|
return event => {
|
|
@@ -268,10 +268,10 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
268
268
|
const [arrowRef, setArrowRef] = React.useState(null);
|
|
269
269
|
const ignoreNonTouchEvents = React.useRef(false);
|
|
270
270
|
const disableInteractive = disableInteractiveProp || followCursor;
|
|
271
|
-
const closeTimer =
|
|
272
|
-
const enterTimer =
|
|
273
|
-
const leaveTimer =
|
|
274
|
-
const touchTimer =
|
|
271
|
+
const closeTimer = (0, _utils.unstable_useTimeout)();
|
|
272
|
+
const enterTimer = (0, _utils.unstable_useTimeout)();
|
|
273
|
+
const leaveTimer = (0, _utils.unstable_useTimeout)();
|
|
274
|
+
const touchTimer = (0, _utils.unstable_useTimeout)();
|
|
275
275
|
const [openState, setOpenState] = (0, _useControlled.default)({
|
|
276
276
|
controlled: openProp,
|
|
277
277
|
default: false,
|
|
@@ -294,23 +294,16 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
294
294
|
}
|
|
295
295
|
const id = (0, _useId.default)(idProp);
|
|
296
296
|
const prevUserSelect = React.useRef();
|
|
297
|
-
const stopTouchInteraction =
|
|
297
|
+
const stopTouchInteraction = (0, _useEventCallback.default)(() => {
|
|
298
298
|
if (prevUserSelect.current !== undefined) {
|
|
299
299
|
document.body.style.WebkitUserSelect = prevUserSelect.current;
|
|
300
300
|
prevUserSelect.current = undefined;
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
React.useEffect(() =>
|
|
305
|
-
return () => {
|
|
306
|
-
clearTimeout(closeTimer.current);
|
|
307
|
-
clearTimeout(enterTimer.current);
|
|
308
|
-
clearTimeout(leaveTimer.current);
|
|
309
|
-
stopTouchInteraction();
|
|
310
|
-
};
|
|
311
|
-
}, [stopTouchInteraction]);
|
|
302
|
+
touchTimer.clear();
|
|
303
|
+
});
|
|
304
|
+
React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);
|
|
312
305
|
const handleOpen = event => {
|
|
313
|
-
|
|
306
|
+
hystersisTimer.clear();
|
|
314
307
|
hystersisOpen = true;
|
|
315
308
|
|
|
316
309
|
// The mouseover event will trigger for every nested element in the tooltip.
|
|
@@ -326,18 +319,16 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
326
319
|
* @param {React.SyntheticEvent | Event} event
|
|
327
320
|
*/
|
|
328
321
|
event => {
|
|
329
|
-
|
|
330
|
-
hystersisTimer = setTimeout(() => {
|
|
322
|
+
hystersisTimer.start(800 + leaveDelay, () => {
|
|
331
323
|
hystersisOpen = false;
|
|
332
|
-
}
|
|
324
|
+
});
|
|
333
325
|
setOpenState(false);
|
|
334
326
|
if (onClose && open) {
|
|
335
327
|
onClose(event);
|
|
336
328
|
}
|
|
337
|
-
|
|
338
|
-
closeTimer.current = setTimeout(() => {
|
|
329
|
+
closeTimer.start(theme.transitions.duration.shortest, () => {
|
|
339
330
|
ignoreNonTouchEvents.current = false;
|
|
340
|
-
}
|
|
331
|
+
});
|
|
341
332
|
});
|
|
342
333
|
const handleEnter = event => {
|
|
343
334
|
if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
|
@@ -350,22 +341,21 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
350
341
|
if (childNode) {
|
|
351
342
|
childNode.removeAttribute('title');
|
|
352
343
|
}
|
|
353
|
-
|
|
354
|
-
|
|
344
|
+
enterTimer.clear();
|
|
345
|
+
leaveTimer.clear();
|
|
355
346
|
if (enterDelay || hystersisOpen && enterNextDelay) {
|
|
356
|
-
enterTimer.
|
|
347
|
+
enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {
|
|
357
348
|
handleOpen(event);
|
|
358
|
-
}
|
|
349
|
+
});
|
|
359
350
|
} else {
|
|
360
351
|
handleOpen(event);
|
|
361
352
|
}
|
|
362
353
|
};
|
|
363
354
|
const handleLeave = event => {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
leaveTimer.current = setTimeout(() => {
|
|
355
|
+
enterTimer.clear();
|
|
356
|
+
leaveTimer.start(leaveDelay, () => {
|
|
367
357
|
handleClose(event);
|
|
368
|
-
}
|
|
358
|
+
});
|
|
369
359
|
};
|
|
370
360
|
const {
|
|
371
361
|
isFocusVisibleRef,
|
|
@@ -407,26 +397,25 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
407
397
|
const handleMouseLeave = handleLeave;
|
|
408
398
|
const handleTouchStart = event => {
|
|
409
399
|
detectTouchStart(event);
|
|
410
|
-
|
|
411
|
-
|
|
400
|
+
leaveTimer.clear();
|
|
401
|
+
closeTimer.clear();
|
|
412
402
|
stopTouchInteraction();
|
|
413
403
|
prevUserSelect.current = document.body.style.WebkitUserSelect;
|
|
414
404
|
// Prevent iOS text selection on long-tap.
|
|
415
405
|
document.body.style.WebkitUserSelect = 'none';
|
|
416
|
-
touchTimer.
|
|
406
|
+
touchTimer.start(enterTouchDelay, () => {
|
|
417
407
|
document.body.style.WebkitUserSelect = prevUserSelect.current;
|
|
418
408
|
handleEnter(event);
|
|
419
|
-
}
|
|
409
|
+
});
|
|
420
410
|
};
|
|
421
411
|
const handleTouchEnd = event => {
|
|
422
412
|
if (children.props.onTouchEnd) {
|
|
423
413
|
children.props.onTouchEnd(event);
|
|
424
414
|
}
|
|
425
415
|
stopTouchInteraction();
|
|
426
|
-
|
|
427
|
-
leaveTimer.current = setTimeout(() => {
|
|
416
|
+
leaveTimer.start(leaveTouchDelay, () => {
|
|
428
417
|
handleClose(event);
|
|
429
|
-
}
|
|
418
|
+
});
|
|
430
419
|
};
|
|
431
420
|
React.useEffect(() => {
|
|
432
421
|
if (!open) {
|
package/node/index.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v5.15.
|
|
2
|
+
* @mui/material v5.15.7
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
"use strict";
|
|
9
|
-
'use client';
|
|
10
9
|
|
|
11
|
-
/* eslint-disable import/export */
|
|
12
10
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
13
11
|
Object.defineProperty(exports, "__esModule", {
|
|
14
12
|
value: true
|
|
@@ -4,10 +4,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
exports.createUseThemeProps = createUseThemeProps;
|
|
7
8
|
Object.defineProperty(exports, "styled", {
|
|
8
9
|
enumerable: true,
|
|
9
10
|
get: function () {
|
|
10
11
|
return _styled.default;
|
|
11
12
|
}
|
|
12
13
|
});
|
|
13
|
-
var
|
|
14
|
+
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
15
|
+
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
|
+
function createUseThemeProps(name) {
|
|
18
|
+
return _useThemeProps.default;
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"url": "https://opencollective.com/mui-org"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@babel/runtime": "^7.23.
|
|
30
|
+
"@babel/runtime": "^7.23.9",
|
|
31
31
|
"@types/react-transition-group": "^4.4.10",
|
|
32
32
|
"clsx": "^2.1.0",
|
|
33
33
|
"csstype": "^3.1.2",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"react-is": "^18.2.0",
|
|
36
36
|
"react-transition-group": "^4.4.5",
|
|
37
|
-
"@mui/base": "5.0.0-beta.
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/
|
|
40
|
-
"@mui/
|
|
41
|
-
"@mui/
|
|
37
|
+
"@mui/base": "5.0.0-beta.34",
|
|
38
|
+
"@mui/types": "^7.2.13",
|
|
39
|
+
"@mui/core-downloads-tracker": "^5.15.7",
|
|
40
|
+
"@mui/system": "^5.15.7",
|
|
41
|
+
"@mui/utils": "^5.15.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
import { OverridableStringUnion } from '@mui/types';
|
|
3
|
-
import { SxConfig, SxProps, CSSObject } from '@mui/system';
|
|
3
|
+
import { SxConfig, SxProps, CSSObject, ApplyStyles } from '@mui/system';
|
|
4
4
|
import { ThemeOptions, Theme } from './createTheme';
|
|
5
5
|
import { Palette, PaletteOptions } from './createPalette';
|
|
6
6
|
import { Shadows } from './shadows';
|
|
@@ -432,6 +432,7 @@ export interface CssVarsTheme extends ColorSystem {
|
|
|
432
432
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
433
433
|
unstable_sxConfig: SxConfig;
|
|
434
434
|
unstable_sx: (props: SxProps<CssVarsTheme>) => CSSObject;
|
|
435
|
+
applyStyles: ApplyStyles<SupportedColorScheme>;
|
|
435
436
|
}
|
|
436
437
|
|
|
437
438
|
/**
|
|
@@ -443,4 +444,4 @@ export interface CssVarsTheme extends ColorSystem {
|
|
|
443
444
|
export default function experimental_extendTheme(
|
|
444
445
|
options?: CssVarsThemeOptions,
|
|
445
446
|
...args: object[]
|
|
446
|
-
): Omit<Theme, 'palette'> & CssVarsTheme;
|
|
447
|
+
): Omit<Theme, 'palette' | 'applyStyles'> & CssVarsTheme;
|