@mui/material 5.15.13 → 5.15.15

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 (92) 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 +60 -34
  7. package/Autocomplete/autocompleteClasses.d.ts +3 -3
  8. package/CHANGELOG.md +156 -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/RadioGroup/RadioGroup.d.ts +0 -2
  17. package/RadioGroup/RadioGroup.js +23 -2
  18. package/RadioGroup/index.d.ts +3 -0
  19. package/RadioGroup/index.js +3 -1
  20. package/RadioGroup/radioGroupClasses.d.ts +6 -0
  21. package/RadioGroup/radioGroupClasses.js +7 -0
  22. package/Select/Select.d.ts +8 -20
  23. package/Slider/Slider.js +404 -223
  24. package/SvgIcon/SvgIcon.js +1 -1
  25. package/index.js +1 -1
  26. package/legacy/Accordion/Accordion.js +33 -22
  27. package/legacy/AccordionActions/AccordionActions.js +17 -14
  28. package/legacy/AccordionDetails/AccordionDetails.js +2 -2
  29. package/legacy/AccordionSummary/AccordionSummary.js +31 -22
  30. package/legacy/Autocomplete/Autocomplete.js +133 -114
  31. package/legacy/CircularProgress/CircularProgress.js +1 -1
  32. package/legacy/Icon/Icon.js +1 -1
  33. package/legacy/RadioGroup/RadioGroup.js +21 -2
  34. package/legacy/RadioGroup/index.js +3 -1
  35. package/legacy/RadioGroup/radioGroupClasses.js +7 -0
  36. package/legacy/Slider/Slider.js +373 -191
  37. package/legacy/SvgIcon/SvgIcon.js +1 -1
  38. package/legacy/index.js +1 -1
  39. package/legacy/styles/experimental_extendTheme.js +1 -1
  40. package/legacy/styles/rootShouldForwardProp.js +5 -0
  41. package/legacy/styles/slotShouldForwardProp.js +5 -0
  42. package/legacy/styles/styled.js +4 -5
  43. package/legacy/usePagination/usePagination.js +1 -1
  44. package/modern/Accordion/Accordion.js +30 -23
  45. package/modern/AccordionActions/AccordionActions.js +14 -12
  46. package/modern/AccordionDetails/AccordionDetails.js +2 -2
  47. package/modern/AccordionSummary/AccordionSummary.js +29 -23
  48. package/modern/Autocomplete/Autocomplete.js +60 -34
  49. package/modern/CircularProgress/CircularProgress.js +1 -1
  50. package/modern/Icon/Icon.js +1 -1
  51. package/modern/RadioGroup/RadioGroup.js +23 -2
  52. package/modern/RadioGroup/index.js +3 -1
  53. package/modern/RadioGroup/radioGroupClasses.js +7 -0
  54. package/modern/Slider/Slider.js +337 -172
  55. package/modern/SvgIcon/SvgIcon.js +1 -1
  56. package/modern/index.js +1 -1
  57. package/modern/styles/experimental_extendTheme.js +1 -1
  58. package/modern/styles/rootShouldForwardProp.js +3 -0
  59. package/modern/styles/slotShouldForwardProp.js +5 -0
  60. package/modern/styles/styled.js +4 -3
  61. package/modern/usePagination/usePagination.js +1 -1
  62. package/node/Accordion/Accordion.js +32 -25
  63. package/node/AccordionActions/AccordionActions.js +16 -14
  64. package/node/AccordionDetails/AccordionDetails.js +4 -4
  65. package/node/AccordionSummary/AccordionSummary.js +33 -27
  66. package/node/Autocomplete/Autocomplete.js +72 -46
  67. package/node/CircularProgress/CircularProgress.js +1 -1
  68. package/node/Icon/Icon.js +1 -1
  69. package/node/RadioGroup/RadioGroup.js +23 -2
  70. package/node/RadioGroup/index.js +25 -1
  71. package/node/RadioGroup/radioGroupClasses.js +15 -0
  72. package/node/Slider/Slider.js +414 -233
  73. package/node/SvgIcon/SvgIcon.js +1 -1
  74. package/node/index.js +1 -1
  75. package/node/styles/experimental_extendTheme.js +1 -1
  76. package/node/styles/rootShouldForwardProp.js +10 -0
  77. package/node/styles/slotShouldForwardProp.js +11 -0
  78. package/node/styles/styled.js +17 -8
  79. package/node/usePagination/usePagination.js +1 -1
  80. package/package.json +6 -6
  81. package/styles/components.d.ts +5 -0
  82. package/styles/experimental_extendTheme.js +1 -1
  83. package/styles/overrides.d.ts +2 -0
  84. package/styles/rootShouldForwardProp.d.ts +2 -0
  85. package/styles/rootShouldForwardProp.js +3 -0
  86. package/styles/slotShouldForwardProp.d.ts +2 -0
  87. package/styles/slotShouldForwardProp.js +5 -0
  88. package/styles/styled.d.ts +2 -3
  89. package/styles/styled.js +4 -3
  90. package/umd/material-ui.development.js +1010 -746
  91. package/umd/material-ui.production.min.js +2 -2
  92. package/usePagination/usePagination.js +1 -1
