@mui/material 6.2.1 → 6.3.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/AccordionSummary/AccordionSummary.js +4 -3
- package/AppBar/AppBar.d.ts +1 -1
- package/AppBar/AppBar.js +1 -1
- package/Autocomplete/Autocomplete.js +36 -49
- package/Backdrop/Backdrop.js +1 -9
- package/CHANGELOG.md +77 -0
- package/Collapse/Collapse.js +5 -4
- package/Fade/Fade.js +5 -2
- package/FilledInput/FilledInput.js +1 -3
- 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/selectClasses.d.ts +9 -3
- 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/TableSortLabel/TableSortLabel.d.ts +43 -1
- package/TableSortLabel/TableSortLabel.js +40 -7
- package/Tooltip/Tooltip.js +1 -1
- package/Zoom/Zoom.js +5 -2
- package/index.js +1 -1
- package/modern/AccordionSummary/AccordionSummary.js +4 -3
- package/modern/AppBar/AppBar.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +36 -49
- package/modern/Backdrop/Backdrop.js +1 -9
- package/modern/Collapse/Collapse.js +5 -4
- package/modern/Fade/Fade.js +5 -2
- package/modern/FilledInput/FilledInput.js +1 -3
- 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/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/TableSortLabel/TableSortLabel.js +40 -7
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/Zoom/Zoom.js +5 -2
- package/modern/index.js +1 -1
- package/modern/version/index.js +2 -2
- package/node/AccordionSummary/AccordionSummary.js +4 -3
- package/node/AppBar/AppBar.js +1 -1
- package/node/Autocomplete/Autocomplete.js +36 -49
- package/node/Backdrop/Backdrop.js +1 -9
- package/node/Collapse/Collapse.js +5 -4
- package/node/Fade/Fade.js +5 -2
- package/node/FilledInput/FilledInput.js +1 -3
- 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/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/TableSortLabel/TableSortLabel.js +40 -7
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/Zoom/Zoom.js +5 -2
- package/node/index.js +1 -1
- package/node/version/index.js +2 -2
- package/package.json +6 -6
- package/useAutocomplete/useAutocomplete.d.ts +20 -5
- package/version/index.js +2 -2
|
@@ -18,6 +18,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
18
18
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
19
19
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
20
20
|
var _tableSortLabelClasses = _interopRequireWildcard(require("./tableSortLabelClasses"));
|
|
21
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const useUtilityClasses = ownerState => {
|
|
23
24
|
const {
|
|
@@ -117,6 +118,8 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
|
|
|
117
118
|
direction = 'asc',
|
|
118
119
|
hideSortIcon = false,
|
|
119
120
|
IconComponent = _ArrowDownward.default,
|
|
121
|
+
slots = {},
|
|
122
|
+
slotProps = {},
|
|
120
123
|
...other
|
|
121
124
|
} = props;
|
|
122
125
|
const ownerState = {
|
|
@@ -127,17 +130,31 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
|
|
|
127
130
|
IconComponent
|
|
128
131
|
};
|
|
129
132
|
const classes = useUtilityClasses(ownerState);
|
|
130
|
-
|
|
133
|
+
const externalForwardedProps = {
|
|
134
|
+
slots,
|
|
135
|
+
slotProps
|
|
136
|
+
};
|
|
137
|
+
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
|
138
|
+
elementType: TableSortLabelRoot,
|
|
139
|
+
externalForwardedProps,
|
|
140
|
+
ownerState,
|
|
131
141
|
className: (0, _clsx.default)(classes.root, className),
|
|
132
|
-
|
|
142
|
+
ref
|
|
143
|
+
});
|
|
144
|
+
const [IconSlot, iconProps] = (0, _useSlot.default)('icon', {
|
|
145
|
+
elementType: TableSortLabelIcon,
|
|
146
|
+
externalForwardedProps,
|
|
147
|
+
ownerState,
|
|
148
|
+
className: classes.icon
|
|
149
|
+
});
|
|
150
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
|
|
133
151
|
disableRipple: true,
|
|
134
|
-
|
|
135
|
-
|
|
152
|
+
component: "span",
|
|
153
|
+
...rootProps,
|
|
136
154
|
...other,
|
|
137
|
-
children: [children, hideSortIcon && !active ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
155
|
+
children: [children, hideSortIcon && !active ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(IconSlot, {
|
|
138
156
|
as: IconComponent,
|
|
139
|
-
|
|
140
|
-
ownerState: ownerState
|
|
157
|
+
...iconProps
|
|
141
158
|
})]
|
|
142
159
|
});
|
|
143
160
|
});
|
|
@@ -178,6 +195,22 @@ process.env.NODE_ENV !== "production" ? TableSortLabel.propTypes /* remove-propt
|
|
|
178
195
|
* @default ArrowDownwardIcon
|
|
179
196
|
*/
|
|
180
197
|
IconComponent: _propTypes.default.elementType,
|
|
198
|
+
/**
|
|
199
|
+
* The props used for each slot inside.
|
|
200
|
+
* @default {}
|
|
201
|
+
*/
|
|
202
|
+
slotProps: _propTypes.default.shape({
|
|
203
|
+
icon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
204
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
205
|
+
}),
|
|
206
|
+
/**
|
|
207
|
+
* The components used for each slot inside.
|
|
208
|
+
* @default {}
|
|
209
|
+
*/
|
|
210
|
+
slots: _propTypes.default.shape({
|
|
211
|
+
icon: _propTypes.default.elementType,
|
|
212
|
+
root: _propTypes.default.elementType
|
|
213
|
+
}),
|
|
181
214
|
/**
|
|
182
215
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
183
216
|
*/
|
package/node/Tooltip/Tooltip.js
CHANGED
|
@@ -387,7 +387,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
387
387
|
// eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes
|
|
388
388
|
React.useEffect(() => {
|
|
389
389
|
if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {
|
|
390
|
-
console.
|
|
390
|
+
console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
|
|
391
391
|
}
|
|
392
392
|
}, [title, childNode, isControlled]);
|
|
393
393
|
}
|
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
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.1";
|
|
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("1");
|
|
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.1",
|
|
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.",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^19.0.0",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/core-downloads-tracker": "^6.
|
|
39
|
-
"@mui/
|
|
40
|
-
"@mui/
|
|
41
|
-
"@mui/
|
|
38
|
+
"@mui/core-downloads-tracker": "^6.3.1",
|
|
39
|
+
"@mui/types": "^7.2.21",
|
|
40
|
+
"@mui/system": "^6.3.1",
|
|
41
|
+
"@mui/utils": "^6.3.1"
|
|
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.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@types/react": {
|
|
@@ -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;
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.
|
|
1
|
+
export const version = "6.3.1";
|
|
2
2
|
export const major = Number("6");
|
|
3
|
-
export const minor = Number("
|
|
3
|
+
export const minor = Number("3");
|
|
4
4
|
export const patch = Number("1");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|