@mui/material 9.1.2 → 9.2.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/ButtonBase/ButtonBase.js +1 -1
- package/ButtonBase/ButtonBase.mjs +1 -1
- package/CHANGELOG.md +41 -3
- package/ClickAwayListener/ClickAwayListener.js +1 -1
- package/ClickAwayListener/ClickAwayListener.mjs +1 -1
- package/ListItem/ListItem.d.mts +2 -1
- package/ListItem/ListItem.d.ts +2 -1
- package/ListItem/ListItem.js +1 -1
- package/ListItem/ListItem.mjs +1 -1
- package/Rating/Rating.js +2 -2
- package/Rating/Rating.mjs +2 -2
- package/Select/SelectInput.js +3 -0
- package/Select/SelectInput.mjs +3 -0
- package/Stack/Stack.d.mts +1 -1
- package/Stack/Stack.d.ts +1 -1
- package/Stack/Stack.js +1 -1
- package/Stack/Stack.mjs +1 -1
- package/Tooltip/Tooltip.js +2 -2
- package/Tooltip/Tooltip.mjs +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/SwitchBase.js +1 -1
- package/internal/SwitchBase.mjs +1 -1
- package/locale/zhCN.js +21 -0
- package/locale/zhCN.mjs +21 -0
- package/package.json +5 -5
- package/useScrollTrigger/useScrollTrigger.js +1 -1
- package/useScrollTrigger/useScrollTrigger.mjs +1 -1
- package/utils/types.d.mts +1 -1
- package/utils/types.d.ts +1 -1
- package/version/index.js +3 -3
- package/version/index.mjs +3 -3
package/ButtonBase/ButtonBase.js
CHANGED
|
@@ -227,7 +227,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
227
227
|
}
|
|
228
228
|
}, false);
|
|
229
229
|
const handleFocus = (0, _useEventCallback.default)(event => {
|
|
230
|
-
// Fix for https://github.com/
|
|
230
|
+
// Fix for https://github.com/react/react/issues/7769
|
|
231
231
|
if (!buttonRef.current) {
|
|
232
232
|
buttonRef.current = event.currentTarget;
|
|
233
233
|
}
|
|
@@ -220,7 +220,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
220
220
|
}
|
|
221
221
|
}, false);
|
|
222
222
|
const handleFocus = useEventCallback(event => {
|
|
223
|
-
// Fix for https://github.com/
|
|
223
|
+
// Fix for https://github.com/react/react/issues/7769
|
|
224
224
|
if (!buttonRef.current) {
|
|
225
225
|
buttonRef.current = event.currentTarget;
|
|
226
226
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# [Versions](https://mui.com/material-ui/getting-started/versions/)
|
|
2
2
|
|
|
3
|
+
## 9.2.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v9.1.2..master -->
|
|
6
|
+
|
|
7
|
+
_Jul 2, 2026_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 9 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
- ⚙️ Add support for [`data-*` attributes on `slotProps`](https://mui.com/material-ui/guides/typescript/#allowing-data-attributes-on-slotprops).
|
|
12
|
+
|
|
13
|
+
### `@mui/material@9.1.3`
|
|
14
|
+
|
|
15
|
+
- [l10n] Add missing MuiPagination localization to zh-CN locale (#48741) @greymoth-jp
|
|
16
|
+
- [select] Guard display ref during mouse down (#48744) @michelengelen
|
|
17
|
+
|
|
18
|
+
### `@mui/utils@9.1.3`
|
|
19
|
+
|
|
20
|
+
- [utils] Add opt-in `DataAttributesOverrides` augmentation for slot props (#48554) @LukasTy
|
|
21
|
+
|
|
22
|
+
### Docs
|
|
23
|
+
|
|
24
|
+
- [docs] Improve Icon Dialog responsiveness on small screens (#48639) @Prakash1185
|
|
25
|
+
- [docs] Fix invalid UTF-8 in skill references (#48739) @mturac
|
|
26
|
+
|
|
27
|
+
### Core
|
|
28
|
+
|
|
29
|
+
- [code-infra] Resolve Renovate dashboard warnings (#48700) @Sushantplive
|
|
30
|
+
- [code-infra] Validate npm publishing through dry run (#48691) @brijeshb42
|
|
31
|
+
- [code-infra] Run prettier after renovate update (#48754) @Janpot
|
|
32
|
+
- [code-infra] Fix 'A11y results committed?' check on react-pinned nightly jobs (#48740) @Janpot
|
|
33
|
+
- [core] Remove leftover Joy UI references (#48719) @siriwatknp
|
|
34
|
+
- [code-infra] Bump react-router to 7.15.1 (#48725) @Janpot
|
|
35
|
+
- [docs-infra] Drive docs analytics IDs via ANALYTICS_ENV (#48694) @Janpot
|
|
36
|
+
- [docs-infra] Pre-render API page descriptions (#48693) @brijeshb42
|
|
37
|
+
- [code-infra][icons-material] Build lib/package.json with code-infra --no-expand (#48689) @Janpot
|
|
38
|
+
- [code-infra] Fix react@18/next nightly workflow (#48635) @Janpot
|
|
39
|
+
|
|
40
|
+
All contributors of this release in alphabetical order: @brijeshb42, @greymoth-jp, @Janpot, @LukasTy, @michelengelen, @mturac, @Prakash1185, @siriwatknp, @Sushantplive
|
|
41
|
+
|
|
3
42
|
## 9.1.2
|
|
4
43
|
|
|
5
44
|
<!-- generated comparing v9.1.1..master -->
|
|
@@ -20,7 +59,7 @@ A big thanks to the 5 contributors who made this release possible.
|
|
|
20
59
|
### Docs
|
|
21
60
|
|
|
22
61
|
- Fix typos in release instructions (#48687) @brijeshb42
|
|
23
|
-
- Update @mui/x
|
|
62
|
+
- Update @mui/x-\* packages to latest (#48661) @Janpot
|
|
24
63
|
|
|
25
64
|
### Core
|
|
26
65
|
|
|
@@ -28,12 +67,11 @@ A big thanks to the 5 contributors who made this release possible.
|
|
|
28
67
|
- [code-infra] Bump to latest code-infra packages (#48672) @brijeshb42
|
|
29
68
|
- [code-infra] Resolve remaining minimatch advisory (#48662) @Janpot
|
|
30
69
|
- [code-infra] Bump nx to resolve minimatch advisory (#48658) @Janpot
|
|
31
|
-
- [core] Drop @babel
|
|
70
|
+
- [core] Drop @babel/\* pnpm overrides (#48710) @Janpot
|
|
32
71
|
- [docs-infra] Revert "Pin StackBlitz demo vite to v7 and plugin-react to v5" (#48709) @Janpot
|
|
33
72
|
- [docs-infra] Fix code-block copy button broken on direct page load (#48653) @brijeshb42
|
|
34
73
|
- [test] Stabilize Data Grid demo data in Argos screenshots (#48654) @LukasTy
|
|
35
74
|
|
|
36
|
-
|
|
37
75
|
All contributors of this release in alphabetical order: @brijeshb42, @Janpot, @LukasTy, @mj12albert, @siriwatknp
|
|
38
76
|
|
|
39
77
|
## 9.1.1
|
|
@@ -50,7 +50,7 @@ function ClickAwayListener(props) {
|
|
|
50
50
|
const syntheticEventRef = React.useRef(false);
|
|
51
51
|
React.useEffect(() => {
|
|
52
52
|
// Ensure that this component is not "activated" synchronously.
|
|
53
|
-
// https://github.com/
|
|
53
|
+
// https://github.com/react/react/issues/20074
|
|
54
54
|
setTimeout(() => {
|
|
55
55
|
activatedRef.current = true;
|
|
56
56
|
}, 0);
|
|
@@ -44,7 +44,7 @@ function ClickAwayListener(props) {
|
|
|
44
44
|
const syntheticEventRef = React.useRef(false);
|
|
45
45
|
React.useEffect(() => {
|
|
46
46
|
// Ensure that this component is not "activated" synchronously.
|
|
47
|
-
// https://github.com/
|
|
47
|
+
// https://github.com/react/react/issues/20074
|
|
48
48
|
setTimeout(() => {
|
|
49
49
|
activatedRef.current = true;
|
|
50
50
|
}, 0);
|
package/ListItem/ListItem.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ import { Theme } from "../styles/index.mjs";
|
|
|
4
4
|
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.mjs";
|
|
5
5
|
import { ListItemClasses } from "./listItemClasses.mjs";
|
|
6
6
|
import { SlotProps } from "../utils/types.mjs";
|
|
7
|
+
export interface ListItemRootSlotPropsOverrides {}
|
|
7
8
|
export interface ListItemSecondaryActionSlotPropsOverrides {}
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -62,7 +63,7 @@ export interface ListItemOwnProps extends ListItemBaseProps {
|
|
|
62
63
|
* @default {}
|
|
63
64
|
*/
|
|
64
65
|
slotProps?: {
|
|
65
|
-
root?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
66
|
+
root?: SlotProps<React.ElementType<React.HTMLAttributes<HTMLDivElement>>, ListItemRootSlotPropsOverrides, ListItemOwnerState> | undefined;
|
|
66
67
|
secondaryAction?: SlotProps<React.ElementType<React.HTMLAttributes<HTMLDivElement>>, ListItemSecondaryActionSlotPropsOverrides, ListItemOwnerState> | undefined;
|
|
67
68
|
} | undefined;
|
|
68
69
|
/**
|
package/ListItem/ListItem.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Theme } from "../styles/index.js";
|
|
|
4
4
|
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
|
|
5
5
|
import { ListItemClasses } from "./listItemClasses.js";
|
|
6
6
|
import { SlotProps } from "../utils/types.js";
|
|
7
|
+
export interface ListItemRootSlotPropsOverrides {}
|
|
7
8
|
export interface ListItemSecondaryActionSlotPropsOverrides {}
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -62,7 +63,7 @@ export interface ListItemOwnProps extends ListItemBaseProps {
|
|
|
62
63
|
* @default {}
|
|
63
64
|
*/
|
|
64
65
|
slotProps?: {
|
|
65
|
-
root?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
66
|
+
root?: SlotProps<React.ElementType<React.HTMLAttributes<HTMLDivElement>>, ListItemRootSlotPropsOverrides, ListItemOwnerState> | undefined;
|
|
66
67
|
secondaryAction?: SlotProps<React.ElementType<React.HTMLAttributes<HTMLDivElement>>, ListItemSecondaryActionSlotPropsOverrides, ListItemOwnerState> | undefined;
|
|
67
68
|
} | undefined;
|
|
68
69
|
/**
|
package/ListItem/ListItem.js
CHANGED
|
@@ -265,7 +265,7 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes /* remove-proptypes *
|
|
|
265
265
|
* @default {}
|
|
266
266
|
*/
|
|
267
267
|
slotProps: _propTypes.default.shape({
|
|
268
|
-
root: _propTypes.default.object,
|
|
268
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
269
269
|
secondaryAction: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
270
270
|
}),
|
|
271
271
|
/**
|
package/ListItem/ListItem.mjs
CHANGED
|
@@ -257,7 +257,7 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes /* remove-proptypes *
|
|
|
257
257
|
* @default {}
|
|
258
258
|
*/
|
|
259
259
|
slotProps: PropTypes.shape({
|
|
260
|
-
root: PropTypes.object,
|
|
260
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
261
261
|
secondaryAction: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
262
262
|
}),
|
|
263
263
|
/**
|
package/Rating/Rating.js
CHANGED
|
@@ -157,7 +157,7 @@ const RatingIcon = (0, _zeroStyled.styled)('span', {
|
|
|
157
157
|
duration: theme.transitions.duration.shortest
|
|
158
158
|
}),
|
|
159
159
|
// Fix mouseLeave issue.
|
|
160
|
-
// https://github.com/
|
|
160
|
+
// https://github.com/react/react/issues/4492
|
|
161
161
|
pointerEvents: 'none',
|
|
162
162
|
variants: [{
|
|
163
163
|
props: ({
|
|
@@ -452,7 +452,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
452
452
|
};
|
|
453
453
|
const handleClear = event => {
|
|
454
454
|
// Ignore keyboard events
|
|
455
|
-
// https://github.com/
|
|
455
|
+
// https://github.com/react/react/issues/7407
|
|
456
456
|
if (event.clientX === 0 && event.clientY === 0) {
|
|
457
457
|
return;
|
|
458
458
|
}
|
package/Rating/Rating.mjs
CHANGED
|
@@ -150,7 +150,7 @@ const RatingIcon = styled('span', {
|
|
|
150
150
|
duration: theme.transitions.duration.shortest
|
|
151
151
|
}),
|
|
152
152
|
// Fix mouseLeave issue.
|
|
153
|
-
// https://github.com/
|
|
153
|
+
// https://github.com/react/react/issues/4492
|
|
154
154
|
pointerEvents: 'none',
|
|
155
155
|
variants: [{
|
|
156
156
|
props: ({
|
|
@@ -445,7 +445,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
445
445
|
};
|
|
446
446
|
const handleClear = event => {
|
|
447
447
|
// Ignore keyboard events
|
|
448
|
-
// https://github.com/
|
|
448
|
+
// https://github.com/react/react/issues/7407
|
|
449
449
|
if (event.clientX === 0 && event.clientY === 0) {
|
|
450
450
|
return;
|
|
451
451
|
}
|
package/Select/SelectInput.js
CHANGED
|
@@ -383,6 +383,9 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
383
383
|
}
|
|
384
384
|
// Hijack the default focus behavior.
|
|
385
385
|
event.preventDefault();
|
|
386
|
+
if (!displayRef.current) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
386
389
|
displayRef.current.focus();
|
|
387
390
|
const doc = (0, _ownerDocument.default)(event.currentTarget);
|
|
388
391
|
scheduleMouseUpSelection();
|
package/Select/SelectInput.mjs
CHANGED
|
@@ -376,6 +376,9 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
376
376
|
}
|
|
377
377
|
// Hijack the default focus behavior.
|
|
378
378
|
event.preventDefault();
|
|
379
|
+
if (!displayRef.current) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
379
382
|
displayRef.current.focus();
|
|
380
383
|
const doc = ownerDocument(event.currentTarget);
|
|
381
384
|
scheduleMouseUpSelection();
|
package/Stack/Stack.d.mts
CHANGED
|
@@ -25,7 +25,7 @@ export interface StackOwnProps {
|
|
|
25
25
|
/**
|
|
26
26
|
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
27
27
|
*
|
|
28
|
-
* While CSS `gap` removes the
|
|
28
|
+
* While CSS `gap` removes the known limitations,
|
|
29
29
|
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
30
30
|
*
|
|
31
31
|
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
package/Stack/Stack.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface StackOwnProps {
|
|
|
25
25
|
/**
|
|
26
26
|
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
27
27
|
*
|
|
28
|
-
* While CSS `gap` removes the
|
|
28
|
+
* While CSS `gap` removes the known limitations,
|
|
29
29
|
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
30
30
|
*
|
|
31
31
|
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
package/Stack/Stack.js
CHANGED
|
@@ -56,7 +56,7 @@ process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ =
|
|
|
56
56
|
/**
|
|
57
57
|
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
58
58
|
*
|
|
59
|
-
* While CSS `gap` removes the
|
|
59
|
+
* While CSS `gap` removes the known limitations,
|
|
60
60
|
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
61
61
|
*
|
|
62
62
|
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
package/Stack/Stack.mjs
CHANGED
|
@@ -50,7 +50,7 @@ process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ =
|
|
|
50
50
|
/**
|
|
51
51
|
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
52
52
|
*
|
|
53
|
-
* While CSS `gap` removes the
|
|
53
|
+
* While CSS `gap` removes the known limitations,
|
|
54
54
|
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
55
55
|
*
|
|
56
56
|
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -384,14 +384,14 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
const handleFocus = event => {
|
|
387
|
-
// Workaround for https://github.com/
|
|
387
|
+
// Workaround for https://github.com/react/react/issues/7769
|
|
388
388
|
// The autoFocus of React might trigger the event before the componentDidMount.
|
|
389
389
|
// We need to account for this eventuality.
|
|
390
390
|
if (!childNode) {
|
|
391
391
|
setChildNode(event.currentTarget);
|
|
392
392
|
}
|
|
393
393
|
if ((0, _isFocusVisible.default)(event.target)) {
|
|
394
|
-
// Workaround for https://github.com/
|
|
394
|
+
// Workaround for https://github.com/react/react/issues/9142.
|
|
395
395
|
// React does not fire blur when a focused element becomes disabled.
|
|
396
396
|
const handleNativeBlur = blurEvent => {
|
|
397
397
|
if (blurEvent.target.disabled) {
|
package/Tooltip/Tooltip.mjs
CHANGED
|
@@ -376,14 +376,14 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
378
|
const handleFocus = event => {
|
|
379
|
-
// Workaround for https://github.com/
|
|
379
|
+
// Workaround for https://github.com/react/react/issues/7769
|
|
380
380
|
// The autoFocus of React might trigger the event before the componentDidMount.
|
|
381
381
|
// We need to account for this eventuality.
|
|
382
382
|
if (!childNode) {
|
|
383
383
|
setChildNode(event.currentTarget);
|
|
384
384
|
}
|
|
385
385
|
if (isFocusVisible(event.target)) {
|
|
386
|
-
// Workaround for https://github.com/
|
|
386
|
+
// Workaround for https://github.com/react/react/issues/9142.
|
|
387
387
|
// React does not fire blur when a focused element becomes disabled.
|
|
388
388
|
const handleNativeBlur = blurEvent => {
|
|
389
389
|
if (blurEvent.target.disabled) {
|
package/index.js
CHANGED
package/index.mjs
CHANGED
package/internal/SwitchBase.js
CHANGED
|
@@ -142,7 +142,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
|
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
const handleInputChange = event => {
|
|
145
|
-
// Workaround for https://github.com/
|
|
145
|
+
// Workaround for https://github.com/react/react/issues/9023
|
|
146
146
|
if (event.nativeEvent.defaultPrevented || readOnly) {
|
|
147
147
|
return;
|
|
148
148
|
}
|
package/internal/SwitchBase.mjs
CHANGED
|
@@ -135,7 +135,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
|
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
const handleInputChange = event => {
|
|
138
|
-
// Workaround for https://github.com/
|
|
138
|
+
// Workaround for https://github.com/react/react/issues/9023
|
|
139
139
|
if (event.nativeEvent.defaultPrevented || readOnly) {
|
|
140
140
|
return;
|
|
141
141
|
}
|
package/locale/zhCN.js
CHANGED
|
@@ -55,6 +55,27 @@ const zhCN = exports.zhCN = {
|
|
|
55
55
|
defaultProps: {
|
|
56
56
|
closeText: '关闭'
|
|
57
57
|
}
|
|
58
|
+
},
|
|
59
|
+
MuiPagination: {
|
|
60
|
+
defaultProps: {
|
|
61
|
+
'aria-label': '分页导航',
|
|
62
|
+
getItemAriaLabel: (type, page, selected) => {
|
|
63
|
+
if (type === 'page') {
|
|
64
|
+
return `${selected ? '' : '转到'}第 ${page} 页`;
|
|
65
|
+
}
|
|
66
|
+
if (type === 'first') {
|
|
67
|
+
return '转到第一页';
|
|
68
|
+
}
|
|
69
|
+
if (type === 'last') {
|
|
70
|
+
return '转到最后一页';
|
|
71
|
+
}
|
|
72
|
+
if (type === 'next') {
|
|
73
|
+
return '转到下一页';
|
|
74
|
+
}
|
|
75
|
+
// if (type === 'previous')
|
|
76
|
+
return '转到上一页';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
58
79
|
}
|
|
59
80
|
}
|
|
60
81
|
};
|
package/locale/zhCN.mjs
CHANGED
|
@@ -48,6 +48,27 @@ export const zhCN = {
|
|
|
48
48
|
defaultProps: {
|
|
49
49
|
closeText: '关闭'
|
|
50
50
|
}
|
|
51
|
+
},
|
|
52
|
+
MuiPagination: {
|
|
53
|
+
defaultProps: {
|
|
54
|
+
'aria-label': '分页导航',
|
|
55
|
+
getItemAriaLabel: (type, page, selected) => {
|
|
56
|
+
if (type === 'page') {
|
|
57
|
+
return `${selected ? '' : '转到'}第 ${page} 页`;
|
|
58
|
+
}
|
|
59
|
+
if (type === 'first') {
|
|
60
|
+
return '转到第一页';
|
|
61
|
+
}
|
|
62
|
+
if (type === 'last') {
|
|
63
|
+
return '转到最后一页';
|
|
64
|
+
}
|
|
65
|
+
if (type === 'next') {
|
|
66
|
+
return '转到下一页';
|
|
67
|
+
}
|
|
68
|
+
// if (type === 'previous')
|
|
69
|
+
return '转到上一页';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
51
72
|
}
|
|
52
73
|
}
|
|
53
74
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"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.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
34
|
"react-is": "^19.2.6",
|
|
35
35
|
"react-transition-group": "^4.4.5",
|
|
36
|
-
"@mui/
|
|
37
|
-
"@mui/core-downloads-tracker": "^9.1.2",
|
|
36
|
+
"@mui/core-downloads-tracker": "^9.2.0",
|
|
38
37
|
"@mui/types": "^9.1.1",
|
|
39
|
-
"@mui/
|
|
38
|
+
"@mui/system": "^9.2.0",
|
|
39
|
+
"@mui/utils": "^9.2.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.5.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
45
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
46
46
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
|
-
"@mui/material-pigment-css": "^9.
|
|
47
|
+
"@mui/material-pigment-css": "^9.2.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependenciesMeta": {
|
|
50
50
|
"@types/react": {
|
|
@@ -54,7 +54,7 @@ function useScrollTrigger(options = {}) {
|
|
|
54
54
|
passive: true
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
-
// See Option 3. https://github.com/
|
|
57
|
+
// See Option 3. https://github.com/react/react/issues/14476#issuecomment-471199055
|
|
58
58
|
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
59
59
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
60
|
}, [target, getTrigger, JSON.stringify(other)]);
|
|
@@ -48,7 +48,7 @@ export default function useScrollTrigger(options = {}) {
|
|
|
48
48
|
passive: true
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
// See Option 3. https://github.com/
|
|
51
|
+
// See Option 3. https://github.com/react/react/issues/14476#issuecomment-471199055
|
|
52
52
|
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
53
53
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
54
|
}, [target, getTrigger, JSON.stringify(other)]);
|
package/utils/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SxProps } from '@mui/system';
|
|
2
2
|
import { SlotComponentProps } from '@mui/utils/types';
|
|
3
3
|
import { Theme } from "../styles/index.mjs";
|
|
4
|
-
export type { EventHandlers, WithOptionalOwnerState, SlotComponentProps, SlotComponentPropsWithSlotState } from '@mui/utils/types';
|
|
4
|
+
export type { EventHandlers, WithOptionalOwnerState, SlotComponentProps, SlotComponentPropsWithSlotState, DataAttributesOverrides, WithDataAttributes } from '@mui/utils/types';
|
|
5
5
|
export type SlotCommonProps = {
|
|
6
6
|
component?: React.ElementType | undefined;
|
|
7
7
|
sx?: SxProps<Theme> | undefined;
|
package/utils/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SxProps } from '@mui/system';
|
|
2
2
|
import { SlotComponentProps } from '@mui/utils/types';
|
|
3
3
|
import { Theme } from "../styles/index.js";
|
|
4
|
-
export type { EventHandlers, WithOptionalOwnerState, SlotComponentProps, SlotComponentPropsWithSlotState } from '@mui/utils/types';
|
|
4
|
+
export type { EventHandlers, WithOptionalOwnerState, SlotComponentProps, SlotComponentPropsWithSlotState, DataAttributesOverrides, WithDataAttributes } from '@mui/utils/types';
|
|
5
5
|
export type SlotCommonProps = {
|
|
6
6
|
component?: React.ElementType | undefined;
|
|
7
7
|
sx?: SxProps<Theme> | undefined;
|
package/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 = "9.
|
|
7
|
+
const version = exports.version = "9.2.0";
|
|
8
8
|
const major = exports.major = Number("9");
|
|
9
|
-
const minor = exports.minor = Number("
|
|
10
|
-
const patch = exports.patch = Number("
|
|
9
|
+
const minor = exports.minor = Number("2");
|
|
10
|
+
const patch = exports.patch = Number("0");
|
|
11
11
|
const prerelease = exports.prerelease = undefined;
|
|
12
12
|
var _default = exports.default = version;
|
package/version/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "9.
|
|
1
|
+
export const version = "9.2.0";
|
|
2
2
|
export const major = Number("9");
|
|
3
|
-
export const minor = Number("
|
|
4
|
-
export const patch = Number("
|
|
3
|
+
export const minor = Number("2");
|
|
4
|
+
export const patch = Number("0");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|