@mui/material 5.10.6 → 5.10.8
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/Button/Button.js +3 -10
- package/CHANGELOG.md +78 -0
- package/Checkbox/Checkbox.js +12 -3
- package/Chip/chipClasses.d.ts +8 -0
- package/Chip/chipClasses.js +1 -1
- package/DialogContentText/DialogContentText.js +14 -3
- package/Fab/Fab.js +5 -2
- package/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/InputLabel/InputLabel.js +12 -3
- package/ListItemButton/ListItemButton.js +10 -3
- package/MenuItem/MenuItem.js +10 -3
- package/Popover/Popover.js +1 -0
- package/Radio/Radio.js +12 -3
- package/StepLabel/StepLabel.js +5 -3
- package/SvgIcon/SvgIcon.js +2 -2
- package/SvgIcon/svgIconClasses.d.ts +2 -0
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +3 -5
- package/Unstable_TrapFocus/index.d.ts +2 -2
- package/Unstable_TrapFocus/index.js +2 -2
- package/esm/Button/Button.js +3 -8
- package/esm/Checkbox/Checkbox.js +11 -3
- package/esm/Chip/chipClasses.js +1 -1
- package/esm/DialogContentText/DialogContentText.js +13 -3
- package/esm/Fab/Fab.js +5 -2
- package/esm/InputLabel/InputLabel.js +11 -3
- package/esm/ListItemButton/ListItemButton.js +10 -3
- package/esm/MenuItem/MenuItem.js +10 -3
- package/esm/Popover/Popover.js +1 -0
- package/esm/Radio/Radio.js +11 -3
- package/esm/StepLabel/StepLabel.js +5 -3
- package/esm/SvgIcon/SvgIcon.js +2 -2
- package/esm/Tooltip/Tooltip.js +3 -5
- package/esm/Unstable_TrapFocus/index.js +1 -1
- package/esm/locale/index.js +81 -1
- package/esm/styles/CssVarsProvider.js +3 -1
- package/esm/styles/excludeVariablesFromRoot.js +6 -0
- package/index.js +1 -1
- package/legacy/Button/Button.js +2 -4
- package/legacy/Checkbox/Checkbox.js +10 -2
- package/legacy/Chip/chipClasses.js +1 -1
- package/legacy/DialogContentText/DialogContentText.js +10 -2
- package/legacy/Fab/Fab.js +7 -2
- package/legacy/InputLabel/InputLabel.js +10 -2
- package/legacy/ListItemButton/ListItemButton.js +9 -2
- package/legacy/MenuItem/MenuItem.js +9 -2
- package/legacy/Popover/Popover.js +1 -0
- package/legacy/Radio/Radio.js +10 -2
- package/legacy/StepLabel/StepLabel.js +5 -4
- package/legacy/SvgIcon/SvgIcon.js +2 -2
- package/legacy/Tooltip/Tooltip.js +3 -5
- package/legacy/Unstable_TrapFocus/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +224 -141
- package/legacy/styles/CssVarsProvider.js +3 -1
- package/legacy/styles/excludeVariablesFromRoot.js +12 -0
- package/locale/index.d.ts +1 -0
- package/locale/index.js +83 -2
- package/modern/Button/Button.js +3 -8
- package/modern/Checkbox/Checkbox.js +11 -3
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/DialogContentText/DialogContentText.js +13 -3
- package/modern/Fab/Fab.js +5 -2
- package/modern/InputLabel/InputLabel.js +11 -3
- package/modern/ListItemButton/ListItemButton.js +10 -3
- package/modern/MenuItem/MenuItem.js +10 -3
- package/modern/Popover/Popover.js +1 -0
- package/modern/Radio/Radio.js +11 -3
- package/modern/StepLabel/StepLabel.js +5 -3
- package/modern/SvgIcon/SvgIcon.js +2 -2
- package/modern/Tooltip/Tooltip.js +3 -5
- package/modern/Unstable_TrapFocus/index.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +81 -1
- package/modern/styles/CssVarsProvider.js +3 -1
- package/modern/styles/excludeVariablesFromRoot.js +6 -0
- package/package.json +5 -5
- package/styles/CssVarsProvider.js +4 -1
- package/styles/excludeVariablesFromRoot.d.ts +5 -0
- package/styles/excludeVariablesFromRoot.js +14 -0
- package/umd/material-ui.development.js +485 -431
- package/umd/material-ui.production.min.js +9 -9
package/locale/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.zhTW = exports.zhHK = exports.zhCN = exports.viVN = exports.ukUA = exports.trTR = exports.thTH = exports.svSE = exports.srRS = exports.skSK = exports.siLK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.nbNO = exports.mkMK = exports.kzKZ = exports.koKR = exports.khKH = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = exports.hrHR = exports.hiIN = exports.heIL = exports.frFR = exports.fiFI = exports.faIR = exports.etEE = exports.esES = exports.enUS = exports.elGR = exports.deDE = exports.daDK = exports.csCZ = exports.caES = exports.bnBD = exports.bgBG = exports.azAZ = exports.arSD = exports.arEG = exports.amET = void 0;
|
|
6
|
+
exports.zhTW = exports.zhHK = exports.zhCN = exports.viVN = exports.ukUA = exports.trTR = exports.thTH = exports.svSE = exports.srRS = exports.skSK = exports.siLK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.nbNO = exports.mkMK = exports.kzKZ = exports.koKR = exports.khKH = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = exports.hrHR = exports.hiIN = exports.heIL = exports.frFR = exports.fiFI = exports.faIR = exports.etEE = exports.esES = exports.enUS = exports.elGR = exports.deDE = exports.daDK = exports.csCZ = exports.caES = exports.bnBD = exports.bgBG = exports.azAZ = exports.arSD = exports.arSA = exports.arEG = exports.amET = void 0;
|
|
7
7
|
const amET = {
|
|
8
8
|
components: {
|
|
9
9
|
MuiBreadcrumbs: {
|
|
@@ -166,6 +166,87 @@ const arEG = {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
exports.arEG = arEG;
|
|
169
|
+
const arSA = {
|
|
170
|
+
components: {
|
|
171
|
+
MuiBreadcrumbs: {
|
|
172
|
+
defaultProps: {
|
|
173
|
+
expandText: 'إظهار المسار'
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
MuiTablePagination: {
|
|
177
|
+
defaultProps: {
|
|
178
|
+
getItemAriaLabel: type => {
|
|
179
|
+
if (type === 'first') {
|
|
180
|
+
return 'الانتقال إلى الصفحة الأولى';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (type === 'last') {
|
|
184
|
+
return 'الانتقال إلى الصفحة الأخيرة';
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (type === 'next') {
|
|
188
|
+
return 'الانتقال إلى الصفحة التالية';
|
|
189
|
+
} // if (type === 'previous') {
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
return 'الانتقال إلى الصفحة السابقة';
|
|
193
|
+
},
|
|
194
|
+
labelRowsPerPage: 'عدد الصفوف في الصفحة:',
|
|
195
|
+
labelDisplayedRows: ({
|
|
196
|
+
from,
|
|
197
|
+
to,
|
|
198
|
+
count
|
|
199
|
+
}) => `${from}–${to} من ${count !== -1 ? count : ` أكثر من${to}`}`
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
MuiRating: {
|
|
203
|
+
defaultProps: {
|
|
204
|
+
getLabelText: value => `${value} ${value !== 1 ? 'نجوم' : 'نجمة'}`,
|
|
205
|
+
emptyLabelText: 'فارغ'
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
MuiAutocomplete: {
|
|
209
|
+
defaultProps: {
|
|
210
|
+
clearText: 'مسح',
|
|
211
|
+
closeText: 'إغلاق',
|
|
212
|
+
loadingText: 'جار التحميل...',
|
|
213
|
+
noOptionsText: 'لا توجد خيارات',
|
|
214
|
+
openText: 'فتح'
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
MuiAlert: {
|
|
218
|
+
defaultProps: {
|
|
219
|
+
closeText: 'إغلاق'
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
MuiPagination: {
|
|
223
|
+
defaultProps: {
|
|
224
|
+
'aria-label': 'التنقل عبر الصفحات',
|
|
225
|
+
getItemAriaLabel: (type, page, selected) => {
|
|
226
|
+
if (type === 'page') {
|
|
227
|
+
return `${selected ? '' : 'الانتقال إلى '} صفحة ${page}`;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (type === 'first') {
|
|
231
|
+
return 'الانتقال إلى الصفحة الأولى';
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (type === 'last') {
|
|
235
|
+
return 'الانتقال الي الصفحة الأخيرة';
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (type === 'next') {
|
|
239
|
+
return 'الانتقال إلى الصفحة التالية';
|
|
240
|
+
} // if (type === 'previous') {
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
return 'الانتقال إلى الصفحة السابقة';
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
exports.arSA = arSA;
|
|
169
250
|
const arSD = {
|
|
170
251
|
components: {
|
|
171
252
|
MuiBreadcrumbs: {
|
|
@@ -3805,7 +3886,7 @@ const zhTW = {
|
|
|
3805
3886
|
|
|
3806
3887
|
return '上一頁';
|
|
3807
3888
|
},
|
|
3808
|
-
labelRowsPerPage: '
|
|
3889
|
+
labelRowsPerPage: '每頁行數:',
|
|
3809
3890
|
labelDisplayedRows: ({
|
|
3810
3891
|
from,
|
|
3811
3892
|
to,
|
package/modern/Button/Button.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"]
|
|
4
|
-
_excluded2 = ["root"];
|
|
3
|
+
const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"];
|
|
5
4
|
import * as React from 'react';
|
|
6
5
|
import PropTypes from 'prop-types';
|
|
7
6
|
import clsx from 'clsx';
|
|
@@ -255,11 +254,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
|
255
254
|
variant
|
|
256
255
|
});
|
|
257
256
|
|
|
258
|
-
const
|
|
259
|
-
{
|
|
260
|
-
root: classesRoot
|
|
261
|
-
} = _useUtilityClasses,
|
|
262
|
-
classes = _objectWithoutPropertiesLoose(_useUtilityClasses, _excluded2);
|
|
257
|
+
const classes = useUtilityClasses(ownerState);
|
|
263
258
|
|
|
264
259
|
const startIcon = startIconProp && /*#__PURE__*/_jsx(ButtonStartIcon, {
|
|
265
260
|
className: classes.startIcon,
|
|
@@ -275,7 +270,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
|
275
270
|
|
|
276
271
|
return /*#__PURE__*/_jsxs(ButtonRoot, _extends({
|
|
277
272
|
ownerState: ownerState,
|
|
278
|
-
className: clsx(contextProps.className,
|
|
273
|
+
className: clsx(contextProps.className, classes.root, className),
|
|
279
274
|
component: component,
|
|
280
275
|
disabled: disabled,
|
|
281
276
|
focusRipple: !disableFocusRipple,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size"];
|
|
3
|
+
const _excluded = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import clsx from 'clsx';
|
|
6
7
|
import { refType } from '@mui/utils';
|
|
7
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
8
9
|
import { alpha } from '@mui/system';
|
|
@@ -80,7 +81,8 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
|
|
|
80
81
|
indeterminate = false,
|
|
81
82
|
indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,
|
|
82
83
|
inputProps,
|
|
83
|
-
size = 'medium'
|
|
84
|
+
size = 'medium',
|
|
85
|
+
className
|
|
84
86
|
} = props,
|
|
85
87
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
86
88
|
|
|
@@ -106,7 +108,8 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
|
|
|
106
108
|
fontSize: indeterminateIcon.props.fontSize ?? size
|
|
107
109
|
}),
|
|
108
110
|
ownerState: ownerState,
|
|
109
|
-
ref: ref
|
|
111
|
+
ref: ref,
|
|
112
|
+
className: clsx(classes.root, className)
|
|
110
113
|
}, other, {
|
|
111
114
|
classes: classes
|
|
112
115
|
}));
|
|
@@ -135,6 +138,11 @@ process.env.NODE_ENV !== "production" ? Checkbox.propTypes
|
|
|
135
138
|
*/
|
|
136
139
|
classes: PropTypes.object,
|
|
137
140
|
|
|
141
|
+
/**
|
|
142
|
+
* @ignore
|
|
143
|
+
*/
|
|
144
|
+
className: PropTypes.string,
|
|
145
|
+
|
|
138
146
|
/**
|
|
139
147
|
* The color of the component.
|
|
140
148
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
|
2
2
|
export function getChipUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiChip', slot);
|
|
4
4
|
}
|
|
5
|
-
const chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
|
5
|
+
const chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
|
6
6
|
export default chipClasses;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children"];
|
|
3
|
+
const _excluded = ["children", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import clsx from 'clsx';
|
|
6
7
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
7
8
|
import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
8
9
|
import useThemeProps from '../styles/useThemeProps';
|
|
@@ -33,7 +34,10 @@ const DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentTe
|
|
|
33
34
|
name: 'MuiDialogContentText'
|
|
34
35
|
});
|
|
35
36
|
|
|
36
|
-
const
|
|
37
|
+
const {
|
|
38
|
+
className
|
|
39
|
+
} = props,
|
|
40
|
+
ownerState = _objectWithoutPropertiesLoose(props, _excluded);
|
|
37
41
|
|
|
38
42
|
const classes = useUtilityClasses(ownerState);
|
|
39
43
|
return /*#__PURE__*/_jsx(DialogContentTextRoot, _extends({
|
|
@@ -41,7 +45,8 @@ const DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentTe
|
|
|
41
45
|
variant: "body1",
|
|
42
46
|
color: "text.secondary",
|
|
43
47
|
ref: ref,
|
|
44
|
-
ownerState: ownerState
|
|
48
|
+
ownerState: ownerState,
|
|
49
|
+
className: clsx(classes.root, className)
|
|
45
50
|
}, props, {
|
|
46
51
|
classes: classes
|
|
47
52
|
}));
|
|
@@ -64,6 +69,11 @@ process.env.NODE_ENV !== "production" ? DialogContentText.propTypes
|
|
|
64
69
|
*/
|
|
65
70
|
classes: PropTypes.object,
|
|
66
71
|
|
|
72
|
+
/**
|
|
73
|
+
* @ignore
|
|
74
|
+
*/
|
|
75
|
+
className: PropTypes.string,
|
|
76
|
+
|
|
67
77
|
/**
|
|
68
78
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
69
79
|
*/
|
package/modern/Fab/Fab.js
CHANGED
|
@@ -9,7 +9,7 @@ import ButtonBase from '../ButtonBase';
|
|
|
9
9
|
import capitalize from '../utils/capitalize';
|
|
10
10
|
import useThemeProps from '../styles/useThemeProps';
|
|
11
11
|
import fabClasses, { getFabUtilityClass } from './fabClasses';
|
|
12
|
-
import styled from '../styles/styled';
|
|
12
|
+
import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
|
|
15
15
|
const useUtilityClasses = ownerState => {
|
|
@@ -22,12 +22,14 @@ const useUtilityClasses = ownerState => {
|
|
|
22
22
|
const slots = {
|
|
23
23
|
root: ['root', variant, `size${capitalize(size)}`, color === 'inherit' ? 'colorInherit' : color]
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
const composedClasses = composeClasses(slots, getFabUtilityClass, classes);
|
|
26
|
+
return _extends({}, classes, composedClasses);
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
const FabRoot = styled(ButtonBase, {
|
|
29
30
|
name: 'MuiFab',
|
|
30
31
|
slot: 'Root',
|
|
32
|
+
shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
|
|
31
33
|
overridesResolver: (props, styles) => {
|
|
32
34
|
const {
|
|
33
35
|
ownerState
|
|
@@ -149,6 +151,7 @@ const Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {
|
|
|
149
151
|
ownerState: ownerState,
|
|
150
152
|
ref: ref
|
|
151
153
|
}, other, {
|
|
154
|
+
classes: classes,
|
|
152
155
|
children: children
|
|
153
156
|
}));
|
|
154
157
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["disableAnimation", "margin", "shrink", "variant"];
|
|
3
|
+
const _excluded = ["disableAnimation", "margin", "shrink", "variant", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
7
|
+
import clsx from 'clsx';
|
|
7
8
|
import formControlState from '../FormControl/formControlState';
|
|
8
9
|
import useFormControl from '../FormControl/useFormControl';
|
|
9
10
|
import FormLabel, { formLabelClasses } from '../FormLabel';
|
|
@@ -110,7 +111,8 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
|
|
|
110
111
|
|
|
111
112
|
const {
|
|
112
113
|
disableAnimation = false,
|
|
113
|
-
shrink: shrinkProp
|
|
114
|
+
shrink: shrinkProp,
|
|
115
|
+
className
|
|
114
116
|
} = props,
|
|
115
117
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
116
118
|
|
|
@@ -140,7 +142,8 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
|
|
|
140
142
|
return /*#__PURE__*/_jsx(InputLabelRoot, _extends({
|
|
141
143
|
"data-shrink": shrink,
|
|
142
144
|
ownerState: ownerState,
|
|
143
|
-
ref: ref
|
|
145
|
+
ref: ref,
|
|
146
|
+
className: clsx(classes.root, className)
|
|
144
147
|
}, other, {
|
|
145
148
|
classes: classes
|
|
146
149
|
}));
|
|
@@ -163,6 +166,11 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
|
|
|
163
166
|
*/
|
|
164
167
|
classes: PropTypes.object,
|
|
165
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @ignore
|
|
171
|
+
*/
|
|
172
|
+
className: PropTypes.string,
|
|
173
|
+
|
|
166
174
|
/**
|
|
167
175
|
* The color of the component.
|
|
168
176
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected"];
|
|
3
|
+
const _excluded = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -115,7 +115,8 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
|
|
|
115
115
|
disableGutters = false,
|
|
116
116
|
divider = false,
|
|
117
117
|
focusVisibleClassName,
|
|
118
|
-
selected = false
|
|
118
|
+
selected = false,
|
|
119
|
+
className
|
|
119
120
|
} = props,
|
|
120
121
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
121
122
|
|
|
@@ -153,7 +154,8 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
|
|
|
153
154
|
href: other.href || other.to,
|
|
154
155
|
component: (other.href || other.to) && component === 'div' ? 'a' : component,
|
|
155
156
|
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
156
|
-
ownerState: ownerState
|
|
157
|
+
ownerState: ownerState,
|
|
158
|
+
className: clsx(classes.root, className)
|
|
157
159
|
}, other, {
|
|
158
160
|
classes: classes,
|
|
159
161
|
children: children
|
|
@@ -192,6 +194,11 @@ process.env.NODE_ENV !== "production" ? ListItemButton.propTypes
|
|
|
192
194
|
*/
|
|
193
195
|
classes: PropTypes.object,
|
|
194
196
|
|
|
197
|
+
/**
|
|
198
|
+
* @ignore
|
|
199
|
+
*/
|
|
200
|
+
className: PropTypes.string,
|
|
201
|
+
|
|
195
202
|
/**
|
|
196
203
|
* The component used for the root node.
|
|
197
204
|
* Either a string to use a HTML element or a component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex"];
|
|
3
|
+
const _excluded = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -138,7 +138,8 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
|
|
|
138
138
|
disableGutters = false,
|
|
139
139
|
focusVisibleClassName,
|
|
140
140
|
role = 'menuitem',
|
|
141
|
-
tabIndex: tabIndexProp
|
|
141
|
+
tabIndex: tabIndexProp,
|
|
142
|
+
className
|
|
142
143
|
} = props,
|
|
143
144
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
144
145
|
|
|
@@ -179,7 +180,8 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
|
|
|
179
180
|
role: role,
|
|
180
181
|
tabIndex: tabIndex,
|
|
181
182
|
component: component,
|
|
182
|
-
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName)
|
|
183
|
+
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
184
|
+
className: clsx(classes.root, className)
|
|
183
185
|
}, other, {
|
|
184
186
|
ownerState: ownerState,
|
|
185
187
|
classes: classes
|
|
@@ -211,6 +213,11 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes
|
|
|
211
213
|
*/
|
|
212
214
|
classes: PropTypes.object,
|
|
213
215
|
|
|
216
|
+
/**
|
|
217
|
+
* @ignore
|
|
218
|
+
*/
|
|
219
|
+
className: PropTypes.string,
|
|
220
|
+
|
|
214
221
|
/**
|
|
215
222
|
* The component used for the root node.
|
|
216
223
|
* Either a string to use a HTML element or a component.
|
package/modern/Radio/Radio.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size"];
|
|
3
|
+
const _excluded = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import clsx from 'clsx';
|
|
6
7
|
import { refType } from '@mui/utils';
|
|
7
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
8
9
|
import { alpha } from '@mui/system';
|
|
@@ -87,7 +88,8 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
|
|
|
87
88
|
icon = defaultIcon,
|
|
88
89
|
name: nameProp,
|
|
89
90
|
onChange: onChangeProp,
|
|
90
|
-
size = 'medium'
|
|
91
|
+
size = 'medium',
|
|
92
|
+
className
|
|
91
93
|
} = props,
|
|
92
94
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
93
95
|
|
|
@@ -125,7 +127,8 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
|
|
|
125
127
|
name: name,
|
|
126
128
|
checked: checked,
|
|
127
129
|
onChange: onChange,
|
|
128
|
-
ref: ref
|
|
130
|
+
ref: ref,
|
|
131
|
+
className: clsx(classes.root, className)
|
|
129
132
|
}, other));
|
|
130
133
|
});
|
|
131
134
|
process.env.NODE_ENV !== "production" ? Radio.propTypes
|
|
@@ -152,6 +155,11 @@ process.env.NODE_ENV !== "production" ? Radio.propTypes
|
|
|
152
155
|
*/
|
|
153
156
|
classes: PropTypes.object,
|
|
154
157
|
|
|
158
|
+
/**
|
|
159
|
+
* @ignore
|
|
160
|
+
*/
|
|
161
|
+
className: PropTypes.string,
|
|
162
|
+
|
|
155
163
|
/**
|
|
156
164
|
* The color of the component.
|
|
157
165
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
@@ -28,7 +28,7 @@ const useUtilityClasses = ownerState => {
|
|
|
28
28
|
root: ['root', orientation, error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
29
29
|
label: ['label', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
30
30
|
iconContainer: ['iconContainer', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
31
|
-
labelContainer: ['labelContainer']
|
|
31
|
+
labelContainer: ['labelContainer', alternativeLabel && 'alternativeLabel']
|
|
32
32
|
};
|
|
33
33
|
return composeClasses(slots, getStepLabelUtilityClass, classes);
|
|
34
34
|
};
|
|
@@ -77,7 +77,6 @@ const StepLabelLabel = styled('span', {
|
|
|
77
77
|
fontWeight: 500
|
|
78
78
|
},
|
|
79
79
|
[`&.${stepLabelClasses.alternativeLabel}`]: {
|
|
80
|
-
textAlign: 'center',
|
|
81
80
|
marginTop: 16
|
|
82
81
|
},
|
|
83
82
|
[`&.${stepLabelClasses.error}`]: {
|
|
@@ -105,7 +104,10 @@ const StepLabelLabelContainer = styled('span', {
|
|
|
105
104
|
theme
|
|
106
105
|
}) => ({
|
|
107
106
|
width: '100%',
|
|
108
|
-
color: (theme.vars || theme).palette.text.secondary
|
|
107
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
108
|
+
[`&.${stepLabelClasses.alternativeLabel}`]: {
|
|
109
|
+
textAlign: 'center'
|
|
110
|
+
}
|
|
109
111
|
}));
|
|
110
112
|
const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
|
|
111
113
|
const props = useThemeProps({
|
|
@@ -50,7 +50,7 @@ const SvgIconRoot = styled('svg', {
|
|
|
50
50
|
inherit: 'inherit',
|
|
51
51
|
small: theme.typography?.pxToRem?.(20) || '1.25rem',
|
|
52
52
|
medium: theme.typography?.pxToRem?.(24) || '1.5rem',
|
|
53
|
-
large: theme.typography?.pxToRem?.(35) || '2.
|
|
53
|
+
large: theme.typography?.pxToRem?.(35) || '2.1875rem'
|
|
54
54
|
}[ownerState.fontSize],
|
|
55
55
|
// TODO v5 deprecate, v6 remove for sx
|
|
56
56
|
color: (theme.vars || theme).palette?.[ownerState.color]?.main ?? {
|
|
@@ -97,13 +97,13 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
97
97
|
return /*#__PURE__*/_jsxs(SvgIconRoot, _extends({
|
|
98
98
|
as: component,
|
|
99
99
|
className: clsx(classes.root, className),
|
|
100
|
-
ownerState: ownerState,
|
|
101
100
|
focusable: "false",
|
|
102
101
|
color: htmlColor,
|
|
103
102
|
"aria-hidden": titleAccess ? undefined : true,
|
|
104
103
|
role: titleAccess ? 'img' : undefined,
|
|
105
104
|
ref: ref
|
|
106
105
|
}, more, other, {
|
|
106
|
+
ownerState: ownerState,
|
|
107
107
|
children: [children, titleAccess ? /*#__PURE__*/_jsx("title", {
|
|
108
108
|
children: titleAccess
|
|
109
109
|
}) : null]
|
|
@@ -463,7 +463,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
463
463
|
const handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
|
|
464
464
|
const handleRef = useForkRef(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
|
|
465
465
|
|
|
466
|
-
if (title
|
|
466
|
+
if (typeof title !== 'number' && !title) {
|
|
467
467
|
open = false;
|
|
468
468
|
}
|
|
469
469
|
|
|
@@ -799,11 +799,9 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
|
|
|
799
799
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
800
800
|
|
|
801
801
|
/**
|
|
802
|
-
* Tooltip title. Zero-length titles string are never displayed.
|
|
802
|
+
* Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
|
|
803
803
|
*/
|
|
804
|
-
title: PropTypes
|
|
805
|
-
/* @typescript-to-proptypes-ignore */
|
|
806
|
-
.node.isRequired,
|
|
804
|
+
title: PropTypes.node,
|
|
807
805
|
|
|
808
806
|
/**
|
|
809
807
|
* The component used for the transition.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@mui/base/
|
|
1
|
+
export { default } from '@mui/base/FocusTrap';
|
package/modern/index.js
CHANGED
package/modern/locale/index.js
CHANGED
|
@@ -158,6 +158,86 @@ export const arEG = {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
+
export const arSA = {
|
|
162
|
+
components: {
|
|
163
|
+
MuiBreadcrumbs: {
|
|
164
|
+
defaultProps: {
|
|
165
|
+
expandText: 'إظهار المسار'
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
MuiTablePagination: {
|
|
169
|
+
defaultProps: {
|
|
170
|
+
getItemAriaLabel: type => {
|
|
171
|
+
if (type === 'first') {
|
|
172
|
+
return 'الانتقال إلى الصفحة الأولى';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (type === 'last') {
|
|
176
|
+
return 'الانتقال إلى الصفحة الأخيرة';
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (type === 'next') {
|
|
180
|
+
return 'الانتقال إلى الصفحة التالية';
|
|
181
|
+
} // if (type === 'previous') {
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
return 'الانتقال إلى الصفحة السابقة';
|
|
185
|
+
},
|
|
186
|
+
labelRowsPerPage: 'عدد الصفوف في الصفحة:',
|
|
187
|
+
labelDisplayedRows: ({
|
|
188
|
+
from,
|
|
189
|
+
to,
|
|
190
|
+
count
|
|
191
|
+
}) => `${from}–${to} من ${count !== -1 ? count : ` أكثر من${to}`}`
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
MuiRating: {
|
|
195
|
+
defaultProps: {
|
|
196
|
+
getLabelText: value => `${value} ${value !== 1 ? 'نجوم' : 'نجمة'}`,
|
|
197
|
+
emptyLabelText: 'فارغ'
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
MuiAutocomplete: {
|
|
201
|
+
defaultProps: {
|
|
202
|
+
clearText: 'مسح',
|
|
203
|
+
closeText: 'إغلاق',
|
|
204
|
+
loadingText: 'جار التحميل...',
|
|
205
|
+
noOptionsText: 'لا توجد خيارات',
|
|
206
|
+
openText: 'فتح'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
MuiAlert: {
|
|
210
|
+
defaultProps: {
|
|
211
|
+
closeText: 'إغلاق'
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
MuiPagination: {
|
|
215
|
+
defaultProps: {
|
|
216
|
+
'aria-label': 'التنقل عبر الصفحات',
|
|
217
|
+
getItemAriaLabel: (type, page, selected) => {
|
|
218
|
+
if (type === 'page') {
|
|
219
|
+
return `${selected ? '' : 'الانتقال إلى '} صفحة ${page}`;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (type === 'first') {
|
|
223
|
+
return 'الانتقال إلى الصفحة الأولى';
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (type === 'last') {
|
|
227
|
+
return 'الانتقال الي الصفحة الأخيرة';
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (type === 'next') {
|
|
231
|
+
return 'الانتقال إلى الصفحة التالية';
|
|
232
|
+
} // if (type === 'previous') {
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
return 'الانتقال إلى الصفحة السابقة';
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
161
241
|
export const arSD = {
|
|
162
242
|
components: {
|
|
163
243
|
MuiBreadcrumbs: {
|
|
@@ -3752,7 +3832,7 @@ export const zhTW = {
|
|
|
3752
3832
|
|
|
3753
3833
|
return '上一頁';
|
|
3754
3834
|
},
|
|
3755
|
-
labelRowsPerPage: '
|
|
3835
|
+
labelRowsPerPage: '每頁行數:',
|
|
3756
3836
|
labelDisplayedRows: ({
|
|
3757
3837
|
from,
|
|
3758
3838
|
to,
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';
|
|
3
3
|
import experimental_extendTheme from './experimental_extendTheme';
|
|
4
4
|
import createTypography from './createTypography';
|
|
5
|
+
import excludeVariablesFromRoot from './excludeVariablesFromRoot';
|
|
5
6
|
|
|
6
7
|
const shouldSkipGeneratingVar = keys => !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
|
|
7
8
|
|
|
@@ -26,6 +27,7 @@ const {
|
|
|
26
27
|
|
|
27
28
|
return newTheme;
|
|
28
29
|
},
|
|
29
|
-
shouldSkipGeneratingVar
|
|
30
|
+
shouldSkipGeneratingVar,
|
|
31
|
+
excludeVariablesFromRoot
|
|
30
32
|
});
|
|
31
33
|
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
+
*/
|
|
4
|
+
const excludeVariablesFromRoot = cssVarPrefix => [...[...Array(24)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index + 1}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];
|
|
5
|
+
|
|
6
|
+
export default excludeVariablesFromRoot;
|