@mui/material 5.11.4 → 5.11.5

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 (192) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/Autocomplete.d.ts +3 -3
  9. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  10. package/Avatar/avatarClasses.d.ts +20 -20
  11. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  12. package/Backdrop/backdropClasses.d.ts +10 -10
  13. package/Badge/badgeClasses.d.ts +56 -56
  14. package/BottomNavigation/BottomNavigation.js +0 -0
  15. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  16. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  17. package/Box/Box.d.ts +5 -22
  18. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  19. package/Button/buttonClasses.d.ts +100 -100
  20. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  21. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  22. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  23. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  24. package/CHANGELOG.md +58 -0
  25. package/Card/cardClasses.d.ts +8 -8
  26. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  27. package/CardActions/cardActionsClasses.d.ts +10 -10
  28. package/CardContent/cardContentClasses.d.ts +8 -8
  29. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  30. package/CardMedia/cardMediaClasses.d.ts +12 -12
  31. package/Checkbox/checkboxClasses.d.ts +18 -18
  32. package/Chip/chipClasses.d.ts +96 -96
  33. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  34. package/ClickAwayListener/index.d.ts +2 -2
  35. package/Collapse/collapseClasses.d.ts +18 -18
  36. package/Container/containerClasses.d.ts +6 -6
  37. package/Dialog/DialogContext.d.ts +6 -6
  38. package/Dialog/dialogClasses.d.ts +36 -36
  39. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  40. package/DialogContent/dialogContentClasses.d.ts +10 -10
  41. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  42. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  43. package/Divider/dividerClasses.d.ts +34 -34
  44. package/Drawer/drawerClasses.d.ts +30 -30
  45. package/Fab/fabClasses.d.ts +26 -26
  46. package/FilledInput/filledInputClasses.d.ts +40 -40
  47. package/FormControl/FormControlContext.d.ts +17 -17
  48. package/FormControl/formControlClasses.d.ts +14 -14
  49. package/FormControl/useFormControl.d.ts +2 -2
  50. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  51. package/FormGroup/formGroupClasses.d.ts +12 -12
  52. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  53. package/FormLabel/formLabelClasses.d.ts +22 -22
  54. package/Grid/gridClasses.d.ts +48 -48
  55. package/Icon/iconClasses.d.ts +24 -24
  56. package/IconButton/iconButtonClasses.d.ts +34 -34
  57. package/ImageList/imageListClasses.d.ts +16 -16
  58. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  59. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  60. package/Input/inputClasses.d.ts +34 -34
  61. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  62. package/InputBase/inputBaseClasses.d.ts +46 -46
  63. package/InputLabel/inputLabelClasses.d.ts +32 -32
  64. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  65. package/Link/getTextDecoration.d.ts +15 -15
  66. package/Link/linkClasses.d.ts +18 -18
  67. package/List/listClasses.d.ts +14 -14
  68. package/ListItem/listItemClasses.d.ts +30 -30
  69. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  70. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  71. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  72. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  73. package/ListItemText/listItemTextClasses.d.ts +18 -18
  74. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  75. package/Menu/menuClasses.d.ts +12 -12
  76. package/MenuItem/menuItemClasses.d.ts +20 -20
  77. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  78. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  79. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  80. package/Pagination/paginationClasses.d.ts +14 -14
  81. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  82. package/Paper/paperClasses.d.ts +39 -39
  83. package/Popover/popoverClasses.d.ts +10 -10
  84. package/Popper/Popper.d.ts +37 -37
  85. package/Radio/radioClasses.d.ts +16 -16
  86. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  87. package/RadioGroup/useRadioGroup.d.ts +4 -4
  88. package/Rating/ratingClasses.d.ts +40 -40
  89. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  90. package/Select/selectClasses.d.ts +30 -30
  91. package/Skeleton/skeletonClasses.d.ts +26 -26
  92. package/Slider/Slider.d.ts +1 -2
  93. package/Slider/Slider.js +222 -63
  94. package/Slider/SliderValueLabel.d.ts +15 -0
  95. package/Slider/SliderValueLabel.js +49 -0
  96. package/Slider/SliderValueLabel.types.d.ts +24 -0
  97. package/Slider/SliderValueLabel.types.js +1 -0
  98. package/Slider/index.d.ts +1 -0
  99. package/Slider/index.js +2 -1
  100. package/Slider/sliderClasses.d.ts +29 -0
  101. package/Slider/sliderClasses.js +5 -0
  102. package/Snackbar/snackbarClasses.d.ts +20 -20
  103. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  104. package/SpeedDial/speedDialClasses.d.ts +22 -22
  105. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  106. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  107. package/Step/StepContext.d.ts +20 -20
  108. package/Step/stepClasses.d.ts +16 -16
  109. package/StepButton/stepButtonClasses.d.ts +14 -14
  110. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  111. package/StepContent/stepContentClasses.d.ts +12 -12
  112. package/StepIcon/stepIconClasses.d.ts +16 -16
  113. package/StepLabel/stepLabelClasses.d.ts +28 -28
  114. package/Stepper/StepperContext.d.ts +18 -18
  115. package/Stepper/stepperClasses.d.ts +14 -14
  116. package/SvgIcon/svgIconClasses.d.ts +26 -26
  117. package/Switch/switchClasses.d.ts +32 -32
  118. package/Tab/tabClasses.d.ts +26 -26
  119. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  120. package/Table/tableClasses.d.ts +10 -10
  121. package/TableBody/tableBodyClasses.d.ts +8 -8
  122. package/TableCell/tableCellClasses.d.ts +32 -32
  123. package/TableContainer/tableContainerClasses.d.ts +8 -8
  124. package/TableFooter/tableFooterClasses.d.ts +8 -8
  125. package/TableHead/tableHeadClasses.d.ts +8 -8
  126. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  127. package/TableRow/tableRowClasses.d.ts +16 -16
  128. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  129. package/Tabs/tabsClasses.d.ts +32 -32
  130. package/TextField/textFieldClasses.d.ts +8 -8
  131. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  132. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  133. package/Toolbar/toolbarClasses.d.ts +14 -14
  134. package/Tooltip/tooltipClasses.d.ts +30 -30
  135. package/Typography/typographyClasses.d.ts +50 -50
  136. package/Unstable_Grid2/Grid2.d.ts +4 -4
  137. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  138. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  139. package/Unstable_Grid2/index.d.ts +4 -4
  140. package/className/index.d.ts +1 -1
  141. package/darkScrollbar/index.d.ts +28 -28
  142. package/generateUtilityClass/index.d.ts +2 -2
  143. package/generateUtilityClasses/index.d.ts +1 -1
  144. package/index.js +1 -1
  145. package/internal/switchBaseClasses.d.ts +12 -12
  146. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  147. package/legacy/Slider/Slider.js +251 -72
  148. package/legacy/Slider/SliderValueLabel.js +45 -0
  149. package/legacy/Slider/SliderValueLabel.types.js +1 -0
  150. package/legacy/Slider/index.js +2 -1
  151. package/legacy/Slider/sliderClasses.js +5 -0
  152. package/legacy/index.js +1 -1
  153. package/legacy/locale/index.js +230 -144
  154. package/legacy/styles/experimental_extendTheme.js +16 -8
  155. package/locale/index.d.ts +75 -74
  156. package/locale/index.js +85 -0
  157. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  158. package/modern/Slider/Slider.js +221 -62
  159. package/modern/Slider/SliderValueLabel.js +49 -0
  160. package/modern/Slider/SliderValueLabel.types.js +1 -0
  161. package/modern/Slider/index.js +2 -1
  162. package/modern/Slider/sliderClasses.js +5 -0
  163. package/modern/index.js +1 -1
  164. package/modern/locale/index.js +85 -0
  165. package/modern/styles/experimental_extendTheme.js +16 -8
  166. package/node/BottomNavigation/BottomNavigation.js +0 -0
  167. package/node/Slider/Slider.js +228 -71
  168. package/node/Slider/SliderValueLabel.js +57 -0
  169. package/node/Slider/SliderValueLabel.types.js +5 -0
  170. package/node/Slider/index.js +11 -1
  171. package/node/Slider/sliderClasses.js +13 -0
  172. package/node/index.js +1 -1
  173. package/node/locale/index.js +87 -1
  174. package/node/styles/experimental_extendTheme.js +16 -8
  175. package/package.json +4 -4
  176. package/styles/CssVarsProvider.d.ts +16 -16
  177. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  178. package/styles/experimental_extendTheme.js +16 -8
  179. package/styles/getOverlayAlpha.d.ts +2 -2
  180. package/transitions/index.d.ts +1 -1
  181. package/transitions/transition.d.ts +13 -13
  182. package/transitions/utils.d.ts +23 -23
  183. package/types/OverridableComponentAugmentation.d.ts +31 -31
  184. package/umd/material-ui.development.js +497 -770
  185. package/umd/material-ui.production.min.js +21 -21
  186. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  187. package/useTouchRipple/index.d.ts +1 -1
  188. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  189. package/utils/getScrollbarSize.d.ts +2 -2
  190. package/utils/ownerDocument.d.ts +2 -2
  191. package/utils/ownerWindow.d.ts +2 -2
  192. package/utils/setRef.d.ts +2 -2
