@mui/material 5.15.13 → 5.15.14

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.
Files changed (75) hide show
  1. package/Accordion/Accordion.js +30 -23
  2. package/AccordionActions/AccordionActions.js +14 -12
  3. package/AccordionDetails/AccordionDetails.js +2 -2
  4. package/AccordionSummary/AccordionSummary.js +29 -23
  5. package/Autocomplete/Autocomplete.d.ts +1 -1
  6. package/Autocomplete/Autocomplete.js +59 -33
  7. package/Autocomplete/autocompleteClasses.d.ts +3 -3
  8. package/CHANGELOG.md +116 -60
  9. package/CircularProgress/CircularProgress.d.ts +1 -1
  10. package/CircularProgress/CircularProgress.js +1 -1
  11. package/Icon/Icon.d.ts +1 -1
  12. package/Icon/Icon.js +1 -1
  13. package/OverridableComponent.d.ts +1 -1
  14. package/Popper/Popper.d.ts +3 -26
  15. package/README.md +2 -2
  16. package/Select/Select.d.ts +8 -20
  17. package/Slider/Slider.js +404 -223
  18. package/SvgIcon/SvgIcon.js +1 -1
  19. package/index.js +1 -1
  20. package/legacy/Accordion/Accordion.js +33 -22
  21. package/legacy/AccordionActions/AccordionActions.js +17 -14
  22. package/legacy/AccordionDetails/AccordionDetails.js +2 -2
  23. package/legacy/AccordionSummary/AccordionSummary.js +31 -22
  24. package/legacy/Autocomplete/Autocomplete.js +132 -113
  25. package/legacy/CircularProgress/CircularProgress.js +1 -1
  26. package/legacy/Icon/Icon.js +1 -1
  27. package/legacy/Slider/Slider.js +373 -191
  28. package/legacy/SvgIcon/SvgIcon.js +1 -1
  29. package/legacy/index.js +1 -1
  30. package/legacy/styles/experimental_extendTheme.js +1 -1
  31. package/legacy/styles/rootShouldForwardProp.js +5 -0
  32. package/legacy/styles/slotShouldForwardProp.js +5 -0
  33. package/legacy/styles/styled.js +4 -5
  34. package/legacy/usePagination/usePagination.js +1 -1
  35. package/modern/Accordion/Accordion.js +30 -23
  36. package/modern/AccordionActions/AccordionActions.js +14 -12
  37. package/modern/AccordionDetails/AccordionDetails.js +2 -2
  38. package/modern/AccordionSummary/AccordionSummary.js +29 -23
  39. package/modern/Autocomplete/Autocomplete.js +59 -33
  40. package/modern/CircularProgress/CircularProgress.js +1 -1
  41. package/modern/Icon/Icon.js +1 -1
  42. package/modern/Slider/Slider.js +337 -172
  43. package/modern/SvgIcon/SvgIcon.js +1 -1
  44. package/modern/index.js +1 -1
  45. package/modern/styles/experimental_extendTheme.js +1 -1
  46. package/modern/styles/rootShouldForwardProp.js +3 -0
  47. package/modern/styles/slotShouldForwardProp.js +5 -0
  48. package/modern/styles/styled.js +4 -3
  49. package/modern/usePagination/usePagination.js +1 -1
  50. package/node/Accordion/Accordion.js +32 -25
  51. package/node/AccordionActions/AccordionActions.js +16 -14
  52. package/node/AccordionDetails/AccordionDetails.js +4 -4
  53. package/node/AccordionSummary/AccordionSummary.js +33 -27
  54. package/node/Autocomplete/Autocomplete.js +71 -45
  55. package/node/CircularProgress/CircularProgress.js +1 -1
  56. package/node/Icon/Icon.js +1 -1
  57. package/node/Slider/Slider.js +414 -233
  58. package/node/SvgIcon/SvgIcon.js +1 -1
  59. package/node/index.js +1 -1
  60. package/node/styles/experimental_extendTheme.js +1 -1
  61. package/node/styles/rootShouldForwardProp.js +10 -0
  62. package/node/styles/slotShouldForwardProp.js +11 -0
  63. package/node/styles/styled.js +17 -8
  64. package/node/usePagination/usePagination.js +1 -1
  65. package/package.json +6 -6
  66. package/styles/experimental_extendTheme.js +1 -1
  67. package/styles/rootShouldForwardProp.d.ts +2 -0
  68. package/styles/rootShouldForwardProp.js +3 -0
  69. package/styles/slotShouldForwardProp.d.ts +2 -0
  70. package/styles/slotShouldForwardProp.js +5 -0
  71. package/styles/styled.d.ts +2 -3
  72. package/styles/styled.js +4 -3
  73. package/umd/material-ui.development.js +822 -582
  74. package/umd/material-ui.production.min.js +2 -2
  75. package/usePagination/usePagination.js +1 -1
