@mui/material 5.14.17 → 5.14.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Autocomplete/Autocomplete.d.ts +3 -0
- package/Autocomplete/Autocomplete.js +24 -5
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/Box/Box.js +2 -1
- package/Box/boxClasses.d.ts +7 -0
- package/Box/boxClasses.js +3 -0
- package/Box/index.d.ts +3 -0
- package/Box/index.js +3 -1
- package/CHANGELOG.md +154 -6
- package/Chip/Chip.js +2 -2
- package/FilledInput/FilledInput.js +9 -6
- package/FormControlLabel/FormControlLabel.js +1 -2
- package/InputAdornment/InputAdornment.js +2 -2
- package/InputLabel/InputLabel.js +5 -1
- package/Modal/Modal.d.ts +3 -0
- package/Modal/Modal.js +3 -0
- package/Popper/Popper.js +3 -0
- package/Rating/Rating.js +4 -6
- package/Select/Select.d.ts +1 -2
- package/Select/SelectInput.js +2 -1
- package/StepButton/StepButton.js +1 -1
- package/TablePagination/TablePagination.d.ts +23 -0
- package/TablePagination/TablePagination.js +47 -12
- package/TablePagination/TablePaginationActions.d.ts +19 -0
- package/TablePagination/TablePaginationActions.js +35 -15
- package/index.js +1 -1
- package/legacy/Accordion/Accordion.js +4 -5
- package/legacy/AccordionSummary/AccordionSummary.js +5 -6
- package/legacy/Autocomplete/Autocomplete.js +55 -41
- package/legacy/AvatarGroup/AvatarGroup.js +2 -3
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Box/Box.js +2 -1
- package/legacy/Box/boxClasses.js +3 -0
- package/legacy/Box/index.js +3 -1
- package/legacy/Button/Button.js +10 -11
- package/legacy/ButtonBase/ButtonBase.js +4 -5
- package/legacy/ButtonGroup/ButtonGroup.js +4 -5
- package/legacy/CardActionArea/CardActionArea.js +4 -5
- package/legacy/CardHeader/CardHeader.js +1 -2
- package/legacy/Checkbox/Checkbox.js +3 -4
- package/legacy/Chip/Chip.js +29 -32
- package/legacy/FilledInput/FilledInput.js +20 -17
- package/legacy/FormControlLabel/FormControlLabel.js +1 -2
- package/legacy/FormHelperText/FormHelperText.js +4 -5
- package/legacy/FormLabel/FormLabel.js +5 -6
- package/legacy/Input/Input.js +7 -8
- package/legacy/InputAdornment/InputAdornment.js +2 -2
- package/legacy/InputBase/InputBase.js +5 -6
- package/legacy/InputLabel/InputLabel.js +5 -1
- package/legacy/ListItem/ListItem.js +4 -5
- package/legacy/ListItemButton/ListItemButton.js +6 -7
- package/legacy/MenuItem/MenuItem.js +11 -12
- package/legacy/Modal/Modal.js +3 -0
- package/legacy/NativeSelect/NativeSelectInput.js +6 -7
- package/legacy/OutlinedInput/OutlinedInput.js +7 -8
- package/legacy/PaginationItem/PaginationItem.js +9 -10
- package/legacy/Popper/Popper.js +3 -0
- package/legacy/Rating/Rating.js +8 -10
- package/legacy/Select/SelectInput.js +2 -1
- package/legacy/Slider/Slider.js +11 -14
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +4 -5
- package/legacy/StepButton/StepButton.js +1 -1
- package/legacy/StepIcon/StepIcon.js +5 -6
- package/legacy/StepLabel/StepLabel.js +10 -12
- package/legacy/Switch/Switch.js +14 -17
- package/legacy/Tab/Tab.js +10 -11
- package/legacy/TablePagination/TablePagination.js +53 -19
- package/legacy/TablePagination/TablePaginationActions.js +35 -14
- package/legacy/TableRow/TableRow.js +4 -5
- package/legacy/Tabs/Tabs.js +1 -2
- package/legacy/ToggleButton/ToggleButton.js +4 -5
- package/legacy/Tooltip/Tooltip.js +10 -12
- package/legacy/index.js +1 -1
- package/legacy/styles/createMixins.js +4 -5
- package/modern/Autocomplete/Autocomplete.js +24 -5
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Box/Box.js +2 -1
- package/modern/Box/boxClasses.js +3 -0
- package/modern/Box/index.js +3 -1
- package/modern/Chip/Chip.js +2 -2
- package/modern/FilledInput/FilledInput.js +9 -6
- package/modern/FormControlLabel/FormControlLabel.js +1 -2
- package/modern/InputAdornment/InputAdornment.js +2 -2
- package/modern/InputLabel/InputLabel.js +5 -1
- package/modern/Modal/Modal.js +3 -0
- package/modern/Popper/Popper.js +3 -0
- package/modern/Rating/Rating.js +4 -6
- package/modern/Select/SelectInput.js +2 -1
- package/modern/StepButton/StepButton.js +1 -1
- package/modern/TablePagination/TablePagination.js +46 -12
- package/modern/TablePagination/TablePaginationActions.js +34 -15
- package/modern/index.js +1 -1
- package/node/Autocomplete/Autocomplete.js +24 -5
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Box/Box.js +2 -1
- package/node/Box/boxClasses.js +9 -0
- package/node/Box/index.js +24 -1
- package/node/Chip/Chip.js +2 -2
- package/node/FilledInput/FilledInput.js +9 -6
- package/node/FormControlLabel/FormControlLabel.js +1 -2
- package/node/InputAdornment/InputAdornment.js +2 -2
- package/node/InputLabel/InputLabel.js +5 -1
- package/node/Modal/Modal.js +3 -0
- package/node/Popper/Popper.js +3 -0
- package/node/Rating/Rating.js +4 -6
- package/node/Select/SelectInput.js +2 -1
- package/node/StepButton/StepButton.js +1 -1
- package/node/TablePagination/TablePagination.js +47 -12
- package/node/TablePagination/TablePaginationActions.js +35 -15
- package/node/index.js +1 -1
- package/package.json +9 -9
- package/umd/material-ui.development.js +180 -102
- package/umd/material-ui.production.min.js +21 -21
package/node/Chip/Chip.js
CHANGED
|
@@ -365,10 +365,10 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
365
365
|
}) : {};
|
|
366
366
|
let deleteIcon = null;
|
|
367
367
|
if (onDelete) {
|
|
368
|
-
deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {
|
|
368
|
+
deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? ( /*#__PURE__*/React.cloneElement(deleteIconProp, {
|
|
369
369
|
className: (0, _clsx.default)(deleteIconProp.props.className, classes.deleteIcon),
|
|
370
370
|
onClick: handleDeleteIconClick
|
|
371
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Cancel.default, {
|
|
371
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Cancel.default, {
|
|
372
372
|
className: (0, _clsx.default)(classes.deleteIcon),
|
|
373
373
|
onClick: handleDeleteIconClick
|
|
374
374
|
});
|
|
@@ -134,6 +134,9 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
|
|
|
134
134
|
}, ownerState.hiddenLabel && {
|
|
135
135
|
paddingTop: 16,
|
|
136
136
|
paddingBottom: 17
|
|
137
|
+
}, ownerState.hiddenLabel && ownerState.size === 'small' && {
|
|
138
|
+
paddingTop: 8,
|
|
139
|
+
paddingBottom: 9
|
|
137
140
|
}));
|
|
138
141
|
});
|
|
139
142
|
const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
|
|
@@ -174,11 +177,6 @@ const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
|
|
|
174
177
|
}, ownerState.hiddenLabel && {
|
|
175
178
|
paddingTop: 16,
|
|
176
179
|
paddingBottom: 17
|
|
177
|
-
}, ownerState.multiline && {
|
|
178
|
-
paddingTop: 0,
|
|
179
|
-
paddingBottom: 0,
|
|
180
|
-
paddingLeft: 0,
|
|
181
|
-
paddingRight: 0
|
|
182
180
|
}, ownerState.startAdornment && {
|
|
183
181
|
paddingLeft: 0
|
|
184
182
|
}, ownerState.endAdornment && {
|
|
@@ -186,6 +184,11 @@ const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
|
|
|
186
184
|
}, ownerState.hiddenLabel && ownerState.size === 'small' && {
|
|
187
185
|
paddingTop: 8,
|
|
188
186
|
paddingBottom: 9
|
|
187
|
+
}, ownerState.multiline && {
|
|
188
|
+
paddingTop: 0,
|
|
189
|
+
paddingBottom: 0,
|
|
190
|
+
paddingLeft: 0,
|
|
191
|
+
paddingRight: 0
|
|
189
192
|
}));
|
|
190
193
|
const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {
|
|
191
194
|
var _ref, _slots$root, _ref2, _slots$input;
|
|
@@ -220,7 +223,7 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
|
|
|
220
223
|
ownerState
|
|
221
224
|
}
|
|
222
225
|
};
|
|
223
|
-
const componentsProps = (slotProps != null ? slotProps : componentsPropsProp) ? (0, _utils.deepmerge)(slotProps != null ? slotProps : componentsPropsProp
|
|
226
|
+
const componentsProps = (slotProps != null ? slotProps : componentsPropsProp) ? (0, _utils.deepmerge)(filledInputComponentsProps, slotProps != null ? slotProps : componentsPropsProp) : filledInputComponentsProps;
|
|
224
227
|
const RootSlot = (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : FilledInputRoot;
|
|
225
228
|
const InputSlot = (_ref2 = (_slots$input = slots.input) != null ? _slots$input : components.Input) != null ? _ref2 : FilledInputInput;
|
|
226
229
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({
|
|
@@ -159,8 +159,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
159
159
|
ref: ref
|
|
160
160
|
}, other, {
|
|
161
161
|
children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Stack.default, {
|
|
162
|
-
|
|
163
|
-
alignItems: "center",
|
|
162
|
+
display: "block",
|
|
164
163
|
children: [label, /*#__PURE__*/(0, _jsxRuntime.jsxs)(AsteriskComponent, {
|
|
165
164
|
ownerState: ownerState,
|
|
166
165
|
"aria-hidden": true,
|
|
@@ -121,10 +121,10 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
|
|
|
121
121
|
color: "text.secondary",
|
|
122
122
|
children: children
|
|
123
123
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
124
|
-
children: [position === 'start' ? /* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
124
|
+
children: [position === 'start' ? ( /* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
125
125
|
className: "notranslate",
|
|
126
126
|
children: "\u200B"
|
|
127
|
-
})) : null, children]
|
|
127
|
+
}))) : null, children]
|
|
128
128
|
})
|
|
129
129
|
}))
|
|
130
130
|
});
|
|
@@ -113,7 +113,11 @@ const InputLabelRoot = (0, _styled.default)(_FormLabel.default, {
|
|
|
113
113
|
// but it feels a better when it bleeds a bit on the left, so 32px.
|
|
114
114
|
maxWidth: 'calc(133% - 32px)',
|
|
115
115
|
transform: 'translate(14px, -9px) scale(0.75)'
|
|
116
|
-
})
|
|
116
|
+
}), ownerState.variant === 'standard' && {
|
|
117
|
+
'&:not(label) + div': {
|
|
118
|
+
marginTop: 16
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
117
121
|
const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {
|
|
118
122
|
const props = (0, _useThemeProps.default)({
|
|
119
123
|
name: 'MuiInputLabel',
|
package/node/Modal/Modal.js
CHANGED
|
@@ -283,6 +283,9 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
|
|
|
283
283
|
* An HTML element or function that returns one.
|
|
284
284
|
* The `container` will have the portal children appended to it.
|
|
285
285
|
*
|
|
286
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
287
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
288
|
+
*
|
|
286
289
|
* By default, it uses the body of the top-level document object,
|
|
287
290
|
* so it's simply `document.body` most of the time.
|
|
288
291
|
*/
|
package/node/Popper/Popper.js
CHANGED
|
@@ -125,6 +125,9 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
|
|
|
125
125
|
* An HTML element or function that returns one.
|
|
126
126
|
* The `container` will have the portal children appended to it.
|
|
127
127
|
*
|
|
128
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
129
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
130
|
+
*
|
|
128
131
|
* By default, it uses the body of the top-level document object,
|
|
129
132
|
* so it's simply `document.body` most of the time.
|
|
130
133
|
*/
|
package/node/Rating/Rating.js
CHANGED
|
@@ -344,16 +344,14 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
344
344
|
const rootNode = rootRef.current;
|
|
345
345
|
const {
|
|
346
346
|
right,
|
|
347
|
-
left
|
|
347
|
+
left,
|
|
348
|
+
width: containerWidth
|
|
348
349
|
} = rootNode.getBoundingClientRect();
|
|
349
|
-
const {
|
|
350
|
-
width
|
|
351
|
-
} = rootNode.firstChild.getBoundingClientRect();
|
|
352
350
|
let percent;
|
|
353
351
|
if (theme.direction === 'rtl') {
|
|
354
|
-
percent = (right - event.clientX) /
|
|
352
|
+
percent = (right - event.clientX) / containerWidth;
|
|
355
353
|
} else {
|
|
356
|
-
percent = (event.clientX - left) /
|
|
354
|
+
percent = (event.clientX - left) / containerWidth;
|
|
357
355
|
}
|
|
358
356
|
let newHover = roundValueToPrecision(max * percent + precision / 2, precision);
|
|
359
357
|
newHover = clamp(newHover, precision, max);
|
|
@@ -441,6 +441,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
441
441
|
const classes = useUtilityClasses(ownerState);
|
|
442
442
|
const paperProps = (0, _extends2.default)({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
|
|
443
443
|
const listboxId = (0, _utils.unstable_useId)();
|
|
444
|
+
const hiddenInputId = (0, _utils.unstable_useId)();
|
|
444
445
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
445
446
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SelectSelect, (0, _extends2.default)({
|
|
446
447
|
ref: handleDisplayRef,
|
|
@@ -471,7 +472,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
471
472
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectNativeInput, (0, _extends2.default)({
|
|
472
473
|
"aria-invalid": error,
|
|
473
474
|
value: Array.isArray(value) ? value.join(',') : value,
|
|
474
|
-
name: name,
|
|
475
|
+
name: name != null ? name : hiddenInputId,
|
|
475
476
|
ref: inputRef,
|
|
476
477
|
"aria-hidden": true,
|
|
477
478
|
onChange: handleChange,
|
|
@@ -89,7 +89,7 @@ const StepButton = /*#__PURE__*/React.forwardRef(function StepButton(inProps, re
|
|
|
89
89
|
icon,
|
|
90
90
|
optional
|
|
91
91
|
};
|
|
92
|
-
const child = (0, _isMuiElement.default)(children, ['StepLabel']) ? /*#__PURE__*/React.cloneElement(children, childProps) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepLabel.default, (0, _extends2.default)({}, childProps, {
|
|
92
|
+
const child = (0, _isMuiElement.default)(children, ['StepLabel']) ? ( /*#__PURE__*/React.cloneElement(children, childProps)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepLabel.default, (0, _extends2.default)({}, childProps, {
|
|
93
93
|
children: children
|
|
94
94
|
}));
|
|
95
95
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StepButtonRoot, (0, _extends2.default)({
|
|
@@ -26,7 +26,7 @@ var _useId = _interopRequireDefault(require("../utils/useId"));
|
|
|
26
26
|
var _tablePaginationClasses = _interopRequireWildcard(require("./tablePaginationClasses"));
|
|
27
27
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
28
|
var _InputBase;
|
|
29
|
-
const _excluded = ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton"];
|
|
29
|
+
const _excluded = ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps"];
|
|
30
30
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
31
31
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
32
32
|
const TablePaginationRoot = (0, _styled.default)(_TableCell.default, {
|
|
@@ -151,6 +151,7 @@ const useUtilityClasses = ownerState => {
|
|
|
151
151
|
* A `TableCell` based component for placing inside `TableFooter` for pagination.
|
|
152
152
|
*/
|
|
153
153
|
const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inProps, ref) {
|
|
154
|
+
var _slotProps$select;
|
|
154
155
|
const props = (0, _useThemeProps.default)({
|
|
155
156
|
props: inProps,
|
|
156
157
|
name: 'MuiTablePagination'
|
|
@@ -162,6 +163,7 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
|
|
|
162
163
|
colSpan: colSpanProp,
|
|
163
164
|
component = _TableCell.default,
|
|
164
165
|
count,
|
|
166
|
+
disabled = false,
|
|
165
167
|
getItemAriaLabel = defaultGetAriaLabel,
|
|
166
168
|
labelDisplayedRows = defaultLabelDisplayedRows,
|
|
167
169
|
labelRowsPerPage = 'Rows per page:',
|
|
@@ -173,19 +175,21 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
|
|
|
173
175
|
rowsPerPageOptions = [10, 25, 50, 100],
|
|
174
176
|
SelectProps = {},
|
|
175
177
|
showFirstButton = false,
|
|
176
|
-
showLastButton = false
|
|
178
|
+
showLastButton = false,
|
|
179
|
+
slotProps
|
|
177
180
|
} = props,
|
|
178
181
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
179
182
|
const ownerState = props;
|
|
180
183
|
const classes = useUtilityClasses(ownerState);
|
|
181
|
-
const
|
|
184
|
+
const selectProps = (_slotProps$select = slotProps == null ? void 0 : slotProps.select) != null ? _slotProps$select : SelectProps;
|
|
185
|
+
const MenuItemComponent = selectProps.native ? 'option' : TablePaginationMenuItem;
|
|
182
186
|
let colSpan;
|
|
183
187
|
if (component === _TableCell.default || component === 'td') {
|
|
184
188
|
colSpan = colSpanProp || 1000; // col-span over everything
|
|
185
189
|
}
|
|
186
190
|
|
|
187
|
-
const selectId = (0, _useId.default)(
|
|
188
|
-
const labelId = (0, _useId.default)(
|
|
191
|
+
const selectId = (0, _useId.default)(selectProps.id);
|
|
192
|
+
const labelId = (0, _useId.default)(selectProps.labelId);
|
|
189
193
|
const getLabelDisplayedRowsTo = () => {
|
|
190
194
|
if (count === -1) {
|
|
191
195
|
return (page + 1) * rowsPerPage;
|
|
@@ -209,21 +213,22 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
|
|
|
209
213
|
children: labelRowsPerPage
|
|
210
214
|
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(TablePaginationSelect, (0, _extends2.default)({
|
|
211
215
|
variant: "standard"
|
|
212
|
-
}, !
|
|
216
|
+
}, !selectProps.variant && {
|
|
213
217
|
input: _InputBase || (_InputBase = /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase2.default, {}))
|
|
214
218
|
}, {
|
|
215
219
|
value: rowsPerPage,
|
|
216
220
|
onChange: onRowsPerPageChange,
|
|
217
221
|
id: selectId,
|
|
218
222
|
labelId: labelId
|
|
219
|
-
},
|
|
220
|
-
classes: (0, _extends2.default)({},
|
|
223
|
+
}, selectProps, {
|
|
224
|
+
classes: (0, _extends2.default)({}, selectProps.classes, {
|
|
221
225
|
// TODO v5 remove `classes.input`
|
|
222
|
-
root: (0, _clsx.default)(classes.input, classes.selectRoot, (
|
|
223
|
-
select: (0, _clsx.default)(classes.select, (
|
|
226
|
+
root: (0, _clsx.default)(classes.input, classes.selectRoot, (selectProps.classes || {}).root),
|
|
227
|
+
select: (0, _clsx.default)(classes.select, (selectProps.classes || {}).select),
|
|
224
228
|
// TODO v5 remove `selectIcon`
|
|
225
|
-
icon: (0, _clsx.default)(classes.selectIcon, (
|
|
229
|
+
icon: (0, _clsx.default)(classes.selectIcon, (selectProps.classes || {}).icon)
|
|
226
230
|
}),
|
|
231
|
+
disabled: disabled,
|
|
227
232
|
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/(0, _react.createElement)(MenuItemComponent, (0, _extends2.default)({}, !(0, _base.isHostComponent)(MenuItemComponent) && {
|
|
228
233
|
ownerState
|
|
229
234
|
}, {
|
|
@@ -249,7 +254,9 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
|
|
|
249
254
|
rowsPerPage: rowsPerPage,
|
|
250
255
|
showFirstButton: showFirstButton,
|
|
251
256
|
showLastButton: showLastButton,
|
|
252
|
-
|
|
257
|
+
slotProps: slotProps == null ? void 0 : slotProps.actions,
|
|
258
|
+
getItemAriaLabel: getItemAriaLabel,
|
|
259
|
+
disabled: disabled
|
|
253
260
|
})]
|
|
254
261
|
})
|
|
255
262
|
}));
|
|
@@ -267,6 +274,9 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
267
274
|
ActionsComponent: _propTypes.default.elementType,
|
|
268
275
|
/**
|
|
269
276
|
* Props applied to the back arrow [`IconButton`](/material-ui/api/icon-button/) component.
|
|
277
|
+
*
|
|
278
|
+
* This prop is an alias for `slotProps.actions.previousButton` and will be overriden by it if both are used.
|
|
279
|
+
* @deprecated Use `slotProps.actions.previousButton` instead.
|
|
270
280
|
*/
|
|
271
281
|
backIconButtonProps: _propTypes.default.object,
|
|
272
282
|
/**
|
|
@@ -292,6 +302,11 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
292
302
|
* To enable server side pagination for an unknown number of items, provide -1.
|
|
293
303
|
*/
|
|
294
304
|
count: _utils.integerPropType.isRequired,
|
|
305
|
+
/**
|
|
306
|
+
* If `true`, the component is disabled.
|
|
307
|
+
* @default false
|
|
308
|
+
*/
|
|
309
|
+
disabled: _propTypes.default.bool,
|
|
295
310
|
/**
|
|
296
311
|
* Accepts a function which returns a string value that provides a user-friendly name for the current page.
|
|
297
312
|
* This is important for screen reader users.
|
|
@@ -323,6 +338,9 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
323
338
|
labelRowsPerPage: _propTypes.default.node,
|
|
324
339
|
/**
|
|
325
340
|
* Props applied to the next arrow [`IconButton`](/material-ui/api/icon-button/) element.
|
|
341
|
+
*
|
|
342
|
+
* This prop is an alias for `slotProps.actions.nextButton` and will be overriden by it if both are used.
|
|
343
|
+
* @deprecated Use `slotProps.actions.nextButton` instead.
|
|
326
344
|
*/
|
|
327
345
|
nextIconButtonProps: _propTypes.default.object,
|
|
328
346
|
/**
|
|
@@ -374,6 +392,10 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
374
392
|
})]).isRequired),
|
|
375
393
|
/**
|
|
376
394
|
* Props applied to the rows per page [`Select`](/material-ui/api/select/) element.
|
|
395
|
+
*
|
|
396
|
+
* This prop is an alias for `slotProps.select` and will be overriden by it if both are used.
|
|
397
|
+
* @deprecated Use `slotProps.select` instead.
|
|
398
|
+
*
|
|
377
399
|
* @default {}
|
|
378
400
|
*/
|
|
379
401
|
SelectProps: _propTypes.default.object,
|
|
@@ -387,6 +409,19 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
387
409
|
* @default false
|
|
388
410
|
*/
|
|
389
411
|
showLastButton: _propTypes.default.bool,
|
|
412
|
+
/**
|
|
413
|
+
* The props used for each slot inside the TablePagination.
|
|
414
|
+
* @default {}
|
|
415
|
+
*/
|
|
416
|
+
slotProps: _propTypes.default.shape({
|
|
417
|
+
actions: _propTypes.default.shape({
|
|
418
|
+
firstButton: _propTypes.default.object,
|
|
419
|
+
lastButton: _propTypes.default.object,
|
|
420
|
+
nextButton: _propTypes.default.object,
|
|
421
|
+
previousButton: _propTypes.default.object
|
|
422
|
+
}),
|
|
423
|
+
select: _propTypes.default.object
|
|
424
|
+
}),
|
|
390
425
|
/**
|
|
391
426
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
392
427
|
*/
|
|
@@ -18,23 +18,26 @@ var _LastPage = _interopRequireDefault(require("../internal/svg-icons/LastPage")
|
|
|
18
18
|
var _FirstPage = _interopRequireDefault(require("../internal/svg-icons/FirstPage"));
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
var _LastPageIcon, _FirstPageIcon, _KeyboardArrowRight, _KeyboardArrowLeft, _KeyboardArrowLeft2, _KeyboardArrowRight2, _FirstPageIcon2, _LastPageIcon2;
|
|
21
|
-
const _excluded = ["backIconButtonProps", "count", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton"];
|
|
21
|
+
const _excluded = ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slotProps"];
|
|
22
22
|
/**
|
|
23
23
|
* @ignore - internal component.
|
|
24
24
|
*/
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
27
|
const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {
|
|
28
|
+
var _slotProps$firstButto, _slotProps$previousBu, _slotProps$nextButton, _slotProps$lastButton;
|
|
28
29
|
const {
|
|
29
30
|
backIconButtonProps,
|
|
30
31
|
count,
|
|
32
|
+
disabled = false,
|
|
31
33
|
getItemAriaLabel,
|
|
32
34
|
nextIconButtonProps,
|
|
33
35
|
onPageChange,
|
|
34
36
|
page,
|
|
35
37
|
rowsPerPage,
|
|
36
38
|
showFirstButton,
|
|
37
|
-
showLastButton
|
|
39
|
+
showLastButton,
|
|
40
|
+
slotProps
|
|
38
41
|
} = props,
|
|
39
42
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
40
43
|
const theme = (0, _useTheme.default)();
|
|
@@ -53,35 +56,37 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
|
|
|
53
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
54
57
|
ref: ref
|
|
55
58
|
}, other, {
|
|
56
|
-
children: [showFirstButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
59
|
+
children: [showFirstButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({
|
|
57
60
|
onClick: handleFirstPageButtonClick,
|
|
58
|
-
disabled: page === 0,
|
|
61
|
+
disabled: disabled || page === 0,
|
|
59
62
|
"aria-label": getItemAriaLabel('first', page),
|
|
60
|
-
title: getItemAriaLabel('first', page)
|
|
63
|
+
title: getItemAriaLabel('first', page)
|
|
64
|
+
}, (_slotProps$firstButto = slotProps == null ? void 0 : slotProps.firstButton) != null ? _slotProps$firstButto : {}, {
|
|
61
65
|
children: theme.direction === 'rtl' ? _LastPageIcon || (_LastPageIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_LastPage.default, {})) : _FirstPageIcon || (_FirstPageIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FirstPage.default, {}))
|
|
62
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({
|
|
66
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({
|
|
63
67
|
onClick: handleBackButtonClick,
|
|
64
|
-
disabled: page === 0,
|
|
68
|
+
disabled: disabled || page === 0,
|
|
65
69
|
color: "inherit",
|
|
66
70
|
"aria-label": getItemAriaLabel('previous', page),
|
|
67
71
|
title: getItemAriaLabel('previous', page)
|
|
68
|
-
}, backIconButtonProps, {
|
|
72
|
+
}, (_slotProps$previousBu = slotProps == null ? void 0 : slotProps.previousButton) != null ? _slotProps$previousBu : backIconButtonProps, {
|
|
69
73
|
children: theme.direction === 'rtl' ? _KeyboardArrowRight || (_KeyboardArrowRight = /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyboardArrowRight3.default, {})) : _KeyboardArrowLeft || (_KeyboardArrowLeft = /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyboardArrowLeft3.default, {}))
|
|
70
74
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({
|
|
71
75
|
onClick: handleNextButtonClick,
|
|
72
|
-
disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false,
|
|
76
|
+
disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
|
|
73
77
|
color: "inherit",
|
|
74
78
|
"aria-label": getItemAriaLabel('next', page),
|
|
75
79
|
title: getItemAriaLabel('next', page)
|
|
76
|
-
}, nextIconButtonProps, {
|
|
80
|
+
}, (_slotProps$nextButton = slotProps == null ? void 0 : slotProps.nextButton) != null ? _slotProps$nextButton : nextIconButtonProps, {
|
|
77
81
|
children: theme.direction === 'rtl' ? _KeyboardArrowLeft2 || (_KeyboardArrowLeft2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyboardArrowLeft3.default, {})) : _KeyboardArrowRight2 || (_KeyboardArrowRight2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyboardArrowRight3.default, {}))
|
|
78
|
-
})), showLastButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
82
|
+
})), showLastButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({
|
|
79
83
|
onClick: handleLastPageButtonClick,
|
|
80
|
-
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
84
|
+
disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
|
|
81
85
|
"aria-label": getItemAriaLabel('last', page),
|
|
82
|
-
title: getItemAriaLabel('last', page)
|
|
86
|
+
title: getItemAriaLabel('last', page)
|
|
87
|
+
}, (_slotProps$lastButton = slotProps == null ? void 0 : slotProps.lastButton) != null ? _slotProps$lastButton : {}, {
|
|
83
88
|
children: theme.direction === 'rtl' ? _FirstPageIcon2 || (_FirstPageIcon2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FirstPage.default, {})) : _LastPageIcon2 || (_LastPageIcon2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_LastPage.default, {}))
|
|
84
|
-
})]
|
|
89
|
+
}))]
|
|
85
90
|
}));
|
|
86
91
|
});
|
|
87
92
|
process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
|
|
@@ -93,6 +98,11 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
|
|
|
93
98
|
* The total number of rows.
|
|
94
99
|
*/
|
|
95
100
|
count: _propTypes.default.number.isRequired,
|
|
101
|
+
/**
|
|
102
|
+
* If `true`, the component is disabled.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
disabled: _propTypes.default.bool,
|
|
96
106
|
/**
|
|
97
107
|
* Accepts a function which returns a string value that provides a user-friendly name for the current page.
|
|
98
108
|
*
|
|
@@ -129,6 +139,16 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
|
|
|
129
139
|
/**
|
|
130
140
|
* If `true`, show the last-page button.
|
|
131
141
|
*/
|
|
132
|
-
showLastButton: _propTypes.default.bool.isRequired
|
|
142
|
+
showLastButton: _propTypes.default.bool.isRequired,
|
|
143
|
+
/**
|
|
144
|
+
* The props used for each slot inside the TablePaginationActions.
|
|
145
|
+
* @default {}
|
|
146
|
+
*/
|
|
147
|
+
slotProps: _propTypes.default.shape({
|
|
148
|
+
firstButton: _propTypes.default.object,
|
|
149
|
+
lastButton: _propTypes.default.object,
|
|
150
|
+
nextButton: _propTypes.default.object,
|
|
151
|
+
previousButton: _propTypes.default.object
|
|
152
|
+
})
|
|
133
153
|
} : void 0;
|
|
134
154
|
var _default = exports.default = TablePaginationActions;
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"homepage": "https://mui.com/material-ui/",
|
|
25
25
|
"funding": {
|
|
26
26
|
"type": "opencollective",
|
|
27
|
-
"url": "https://opencollective.com/mui"
|
|
27
|
+
"url": "https://opencollective.com/mui-org"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@babel/runtime": "^7.23.
|
|
31
|
-
"@mui/base": "5.0.0-beta.
|
|
32
|
-
"@mui/core-downloads-tracker": "^5.14.
|
|
33
|
-
"@mui/system": "^5.14.
|
|
34
|
-
"@mui/types": "^7.2.
|
|
35
|
-
"@mui/utils": "^5.14.
|
|
36
|
-
"@types/react-transition-group": "^4.4.
|
|
30
|
+
"@babel/runtime": "^7.23.4",
|
|
31
|
+
"@mui/base": "5.0.0-beta.25",
|
|
32
|
+
"@mui/core-downloads-tracker": "^5.14.19",
|
|
33
|
+
"@mui/system": "^5.14.19",
|
|
34
|
+
"@mui/types": "^7.2.10",
|
|
35
|
+
"@mui/utils": "^5.14.19",
|
|
36
|
+
"@types/react-transition-group": "^4.4.9",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"csstype": "^3.1.2",
|
|
39
39
|
"prop-types": "^15.8.1",
|