@@ -25,6 +25,13 @@ function setColor(obj, key, defaultValue) {
25
25
  obj[key] = defaultValue;
26
26
  }
27
27
  }
28
+ function setColorChannel(obj, key) {
29
+ if (!("".concat(key, "Channel") in obj)) {
30
+ // custom channel token is not provided, generate one.
31
+ // if channel token can't be generated, show a warning.
32
+ obj["".concat(key, "Channel")] = safeColorChannel(obj[key], "MUI: Can't create `palette.".concat(key, "Channel` because `palette.").concat(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.".concat(key, "Channel` as a string (in rgb format, e.g. \"12 12 12\") or undefined if you want to remove the channel token."));
33
+ }
34
+ }
28
35
  var silent = function silent(fn) {
29
36
  try {
30
37
  return fn();
@@ -236,11 +243,12 @@ export default function extendTheme() {
236
243
  setColor(palette.TableCell, 'border', safeDarken(safeAlpha(palette.divider, 1), 0.68));
237
244
  setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));
238
245
  }
239
- setColor(palette.background, 'defaultChannel', safeColorChannel(palette.background.default, 'MUI: The value of `palette.background.default` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().')); // MUI X - DataGrid needs this token.
240
246
 
241
- setColor(palette.common, 'backgroundChannel', safeColorChannel(palette.common.background, 'MUI: The value of `palette.common.background` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
242
- setColor(palette.common, 'onBackgroundChannel', safeColorChannel(palette.common.onBackground, 'MUI: The value of `palette.common.onBackground` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
243
- setColor(palette, 'dividerChannel', safeColorChannel(palette.divider, 'MUI: The value of `palette.divider` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
247
+ // MUI X - DataGrid needs this token.
248
+ setColorChannel(palette.background, 'default');
249
+ setColorChannel(palette.common, 'background');
250
+ setColorChannel(palette.common, 'onBackground');
251
+ setColorChannel(palette, 'divider');
244
252
  Object.keys(palette).forEach(function (color) {
245
253
  var colors = palette[color];
246
254
 
@@ -262,16 +270,16 @@ export default function extendTheme() {
262
270
  }
263
271
  if (color === 'text') {
264
272
  // Text colors: text.primary, text.secondary
265
- setColor(palette[color], 'primaryChannel', safeColorChannel(colors.primary, 'MUI: The value of `palette.text.primary` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
266
- setColor(palette[color], 'secondaryChannel', safeColorChannel(colors.secondary, 'MUI: The value of `palette.text.secondary` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
273
+ setColorChannel(palette[color], 'primary');
274
+ setColorChannel(palette[color], 'secondary');
267
275
  }
268
276
  if (color === 'action') {
269
277
  // Action colors: action.active, action.selected
270
278
  if (colors.active) {
271
- setColor(palette[color], 'activeChannel', safeColorChannel(colors.active, 'MUI: The value of `palette.action.active` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
279
+ setColorChannel(palette[color], 'active');
272
280
  }
273
281
  if (colors.selected) {
274
- setColor(palette[color], 'selectedChannel', safeColorChannel(colors.selected, 'MUI: The value of `palette.action.selected` should be one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().'));
282
+ setColorChannel(palette[color], 'selected');
275
283
  }
276
284
  }
277
285
  }
package/locale/index.d.ts CHANGED
@@ -1,74 +1,75 @@
1
- import { ComponentsPropsList } from '../styles/props';
2
- export interface Localization {
3
- components?: {
4
- MuiAlert?: {
5
- defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
- };
7
- MuiBreadcrumbs?: {
8
- defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
- };
10
- MuiTablePagination?: {
11
- defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
- };
13
- MuiRating?: {
14
- defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
- };
16
- MuiAutocomplete?: {
17
- defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
- };
19
- MuiPagination?: {
20
- defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
- };
22
- };
23
- }
24
- export declare const amET: Localization;
25
- export declare const arEG: Localization;
26
- export declare const arSA: Localization;
27
- export declare const arSD: Localization;
28
- export declare const azAZ: Localization;
29
- export declare const bnBD: Localization;
30
- export declare const bgBG: Localization;
31
- export declare const caES: Localization;
32
- export declare const csCZ: Localization;
33
- export declare const daDK: Localization;
34
- export declare const deDE: Localization;
35
- export declare const elGR: Localization;
36
- export declare const enUS: Localization;
37
- export declare const esES: Localization;
38
- export declare const etEE: Localization;
39
- export declare const faIR: Localization;
40
- export declare const fiFI: Localization;
41
- export declare const frFR: Localization;
42
- export declare const heIL: Localization;
43
- export declare const hiIN: Localization;
44
- export declare const hrHR: Localization;
45
- export declare const huHU: Localization;
46
- export declare const hyAM: Localization;
47
- export declare const idID: Localization;
48
- export declare const isIS: Localization;
49
- export declare const itIT: Localization;
50
- export declare const jaJP: Localization;
51
- export declare const khKH: Localization;
52
- export declare const koKR: Localization;
53
- export declare const kuLatn: Localization;
54
- export declare const kkKZ: Localization;
55
- export declare const mkMK: Localization;
56
- export declare const nbNO: Localization;
57
- export declare const nlNL: Localization;
58
- export declare const plPL: Localization;
59
- export declare const ptBR: Localization;
60
- export declare const ptPT: Localization;
61
- export declare const roRO: Localization;
62
- export declare const srRS: Localization;
63
- export declare const ruRU: Localization;
64
- export declare const siLK: Localization;
65
- export declare const skSK: Localization;
66
- export declare const svSE: Localization;
67
- export declare const thTH: Localization;
68
- export declare const trTR: Localization;
69
- export declare const ukUA: Localization;
70
- export declare const urPK: Localization;
71
- export declare const viVN: Localization;
72
- export declare const zhCN: Localization;
73
- export declare const zhHK: Localization;
74
- export declare const zhTW: Localization;
1
+ import { ComponentsPropsList } from '../styles/props';
2
+ export interface Localization {
3
+ components?: {
4
+ MuiAlert?: {
5
+ defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
+ };
7
+ MuiBreadcrumbs?: {
8
+ defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
+ };
10
+ MuiTablePagination?: {
11
+ defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
+ };
13
+ MuiRating?: {
14
+ defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
+ };
16
+ MuiAutocomplete?: {
17
+ defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
+ };
19
+ MuiPagination?: {
20
+ defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
+ };
22
+ };
23
+ }
24
+ export declare const amET: Localization;
25
+ export declare const arEG: Localization;
26
+ export declare const arSA: Localization;
27
+ export declare const arSD: Localization;
28
+ export declare const azAZ: Localization;
29
+ export declare const bnBD: Localization;
30
+ export declare const beBY: Localization;
31
+ export declare const bgBG: Localization;
32
+ export declare const caES: Localization;
33
+ export declare const csCZ: Localization;
34
+ export declare const daDK: Localization;
35
+ export declare const deDE: Localization;
36
+ export declare const elGR: Localization;
37
+ export declare const enUS: Localization;
38
+ export declare const esES: Localization;
39
+ export declare const etEE: Localization;
40
+ export declare const faIR: Localization;
41
+ export declare const fiFI: Localization;
42
+ export declare const frFR: Localization;
43
+ export declare const heIL: Localization;
44
+ export declare const hiIN: Localization;
45
+ export declare const hrHR: Localization;
46
+ export declare const huHU: Localization;
47
+ export declare const hyAM: Localization;
48
+ export declare const idID: Localization;
49
+ export declare const isIS: Localization;
50
+ export declare const itIT: Localization;
51
+ export declare const jaJP: Localization;
52
+ export declare const khKH: Localization;
53
+ export declare const koKR: Localization;
54
+ export declare const kuLatn: Localization;
55
+ export declare const kkKZ: Localization;
56
+ export declare const mkMK: Localization;
57
+ export declare const nbNO: Localization;
58
+ export declare const nlNL: Localization;
59
+ export declare const plPL: Localization;
60
+ export declare const ptBR: Localization;
61
+ export declare const ptPT: Localization;
62
+ export declare const roRO: Localization;
63
+ export declare const srRS: Localization;
64
+ export declare const ruRU: Localization;
65
+ export declare const siLK: Localization;
66
+ export declare const skSK: Localization;
67
+ export declare const svSE: Localization;
68
+ export declare const thTH: Localization;
69
+ export declare const trTR: Localization;
70
+ export declare const ukUA: Localization;
71
+ export declare const urPK: Localization;
72
+ export declare const viVN: Localization;
73
+ export declare const zhCN: Localization;
74
+ export declare const zhHK: Localization;
75
+ export declare const zhTW: Localization;
package/locale/index.js CHANGED
@@ -441,6 +441,91 @@ export const bnBD = {
441
441
  }
442
442
  }
443
443
  };
444
+ export const beBY = {
445
+ components: {
446
+ MuiBreadcrumbs: {
447
+ defaultProps: {
448
+ expandText: 'Паказаць шлях'
449
+ }
450
+ },
451
+ MuiTablePagination: {
452
+ defaultProps: {
453
+ getItemAriaLabel: type => {
454
+ if (type === 'first') {
455
+ return 'Перайсці на першую старонку';
456
+ }
457
+ if (type === 'last') {
458
+ return 'Перайсці на апошнюю старонку';
459
+ }
460
+ if (type === 'next') {
461
+ return 'Перайсці на наступную старонку';
462
+ }
463
+ // if (type === 'previous') {
464
+ return 'Перайсці на папярэднюю старонку';
465
+ },
466
+ labelRowsPerPage: 'Радкоў на старонцы:',
467
+ labelDisplayedRows: ({
468
+ from,
469
+ to,
470
+ count
471
+ }) => `${from}–${to} з ${count !== -1 ? count : `больш чым ${to}`}`
472
+ }
473
+ },
474
+ MuiRating: {
475
+ defaultProps: {
476
+ getLabelText: value => {
477
+ let pluralForm = 'Зорак';
478
+ const lastDigit = value % 10;
479
+ if (lastDigit > 1 && lastDigit < 5 && (value < 10 || value > 20)) {
480
+ pluralForm = 'Зоркі';
481
+ } else if (lastDigit === 1 && value % 100 !== 11) {
482
+ pluralForm = 'Зорка';
483
+ }
484
+ return `${value} ${pluralForm}`;
485
+ },
486
+ emptyLabelText: 'Рэйтынг адсутнічае'
487
+ }
488
+ },
489
+ MuiAutocomplete: {
490
+ defaultProps: {
491
+ clearText: 'Ачысціць',
492
+ closeText: 'Закрыць',
493
+ loadingText: 'Загрузка…',
494
+ noOptionsText: 'Няма варыянтаў',
495
+ openText: 'Адкрыць'
496
+ }
497
+ },
498
+ MuiAlert: {
499
+ defaultProps: {
500
+ closeText: 'Закрыць'
501
+ }
502
+ },
503
+ MuiPagination: {
504
+ defaultProps: {
505
+ 'aria-label': 'Навігацыя па старонкам',
506
+ getItemAriaLabel: (type, page, selected) => {
507
+ if (type === 'page') {
508
+ if (selected) {
509
+ return `${page} старонка`;
510
+ }
511
+ return `Перайсці на ${page} старонку`;
512
+ }
513
+ if (type === 'first') {
514
+ return 'Перайсці на першую старонку';
515
+ }
516
+ if (type === 'last') {
517
+ return 'Перайсці на апошнюю старонку';
518
+ }
519
+ if (type === 'next') {
520
+ return 'Перайсці на наступную старонку';
521
+ }
522
+ // if (type === 'previous') {
523
+ return 'Перайсці на папярэднюю старонку';
524
+ }
525
+ }
526
+ }
527
+ }
528
+ };
444
529
  export const bgBG = {
445
530
  components: {
446
531
  MuiBreadcrumbs: {
File without changes
@@ -1,19 +1,26 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["component", "components", "componentsProps", "color", "size", "slotProps", "slots"];
3
+ const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
- import { chainPropTypes, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
8
- import SliderUnstyled, { SliderValueLabelUnstyled, sliderUnstyledClasses, getSliderUtilityClass } from '@mui/base/SliderUnstyled';
7
+ import { chainPropTypes } from '@mui/utils';
8
+ import { isHostComponent, useSlotProps, unstable_composeClasses as composeClasses } from '@mui/base';
9
+ import { useSlider, getSliderUtilityClass } from '@mui/base/SliderUnstyled';
9
10
  import { alpha, lighten, darken } from '@mui/system';
10
11
  import useThemeProps from '../styles/useThemeProps';
11
12
  import styled, { slotShouldForwardProp } from '../styles/styled';
12
13
  import useTheme from '../styles/useTheme';
13
14
  import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
14
15
  import capitalize from '../utils/capitalize';
16
+ import SliderValueLabelComponent from './SliderValueLabel';
17
+ import sliderClasses from './sliderClasses';
15
18
  import { jsx as _jsx } from "react/jsx-runtime";
16
- export const sliderClasses = _extends({}, sliderUnstyledClasses, generateUtilityClasses('MuiSlider', ['colorPrimary', 'colorSecondary', 'thumbColorPrimary', 'thumbColorSecondary', 'sizeSmall', 'thumbSizeSmall']));
19
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ const valueToPercent = (value, min, max) => (value - min) * 100 / (max - min);
21
+ function Identity(x) {
22
+ return x;
23
+ }
17
24
  const SliderRoot = styled('span', {
18
25
  name: 'MuiSlider',
19
26
  slot: 'Root',
@@ -254,7 +261,7 @@ process.env.NODE_ENV !== "production" ? SliderThumb.propTypes /* remove-proptype
254
261
  children: PropTypes.node
255
262
  } : void 0;
256
263
  export { SliderThumb };
257
- const SliderValueLabel = styled(SliderValueLabelUnstyled, {
264
+ const SliderValueLabel = styled(SliderValueLabelComponent, {
258
265
  name: 'MuiSlider',
259
266
  slot: 'ValueLabel',
260
267
  overridesResolver: (props, styles) => styles.valueLabel
@@ -403,17 +410,36 @@ process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes /* remove-prop
403
410
  children: PropTypes.node
404
411
  } : void 0;
405
412
  export { SliderMarkLabel };
406
- const extendUtilityClasses = ownerState => {
413
+ const useUtilityClasses = ownerState => {
407
414
  const {
415
+ disabled,
416
+ dragging,
417
+ marked,
418
+ orientation,
419
+ track,
420
+ classes,
408
421
  color,
409
- size,
410
- classes = {}
422
+ size
411
423
  } = ownerState;
412
- return _extends({}, classes, {
413
- root: clsx(classes.root, getSliderUtilityClass(`color${capitalize(color)}`), classes[`color${capitalize(color)}`], size && [getSliderUtilityClass(`size${capitalize(size)}`), classes[`size${capitalize(size)}`]]),
414
- thumb: clsx(classes.thumb, getSliderUtilityClass(`thumbColor${capitalize(color)}`), classes[`thumbColor${capitalize(color)}`], size && [getSliderUtilityClass(`thumbSize${capitalize(size)}`), classes[`thumbSize${capitalize(size)}`]])
415
- });
424
+ const slots = {
425
+ root: ['root', disabled && 'disabled', dragging && 'dragging', marked && 'marked', orientation === 'vertical' && 'vertical', track === 'inverted' && 'trackInverted', track === false && 'trackFalse', color && `color${capitalize(color)}`, size && `size${capitalize(size)}`],
426
+ rail: ['rail'],
427
+ track: ['track'],
428
+ mark: ['mark'],
429
+ markActive: ['markActive'],
430
+ markLabel: ['markLabel'],
431
+ markLabelActive: ['markLabelActive'],
432
+ valueLabel: ['valueLabel'],
433
+ thumb: ['thumb', disabled && 'disabled', size && `thumbSize${capitalize(size)}`, color && `thumbColor${capitalize(color)}`],
434
+ active: ['active'],
435
+ disabled: ['disabled'],
436
+ focusVisible: ['focusVisible']
437
+ };
438
+ return composeClasses(slots, getSliderUtilityClass, classes);
416
439
  };
440
+ const Forward = ({
441
+ children
442
+ }) => children;
417
443
  const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
418
444
  const props = useThemeProps({
419
445
  props: inputProps,
@@ -422,21 +448,74 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
422
448
  const theme = useTheme();
423
449
  const isRtl = theme.direction === 'rtl';
424
450
  const {
451
+ 'aria-label': ariaLabel,
452
+ 'aria-valuetext': ariaValuetext,
453
+ 'aria-labelledby': ariaLabelledby,
425
454
  // eslint-disable-next-line react/prop-types
426
455
  component = 'span',
427
456
  components = {},
428
457
  componentsProps = {},
429
458
  color = 'primary',
459
+ classes: classesProp,
460
+ // eslint-disable-next-line react/prop-types
461
+ className,
462
+ disableSwap = false,
463
+ disabled = false,
464
+ getAriaLabel,
465
+ getAriaValueText,
466
+ marks: marksProp = false,
467
+ max = 100,
468
+ min = 0,
469
+ orientation = 'horizontal',
430
470
  size = 'medium',
471
+ step = 1,
472
+ scale = Identity,
431
473
  slotProps,
432
- slots
474
+ slots,
475
+ track = 'normal',
476
+ valueLabelDisplay = 'off',
477
+ valueLabelFormat = Identity
433
478
  } = props,
434
479
  other = _objectWithoutPropertiesLoose(props, _excluded);
435
480
  const ownerState = _extends({}, props, {
481
+ isRtl,
482
+ max,
483
+ min,
484
+ classes: classesProp,
485
+ disabled,
486
+ disableSwap,
487
+ orientation,
488
+ marks: marksProp,
436
489
  color,
437
- size
490
+ size,
491
+ step,
492
+ scale,
493
+ track,
494
+ valueLabelDisplay,
495
+ valueLabelFormat
438
496
  });
439
- const classes = extendUtilityClasses(ownerState);
497
+ const {
498
+ axisProps,
499
+ getRootProps,
500
+ getHiddenInputProps,
501
+ getThumbProps,
502
+ open,
503
+ active,
504
+ axis,
505
+ focusedThumbIndex,
506
+ range,
507
+ dragging,
508
+ marks,
509
+ values,
510
+ trackOffset,
511
+ trackLeap
512
+ } = useSlider(_extends({}, ownerState, {
513
+ ref
514
+ }));
515
+ ownerState.marked = marks.length > 0 && marks.some(mark => mark.label);
516
+ ownerState.dragging = dragging;
517
+ ownerState.focusedThumbIndex = focusedThumbIndex;
518
+ const classes = useUtilityClasses(ownerState);
440
519
 
441
520
  // support both `slots` and `components` for backward compatibility
442
521
  const RootSlot = slots?.root ?? components.Root ?? SliderRoot;
@@ -446,7 +525,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
446
525
  const ValueLabelSlot = slots?.valueLabel ?? components.ValueLabel ?? SliderValueLabel;
447
526
  const MarkSlot = slots?.mark ?? components.Mark ?? SliderMark;
448
527
  const MarkLabelSlot = slots?.markLabel ?? components.MarkLabel ?? SliderMarkLabel;
449
- const InputSlot = slots?.input ?? components.Input;
528
+ const InputSlot = slots?.input ?? components.Input ?? 'input';
450
529
  const rootSlotProps = slotProps?.root ?? componentsProps.root;
451
530
  const railSlotProps = slotProps?.rail ?? componentsProps.rail;
452
531
  const trackSlotProps = slotProps?.track ?? componentsProps.track;
@@ -455,51 +534,123 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
455
534
  const markSlotProps = slotProps?.mark ?? componentsProps.mark;
456
535
  const markLabelSlotProps = slotProps?.markLabel ?? componentsProps.markLabel;
457
536
  const inputSlotProps = slotProps?.input ?? componentsProps.input;
458
- return /*#__PURE__*/_jsx(SliderUnstyled, _extends({}, other, {
459
- isRtl: isRtl,
460
- slots: {
461
- root: RootSlot,
462
- rail: RailSlot,
463
- track: TrackSlot,
464
- thumb: ThumbSlot,
465
- valueLabel: ValueLabelSlot,
466
- mark: MarkSlot,
467
- markLabel: MarkLabelSlot,
468
- input: InputSlot
469
- },
470
- slotProps: _extends({}, componentsProps, {
471
- root: _extends({}, rootSlotProps, shouldSpreadAdditionalProps(RootSlot) && {
472
- as: component,
473
- ownerState: _extends({}, rootSlotProps?.ownerState, {
474
- color,
475
- size
476
- })
477
- }),
478
- rail: railSlotProps,
479
- thumb: _extends({}, thumbSlotProps, shouldSpreadAdditionalProps(ThumbSlot) && {
480
- ownerState: _extends({}, thumbSlotProps?.ownerState, {
481
- color,
482
- size
483
- })
484
- }),
485
- track: _extends({}, trackSlotProps, shouldSpreadAdditionalProps(TrackSlot) && {
486
- ownerState: _extends({}, trackSlotProps?.ownerState, {
487
- color,
488
- size
489
- })
490
- }),
491
- valueLabel: _extends({}, valueLabelSlotProps, shouldSpreadAdditionalProps(ValueLabelSlot) && {
492
- ownerState: _extends({}, valueLabelSlotProps?.ownerState, {
493
- color,
494
- size
495
- })
496
- }),
497
- mark: markSlotProps,
498
- markLabel: markLabelSlotProps,
499
- input: inputSlotProps
537
+ const rootProps = useSlotProps({
538
+ elementType: RootSlot,
539
+ getSlotProps: getRootProps,
540
+ externalSlotProps: rootSlotProps,
541
+ externalForwardedProps: other,
542
+ additionalProps: _extends({}, shouldSpreadAdditionalProps(RootSlot) && {
543
+ as: component
500
544
  }),
501
- classes: classes,
502
- ref: ref
545
+ ownerState: _extends({}, ownerState, rootSlotProps?.ownerState),
546
+ className: [classes.root, className]
547
+ });
548
+ const railProps = useSlotProps({
549
+ elementType: RailSlot,
550
+ externalSlotProps: railSlotProps,
551
+ ownerState,
552
+ className: classes.rail
553
+ });
554
+ const trackProps = useSlotProps({
555
+ elementType: TrackSlot,
556
+ externalSlotProps: trackSlotProps,
557
+ additionalProps: {
558
+ style: _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap))
559
+ },
560
+ ownerState: _extends({}, ownerState, trackSlotProps?.ownerState),
561
+ className: classes.track
562
+ });
563
+ const thumbProps = useSlotProps({
564
+ elementType: ThumbSlot,
565
+ getSlotProps: getThumbProps,
566
+ externalSlotProps: thumbSlotProps,
567
+ ownerState: _extends({}, ownerState, thumbSlotProps?.ownerState)
568
+ });
569
+ const valueLabelProps = useSlotProps({
570
+ elementType: ValueLabelSlot,
571
+ externalSlotProps: valueLabelSlotProps,
572
+ ownerState: _extends({}, ownerState, valueLabelSlotProps?.ownerState),
573
+ className: classes.valueLabel
574
+ });
575
+ const markProps = useSlotProps({
576
+ elementType: MarkSlot,
577
+ externalSlotProps: markSlotProps,
578
+ ownerState,
579
+ className: classes.mark
580
+ });
581
+ const markLabelProps = useSlotProps({
582
+ elementType: MarkLabelSlot,
583
+ externalSlotProps: markLabelSlotProps,
584
+ ownerState
585
+ });
586
+ const inputSliderProps = useSlotProps({
587
+ elementType: InputSlot,
588
+ getSlotProps: getHiddenInputProps,
589
+ externalSlotProps: inputSlotProps,
590
+ ownerState
591
+ });
592
+ return /*#__PURE__*/_jsxs(RootSlot, _extends({}, rootProps, {
593
+ children: [/*#__PURE__*/_jsx(RailSlot, _extends({}, railProps)), /*#__PURE__*/_jsx(TrackSlot, _extends({}, trackProps)), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {
594
+ const percent = valueToPercent(mark.value, min, max);
595
+ const style = axisProps[axis].offset(percent);
596
+ let markActive;
597
+ if (track === false) {
598
+ markActive = values.indexOf(mark.value) !== -1;
599
+ } else {
600
+ markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);
601
+ }
602
+ return /*#__PURE__*/_jsxs(React.Fragment, {
603
+ children: [/*#__PURE__*/_jsx(MarkSlot, _extends({
604
+ "data-index": index
605
+ }, markProps, !isHostComponent(MarkSlot) && {
606
+ markActive
607
+ }, {
608
+ style: _extends({}, style, markProps.style),
609
+ className: clsx(markProps.className, markActive && classes.markActive)
610
+ })), mark.label != null ? /*#__PURE__*/_jsx(MarkLabelSlot, _extends({
611
+ "aria-hidden": true,
612
+ "data-index": index
613
+ }, markLabelProps, !isHostComponent(MarkLabelSlot) && {
614
+ markLabelActive: markActive
615
+ }, {
616
+ style: _extends({}, style, markLabelProps.style),
617
+ className: clsx(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive),
618
+ children: mark.label
619
+ })) : null]
620
+ }, index);
621
+ }), values.map((value, index) => {
622
+ const percent = valueToPercent(value, min, max);
623
+ const style = axisProps[axis].offset(percent);
624
+ const ValueLabelComponent = valueLabelDisplay === 'off' ? Forward : ValueLabelSlot;
625
+ return /*#__PURE__*/_jsx(React.Fragment, {
626
+ children: /*#__PURE__*/_jsx(ValueLabelComponent, _extends({}, !isHostComponent(ValueLabelComponent) && {
627
+ valueLabelFormat,
628
+ valueLabelDisplay,
629
+ value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,
630
+ index,
631
+ open: open === index || active === index || valueLabelDisplay === 'on',
632
+ disabled
633
+ }, valueLabelProps, {
634
+ children: /*#__PURE__*/_jsx(ThumbSlot, _extends({
635
+ "data-index": index,
636
+ "data-focusvisible": focusedThumbIndex === index
637
+ }, thumbProps, {
638
+ className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
639
+ style: _extends({}, style, {
640
+ pointerEvents: disableSwap && active !== index ? 'none' : undefined
641
+ }, thumbProps.style),
642
+ children: /*#__PURE__*/_jsx(InputSlot, _extends({
643
+ "data-index": index,
644
+ "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
645
+ "aria-valuenow": scale(value),
646
+ "aria-labelledby": ariaLabelledby,
647
+ "aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
648
+ value: values[index]
649
+ }, inputSliderProps))
650
+ }))
651
+ }))
652
+ }, index);
653
+ })]
503
654
  }));
504
655
  });
505
656
  process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */ = {
@@ -669,7 +820,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
669
820
  orientation: PropTypes.oneOf(['horizontal', 'vertical']),
670
821
  /**
671
822
  * A transformation function, to change the scale of the slider.
672
- * @default (x) => x
823
+ * @param {any} x
824
+ * @returns {any}
825
+ * @default function Identity(x) {
826
+ * return x;
827
+ * }
673
828
  */
674
829
  scale: PropTypes.func,
675
830
  /**
@@ -760,7 +915,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
760
915
  *
761
916
  * - {number} value The value label's value to format
762
917
  * - {number} index The value label's index to format
763
- * @default (x) => x
918
+ * @param {any} x
919
+ * @returns {any}
920
+ * @default function Identity(x) {
921
+ * return x;
922
+ * }
764
923
  */
765
924
  valueLabelFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
766
925
  } : void 0;