@mui/material 5.2.5 → 5.3.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/Autocomplete/Autocomplete.d.ts +2 -0
- package/Autocomplete/Autocomplete.js +10 -6
- package/Avatar/Avatar.d.ts +3 -1
- package/Backdrop/Backdrop.js +3 -1
- package/Badge/Badge.d.ts +25 -0
- package/Badge/Badge.js +31 -15
- package/ButtonGroup/ButtonGroupContext.d.ts +1 -1
- package/CHANGELOG.md +245 -32
- 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 +19 -24
- 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 +19 -3
- 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 +10 -6
- package/legacy/Backdrop/Backdrop.js +3 -1
- package/legacy/Badge/Badge.js +36 -16
- 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 +20 -3
- 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 +224 -130
- package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
- package/locale/index.d.ts +1 -0
- package/locale/index.js +140 -50
- package/modern/Autocomplete/Autocomplete.js +9 -5
- package/modern/Backdrop/Backdrop.js +3 -1
- package/modern/Badge/Badge.js +31 -15
- 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 +19 -3
- 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 +140 -50
- package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
- package/node/Autocomplete/Autocomplete.js +10 -6
- package/node/Backdrop/Backdrop.js +3 -1
- package/node/Badge/Badge.js +33 -16
- 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 +19 -3
- 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 +142 -51
- 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 +703 -332
- 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';
|
|
@@ -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
|
@@ -888,7 +888,7 @@ export const enUS = {
|
|
|
888
888
|
MuiBreadcrumbs: { defaultProps: {
|
|
889
889
|
expandText: 'Show path',
|
|
890
890
|
}},
|
|
891
|
-
MuiTablePagination: { defaultProps: {
|
|
891
|
+
MuiTablePagination: { defaultProps: {
|
|
892
892
|
getItemAriaLabel: (type) => {
|
|
893
893
|
if (type === 'first') {
|
|
894
894
|
return 'Go to first page';
|
|
@@ -906,21 +906,21 @@ export const enUS = {
|
|
|
906
906
|
labelDisplayedRows: ({ from, to, count }) =>
|
|
907
907
|
`${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`,
|
|
908
908
|
}},
|
|
909
|
-
MuiRating: { defaultProps: {
|
|
909
|
+
MuiRating: { defaultProps: {
|
|
910
910
|
getLabelText: value => `${value} Star${value !== 1 ? 's' : ''}`,
|
|
911
911
|
emptyLabelText: 'Empty',
|
|
912
912
|
}},
|
|
913
|
-
MuiAutocomplete: { defaultProps: {
|
|
913
|
+
MuiAutocomplete: { defaultProps: {
|
|
914
914
|
clearText: 'Clear',
|
|
915
915
|
closeText: 'Close',
|
|
916
916
|
loadingText: 'Loading…',
|
|
917
917
|
noOptionsText: 'No options',
|
|
918
918
|
openText: 'Open',
|
|
919
919
|
}},
|
|
920
|
-
MuiAlert: { defaultProps: {
|
|
920
|
+
MuiAlert: { defaultProps: {
|
|
921
921
|
closeText: 'Close',
|
|
922
922
|
}},
|
|
923
|
-
MuiPagination: { defaultProps: {
|
|
923
|
+
MuiPagination: { defaultProps: {
|
|
924
924
|
'aria-label': 'Pagination navigation',
|
|
925
925
|
getItemAriaLabel: (type, page, selected) => {
|
|
926
926
|
if (type === 'page') {
|
|
@@ -938,7 +938,7 @@ export const enUS = {
|
|
|
938
938
|
// if (type === 'previous') {
|
|
939
939
|
return 'Go to previous page';
|
|
940
940
|
},
|
|
941
|
-
},
|
|
941
|
+
}},
|
|
942
942
|
},
|
|
943
943
|
*/
|
|
944
944
|
};
|
|
@@ -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: {
|
|
@@ -2186,6 +2189,86 @@ export const kzKZ = {
|
|
|
2186
2189
|
}
|
|
2187
2190
|
}
|
|
2188
2191
|
};
|
|
2192
|
+
export const nbNO = {
|
|
2193
|
+
components: {
|
|
2194
|
+
MuiBreadcrumbs: {
|
|
2195
|
+
defaultProps: {
|
|
2196
|
+
expandText: 'Vis sti'
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2199
|
+
MuiTablePagination: {
|
|
2200
|
+
defaultProps: {
|
|
2201
|
+
getItemAriaLabel: type => {
|
|
2202
|
+
if (type === 'first') {
|
|
2203
|
+
return 'Gå til første side';
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
if (type === 'last') {
|
|
2207
|
+
return 'Gå til siste side';
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
if (type === 'next') {
|
|
2211
|
+
return 'Gå til neste side';
|
|
2212
|
+
} // if (type === 'previous') {
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
return 'Gå til forrige side';
|
|
2216
|
+
},
|
|
2217
|
+
labelRowsPerPage: 'Rader per side:',
|
|
2218
|
+
labelDisplayedRows: ({
|
|
2219
|
+
from,
|
|
2220
|
+
to,
|
|
2221
|
+
count
|
|
2222
|
+
}) => `${from}–${to} av ${count !== -1 ? count : `mer enn ${to}`}`
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
MuiRating: {
|
|
2226
|
+
defaultProps: {
|
|
2227
|
+
getLabelText: value => `${value} Stjerne${value !== 1 ? 'r' : ''}`,
|
|
2228
|
+
emptyLabelText: 'Tom'
|
|
2229
|
+
}
|
|
2230
|
+
},
|
|
2231
|
+
MuiAutocomplete: {
|
|
2232
|
+
defaultProps: {
|
|
2233
|
+
clearText: 'Tøm',
|
|
2234
|
+
closeText: 'Lukk',
|
|
2235
|
+
loadingText: 'Laster inn…',
|
|
2236
|
+
noOptionsText: 'Ingen alternativer',
|
|
2237
|
+
openText: 'Åpne'
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
MuiAlert: {
|
|
2241
|
+
defaultProps: {
|
|
2242
|
+
closeText: 'Lukk'
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
MuiPagination: {
|
|
2246
|
+
defaultProps: {
|
|
2247
|
+
'aria-label': 'Paginering navigasjon',
|
|
2248
|
+
getItemAriaLabel: (type, page, selected) => {
|
|
2249
|
+
if (type === 'page') {
|
|
2250
|
+
return `${selected ? '' : 'Gå til '}side ${page}`;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
if (type === 'first') {
|
|
2254
|
+
return 'Gå til første side';
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
if (type === 'last') {
|
|
2258
|
+
return 'Gå til siste side';
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
if (type === 'next') {
|
|
2262
|
+
return 'Gå til neste side';
|
|
2263
|
+
} // if (type === 'previous') {
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
return 'Gå til forrige side';
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
};
|
|
2189
2272
|
export const nlNL = {
|
|
2190
2273
|
components: {
|
|
2191
2274
|
MuiBreadcrumbs: {
|
|
@@ -3186,26 +3269,29 @@ export const ukUA = {
|
|
|
3186
3269
|
};
|
|
3187
3270
|
export const viVN = {
|
|
3188
3271
|
components: {
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3272
|
+
MuiBreadcrumbs: {
|
|
3273
|
+
defaultProps: {
|
|
3274
|
+
expandText: 'Mở ra'
|
|
3275
|
+
}
|
|
3276
|
+
},
|
|
3194
3277
|
MuiTablePagination: {
|
|
3195
3278
|
defaultProps: {
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
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
|
+
},
|
|
3209
3295
|
labelRowsPerPage: 'Số hàng mỗi trang:',
|
|
3210
3296
|
labelDisplayedRows: ({
|
|
3211
3297
|
from,
|
|
@@ -3217,7 +3303,7 @@ export const viVN = {
|
|
|
3217
3303
|
MuiRating: {
|
|
3218
3304
|
defaultProps: {
|
|
3219
3305
|
getLabelText: value => `${value} sao`,
|
|
3220
|
-
emptyLabelText: '
|
|
3306
|
+
emptyLabelText: 'Không có dữ liệu'
|
|
3221
3307
|
}
|
|
3222
3308
|
},
|
|
3223
3309
|
MuiAutocomplete: {
|
|
@@ -3225,7 +3311,7 @@ export const viVN = {
|
|
|
3225
3311
|
clearText: 'Xóa',
|
|
3226
3312
|
closeText: 'Đóng',
|
|
3227
3313
|
loadingText: 'Đang tải…',
|
|
3228
|
-
noOptionsText: 'Không có lựa chọn',
|
|
3314
|
+
noOptionsText: 'Không có lựa chọn nào',
|
|
3229
3315
|
openText: 'Mở'
|
|
3230
3316
|
}
|
|
3231
3317
|
},
|
|
@@ -3233,28 +3319,32 @@ export const viVN = {
|
|
|
3233
3319
|
defaultProps: {
|
|
3234
3320
|
closeText: 'Đóng'
|
|
3235
3321
|
}
|
|
3236
|
-
}
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
// return 'Go to first page';
|
|
3245
|
-
// }
|
|
3246
|
-
// if (type === 'last') {
|
|
3247
|
-
// return 'Go to last page';
|
|
3248
|
-
// }
|
|
3249
|
-
// if (type === 'next') {
|
|
3250
|
-
// return 'Go to next page';
|
|
3251
|
-
// }
|
|
3252
|
-
// // if (type === 'previous') {
|
|
3253
|
-
// return 'Go to previous page';
|
|
3254
|
-
// },
|
|
3255
|
-
// },
|
|
3256
|
-
// },
|
|
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
|
+
}
|
|
3257
3330
|
|
|
3331
|
+
if (type === 'first') {
|
|
3332
|
+
return 'Tới trang đầu tiên';
|
|
3333
|
+
}
|
|
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
|
+
}
|
|
3258
3348
|
}
|
|
3259
3349
|
};
|
|
3260
3350
|
export const zhCN = {
|