@mui/material 5.15.11 → 5.15.13
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/Alert/Alert.d.ts +2 -2
- package/Alert/Alert.js +53 -35
- package/Alert/alertClasses.d.ts +68 -12
- package/Alert/alertClasses.js +1 -1
- package/AlertTitle/AlertTitle.js +2 -2
- package/Autocomplete/Autocomplete.js +58 -49
- package/Avatar/Avatar.js +2 -2
- package/Button/Button.js +3 -3
- package/Button/buttonClasses.d.ts +113 -33
- package/Button/buttonClasses.js +1 -1
- package/CHANGELOG.md +290 -116
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Chip/chipClasses.d.ts +78 -26
- package/Drawer/Drawer.js +9 -3
- package/LinearProgress/LinearProgress.js +4 -4
- package/Menu/Menu.js +5 -4
- package/MenuList/MenuList.js +4 -2
- package/PaginationItem/PaginationItem.js +3 -3
- package/README.md +1 -1
- package/Rating/Rating.js +3 -3
- package/Slider/Slider.d.ts +2 -4
- package/Slider/Slider.js +4 -7
- package/Switch/Switch.js +61 -41
- package/TabScrollButton/TabScrollButton.js +2 -3
- package/TablePagination/TablePaginationActions.js +14 -14
- package/Tabs/Tabs.js +3 -2
- package/Tooltip/Tooltip.js +5 -4
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +77 -34
- package/legacy/Alert/alertClasses.js +1 -1
- package/legacy/AlertTitle/AlertTitle.js +2 -2
- package/legacy/Autocomplete/Autocomplete.js +62 -51
- package/legacy/Avatar/Avatar.js +2 -2
- package/legacy/Button/Button.js +3 -3
- package/legacy/Button/buttonClasses.js +1 -1
- package/legacy/Drawer/Drawer.js +8 -3
- package/legacy/LinearProgress/LinearProgress.js +4 -4
- package/legacy/Menu/Menu.js +5 -4
- package/legacy/MenuList/MenuList.js +3 -2
- package/legacy/PaginationItem/PaginationItem.js +3 -3
- package/legacy/Rating/Rating.js +3 -3
- package/legacy/Slider/Slider.js +4 -7
- package/legacy/Switch/Switch.js +88 -59
- package/legacy/TabScrollButton/TabScrollButton.js +2 -3
- package/legacy/TablePagination/TablePaginationActions.js +14 -14
- package/legacy/Tabs/Tabs.js +3 -2
- package/legacy/Tooltip/Tooltip.js +7 -3
- package/legacy/index.js +1 -1
- package/legacy/styles/experimental_extendTheme.js +3 -0
- package/modern/Alert/Alert.js +53 -35
- package/modern/Alert/alertClasses.js +1 -1
- package/modern/AlertTitle/AlertTitle.js +2 -2
- package/modern/Autocomplete/Autocomplete.js +58 -49
- package/modern/Avatar/Avatar.js +2 -2
- package/modern/Button/Button.js +3 -3
- package/modern/Button/buttonClasses.js +1 -1
- package/modern/Drawer/Drawer.js +9 -3
- package/modern/LinearProgress/LinearProgress.js +4 -4
- package/modern/Menu/Menu.js +5 -4
- package/modern/MenuList/MenuList.js +4 -2
- package/modern/PaginationItem/PaginationItem.js +3 -3
- package/modern/Rating/Rating.js +3 -3
- package/modern/Slider/Slider.js +4 -7
- package/modern/Switch/Switch.js +61 -41
- package/modern/TabScrollButton/TabScrollButton.js +2 -3
- package/modern/TablePagination/TablePaginationActions.js +14 -14
- package/modern/Tabs/Tabs.js +3 -2
- package/modern/Tooltip/Tooltip.js +5 -4
- package/modern/index.js +1 -1
- package/modern/styles/experimental_extendTheme.js +3 -0
- package/node/Alert/Alert.js +61 -43
- package/node/Alert/alertClasses.js +1 -1
- package/node/AlertTitle/AlertTitle.js +4 -4
- package/node/Autocomplete/Autocomplete.js +58 -49
- package/node/Avatar/Avatar.js +6 -6
- package/node/Button/Button.js +3 -3
- package/node/Button/buttonClasses.js +1 -1
- package/node/Drawer/Drawer.js +9 -3
- package/node/LinearProgress/LinearProgress.js +4 -4
- package/node/Menu/Menu.js +5 -4
- package/node/MenuList/MenuList.js +4 -2
- package/node/PaginationItem/PaginationItem.js +3 -3
- package/node/Rating/Rating.js +3 -3
- package/node/Slider/Slider.js +4 -7
- package/node/Switch/Switch.js +66 -46
- package/node/TabScrollButton/TabScrollButton.js +2 -3
- package/node/TablePagination/TablePaginationActions.js +14 -14
- package/node/Tabs/Tabs.js +3 -2
- package/node/Tooltip/Tooltip.js +5 -4
- package/node/index.js +1 -1
- package/node/styles/experimental_extendTheme.js +3 -0
- package/package.json +5 -5
- package/styles/experimental_extendTheme.d.ts +1 -0
- package/styles/experimental_extendTheme.js +3 -0
- package/styles/variants.d.ts +7 -1
- package/umd/material-ui.development.js +6197 -6084
- package/umd/material-ui.production.min.js +2 -2
|
@@ -5,9 +5,9 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
const _excluded = ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slots", "slotProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
8
9
|
import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
|
|
9
10
|
import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
|
|
10
|
-
import useTheme from '../styles/useTheme';
|
|
11
11
|
import IconButton from '../IconButton';
|
|
12
12
|
import LastPageIconDefault from '../internal/svg-icons/LastPage';
|
|
13
13
|
import FirstPageIconDefault from '../internal/svg-icons/FirstPage';
|
|
@@ -34,7 +34,7 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
|
|
|
34
34
|
slotProps = {}
|
|
35
35
|
} = props,
|
|
36
36
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
37
|
-
const
|
|
37
|
+
const isRtl = useRtl();
|
|
38
38
|
const handleFirstPageButtonClick = event => {
|
|
39
39
|
onPageChange(event, 0);
|
|
40
40
|
};
|
|
@@ -55,14 +55,14 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
|
|
|
55
55
|
const LastButtonIcon = (_slots$lastButtonIcon = slots.lastButtonIcon) != null ? _slots$lastButtonIcon : LastPageIconDefault;
|
|
56
56
|
const NextButtonIcon = (_slots$nextButtonIcon = slots.nextButtonIcon) != null ? _slots$nextButtonIcon : KeyboardArrowRight;
|
|
57
57
|
const PreviousButtonIcon = (_slots$previousButton2 = slots.previousButtonIcon) != null ? _slots$previousButton2 : KeyboardArrowLeft;
|
|
58
|
-
const FirstButtonSlot =
|
|
59
|
-
const PreviousButtonSlot =
|
|
60
|
-
const NextButtonSlot =
|
|
61
|
-
const LastButtonSlot =
|
|
62
|
-
const firstButtonSlotProps =
|
|
63
|
-
const previousButtonSlotProps =
|
|
64
|
-
const nextButtonSlotProps =
|
|
65
|
-
const lastButtonSlotProps =
|
|
58
|
+
const FirstButtonSlot = isRtl ? LastButton : FirstButton;
|
|
59
|
+
const PreviousButtonSlot = isRtl ? NextButton : PreviousButton;
|
|
60
|
+
const NextButtonSlot = isRtl ? PreviousButton : NextButton;
|
|
61
|
+
const LastButtonSlot = isRtl ? FirstButton : LastButton;
|
|
62
|
+
const firstButtonSlotProps = isRtl ? slotProps.lastButton : slotProps.firstButton;
|
|
63
|
+
const previousButtonSlotProps = isRtl ? slotProps.nextButton : slotProps.previousButton;
|
|
64
|
+
const nextButtonSlotProps = isRtl ? slotProps.previousButton : slotProps.nextButton;
|
|
65
|
+
const lastButtonSlotProps = isRtl ? slotProps.firstButton : slotProps.lastButton;
|
|
66
66
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
67
67
|
ref: ref
|
|
68
68
|
}, other, {
|
|
@@ -72,7 +72,7 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
|
|
|
72
72
|
"aria-label": getItemAriaLabel('first', page),
|
|
73
73
|
title: getItemAriaLabel('first', page)
|
|
74
74
|
}, firstButtonSlotProps, {
|
|
75
|
-
children:
|
|
75
|
+
children: isRtl ? /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon)) : /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon))
|
|
76
76
|
})), /*#__PURE__*/_jsx(PreviousButtonSlot, _extends({
|
|
77
77
|
onClick: handleBackButtonClick,
|
|
78
78
|
disabled: disabled || page === 0,
|
|
@@ -80,7 +80,7 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
|
|
|
80
80
|
"aria-label": getItemAriaLabel('previous', page),
|
|
81
81
|
title: getItemAriaLabel('previous', page)
|
|
82
82
|
}, previousButtonSlotProps != null ? previousButtonSlotProps : backIconButtonProps, {
|
|
83
|
-
children:
|
|
83
|
+
children: isRtl ? /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon)) : /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon))
|
|
84
84
|
})), /*#__PURE__*/_jsx(NextButtonSlot, _extends({
|
|
85
85
|
onClick: handleNextButtonClick,
|
|
86
86
|
disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
|
|
@@ -88,14 +88,14 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
|
|
|
88
88
|
"aria-label": getItemAriaLabel('next', page),
|
|
89
89
|
title: getItemAriaLabel('next', page)
|
|
90
90
|
}, nextButtonSlotProps != null ? nextButtonSlotProps : nextIconButtonProps, {
|
|
91
|
-
children:
|
|
91
|
+
children: isRtl ? /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon)) : /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon))
|
|
92
92
|
})), showLastButton && /*#__PURE__*/_jsx(LastButtonSlot, _extends({
|
|
93
93
|
onClick: handleLastPageButtonClick,
|
|
94
94
|
disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
|
|
95
95
|
"aria-label": getItemAriaLabel('last', page),
|
|
96
96
|
title: getItemAriaLabel('last', page)
|
|
97
97
|
}, lastButtonSlotProps, {
|
|
98
|
-
children:
|
|
98
|
+
children: isRtl ? /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon)) : /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon))
|
|
99
99
|
}))]
|
|
100
100
|
}));
|
|
101
101
|
});
|
package/Tabs/Tabs.js
CHANGED
|
@@ -10,6 +10,7 @@ import clsx from 'clsx';
|
|
|
10
10
|
import refType from '@mui/utils/refType';
|
|
11
11
|
import { useSlotProps } from '@mui/base/utils';
|
|
12
12
|
import composeClasses from '@mui/utils/composeClasses';
|
|
13
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
13
14
|
import styled from '../styles/styled';
|
|
14
15
|
import useThemeProps from '../styles/useThemeProps';
|
|
15
16
|
import useTheme from '../styles/useTheme';
|
|
@@ -209,7 +210,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
209
210
|
name: 'MuiTabs'
|
|
210
211
|
});
|
|
211
212
|
const theme = useTheme();
|
|
212
|
-
const isRtl =
|
|
213
|
+
const isRtl = useRtl();
|
|
213
214
|
const {
|
|
214
215
|
'aria-label': ariaLabel,
|
|
215
216
|
'aria-labelledby': ariaLabelledBy,
|
|
@@ -297,7 +298,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
297
298
|
clientWidth: tabsNode.clientWidth,
|
|
298
299
|
scrollLeft: tabsNode.scrollLeft,
|
|
299
300
|
scrollTop: tabsNode.scrollTop,
|
|
300
|
-
scrollLeftNormalized: getNormalizedScrollLeft(tabsNode,
|
|
301
|
+
scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, isRtl ? 'rtl' : 'ltr'),
|
|
301
302
|
scrollWidth: tabsNode.scrollWidth,
|
|
302
303
|
top: rect.top,
|
|
303
304
|
bottom: rect.bottom,
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -11,6 +11,7 @@ import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
|
|
|
11
11
|
import { appendOwnerState } from '@mui/base/utils';
|
|
12
12
|
import composeClasses from '@mui/utils/composeClasses';
|
|
13
13
|
import { alpha } from '@mui/system/colorManipulator';
|
|
14
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
14
15
|
import styled from '../styles/styled';
|
|
15
16
|
import useTheme from '../styles/useTheme';
|
|
16
17
|
import useThemeProps from '../styles/useThemeProps';
|
|
@@ -206,11 +207,11 @@ export function testReset() {
|
|
|
206
207
|
hystersisTimer.clear();
|
|
207
208
|
}
|
|
208
209
|
function composeEventHandler(handler, eventHandler) {
|
|
209
|
-
return event => {
|
|
210
|
+
return (event, ...params) => {
|
|
210
211
|
if (eventHandler) {
|
|
211
|
-
eventHandler(event);
|
|
212
|
+
eventHandler(event, ...params);
|
|
212
213
|
}
|
|
213
|
-
handler(event);
|
|
214
|
+
handler(event, ...params);
|
|
214
215
|
};
|
|
215
216
|
}
|
|
216
217
|
|
|
@@ -257,7 +258,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
257
258
|
children: childrenProp
|
|
258
259
|
});
|
|
259
260
|
const theme = useTheme();
|
|
260
|
-
const isRtl =
|
|
261
|
+
const isRtl = useRtl();
|
|
261
262
|
const [childNode, setChildNode] = React.useState();
|
|
262
263
|
const [arrowRef, setArrowRef] = React.useState(null);
|
|
263
264
|
const ignoreNonTouchEvents = React.useRef(false);
|
package/index.js
CHANGED
package/legacy/Alert/Alert.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
6
7
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
7
8
|
import * as React from 'react';
|
|
8
9
|
import PropTypes from 'prop-types';
|
|
9
10
|
import clsx from 'clsx';
|
|
10
|
-
import
|
|
11
|
-
import { darken, lighten } from '@mui/system';
|
|
12
|
-
import styled from '../
|
|
13
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
11
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
12
|
+
import { darken, lighten } from '@mui/system/colorManipulator';
|
|
13
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
14
|
import useSlot from '../utils/useSlot';
|
|
15
15
|
import capitalize from '../utils/capitalize';
|
|
16
16
|
import Paper from '../Paper';
|
|
@@ -23,13 +23,14 @@ import InfoOutlinedIcon from '../internal/svg-icons/InfoOutlined';
|
|
|
23
23
|
import CloseIcon from '../internal/svg-icons/Close';
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
var useThemeProps = createUseThemeProps('MuiAlert');
|
|
26
27
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
27
28
|
var variant = ownerState.variant,
|
|
28
29
|
color = ownerState.color,
|
|
29
30
|
severity = ownerState.severity,
|
|
30
31
|
classes = ownerState.classes;
|
|
31
32
|
var slots = {
|
|
32
|
-
root: ['root', "".concat(variant).concat(capitalize(color || severity)), "".concat(variant)],
|
|
33
|
+
root: ['root', "color".concat(capitalize(color || severity)), "".concat(variant).concat(capitalize(color || severity)), "".concat(variant)],
|
|
33
34
|
icon: ['icon'],
|
|
34
35
|
message: ['message'],
|
|
35
36
|
action: ['action']
|
|
@@ -44,38 +45,79 @@ var AlertRoot = styled(Paper, {
|
|
|
44
45
|
return [styles.root, styles[ownerState.variant], styles["".concat(ownerState.variant).concat(capitalize(ownerState.color || ownerState.severity))]];
|
|
45
46
|
}
|
|
46
47
|
})(function (_ref) {
|
|
47
|
-
var theme = _ref.theme
|
|
48
|
-
ownerState = _ref.ownerState;
|
|
48
|
+
var theme = _ref.theme;
|
|
49
49
|
var getColor = theme.palette.mode === 'light' ? darken : lighten;
|
|
50
50
|
var getBackgroundColor = theme.palette.mode === 'light' ? lighten : darken;
|
|
51
|
-
var color = ownerState.color || ownerState.severity;
|
|
52
51
|
return _extends({}, theme.typography.body2, {
|
|
53
52
|
backgroundColor: 'transparent',
|
|
54
53
|
display: 'flex',
|
|
55
|
-
padding: '6px 16px'
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
padding: '6px 16px',
|
|
55
|
+
variants: [].concat(_toConsumableArray(Object.entries(theme.palette).filter(function (_ref2) {
|
|
56
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
57
|
+
value = _ref3[1];
|
|
58
|
+
return value.main && value.light;
|
|
59
|
+
}).map(function (_ref4) {
|
|
60
|
+
var _ref5 = _slicedToArray(_ref4, 1),
|
|
61
|
+
color = _ref5[0];
|
|
62
|
+
return {
|
|
63
|
+
props: {
|
|
64
|
+
colorSeverity: color,
|
|
65
|
+
variant: 'standard'
|
|
66
|
+
},
|
|
67
|
+
style: _defineProperty({
|
|
68
|
+
color: theme.vars ? theme.vars.palette.Alert["".concat(color, "Color")] : getColor(theme.palette[color].light, 0.6),
|
|
69
|
+
backgroundColor: theme.vars ? theme.vars.palette.Alert["".concat(color, "StandardBg")] : getBackgroundColor(theme.palette[color].light, 0.9)
|
|
70
|
+
}, "& .".concat(alertClasses.icon), theme.vars ? {
|
|
71
|
+
color: theme.vars.palette.Alert["".concat(color, "IconColor")]
|
|
72
|
+
} : {
|
|
73
|
+
color: theme.palette[color].main
|
|
74
|
+
})
|
|
75
|
+
};
|
|
76
|
+
})), _toConsumableArray(Object.entries(theme.palette).filter(function (_ref6) {
|
|
77
|
+
var _ref7 = _slicedToArray(_ref6, 2),
|
|
78
|
+
value = _ref7[1];
|
|
79
|
+
return value.main && value.light;
|
|
80
|
+
}).map(function (_ref8) {
|
|
81
|
+
var _ref9 = _slicedToArray(_ref8, 1),
|
|
82
|
+
color = _ref9[0];
|
|
83
|
+
return {
|
|
84
|
+
props: {
|
|
85
|
+
colorSeverity: color,
|
|
86
|
+
variant: 'outlined'
|
|
87
|
+
},
|
|
88
|
+
style: _defineProperty({
|
|
89
|
+
color: theme.vars ? theme.vars.palette.Alert["".concat(color, "Color")] : getColor(theme.palette[color].light, 0.6),
|
|
90
|
+
border: "1px solid ".concat((theme.vars || theme).palette[color].light)
|
|
91
|
+
}, "& .".concat(alertClasses.icon), theme.vars ? {
|
|
92
|
+
color: theme.vars.palette.Alert["".concat(color, "IconColor")]
|
|
93
|
+
} : {
|
|
94
|
+
color: theme.palette[color].main
|
|
95
|
+
})
|
|
96
|
+
};
|
|
97
|
+
})), _toConsumableArray(Object.entries(theme.palette).filter(function (_ref10) {
|
|
98
|
+
var _ref11 = _slicedToArray(_ref10, 2),
|
|
99
|
+
value = _ref11[1];
|
|
100
|
+
return value.main && value.dark;
|
|
101
|
+
}).map(function (_ref12) {
|
|
102
|
+
var _ref13 = _slicedToArray(_ref12, 1),
|
|
103
|
+
color = _ref13[0];
|
|
104
|
+
return {
|
|
105
|
+
props: {
|
|
106
|
+
colorSeverity: color,
|
|
107
|
+
variant: 'filled'
|
|
108
|
+
},
|
|
109
|
+
style: _extends({
|
|
110
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
111
|
+
}, theme.vars ? {
|
|
112
|
+
color: theme.vars.palette.Alert["".concat(color, "FilledColor")],
|
|
113
|
+
backgroundColor: theme.vars.palette.Alert["".concat(color, "FilledBg")]
|
|
114
|
+
} : {
|
|
115
|
+
backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
|
|
116
|
+
color: theme.palette.getContrastText(theme.palette[color].main)
|
|
117
|
+
})
|
|
118
|
+
};
|
|
119
|
+
})))
|
|
120
|
+
});
|
|
79
121
|
});
|
|
80
122
|
var AlertIcon = styled('div', {
|
|
81
123
|
name: 'MuiAlert',
|
|
@@ -161,7 +203,8 @@ var Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
161
203
|
var ownerState = _extends({}, props, {
|
|
162
204
|
color: color,
|
|
163
205
|
severity: severity,
|
|
164
|
-
variant: variant
|
|
206
|
+
variant: variant,
|
|
207
|
+
colorSeverity: color || severity
|
|
165
208
|
});
|
|
166
209
|
var classes = useUtilityClasses(ownerState);
|
|
167
210
|
var externalForwardedProps = {
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getAlertUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiAlert', slot);
|
|
5
5
|
}
|
|
6
|
-
var alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
|
|
6
|
+
var alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'colorSuccess', 'colorInfo', 'colorWarning', 'colorError', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
|
|
7
7
|
export default alertClasses;
|
|
@@ -6,11 +6,11 @@ import * as React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
-
import styled from '../
|
|
10
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
9
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
11
10
|
import Typography from '../Typography';
|
|
12
11
|
import { getAlertTitleUtilityClass } from './alertTitleClasses';
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
var useThemeProps = createUseThemeProps('MuiAlertTitle');
|
|
14
14
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
15
15
|
var classes = ownerState.classes;
|
|
16
16
|
var slots = {
|
|
@@ -566,6 +566,67 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
566
566
|
var paperSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : componentsProps.paper;
|
|
567
567
|
var popperSlotProps = (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper;
|
|
568
568
|
var popupIndicatorSlotProps = (_slotProps$popupIndic = slotProps.popupIndicator) != null ? _slotProps$popupIndic : componentsProps.popupIndicator;
|
|
569
|
+
var renderAutocompletePopperChildren = function renderAutocompletePopperChildren(children) {
|
|
570
|
+
return /*#__PURE__*/_jsx(AutocompletePopper, _extends({
|
|
571
|
+
as: PopperComponent,
|
|
572
|
+
disablePortal: disablePortal,
|
|
573
|
+
style: {
|
|
574
|
+
width: anchorEl ? anchorEl.clientWidth : null
|
|
575
|
+
},
|
|
576
|
+
ownerState: ownerState,
|
|
577
|
+
role: "presentation",
|
|
578
|
+
anchorEl: anchorEl,
|
|
579
|
+
open: popupOpen
|
|
580
|
+
}, popperSlotProps, {
|
|
581
|
+
className: clsx(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
|
|
582
|
+
children: /*#__PURE__*/_jsx(AutocompletePaper, _extends({
|
|
583
|
+
ownerState: ownerState,
|
|
584
|
+
as: PaperComponent
|
|
585
|
+
}, paperSlotProps, {
|
|
586
|
+
className: clsx(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
|
|
587
|
+
children: children
|
|
588
|
+
}))
|
|
589
|
+
}));
|
|
590
|
+
};
|
|
591
|
+
var autocompletePopper = null;
|
|
592
|
+
if (!loading && groupedOptions.length > 0) {
|
|
593
|
+
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
|
|
594
|
+
as: ListboxComponent,
|
|
595
|
+
className: classes.listbox,
|
|
596
|
+
ownerState: ownerState
|
|
597
|
+
}, otherListboxProps, ListboxProps, {
|
|
598
|
+
ref: combinedListboxRef,
|
|
599
|
+
children: groupedOptions.map(function (option, index) {
|
|
600
|
+
if (groupBy) {
|
|
601
|
+
return renderGroup({
|
|
602
|
+
key: option.key,
|
|
603
|
+
group: option.group,
|
|
604
|
+
children: option.options.map(function (option2, index2) {
|
|
605
|
+
return renderListOption(option2, option.index + index2);
|
|
606
|
+
})
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
return renderListOption(option, index);
|
|
610
|
+
})
|
|
611
|
+
})));
|
|
612
|
+
} else if (loading && groupedOptions.length === 0) {
|
|
613
|
+
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteLoading, {
|
|
614
|
+
className: classes.loading,
|
|
615
|
+
ownerState: ownerState,
|
|
616
|
+
children: loadingText
|
|
617
|
+
}));
|
|
618
|
+
} else if (groupedOptions.length === 0 && !freeSolo && !loading) {
|
|
619
|
+
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteNoOptions, {
|
|
620
|
+
className: classes.noOptions,
|
|
621
|
+
ownerState: ownerState,
|
|
622
|
+
role: "presentation",
|
|
623
|
+
onMouseDown: function onMouseDown(event) {
|
|
624
|
+
// Prevent input blur when interacting with the "no options" content
|
|
625
|
+
event.preventDefault();
|
|
626
|
+
},
|
|
627
|
+
children: noOptionsText
|
|
628
|
+
}));
|
|
629
|
+
}
|
|
569
630
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
570
631
|
children: [/*#__PURE__*/_jsx(AutocompleteRoot, _extends({
|
|
571
632
|
ref: ref,
|
|
@@ -615,57 +676,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
615
676
|
readOnly: readOnly
|
|
616
677
|
}, getInputProps())
|
|
617
678
|
})
|
|
618
|
-
})), anchorEl ?
|
|
619
|
-
as: PopperComponent,
|
|
620
|
-
disablePortal: disablePortal,
|
|
621
|
-
style: {
|
|
622
|
-
width: anchorEl ? anchorEl.clientWidth : null
|
|
623
|
-
},
|
|
624
|
-
ownerState: ownerState,
|
|
625
|
-
role: "presentation",
|
|
626
|
-
anchorEl: anchorEl,
|
|
627
|
-
open: popupOpen
|
|
628
|
-
}, popperSlotProps, {
|
|
629
|
-
className: clsx(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
|
|
630
|
-
children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
|
|
631
|
-
ownerState: ownerState,
|
|
632
|
-
as: PaperComponent
|
|
633
|
-
}, paperSlotProps, {
|
|
634
|
-
className: clsx(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
|
|
635
|
-
children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
|
|
636
|
-
className: classes.loading,
|
|
637
|
-
ownerState: ownerState,
|
|
638
|
-
children: loadingText
|
|
639
|
-
}) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/_jsx(AutocompleteNoOptions, {
|
|
640
|
-
className: classes.noOptions,
|
|
641
|
-
ownerState: ownerState,
|
|
642
|
-
role: "presentation",
|
|
643
|
-
onMouseDown: function onMouseDown(event) {
|
|
644
|
-
// Prevent input blur when interacting with the "no options" content
|
|
645
|
-
event.preventDefault();
|
|
646
|
-
},
|
|
647
|
-
children: noOptionsText
|
|
648
|
-
}) : null, groupedOptions.length > 0 ? /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
|
|
649
|
-
as: ListboxComponent,
|
|
650
|
-
className: classes.listbox,
|
|
651
|
-
ownerState: ownerState
|
|
652
|
-
}, otherListboxProps, ListboxProps, {
|
|
653
|
-
ref: combinedListboxRef,
|
|
654
|
-
children: groupedOptions.map(function (option, index) {
|
|
655
|
-
if (groupBy) {
|
|
656
|
-
return renderGroup({
|
|
657
|
-
key: option.key,
|
|
658
|
-
group: option.group,
|
|
659
|
-
children: option.options.map(function (option2, index2) {
|
|
660
|
-
return renderListOption(option2, option.index + index2);
|
|
661
|
-
})
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
return renderListOption(option, index);
|
|
665
|
-
})
|
|
666
|
-
})) : null]
|
|
667
|
-
}))
|
|
668
|
-
})) : null]
|
|
679
|
+
})), anchorEl ? autocompletePopper : null]
|
|
669
680
|
});
|
|
670
681
|
});
|
|
671
682
|
process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptypes */ = {
|
package/legacy/Avatar/Avatar.js
CHANGED
|
@@ -7,12 +7,12 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import styled from '../
|
|
11
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
10
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
12
11
|
import Person from '../internal/svg-icons/Person';
|
|
13
12
|
import { getAvatarUtilityClass } from './avatarClasses';
|
|
14
13
|
import useSlot from '../utils/useSlot';
|
|
15
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
var useThemeProps = createUseThemeProps('MuiAvatar');
|
|
16
16
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
17
17
|
var classes = ownerState.classes,
|
|
18
18
|
variant = ownerState.variant,
|
package/legacy/Button/Button.js
CHANGED
|
@@ -26,10 +26,10 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
26
26
|
variant = ownerState.variant,
|
|
27
27
|
classes = ownerState.classes;
|
|
28
28
|
var slots = {
|
|
29
|
-
root: ['root', variant, "".concat(variant).concat(capitalize(color)), "size".concat(capitalize(size)), "".concat(variant, "Size").concat(capitalize(size)), color
|
|
29
|
+
root: ['root', variant, "".concat(variant).concat(capitalize(color)), "size".concat(capitalize(size)), "".concat(variant, "Size").concat(capitalize(size)), "color".concat(capitalize(color)), disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
|
|
30
30
|
label: ['label'],
|
|
31
|
-
startIcon: ['startIcon', "iconSize".concat(capitalize(size))],
|
|
32
|
-
endIcon: ['endIcon', "iconSize".concat(capitalize(size))]
|
|
31
|
+
startIcon: ['icon', 'startIcon', "iconSize".concat(capitalize(size))],
|
|
32
|
+
endIcon: ['icon', 'endIcon', "iconSize".concat(capitalize(size))]
|
|
33
33
|
};
|
|
34
34
|
var composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
|
|
35
35
|
return _extends({}, classes, composedClasses);
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getButtonUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiButton', slot);
|
|
5
5
|
}
|
|
6
|
-
var buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
|
|
6
|
+
var buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
|
|
7
7
|
export default buttonClasses;
|
package/legacy/Drawer/Drawer.js
CHANGED
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import integerPropType from '@mui/utils/integerPropType';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
10
11
|
import Modal from '../Modal';
|
|
11
12
|
import Slide from '../Slide';
|
|
12
13
|
import Paper from '../Paper';
|
|
@@ -113,8 +114,9 @@ var oppositeDirection = {
|
|
|
113
114
|
export function isHorizontal(anchor) {
|
|
114
115
|
return ['left', 'right'].indexOf(anchor) !== -1;
|
|
115
116
|
}
|
|
116
|
-
export function getAnchor(
|
|
117
|
-
|
|
117
|
+
export function getAnchor(_ref3, anchor) {
|
|
118
|
+
var direction = _ref3.direction;
|
|
119
|
+
return direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
/**
|
|
@@ -127,6 +129,7 @@ var Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) {
|
|
|
127
129
|
name: 'MuiDrawer'
|
|
128
130
|
});
|
|
129
131
|
var theme = useTheme();
|
|
132
|
+
var isRtl = useRtl();
|
|
130
133
|
var defaultTransitionDuration = {
|
|
131
134
|
enter: theme.transitions.duration.enteringScreen,
|
|
132
135
|
exit: theme.transitions.duration.leavingScreen
|
|
@@ -163,7 +166,9 @@ var Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) {
|
|
|
163
166
|
React.useEffect(function () {
|
|
164
167
|
mounted.current = true;
|
|
165
168
|
}, []);
|
|
166
|
-
var anchorInvariant = getAnchor(
|
|
169
|
+
var anchorInvariant = getAnchor({
|
|
170
|
+
direction: isRtl ? 'rtl' : 'ltr'
|
|
171
|
+
}, anchorProp);
|
|
167
172
|
var anchor = anchorProp;
|
|
168
173
|
var ownerState = _extends({}, props, {
|
|
169
174
|
anchor: anchor,
|
|
@@ -10,8 +10,8 @@ import clsx from 'clsx';
|
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
11
|
import { keyframes, css } from '@mui/system';
|
|
12
12
|
import { darken, lighten } from '@mui/system/colorManipulator';
|
|
13
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
13
14
|
import capitalize from '../utils/capitalize';
|
|
14
|
-
import useTheme from '../styles/useTheme';
|
|
15
15
|
import styled from '../styles/styled';
|
|
16
16
|
import useThemeProps from '../styles/useThemeProps';
|
|
17
17
|
import { getLinearProgressUtilityClass } from './linearProgressClasses';
|
|
@@ -190,7 +190,7 @@ var LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inPro
|
|
|
190
190
|
variant: variant
|
|
191
191
|
});
|
|
192
192
|
var classes = useUtilityClasses(ownerState);
|
|
193
|
-
var
|
|
193
|
+
var isRtl = useRtl();
|
|
194
194
|
var rootProps = {};
|
|
195
195
|
var inlineStyles = {
|
|
196
196
|
bar1: {},
|
|
@@ -202,7 +202,7 @@ var LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inPro
|
|
|
202
202
|
rootProps['aria-valuemin'] = 0;
|
|
203
203
|
rootProps['aria-valuemax'] = 100;
|
|
204
204
|
var transform = value - 100;
|
|
205
|
-
if (
|
|
205
|
+
if (isRtl) {
|
|
206
206
|
transform = -transform;
|
|
207
207
|
}
|
|
208
208
|
inlineStyles.bar1.transform = "translateX(".concat(transform, "%)");
|
|
@@ -213,7 +213,7 @@ var LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inPro
|
|
|
213
213
|
if (variant === 'buffer') {
|
|
214
214
|
if (valueBuffer !== undefined) {
|
|
215
215
|
var _transform = (valueBuffer || 0) - 100;
|
|
216
|
-
if (
|
|
216
|
+
if (isRtl) {
|
|
217
217
|
_transform = -_transform;
|
|
218
218
|
}
|
|
219
219
|
inlineStyles.bar2.transform = "translateX(".concat(_transform, "%)");
|
package/legacy/Menu/Menu.js
CHANGED
|
@@ -9,10 +9,10 @@ import clsx from 'clsx';
|
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { useSlotProps } from '@mui/base/utils';
|
|
11
11
|
import HTMLElementType from '@mui/utils/HTMLElementType';
|
|
12
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
12
13
|
import MenuList from '../MenuList';
|
|
13
14
|
import Popover, { PopoverPaper } from '../Popover';
|
|
14
15
|
import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
15
|
-
import useTheme from '../styles/useTheme';
|
|
16
16
|
import useThemeProps from '../styles/useThemeProps';
|
|
17
17
|
import { getMenuUtilityClass } from './menuClasses';
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -99,8 +99,7 @@ var Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {
|
|
|
99
99
|
_props$slotProps = props.slotProps,
|
|
100
100
|
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
101
101
|
other = _objectWithoutProperties(props, ["autoFocus", "children", "className", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant", "slots", "slotProps"]);
|
|
102
|
-
var
|
|
103
|
-
var isRtl = theme.direction === 'rtl';
|
|
102
|
+
var isRtl = useRtl();
|
|
104
103
|
var ownerState = _extends({}, props, {
|
|
105
104
|
autoFocus: autoFocus,
|
|
106
105
|
disableAutoFocusItem: disableAutoFocusItem,
|
|
@@ -116,7 +115,9 @@ var Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {
|
|
|
116
115
|
var menuListActionsRef = React.useRef(null);
|
|
117
116
|
var handleEntering = function handleEntering(element, isAppearing) {
|
|
118
117
|
if (menuListActionsRef.current) {
|
|
119
|
-
menuListActionsRef.current.adjustStyleForScrollbar(element,
|
|
118
|
+
menuListActionsRef.current.adjustStyleForScrollbar(element, {
|
|
119
|
+
direction: isRtl ? 'rtl' : 'ltr'
|
|
120
|
+
});
|
|
120
121
|
}
|
|
121
122
|
if (onEntering) {
|
|
122
123
|
onEntering(element, isAppearing);
|
|
@@ -108,13 +108,14 @@ var MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {
|
|
|
108
108
|
}, [autoFocus]);
|
|
109
109
|
React.useImperativeHandle(actions, function () {
|
|
110
110
|
return {
|
|
111
|
-
adjustStyleForScrollbar: function adjustStyleForScrollbar(containerElement,
|
|
111
|
+
adjustStyleForScrollbar: function adjustStyleForScrollbar(containerElement, _ref) {
|
|
112
|
+
var direction = _ref.direction;
|
|
112
113
|
// Let's ignore that piece of logic if users are already overriding the width
|
|
113
114
|
// of the menu.
|
|
114
115
|
var noExplicitWidth = !listRef.current.style.width;
|
|
115
116
|
if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {
|
|
116
117
|
var scrollbarSize = "".concat(getScrollbarSize(ownerDocument(containerElement)), "px");
|
|
117
|
-
listRef.current.style[
|
|
118
|
+
listRef.current.style[direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;
|
|
118
119
|
listRef.current.style.width = "calc(100% + ".concat(scrollbarSize, ")");
|
|
119
120
|
}
|
|
120
121
|
return listRef.current;
|