@@ -12,14 +12,15 @@ import composeClasses from '@mui/utils/composeClasses';
12
12
  import { useSlider, valueToPercent } from '@mui/base/useSlider';
13
13
  import { alpha, lighten, darken } from '@mui/system/colorManipulator';
14
14
  import { useRtl } from '@mui/system/RtlProvider';
15
- import useThemeProps from '../styles/useThemeProps';
16
- import styled, { slotShouldForwardProp } from '../styles/styled';
15
+ import { styled, createUseThemeProps } from '../zero-styled';
16
+ import slotShouldForwardProp from '../styles/slotShouldForwardProp';
17
17
  import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
18
18
  import capitalize from '../utils/capitalize';
19
19
  import BaseSliderValueLabel from './SliderValueLabel';
20
20
  import sliderClasses, { getSliderUtilityClass } from './sliderClasses';
21
21
  import { jsx as _jsx } from "react/jsx-runtime";
22
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ const useThemeProps = createUseThemeProps('MuiSlider');
23
24
  function Identity(x) {
24
25
  return x;
25
26
  }
@@ -33,44 +34,15 @@ export const SliderRoot = styled('span', {
33
34
  return [styles.root, styles[`color${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
34
35
  }
35
36
  })(({
36
- theme,
37
- ownerState
38
- }) => _extends({
37
+ theme
38
+ }) => ({
39
39
  borderRadius: 12,
40
40
  boxSizing: 'content-box',
41
41
  display: 'inline-block',
42
42
  position: 'relative',
43
43
  cursor: 'pointer',
44
44
  touchAction: 'none',
45
- color: (theme.vars || theme).palette[ownerState.color].main,
46
- WebkitTapHighlightColor: 'transparent'
47
- }, ownerState.orientation === 'horizontal' && _extends({
48
- height: 4,
49
- width: '100%',
50
- padding: '13px 0',
51
- // The primary input mechanism of the device includes a pointing device of limited accuracy.
52
- '@media (pointer: coarse)': {
53
- // Reach 42px touch target, about ~8mm on screen.
54
- padding: '20px 0'
55
- }
56
- }, ownerState.size === 'small' && {
57
- height: 2
58
- }, ownerState.marked && {
59
- marginBottom: 20
60
- }), ownerState.orientation === 'vertical' && _extends({
61
- height: '100%',
62
- width: 4,
63
- padding: '0 13px',
64
- // The primary input mechanism of the device includes a pointing device of limited accuracy.
65
- '@media (pointer: coarse)': {
66
- // Reach 42px touch target, about ~8mm on screen.
67
- padding: '0 20px'
68
- }
69
- }, ownerState.size === 'small' && {
70
- width: 2
71
- }, ownerState.marked && {
72
- marginRight: 44
73
- }), {
45
+ WebkitTapHighlightColor: 'transparent',
74
46
  '@media print': {
75
47
  colorAdjust: 'exact'
76
48
  },
@@ -83,45 +55,123 @@ export const SliderRoot = styled('span', {
83
55
  [`& .${sliderClasses.thumb}, & .${sliderClasses.track}`]: {
84
56
  transition: 'none'
85
57
  }
86
- }
58
+ },
59
+ variants: [...Object.keys((theme.vars ?? theme).palette).filter(key => (theme.vars ?? theme).palette[key].main).map(color => ({
60
+ props: {
61
+ color
62
+ },
63
+ style: {
64
+ color: (theme.vars || theme).palette[color].main
65
+ }
66
+ })), {
67
+ props: {
68
+ orientation: 'horizontal'
69
+ },
70
+ style: {
71
+ height: 4,
72
+ width: '100%',
73
+ padding: '13px 0',
74
+ // The primary input mechanism of the device includes a pointing device of limited accuracy.
75
+ '@media (pointer: coarse)': {
76
+ // Reach 42px touch target, about ~8mm on screen.
77
+ padding: '20px 0'
78
+ }
79
+ }
80
+ }, {
81
+ props: {
82
+ orientation: 'horizontal',
83
+ size: 'small'
84
+ },
85
+ style: {
86
+ height: 2
87
+ }
88
+ }, {
89
+ props: {
90
+ orientation: 'horizontal',
91
+ marked: true
92
+ },
93
+ style: {
94
+ marginBottom: 20
95
+ }
96
+ }, {
97
+ props: {
98
+ orientation: 'vertical'
99
+ },
100
+ style: {
101
+ height: '100%',
102
+ width: 4,
103
+ padding: '0 13px',
104
+ // The primary input mechanism of the device includes a pointing device of limited accuracy.
105
+ '@media (pointer: coarse)': {
106
+ // Reach 42px touch target, about ~8mm on screen.
107
+ padding: '0 20px'
108
+ }
109
+ }
110
+ }, {
111
+ props: {
112
+ orientation: 'vertical',
113
+ size: 'small'
114
+ },
115
+ style: {
116
+ width: 2
117
+ }
118
+ }, {
119
+ props: {
120
+ orientation: 'vertical',
121
+ marked: true
122
+ },
123
+ style: {
124
+ marginRight: 44
125
+ }
126
+ }]
87
127
  }));
88
128
  export const SliderRail = styled('span', {
89
129
  name: 'MuiSlider',
90
130
  slot: 'Rail',
91
131
  overridesResolver: (props, styles) => styles.rail
92
- })(({
93
- ownerState
94
- }) => _extends({
132
+ })({
95
133
  display: 'block',
96
134
  position: 'absolute',
97
135
  borderRadius: 'inherit',
98
136
  backgroundColor: 'currentColor',
99
- opacity: 0.38
100
- }, ownerState.orientation === 'horizontal' && {
101
- width: '100%',
102
- height: 'inherit',
103
- top: '50%',
104
- transform: 'translateY(-50%)'
105
- }, ownerState.orientation === 'vertical' && {
106
- height: '100%',
107
- width: 'inherit',
108
- left: '50%',
109
- transform: 'translateX(-50%)'
110
- }, ownerState.track === 'inverted' && {
111
- opacity: 1
112
- }));
137
+ opacity: 0.38,
138
+ variants: [{
139
+ props: {
140
+ orientation: 'horizontal'
141
+ },
142
+ style: {
143
+ width: '100%',
144
+ height: 'inherit',
145
+ top: '50%',
146
+ transform: 'translateY(-50%)'
147
+ }
148
+ }, {
149
+ props: {
150
+ orientation: 'vertical'
151
+ },
152
+ style: {
153
+ height: '100%',
154
+ width: 'inherit',
155
+ left: '50%',
156
+ transform: 'translateX(-50%)'
157
+ }
158
+ }, {
159
+ props: {
160
+ track: 'inverted'
161
+ },
162
+ style: {
163
+ opacity: 1
164
+ }
165
+ }]
166
+ });
113
167
  export const SliderTrack = styled('span', {
114
168
  name: 'MuiSlider',
115
169
  slot: 'Track',
116
170
  overridesResolver: (props, styles) => styles.track
117
171
  })(({
118
- theme,
119
- ownerState
172
+ theme
120
173
  }) => {
121
- const color =
122
- // Same logic as the LinearProgress track color
123
- theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.5);
124
- return _extends({
174
+ return {
125
175
  display: 'block',
126
176
  position: 'absolute',
127
177
  borderRadius: 'inherit',
@@ -129,23 +179,57 @@ export const SliderTrack = styled('span', {
129
179
  backgroundColor: 'currentColor',
130
180
  transition: theme.transitions.create(['left', 'width', 'bottom', 'height'], {
131
181
  duration: theme.transitions.duration.shortest
132
- })
133
- }, ownerState.size === 'small' && {
134
- border: 'none'
135
- }, ownerState.orientation === 'horizontal' && {
136
- height: 'inherit',
137
- top: '50%',
138
- transform: 'translateY(-50%)'
139
- }, ownerState.orientation === 'vertical' && {
140
- width: 'inherit',
141
- left: '50%',
142
- transform: 'translateX(-50%)'
143
- }, ownerState.track === false && {
144
- display: 'none'
145
- }, ownerState.track === 'inverted' && {
146
- backgroundColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color,
147
- borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
148
- });
182
+ }),
183
+ variants: [{
184
+ props: {
185
+ size: 'small'
186
+ },
187
+ style: {
188
+ border: 'none'
189
+ }
190
+ }, {
191
+ props: {
192
+ orientation: 'horizontal'
193
+ },
194
+ style: {
195
+ height: 'inherit',
196
+ top: '50%',
197
+ transform: 'translateY(-50%)'
198
+ }
199
+ }, {
200
+ props: {
201
+ orientation: 'vertical'
202
+ },
203
+ style: {
204
+ width: 'inherit',
205
+ left: '50%',
206
+ transform: 'translateX(-50%)'
207
+ }
208
+ }, {
209
+ props: {
210
+ track: false
211
+ },
212
+ style: {
213
+ display: 'none'
214
+ }
215
+ }, ...Object.keys((theme.vars ?? theme).palette).filter(key => (theme.vars ?? theme).palette[key].main).map(color => ({
216
+ props: {
217
+ color,
218
+ track: 'inverted'
219
+ },
220
+ style: _extends({}, theme.vars ? {
221
+ backgroundColor: theme.vars.palette.Slider[`${color}Track`],
222
+ borderColor: theme.vars.palette.Slider[`${color}Track`]
223
+ } : _extends({
224
+ backgroundColor: lighten(theme.palette[color].main, 0.62),
225
+ borderColor: lighten(theme.palette[color].main, 0.62)
226
+ }, theme.applyStyles('dark', {
227
+ backgroundColor: darken(theme.palette[color].main, 0.5)
228
+ }), theme.applyStyles('dark', {
229
+ borderColor: darken(theme.palette[color].main, 0.5)
230
+ })))
231
+ }))]
232
+ };
149
233
  });
150
234
  export const SliderThumb = styled('span', {
151
235
  name: 'MuiSlider',
@@ -157,9 +241,8 @@ export const SliderThumb = styled('span', {
157
241
  return [styles.thumb, styles[`thumbColor${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`thumbSize${capitalize(ownerState.size)}`]];
158
242
  }
159
243
  })(({
160
- theme,
161
- ownerState
162
- }) => _extends({
244
+ theme
245
+ }) => ({
163
246
  position: 'absolute',
164
247
  width: 20,
165
248
  height: 20,
@@ -172,27 +255,15 @@ export const SliderThumb = styled('span', {
172
255
  justifyContent: 'center',
173
256
  transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {
174
257
  duration: theme.transitions.duration.shortest
175
- })
176
- }, ownerState.size === 'small' && {
177
- width: 12,
178
- height: 12
179
- }, ownerState.orientation === 'horizontal' && {
180
- top: '50%',
181
- transform: 'translate(-50%, -50%)'
182
- }, ownerState.orientation === 'vertical' && {
183
- left: '50%',
184
- transform: 'translate(-50%, 50%)'
185
- }, {
186
- '&::before': _extends({
258
+ }),
259
+ '&::before': {
187
260
  position: 'absolute',
188
261
  content: '""',
189
262
  borderRadius: 'inherit',
190
263
  width: '100%',
191
264
  height: '100%',
192
265
  boxShadow: (theme.vars || theme).shadows[2]
193
- }, ownerState.size === 'small' && {
194
- boxShadow: 'none'
195
- }),
266
+ },
196
267
  '&::after': {
197
268
  position: 'absolute',
198
269
  content: '""',
@@ -204,32 +275,67 @@ export const SliderThumb = styled('span', {
204
275
  left: '50%',
205
276
  transform: 'translate(-50%, -50%)'
206
277
  },
207
- [`&:hover, &.${sliderClasses.focusVisible}`]: {
208
- boxShadow: `0px 0px 0px 8px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`,
209
- '@media (hover: none)': {
210
- boxShadow: 'none'
211
- }
212
- },
213
- [`&.${sliderClasses.active}`]: {
214
- boxShadow: `0px 0px 0px 14px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`
215
- },
216
278
  [`&.${sliderClasses.disabled}`]: {
217
279
  '&:hover': {
218
280
  boxShadow: 'none'
219
281
  }
220
- }
282
+ },
283
+ variants: [...Object.keys((theme.vars ?? theme).palette).filter(key => (theme.vars ?? theme).palette[key].main).map(color => ({
284
+ props: {
285
+ color
286
+ },
287
+ style: {
288
+ [`&:hover, &.${sliderClasses.focusVisible}`]: _extends({}, theme.vars ? {
289
+ boxShadow: `0px 0px 0px 8px rgba(${theme.vars.palette[color].mainChannel} / 0.16)`
290
+ } : {
291
+ boxShadow: `0px 0px 0px 8px ${alpha(theme.palette[color].main, 0.16)}`
292
+ }, {
293
+ '@media (hover: none)': {
294
+ boxShadow: 'none'
295
+ }
296
+ }),
297
+ [`&.${sliderClasses.active}`]: _extends({}, theme.vars ? {
298
+ boxShadow: `0px 0px 0px 14px rgba(${theme.vars.palette[color].mainChannel} / 0.16)}`
299
+ } : {
300
+ boxShadow: `0px 0px 0px 14px ${alpha(theme.palette[color].main, 0.16)}`
301
+ })
302
+ }
303
+ })), {
304
+ props: {
305
+ size: 'small'
306
+ },
307
+ style: {
308
+ width: 12,
309
+ height: 12,
310
+ '&::before': {
311
+ boxShadow: 'none'
312
+ }
313
+ }
314
+ }, {
315
+ props: {
316
+ orientation: 'horizontal'
317
+ },
318
+ style: {
319
+ top: '50%',
320
+ transform: 'translate(-50%, -50%)'
321
+ }
322
+ }, {
323
+ props: {
324
+ orientation: 'vertical'
325
+ },
326
+ style: {
327
+ left: '50%',
328
+ transform: 'translate(-50%, 50%)'
329
+ }
330
+ }]
221
331
  }));