@@ -1,8 +1,9 @@
1
1
  'use client';
2
2
 
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
6
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
7
  import * as React from 'react';
7
8
  import PropTypes from 'prop-types';
8
9
  import clsx from 'clsx';
@@ -12,14 +13,15 @@ import composeClasses from '@mui/utils/composeClasses';
12
13
  import { useSlider, valueToPercent } from '@mui/base/useSlider';
13
14
  import { alpha, lighten, darken } from '@mui/system/colorManipulator';
14
15
  import { useRtl } from '@mui/system/RtlProvider';
15
- import useThemeProps from '../styles/useThemeProps';
16
- import styled, { slotShouldForwardProp } from '../styles/styled';
16
+ import { styled, createUseThemeProps } from '../zero-styled';
17
+ import slotShouldForwardProp from '../styles/slotShouldForwardProp';
17
18
  import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
18
19
  import capitalize from '../utils/capitalize';
19
20
  import BaseSliderValueLabel from './SliderValueLabel';
20
21
  import sliderClasses, { getSliderUtilityClass } from './sliderClasses';
21
22
  import { jsx as _jsx } from "react/jsx-runtime";
22
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
+ var useThemeProps = createUseThemeProps('MuiSlider');
23
25
  function Identity(x) {
24
26
  return x;
25
27
  }
