@mui/material 5.2.6 → 5.3.1
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/Autocomplete/Autocomplete.d.ts +2 -0
- package/Autocomplete/Autocomplete.js +11 -7
- package/Avatar/Avatar.d.ts +3 -1
- package/Backdrop/Backdrop.js +3 -1
- package/Badge/Badge.d.ts +10 -10
- package/Badge/Badge.js +6 -7
- package/Button/buttonClasses.d.ts +1 -1
- package/CHANGELOG.md +240 -33
- package/FilledInput/FilledInput.js +4 -1
- package/FormControlLabel/FormControlLabel.js +3 -1
- package/Input/Input.js +4 -1
- package/InputBase/InputBase.js +4 -1
- package/InputLabel/InputLabel.js +4 -0
- package/ListItem/ListItem.js +3 -1
- package/Modal/Modal.js +3 -1
- package/README.md +5 -4
- package/Select/Select.d.ts +9 -1
- package/Select/Select.js +10 -1
- package/Select/SelectInput.d.ts +1 -0
- package/Select/SelectInput.js +25 -4
- package/Slider/Slider.d.ts +2 -0
- package/Slider/Slider.js +126 -53
- package/StepLabel/StepLabel.js +3 -1
- package/SvgIcon/SvgIcon.d.ts +8 -0
- package/SvgIcon/SvgIcon.js +28 -12
- package/TextField/TextField.d.ts +1 -0
- package/TextField/TextField.js +1 -0
- package/Tooltip/Tooltip.js +6 -1
- package/index.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +11 -7
- package/legacy/Backdrop/Backdrop.js +3 -1
- package/legacy/Badge/Badge.js +6 -7
- package/legacy/FilledInput/FilledInput.js +4 -1
- package/legacy/FormControlLabel/FormControlLabel.js +3 -1
- package/legacy/Input/Input.js +4 -1
- package/legacy/InputBase/InputBase.js +4 -1
- package/legacy/InputLabel/InputLabel.js +4 -0
- package/legacy/ListItem/ListItem.js +3 -1
- package/legacy/Modal/Modal.js +3 -1
- package/legacy/Select/Select.js +11 -1
- package/legacy/Select/SelectInput.js +29 -7
- package/legacy/Slider/Slider.js +127 -54
- package/legacy/StepLabel/StepLabel.js +3 -1
- package/legacy/SvgIcon/SvgIcon.js +29 -12
- package/legacy/TextField/TextField.js +1 -0
- package/legacy/Tooltip/Tooltip.js +6 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +139 -128
- package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
- package/locale/index.js +54 -44
- package/modern/Autocomplete/Autocomplete.js +10 -6
- package/modern/Backdrop/Backdrop.js +3 -1
- package/modern/Badge/Badge.js +6 -7
- package/modern/FilledInput/FilledInput.js +4 -1
- package/modern/FormControlLabel/FormControlLabel.js +3 -1
- package/modern/Input/Input.js +4 -1
- package/modern/InputBase/InputBase.js +4 -1
- package/modern/InputLabel/InputLabel.js +4 -0
- package/modern/ListItem/ListItem.js +3 -1
- package/modern/Modal/Modal.js +3 -1
- package/modern/Select/Select.js +10 -1
- package/modern/Select/SelectInput.js +25 -4
- package/modern/Slider/Slider.js +126 -53
- package/modern/StepLabel/StepLabel.js +3 -1
- package/modern/SvgIcon/SvgIcon.js +27 -11
- package/modern/TextField/TextField.js +1 -0
- package/modern/Tooltip/Tooltip.js +6 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +54 -44
- package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
- package/node/Autocomplete/Autocomplete.js +11 -7
- package/node/Backdrop/Backdrop.js +3 -1
- package/node/Badge/Badge.js +8 -8
- package/node/FilledInput/FilledInput.js +4 -1
- package/node/FormControlLabel/FormControlLabel.js +3 -1
- package/node/Input/Input.js +4 -1
- package/node/InputBase/InputBase.js +4 -1
- package/node/InputLabel/InputLabel.js +4 -0
- package/node/ListItem/ListItem.js +3 -1
- package/node/Modal/Modal.js +3 -1
- package/node/Select/Select.js +10 -1
- package/node/Select/SelectInput.js +25 -4
- package/node/Slider/Slider.js +112 -45
- package/node/StepLabel/StepLabel.js +3 -1
- package/node/SvgIcon/SvgIcon.js +28 -12
- package/node/TextField/TextField.js +1 -0
- package/node/Tooltip/Tooltip.js +6 -1
- package/node/index.js +1 -1
- package/node/locale/index.js +54 -44
- package/node/utils/shouldSpreadAdditionalProps.js +15 -0
- package/package.json +7 -7
- package/styles/components.d.ts +452 -113
- package/styles/createTheme.d.ts +12 -6
- package/styles/overrides.d.ts +16 -4
- package/styles/useThemeProps.d.ts +2 -1
- package/umd/material-ui.development.js +619 -289
- package/umd/material-ui.production.min.js +21 -21
- package/utils/shouldSpreadAdditionalProps.js +7 -0
package/modern/Slider/Slider.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["components", "componentsProps", "color", "size"];
|
|
3
|
+
const _excluded = ["component", "components", "componentsProps", "color", "size"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { chainPropTypes } from '@mui/utils';
|
|
8
|
-
import { generateUtilityClasses
|
|
8
|
+
import { generateUtilityClasses } from '@mui/base';
|
|
9
9
|
import SliderUnstyled, { SliderValueLabelUnstyled, sliderUnstyledClasses, getSliderUtilityClass } from '@mui/base/SliderUnstyled';
|
|
10
10
|
import { alpha, lighten, darken } from '@mui/system';
|
|
11
11
|
import useThemeProps from '../styles/useThemeProps';
|
|
12
12
|
import styled, { slotShouldForwardProp } from '../styles/styled';
|
|
13
13
|
import useTheme from '../styles/useTheme';
|
|
14
|
+
import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
|
|
14
15
|
import capitalize from '../utils/capitalize';
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
export const sliderClasses = _extends({}, sliderUnstyledClasses, generateUtilityClasses('MuiSlider', ['colorPrimary', 'colorSecondary', 'thumbColorPrimary', 'thumbColorSecondary', 'sizeSmall', 'thumbSizeSmall']));
|
|
17
|
-
|
|
18
|
+
const SliderRoot = styled('span', {
|
|
18
19
|
name: 'MuiSlider',
|
|
19
20
|
slot: 'Root',
|
|
20
21
|
overridesResolver: (props, styles) => {
|
|
@@ -80,7 +81,21 @@ export const SliderRoot = styled('span', {
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
}));
|
|
83
|
-
|
|
84
|
+
process.env.NODE_ENV !== "production" ? SliderRoot.propTypes
|
|
85
|
+
/* remove-proptypes */
|
|
86
|
+
= {
|
|
87
|
+
// ----------------------------- Warning --------------------------------
|
|
88
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
89
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
90
|
+
// ----------------------------------------------------------------------
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @ignore
|
|
94
|
+
*/
|
|
95
|
+
children: PropTypes.node
|
|
96
|
+
} : void 0;
|
|
97
|
+
export { SliderRoot };
|
|
98
|
+
const SliderRail = styled('span', {
|
|
84
99
|
name: 'MuiSlider',
|
|
85
100
|
slot: 'Rail',
|
|
86
101
|
overridesResolver: (props, styles) => styles.rail
|
|
@@ -105,7 +120,21 @@ export const SliderRail = styled('span', {
|
|
|
105
120
|
}, ownerState.track === 'inverted' && {
|
|
106
121
|
opacity: 1
|
|
107
122
|
}));
|
|
108
|
-
|
|
123
|
+
process.env.NODE_ENV !== "production" ? SliderRail.propTypes
|
|
124
|
+
/* remove-proptypes */
|
|
125
|
+
= {
|
|
126
|
+
// ----------------------------- Warning --------------------------------
|
|
127
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
128
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
129
|
+
// ----------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @ignore
|
|
133
|
+
*/
|
|
134
|
+
children: PropTypes.node
|
|
135
|
+
} : void 0;
|
|
136
|
+
export { SliderRail };
|
|
137
|
+
const SliderTrack = styled('span', {
|
|
109
138
|
name: 'MuiSlider',
|
|
110
139
|
slot: 'Track',
|
|
111
140
|
overridesResolver: (props, styles) => styles.track
|
|
@@ -141,7 +170,21 @@ export const SliderTrack = styled('span', {
|
|
|
141
170
|
borderColor: color
|
|
142
171
|
});
|
|
143
172
|
});
|
|
144
|
-
|
|
173
|
+
process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
|
|
174
|
+
/* remove-proptypes */
|
|
175
|
+
= {
|
|
176
|
+
// ----------------------------- Warning --------------------------------
|
|
177
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
178
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
179
|
+
// ----------------------------------------------------------------------
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @ignore
|
|
183
|
+
*/
|
|
184
|
+
children: PropTypes.node
|
|
185
|
+
} : void 0;
|
|
186
|
+
export { SliderTrack };
|
|
187
|
+
const SliderThumb = styled('span', {
|
|
145
188
|
name: 'MuiSlider',
|
|
146
189
|
slot: 'Thumb',
|
|
147
190
|
overridesResolver: (props, styles) => {
|
|
@@ -213,7 +256,21 @@ export const SliderThumb = styled('span', {
|
|
|
213
256
|
}
|
|
214
257
|
}
|
|
215
258
|
}));
|
|
216
|
-
|
|
259
|
+
process.env.NODE_ENV !== "production" ? SliderThumb.propTypes
|
|
260
|
+
/* remove-proptypes */
|
|
261
|
+
= {
|
|
262
|
+
// ----------------------------- Warning --------------------------------
|
|
263
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
264
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
265
|
+
// ----------------------------------------------------------------------
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @ignore
|
|
269
|
+
*/
|
|
270
|
+
children: PropTypes.node
|
|
271
|
+
} : void 0;
|
|
272
|
+
export { SliderThumb };
|
|
273
|
+
const SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
217
274
|
name: 'MuiSlider',
|
|
218
275
|
slot: 'ValueLabel',
|
|
219
276
|
overridesResolver: (props, styles) => styles.valueLabel
|
|
@@ -257,7 +314,21 @@ export const SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
257
314
|
backgroundColor: 'inherit'
|
|
258
315
|
}
|
|
259
316
|
}));
|
|
260
|
-
|
|
317
|
+
process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes
|
|
318
|
+
/* remove-proptypes */
|
|
319
|
+
= {
|
|
320
|
+
// ----------------------------- Warning --------------------------------
|
|
321
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
322
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
323
|
+
// ----------------------------------------------------------------------
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* @ignore
|
|
327
|
+
*/
|
|
328
|
+
children: PropTypes.node
|
|
329
|
+
} : void 0;
|
|
330
|
+
export { SliderValueLabel };
|
|
331
|
+
const SliderMark = styled('span', {
|
|
261
332
|
name: 'MuiSlider',
|
|
262
333
|
slot: 'Mark',
|
|
263
334
|
shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markActive',
|
|
@@ -282,7 +353,21 @@ export const SliderMark = styled('span', {
|
|
|
282
353
|
backgroundColor: theme.palette.background.paper,
|
|
283
354
|
opacity: 0.8
|
|
284
355
|
}));
|
|
285
|
-
|
|
356
|
+
process.env.NODE_ENV !== "production" ? SliderMark.propTypes
|
|
357
|
+
/* remove-proptypes */
|
|
358
|
+
= {
|
|
359
|
+
// ----------------------------- Warning --------------------------------
|
|
360
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
361
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
362
|
+
// ----------------------------------------------------------------------
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @ignore
|
|
366
|
+
*/
|
|
367
|
+
children: PropTypes.node
|
|
368
|
+
} : void 0;
|
|
369
|
+
export { SliderMark };
|
|
370
|
+
const SliderMarkLabel = styled('span', {
|
|
286
371
|
name: 'MuiSlider',
|
|
287
372
|
slot: 'MarkLabel',
|
|
288
373
|
shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markLabelActive',
|
|
@@ -310,7 +395,9 @@ export const SliderMarkLabel = styled('span', {
|
|
|
310
395
|
}, markLabelActive && {
|
|
311
396
|
color: theme.palette.text.primary
|
|
312
397
|
}));
|
|
313
|
-
|
|
398
|
+
process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
|
|
399
|
+
/* remove-proptypes */
|
|
400
|
+
= {
|
|
314
401
|
// ----------------------------- Warning --------------------------------
|
|
315
402
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
316
403
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -319,40 +406,9 @@ SliderRoot.propTypes = {
|
|
|
319
406
|
/**
|
|
320
407
|
* @ignore
|
|
321
408
|
*/
|
|
322
|
-
children: PropTypes.node
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
* @ignore
|
|
326
|
-
*/
|
|
327
|
-
ownerState: PropTypes.shape({
|
|
328
|
-
'aria-label': PropTypes.string,
|
|
329
|
-
'aria-labelledby': PropTypes.string,
|
|
330
|
-
'aria-valuetext': PropTypes.string,
|
|
331
|
-
classes: PropTypes.object,
|
|
332
|
-
color: PropTypes.oneOf(['primary', 'secondary']),
|
|
333
|
-
defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
|
|
334
|
-
disabled: PropTypes.bool,
|
|
335
|
-
getAriaLabel: PropTypes.func,
|
|
336
|
-
getAriaValueText: PropTypes.func,
|
|
337
|
-
isRtl: PropTypes.bool,
|
|
338
|
-
marks: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
|
|
339
|
-
label: PropTypes.node,
|
|
340
|
-
value: PropTypes.number.isRequired
|
|
341
|
-
})), PropTypes.bool]),
|
|
342
|
-
max: PropTypes.number,
|
|
343
|
-
min: PropTypes.number,
|
|
344
|
-
name: PropTypes.string,
|
|
345
|
-
onChange: PropTypes.func,
|
|
346
|
-
onChangeCommitted: PropTypes.func,
|
|
347
|
-
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
348
|
-
scale: PropTypes.func,
|
|
349
|
-
step: PropTypes.number,
|
|
350
|
-
track: PropTypes.oneOf(['inverted', 'normal', false]),
|
|
351
|
-
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
|
|
352
|
-
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on']),
|
|
353
|
-
valueLabelFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
|
|
354
|
-
})
|
|
355
|
-
};
|
|
409
|
+
children: PropTypes.node
|
|
410
|
+
} : void 0;
|
|
411
|
+
export { SliderMarkLabel };
|
|
356
412
|
|
|
357
413
|
const extendUtilityClasses = ownerState => {
|
|
358
414
|
const {
|
|
@@ -366,10 +422,6 @@ const extendUtilityClasses = ownerState => {
|
|
|
366
422
|
});
|
|
367
423
|
};
|
|
368
424
|
|
|
369
|
-
const shouldSpreadOwnerState = Component => {
|
|
370
|
-
return !Component || !isHostComponent(Component);
|
|
371
|
-
};
|
|
372
|
-
|
|
373
425
|
const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
374
426
|
const props = useThemeProps({
|
|
375
427
|
props: inputProps,
|
|
@@ -379,6 +431,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
379
431
|
const isRtl = theme.direction === 'rtl';
|
|
380
432
|
|
|
381
433
|
const {
|
|
434
|
+
// eslint-disable-next-line react/prop-types
|
|
435
|
+
component = 'span',
|
|
382
436
|
components = {},
|
|
383
437
|
componentsProps = {},
|
|
384
438
|
color = 'primary',
|
|
@@ -404,25 +458,26 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
404
458
|
MarkLabel: SliderMarkLabel
|
|
405
459
|
}, components),
|
|
406
460
|
componentsProps: _extends({}, componentsProps, {
|
|
407
|
-
root: _extends({}, componentsProps.root,
|
|
461
|
+
root: _extends({}, componentsProps.root, shouldSpreadAdditionalProps(components.Root) && {
|
|
462
|
+
as: component,
|
|
408
463
|
ownerState: _extends({}, componentsProps.root?.ownerState, {
|
|
409
464
|
color,
|
|
410
465
|
size
|
|
411
466
|
})
|
|
412
467
|
}),
|
|
413
|
-
thumb: _extends({}, componentsProps.thumb,
|
|
468
|
+
thumb: _extends({}, componentsProps.thumb, shouldSpreadAdditionalProps(components.Thumb) && {
|
|
414
469
|
ownerState: _extends({}, componentsProps.thumb?.ownerState, {
|
|
415
470
|
color,
|
|
416
471
|
size
|
|
417
472
|
})
|
|
418
473
|
}),
|
|
419
|
-
track: _extends({}, componentsProps.track,
|
|
474
|
+
track: _extends({}, componentsProps.track, shouldSpreadAdditionalProps(components.Track) && {
|
|
420
475
|
ownerState: _extends({}, componentsProps.track?.ownerState, {
|
|
421
476
|
color,
|
|
422
477
|
size
|
|
423
478
|
})
|
|
424
479
|
}),
|
|
425
|
-
valueLabel: _extends({}, componentsProps.valueLabel,
|
|
480
|
+
valueLabel: _extends({}, componentsProps.valueLabel, shouldSpreadAdditionalProps(components.ValueLabel) && {
|
|
426
481
|
ownerState: _extends({}, componentsProps.valueLabel?.ownerState, {
|
|
427
482
|
color,
|
|
428
483
|
size
|
|
@@ -496,6 +551,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
496
551
|
* @default {}
|
|
497
552
|
*/
|
|
498
553
|
components: PropTypes.shape({
|
|
554
|
+
Input: PropTypes.elementType,
|
|
499
555
|
Mark: PropTypes.elementType,
|
|
500
556
|
MarkLabel: PropTypes.elementType,
|
|
501
557
|
Rail: PropTypes.elementType,
|
|
@@ -509,7 +565,24 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
509
565
|
* The props used for each slot inside the Slider.
|
|
510
566
|
* @default {}
|
|
511
567
|
*/
|
|
512
|
-
componentsProps: PropTypes.
|
|
568
|
+
componentsProps: PropTypes.shape({
|
|
569
|
+
input: PropTypes.object,
|
|
570
|
+
mark: PropTypes.object,
|
|
571
|
+
markLabel: PropTypes.object,
|
|
572
|
+
rail: PropTypes.object,
|
|
573
|
+
root: PropTypes.object,
|
|
574
|
+
thumb: PropTypes.object,
|
|
575
|
+
track: PropTypes.object,
|
|
576
|
+
valueLabel: PropTypes.shape({
|
|
577
|
+
className: PropTypes.string,
|
|
578
|
+
components: PropTypes.shape({
|
|
579
|
+
Root: PropTypes.elementType
|
|
580
|
+
}),
|
|
581
|
+
style: PropTypes.object,
|
|
582
|
+
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
|
|
583
|
+
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
584
|
+
})
|
|
585
|
+
}),
|
|
513
586
|
|
|
514
587
|
/**
|
|
515
588
|
* The default value. Use when the component is not controlled.
|
|
@@ -205,7 +205,9 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes
|
|
|
205
205
|
* The props used for each slot inside.
|
|
206
206
|
* @default {}
|
|
207
207
|
*/
|
|
208
|
-
componentsProps: PropTypes.
|
|
208
|
+
componentsProps: PropTypes.shape({
|
|
209
|
+
label: PropTypes.object
|
|
210
|
+
}),
|
|
209
211
|
|
|
210
212
|
/**
|
|
211
213
|
* If `true`, the step is marked as failed.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "titleAccess", "viewBox"];
|
|
3
|
+
const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -43,19 +43,19 @@ const SvgIconRoot = styled('svg', {
|
|
|
43
43
|
display: 'inline-block',
|
|
44
44
|
fill: 'currentColor',
|
|
45
45
|
flexShrink: 0,
|
|
46
|
-
transition: theme.transitions
|
|
47
|
-
duration: theme.transitions
|
|
46
|
+
transition: theme.transitions?.create?.('fill', {
|
|
47
|
+
duration: theme.transitions?.duration?.shorter
|
|
48
48
|
}),
|
|
49
49
|
fontSize: {
|
|
50
50
|
inherit: 'inherit',
|
|
51
|
-
small: theme.typography
|
|
52
|
-
medium: theme.typography
|
|
53
|
-
large: theme.typography
|
|
51
|
+
small: theme.typography?.pxToRem?.(20) || '1.25rem',
|
|
52
|
+
medium: theme.typography?.pxToRem?.(24) || '1.5rem',
|
|
53
|
+
large: theme.typography?.pxToRem?.(35) || '2.1875'
|
|
54
54
|
}[ownerState.fontSize],
|
|
55
55
|
// TODO v5 deprecate, v6 remove for sx
|
|
56
|
-
color: theme.palette[ownerState.color]?.main ?? {
|
|
57
|
-
action: theme.palette
|
|
58
|
-
disabled: theme.palette
|
|
56
|
+
color: theme.palette?.[ownerState.color]?.main ?? {
|
|
57
|
+
action: theme.palette?.action?.active,
|
|
58
|
+
disabled: theme.palette?.action?.disabled,
|
|
59
59
|
inherit: undefined
|
|
60
60
|
}[ownerState.color]
|
|
61
61
|
}));
|
|
@@ -72,6 +72,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
72
72
|
component = 'svg',
|
|
73
73
|
fontSize = 'medium',
|
|
74
74
|
htmlColor,
|
|
75
|
+
inheritViewBox = false,
|
|
75
76
|
titleAccess,
|
|
76
77
|
viewBox = '0 0 24 24'
|
|
77
78
|
} = props,
|
|
@@ -81,21 +82,27 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
81
82
|
color,
|
|
82
83
|
component,
|
|
83
84
|
fontSize,
|
|
85
|
+
inheritViewBox,
|
|
84
86
|
viewBox
|
|
85
87
|
});
|
|
86
88
|
|
|
89
|
+
const more = {};
|
|
90
|
+
|
|
91
|
+
if (!inheritViewBox) {
|
|
92
|
+
more.viewBox = viewBox;
|
|
93
|
+
}
|
|
94
|
+
|
|
87
95
|
const classes = useUtilityClasses(ownerState);
|
|
88
96
|
return /*#__PURE__*/_jsxs(SvgIconRoot, _extends({
|
|
89
97
|
as: component,
|
|
90
98
|
className: clsx(classes.root, className),
|
|
91
99
|
ownerState: ownerState,
|
|
92
100
|
focusable: "false",
|
|
93
|
-
viewBox: viewBox,
|
|
94
101
|
color: htmlColor,
|
|
95
102
|
"aria-hidden": titleAccess ? undefined : true,
|
|
96
103
|
role: titleAccess ? 'img' : undefined,
|
|
97
104
|
ref: ref
|
|
98
|
-
}, other, {
|
|
105
|
+
}, more, other, {
|
|
99
106
|
children: [children, titleAccess ? /*#__PURE__*/_jsx("title", {
|
|
100
107
|
children: titleAccess
|
|
101
108
|
}) : null]
|
|
@@ -152,6 +159,15 @@ process.env.NODE_ENV !== "production" ? SvgIcon.propTypes
|
|
|
152
159
|
*/
|
|
153
160
|
htmlColor: PropTypes.string,
|
|
154
161
|
|
|
162
|
+
/**
|
|
163
|
+
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
|
164
|
+
* prop will be ignored.
|
|
165
|
+
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
|
166
|
+
* `component`'s viewBox to the root node.
|
|
167
|
+
* @default false
|
|
168
|
+
*/
|
|
169
|
+
inheritViewBox: PropTypes.bool,
|
|
170
|
+
|
|
155
171
|
/**
|
|
156
172
|
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
157
173
|
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
@@ -296,6 +296,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes
|
|
|
296
296
|
|
|
297
297
|
/**
|
|
298
298
|
* Props applied to the [`InputLabel`](/api/input-label/) element.
|
|
299
|
+
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
299
300
|
*/
|
|
300
301
|
InputLabelProps: PropTypes.object,
|
|
301
302
|
|
|
@@ -673,7 +673,12 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
|
|
|
673
673
|
* and `componentsProps.transition` prop values win over `TransitionProps` if both are applied.
|
|
674
674
|
* @default {}
|
|
675
675
|
*/
|
|
676
|
-
componentsProps: PropTypes.
|
|
676
|
+
componentsProps: PropTypes.shape({
|
|
677
|
+
arrow: PropTypes.object,
|
|
678
|
+
popper: PropTypes.object,
|
|
679
|
+
tooltip: PropTypes.object,
|
|
680
|
+
transition: PropTypes.object
|
|
681
|
+
}),
|
|
677
682
|
|
|
678
683
|
/**
|
|
679
684
|
* Set to `true` if the `title` acts as an accessible description.
|
package/modern/index.js
CHANGED
package/modern/locale/index.js
CHANGED
|
@@ -1206,9 +1206,12 @@ export const fiFI = {
|
|
|
1206
1206
|
|
|
1207
1207
|
return 'Mene edelliselle sivulle';
|
|
1208
1208
|
},
|
|
1209
|
-
labelRowsPerPage: 'Rivejä per sivu:'
|
|
1210
|
-
|
|
1211
|
-
|
|
1209
|
+
labelRowsPerPage: 'Rivejä per sivu:',
|
|
1210
|
+
labelDisplayedRows: ({
|
|
1211
|
+
from,
|
|
1212
|
+
to,
|
|
1213
|
+
count
|
|
1214
|
+
}) => `${from}–${to} / ${count !== -1 ? count : `enemmän kuin ${to}`}`
|
|
1212
1215
|
}
|
|
1213
1216
|
},
|
|
1214
1217
|
MuiRating: {
|
|
@@ -3266,26 +3269,29 @@ export const ukUA = {
|
|
|
3266
3269
|
};
|
|
3267
3270
|
export const viVN = {
|
|
3268
3271
|
components: {
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3272
|
+
MuiBreadcrumbs: {
|
|
3273
|
+
defaultProps: {
|
|
3274
|
+
expandText: 'Mở ra'
|
|
3275
|
+
}
|
|
3276
|
+
},
|
|
3274
3277
|
MuiTablePagination: {
|
|
3275
3278
|
defaultProps: {
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3279
|
+
getItemAriaLabel: type => {
|
|
3280
|
+
if (type === 'first') {
|
|
3281
|
+
return 'Tới trang đầu tiên';
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
if (type === 'last') {
|
|
3285
|
+
return 'Tới trang cuối cùng';
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
if (type === 'next') {
|
|
3289
|
+
return 'Tới trang tiếp theo';
|
|
3290
|
+
} // if (type === 'previous') {
|
|
3291
|
+
|
|
3292
|
+
|
|
3293
|
+
return 'Về trang trước đó';
|
|
3294
|
+
},
|
|
3289
3295
|
labelRowsPerPage: 'Số hàng mỗi trang:',
|
|
3290
3296
|
labelDisplayedRows: ({
|
|
3291
3297
|
from,
|
|
@@ -3297,7 +3303,7 @@ export const viVN = {
|
|
|
3297
3303
|
MuiRating: {
|
|
3298
3304
|
defaultProps: {
|
|
3299
3305
|
getLabelText: value => `${value} sao`,
|
|
3300
|
-
emptyLabelText: '
|
|
3306
|
+
emptyLabelText: 'Không có dữ liệu'
|
|
3301
3307
|
}
|
|
3302
3308
|
},
|
|
3303
3309
|
MuiAutocomplete: {
|
|
@@ -3305,7 +3311,7 @@ export const viVN = {
|
|
|
3305
3311
|
clearText: 'Xóa',
|
|
3306
3312
|
closeText: 'Đóng',
|
|
3307
3313
|
loadingText: 'Đang tải…',
|
|
3308
|
-
noOptionsText: 'Không có lựa chọn',
|
|
3314
|
+
noOptionsText: 'Không có lựa chọn nào',
|
|
3309
3315
|
openText: 'Mở'
|
|
3310
3316
|
}
|
|
3311
3317
|
},
|
|
@@ -3313,28 +3319,32 @@ export const viVN = {
|
|
|
3313
3319
|
defaultProps: {
|
|
3314
3320
|
closeText: 'Đóng'
|
|
3315
3321
|
}
|
|
3316
|
-
}
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
// }
|
|
3329
|
-
// if (type === 'next') {
|
|
3330
|
-
// return 'Go to next page';
|
|
3331
|
-
// }
|
|
3332
|
-
// // if (type === 'previous') {
|
|
3333
|
-
// return 'Go to previous page';
|
|
3334
|
-
// },
|
|
3335
|
-
// },
|
|
3336
|
-
// },
|
|
3322
|
+
},
|
|
3323
|
+
MuiPagination: {
|
|
3324
|
+
defaultProps: {
|
|
3325
|
+
'aria-label': 'Thanh điều khiển trang',
|
|
3326
|
+
getItemAriaLabel: (type, page, selected) => {
|
|
3327
|
+
if (type === 'page') {
|
|
3328
|
+
return `${selected ? '' : 'Tới '}trang ${page}`;
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
if (type === 'first') {
|
|
3332
|
+
return 'Tới trang đầu tiên';
|
|
3333
|
+
}
|
|
3337
3334
|
|
|
3335
|
+
if (type === 'last') {
|
|
3336
|
+
return 'Tới trang cuối cùng';
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
if (type === 'next') {
|
|
3340
|
+
return 'Tới trang tiếp theo';
|
|
3341
|
+
} // if (type === 'previous') {
|
|
3342
|
+
|
|
3343
|
+
|
|
3344
|
+
return 'Về trang trước đó';
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3338
3348
|
}
|
|
3339
3349
|
};
|
|
3340
3350
|
export const zhCN = {
|
|
@@ -389,7 +389,7 @@ const AutocompleteGroupUl = (0, _styled.default)('ul', {
|
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
|
|
392
|
-
var _componentsProps$clea;
|
|
392
|
+
var _componentsProps$clea, _componentsProps$pape;
|
|
393
393
|
|
|
394
394
|
const props = (0, _useThemeProps.default)({
|
|
395
395
|
props: inProps,
|
|
@@ -607,10 +607,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
607
607
|
role: "presentation",
|
|
608
608
|
anchorEl: anchorEl,
|
|
609
609
|
open: true,
|
|
610
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(AutocompletePaper, {
|
|
611
|
-
as: PaperComponent,
|
|
612
|
-
className: classes.paper,
|
|
610
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(AutocompletePaper, (0, _extends2.default)({
|
|
613
611
|
ownerState: ownerState,
|
|
612
|
+
as: PaperComponent
|
|
613
|
+
}, componentsProps.paper, {
|
|
614
|
+
className: (0, _clsx.default)(classes.paper, (_componentsProps$pape = componentsProps.paper) == null ? void 0 : _componentsProps$pape.className),
|
|
614
615
|
children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteLoading, {
|
|
615
616
|
className: classes.loading,
|
|
616
617
|
ownerState: ownerState,
|
|
@@ -641,7 +642,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
641
642
|
return renderListOption(option, index);
|
|
642
643
|
})
|
|
643
644
|
})) : null]
|
|
644
|
-
})
|
|
645
|
+
}))
|
|
645
646
|
}) : null]
|
|
646
647
|
});
|
|
647
648
|
});
|
|
@@ -711,7 +712,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
711
712
|
* If `true`, the input's text is cleared on blur if no value is selected.
|
|
712
713
|
*
|
|
713
714
|
* Set to `true` if you want to help the user enter a new value.
|
|
714
|
-
* Set to `false` if you want to help the user resume
|
|
715
|
+
* Set to `false` if you want to help the user resume their search.
|
|
715
716
|
* @default !props.freeSolo
|
|
716
717
|
*/
|
|
717
718
|
clearOnBlur: _propTypes.default.bool,
|
|
@@ -742,7 +743,10 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
742
743
|
* The props used for each slot inside.
|
|
743
744
|
* @default {}
|
|
744
745
|
*/
|
|
745
|
-
componentsProps: _propTypes.default.
|
|
746
|
+
componentsProps: _propTypes.default.shape({
|
|
747
|
+
clearIndicator: _propTypes.default.object,
|
|
748
|
+
paper: _propTypes.default.object
|
|
749
|
+
}),
|
|
746
750
|
|
|
747
751
|
/**
|
|
748
752
|
* The default value. Use when the component is not controlled.
|
|
@@ -148,7 +148,9 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
148
148
|
* The props used for each slot inside the Backdrop.
|
|
149
149
|
* @default {}
|
|
150
150
|
*/
|
|
151
|
-
componentsProps: _propTypes.default.
|
|
151
|
+
componentsProps: _propTypes.default.shape({
|
|
152
|
+
root: _propTypes.default.object
|
|
153
|
+
}),
|
|
152
154
|
|
|
153
155
|
/**
|
|
154
156
|
* If `true`, the backdrop is invisible.
|