222
332
  export const SliderValueLabel = styled(BaseSliderValueLabel, {
223
333
  name: 'MuiSlider',
224
334
  slot: 'ValueLabel',
225
335
  overridesResolver: (props, styles) => styles.valueLabel
226
336
  })(({
227
- theme,
228
- ownerState
337
+ theme
229
338
  }) => _extends({
230
- [`&.${sliderClasses.valueLabelOpen}`]: {
231
- transform: `${ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(1)`
232
- },
233
339
  zIndex: 1,
234
340
  whiteSpace: 'nowrap'
235
341
  }, theme.typography.body2, {
@@ -237,7 +343,6 @@ export const SliderValueLabel = styled(BaseSliderValueLabel, {
237
343
  transition: theme.transitions.create(['transform'], {
238
344
  duration: theme.transitions.duration.shortest
239
345
  }),
240
- transform: `${ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(0)`,
241
346
  position: 'absolute',
242
347
  backgroundColor: (theme.vars || theme).palette.grey[600],
243
348
  borderRadius: 2,
@@ -245,37 +350,69 @@ export const SliderValueLabel = styled(BaseSliderValueLabel, {
245
350
  display: 'flex',
246
351
  alignItems: 'center',
247
352
  justifyContent: 'center',
248
- padding: '0.25rem 0.75rem'
249
- }, ownerState.orientation === 'horizontal' && {
250
- top: '-10px',
251
- transformOrigin: 'bottom center',
252
- '&::before': {
253
- position: 'absolute',
254
- content: '""',
255
- width: 8,
256
- height: 8,
257
- transform: 'translate(-50%, 50%) rotate(45deg)',
258
- backgroundColor: 'inherit',
259
- bottom: 0,
260
- left: '50%'
261
- }
262
- }, ownerState.orientation === 'vertical' && {
263
- right: ownerState.size === 'small' ? '20px' : '30px',
264
- top: '50%',
265
- transformOrigin: 'right center',
266
- '&::before': {
267
- position: 'absolute',
268
- content: '""',
269
- width: 8,
270
- height: 8,
271
- transform: 'translate(-50%, -50%) rotate(45deg)',
272
- backgroundColor: 'inherit',
273
- right: -8,
274
- top: '50%'
275
- }
276
- }, ownerState.size === 'small' && {
277
- fontSize: theme.typography.pxToRem(12),
278
- padding: '0.25rem 0.5rem'
353
+ padding: '0.25rem 0.75rem',
354
+ variants: [{
355
+ props: {
356
+ orientation: 'horizontal'
357
+ },
358
+ style: {
359
+ transform: 'translateY(-100%) scale(0)',
360
+ top: '-10px',
361
+ transformOrigin: 'bottom center',
362
+ '&::before': {
363
+ position: 'absolute',
364
+ content: '""',
365
+ width: 8,
366
+ height: 8,
367
+ transform: 'translate(-50%, 50%) rotate(45deg)',
368
+ backgroundColor: 'inherit',
369
+ bottom: 0,
370
+ left: '50%'
371
+ },
372
+ [`&.${sliderClasses.valueLabelOpen}`]: {
373
+ transform: 'translateY(-100%) scale(1)'
374
+ }
375
+ }
376
+ }, {
377
+ props: {
378
+ orientation: 'vertical'
379
+ },
380
+ style: {
381
+ transform: 'translateY(-50%) scale(0)',
382
+ right: '30px',
383
+ top: '50%',
384
+ transformOrigin: 'right center',
385
+ '&::before': {
386
+ position: 'absolute',
387
+ content: '""',
388
+ width: 8,
389
+ height: 8,
390
+ transform: 'translate(-50%, -50%) rotate(45deg)',
391
+ backgroundColor: 'inherit',
392
+ right: -8,
393
+ top: '50%'
394
+ },
395
+ [`&.${sliderClasses.valueLabelOpen}`]: {
396
+ transform: 'translateY(-50%) scale(1)'
397
+ }
398
+ }
399
+ }, {
400
+ props: {
401
+ size: 'small'
402
+ },
403
+ style: {
404
+ fontSize: theme.typography.pxToRem(12),
405
+ padding: '0.25rem 0.5rem'
406
+ }
407
+ }, {
408
+ props: {
409
+ orientation: 'vertical',
410
+ size: 'small'
411
+ },
412
+ style: {
413
+ right: '20px'
414
+ }
415
+ }]
279
416
  }));
280
417
  export const SliderMark = styled('span', {
281
418
  name: 'MuiSlider',
@@ -288,24 +425,38 @@ export const SliderMark = styled('span', {
288
425
  return [styles.mark, markActive && styles.markActive];
289
426
  }
290
427
  })(({
291
- theme,
292
- ownerState,
293
- markActive
294
- }) => _extends({
428
+ theme
429
+ }) => ({
295
430
  position: 'absolute',
296
431
  width: 2,
297
432
  height: 2,
298
433
  borderRadius: 1,
299
- backgroundColor: 'currentColor'
300
- }, ownerState.orientation === 'horizontal' && {
301
- top: '50%',
302
- transform: 'translate(-1px, -50%)'
303
- }, ownerState.orientation === 'vertical' && {
304
- left: '50%',
305
- transform: 'translate(-50%, 1px)'
306
- }, markActive && {
307
- backgroundColor: (theme.vars || theme).palette.background.paper,
308
- opacity: 0.8
434
+ backgroundColor: 'currentColor',
435
+ variants: [{
436
+ props: {
437
+ orientation: 'horizontal'
438
+ },
439
+ style: {
440
+ top: '50%',
441
+ transform: 'translate(-1px, -50%)'
442
+ }
443
+ }, {
444
+ props: {
445
+ orientation: 'vertical'
446
+ },
447
+ style: {
448
+ left: '50%',
449
+ transform: 'translate(-50%, 1px)'
450
+ }
451
+ }, {
452
+ props: {
453
+ markActive: true
454
+ },
455
+ style: {
456
+ backgroundColor: (theme.vars || theme).palette.background.paper,
457
+ opacity: 0.8
458
+ }
459
+ }]
309
460
  }));
310
461
  export const SliderMarkLabel = styled('span', {
311
462
  name: 'MuiSlider',
@@ -313,27 +464,41 @@ export const SliderMarkLabel = styled('span', {
313
464
  shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markLabelActive',
314
465
  overridesResolver: (props, styles) => styles.markLabel
315
466
  })(({
316
- theme,
317
- ownerState,
318
- markLabelActive
467
+ theme
319
468
  }) => _extends({}, theme.typography.body2, {
320
469
  color: (theme.vars || theme).palette.text.secondary,
321
470
  position: 'absolute',
322
- whiteSpace: 'nowrap'
323
- }, ownerState.orientation === 'horizontal' && {
324
- top: 30,
325
- transform: 'translateX(-50%)',
326
- '@media (pointer: coarse)': {
327
- top: 40
328
- }
329
- }, ownerState.orientation === 'vertical' && {
330
- left: 36,
331
- transform: 'translateY(50%)',
332
- '@media (pointer: coarse)': {
333
- left: 44
334
- }
335
- }, markLabelActive && {
336
- color: (theme.vars || theme).palette.text.primary
471
+ whiteSpace: 'nowrap',
472
+ variants: [{
473
+ props: {
474
+ orientation: 'horizontal'
475
+ },
476
+ style: {
477
+ top: 30,
478
+ transform: 'translateX(-50%)',
479
+ '@media (pointer: coarse)': {
480
+ top: 40
481
+ }
482
+ }
483
+ }, {
484
+ props: {
485
+ orientation: 'vertical'
486
+ },
487
+ style: {
488
+ left: 36,
489
+ transform: 'translateY(50%)',
490
+ '@media (pointer: coarse)': {
491
+ left: 44
492
+ }
493
+ }
494
+ }, {
495
+ props: {
496
+ markLabelActive: true
497
+ },
498
+ style: {
499
+ color: (theme.vars || theme).palette.text.primary
500
+ }
501
+ }]
337
502
  }));
338
503
  const useUtilityClasses = ownerState => {
339
504
  const {
@@ -42,7 +42,7 @@ const SvgIconRoot = styled('svg', {
42
42
  height: '1em',
43
43
  display: 'inline-block',
44
44
  // the <svg> will define the property that has `currentColor`
45
- // e.g. heroicons uses fill="none" and stroke="currentColor"
45
+ // for example heroicons uses fill="none" and stroke="currentColor"
46
46
  fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
47
47
  flexShrink: 0,
48
48
  transition: theme.transitions?.create?.('fill', {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.13
2
+ * @mui/material v5.15.15
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -38,7 +38,7 @@ function setColorChannel(obj, key) {
38
38
  if (!(`${key}Channel` in obj)) {
39
39
  // custom channel token is not provided, generate one.
40
40
  // if channel token can't be generated, show a warning.
41
- obj[`${key}Channel`] = safeColorChannel(toRgb(obj[key]), `MUI: Can't create \`palette.${key}Channel\` because \`palette.${key}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\n' + `To suppress this warning, you need to explicitly provide the \`palette.${key}Channel\` as a string (in rgb format, e.g. "12 12 12") or undefined if you want to remove the channel token.`);
41
+ obj[`${key}Channel`] = safeColorChannel(toRgb(obj[key]), `MUI: Can't create \`palette.${key}Channel\` because \`palette.${key}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\n' + `To suppress this warning, you need to explicitly provide the \`palette.${key}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`);
42
42
  }
43
43
  }
44
44
  const silent = fn => {
@@ -0,0 +1,3 @@
1
+ import slotShouldForwardProp from './slotShouldForwardProp';
2
+ const rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';
3
+ export default rootShouldForwardProp;
@@ -0,0 +1,5 @@
1
+ // copied from @mui/system/createStyled
2
+ function slotShouldForwardProp(prop) {
3
+ return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
4
+ }
5
+ export default slotShouldForwardProp;