@mui/material 6.2.0 → 6.3.0
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/AccordionSummary/AccordionSummary.js +4 -3
- package/Autocomplete/Autocomplete.js +7 -7
- package/AvatarGroup/AvatarGroup.js +5 -4
- package/Backdrop/Backdrop.js +1 -9
- package/CHANGELOG.md +76 -0
- package/CardHeader/CardHeader.js +7 -5
- package/Collapse/Collapse.js +5 -4
- package/Fade/Fade.js +5 -2
- package/FilledInput/FilledInput.js +1 -3
- package/FormControl/FormControl.js +5 -8
- package/FormLabel/FormLabel.js +5 -8
- package/Grow/Grow.js +5 -2
- package/Icon/Icon.js +1 -3
- package/Input/Input.js +1 -3
- package/OutlinedInput/OutlinedInput.js +1 -3
- package/Select/SelectInput.js +8 -0
- package/Slide/Slide.js +5 -2
- package/StepContent/StepContent.d.ts +31 -2
- package/StepContent/StepContent.js +39 -7
- package/StepLabel/StepLabel.js +1 -3
- package/SvgIcon/SvgIcon.js +1 -3
- package/TablePagination/TablePagination.d.ts +134 -18
- package/TablePagination/TablePagination.js +89 -33
- package/TextField/TextField.d.ts +1 -0
- package/TextField/TextField.js +1 -0
- package/Zoom/Zoom.js +5 -2
- package/index.js +1 -1
- package/modern/AccordionSummary/AccordionSummary.js +4 -3
- package/modern/Autocomplete/Autocomplete.js +7 -7
- package/modern/AvatarGroup/AvatarGroup.js +5 -4
- package/modern/Backdrop/Backdrop.js +1 -9
- package/modern/CardHeader/CardHeader.js +7 -5
- package/modern/Collapse/Collapse.js +5 -4
- package/modern/Fade/Fade.js +5 -2
- package/modern/FilledInput/FilledInput.js +1 -3
- package/modern/FormControl/FormControl.js +5 -8
- package/modern/FormLabel/FormLabel.js +5 -8
- package/modern/Grow/Grow.js +5 -2
- package/modern/Icon/Icon.js +1 -3
- package/modern/Input/Input.js +1 -3
- package/modern/OutlinedInput/OutlinedInput.js +1 -3
- package/modern/Select/SelectInput.js +8 -0
- package/modern/Slide/Slide.js +5 -2
- package/modern/StepContent/StepContent.js +39 -7
- package/modern/StepLabel/StepLabel.js +1 -3
- package/modern/SvgIcon/SvgIcon.js +1 -3
- package/modern/TablePagination/TablePagination.js +89 -33
- package/modern/TextField/TextField.js +1 -0
- package/modern/Zoom/Zoom.js +5 -2
- package/modern/index.js +1 -1
- package/modern/usePagination/usePagination.js +1 -1
- package/modern/version/index.js +2 -2
- package/node/AccordionSummary/AccordionSummary.js +4 -3
- package/node/Autocomplete/Autocomplete.js +7 -7
- package/node/AvatarGroup/AvatarGroup.js +5 -4
- package/node/Backdrop/Backdrop.js +1 -9
- package/node/CardHeader/CardHeader.js +7 -5
- package/node/Collapse/Collapse.js +5 -4
- package/node/Fade/Fade.js +5 -2
- package/node/FilledInput/FilledInput.js +1 -3
- package/node/FormControl/FormControl.js +5 -8
- package/node/FormLabel/FormLabel.js +5 -8
- package/node/Grow/Grow.js +5 -2
- package/node/Icon/Icon.js +1 -3
- package/node/Input/Input.js +1 -3
- package/node/OutlinedInput/OutlinedInput.js +1 -3
- package/node/Select/SelectInput.js +8 -0
- package/node/Slide/Slide.js +5 -2
- package/node/StepContent/StepContent.js +39 -7
- package/node/StepLabel/StepLabel.js +1 -3
- package/node/SvgIcon/SvgIcon.js +1 -3
- package/node/TablePagination/TablePagination.js +89 -33
- package/node/TextField/TextField.js +1 -0
- package/node/Zoom/Zoom.js +5 -2
- package/node/index.js +1 -1
- package/node/usePagination/usePagination.js +1 -1
- package/node/version/index.js +2 -2
- package/package.json +7 -7
- package/styles/useThemeProps.d.ts +27 -0
- package/useAutocomplete/useAutocomplete.d.ts +20 -5
- package/usePagination/usePagination.js +1 -1
- package/version/index.js +2 -2
|
@@ -39,14 +39,11 @@ const useUtilityClasses = ownerState => {
|
|
|
39
39
|
const FormLabelRoot = exports.FormLabelRoot = (0, _zeroStyled.styled)('label', {
|
|
40
40
|
name: 'MuiFormLabel',
|
|
41
41
|
slot: 'Root',
|
|
42
|
-
overridesResolver: ({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
...(ownerState.color === 'secondary' && styles.colorSecondary),
|
|
48
|
-
...(ownerState.filled && styles.filled)
|
|
49
|
-
};
|
|
42
|
+
overridesResolver: (props, styles) => {
|
|
43
|
+
const {
|
|
44
|
+
ownerState
|
|
45
|
+
} = props;
|
|
46
|
+
return [styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled];
|
|
50
47
|
}
|
|
51
48
|
})((0, _memoTheme.default)(({
|
|
52
49
|
theme
|
package/node/Grow/Grow.js
CHANGED
|
@@ -170,7 +170,10 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
170
170
|
addEndListener: handleAddEndListener,
|
|
171
171
|
timeout: timeout === 'auto' ? null : timeout,
|
|
172
172
|
...other,
|
|
173
|
-
children: (state,
|
|
173
|
+
children: (state, {
|
|
174
|
+
ownerState,
|
|
175
|
+
...restChildProps
|
|
176
|
+
}) => {
|
|
174
177
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
175
178
|
style: {
|
|
176
179
|
opacity: 0,
|
|
@@ -181,7 +184,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
181
184
|
...children.props.style
|
|
182
185
|
},
|
|
183
186
|
ref: handleRef,
|
|
184
|
-
...
|
|
187
|
+
...restChildProps
|
|
185
188
|
});
|
|
186
189
|
}
|
|
187
190
|
});
|
package/node/Icon/Icon.js
CHANGED
|
@@ -188,7 +188,5 @@ process.env.NODE_ENV !== "production" ? Icon.propTypes /* remove-proptypes */ =
|
|
|
188
188
|
*/
|
|
189
189
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
190
190
|
} : void 0;
|
|
191
|
-
|
|
192
|
-
Icon.muiName = 'Icon';
|
|
193
|
-
}
|
|
191
|
+
Icon.muiName = 'Icon';
|
|
194
192
|
var _default = exports.default = Icon;
|
package/node/Input/Input.js
CHANGED
|
@@ -364,7 +364,5 @@ process.env.NODE_ENV !== "production" ? Input.propTypes /* remove-proptypes */ =
|
|
|
364
364
|
*/
|
|
365
365
|
value: _propTypes.default.any
|
|
366
366
|
} : void 0;
|
|
367
|
-
|
|
368
|
-
Input.muiName = 'Input';
|
|
369
|
-
}
|
|
367
|
+
Input.muiName = 'Input';
|
|
370
368
|
var _default = exports.default = Input;
|
|
@@ -413,7 +413,5 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
|
|
|
413
413
|
*/
|
|
414
414
|
value: _propTypes.default.any
|
|
415
415
|
} : void 0;
|
|
416
|
-
|
|
417
|
-
OutlinedInput.muiName = 'Input';
|
|
418
|
-
}
|
|
416
|
+
OutlinedInput.muiName = 'Input';
|
|
419
417
|
var _default = exports.default = OutlinedInput;
|
|
@@ -140,6 +140,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
140
140
|
open: openProp,
|
|
141
141
|
readOnly,
|
|
142
142
|
renderValue,
|
|
143
|
+
required,
|
|
143
144
|
SelectDisplayProps = {},
|
|
144
145
|
tabIndex: tabIndexProp,
|
|
145
146
|
// catching `type` from Input which makes no sense for SelectInput
|
|
@@ -456,6 +457,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
456
457
|
"aria-label": ariaLabel,
|
|
457
458
|
"aria-labelledby": [labelId, buttonId].filter(Boolean).join(' ') || undefined,
|
|
458
459
|
"aria-describedby": ariaDescribedby,
|
|
460
|
+
"aria-required": required ? 'true' : undefined,
|
|
461
|
+
"aria-invalid": error ? 'true' : undefined,
|
|
459
462
|
onKeyDown: handleKeyDown,
|
|
460
463
|
onMouseDown: disabled || readOnly ? null : handleMouseDown,
|
|
461
464
|
onBlur: handleBlur,
|
|
@@ -483,6 +486,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
483
486
|
disabled: disabled,
|
|
484
487
|
className: classes.nativeInput,
|
|
485
488
|
autoFocus: autoFocus,
|
|
489
|
+
required: required,
|
|
486
490
|
...other,
|
|
487
491
|
ownerState: ownerState
|
|
488
492
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectIcon, {
|
|
@@ -648,6 +652,10 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
|
|
|
648
652
|
* @returns {ReactNode}
|
|
649
653
|
*/
|
|
650
654
|
renderValue: _propTypes.default.func,
|
|
655
|
+
/**
|
|
656
|
+
* If `true`, the component is required.
|
|
657
|
+
*/
|
|
658
|
+
required: _propTypes.default.bool,
|
|
651
659
|
/**
|
|
652
660
|
* Props applied to the clickable div element.
|
|
653
661
|
*/
|
package/node/Slide/Slide.js
CHANGED
|
@@ -224,7 +224,10 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
224
224
|
in: inProp,
|
|
225
225
|
timeout: timeout,
|
|
226
226
|
...other,
|
|
227
|
-
children: (state,
|
|
227
|
+
children: (state, {
|
|
228
|
+
ownerState,
|
|
229
|
+
...restChildProps
|
|
230
|
+
}) => {
|
|
228
231
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
229
232
|
ref: handleRef,
|
|
230
233
|
style: {
|
|
@@ -232,7 +235,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
232
235
|
...style,
|
|
233
236
|
...children.props.style
|
|
234
237
|
},
|
|
235
|
-
...
|
|
238
|
+
...restChildProps
|
|
236
239
|
});
|
|
237
240
|
}
|
|
238
241
|
});
|
|
@@ -18,6 +18,7 @@ var _Collapse = _interopRequireDefault(require("../Collapse"));
|
|
|
18
18
|
var _StepperContext = _interopRequireDefault(require("../Stepper/StepperContext"));
|
|
19
19
|
var _StepContext = _interopRequireDefault(require("../Step/StepContext"));
|
|
20
20
|
var _stepContentClasses = require("./stepContentClasses");
|
|
21
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const useUtilityClasses = ownerState => {
|
|
23
24
|
const {
|
|
@@ -73,6 +74,8 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
73
74
|
TransitionComponent = _Collapse.default,
|
|
74
75
|
transitionDuration: transitionDurationProp = 'auto',
|
|
75
76
|
TransitionProps,
|
|
77
|
+
slots = {},
|
|
78
|
+
slotProps = {},
|
|
76
79
|
...other
|
|
77
80
|
} = props;
|
|
78
81
|
const {
|
|
@@ -97,19 +100,32 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
97
100
|
if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
|
|
98
101
|
transitionDuration = undefined;
|
|
99
102
|
}
|
|
103
|
+
const externalForwardedProps = {
|
|
104
|
+
slots,
|
|
105
|
+
slotProps: {
|
|
106
|
+
transition: TransitionProps,
|
|
107
|
+
...slotProps
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const [TransitionSlot, transitionProps] = (0, _useSlot.default)('transition', {
|
|
111
|
+
elementType: StepContentTransition,
|
|
112
|
+
externalForwardedProps,
|
|
113
|
+
ownerState,
|
|
114
|
+
className: classes.transition,
|
|
115
|
+
additionalProps: {
|
|
116
|
+
in: active || expanded,
|
|
117
|
+
timeout: transitionDuration,
|
|
118
|
+
unmountOnExit: true
|
|
119
|
+
}
|
|
120
|
+
});
|
|
100
121
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StepContentRoot, {
|
|
101
122
|
className: (0, _clsx.default)(classes.root, className),
|
|
102
123
|
ref: ref,
|
|
103
124
|
ownerState: ownerState,
|
|
104
125
|
...other,
|
|
105
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
126
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionSlot, {
|
|
106
127
|
as: TransitionComponent,
|
|
107
|
-
|
|
108
|
-
className: classes.transition,
|
|
109
|
-
ownerState: ownerState,
|
|
110
|
-
timeout: transitionDuration,
|
|
111
|
-
unmountOnExit: true,
|
|
112
|
-
...TransitionProps,
|
|
128
|
+
...transitionProps,
|
|
113
129
|
children: children
|
|
114
130
|
})
|
|
115
131
|
});
|
|
@@ -131,6 +147,20 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
|
|
|
131
147
|
* @ignore
|
|
132
148
|
*/
|
|
133
149
|
className: _propTypes.default.string,
|
|
150
|
+
/**
|
|
151
|
+
* The props used for each slot inside.
|
|
152
|
+
* @default {}
|
|
153
|
+
*/
|
|
154
|
+
slotProps: _propTypes.default.shape({
|
|
155
|
+
transition: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
156
|
+
}),
|
|
157
|
+
/**
|
|
158
|
+
* The components used for each slot inside.
|
|
159
|
+
* @default {}
|
|
160
|
+
*/
|
|
161
|
+
slots: _propTypes.default.shape({
|
|
162
|
+
transition: _propTypes.default.elementType
|
|
163
|
+
}),
|
|
134
164
|
/**
|
|
135
165
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
136
166
|
*/
|
|
@@ -139,6 +169,7 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
|
|
|
139
169
|
* The component used for the transition.
|
|
140
170
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
141
171
|
* @default Collapse
|
|
172
|
+
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
142
173
|
*/
|
|
143
174
|
TransitionComponent: _propTypes.default.elementType,
|
|
144
175
|
/**
|
|
@@ -156,6 +187,7 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
|
|
|
156
187
|
/**
|
|
157
188
|
* Props applied to the transition element.
|
|
158
189
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
190
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
159
191
|
*/
|
|
160
192
|
TransitionProps: _propTypes.default.object
|
|
161
193
|
} : void 0;
|
|
@@ -274,7 +274,5 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
274
274
|
*/
|
|
275
275
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
276
276
|
} : void 0;
|
|
277
|
-
|
|
278
|
-
StepLabel.muiName = 'StepLabel';
|
|
279
|
-
}
|
|
277
|
+
StepLabel.muiName = 'StepLabel';
|
|
280
278
|
var _default = exports.default = StepLabel;
|
package/node/SvgIcon/SvgIcon.js
CHANGED
|
@@ -237,7 +237,5 @@ process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */
|
|
|
237
237
|
*/
|
|
238
238
|
viewBox: _propTypes.default.string
|
|
239
239
|
} : void 0;
|
|
240
|
-
|
|
241
|
-
SvgIcon.muiName = 'SvgIcon';
|
|
242
|
-
}
|
|
240
|
+
SvgIcon.muiName = 'SvgIcon';
|
|
243
241
|
var _default = exports.default = SvgIcon;
|
|
@@ -14,7 +14,6 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
14
14
|
var _integerPropType = _interopRequireDefault(require("@mui/utils/integerPropType"));
|
|
15
15
|
var _chainPropTypes = _interopRequireDefault(require("@mui/utils/chainPropTypes"));
|
|
16
16
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
17
|
-
var _isHostComponent = _interopRequireDefault(require("../utils/isHostComponent"));
|
|
18
17
|
var _zeroStyled = require("../zero-styled");
|
|
19
18
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
20
19
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
@@ -26,6 +25,7 @@ var _Toolbar = _interopRequireDefault(require("../Toolbar"));
|
|
|
26
25
|
var _TablePaginationActions = _interopRequireDefault(require("./TablePaginationActions"));
|
|
27
26
|
var _useId = _interopRequireDefault(require("../utils/useId"));
|
|
28
27
|
var _tablePaginationClasses = _interopRequireWildcard(require("./tablePaginationClasses"));
|
|
28
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
29
29
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
30
|
var _InputBase;
|
|
31
31
|
const TablePaginationRoot = (0, _zeroStyled.styled)(_TableCell.default, {
|
|
@@ -161,7 +161,6 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
|
|
|
161
161
|
const {
|
|
162
162
|
ActionsComponent = _TablePaginationActions.default,
|
|
163
163
|
backIconButtonProps,
|
|
164
|
-
className,
|
|
165
164
|
colSpan: colSpanProp,
|
|
166
165
|
component = _TableCell.default,
|
|
167
166
|
count,
|
|
@@ -198,22 +197,73 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
|
|
|
198
197
|
}
|
|
199
198
|
return rowsPerPage === -1 ? count : Math.min(count, (page + 1) * rowsPerPage);
|
|
200
199
|
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
200
|
+
const externalForwardedProps = {
|
|
201
|
+
slots,
|
|
202
|
+
slotProps
|
|
203
|
+
};
|
|
204
|
+
const [RootSlot, rootSlotProps] = (0, _useSlot.default)('root', {
|
|
205
|
+
ref,
|
|
206
|
+
className: classes.root,
|
|
207
|
+
elementType: TablePaginationRoot,
|
|
208
|
+
externalForwardedProps: {
|
|
209
|
+
...externalForwardedProps,
|
|
210
|
+
component,
|
|
211
|
+
...other
|
|
212
|
+
},
|
|
213
|
+
ownerState,
|
|
214
|
+
additionalProps: {
|
|
215
|
+
colSpan
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
const [ToolbarSlot, toolbarSlotProps] = (0, _useSlot.default)('toolbar', {
|
|
219
|
+
className: classes.toolbar,
|
|
220
|
+
elementType: TablePaginationToolbar,
|
|
221
|
+
externalForwardedProps,
|
|
222
|
+
ownerState
|
|
223
|
+
});
|
|
224
|
+
const [SpacerSlot, spacerSlotProps] = (0, _useSlot.default)('spacer', {
|
|
225
|
+
className: classes.spacer,
|
|
226
|
+
elementType: TablePaginationSpacer,
|
|
227
|
+
externalForwardedProps,
|
|
228
|
+
ownerState
|
|
229
|
+
});
|
|
230
|
+
const [SelectLabelSlot, selectLabelSlotProps] = (0, _useSlot.default)('selectLabel', {
|
|
231
|
+
className: classes.selectLabel,
|
|
232
|
+
elementType: TablePaginationSelectLabel,
|
|
233
|
+
externalForwardedProps,
|
|
234
|
+
ownerState,
|
|
235
|
+
additionalProps: {
|
|
236
|
+
id: labelId
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
const [SelectSlot, selectSlotProps] = (0, _useSlot.default)('select', {
|
|
240
|
+
className: classes.select,
|
|
241
|
+
elementType: TablePaginationSelect,
|
|
242
|
+
externalForwardedProps,
|
|
243
|
+
ownerState
|
|
244
|
+
});
|
|
245
|
+
const [MenuItemSlot, menuItemSlotProps] = (0, _useSlot.default)('menuItem', {
|
|
246
|
+
className: classes.menuItem,
|
|
247
|
+
elementType: MenuItemComponent,
|
|
248
|
+
externalForwardedProps,
|
|
249
|
+
ownerState
|
|
250
|
+
});
|
|
251
|
+
const [DisplayedRows, displayedRowsProps] = (0, _useSlot.default)('displayedRows', {
|
|
252
|
+
className: classes.displayedRows,
|
|
253
|
+
elementType: TablePaginationDisplayedRows,
|
|
254
|
+
externalForwardedProps,
|
|
255
|
+
ownerState
|
|
256
|
+
});
|
|
257
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RootSlot, {
|
|
258
|
+
...rootSlotProps,
|
|
259
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ToolbarSlot, {
|
|
260
|
+
...toolbarSlotProps,
|
|
261
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SpacerSlot, {
|
|
262
|
+
...spacerSlotProps
|
|
263
|
+
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectLabelSlot, {
|
|
264
|
+
...selectLabelSlotProps,
|
|
215
265
|
children: labelRowsPerPage
|
|
216
|
-
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
266
|
+
}), rowsPerPageOptions.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectSlot, {
|
|
217
267
|
variant: "standard",
|
|
218
268
|
...(!selectProps.variant && {
|
|
219
269
|
input: _InputBase || (_InputBase = /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase2.default, {}))
|
|
@@ -232,16 +282,14 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
|
|
|
232
282
|
icon: (0, _clsx.default)(classes.selectIcon, (selectProps.classes || {}).icon)
|
|
233
283
|
},
|
|
234
284
|
disabled: disabled,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}),
|
|
239
|
-
className: classes.menuItem,
|
|
285
|
+
...selectSlotProps,
|
|
286
|
+
children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/(0, _react.createElement)(MenuItemSlot, {
|
|
287
|
+
...menuItemSlotProps,
|
|
240
288
|
key: rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption,
|
|
241
289
|
value: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption
|
|
242
290
|
}, rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption))
|
|
243
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
244
|
-
|
|
291
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DisplayedRows, {
|
|
292
|
+
...displayedRowsProps,
|
|
245
293
|
children: labelDisplayedRows({
|
|
246
294
|
from: count === 0 ? 0 : page * rowsPerPage + 1,
|
|
247
295
|
to: getLabelDisplayedRowsTo(),
|
|
@@ -288,10 +336,6 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
288
336
|
* Override or extend the styles applied to the component.
|
|
289
337
|
*/
|
|
290
338
|
classes: _propTypes.default.object,
|
|
291
|
-
/**
|
|
292
|
-
* @ignore
|
|
293
|
-
*/
|
|
294
|
-
className: _propTypes.default.string,
|
|
295
339
|
/**
|
|
296
340
|
* @ignore
|
|
297
341
|
*/
|
|
@@ -415,7 +459,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
415
459
|
*/
|
|
416
460
|
showLastButton: _propTypes.default.bool,
|
|
417
461
|
/**
|
|
418
|
-
* The props used for each slot inside
|
|
462
|
+
* The props used for each slot inside.
|
|
419
463
|
* @default {}
|
|
420
464
|
*/
|
|
421
465
|
slotProps: _propTypes.default.shape({
|
|
@@ -429,11 +473,16 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
429
473
|
previousButton: _propTypes.default.object,
|
|
430
474
|
previousButtonIcon: _propTypes.default.object
|
|
431
475
|
}),
|
|
432
|
-
|
|
476
|
+
displayedRows: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
477
|
+
menuItem: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
478
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
479
|
+
select: _propTypes.default.object,
|
|
480
|
+
selectLabel: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
481
|
+
spacer: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
482
|
+
toolbar: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
433
483
|
}),
|
|
434
484
|
/**
|
|
435
|
-
* The components used for each slot inside
|
|
436
|
-
* Either a string to use a HTML element or a component.
|
|
485
|
+
* The components used for each slot inside.
|
|
437
486
|
* @default {}
|
|
438
487
|
*/
|
|
439
488
|
slots: _propTypes.default.shape({
|
|
@@ -446,7 +495,14 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
446
495
|
nextButtonIcon: _propTypes.default.elementType,
|
|
447
496
|
previousButton: _propTypes.default.elementType,
|
|
448
497
|
previousButtonIcon: _propTypes.default.elementType
|
|
449
|
-
})
|
|
498
|
+
}),
|
|
499
|
+
displayedRows: _propTypes.default.elementType,
|
|
500
|
+
menuItem: _propTypes.default.elementType,
|
|
501
|
+
root: _propTypes.default.elementType,
|
|
502
|
+
select: _propTypes.default.elementType,
|
|
503
|
+
selectLabel: _propTypes.default.elementType,
|
|
504
|
+
spacer: _propTypes.default.elementType,
|
|
505
|
+
toolbar: _propTypes.default.elementType
|
|
450
506
|
}),
|
|
451
507
|
/**
|
|
452
508
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
@@ -407,6 +407,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
407
407
|
SelectProps: _propTypes.default.object,
|
|
408
408
|
/**
|
|
409
409
|
* The size of the component.
|
|
410
|
+
* @default 'medium'
|
|
410
411
|
*/
|
|
411
412
|
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
|
|
412
413
|
/**
|
package/node/Zoom/Zoom.js
CHANGED
|
@@ -121,7 +121,10 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
121
121
|
addEndListener: handleAddEndListener,
|
|
122
122
|
timeout: timeout,
|
|
123
123
|
...other,
|
|
124
|
-
children: (state,
|
|
124
|
+
children: (state, {
|
|
125
|
+
ownerState,
|
|
126
|
+
...restChildProps
|
|
127
|
+
}) => {
|
|
125
128
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
126
129
|
style: {
|
|
127
130
|
transform: 'scale(0)',
|
|
@@ -131,7 +134,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
131
134
|
...children.props.style
|
|
132
135
|
},
|
|
133
136
|
ref: handleRef,
|
|
134
|
-
...
|
|
137
|
+
...restChildProps
|
|
135
138
|
});
|
|
136
139
|
}
|
|
137
140
|
});
|
package/node/index.js
CHANGED
|
@@ -101,7 +101,7 @@ function usePagination(props = {}) {
|
|
|
101
101
|
page: item,
|
|
102
102
|
selected: item === page,
|
|
103
103
|
disabled,
|
|
104
|
-
'aria-current': item === page ? '
|
|
104
|
+
'aria-current': item === page ? 'page' : undefined
|
|
105
105
|
} : {
|
|
106
106
|
onClick: event => {
|
|
107
107
|
handleClick(event, buttonPage(item));
|
package/node/version/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
|
|
7
|
-
const version = exports.version = "6.
|
|
7
|
+
const version = exports.version = "6.3.0";
|
|
8
8
|
const major = exports.major = Number("6");
|
|
9
|
-
const minor = exports.minor = Number("
|
|
9
|
+
const minor = exports.minor = Number("3");
|
|
10
10
|
const patch = exports.patch = Number("0");
|
|
11
11
|
const prerelease = exports.prerelease = undefined;
|
|
12
12
|
var _default = exports.default = version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.26.0",
|
|
31
31
|
"@popperjs/core": "^2.11.8",
|
|
32
|
-
"@types/react-transition-group": "^4.4.
|
|
32
|
+
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
34
34
|
"csstype": "^3.1.3",
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^19.0.0",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/utils": "^6.
|
|
40
|
-
"@mui/
|
|
41
|
-
"@mui/
|
|
38
|
+
"@mui/types": "^7.2.20",
|
|
39
|
+
"@mui/utils": "^6.3.0",
|
|
40
|
+
"@mui/system": "^6.3.0",
|
|
41
|
+
"@mui/core-downloads-tracker": "^6.3.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
47
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@mui/material-pigment-css": "^6.
|
|
49
|
+
"@mui/material-pigment-css": "^6.3.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@types/react": {
|
|
@@ -11,6 +11,33 @@ export type ThemedProps<Theme, Name extends keyof any> = Theme extends {
|
|
|
11
11
|
? Props
|
|
12
12
|
: {};
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Merges input `props` with the `defaultProps` for a component that were defined in the theme.
|
|
16
|
+
*
|
|
17
|
+
* The `defaultProps` are defined in the theme under `theme.components[componentName].defaultProps`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const createTheme = () => ({
|
|
23
|
+
* components: {
|
|
24
|
+
* MuiStat: {
|
|
25
|
+
* defaultProps: {
|
|
26
|
+
* variant: 'outlined',
|
|
27
|
+
* },
|
|
28
|
+
* },
|
|
29
|
+
* },
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* function Stat(props) {
|
|
33
|
+
* const themeProps = useThemeProps({ props, name: 'MuiStat' });
|
|
34
|
+
* return <div {...themeProps} />;
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @param params.props The input props
|
|
39
|
+
* @param params.name The name of the component as defined in the theme
|
|
40
|
+
*/
|
|
14
41
|
export default function useThemeProps<
|
|
15
42
|
Theme extends ThemeWithProps,
|
|
16
43
|
Props,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { PartiallyRequired } from '@mui/types';
|
|
2
3
|
|
|
3
4
|
export interface CreateFilterOptionsConfig<Value> {
|
|
4
5
|
ignoreAccents?: boolean;
|
|
@@ -178,7 +179,7 @@ export interface UseAutocompleteProps<
|
|
|
178
179
|
* If provided, the options will be grouped under the returned string.
|
|
179
180
|
* The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
|
|
180
181
|
*
|
|
181
|
-
* @param {Value}
|
|
182
|
+
* @param {Value} option The Autocomplete option.
|
|
182
183
|
* @returns {string}
|
|
183
184
|
*/
|
|
184
185
|
groupBy?: (option: Value) => string;
|
|
@@ -359,8 +360,19 @@ export function useAutocomplete<
|
|
|
359
360
|
DisableClearable extends boolean | undefined = false,
|
|
360
361
|
FreeSolo extends boolean | undefined = false,
|
|
361
362
|
>(
|
|
362
|
-
props:
|
|
363
|
-
|
|
363
|
+
props: PartiallyRequired<
|
|
364
|
+
UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo>,
|
|
365
|
+
'groupBy'
|
|
366
|
+
>,
|
|
367
|
+
): UseAutocompleteReturnValue<Value, Multiple, DisableClearable, FreeSolo, true>;
|
|
368
|
+
export function useAutocomplete<
|
|
369
|
+
Value,
|
|
370
|
+
Multiple extends boolean | undefined = false,
|
|
371
|
+
DisableClearable extends boolean | undefined = false,
|
|
372
|
+
FreeSolo extends boolean | undefined = false,
|
|
373
|
+
>(
|
|
374
|
+
props: Omit<UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo>, 'groupBy'>,
|
|
375
|
+
): UseAutocompleteReturnValue<Value, Multiple, DisableClearable, FreeSolo, false>;
|
|
364
376
|
|
|
365
377
|
export interface UseAutocompleteRenderedOption<Value> {
|
|
366
378
|
option: Value;
|
|
@@ -372,6 +384,7 @@ export interface UseAutocompleteReturnValue<
|
|
|
372
384
|
Multiple extends boolean | undefined = false,
|
|
373
385
|
DisableClearable extends boolean | undefined = false,
|
|
374
386
|
FreeSolo extends boolean | undefined = false,
|
|
387
|
+
HasGroupBy extends boolean = false,
|
|
375
388
|
> {
|
|
376
389
|
/**
|
|
377
390
|
* Resolver for the root slot's props.
|
|
@@ -460,9 +473,11 @@ export interface UseAutocompleteReturnValue<
|
|
|
460
473
|
*/
|
|
461
474
|
focusedTag: number;
|
|
462
475
|
/**
|
|
463
|
-
* The options to render.
|
|
476
|
+
* The options to render.
|
|
477
|
+
* - If `groupBy` is provided, the options are grouped and represented as `AutocompleteGroupedOption<Value>[]`.
|
|
478
|
+
* - Otherwise, the options are represented as a flat array of `Value[]`.
|
|
464
479
|
*/
|
|
465
|
-
groupedOptions: Value[]
|
|
480
|
+
groupedOptions: HasGroupBy extends true ? AutocompleteGroupedOption<Value>[] : Value[];
|
|
466
481
|
}
|
|
467
482
|
|
|
468
483
|
export default useAutocomplete;
|
|
@@ -95,7 +95,7 @@ export default function usePagination(props = {}) {
|
|
|
95
95
|
page: item,
|
|
96
96
|
selected: item === page,
|
|
97
97
|
disabled,
|
|
98
|
-
'aria-current': item === page ? '
|
|
98
|
+
'aria-current': item === page ? 'page' : undefined
|
|
99
99
|
} : {
|
|
100
100
|
onClick: event => {
|
|
101
101
|
handleClick(event, buttonPage(item));
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.
|
|
1
|
+
export const version = "6.3.0";
|
|
2
2
|
export const major = Number("6");
|
|
3
|
-
export const minor = Number("
|
|
3
|
+
export const minor = Number("3");
|
|
4
4
|
export const patch = Number("0");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|