@mui/material 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.mts +2 -2
- package/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +3 -2
- package/Accordion/Accordion.mjs +3 -2
- package/AccordionSummary/AccordionSummary.js +27 -29
- package/AccordionSummary/AccordionSummary.mjs +27 -29
- package/Autocomplete/Autocomplete.js +8 -6
- package/Autocomplete/Autocomplete.mjs +8 -6
- package/Backdrop/Backdrop.d.mts +2 -2
- package/Backdrop/Backdrop.d.ts +2 -2
- package/Badge/Badge.js +28 -24
- package/Badge/Badge.mjs +28 -24
- package/BottomNavigationAction/BottomNavigationAction.js +6 -2
- package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
- package/Button/Button.js +11 -15
- package/Button/Button.mjs +11 -15
- package/ButtonBase/Ripple.js +21 -11
- package/ButtonBase/Ripple.mjs +21 -11
- package/ButtonBase/TouchRipple.js +252 -116
- package/ButtonBase/TouchRipple.mjs +253 -117
- package/CHANGELOG.md +84 -0
- package/CardActionArea/CardActionArea.js +2 -1
- package/CardActionArea/CardActionArea.mjs +2 -1
- package/Chip/Chip.js +2 -1
- package/Chip/Chip.mjs +2 -1
- package/CircularProgress/CircularProgress.js +85 -55
- package/CircularProgress/CircularProgress.mjs +84 -55
- package/Collapse/Collapse.d.mts +15 -3
- package/Collapse/Collapse.d.ts +15 -3
- package/Collapse/Collapse.js +44 -31
- package/Collapse/Collapse.mjs +43 -30
- package/Dialog/Dialog.d.mts +2 -2
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.js +2 -0
- package/Dialog/Dialog.mjs +2 -0
- package/Drawer/Drawer.d.mts +2 -2
- package/Drawer/Drawer.d.ts +2 -2
- package/Fab/Fab.js +2 -1
- package/Fab/Fab.mjs +2 -1
- package/Fade/Fade.d.mts +15 -2
- package/Fade/Fade.d.ts +15 -2
- package/Fade/Fade.js +46 -19
- package/Fade/Fade.mjs +45 -18
- package/FilledInput/FilledInput.js +4 -3
- package/FilledInput/FilledInput.mjs +4 -3
- package/Grow/Grow.d.mts +15 -2
- package/Grow/Grow.d.ts +15 -2
- package/Grow/Grow.js +45 -28
- package/Grow/Grow.mjs +44 -27
- package/IconButton/IconButton.js +2 -1
- package/IconButton/IconButton.mjs +2 -1
- package/Input/Input.js +3 -2
- package/Input/Input.mjs +3 -2
- package/InputBase/InputBase.js +2 -1
- package/InputBase/InputBase.mjs +2 -1
- package/InputLabel/InputLabel.js +2 -1
- package/InputLabel/InputLabel.mjs +2 -1
- package/LICENSE +1 -1
- package/LinearProgress/LinearProgress.js +187 -120
- package/LinearProgress/LinearProgress.mjs +186 -120
- package/ListItem/ListItem.js +2 -1
- package/ListItem/ListItem.mjs +2 -1
- package/ListItemButton/ListItemButton.js +2 -1
- package/ListItemButton/ListItemButton.mjs +2 -1
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/MobileStepper/MobileStepper.js +2 -1
- package/MobileStepper/MobileStepper.mjs +2 -1
- package/OutlinedInput/NotchedOutline.js +4 -3
- package/OutlinedInput/NotchedOutline.mjs +4 -3
- package/PaginationItem/PaginationItem.js +2 -1
- package/PaginationItem/PaginationItem.mjs +2 -1
- package/Paper/Paper.js +2 -1
- package/Paper/Paper.mjs +2 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/README.md +3 -2
- package/Radio/RadioButtonIcon.js +3 -2
- package/Radio/RadioButtonIcon.mjs +3 -2
- package/Rating/Rating.js +2 -1
- package/Rating/Rating.mjs +2 -1
- package/Select/SelectInput.js +115 -25
- package/Select/SelectInput.mjs +115 -25
- package/Select/utils/closedTypeahead.js +73 -0
- package/Select/utils/closedTypeahead.mjs +63 -0
- package/Skeleton/Skeleton.js +22 -2
- package/Skeleton/Skeleton.mjs +22 -2
- package/Slide/Slide.d.mts +15 -2
- package/Slide/Slide.d.ts +15 -2
- package/Slide/Slide.js +53 -25
- package/Slide/Slide.mjs +52 -24
- package/Slider/Slider.js +4 -3
- package/Slider/Slider.mjs +4 -3
- package/Slider/useSlider.js +1 -1
- package/Slider/useSlider.mjs +1 -1
- package/Snackbar/Snackbar.d.mts +2 -2
- package/Snackbar/Snackbar.d.ts +2 -2
- package/SpeedDial/SpeedDial.d.mts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +6 -2
- package/SpeedDial/SpeedDial.mjs +6 -2
- package/SpeedDialAction/SpeedDialAction.js +11 -2
- package/SpeedDialAction/SpeedDialAction.mjs +12 -3
- package/SpeedDialIcon/SpeedDialIcon.js +40 -37
- package/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
- package/Step/Step.js +47 -15
- package/Step/Step.mjs +47 -15
- package/StepButton/StepButton.js +9 -3
- package/StepButton/StepButton.mjs +9 -3
- package/StepConnector/StepConnector.js +10 -0
- package/StepConnector/StepConnector.mjs +10 -0
- package/StepContent/StepContent.d.mts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepContent/StepContent.js +26 -2
- package/StepContent/StepContent.mjs +26 -2
- package/StepIcon/StepIcon.js +2 -1
- package/StepIcon/StepIcon.mjs +2 -1
- package/StepLabel/StepLabel.js +52 -7
- package/StepLabel/StepLabel.mjs +52 -7
- package/Stepper/Stepper.d.mts +2 -0
- package/Stepper/Stepper.d.ts +2 -0
- package/Stepper/Stepper.js +18 -0
- package/Stepper/Stepper.mjs +18 -0
- package/SvgIcon/SvgIcon.js +2 -1
- package/SvgIcon/SvgIcon.mjs +2 -1
- package/SwipeableDrawer/SwipeableDrawer.js +14 -3
- package/SwipeableDrawer/SwipeableDrawer.mjs +14 -3
- package/Switch/Switch.js +3 -2
- package/Switch/Switch.mjs +3 -2
- package/TableSortLabel/TableSortLabel.js +2 -1
- package/TableSortLabel/TableSortLabel.mjs +2 -1
- package/Tabs/Tabs.js +14 -3
- package/Tabs/Tabs.mjs +14 -3
- package/Tooltip/Tooltip.d.mts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +3 -0
- package/Tooltip/Tooltip.mjs +3 -0
- package/Unstable_TrapFocus/FocusTrap.js +42 -8
- package/Unstable_TrapFocus/FocusTrap.mjs +42 -8
- package/Zoom/Zoom.d.mts +15 -2
- package/Zoom/Zoom.d.ts +15 -2
- package/Zoom/Zoom.js +43 -16
- package/Zoom/Zoom.mjs +42 -15
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/Transition.d.mts +34 -0
- package/internal/Transition.d.ts +34 -0
- package/internal/Transition.js +444 -0
- package/internal/Transition.mjs +436 -0
- package/internal/react-transition-group.d.mts +8 -0
- package/internal/react-transition-group.d.ts +8 -0
- package/package.json +6 -6
- package/styles/createMotion.d.mts +8 -0
- package/styles/createMotion.d.ts +8 -0
- package/styles/createMotion.js +13 -0
- package/styles/createMotion.mjs +7 -0
- package/styles/createThemeFoundation.d.mts +2 -0
- package/styles/createThemeFoundation.d.ts +2 -0
- package/styles/createThemeNoVars.d.mts +3 -0
- package/styles/createThemeNoVars.d.ts +3 -0
- package/styles/createThemeNoVars.js +5 -0
- package/styles/createThemeNoVars.mjs +5 -0
- package/styles/createTransitions.d.mts +6 -2
- package/styles/createTransitions.d.ts +6 -2
- package/styles/createTransitions.js +12 -4
- package/styles/createTransitions.mjs +12 -4
- package/styles/enhanceHighContrast.d.mts +70 -0
- package/styles/enhanceHighContrast.d.ts +70 -0
- package/styles/enhanceHighContrast.js +502 -0
- package/styles/enhanceHighContrast.mjs +495 -0
- package/styles/index.d.mts +2 -0
- package/styles/index.d.ts +2 -0
- package/styles/index.js +8 -0
- package/styles/index.mjs +1 -0
- package/styles/reducedMotion.d.mts +7 -0
- package/styles/reducedMotion.d.ts +7 -0
- package/styles/reducedMotion.js +21 -0
- package/styles/reducedMotion.mjs +14 -0
- package/styles/shouldSkipGeneratingVar.js +1 -1
- package/styles/shouldSkipGeneratingVar.mjs +1 -1
- package/styles/stringifyTheme.js +1 -0
- package/styles/stringifyTheme.mjs +1 -0
- package/transitions/index.d.mts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/index.js +0 -11
- package/transitions/index.mjs +1 -1
- package/transitions/transition.d.mts +1 -12
- package/transitions/transition.d.ts +1 -12
- package/transitions/types.d.mts +73 -0
- package/transitions/types.d.ts +73 -0
- package/transitions/useReducedMotion.d.mts +14 -0
- package/transitions/useReducedMotion.d.ts +14 -0
- package/transitions/useReducedMotion.js +117 -0
- package/transitions/useReducedMotion.mjs +110 -0
- package/transitions/utils.d.mts +34 -2
- package/transitions/utils.d.ts +34 -2
- package/transitions/utils.js +33 -4
- package/transitions/utils.mjs +31 -4
- package/useAutocomplete/useAutocomplete.d.mts +8 -1
- package/useAutocomplete/useAutocomplete.d.ts +8 -1
- package/useAutocomplete/useAutocomplete.js +66 -4
- package/useAutocomplete/useAutocomplete.mjs +66 -4
- package/version/index.js +3 -3
- package/version/index.mjs +3 -3
- /package/transitions/{transition.js → types.js} +0 -0
- /package/transitions/{transition.mjs → types.mjs} +0 -0
|
@@ -10,9 +10,23 @@ import memoTheme from "../utils/memoTheme.mjs";
|
|
|
10
10
|
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.mjs";
|
|
11
11
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
12
12
|
import capitalize from "../utils/capitalize.mjs";
|
|
13
|
+
import { getReducedMotionStyles, getTransitionStyles } from "../transitions/utils.mjs";
|
|
13
14
|
import { getLinearProgressUtilityClass } from "./linearProgressClasses.mjs";
|
|
14
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
16
|
const TRANSITION_DURATION = 4; // seconds
|
|
17
|
+
const EMPTY_STYLE = {};
|
|
18
|
+
let warnedMinMaxWithoutVariant = false;
|
|
19
|
+
let warnedInvalidMinMaxValue = false;
|
|
20
|
+
let warnedValueRequired = false;
|
|
21
|
+
let warnedInvalidMinMaxValueBuffer = false;
|
|
22
|
+
let warnedValueBufferRequired = false;
|
|
23
|
+
export function resetWarningFlags() {
|
|
24
|
+
warnedMinMaxWithoutVariant = false;
|
|
25
|
+
warnedInvalidMinMaxValue = false;
|
|
26
|
+
warnedValueRequired = false;
|
|
27
|
+
warnedInvalidMinMaxValueBuffer = false;
|
|
28
|
+
warnedValueBufferRequired = false;
|
|
29
|
+
}
|
|
16
30
|
const indeterminate1Keyframe = keyframes`
|
|
17
31
|
0% {
|
|
18
32
|
left: -35%;
|
|
@@ -188,7 +202,11 @@ const LinearProgressDashed = styled('span', {
|
|
|
188
202
|
})), bufferAnimation || {
|
|
189
203
|
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
190
204
|
animation: `${bufferKeyframe} 3s infinite linear`
|
|
191
|
-
}
|
|
205
|
+
}, memoTheme(({
|
|
206
|
+
theme
|
|
207
|
+
}) => getReducedMotionStyles(theme, {
|
|
208
|
+
animation: 'none'
|
|
209
|
+
}) || EMPTY_STYLE));
|
|
192
210
|
const LinearProgressBar1 = styled('span', {
|
|
193
211
|
name: 'MuiLinearProgress',
|
|
194
212
|
slot: 'Bar1',
|
|
@@ -197,59 +215,81 @@ const LinearProgressBar1 = styled('span', {
|
|
|
197
215
|
}
|
|
198
216
|
})(memoTheme(({
|
|
199
217
|
theme
|
|
200
|
-
}) =>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
218
|
+
}) => {
|
|
219
|
+
const reducedMotionIndeterminateStyles = getReducedMotionStyles(theme, {
|
|
220
|
+
animation: 'none',
|
|
221
|
+
left: '30%',
|
|
222
|
+
right: 'auto',
|
|
223
|
+
width: '40%'
|
|
224
|
+
});
|
|
225
|
+
return {
|
|
226
|
+
width: '100%',
|
|
227
|
+
position: 'absolute',
|
|
228
|
+
left: 0,
|
|
229
|
+
bottom: 0,
|
|
230
|
+
top: 0,
|
|
231
|
+
...getTransitionStyles(theme, 'transform', {
|
|
232
|
+
duration: '0.2s',
|
|
233
|
+
easing: 'linear'
|
|
234
|
+
}),
|
|
235
|
+
transformOrigin: 'left',
|
|
236
|
+
variants: [{
|
|
237
|
+
props: {
|
|
238
|
+
color: 'inherit'
|
|
239
|
+
},
|
|
240
|
+
style: {
|
|
241
|
+
backgroundColor: 'currentColor'
|
|
242
|
+
}
|
|
243
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
244
|
+
props: {
|
|
245
|
+
color
|
|
246
|
+
},
|
|
247
|
+
style: {
|
|
248
|
+
backgroundColor: (theme.vars || theme).palette[color].main
|
|
249
|
+
}
|
|
250
|
+
})), {
|
|
251
|
+
props: {
|
|
252
|
+
variant: 'determinate'
|
|
253
|
+
},
|
|
254
|
+
style: {
|
|
255
|
+
...getTransitionStyles(theme, 'transform', {
|
|
256
|
+
duration: `.${TRANSITION_DURATION}s`,
|
|
257
|
+
easing: 'linear'
|
|
258
|
+
})
|
|
259
|
+
}
|
|
260
|
+
}, {
|
|
261
|
+
props: {
|
|
262
|
+
variant: 'buffer'
|
|
263
|
+
},
|
|
264
|
+
style: {
|
|
265
|
+
zIndex: 1,
|
|
266
|
+
...getTransitionStyles(theme, 'transform', {
|
|
267
|
+
duration: `.${TRANSITION_DURATION}s`,
|
|
268
|
+
easing: 'linear'
|
|
269
|
+
})
|
|
270
|
+
}
|
|
271
|
+
}, {
|
|
272
|
+
props: ({
|
|
273
|
+
ownerState
|
|
274
|
+
}) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
|
|
275
|
+
style: {
|
|
276
|
+
width: 'auto'
|
|
277
|
+
}
|
|
278
|
+
}, {
|
|
279
|
+
props: ({
|
|
280
|
+
ownerState
|
|
281
|
+
}) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
|
|
282
|
+
style: indeterminate1Animation || {
|
|
283
|
+
animation: `${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
|
|
284
|
+
}
|
|
285
|
+
}, ...(reducedMotionIndeterminateStyles ? [{
|
|
286
|
+
props: ({
|
|
287
|
+
ownerState
|
|
288
|
+
}) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
|
|
289
|
+
style: reducedMotionIndeterminateStyles
|
|
290
|
+
}] : [])]
|
|
291
|
+
};
|
|
292
|
+
}));
|
|
253
293
|
const LinearProgressBar2 = styled('span', {
|
|
254
294
|
name: 'MuiLinearProgress',
|
|
255
295
|
slot: 'Bar2',
|
|
@@ -258,67 +298,84 @@ const LinearProgressBar2 = styled('span', {
|
|
|
258
298
|
}
|
|
259
299
|
})(memoTheme(({
|
|
260
300
|
theme
|
|
261
|
-
}) =>
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
'
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
301
|
+
}) => {
|
|
302
|
+
const reducedMotionIndeterminateStyles = getReducedMotionStyles(theme, {
|
|
303
|
+
animation: 'none',
|
|
304
|
+
display: 'none'
|
|
305
|
+
});
|
|
306
|
+
return {
|
|
307
|
+
width: '100%',
|
|
308
|
+
position: 'absolute',
|
|
309
|
+
left: 0,
|
|
310
|
+
bottom: 0,
|
|
311
|
+
top: 0,
|
|
312
|
+
...getTransitionStyles(theme, 'transform', {
|
|
313
|
+
duration: '0.2s',
|
|
314
|
+
easing: 'linear'
|
|
315
|
+
}),
|
|
316
|
+
transformOrigin: 'left',
|
|
317
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
318
|
+
props: {
|
|
319
|
+
color
|
|
320
|
+
},
|
|
321
|
+
style: {
|
|
322
|
+
'--LinearProgressBar2-barColor': (theme.vars || theme).palette[color].main
|
|
323
|
+
}
|
|
324
|
+
})), {
|
|
325
|
+
props: ({
|
|
326
|
+
ownerState
|
|
327
|
+
}) => ownerState.variant !== 'buffer' && ownerState.color !== 'inherit',
|
|
328
|
+
style: {
|
|
329
|
+
backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'
|
|
330
|
+
}
|
|
331
|
+
}, {
|
|
332
|
+
props: ({
|
|
333
|
+
ownerState
|
|
334
|
+
}) => ownerState.variant !== 'buffer' && ownerState.color === 'inherit',
|
|
335
|
+
style: {
|
|
336
|
+
backgroundColor: 'currentColor'
|
|
337
|
+
}
|
|
338
|
+
}, {
|
|
339
|
+
props: {
|
|
340
|
+
color: 'inherit'
|
|
341
|
+
},
|
|
342
|
+
style: {
|
|
343
|
+
opacity: 0.3
|
|
344
|
+
}
|
|
345
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
346
|
+
props: {
|
|
347
|
+
color,
|
|
348
|
+
variant: 'buffer'
|
|
349
|
+
},
|
|
350
|
+
style: {
|
|
351
|
+
backgroundColor: getColorShade(theme, color),
|
|
352
|
+
...getTransitionStyles(theme, 'transform', {
|
|
353
|
+
duration: `.${TRANSITION_DURATION}s`,
|
|
354
|
+
easing: 'linear'
|
|
355
|
+
})
|
|
356
|
+
}
|
|
357
|
+
})), {
|
|
358
|
+
props: ({
|
|
359
|
+
ownerState
|
|
360
|
+
}) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
|
|
361
|
+
style: {
|
|
362
|
+
width: 'auto'
|
|
363
|
+
}
|
|
364
|
+
}, {
|
|
365
|
+
props: ({
|
|
366
|
+
ownerState
|
|
367
|
+
}) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
|
|
368
|
+
style: indeterminate2Animation || {
|
|
369
|
+
animation: `${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`
|
|
370
|
+
}
|
|
371
|
+
}, ...(reducedMotionIndeterminateStyles ? [{
|
|
372
|
+
props: ({
|
|
373
|
+
ownerState
|
|
374
|
+
}) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',
|
|
375
|
+
style: reducedMotionIndeterminateStyles
|
|
376
|
+
}] : [])]
|
|
377
|
+
};
|
|
378
|
+
}));
|
|
322
379
|
|
|
323
380
|
/**
|
|
324
381
|
* ## ARIA
|
|
@@ -348,8 +405,9 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
|
|
|
348
405
|
variant
|
|
349
406
|
};
|
|
350
407
|
if (process.env.NODE_ENV !== 'production') {
|
|
351
|
-
if (['indeterminate', 'query'].includes(variant) && (minProp !== undefined || maxProp !== undefined)) {
|
|
408
|
+
if (!warnedMinMaxWithoutVariant && ['indeterminate', 'query'].includes(variant) && (minProp !== undefined || maxProp !== undefined)) {
|
|
352
409
|
console.warn(`MUI: You have provided the \`min\` or \`max\` props with an 'indeterminate' or 'query' variant. These props will have no effect.`);
|
|
410
|
+
warnedMinMaxWithoutVariant = true;
|
|
353
411
|
}
|
|
354
412
|
}
|
|
355
413
|
const min = minProp ?? 0;
|
|
@@ -364,8 +422,9 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
|
|
|
364
422
|
if (variant === 'determinate' || variant === 'buffer') {
|
|
365
423
|
if (value !== undefined) {
|
|
366
424
|
if (process.env.NODE_ENV !== 'production') {
|
|
367
|
-
if (value < min || value > max || min >= max) {
|
|
425
|
+
if (!warnedInvalidMinMaxValue && (value < min || value > max || min >= max)) {
|
|
368
426
|
console.error(`MUI: The min, max, and value props in LinearProgress should be numbers where min < max and min <= value <= max. Received min=${min}, max=${max}, value=${value}.`);
|
|
427
|
+
warnedInvalidMinMaxValue = true;
|
|
369
428
|
}
|
|
370
429
|
}
|
|
371
430
|
const range = max - min;
|
|
@@ -379,14 +438,18 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
|
|
|
379
438
|
rootProps['aria-valuemin'] = min;
|
|
380
439
|
rootProps['aria-valuemax'] = max;
|
|
381
440
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
382
|
-
|
|
441
|
+
if (!warnedValueRequired) {
|
|
442
|
+
console.error('MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress.');
|
|
443
|
+
warnedValueRequired = true;
|
|
444
|
+
}
|
|
383
445
|
}
|
|
384
446
|
}
|
|
385
447
|
if (variant === 'buffer') {
|
|
386
448
|
if (valueBuffer !== undefined) {
|
|
387
449
|
if (process.env.NODE_ENV !== 'production') {
|
|
388
|
-
if (valueBuffer < min || valueBuffer > max || valueBuffer < value || min >= max) {
|
|
450
|
+
if (!warnedInvalidMinMaxValueBuffer && (valueBuffer < min || valueBuffer > max || valueBuffer < value || min >= max)) {
|
|
389
451
|
console.error(`MUI: The min, max, value, and valueBuffer props in LinearProgress should be numbers where min < max and min <= value <= valueBuffer <= max. Received min=${min}, max=${max}, value=${value}, valueBuffer=${valueBuffer}.`);
|
|
452
|
+
warnedInvalidMinMaxValueBuffer = true;
|
|
390
453
|
}
|
|
391
454
|
}
|
|
392
455
|
const range = max - min;
|
|
@@ -396,7 +459,10 @@ const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inP
|
|
|
396
459
|
}
|
|
397
460
|
inlineStyles.bar2.transform = range > 0 ? `translateX(${transform}%)` : 'translateX(-100%)'; // empty-state fallback when range is invalid
|
|
398
461
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
399
|
-
|
|
462
|
+
if (!warnedValueBufferRequired) {
|
|
463
|
+
console.error('MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.');
|
|
464
|
+
warnedValueBufferRequired = true;
|
|
465
|
+
}
|
|
400
466
|
}
|
|
401
467
|
}
|
|
402
468
|
return /*#__PURE__*/_jsxs(LinearProgressRoot, {
|
package/ListItem/ListItem.js
CHANGED
|
@@ -19,6 +19,7 @@ var _ListContext = _interopRequireDefault(require("../List/ListContext"));
|
|
|
19
19
|
var _listItemClasses = require("./listItemClasses");
|
|
20
20
|
var _ListItemButton = require("../ListItemButton");
|
|
21
21
|
var _ListItemSecondaryAction = _interopRequireDefault(require("../ListItemSecondaryAction"));
|
|
22
|
+
var _utils = require("../transitions/utils");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const overridesResolver = (props, styles) => {
|
|
24
25
|
const {
|
|
@@ -119,7 +120,7 @@ const ListItemRoot = exports.ListItemRoot = (0, _zeroStyled.styled)('div', {
|
|
|
119
120
|
ownerState
|
|
120
121
|
}) => ownerState.button,
|
|
121
122
|
style: {
|
|
122
|
-
|
|
123
|
+
...(0, _utils.getTransitionStyles)(theme, 'background-color', {
|
|
123
124
|
duration: theme.transitions.duration.shortest
|
|
124
125
|
}),
|
|
125
126
|
'&:hover': {
|
package/ListItem/ListItem.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import ListContext from "../List/ListContext.mjs";
|
|
|
12
12
|
import { getListItemUtilityClass } from "./listItemClasses.mjs";
|
|
13
13
|
import { listItemButtonClasses } from "../ListItemButton/index.mjs";
|
|
14
14
|
import ListItemSecondaryAction from "../ListItemSecondaryAction/index.mjs";
|
|
15
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
export const overridesResolver = (props, styles) => {
|
|
17
18
|
const {
|
|
@@ -111,7 +112,7 @@ export const ListItemRoot = styled('div', {
|
|
|
111
112
|
ownerState
|
|
112
113
|
}) => ownerState.button,
|
|
113
114
|
style: {
|
|
114
|
-
|
|
115
|
+
...getTransitionStyles(theme, 'background-color', {
|
|
115
116
|
duration: theme.transitions.duration.shortest
|
|
116
117
|
}),
|
|
117
118
|
'&:hover': {
|
|
@@ -20,6 +20,7 @@ var _useEnhancedEffect = _interopRequireDefault(require("../utils/useEnhancedEff
|
|
|
20
20
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
21
21
|
var _ListContext = _interopRequireDefault(require("../List/ListContext"));
|
|
22
22
|
var _listItemButtonClasses = _interopRequireWildcard(require("./listItemButtonClasses"));
|
|
23
|
+
var _utils = require("../transitions/utils");
|
|
23
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
25
|
const overridesResolver = (props, styles) => {
|
|
25
26
|
const {
|
|
@@ -66,7 +67,7 @@ const ListItemButtonRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
66
67
|
textAlign: 'left',
|
|
67
68
|
paddingTop: 8,
|
|
68
69
|
paddingBottom: 8,
|
|
69
|
-
|
|
70
|
+
...(0, _utils.getTransitionStyles)(theme, 'background-color', {
|
|
70
71
|
duration: theme.transitions.duration.shortest
|
|
71
72
|
}),
|
|
72
73
|
'&:hover': {
|
|
@@ -13,6 +13,7 @@ import useEnhancedEffect from "../utils/useEnhancedEffect.mjs";
|
|
|
13
13
|
import useForkRef from "../utils/useForkRef.mjs";
|
|
14
14
|
import ListContext from "../List/ListContext.mjs";
|
|
15
15
|
import listItemButtonClasses, { getListItemButtonUtilityClass } from "./listItemButtonClasses.mjs";
|
|
16
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
18
|
export const overridesResolver = (props, styles) => {
|
|
18
19
|
const {
|
|
@@ -58,7 +59,7 @@ const ListItemButtonRoot = styled(ButtonBase, {
|
|
|
58
59
|
textAlign: 'left',
|
|
59
60
|
paddingTop: 8,
|
|
60
61
|
paddingBottom: 8,
|
|
61
|
-
|
|
62
|
+
...getTransitionStyles(theme, 'background-color', {
|
|
62
63
|
duration: theme.transitions.duration.shortest
|
|
63
64
|
}),
|
|
64
65
|
'&:hover': {
|
package/Menu/Menu.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ import { PopoverProps } from "../Popover/index.mjs";
|
|
|
7
7
|
import { MenuListProps } from "../MenuList/index.mjs";
|
|
8
8
|
import { ModalProps } from "../Modal/index.mjs";
|
|
9
9
|
import { BackdropProps } from "../Backdrop/index.mjs";
|
|
10
|
-
import { TransitionProps } from "../transitions/
|
|
10
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
11
11
|
import { MenuClasses } from "./menuClasses.mjs";
|
|
12
12
|
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.mjs";
|
|
13
13
|
export interface MenuRootSlotPropsOverrides {}
|
package/Menu/Menu.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { PopoverProps } from "../Popover/index.js";
|
|
|
7
7
|
import { MenuListProps } from "../MenuList/index.js";
|
|
8
8
|
import { ModalProps } from "../Modal/index.js";
|
|
9
9
|
import { BackdropProps } from "../Backdrop/index.js";
|
|
10
|
-
import { TransitionProps } from "../transitions/
|
|
10
|
+
import { TransitionProps } from "../transitions/types.js";
|
|
11
11
|
import { MenuClasses } from "./menuClasses.js";
|
|
12
12
|
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
|
|
13
13
|
export interface MenuRootSlotPropsOverrides {}
|
|
@@ -21,6 +21,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
|
21
21
|
var _slotShouldForwardProp = _interopRequireDefault(require("../styles/slotShouldForwardProp"));
|
|
22
22
|
var _mobileStepperClasses = require("./mobileStepperClasses");
|
|
23
23
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
24
|
+
var _utils = require("../transitions/utils");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const useUtilityClasses = ownerState => {
|
|
26
27
|
const {
|
|
@@ -112,7 +113,7 @@ const MobileStepperDot = (0, _zeroStyled.styled)('div', {
|
|
|
112
113
|
variant: 'dots'
|
|
113
114
|
},
|
|
114
115
|
style: {
|
|
115
|
-
|
|
116
|
+
...(0, _utils.getTransitionStyles)(theme, 'background-color', {
|
|
116
117
|
duration: theme.transitions.duration.shortest
|
|
117
118
|
}),
|
|
118
119
|
backgroundColor: (theme.vars || theme).palette.action.disabled,
|
|
@@ -14,6 +14,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
|
14
14
|
import slotShouldForwardProp from "../styles/slotShouldForwardProp.mjs";
|
|
15
15
|
import { getMobileStepperUtilityClass } from "./mobileStepperClasses.mjs";
|
|
16
16
|
import useSlot from "../utils/useSlot.mjs";
|
|
17
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
17
18
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
const useUtilityClasses = ownerState => {
|
|
19
20
|
const {
|
|
@@ -105,7 +106,7 @@ const MobileStepperDot = styled('div', {
|
|
|
105
106
|
variant: 'dots'
|
|
106
107
|
},
|
|
107
108
|
style: {
|
|
108
|
-
|
|
109
|
+
...getTransitionStyles(theme, 'background-color', {
|
|
109
110
|
duration: theme.transitions.duration.shortest
|
|
110
111
|
}),
|
|
111
112
|
backgroundColor: (theme.vars || theme).palette.action.disabled,
|
|
@@ -10,6 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
11
11
|
var _zeroStyled = require("../zero-styled");
|
|
12
12
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
13
|
+
var _utils = require("../transitions/utils");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
var _span;
|
|
15
16
|
const NotchedOutlineRoot = (0, _zeroStyled.styled)('fieldset', {
|
|
@@ -51,7 +52,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
|
|
|
51
52
|
padding: 0,
|
|
52
53
|
lineHeight: '11px',
|
|
53
54
|
// sync with `height` in `legend` styles
|
|
54
|
-
|
|
55
|
+
...(0, _utils.getTransitionStyles)(theme, 'width', {
|
|
55
56
|
duration: 150,
|
|
56
57
|
easing: theme.transitions.easing.easeOut
|
|
57
58
|
})
|
|
@@ -69,7 +70,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
|
|
|
69
70
|
fontSize: '0.75em',
|
|
70
71
|
visibility: 'hidden',
|
|
71
72
|
maxWidth: 0.01,
|
|
72
|
-
|
|
73
|
+
...(0, _utils.getTransitionStyles)(theme, 'max-width', {
|
|
73
74
|
duration: 50,
|
|
74
75
|
easing: theme.transitions.easing.easeOut
|
|
75
76
|
}),
|
|
@@ -88,7 +89,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
|
|
|
88
89
|
}) => ownerState.withLabel && ownerState.notched,
|
|
89
90
|
style: {
|
|
90
91
|
maxWidth: '100%',
|
|
91
|
-
|
|
92
|
+
...(0, _utils.getTransitionStyles)(theme, 'max-width', {
|
|
92
93
|
duration: 100,
|
|
93
94
|
easing: theme.transitions.easing.easeOut,
|
|
94
95
|
delay: 50
|
|
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.mjs";
|
|
6
6
|
import { styled } from "../zero-styled/index.mjs";
|
|
7
7
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
8
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
const NotchedOutlineRoot = styled('fieldset', {
|
|
10
11
|
name: 'MuiNotchedOutlined',
|
|
@@ -45,7 +46,7 @@ const NotchedOutlineLegend = styled('legend', {
|
|
|
45
46
|
padding: 0,
|
|
46
47
|
lineHeight: '11px',
|
|
47
48
|
// sync with `height` in `legend` styles
|
|
48
|
-
|
|
49
|
+
...getTransitionStyles(theme, 'width', {
|
|
49
50
|
duration: 150,
|
|
50
51
|
easing: theme.transitions.easing.easeOut
|
|
51
52
|
})
|
|
@@ -63,7 +64,7 @@ const NotchedOutlineLegend = styled('legend', {
|
|
|
63
64
|
fontSize: '0.75em',
|
|
64
65
|
visibility: 'hidden',
|
|
65
66
|
maxWidth: 0.01,
|
|
66
|
-
|
|
67
|
+
...getTransitionStyles(theme, 'max-width', {
|
|
67
68
|
duration: 50,
|
|
68
69
|
easing: theme.transitions.easing.easeOut
|
|
69
70
|
}),
|
|
@@ -82,7 +83,7 @@ const NotchedOutlineLegend = styled('legend', {
|
|
|
82
83
|
}) => ownerState.withLabel && ownerState.notched,
|
|
83
84
|
style: {
|
|
84
85
|
maxWidth: '100%',
|
|
85
|
-
|
|
86
|
+
...getTransitionStyles(theme, 'max-width', {
|
|
86
87
|
duration: 100,
|
|
87
88
|
easing: theme.transitions.easing.easeOut,
|
|
88
89
|
delay: 50
|
|
@@ -24,6 +24,7 @@ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
|
24
24
|
var _zeroStyled = require("../zero-styled");
|
|
25
25
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
26
26
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
27
|
+
var _utils = require("../transitions/utils");
|
|
27
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
29
|
const overridesResolver = (props, styles) => {
|
|
29
30
|
const {
|
|
@@ -119,7 +120,7 @@ const PaginationItemPage = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
119
120
|
[`&.${_paginationItemClasses.default.disabled}`]: {
|
|
120
121
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
121
122
|
},
|
|
122
|
-
|
|
123
|
+
...(0, _utils.getTransitionStyles)(theme, ['color', 'background-color'], {
|
|
123
124
|
duration: theme.transitions.duration.short
|
|
124
125
|
}),
|
|
125
126
|
'&:hover': {
|
|
@@ -17,6 +17,7 @@ import useSlot from "../utils/useSlot.mjs";
|
|
|
17
17
|
import { styled } from "../zero-styled/index.mjs";
|
|
18
18
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
19
19
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
20
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
20
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
22
|
const overridesResolver = (props, styles) => {
|
|
22
23
|
const {
|
|
@@ -112,7 +113,7 @@ const PaginationItemPage = styled(ButtonBase, {
|
|
|
112
113
|
[`&.${paginationItemClasses.disabled}`]: {
|
|
113
114
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
114
115
|
},
|
|
115
|
-
|
|
116
|
+
...getTransitionStyles(theme, ['color', 'background-color'], {
|
|
116
117
|
duration: theme.transitions.duration.short
|
|
117
118
|
}),
|
|
118
119
|
'&:hover': {
|
package/Paper/Paper.js
CHANGED
|
@@ -19,6 +19,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
19
19
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
20
20
|
var _getOverlayAlpha = _interopRequireDefault(require("../styles/getOverlayAlpha"));
|
|
21
21
|
var _paperClasses = require("./paperClasses");
|
|
22
|
+
var _utils = require("../transitions/utils");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
24
25
|
const {
|
|
@@ -46,7 +47,7 @@ const PaperRoot = (0, _zeroStyled.styled)('div', {
|
|
|
46
47
|
}) => ({
|
|
47
48
|
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
48
49
|
color: (theme.vars || theme).palette.text.primary,
|
|
49
|
-
|
|
50
|
+
...(0, _utils.getTransitionStyles)(theme, 'box-shadow'),
|
|
50
51
|
variants: [{
|
|
51
52
|
props: ({
|
|
52
53
|
ownerState
|
package/Paper/Paper.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import memoTheme from "../utils/memoTheme.mjs";
|
|
|
12
12
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
13
13
|
import getOverlayAlpha from "../styles/getOverlayAlpha.mjs";
|
|
14
14
|
import { getPaperUtilityClass } from "./paperClasses.mjs";
|
|
15
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
17
18
|
const {
|
|
@@ -39,7 +40,7 @@ const PaperRoot = styled('div', {
|
|
|
39
40
|
}) => ({
|
|
40
41
|
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
41
42
|
color: (theme.vars || theme).palette.text.primary,
|
|
42
|
-
|
|
43
|
+
...getTransitionStyles(theme, 'box-shadow'),
|
|
43
44
|
variants: [{
|
|
44
45
|
props: ({
|
|
45
46
|
ownerState
|
package/Popover/Popover.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import { Theme } from "../styles/index.mjs";
|
|
|
6
6
|
import { InternalStandardProps as StandardProps } from "../internal/index.mjs";
|
|
7
7
|
import { PaperProps } from "../Paper/index.mjs";
|
|
8
8
|
import { ModalProps } from "../Modal/index.mjs";
|
|
9
|
-
import { TransitionProps } from "../transitions/
|
|
9
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
10
10
|
import { PopoverClasses } from "./popoverClasses.mjs";
|
|
11
11
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
|
|
12
12
|
export interface PopoverSlots {
|