@mui/material 5.14.20 → 5.15.1
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/AccordionActions/AccordionActions.js +1 -1
- package/Autocomplete/Autocomplete.js +4 -5
- package/ButtonBase/ButtonBase.js +1 -2
- package/ButtonGroup/index.d.ts +2 -0
- package/ButtonGroup/index.js +3 -1
- package/CHANGELOG.md +102 -2
- package/CardActions/CardActions.js +1 -1
- package/CircularProgress/CircularProgress.js +0 -1
- package/FilledInput/FilledInput.js +0 -2
- package/Input/Input.js +0 -2
- package/InputBase/InputBase.js +0 -2
- package/InputLabel/InputLabel.js +1 -5
- package/Link/Link.js +0 -1
- package/NativeSelect/NativeSelectInput.js +0 -2
- package/Select/SelectInput.js +1 -3
- package/TablePagination/TablePagination.d.ts +8 -0
- package/TablePagination/TablePagination.js +27 -6
- package/TablePagination/TablePaginationActions.d.ts +49 -0
- package/TablePagination/TablePaginationActions.js +54 -19
- package/Tabs/Tabs.js +0 -1
- package/colors/amber.d.ts +0 -1
- package/colors/blue.d.ts +0 -1
- package/colors/blueGrey.d.ts +0 -1
- package/colors/brown.d.ts +0 -1
- package/colors/common.d.ts +0 -1
- package/colors/cyan.d.ts +0 -1
- package/colors/deepOrange.d.ts +0 -1
- package/colors/deepPurple.d.ts +0 -1
- package/colors/green.d.ts +0 -1
- package/colors/grey.d.ts +0 -1
- package/colors/indigo.d.ts +0 -1
- package/colors/lightBlue.d.ts +0 -1
- package/colors/lightGreen.d.ts +0 -1
- package/colors/lime.d.ts +0 -1
- package/colors/orange.d.ts +0 -1
- package/colors/pink.d.ts +0 -1
- package/colors/purple.d.ts +0 -1
- package/colors/red.d.ts +0 -1
- package/colors/teal.d.ts +0 -1
- package/colors/yellow.d.ts +0 -1
- package/index.js +1 -1
- package/legacy/AccordionActions/AccordionActions.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +4 -5
- package/legacy/ButtonBase/ButtonBase.js +1 -1
- package/legacy/ButtonGroup/index.js +3 -1
- package/legacy/CardActions/CardActions.js +1 -1
- package/legacy/CircularProgress/CircularProgress.js +0 -1
- package/legacy/InputLabel/InputLabel.js +1 -5
- package/legacy/NativeSelect/NativeSelectInput.js +0 -2
- package/legacy/Select/SelectInput.js +1 -3
- package/legacy/TablePagination/TablePagination.js +29 -6
- package/legacy/TablePagination/TablePaginationActions.js +56 -19
- package/legacy/Tabs/Tabs.js +0 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +0 -11
- package/legacy/styles/experimental_extendTheme.js +12 -6
- package/legacy/useTouchRipple/useTouchRipple.js +1 -1
- package/locale/index.js +0 -11
- package/modern/AccordionActions/AccordionActions.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +4 -5
- package/modern/ButtonBase/ButtonBase.js +1 -2
- package/modern/ButtonGroup/index.js +3 -1
- package/modern/CardActions/CardActions.js +1 -1
- package/modern/CircularProgress/CircularProgress.js +0 -1
- package/modern/FilledInput/FilledInput.js +0 -2
- package/modern/Input/Input.js +0 -2
- package/modern/InputBase/InputBase.js +0 -2
- package/modern/InputLabel/InputLabel.js +1 -5
- package/modern/Link/Link.js +0 -1
- package/modern/NativeSelect/NativeSelectInput.js +0 -2
- package/modern/Select/SelectInput.js +1 -3
- package/modern/TablePagination/TablePagination.js +27 -6
- package/modern/TablePagination/TablePaginationActions.js +53 -18
- package/modern/Tabs/Tabs.js +0 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +0 -11
- package/modern/styles/experimental_extendTheme.js +12 -6
- package/modern/useTouchRipple/useTouchRipple.js +1 -1
- package/node/AccordionActions/AccordionActions.js +1 -1
- package/node/Autocomplete/Autocomplete.js +4 -5
- package/node/ButtonBase/ButtonBase.js +1 -2
- package/node/ButtonGroup/index.js +17 -1
- package/node/CardActions/CardActions.js +1 -1
- package/node/CircularProgress/CircularProgress.js +0 -1
- package/node/FilledInput/FilledInput.js +0 -2
- package/node/Input/Input.js +0 -2
- package/node/InputBase/InputBase.js +0 -2
- package/node/InputLabel/InputLabel.js +1 -5
- package/node/Link/Link.js +0 -1
- package/node/NativeSelect/NativeSelectInput.js +0 -2
- package/node/Select/SelectInput.js +1 -3
- package/node/TablePagination/TablePagination.js +27 -6
- package/node/TablePagination/TablePaginationActions.js +54 -19
- package/node/Tabs/Tabs.js +0 -1
- package/node/index.js +1 -1
- package/node/locale/index.js +0 -11
- package/node/styles/experimental_extendTheme.js +11 -5
- package/node/styles/index.js +1 -0
- package/node/useTouchRipple/useTouchRipple.js +1 -1
- package/package.json +8 -8
- package/styles/components.d.ts +115 -115
- package/styles/experimental_extendTheme.js +12 -6
- package/styles/variants.d.ts +1 -2
- package/umd/material-ui.development.js +111 -73
- package/umd/material-ui.production.min.js +20 -20
- package/useTouchRipple/useTouchRipple.js +1 -1
package/colors/blue.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/blueGrey.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/brown.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/common.d.ts
CHANGED
package/colors/cyan.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/deepOrange.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/deepPurple.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/green.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/grey.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/indigo.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/lightBlue.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/lightGreen.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/lime.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/orange.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/pink.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/purple.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/red.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/teal.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/colors/yellow.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* tslint:disable max-line-length */
|
|
2
1
|
/**
|
|
3
2
|
*              
|
|
4
3
|
*/
|
package/index.js
CHANGED
|
@@ -165,7 +165,6 @@ var AutocompleteEndAdornment = styled('div', {
|
|
|
165
165
|
right: 0,
|
|
166
166
|
top: 'calc(50% - 14px)' // Center vertically
|
|
167
167
|
});
|
|
168
|
-
|
|
169
168
|
var AutocompleteClearIndicator = styled(IconButton, {
|
|
170
169
|
name: 'MuiAutocomplete',
|
|
171
170
|
slot: 'ClearIndicator',
|
|
@@ -672,7 +671,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
672
671
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
673
672
|
// ----------------------------------------------------------------------
|
|
674
673
|
/**
|
|
675
|
-
* If `true`, the portion of the selected suggestion that
|
|
674
|
+
* If `true`, the portion of the selected suggestion that the user hasn't typed,
|
|
676
675
|
* known as the completion string, appears inline after the input cursor in the textbox.
|
|
677
676
|
* The inline completion string is visually highlighted and has a selected state.
|
|
678
677
|
* @default false
|
|
@@ -688,7 +687,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
688
687
|
* when the Autocomplete loses focus unless the user chooses
|
|
689
688
|
* a different option or changes the character string in the input.
|
|
690
689
|
*
|
|
691
|
-
* When using `freeSolo` mode, the typed value will be the input value
|
|
690
|
+
* When using the `freeSolo` mode, the typed value will be the input value
|
|
692
691
|
* if the Autocomplete loses focus without highlighting an option.
|
|
693
692
|
* @default false
|
|
694
693
|
*/
|
|
@@ -723,8 +722,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
723
722
|
/**
|
|
724
723
|
* If `true`, the input's text is cleared on blur if no value is selected.
|
|
725
724
|
*
|
|
726
|
-
* Set to `true` if you want to help the user enter a new value.
|
|
727
|
-
* Set to `false` if you want to help the user resume their search.
|
|
725
|
+
* Set it to `true` if you want to help the user enter a new value.
|
|
726
|
+
* Set it to `false` if you want to help the user resume their search.
|
|
728
727
|
* @default !props.freeSolo
|
|
729
728
|
*/
|
|
730
729
|
clearOnBlur: PropTypes.bool,
|
|
@@ -244,7 +244,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref)
|
|
|
244
244
|
});
|
|
245
245
|
var handleKeyUp = useEventCallback(function (event) {
|
|
246
246
|
// calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed
|
|
247
|
-
// https://codesandbox.io/
|
|
247
|
+
// https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0
|
|
248
248
|
if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {
|
|
249
249
|
keydownRef.current = false;
|
|
250
250
|
rippleRef.current.stop(event, function () {
|
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
export { default } from './ButtonGroup';
|
|
4
4
|
export { default as buttonGroupClasses } from './buttonGroupClasses';
|
|
5
|
-
export * from './buttonGroupClasses';
|
|
5
|
+
export * from './buttonGroupClasses';
|
|
6
|
+
export { default as ButtonGroupContext } from './ButtonGroupContext';
|
|
7
|
+
export { default as ButtonGroupButtonContext } from './ButtonGroupButtonContext';
|
|
@@ -101,11 +101,7 @@ var InputLabelRoot = styled(FormLabel, {
|
|
|
101
101
|
// but it feels a better when it bleeds a bit on the left, so 32px.
|
|
102
102
|
maxWidth: 'calc(133% - 32px)',
|
|
103
103
|
transform: 'translate(14px, -9px) scale(0.75)'
|
|
104
|
-
})
|
|
105
|
-
'&:not(label) + div': {
|
|
106
|
-
marginTop: 16
|
|
107
|
-
}
|
|
108
|
-
});
|
|
104
|
+
}));
|
|
109
105
|
});
|
|
110
106
|
var InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {
|
|
111
107
|
var props = useThemeProps({
|
|
@@ -47,7 +47,6 @@ export var nativeSelectSelectStyles = function nativeSelectSelectStyles(_ref) {
|
|
|
47
47
|
}, {
|
|
48
48
|
borderRadius: 0 // Reset Chrome style
|
|
49
49
|
}),
|
|
50
|
-
|
|
51
50
|
// Remove IE11 arrow
|
|
52
51
|
'&::-ms-expand': {
|
|
53
52
|
display: 'none'
|
|
@@ -70,7 +69,6 @@ export var nativeSelectSelectStyles = function nativeSelectSelectStyles(_ref) {
|
|
|
70
69
|
'&:focus': {
|
|
71
70
|
borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style
|
|
72
71
|
},
|
|
73
|
-
|
|
74
72
|
'&&&': {
|
|
75
73
|
paddingRight: 32
|
|
76
74
|
}
|
|
@@ -391,7 +391,6 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
391
391
|
'data-value': child.props.value // Instead, we provide it as a data attribute.
|
|
392
392
|
});
|
|
393
393
|
});
|
|
394
|
-
|
|
395
394
|
if (process.env.NODE_ENV !== 'production') {
|
|
396
395
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
397
396
|
React.useEffect(function () {
|
|
@@ -446,7 +445,6 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
446
445
|
var classes = useUtilityClasses(ownerState);
|
|
447
446
|
var paperProps = _extends({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
|
|
448
447
|
var listboxId = useId();
|
|
449
|
-
var hiddenInputId = useId();
|
|
450
448
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
451
449
|
children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
|
|
452
450
|
ref: handleDisplayRef,
|
|
@@ -477,7 +475,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
477
475
|
})), /*#__PURE__*/_jsx(SelectNativeInput, _extends({
|
|
478
476
|
"aria-invalid": error,
|
|
479
477
|
value: Array.isArray(value) ? value.join(',') : value,
|
|
480
|
-
name: name
|
|
478
|
+
name: name,
|
|
481
479
|
ref: inputRef,
|
|
482
480
|
"aria-hidden": true,
|
|
483
481
|
onChange: handleChange,
|
|
@@ -100,7 +100,6 @@ var TablePaginationSelect = styled(Select, {
|
|
|
100
100
|
textAlign: 'right',
|
|
101
101
|
textAlignLast: 'right' // Align <select> on Chrome.
|
|
102
102
|
}));
|
|
103
|
-
|
|
104
103
|
var TablePaginationMenuItem = styled(MenuItem, {
|
|
105
104
|
name: 'MuiTablePagination',
|
|
106
105
|
slot: 'MenuItem',
|
|
@@ -184,8 +183,11 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
|
|
|
184
183
|
showFirstButton = _props$showFirstButto === void 0 ? false : _props$showFirstButto,
|
|
185
184
|
_props$showLastButton = props.showLastButton,
|
|
186
185
|
showLastButton = _props$showLastButton === void 0 ? false : _props$showLastButton,
|
|
187
|
-
slotProps = props.slotProps,
|
|
188
|
-
|
|
186
|
+
_props$slotProps = props.slotProps,
|
|
187
|
+
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
188
|
+
_props$slots = props.slots,
|
|
189
|
+
slots = _props$slots === void 0 ? {} : _props$slots,
|
|
190
|
+
other = _objectWithoutProperties(props, ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps", "slots"]);
|
|
189
191
|
var ownerState = props;
|
|
190
192
|
var classes = useUtilityClasses(ownerState);
|
|
191
193
|
var selectProps = (_slotProps$select = slotProps == null ? void 0 : slotProps.select) != null ? _slotProps$select : SelectProps;
|
|
@@ -194,7 +196,6 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
|
|
|
194
196
|
if (component === TableCell || component === 'td') {
|
|
195
197
|
colSpan = colSpanProp || 1000; // col-span over everything
|
|
196
198
|
}
|
|
197
|
-
|
|
198
199
|
var selectId = useId(selectProps.id);
|
|
199
200
|
var labelId = useId(selectProps.labelId);
|
|
200
201
|
var getLabelDisplayedRowsTo = function getLabelDisplayedRowsTo() {
|
|
@@ -263,7 +264,8 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
|
|
|
263
264
|
rowsPerPage: rowsPerPage,
|
|
264
265
|
showFirstButton: showFirstButton,
|
|
265
266
|
showLastButton: showLastButton,
|
|
266
|
-
slotProps: slotProps
|
|
267
|
+
slotProps: slotProps.actions,
|
|
268
|
+
slots: slots.actions,
|
|
267
269
|
getItemAriaLabel: getItemAriaLabel,
|
|
268
270
|
disabled: disabled
|
|
269
271
|
})]
|
|
@@ -423,12 +425,33 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
423
425
|
slotProps: PropTypes.shape({
|
|
424
426
|
actions: PropTypes.shape({
|
|
425
427
|
firstButton: PropTypes.object,
|
|
428
|
+
firstButtonIcon: PropTypes.object,
|
|
426
429
|
lastButton: PropTypes.object,
|
|
430
|
+
lastButtonIcon: PropTypes.object,
|
|
427
431
|
nextButton: PropTypes.object,
|
|
428
|
-
|
|
432
|
+
nextButtonIcon: PropTypes.object,
|
|
433
|
+
previousButton: PropTypes.object,
|
|
434
|
+
previousButtonIcon: PropTypes.object
|
|
429
435
|
}),
|
|
430
436
|
select: PropTypes.object
|
|
431
437
|
}),
|
|
438
|
+
/**
|
|
439
|
+
* The components used for each slot inside the TablePagination.
|
|
440
|
+
* Either a string to use a HTML element or a component.
|
|
441
|
+
* @default {}
|
|
442
|
+
*/
|
|
443
|
+
slots: PropTypes.shape({
|
|
444
|
+
actions: PropTypes.shape({
|
|
445
|
+
firstButton: PropTypes.elementType,
|
|
446
|
+
firstButtonIcon: PropTypes.elementType,
|
|
447
|
+
lastButton: PropTypes.elementType,
|
|
448
|
+
lastButtonIcon: PropTypes.elementType,
|
|
449
|
+
nextButton: PropTypes.elementType,
|
|
450
|
+
nextButtonIcon: PropTypes.elementType,
|
|
451
|
+
previousButton: PropTypes.elementType,
|
|
452
|
+
previousButtonIcon: PropTypes.elementType
|
|
453
|
+
})
|
|
454
|
+
}),
|
|
432
455
|
/**
|
|
433
456
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
434
457
|
*/
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _LastPageIcon, _FirstPageIcon, _KeyboardArrowRight, _KeyboardArrowLeft, _KeyboardArrowLeft2, _KeyboardArrowRight2, _FirstPageIcon2, _LastPageIcon2;
|
|
6
5
|
import * as React from 'react';
|
|
7
6
|
import PropTypes from 'prop-types';
|
|
8
7
|
import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
|
|
9
8
|
import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
|
|
10
9
|
import useTheme from '../styles/useTheme';
|
|
11
10
|
import IconButton from '../IconButton';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import LastPageIconDefault from '../internal/svg-icons/LastPage';
|
|
12
|
+
import FirstPageIconDefault from '../internal/svg-icons/FirstPage';
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* @ignore - internal component.
|
|
@@ -18,7 +17,7 @@ import FirstPageIcon from '../internal/svg-icons/FirstPage';
|
|
|
18
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
19
|
var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {
|
|
21
|
-
var
|
|
20
|
+
var _slots$firstButton, _slots$lastButton, _slots$nextButton, _slots$previousButton, _slots$firstButtonIco, _slots$lastButtonIcon, _slots$nextButtonIcon, _slots$previousButton2;
|
|
22
21
|
var backIconButtonProps = props.backIconButtonProps,
|
|
23
22
|
count = props.count,
|
|
24
23
|
_props$disabled = props.disabled,
|
|
@@ -30,8 +29,11 @@ var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginat
|
|
|
30
29
|
rowsPerPage = props.rowsPerPage,
|
|
31
30
|
showFirstButton = props.showFirstButton,
|
|
32
31
|
showLastButton = props.showLastButton,
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
_props$slots = props.slots,
|
|
33
|
+
slots = _props$slots === void 0 ? {} : _props$slots,
|
|
34
|
+
_props$slotProps = props.slotProps,
|
|
35
|
+
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
36
|
+
other = _objectWithoutProperties(props, ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slots", "slotProps"]);
|
|
35
37
|
var theme = useTheme();
|
|
36
38
|
var handleFirstPageButtonClick = function handleFirstPageButtonClick(event) {
|
|
37
39
|
onPageChange(event, 0);
|
|
@@ -45,39 +47,55 @@ var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginat
|
|
|
45
47
|
var handleLastPageButtonClick = function handleLastPageButtonClick(event) {
|
|
46
48
|
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
|
47
49
|
};
|
|
50
|
+
var FirstButton = (_slots$firstButton = slots.firstButton) != null ? _slots$firstButton : IconButton;
|
|
51
|
+
var LastButton = (_slots$lastButton = slots.lastButton) != null ? _slots$lastButton : IconButton;
|
|
52
|
+
var NextButton = (_slots$nextButton = slots.nextButton) != null ? _slots$nextButton : IconButton;
|
|
53
|
+
var PreviousButton = (_slots$previousButton = slots.previousButton) != null ? _slots$previousButton : IconButton;
|
|
54
|
+
var FirstButtonIcon = (_slots$firstButtonIco = slots.firstButtonIcon) != null ? _slots$firstButtonIco : FirstPageIconDefault;
|
|
55
|
+
var LastButtonIcon = (_slots$lastButtonIcon = slots.lastButtonIcon) != null ? _slots$lastButtonIcon : LastPageIconDefault;
|
|
56
|
+
var NextButtonIcon = (_slots$nextButtonIcon = slots.nextButtonIcon) != null ? _slots$nextButtonIcon : KeyboardArrowRight;
|
|
57
|
+
var PreviousButtonIcon = (_slots$previousButton2 = slots.previousButtonIcon) != null ? _slots$previousButton2 : KeyboardArrowLeft;
|
|
58
|
+
var FirstButtonSlot = theme.direction === 'rtl' ? LastButton : FirstButton;
|
|
59
|
+
var PreviousButtonSlot = theme.direction === 'rtl' ? NextButton : PreviousButton;
|
|
60
|
+
var NextButtonSlot = theme.direction === 'rtl' ? PreviousButton : NextButton;
|
|
61
|
+
var LastButtonSlot = theme.direction === 'rtl' ? FirstButton : LastButton;
|
|
62
|
+
var firstButtonSlotProps = theme.direction === 'rtl' ? slotProps.lastButton : slotProps.firstButton;
|
|
63
|
+
var previousButtonSlotProps = theme.direction === 'rtl' ? slotProps.nextButton : slotProps.previousButton;
|
|
64
|
+
var nextButtonSlotProps = theme.direction === 'rtl' ? slotProps.previousButton : slotProps.nextButton;
|
|
65
|
+
var lastButtonSlotProps = theme.direction === 'rtl' ? slotProps.firstButton : slotProps.lastButton;
|
|
48
66
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
49
67
|
ref: ref
|
|
50
68
|
}, other, {
|
|
51
|
-
children: [showFirstButton && /*#__PURE__*/_jsx(
|
|
69
|
+
children: [showFirstButton && /*#__PURE__*/_jsx(FirstButtonSlot, _extends({
|
|
52
70
|
onClick: handleFirstPageButtonClick,
|
|
53
71
|
disabled: disabled || page === 0,
|
|
54
72
|
"aria-label": getItemAriaLabel('first', page),
|
|
55
73
|
title: getItemAriaLabel('first', page)
|
|
56
|
-
},
|
|
57
|
-
children: theme.direction === 'rtl' ?
|
|
58
|
-
})), /*#__PURE__*/_jsx(
|
|
74
|
+
}, firstButtonSlotProps, {
|
|
75
|
+
children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon)) : /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon))
|
|
76
|
+
})), /*#__PURE__*/_jsx(PreviousButtonSlot, _extends({
|
|
59
77
|
onClick: handleBackButtonClick,
|
|
60
78
|
disabled: disabled || page === 0,
|
|
61
79
|
color: "inherit",
|
|
62
80
|
"aria-label": getItemAriaLabel('previous', page),
|
|
63
81
|
title: getItemAriaLabel('previous', page)
|
|
64
|
-
},
|
|
65
|
-
children: theme.direction === 'rtl' ?
|
|
66
|
-
})), /*#__PURE__*/_jsx(
|
|
82
|
+
}, previousButtonSlotProps != null ? previousButtonSlotProps : backIconButtonProps, {
|
|
83
|
+
children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon)) : /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon))
|
|
84
|
+
})), /*#__PURE__*/_jsx(NextButtonSlot, _extends({
|
|
67
85
|
onClick: handleNextButtonClick,
|
|
68
86
|
disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
|
|
69
87
|
color: "inherit",
|
|
70
88
|
"aria-label": getItemAriaLabel('next', page),
|
|
71
89
|
title: getItemAriaLabel('next', page)
|
|
72
|
-
},
|
|
73
|
-
children: theme.direction === 'rtl' ?
|
|
74
|
-
})), showLastButton && /*#__PURE__*/_jsx(
|
|
90
|
+
}, nextButtonSlotProps != null ? nextButtonSlotProps : nextIconButtonProps, {
|
|
91
|
+
children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon)) : /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon))
|
|
92
|
+
})), showLastButton && /*#__PURE__*/_jsx(LastButtonSlot, _extends({
|
|
75
93
|
onClick: handleLastPageButtonClick,
|
|
76
94
|
disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
|
|
77
95
|
"aria-label": getItemAriaLabel('last', page),
|
|
78
96
|
title: getItemAriaLabel('last', page)
|
|
79
|
-
},
|
|
80
|
-
children: theme.direction === 'rtl' ?
|
|
97
|
+
}, lastButtonSlotProps, {
|
|
98
|
+
children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon)) : /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon))
|
|
81
99
|
}))]
|
|
82
100
|
}));
|
|
83
101
|
});
|
|
@@ -138,9 +156,28 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
|
|
|
138
156
|
*/
|
|
139
157
|
slotProps: PropTypes.shape({
|
|
140
158
|
firstButton: PropTypes.object,
|
|
159
|
+
firstButtonIcon: PropTypes.object,
|
|
141
160
|
lastButton: PropTypes.object,
|
|
161
|
+
lastButtonIcon: PropTypes.object,
|
|
142
162
|
nextButton: PropTypes.object,
|
|
143
|
-
|
|
163
|
+
nextButtonIcon: PropTypes.object,
|
|
164
|
+
previousButton: PropTypes.object,
|
|
165
|
+
previousButtonIcon: PropTypes.object
|
|
166
|
+
}),
|
|
167
|
+
/**
|
|
168
|
+
* The components used for each slot inside the TablePaginationActions.
|
|
169
|
+
* Either a string to use a HTML element or a component.
|
|
170
|
+
* @default {}
|
|
171
|
+
*/
|
|
172
|
+
slots: PropTypes.shape({
|
|
173
|
+
firstButton: PropTypes.elementType,
|
|
174
|
+
firstButtonIcon: PropTypes.elementType,
|
|
175
|
+
lastButton: PropTypes.elementType,
|
|
176
|
+
lastButtonIcon: PropTypes.elementType,
|
|
177
|
+
nextButton: PropTypes.elementType,
|
|
178
|
+
nextButtonIcon: PropTypes.elementType,
|
|
179
|
+
previousButton: PropTypes.elementType,
|
|
180
|
+
previousButtonIcon: PropTypes.elementType
|
|
144
181
|
})
|
|
145
182
|
} : void 0;
|
|
146
183
|
export default TablePaginationActions;
|
package/legacy/Tabs/Tabs.js
CHANGED
package/legacy/index.js
CHANGED
package/legacy/locale/index.js
CHANGED
|
@@ -329,7 +329,6 @@ export var azAZ = {
|
|
|
329
329
|
// `${from}–${to} dən ${count !== -1 ? count : `more than ${to}`}`,
|
|
330
330
|
}
|
|
331
331
|
},
|
|
332
|
-
|
|
333
332
|
MuiRating: {
|
|
334
333
|
defaultProps: {
|
|
335
334
|
getLabelText: function getLabelText(value) {
|
|
@@ -569,7 +568,6 @@ export var bgBG = {
|
|
|
569
568
|
// `${from}–${to} от ${count !== -1 ? count : `more than ${to}`}`,
|
|
570
569
|
}
|
|
571
570
|
},
|
|
572
|
-
|
|
573
571
|
MuiRating: {
|
|
574
572
|
defaultProps: {
|
|
575
573
|
getLabelText: function getLabelText(value) {
|
|
@@ -642,7 +640,6 @@ export var caES = {
|
|
|
642
640
|
// `${from}–${to} de ${count !== -1 ? count : `more than ${to}`}`,
|
|
643
641
|
}
|
|
644
642
|
},
|
|
645
|
-
|
|
646
643
|
MuiRating: {
|
|
647
644
|
defaultProps: {
|
|
648
645
|
getLabelText: function getLabelText(value) {
|
|
@@ -688,7 +685,6 @@ export var caES = {
|
|
|
688
685
|
// },
|
|
689
686
|
}
|
|
690
687
|
};
|
|
691
|
-
|
|
692
688
|
export var csCZ = {
|
|
693
689
|
components: {
|
|
694
690
|
MuiBreadcrumbs: {
|
|
@@ -1710,7 +1706,6 @@ export var huHU = {
|
|
|
1710
1706
|
// `${from}–${to} / ${count !== -1 ? count : `more than ${to}`}`,
|
|
1711
1707
|
}
|
|
1712
1708
|
},
|
|
1713
|
-
|
|
1714
1709
|
MuiRating: {
|
|
1715
1710
|
defaultProps: {
|
|
1716
1711
|
getLabelText: function getLabelText(value) {
|
|
@@ -1783,7 +1778,6 @@ export var hyAM = {
|
|
|
1783
1778
|
// `${from}–${to} / ${count !== -1 ? count : `more than ${to}`}`,
|
|
1784
1779
|
}
|
|
1785
1780
|
},
|
|
1786
|
-
|
|
1787
1781
|
MuiRating: {
|
|
1788
1782
|
defaultProps: {
|
|
1789
1783
|
getLabelText: function getLabelText(value) {
|
|
@@ -1829,7 +1823,6 @@ export var hyAM = {
|
|
|
1829
1823
|
// },
|
|
1830
1824
|
}
|
|
1831
1825
|
};
|
|
1832
|
-
|
|
1833
1826
|
export var idID = {
|
|
1834
1827
|
components: {
|
|
1835
1828
|
// MuiBreadcrumbs: {
|
|
@@ -1857,7 +1850,6 @@ export var idID = {
|
|
|
1857
1850
|
// `${from}–${to} dari ${count !== -1 ? count : `more than ${to}`}`,
|
|
1858
1851
|
}
|
|
1859
1852
|
},
|
|
1860
|
-
|
|
1861
1853
|
MuiRating: {
|
|
1862
1854
|
defaultProps: {
|
|
1863
1855
|
getLabelText: function getLabelText(value) {
|
|
@@ -1866,7 +1858,6 @@ export var idID = {
|
|
|
1866
1858
|
// emptyLabelText: 'Empty',
|
|
1867
1859
|
}
|
|
1868
1860
|
},
|
|
1869
|
-
|
|
1870
1861
|
MuiAutocomplete: {
|
|
1871
1862
|
defaultProps: {
|
|
1872
1863
|
clearText: 'Hapus',
|
|
@@ -1904,7 +1895,6 @@ export var idID = {
|
|
|
1904
1895
|
// },
|
|
1905
1896
|
}
|
|
1906
1897
|
};
|
|
1907
|
-
|
|
1908
1898
|
export var isIS = {
|
|
1909
1899
|
components: {
|
|
1910
1900
|
MuiBreadcrumbs: {
|
|
@@ -3322,7 +3312,6 @@ export var roRO = {
|
|
|
3322
3312
|
// `${from}–${to} din ${count !== -1 ? count : `more than ${to}`}`,
|
|
3323
3313
|
}
|
|
3324
3314
|
},
|
|
3325
|
-
|
|
3326
3315
|
MuiRating: {
|
|
3327
3316
|
defaultProps: {
|
|
3328
3317
|
getLabelText: function getLabelText(value) {
|