@@ -31,44 +33,16 @@ export var SliderRoot = styled('span', {
31
33
  return [styles.root, styles["color".concat(capitalize(ownerState.color))], ownerState.size !== 'medium' && styles["size".concat(capitalize(ownerState.size))], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
32
34
  }
33
35
  })(function (_ref) {
34
- var theme = _ref.theme,
35
- ownerState = _ref.ownerState;
36
- return _extends({
36
+ var _theme$vars;
37
+ var theme = _ref.theme;
38
+ return _defineProperty(_defineProperty(_defineProperty({
37
39
  borderRadius: 12,
38
40
  boxSizing: 'content-box',
39
41
  display: 'inline-block',
40
42
  position: 'relative',
41
43
  cursor: 'pointer',
42
44
  touchAction: 'none',
43
- color: (theme.vars || theme).palette[ownerState.color].main,
44
- WebkitTapHighlightColor: 'transparent'
45
- }, ownerState.orientation === 'horizontal' && _extends({
46
- height: 4,
47
- width: '100%',
48
- padding: '13px 0',
49
- // The primary input mechanism of the device includes a pointing device of limited accuracy.
50
- '@media (pointer: coarse)': {
51
- // Reach 42px touch target, about ~8mm on screen.
52
- padding: '20px 0'
53
- }
54
- }, ownerState.size === 'small' && {
55
- height: 2
56
- }, ownerState.marked && {
57
- marginBottom: 20
58
- }), ownerState.orientation === 'vertical' && _extends({
59
- height: '100%',
60
- width: 4,
61
- padding: '0 13px',
62
- // The primary input mechanism of the device includes a pointing device of limited accuracy.
63
- '@media (pointer: coarse)': {
64
- // Reach 42px touch target, about ~8mm on screen.
65
- padding: '0 20px'
66
- }
67
- }, ownerState.size === 'small' && {
68
- width: 2
69
- }, ownerState.marked && {
70
- marginRight: 44
71
- }), _defineProperty(_defineProperty({
45
+ WebkitTapHighlightColor: 'transparent',
72
46
  '@media print': {
73
47
  colorAdjust: 'exact'
74
48
  }
@@ -78,7 +52,79 @@ export var SliderRoot = styled('span', {
78
52
  color: (theme.vars || theme).palette.grey[400]
79
53
  }), "&.".concat(sliderClasses.dragging), _defineProperty({}, "& .".concat(sliderClasses.thumb, ", & .").concat(sliderClasses.track), {
80
54
  transition: 'none'
81
- })));
55
+ })), "variants", [].concat(_toConsumableArray(Object.keys(((_theme$vars = theme.vars) != null ? _theme$vars : theme).palette).filter(function (key) {
56
+ var _theme$vars2;
57
+ return ((_theme$vars2 = theme.vars) != null ? _theme$vars2 : theme).palette[key].main;
58
+ }).map(function (color) {
59
+ return {
60
+ props: {
61
+ color: color
62
+ },
63
+ style: {
64
+ color: (theme.vars || theme).palette[color].main
65
+ }
66
+ };
67
+ })), [{
68
+ props: {
69
+ orientation: 'horizontal'
70
+ },
71
+ style: {
72
+ height: 4,
73
+ width: '100%',
74
+ padding: '13px 0',
75
+ // The primary input mechanism of the device includes a pointing device of limited accuracy.
76
+ '@media (pointer: coarse)': {
77
+ // Reach 42px touch target, about ~8mm on screen.
78
+ padding: '20px 0'
79
+ }
80
+ }
81
+ }, {
82
+ props: {
83
+ orientation: 'horizontal',
84
+ size: 'small'
85
+ },
86
+ style: {
87
+ height: 2
88
+ }
89
+ }, {
90
+ props: {
91
+ orientation: 'horizontal',
92
+ marked: true
93
+ },
94
+ style: {
95
+ marginBottom: 20
96
+ }
97
+ }, {
98
+ props: {
99
+ orientation: 'vertical'
100
+ },
101
+ style: {
102
+ height: '100%',
103
+ width: 4,
104
+ padding: '0 13px',
105
+ // The primary input mechanism of the device includes a pointing device of limited accuracy.
106
+ '@media (pointer: coarse)': {
107
+ // Reach 42px touch target, about ~8mm on screen.
108
+ padding: '0 20px'
109
+ }
110
+ }
111
+ }, {
112
+ props: {
113
+ orientation: 'vertical',
114
+ size: 'small'
115
+ },
116
+ style: {
117
+ width: 2
118
+ }
119
+ }, {
120
+ props: {
121
+ orientation: 'vertical',
122
+ marked: true
123
+ },
124
+ style: {
125
+ marginRight: 44
126
+ }
127
+ }]));
82
128
  });
83
129
  export var SliderRail = styled('span', {
84
130
  name: 'MuiSlider',
@@ -86,27 +132,40 @@ export var SliderRail = styled('span', {
86
132
  overridesResolver: function overridesResolver(props, styles) {
87
133
  return styles.rail;
88
134
  }
89
- })(function (_ref2) {
90
- var ownerState = _ref2.ownerState;
91
- return _extends({
92
- display: 'block',
93
- position: 'absolute',
94
- borderRadius: 'inherit',
95
- backgroundColor: 'currentColor',
96
- opacity: 0.38
97
- }, ownerState.orientation === 'horizontal' && {
98
- width: '100%',
99
- height: 'inherit',
100
- top: '50%',
101
- transform: 'translateY(-50%)'
102
- }, ownerState.orientation === 'vertical' && {
103
- height: '100%',
104
- width: 'inherit',
105
- left: '50%',
106
- transform: 'translateX(-50%)'
107
- }, ownerState.track === 'inverted' && {
108
- opacity: 1
109
- });
135
+ })({
136
+ display: 'block',
137
+ position: 'absolute',
138
+ borderRadius: 'inherit',
139
+ backgroundColor: 'currentColor',
140
+ opacity: 0.38,
141
+ variants: [{
142
+ props: {
143
+ orientation: 'horizontal'
144
+ },
145
+ style: {
146
+ width: '100%',
147
+ height: 'inherit',
148
+ top: '50%',
149
+ transform: 'translateY(-50%)'
150
+ }
151
+ }, {
152
+ props: {
153
+ orientation: 'vertical'
154
+ },
155
+ style: {
156
+ height: '100%',
157
+ width: 'inherit',
158
+ left: '50%',
159
+ transform: 'translateX(-50%)'
160
+ }
161
+ }, {
162
+ props: {
163
+ track: 'inverted'
164
+ },
165
+ style: {
166
+ opacity: 1
167
+ }
168
+ }]
110
169
  });
111
170
  export var SliderTrack = styled('span', {
112
171
  name: 'MuiSlider',
@@ -115,12 +174,9 @@ export var SliderTrack = styled('span', {
115
174
  return styles.track;
116
175
  }
117
176
  })(function (_ref3) {
118
- var theme = _ref3.theme,
119
- ownerState = _ref3.ownerState;
120
- var color =
121
- // Same logic as the LinearProgress track color
122
- theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.5);
123
- return _extends({
177
+ var _theme$vars3;
178
+ var theme = _ref3.theme;
179
+ return {
124
180
  display: 'block',
125
181
  position: 'absolute',
126
182
  borderRadius: 'inherit',
@@ -128,23 +184,62 @@ export var SliderTrack = styled('span', {
128
184
  backgroundColor: 'currentColor',
129
185
  transition: theme.transitions.create(['left', 'width', 'bottom', 'height'], {
130
186
  duration: theme.transitions.duration.shortest
131
- })
132
- }, ownerState.size === 'small' && {
133
- border: 'none'
134
- }, ownerState.orientation === 'horizontal' && {
135
- height: 'inherit',
136
- top: '50%',
137
- transform: 'translateY(-50%)'
138
- }, ownerState.orientation === 'vertical' && {
139
- width: 'inherit',
140
- left: '50%',
141
- transform: 'translateX(-50%)'
142
- }, ownerState.track === false && {
143
- display: 'none'
144
- }, ownerState.track === 'inverted' && {
145
- backgroundColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color,
146
- borderColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color
147
- });
187
+ }),
188
+ variants: [{
189
+ props: {
190
+ size: 'small'
191
+ },
192
+ style: {
193
+ border: 'none'
194
+ }
195
+ }, {
196
+ props: {
197
+ orientation: 'horizontal'
198
+ },
199
+ style: {
200
+ height: 'inherit',
201
+ top: '50%',
202
+ transform: 'translateY(-50%)'
203
+ }
204
+ }, {
205
+ props: {
206
+ orientation: 'vertical'
207
+ },
208
+ style: {
209
+ width: 'inherit',
210
+ left: '50%',
211
+ transform: 'translateX(-50%)'
212
+ }
213
+ }, {
214
+ props: {
215
+ track: false
216
+ },
217
+ style: {
218
+ display: 'none'
219
+ }
220
+ }].concat(_toConsumableArray(Object.keys(((_theme$vars3 = theme.vars) != null ? _theme$vars3 : theme).palette).filter(function (key) {
221
+ var _theme$vars4;
222
+ return ((_theme$vars4 = theme.vars) != null ? _theme$vars4 : theme).palette[key].main;
223
+ }).map(function (color) {
224
+ return {
225
+ props: {
226
+ color: color,
227
+ track: 'inverted'
228
+ },
229
+ style: _extends({}, theme.vars ? {
230
+ backgroundColor: theme.vars.palette.Slider["".concat(color, "Track")],
231
+ borderColor: theme.vars.palette.Slider["".concat(color, "Track")]
232
+ } : _extends({
233
+ backgroundColor: lighten(theme.palette[color].main, 0.62),
234
+ borderColor: lighten(theme.palette[color].main, 0.62)
235
+ }, theme.applyStyles('dark', {
236
+ backgroundColor: darken(theme.palette[color].main, 0.5)
237
+ }), theme.applyStyles('dark', {
238
+ borderColor: darken(theme.palette[color].main, 0.5)
239
+ })))
240
+ };
241
+ })))
242
+ };
148
243
  });
149
244
  export var SliderThumb = styled('span', {
150
245
  name: 'MuiSlider',
@@ -154,9 +249,9 @@ export var SliderThumb = styled('span', {
154
249
  return [styles.thumb, styles["thumbColor".concat(capitalize(ownerState.color))], ownerState.size !== 'medium' && styles["thumbSize".concat(capitalize(ownerState.size))]];
155
250
  }
156
251
  })(function (_ref4) {
157
- var theme = _ref4.theme,
158
- ownerState = _ref4.ownerState;
159
- return _extends({
252
+ var _theme$vars5;
253
+ var theme = _ref4.theme;
254
+ return _defineProperty(_defineProperty({
160
255
  position: 'absolute',
161
256
  width: 20,
162
257
  height: 20,
@@ -169,27 +264,15 @@ export var SliderThumb = styled('span', {
169
264
  justifyContent: 'center',
170
265
  transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {
171
266
  duration: theme.transitions.duration.shortest
172
- })
173
- }, ownerState.size === 'small' && {
174
- width: 12,
175
- height: 12
176
- }, ownerState.orientation === 'horizontal' && {
177
- top: '50%',
178
- transform: 'translate(-50%, -50%)'
179
- }, ownerState.orientation === 'vertical' && {
180
- left: '50%',
181
- transform: 'translate(-50%, 50%)'
182
- }, _defineProperty(_defineProperty(_defineProperty({
183
- '&::before': _extends({
267
+ }),
268
+ '&::before': {
184
269
  position: 'absolute',
185
270
  content: '""',
186
271
  borderRadius: 'inherit',
187
272
  width: '100%',
188
273
  height: '100%',
189
274
  boxShadow: (theme.vars || theme).shadows[2]
190
- }, ownerState.size === 'small' && {
191
- boxShadow: 'none'
192
- }),
275
+ },
193
276
  '&::after': {
194
277
  position: 'absolute',
195
278
  content: '""',
@@ -201,18 +284,60 @@ export var SliderThumb = styled('span', {
201
284
  left: '50%',
202
285
  transform: 'translate(-50%, -50%)'
203
286
  }
204
- }, "&:hover, &.".concat(sliderClasses.focusVisible), {
205
- boxShadow: "0px 0px 0px 8px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16)),
206
- '@media (hover: none)': {
207
- boxShadow: 'none'
208
- }
209
- }), "&.".concat(sliderClasses.active), {
210
- boxShadow: "0px 0px 0px 14px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16))
211
- }), "&.".concat(sliderClasses.disabled), {
287
+ }, "&.".concat(sliderClasses.disabled), {
212
288
  '&:hover': {
213
289
  boxShadow: 'none'
214
290
  }
215
- }));
291
+ }), "variants", [].concat(_toConsumableArray(Object.keys(((_theme$vars5 = theme.vars) != null ? _theme$vars5 : theme).palette).filter(function (key) {
292
+ var _theme$vars6;
293
+ return ((_theme$vars6 = theme.vars) != null ? _theme$vars6 : theme).palette[key].main;
294
+ }).map(function (color) {
295
+ return {
296
+ props: {
297
+ color: color
298
+ },
299
+ style: _defineProperty(_defineProperty({}, "&:hover, &.".concat(sliderClasses.focusVisible), _extends({}, theme.vars ? {
300
+ boxShadow: "0px 0px 0px 8px rgba(".concat(theme.vars.palette[color].mainChannel, " / 0.16)")
301
+ } : {
302
+ boxShadow: "0px 0px 0px 8px ".concat(alpha(theme.palette[color].main, 0.16))
303
+ }, {
304
+ '@media (hover: none)': {
305
+ boxShadow: 'none'
306
+ }
307
+ })), "&.".concat(sliderClasses.active), _extends({}, theme.vars ? {
308
+ boxShadow: "0px 0px 0px 14px rgba(".concat(theme.vars.palette[color].mainChannel, " / 0.16)}")
309
+ } : {
310
+ boxShadow: "0px 0px 0px 14px ".concat(alpha(theme.palette[color].main, 0.16))
311
+ }))
312
+ };
313
+ })), [{
314
+ props: {
315
+ size: 'small'
316
+ },
317
+ style: {
318
+ width: 12,
319
+ height: 12,
320
+ '&::before': {
321
+ boxShadow: 'none'
322
+ }
323
+ }
324
+ }, {
325
+ props: {
326
+ orientation: 'horizontal'
327
+ },
328
+ style: {
329
+ top: '50%',
330
+ transform: 'translate(-50%, -50%)'
331
+ }
332
+ }, {
333
+ props: {
334
+ orientation: 'vertical'
335
+ },
336
+ style: {
337
+ left: '50%',
338
+ transform: 'translate(-50%, 50%)'
339
+ }
340
+ }]));
216
341
  });
217
342
  export var SliderValueLabel = styled(BaseSliderValueLabel, {
218
343
  name: 'MuiSlider',
@@ -220,17 +345,16 @@ export var SliderValueLabel = styled(BaseSliderValueLabel, {
220
345
  overridesResolver: function overridesResolver(props, styles) {
221
346
  return styles.valueLabel;
222
347
  }
223
- })(function (_ref5) {
224
- var theme = _ref5.theme,
225
- ownerState = _ref5.ownerState;
226
- return _extends(_defineProperty(_defineProperty(_defineProperty({}, "&.".concat(sliderClasses.valueLabelOpen), {
227
- transform: "".concat(ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)', " scale(1)")
228
- }), "zIndex", 1), "whiteSpace", 'nowrap'), theme.typography.body2, {
348
+ })(function (_ref6) {
349
+ var theme = _ref6.theme;
350
+ return _extends({
351
+ zIndex: 1,
352
+ whiteSpace: 'nowrap'
353
+ }, theme.typography.body2, {
229
354
  fontWeight: 500,
230
355
  transition: theme.transitions.create(['transform'], {
231
356
  duration: theme.transitions.duration.shortest
232
357
  }),
233
- transform: "".concat(ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)', " scale(0)"),
234
358
  position: 'absolute',
235
359
  backgroundColor: (theme.vars || theme).palette.grey[600],
236
360
  borderRadius: 2,
@@ -238,37 +362,67 @@ export var SliderValueLabel = styled(BaseSliderValueLabel, {
238
362
  display: 'flex',
239
363
  alignItems: 'center',
240
364
  justifyContent: 'center',
241
- padding: '0.25rem 0.75rem'
242
- }, ownerState.orientation === 'horizontal' && {
243
- top: '-10px',
244
- transformOrigin: 'bottom center',
245
- '&::before': {
246
- position: 'absolute',
247
- content: '""',
248
- width: 8,
249
- height: 8,
250
- transform: 'translate(-50%, 50%) rotate(45deg)',
251
- backgroundColor: 'inherit',
252
- bottom: 0,
253
- left: '50%'
254
- }
255
- }, ownerState.orientation === 'vertical' && {
256
- right: ownerState.size === 'small' ? '20px' : '30px',
257
- top: '50%',
258
- transformOrigin: 'right center',
259
- '&::before': {
260
- position: 'absolute',
261
- content: '""',
262
- width: 8,
263
- height: 8,
264
- transform: 'translate(-50%, -50%) rotate(45deg)',
265
- backgroundColor: 'inherit',
266
- right: -8,
267
- top: '50%'
268
- }
269
- }, ownerState.size === 'small' && {
270
- fontSize: theme.typography.pxToRem(12),
271
- padding: '0.25rem 0.5rem'
365
+ padding: '0.25rem 0.75rem',
366
+ variants: [{
367
+ props: {
368
+ orientation: 'horizontal'
369
+ },
370
+ style: _defineProperty({
371
+ transform: 'translateY(-100%) scale(0)',
372
+ top: '-10px',
373
+ transformOrigin: 'bottom center',
374
+ '&::before': {
375
+ position: 'absolute',
376
+ content: '""',
377
+ width: 8,
378
+ height: 8,
379
+ transform: 'translate(-50%, 50%) rotate(45deg)',
380
+ backgroundColor: 'inherit',
381
+ bottom: 0,
382
+ left: '50%'
383
+ }
384
+ }, "&.".concat(sliderClasses.valueLabelOpen), {
385
+ transform: 'translateY(-100%) scale(1)'
386
+ })
387
+ }, {
388
+ props: {
389
+ orientation: 'vertical'
390
+ },
391
+ style: _defineProperty({
392
+ transform: 'translateY(-50%) scale(0)',
393
+ right: '30px',
394
+ top: '50%',
395
+ transformOrigin: 'right center',
396
+ '&::before': {
397
+ position: 'absolute',
398
+ content: '""',
399
+ width: 8,
400
+ height: 8,
401
+ transform: 'translate(-50%, -50%) rotate(45deg)',
402
+ backgroundColor: 'inherit',
403
+ right: -8,
404
+ top: '50%'
405
+ }
406
+ }, "&.".concat(sliderClasses.valueLabelOpen), {
407
+ transform: 'translateY(-50%) scale(1)'
408
+ })
409
+ }, {
410
+ props: {
411
+ size: 'small'
412
+ },
413
+ style: {
414
+ fontSize: theme.typography.pxToRem(12),
415
+ padding: '0.25rem 0.5rem'
416
+ }
417
+ }, {
418
+ props: {
419
+ orientation: 'vertical',
420
+ size: 'small'
421
+ },
422
+ style: {
423
+ right: '20px'
424
+ }
425
+ }]
272
426
  });
273
427
  });
274
428
  export var SliderMark = styled('span', {
@@ -281,26 +435,40 @@ export var SliderMark = styled('span', {
281
435
  var markActive = props.markActive;
282
436
  return [styles.mark, markActive && styles.markActive];
283
437
  }
284
- })(function (_ref6) {
285
- var theme = _ref6.theme,
286
- ownerState = _ref6.ownerState,
287
- markActive = _ref6.markActive;
288
- return _extends({
438
+ })(function (_ref7) {
439
+ var theme = _ref7.theme;
440
+ return {
289
441
  position: 'absolute',
290
442
  width: 2,
291
443
  height: 2,
292
444
  borderRadius: 1,
293
- backgroundColor: 'currentColor'
294
- }, ownerState.orientation === 'horizontal' && {
295
- top: '50%',
296
- transform: 'translate(-1px, -50%)'
297
- }, ownerState.orientation === 'vertical' && {
298
- left: '50%',
299
- transform: 'translate(-50%, 1px)'
300
- }, markActive && {
301
- backgroundColor: (theme.vars || theme).palette.background.paper,
302
- opacity: 0.8
303
- });
445
+ backgroundColor: 'currentColor',
446
+ variants: [{
447
+ props: {
448
+ orientation: 'horizontal'
449
+ },
450
+ style: {
451
+ top: '50%',
452
+ transform: 'translate(-1px, -50%)'
453
+ }
454
+ }, {
455
+ props: {
456
+ orientation: 'vertical'
457
+ },
458
+ style: {
459
+ left: '50%',
460
+ transform: 'translate(-50%, 1px)'
461
+ }
462
+ }, {
463
+ props: {
464
+ markActive: true
465
+ },
466
+ style: {
467
+ backgroundColor: (theme.vars || theme).palette.background.paper,
468
+ opacity: 0.8
469
+ }
470
+ }]
471
+ };
304
472
  });
305
473
  export var SliderMarkLabel = styled('span', {
306
474
  name: 'MuiSlider',
@@ -311,28 +479,42 @@ export var SliderMarkLabel = styled('span', {
311
479
  overridesResolver: function overridesResolver(props, styles) {
312
480
  return styles.markLabel;
313
481
  }
314
- })(function (_ref7) {
315
- var theme = _ref7.theme,
316
- ownerState = _ref7.ownerState,
317
- markLabelActive = _ref7.markLabelActive;
482
+ })(function (_ref8) {
483
+ var theme = _ref8.theme;
318
484
  return _extends({}, theme.typography.body2, {
319
485
  color: (theme.vars || theme).palette.text.secondary,
320
486
  position: 'absolute',
321
- whiteSpace: 'nowrap'
322
- }, ownerState.orientation === 'horizontal' && {
323
- top: 30,
324
- transform: 'translateX(-50%)',
325
- '@media (pointer: coarse)': {
326
- top: 40
327
- }
328
- }, ownerState.orientation === 'vertical' && {
329
- left: 36,
330
- transform: 'translateY(50%)',
331
- '@media (pointer: coarse)': {
332
- left: 44
333
- }
334
- }, markLabelActive && {
335
- color: (theme.vars || theme).palette.text.primary
487
+ whiteSpace: 'nowrap',
488
+ variants: [{
489
+ props: {
490
+ orientation: 'horizontal'
491
+ },
492
+ style: {
493
+ top: 30,
494
+ transform: 'translateX(-50%)',
495
+ '@media (pointer: coarse)': {
496
+ top: 40
497
+ }
498
+ }
499
+ }, {
500
+ props: {
501
+ orientation: 'vertical'
502
+ },
503
+ style: {
504
+ left: 36,
505
+ transform: 'translateY(50%)',
506
+ '@media (pointer: coarse)': {
507
+ left: 44
508
+ }
509
+ }
510
+ }, {
511
+ props: {
512
+ markLabelActive: true
513
+ },
514
+ style: {
515
+ color: (theme.vars || theme).palette.text.primary
516
+ }
517
+ }]
336
518
  });
337
519
  });
338
520
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -360,12 +542,12 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
360
542
  };
361
543
  return composeClasses(slots, getSliderUtilityClass, classes);
362
544
  };
363
- var Forward = function Forward(_ref8) {
364
- var children = _ref8.children;
545
+ var Forward = function Forward(_ref9) {
546
+ var children = _ref9.children;
365
547
  return children;
366
548
  };
367
549
  var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
368
- var _ref9, _slots$root, _ref10, _slots$rail, _ref11, _slots$track, _ref12, _slots$thumb, _ref13, _slots$valueLabel, _ref14, _slots$mark, _ref15, _slots$markLabel, _ref16, _slots$input, _slotProps$root, _slotProps$rail, _slotProps$track, _slotProps$thumb, _slotProps$valueLabel, _slotProps$mark, _slotProps$markLabel, _slotProps$input;
550
+ var _ref10, _slots$root, _ref11, _slots$rail, _ref12, _slots$track, _ref13, _slots$thumb, _ref14, _slots$valueLabel, _ref15, _slots$mark, _ref16, _slots$markLabel, _ref17, _slots$input, _slotProps$root, _slotProps$rail, _slotProps$track, _slotProps$thumb, _slotProps$valueLabel, _slotProps$mark, _slotProps$markLabel, _slotProps$input;
369
551
  var props = useThemeProps({
370
552
  props: inputProps,
371
553
  name: 'MuiSlider'
@@ -464,14 +646,14 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
464
646
  var classes = useUtilityClasses(ownerState);
465
647
 
466
648
  // support both `slots` and `components` for backward compatibility
467
- var RootSlot = (_ref9 = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref9 : SliderRoot;
468
- var RailSlot = (_ref10 = (_slots$rail = slots == null ? void 0 : slots.rail) != null ? _slots$rail : components.Rail) != null ? _ref10 : SliderRail;
469
- var TrackSlot = (_ref11 = (_slots$track = slots == null ? void 0 : slots.track) != null ? _slots$track : components.Track) != null ? _ref11 : SliderTrack;
470
- var ThumbSlot = (_ref12 = (_slots$thumb = slots == null ? void 0 : slots.thumb) != null ? _slots$thumb : components.Thumb) != null ? _ref12 : SliderThumb;
471
- var ValueLabelSlot = (_ref13 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref13 : SliderValueLabel;
472
- var MarkSlot = (_ref14 = (_slots$mark = slots == null ? void 0 : slots.mark) != null ? _slots$mark : components.Mark) != null ? _ref14 : SliderMark;
473
- var MarkLabelSlot = (_ref15 = (_slots$markLabel = slots == null ? void 0 : slots.markLabel) != null ? _slots$markLabel : components.MarkLabel) != null ? _ref15 : SliderMarkLabel;
474
- var InputSlot = (_ref16 = (_slots$input = slots == null ? void 0 : slots.input) != null ? _slots$input : components.Input) != null ? _ref16 : 'input';
649
+ var RootSlot = (_ref10 = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref10 : SliderRoot;
650
+ var RailSlot = (_ref11 = (_slots$rail = slots == null ? void 0 : slots.rail) != null ? _slots$rail : components.Rail) != null ? _ref11 : SliderRail;
651
+ var TrackSlot = (_ref12 = (_slots$track = slots == null ? void 0 : slots.track) != null ? _slots$track : components.Track) != null ? _ref12 : SliderTrack;
652
+ var ThumbSlot = (_ref13 = (_slots$thumb = slots == null ? void 0 : slots.thumb) != null ? _slots$thumb : components.Thumb) != null ? _ref13 : SliderThumb;
653
+ var ValueLabelSlot = (_ref14 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref14 : SliderValueLabel;
654
+ var MarkSlot = (_ref15 = (_slots$mark = slots == null ? void 0 : slots.mark) != null ? _slots$mark : components.Mark) != null ? _ref15 : SliderMark;
655
+ var MarkLabelSlot = (_ref16 = (_slots$markLabel = slots == null ? void 0 : slots.markLabel) != null ? _slots$markLabel : components.MarkLabel) != null ? _ref16 : SliderMarkLabel;
656
+ var InputSlot = (_ref17 = (_slots$input = slots == null ? void 0 : slots.input) != null ? _slots$input : components.Input) != null ? _ref17 : 'input';
475
657
  var rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;
476
658
  var railSlotProps = (_slotProps$rail = slotProps == null ? void 0 : slotProps.rail) != null ? _slotProps$rail : componentsProps.rail;
477
659
  var trackSlotProps = (_slotProps$track = slotProps == null ? void 0 : slotProps.track) != null ? _slotProps$track : componentsProps.track;