@mui/material 7.3.6 → 7.3.7
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/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +3 -13
- package/Alert/Alert.js +1 -1
- package/AppBar/AppBar.js +2 -1
- package/Backdrop/Backdrop.js +0 -1
- package/ButtonGroup/ButtonGroup.js +8 -11
- package/CHANGELOG.md +57 -1
- package/CardActionArea/CardActionArea.js +0 -1
- package/Dialog/Dialog.js +4 -3
- package/Dialog/dialogClasses.d.ts +2 -0
- package/Dialog/dialogClasses.js +1 -1
- package/Modal/ModalManager.js +1 -1
- package/README.md +2 -2
- package/Select/SelectInput.js +19 -4
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js +1 -1
- package/Unstable_TrapFocus/FocusTrap.js +1 -1
- package/esm/Accordion/Accordion.d.ts +2 -2
- package/esm/Accordion/Accordion.js +3 -13
- package/esm/Alert/Alert.js +1 -1
- package/esm/AppBar/AppBar.js +2 -1
- package/esm/Backdrop/Backdrop.js +0 -1
- package/esm/ButtonGroup/ButtonGroup.js +8 -11
- package/esm/CardActionArea/CardActionArea.js +0 -1
- package/esm/Dialog/Dialog.js +4 -3
- package/esm/Dialog/dialogClasses.d.ts +2 -0
- package/esm/Dialog/dialogClasses.js +1 -1
- package/esm/Modal/ModalManager.js +1 -1
- package/esm/Select/SelectInput.js +19 -4
- package/esm/Tabs/Tabs.d.ts +1 -1
- package/esm/Tabs/Tabs.js +1 -1
- package/esm/Unstable_TrapFocus/FocusTrap.js +1 -1
- package/esm/index.js +1 -1
- package/esm/internal/SwitchBase.js +1 -1
- package/esm/locale/arEG.js +1 -1
- package/esm/locale/arSA.js +1 -1
- package/esm/locale/arSD.js +1 -1
- package/esm/locale/kuCKB.js +1 -1
- package/esm/locale/neNP.js +1 -1
- package/esm/useAutocomplete/useAutocomplete.js +51 -18
- package/esm/version/index.js +2 -2
- package/index.js +1 -1
- package/internal/SwitchBase.js +1 -1
- package/locale/arEG.js +1 -1
- package/locale/arSA.js +1 -1
- package/locale/arSD.js +1 -1
- package/locale/kuCKB.js +1 -1
- package/locale/neNP.js +1 -1
- package/package.json +8 -8
- package/useAutocomplete/useAutocomplete.js +51 -18
- package/version/index.js +2 -2
package/Accordion/Accordion.d.ts
CHANGED
|
@@ -75,12 +75,12 @@ export interface AccordionOwnProps {
|
|
|
75
75
|
*/
|
|
76
76
|
disabled?: boolean;
|
|
77
77
|
/**
|
|
78
|
-
* If `true`, it removes the margin between two expanded accordion items and the
|
|
78
|
+
* If `true`, it removes the margin between two expanded accordion items and prevents the increased height when expanded.
|
|
79
79
|
* @default false
|
|
80
80
|
*/
|
|
81
81
|
disableGutters?: boolean;
|
|
82
82
|
/**
|
|
83
|
-
* If `true`, expands the accordion, otherwise
|
|
83
|
+
* If `true`, expands the accordion, otherwise collapses it.
|
|
84
84
|
* Setting this prop enables control over the accordion.
|
|
85
85
|
*/
|
|
86
86
|
expanded?: boolean;
|
package/Accordion/Accordion.js
CHANGED
|
@@ -149,7 +149,6 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
149
149
|
disableGutters = false,
|
|
150
150
|
expanded: expandedProp,
|
|
151
151
|
onChange,
|
|
152
|
-
square = false,
|
|
153
152
|
slots = {},
|
|
154
153
|
slotProps = {},
|
|
155
154
|
TransitionComponent: TransitionComponentProp,
|
|
@@ -177,7 +176,6 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
177
176
|
}), [expanded, disabled, disableGutters, handleChange]);
|
|
178
177
|
const ownerState = {
|
|
179
178
|
...props,
|
|
180
|
-
square,
|
|
181
179
|
disabled,
|
|
182
180
|
disableGutters,
|
|
183
181
|
expanded
|
|
@@ -204,10 +202,7 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
204
202
|
className: (0, _clsx.default)(classes.root, className),
|
|
205
203
|
shouldForwardComponentProp: true,
|
|
206
204
|
ownerState,
|
|
207
|
-
ref
|
|
208
|
-
additionalProps: {
|
|
209
|
-
square
|
|
210
|
-
}
|
|
205
|
+
ref
|
|
211
206
|
});
|
|
212
207
|
const [AccordionHeadingSlot, accordionProps] = (0, _useSlot.default)('heading', {
|
|
213
208
|
elementType: AccordionHeading,
|
|
@@ -287,12 +282,12 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
287
282
|
*/
|
|
288
283
|
disabled: _propTypes.default.bool,
|
|
289
284
|
/**
|
|
290
|
-
* If `true`, it removes the margin between two expanded accordion items and the
|
|
285
|
+
* If `true`, it removes the margin between two expanded accordion items and prevents the increased height when expanded.
|
|
291
286
|
* @default false
|
|
292
287
|
*/
|
|
293
288
|
disableGutters: _propTypes.default.bool,
|
|
294
289
|
/**
|
|
295
|
-
* If `true`, expands the accordion, otherwise
|
|
290
|
+
* If `true`, expands the accordion, otherwise collapses it.
|
|
296
291
|
* Setting this prop enables control over the accordion.
|
|
297
292
|
*/
|
|
298
293
|
expanded: _propTypes.default.bool,
|
|
@@ -323,11 +318,6 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
323
318
|
root: _propTypes.default.elementType,
|
|
324
319
|
transition: _propTypes.default.elementType
|
|
325
320
|
}),
|
|
326
|
-
/**
|
|
327
|
-
* If `true`, rounded corners are disabled.
|
|
328
|
-
* @default false
|
|
329
|
-
*/
|
|
330
|
-
square: _propTypes.default.bool,
|
|
331
321
|
/**
|
|
332
322
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
333
323
|
*/
|
package/Alert/Alert.js
CHANGED
|
@@ -237,7 +237,7 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
237
237
|
...rootSlotProps,
|
|
238
238
|
children: [icon !== false ? /*#__PURE__*/(0, _jsxRuntime.jsx)(IconSlot, {
|
|
239
239
|
...iconSlotProps,
|
|
240
|
-
children: icon || iconMapping[severity]
|
|
240
|
+
children: icon || iconMapping[severity]
|
|
241
241
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(MessageSlot, {
|
|
242
242
|
...messageSlotProps,
|
|
243
243
|
children: children
|
package/AppBar/AppBar.js
CHANGED
package/Backdrop/Backdrop.js
CHANGED
|
@@ -76,7 +76,13 @@ const ButtonGroupRoot = (0, _zeroStyled.styled)('div', {
|
|
|
76
76
|
variant: 'contained'
|
|
77
77
|
},
|
|
78
78
|
style: {
|
|
79
|
-
boxShadow: (theme.vars || theme).shadows[2]
|
|
79
|
+
boxShadow: (theme.vars || theme).shadows[2],
|
|
80
|
+
[`& .${_buttonGroupClasses.default.grouped}`]: {
|
|
81
|
+
boxShadow: 'none',
|
|
82
|
+
'&:hover': {
|
|
83
|
+
boxShadow: 'none'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
80
86
|
}
|
|
81
87
|
}, {
|
|
82
88
|
props: {
|
|
@@ -227,16 +233,7 @@ const ButtonGroupRoot = (0, _zeroStyled.styled)('div', {
|
|
|
227
233
|
}
|
|
228
234
|
}))],
|
|
229
235
|
[`& .${_buttonGroupClasses.default.grouped}`]: {
|
|
230
|
-
minWidth: 40
|
|
231
|
-
boxShadow: 'none',
|
|
232
|
-
props: {
|
|
233
|
-
variant: 'contained'
|
|
234
|
-
},
|
|
235
|
-
style: {
|
|
236
|
-
'&:hover': {
|
|
237
|
-
boxShadow: 'none'
|
|
238
|
-
}
|
|
239
|
-
}
|
|
236
|
+
minWidth: 40
|
|
240
237
|
}
|
|
241
238
|
})));
|
|
242
239
|
const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, ref) {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 7.3.7
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v7.3.6..master -->
|
|
6
|
+
|
|
7
|
+
_Jan 8, 2026_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 16 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@7.3.7`
|
|
12
|
+
|
|
13
|
+
- [accordion] Remove unnecessary handling of `square` prop on Accordion Root (#47457) @ZeeshanTamboli
|
|
14
|
+
- [alert] Remove unnecessary default icon mapping fallback (#47460) @ZeeshanTamboli
|
|
15
|
+
- [appbar] Fix inherit color CSS variable not getting applied (#47518) @ZeeshanTamboli
|
|
16
|
+
- [autocomplete] Fix `ArrowLeft`, `Backspace` & `Delete` behavior for multiple and single-value rendering with proper caret handling (#47411) @jnbain
|
|
17
|
+
- [backdrop] Remove unnecessary passing of `classes` from root slot (#47519) @ZeeshanTamboli
|
|
18
|
+
- [button-group] Fix styles when variant is `contained` (#47499) @ZeeshanTamboli
|
|
19
|
+
- [card-action-area] Remove incorrect root ref being forwarded to focus highlight component (#47523) @ZeeshanTamboli
|
|
20
|
+
- [checkbox] Fix readonly checkboxes (#47503) @mj12albert
|
|
21
|
+
- [click-away-listener] Tighten the parameter type of createHandleSynthetic method (#47525) @ZeeshanTamboli
|
|
22
|
+
- [dialog] Fix backdrop theme style overrides (#47544) @ZeeshanTamboli
|
|
23
|
+
- [focus-trap] Compute `activeElement` inside `loopFocus` on every keydown (#47566) @ZeeshanTamboli
|
|
24
|
+
- [modal] Take non-integer padding-right into consideration when scroll locking (#47420) @Zache
|
|
25
|
+
- [select] Fix dropdown width does not match trigger width on window resize (#47526) @AarishMansur
|
|
26
|
+
- [tabs] Fix passing incorrect slot name props (scrollButton → scrollButtons) (#47215) @rithik56
|
|
27
|
+
|
|
28
|
+
### Docs
|
|
29
|
+
|
|
30
|
+
- [card] Fix key warning (#47524) @ZeeshanTamboli
|
|
31
|
+
- [dialog] Replace TranstionProps with slotProps.transition (#47569) @sai6855
|
|
32
|
+
- [number-field] Use stable Base UI package (#47504) @siriwatknp
|
|
33
|
+
- [snackbar] Replace TransitionComponent with slots.transition (#47570) @sai6855
|
|
34
|
+
- Fix incorrect indentation in migration guide (#47571) @sai6855
|
|
35
|
+
- Enable MUI chat on Material UI demos (#46837) @siriwatknp
|
|
36
|
+
- Add docs and website banner for Dev survey'25 (#47521) @prakhargupta1
|
|
37
|
+
- Update Tailwind CSS v4 + Next.js Pages Router docs (#47546) @atharva3333
|
|
38
|
+
- Add warning callout to Sync plugin doc (#47511) @mapache-salvaje
|
|
39
|
+
- Update typo in TailwindCSS v4 integration with Next.js docs (#47512) @TimKraemer
|
|
40
|
+
- Fix link to contributing guide (#47473) @oliviertassinari
|
|
41
|
+
- Improve description of Accordion props (#47459) @ZeeshanTamboli
|
|
42
|
+
|
|
43
|
+
### Core
|
|
44
|
+
|
|
45
|
+
- [blog] Whats new since MUI X v8 [DX-51] (#47140) @joserodolfofreitas
|
|
46
|
+
- [code-infra] Fix React@next CI job (#47493) @Janpot
|
|
47
|
+
- [code-infra] Move font loading to @mui/docs (#47385) @Janpot
|
|
48
|
+
- [code-infra] Fix CI for React 18 (#47560) @Janpot
|
|
49
|
+
- [code-infra] Prevent legacy browsers tests from updating (#47496) @Janpot
|
|
50
|
+
- [code-infra] Move `@mui/internal-test-utils` to code infra repo (#47422) @Janpot
|
|
51
|
+
- [code-infra] Fix React@next CI job (#47493) @Janpot
|
|
52
|
+
- [examples] Update Next.js versions to v16 in Next.js examples (DX-57) (#47453) @alelthomas
|
|
53
|
+
- [internal] Bump Next.js & React version to avoid security vulnerability (#47427) @oliviertassinari
|
|
54
|
+
- [test] Use plain playwright for e2e (#47410) @mj12albert
|
|
55
|
+
- [test] Fix react-18 tests (#47407) @Janpot
|
|
56
|
+
|
|
57
|
+
All contributors of this release in alphabetical order: @AarishMansur, @alelthomas, @atharva3333, @bricefrisco, @Janpot, @jnbain, @joserodolfofreitas, @mapache-salvaje, @mj12albert, @oliviertassinari, @prakhargupta1, @rithik56, @siriwatknp, @TimKraemer, @Zache, @ZeeshanTamboli
|
|
58
|
+
|
|
3
59
|
## 7.3.6
|
|
4
60
|
|
|
5
61
|
<!-- generated comparing v7.3.5..master -->
|
|
@@ -753,7 +809,7 @@ A big thanks to the 7 contributors who made this release possible.
|
|
|
753
809
|
- Fix `Grid`, `GridLegacy`, `Stack`, `Badge`, `Select`, `Autocomplete` demos CSS variables (#45693) @DiegoAndai
|
|
754
810
|
- Add "Material UI v7 is here" to the notifications (#45694) @DiegoAndai
|
|
755
811
|
- Fix `Breadcrumbs`, `List`, `Divider`, and `Typography` dark mode demos (#45692) @siriwatknp
|
|
756
|
-
- Fix Material
|
|
812
|
+
- Fix Material Icons page in dark mode (#45691) @mnajdova
|
|
757
813
|
|
|
758
814
|
All contributors of this release in alphabetical order: @aarongarciah, @DiegoAndai, @eduter, @Janpot, @micttyoid, @mnajdova, @siriwatknp
|
|
759
815
|
|
|
@@ -106,7 +106,6 @@ const CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(inP
|
|
|
106
106
|
elementType: CardActionAreaFocusHighlight,
|
|
107
107
|
externalForwardedProps,
|
|
108
108
|
ownerState,
|
|
109
|
-
ref,
|
|
110
109
|
className: classes.focusHighlight
|
|
111
110
|
});
|
|
112
111
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
|
package/Dialog/Dialog.js
CHANGED
|
@@ -26,8 +26,7 @@ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
27
|
const DialogBackdrop = (0, _zeroStyled.styled)(_Backdrop.default, {
|
|
28
28
|
name: 'MuiDialog',
|
|
29
|
-
slot: 'Backdrop'
|
|
30
|
-
overrides: (props, styles) => styles.backdrop
|
|
29
|
+
slot: 'Backdrop'
|
|
31
30
|
})({
|
|
32
31
|
// Improve scrollable dialog support.
|
|
33
32
|
zIndex: -1
|
|
@@ -42,6 +41,7 @@ const useUtilityClasses = ownerState => {
|
|
|
42
41
|
} = ownerState;
|
|
43
42
|
const slots = {
|
|
44
43
|
root: ['root'],
|
|
44
|
+
backdrop: ['backdrop'],
|
|
45
45
|
container: ['container', `scroll${(0, _capitalize.default)(scroll)}`],
|
|
46
46
|
paper: ['paper', `paperScroll${(0, _capitalize.default)(scroll)}`, `paperWidth${(0, _capitalize.default)(String(maxWidth))}`, fullWidth && 'paperFullWidth', fullScreen && 'paperFullScreen']
|
|
47
47
|
};
|
|
@@ -292,7 +292,8 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
292
292
|
elementType: DialogBackdrop,
|
|
293
293
|
shouldForwardComponentProp: true,
|
|
294
294
|
externalForwardedProps,
|
|
295
|
-
ownerState
|
|
295
|
+
ownerState,
|
|
296
|
+
className: classes.backdrop
|
|
296
297
|
});
|
|
297
298
|
const [PaperSlot, paperSlotProps] = (0, _useSlot.default)('paper', {
|
|
298
299
|
elementType: DialogPaper,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface DialogClasses {
|
|
2
2
|
/** Styles applied to the root element. */
|
|
3
3
|
root: string;
|
|
4
|
+
/** Styles applied to the backdrop element. */
|
|
5
|
+
backdrop: string;
|
|
4
6
|
/** Styles applied to the container element if `scroll="paper"`. */
|
|
5
7
|
scrollPaper: string;
|
|
6
8
|
/** Styles applied to the container element if `scroll="body"`. */
|
package/Dialog/dialogClasses.js
CHANGED
|
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
11
11
|
function getDialogUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiDialog', slot);
|
|
13
13
|
}
|
|
14
|
-
const dialogClasses = (0, _generateUtilityClasses.default)('MuiDialog', ['root', 'scrollPaper', 'scrollBody', 'container', 'paper', 'paperScrollPaper', 'paperScrollBody', 'paperWidthFalse', 'paperWidthXs', 'paperWidthSm', 'paperWidthMd', 'paperWidthLg', 'paperWidthXl', 'paperFullWidth', 'paperFullScreen']);
|
|
14
|
+
const dialogClasses = (0, _generateUtilityClasses.default)('MuiDialog', ['root', 'backdrop', 'scrollPaper', 'scrollBody', 'container', 'paper', 'paperScrollPaper', 'paperScrollBody', 'paperWidthFalse', 'paperWidthXs', 'paperWidthSm', 'paperWidthMd', 'paperWidthLg', 'paperWidthXl', 'paperFullWidth', 'paperFullScreen']);
|
|
15
15
|
var _default = exports.default = dialogClasses;
|
package/Modal/ModalManager.js
CHANGED
|
@@ -25,7 +25,7 @@ function ariaHidden(element, hide) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function getPaddingRight(element) {
|
|
28
|
-
return
|
|
28
|
+
return parseFloat((0, _ownerWindow.default)(element).getComputedStyle(element).paddingRight) || 0;
|
|
29
29
|
}
|
|
30
30
|
function isAriaHiddenForbiddenOnElement(element) {
|
|
31
31
|
// The forbidden HTML tags are the ones from ARIA specification that
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Our documentation features [a collection of example projects using Material UI]
|
|
|
33
33
|
|
|
34
34
|
## Contributing
|
|
35
35
|
|
|
36
|
-
Read the [contributing guide](
|
|
36
|
+
Read the [contributing guide](../../CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
|
|
37
37
|
|
|
38
38
|
Contributing to Material UI is about more than just issues and pull requests!
|
|
39
39
|
There are many other ways to [support Material UI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.
|
|
@@ -49,7 +49,7 @@ Future plans and high-priority features and enhancements can be found in the [ro
|
|
|
49
49
|
## License
|
|
50
50
|
|
|
51
51
|
This project is licensed under the terms of the
|
|
52
|
-
[MIT license](
|
|
52
|
+
[MIT license](../../LICENSE).
|
|
53
53
|
|
|
54
54
|
## Security
|
|
55
55
|
|
package/Select/SelectInput.js
CHANGED
|
@@ -184,6 +184,22 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
184
184
|
node: inputRef.current,
|
|
185
185
|
value
|
|
186
186
|
}), [value]);
|
|
187
|
+
const open = displayNode !== null && openState;
|
|
188
|
+
React.useEffect(() => {
|
|
189
|
+
if (!open || !anchorElement || autoWidth) {
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
const observer = new ResizeObserver(() => {
|
|
196
|
+
setMenuMinWidthState(anchorElement.clientWidth);
|
|
197
|
+
});
|
|
198
|
+
observer.observe(anchorElement);
|
|
199
|
+
return () => {
|
|
200
|
+
observer.disconnect();
|
|
201
|
+
};
|
|
202
|
+
}, [open, anchorElement, autoWidth]);
|
|
187
203
|
|
|
188
204
|
// Resize menu on `defaultOpen` automatic toggle.
|
|
189
205
|
React.useEffect(() => {
|
|
@@ -219,8 +235,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
219
235
|
}
|
|
220
236
|
return undefined;
|
|
221
237
|
}, [labelId]);
|
|
222
|
-
const update = (
|
|
223
|
-
if (
|
|
238
|
+
const update = (openParam, event) => {
|
|
239
|
+
if (openParam) {
|
|
224
240
|
if (onOpen) {
|
|
225
241
|
onOpen(event);
|
|
226
242
|
}
|
|
@@ -229,7 +245,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
229
245
|
}
|
|
230
246
|
if (!isOpenControlled) {
|
|
231
247
|
setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
|
|
232
|
-
setOpenState(
|
|
248
|
+
setOpenState(openParam);
|
|
233
249
|
}
|
|
234
250
|
};
|
|
235
251
|
const handleMouseDown = event => {
|
|
@@ -316,7 +332,6 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
316
332
|
onKeyDown?.(event);
|
|
317
333
|
}
|
|
318
334
|
};
|
|
319
|
-
const open = displayNode !== null && openState;
|
|
320
335
|
const handleBlur = event => {
|
|
321
336
|
// if open event.stopImmediatePropagation
|
|
322
337
|
if (!open && onBlur) {
|
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export type TabsSlotsAndSlotProps = CreateSlotsAndSlotProps<TabsSlots, {
|
|
|
87
87
|
*/
|
|
88
88
|
indicator: SlotProps<'span', TabsIndicatorSlotPropsOverrides, TabsOwnerState>;
|
|
89
89
|
/**
|
|
90
|
-
* Props forwarded to the
|
|
90
|
+
* Props forwarded to the scrollButtons slot.
|
|
91
91
|
* By default, the available props are based on the [TabScrollButton](https://mui.com/material-ui/api/tab-scroll-button/#props) component.
|
|
92
92
|
*/
|
|
93
93
|
scrollButtons: SlotProps<typeof TabScrollButton, TabsScrollButtonsSlotPropsOverrides, TabsOwnerState>;
|
package/Tabs/Tabs.js
CHANGED
|
@@ -155,12 +155,12 @@ function FocusTrap(props) {
|
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
const doc = (0, _ownerDocument.default)(rootRef.current);
|
|
158
|
-
const activeElement = (0, _getActiveElement.default)(doc);
|
|
159
158
|
const loopFocus = nativeEvent => {
|
|
160
159
|
lastKeydown.current = nativeEvent;
|
|
161
160
|
if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
|
|
162
161
|
return;
|
|
163
162
|
}
|
|
163
|
+
const activeElement = (0, _getActiveElement.default)(doc);
|
|
164
164
|
|
|
165
165
|
// Make sure the next tab starts from the right place.
|
|
166
166
|
// activeElement refers to the origin.
|
|
@@ -75,12 +75,12 @@ export interface AccordionOwnProps {
|
|
|
75
75
|
*/
|
|
76
76
|
disabled?: boolean;
|
|
77
77
|
/**
|
|
78
|
-
* If `true`, it removes the margin between two expanded accordion items and the
|
|
78
|
+
* If `true`, it removes the margin between two expanded accordion items and prevents the increased height when expanded.
|
|
79
79
|
* @default false
|
|
80
80
|
*/
|
|
81
81
|
disableGutters?: boolean;
|
|
82
82
|
/**
|
|
83
|
-
* If `true`, expands the accordion, otherwise
|
|
83
|
+
* If `true`, expands the accordion, otherwise collapses it.
|
|
84
84
|
* Setting this prop enables control over the accordion.
|
|
85
85
|
*/
|
|
86
86
|
expanded?: boolean;
|
|
@@ -142,7 +142,6 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
142
142
|
disableGutters = false,
|
|
143
143
|
expanded: expandedProp,
|
|
144
144
|
onChange,
|
|
145
|
-
square = false,
|
|
146
145
|
slots = {},
|
|
147
146
|
slotProps = {},
|
|
148
147
|
TransitionComponent: TransitionComponentProp,
|
|
@@ -170,7 +169,6 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
170
169
|
}), [expanded, disabled, disableGutters, handleChange]);
|
|
171
170
|
const ownerState = {
|
|
172
171
|
...props,
|
|
173
|
-
square,
|
|
174
172
|
disabled,
|
|
175
173
|
disableGutters,
|
|
176
174
|
expanded
|
|
@@ -197,10 +195,7 @@ const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref)
|
|
|
197
195
|
className: clsx(classes.root, className),
|
|
198
196
|
shouldForwardComponentProp: true,
|
|
199
197
|
ownerState,
|
|
200
|
-
ref
|
|
201
|
-
additionalProps: {
|
|
202
|
-
square
|
|
203
|
-
}
|
|
198
|
+
ref
|
|
204
199
|
});
|
|
205
200
|
const [AccordionHeadingSlot, accordionProps] = useSlot('heading', {
|
|
206
201
|
elementType: AccordionHeading,
|
|
@@ -280,12 +275,12 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
280
275
|
*/
|
|
281
276
|
disabled: PropTypes.bool,
|
|
282
277
|
/**
|
|
283
|
-
* If `true`, it removes the margin between two expanded accordion items and the
|
|
278
|
+
* If `true`, it removes the margin between two expanded accordion items and prevents the increased height when expanded.
|
|
284
279
|
* @default false
|
|
285
280
|
*/
|
|
286
281
|
disableGutters: PropTypes.bool,
|
|
287
282
|
/**
|
|
288
|
-
* If `true`, expands the accordion, otherwise
|
|
283
|
+
* If `true`, expands the accordion, otherwise collapses it.
|
|
289
284
|
* Setting this prop enables control over the accordion.
|
|
290
285
|
*/
|
|
291
286
|
expanded: PropTypes.bool,
|
|
@@ -316,11 +311,6 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
316
311
|
root: PropTypes.elementType,
|
|
317
312
|
transition: PropTypes.elementType
|
|
318
313
|
}),
|
|
319
|
-
/**
|
|
320
|
-
* If `true`, rounded corners are disabled.
|
|
321
|
-
* @default false
|
|
322
|
-
*/
|
|
323
|
-
square: PropTypes.bool,
|
|
324
314
|
/**
|
|
325
315
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
326
316
|
*/
|
package/esm/Alert/Alert.js
CHANGED
|
@@ -230,7 +230,7 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
230
230
|
...rootSlotProps,
|
|
231
231
|
children: [icon !== false ? /*#__PURE__*/_jsx(IconSlot, {
|
|
232
232
|
...iconSlotProps,
|
|
233
|
-
children: icon || iconMapping[severity]
|
|
233
|
+
children: icon || iconMapping[severity]
|
|
234
234
|
}) : null, /*#__PURE__*/_jsx(MessageSlot, {
|
|
235
235
|
...messageSlotProps,
|
|
236
236
|
children: children
|
package/esm/AppBar/AppBar.js
CHANGED
package/esm/Backdrop/Backdrop.js
CHANGED
|
@@ -69,7 +69,13 @@ const ButtonGroupRoot = styled('div', {
|
|
|
69
69
|
variant: 'contained'
|
|
70
70
|
},
|
|
71
71
|
style: {
|
|
72
|
-
boxShadow: (theme.vars || theme).shadows[2]
|
|
72
|
+
boxShadow: (theme.vars || theme).shadows[2],
|
|
73
|
+
[`& .${buttonGroupClasses.grouped}`]: {
|
|
74
|
+
boxShadow: 'none',
|
|
75
|
+
'&:hover': {
|
|
76
|
+
boxShadow: 'none'
|
|
77
|
+
}
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
80
|
}, {
|
|
75
81
|
props: {
|
|
@@ -220,16 +226,7 @@ const ButtonGroupRoot = styled('div', {
|
|
|
220
226
|
}
|
|
221
227
|
}))],
|
|
222
228
|
[`& .${buttonGroupClasses.grouped}`]: {
|
|
223
|
-
minWidth: 40
|
|
224
|
-
boxShadow: 'none',
|
|
225
|
-
props: {
|
|
226
|
-
variant: 'contained'
|
|
227
|
-
},
|
|
228
|
-
style: {
|
|
229
|
-
'&:hover': {
|
|
230
|
-
boxShadow: 'none'
|
|
231
|
-
}
|
|
232
|
-
}
|
|
229
|
+
minWidth: 40
|
|
233
230
|
}
|
|
234
231
|
})));
|
|
235
232
|
const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, ref) {
|
|
@@ -99,7 +99,6 @@ const CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(inP
|
|
|
99
99
|
elementType: CardActionAreaFocusHighlight,
|
|
100
100
|
externalForwardedProps,
|
|
101
101
|
ownerState,
|
|
102
|
-
ref,
|
|
103
102
|
className: classes.focusHighlight
|
|
104
103
|
});
|
|
105
104
|
return /*#__PURE__*/_jsxs(RootSlot, {
|
package/esm/Dialog/Dialog.js
CHANGED
|
@@ -19,8 +19,7 @@ import useSlot from "../utils/useSlot.js";
|
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
const DialogBackdrop = styled(Backdrop, {
|
|
21
21
|
name: 'MuiDialog',
|
|
22
|
-
slot: 'Backdrop'
|
|
23
|
-
overrides: (props, styles) => styles.backdrop
|
|
22
|
+
slot: 'Backdrop'
|
|
24
23
|
})({
|
|
25
24
|
// Improve scrollable dialog support.
|
|
26
25
|
zIndex: -1
|
|
@@ -35,6 +34,7 @@ const useUtilityClasses = ownerState => {
|
|
|
35
34
|
} = ownerState;
|
|
36
35
|
const slots = {
|
|
37
36
|
root: ['root'],
|
|
37
|
+
backdrop: ['backdrop'],
|
|
38
38
|
container: ['container', `scroll${capitalize(scroll)}`],
|
|
39
39
|
paper: ['paper', `paperScroll${capitalize(scroll)}`, `paperWidth${capitalize(String(maxWidth))}`, fullWidth && 'paperFullWidth', fullScreen && 'paperFullScreen']
|
|
40
40
|
};
|
|
@@ -285,7 +285,8 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
285
285
|
elementType: DialogBackdrop,
|
|
286
286
|
shouldForwardComponentProp: true,
|
|
287
287
|
externalForwardedProps,
|
|
288
|
-
ownerState
|
|
288
|
+
ownerState,
|
|
289
|
+
className: classes.backdrop
|
|
289
290
|
});
|
|
290
291
|
const [PaperSlot, paperSlotProps] = useSlot('paper', {
|
|
291
292
|
elementType: DialogPaper,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface DialogClasses {
|
|
2
2
|
/** Styles applied to the root element. */
|
|
3
3
|
root: string;
|
|
4
|
+
/** Styles applied to the backdrop element. */
|
|
5
|
+
backdrop: string;
|
|
4
6
|
/** Styles applied to the container element if `scroll="paper"`. */
|
|
5
7
|
scrollPaper: string;
|
|
6
8
|
/** Styles applied to the container element if `scroll="body"`. */
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getDialogUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiDialog', slot);
|
|
5
5
|
}
|
|
6
|
-
const dialogClasses = generateUtilityClasses('MuiDialog', ['root', 'scrollPaper', 'scrollBody', 'container', 'paper', 'paperScrollPaper', 'paperScrollBody', 'paperWidthFalse', 'paperWidthXs', 'paperWidthSm', 'paperWidthMd', 'paperWidthLg', 'paperWidthXl', 'paperFullWidth', 'paperFullScreen']);
|
|
6
|
+
const dialogClasses = generateUtilityClasses('MuiDialog', ['root', 'backdrop', 'scrollPaper', 'scrollBody', 'container', 'paper', 'paperScrollPaper', 'paperScrollBody', 'paperWidthFalse', 'paperWidthXs', 'paperWidthSm', 'paperWidthMd', 'paperWidthLg', 'paperWidthXl', 'paperFullWidth', 'paperFullScreen']);
|
|
7
7
|
export default dialogClasses;
|
|
@@ -17,7 +17,7 @@ export function ariaHidden(element, hide) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
function getPaddingRight(element) {
|
|
20
|
-
return
|
|
20
|
+
return parseFloat(ownerWindow(element).getComputedStyle(element).paddingRight) || 0;
|
|
21
21
|
}
|
|
22
22
|
function isAriaHiddenForbiddenOnElement(element) {
|
|
23
23
|
// The forbidden HTML tags are the ones from ARIA specification that
|
|
@@ -177,6 +177,22 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
177
177
|
node: inputRef.current,
|
|
178
178
|
value
|
|
179
179
|
}), [value]);
|
|
180
|
+
const open = displayNode !== null && openState;
|
|
181
|
+
React.useEffect(() => {
|
|
182
|
+
if (!open || !anchorElement || autoWidth) {
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
const observer = new ResizeObserver(() => {
|
|
189
|
+
setMenuMinWidthState(anchorElement.clientWidth);
|
|
190
|
+
});
|
|
191
|
+
observer.observe(anchorElement);
|
|
192
|
+
return () => {
|
|
193
|
+
observer.disconnect();
|
|
194
|
+
};
|
|
195
|
+
}, [open, anchorElement, autoWidth]);
|
|
180
196
|
|
|
181
197
|
// Resize menu on `defaultOpen` automatic toggle.
|
|
182
198
|
React.useEffect(() => {
|
|
@@ -212,8 +228,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
212
228
|
}
|
|
213
229
|
return undefined;
|
|
214
230
|
}, [labelId]);
|
|
215
|
-
const update = (
|
|
216
|
-
if (
|
|
231
|
+
const update = (openParam, event) => {
|
|
232
|
+
if (openParam) {
|
|
217
233
|
if (onOpen) {
|
|
218
234
|
onOpen(event);
|
|
219
235
|
}
|
|
@@ -222,7 +238,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
222
238
|
}
|
|
223
239
|
if (!isOpenControlled) {
|
|
224
240
|
setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
|
|
225
|
-
setOpenState(
|
|
241
|
+
setOpenState(openParam);
|
|
226
242
|
}
|
|
227
243
|
};
|
|
228
244
|
const handleMouseDown = event => {
|
|
@@ -309,7 +325,6 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
309
325
|
onKeyDown?.(event);
|
|
310
326
|
}
|
|
311
327
|
};
|
|
312
|
-
const open = displayNode !== null && openState;
|
|
313
328
|
const handleBlur = event => {
|
|
314
329
|
// if open event.stopImmediatePropagation
|
|
315
330
|
if (!open && onBlur) {
|
package/esm/Tabs/Tabs.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export type TabsSlotsAndSlotProps = CreateSlotsAndSlotProps<TabsSlots, {
|
|
|
87
87
|
*/
|
|
88
88
|
indicator: SlotProps<'span', TabsIndicatorSlotPropsOverrides, TabsOwnerState>;
|
|
89
89
|
/**
|
|
90
|
-
* Props forwarded to the
|
|
90
|
+
* Props forwarded to the scrollButtons slot.
|
|
91
91
|
* By default, the available props are based on the [TabScrollButton](https://mui.com/material-ui/api/tab-scroll-button/#props) component.
|
|
92
92
|
*/
|
|
93
93
|
scrollButtons: SlotProps<typeof TabScrollButton, TabsScrollButtonsSlotPropsOverrides, TabsOwnerState>;
|
package/esm/Tabs/Tabs.js
CHANGED
|
@@ -148,12 +148,12 @@ function FocusTrap(props) {
|
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
const doc = ownerDocument(rootRef.current);
|
|
151
|
-
const activeElement = getActiveElement(doc);
|
|
152
151
|
const loopFocus = nativeEvent => {
|
|
153
152
|
lastKeydown.current = nativeEvent;
|
|
154
153
|
if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
|
|
155
154
|
return;
|
|
156
155
|
}
|
|
156
|
+
const activeElement = getActiveElement(doc);
|
|
157
157
|
|
|
158
158
|
// Make sure the next tab starts from the right place.
|
|
159
159
|
// activeElement refers to the origin.
|
package/esm/index.js
CHANGED
|
@@ -135,7 +135,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
|
|
|
135
135
|
};
|
|
136
136
|
const handleInputChange = event => {
|
|
137
137
|
// Workaround for https://github.com/facebook/react/issues/9023
|
|
138
|
-
if (event.nativeEvent.defaultPrevented) {
|
|
138
|
+
if (event.nativeEvent.defaultPrevented || readOnly) {
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
const newChecked = event.target.checked;
|
package/esm/locale/arEG.js
CHANGED
package/esm/locale/arSA.js
CHANGED
package/esm/locale/arSD.js
CHANGED
package/esm/locale/kuCKB.js
CHANGED
package/esm/locale/neNP.js
CHANGED
|
@@ -584,9 +584,17 @@ function useAutocomplete(props) {
|
|
|
584
584
|
handleClose(event, 'toggleInput');
|
|
585
585
|
}
|
|
586
586
|
let nextItem = focusedItem;
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
|
|
588
|
+
// When moving focus from the input to tags with ArrowLeft,
|
|
589
|
+
// always jump to the last tag (if any) from the input.
|
|
590
|
+
if (focusedItem === -1 && direction === 'previous') {
|
|
591
|
+
nextItem = value.length - 1;
|
|
592
|
+
// In freeSolo, clear any draft text so it doesn't "come back" later.
|
|
593
|
+
if (freeSolo && inputValue !== '') {
|
|
594
|
+
setInputValueState('');
|
|
595
|
+
if (onInputChange) {
|
|
596
|
+
onInputChange(event, '', 'reset');
|
|
597
|
+
}
|
|
590
598
|
}
|
|
591
599
|
} else {
|
|
592
600
|
nextItem += direction === 'next' ? 1 : -1;
|
|
@@ -693,13 +701,34 @@ function useAutocomplete(props) {
|
|
|
693
701
|
handleOpen(event);
|
|
694
702
|
break;
|
|
695
703
|
case 'ArrowLeft':
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
704
|
+
{
|
|
705
|
+
const input = inputRef.current;
|
|
706
|
+
// Only handle ArrowLeft when the caret is at the start of the input.
|
|
707
|
+
// Otherwise let the browser move the caret normally.
|
|
708
|
+
const caretAtStart = input && input.selectionStart === 0 && input.selectionEnd === 0;
|
|
709
|
+
if (!caretAtStart) {
|
|
710
|
+
// Let the browser handle normal cursor movement
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// Single-value rendering: move focus from input to the single tag.
|
|
715
|
+
if (!multiple && renderValue && value != null) {
|
|
716
|
+
// Moving from input to single tag; clear freeSolo draft text,
|
|
717
|
+
// so it doesn't reappear when we move back.
|
|
718
|
+
if (freeSolo && inputValue !== '') {
|
|
719
|
+
setInputValueState('');
|
|
720
|
+
if (onInputChange) {
|
|
721
|
+
onInputChange(event, '', 'reset');
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
setFocusedItem(0);
|
|
725
|
+
focusItem(0);
|
|
726
|
+
} else {
|
|
727
|
+
// Multi-value: delegate to tag navigation helper.
|
|
728
|
+
handleFocusItem(event, 'previous');
|
|
729
|
+
}
|
|
730
|
+
break;
|
|
701
731
|
}
|
|
702
|
-
break;
|
|
703
732
|
case 'ArrowRight':
|
|
704
733
|
if (!multiple && renderValue) {
|
|
705
734
|
setFocusedItem(-1);
|
|
@@ -757,10 +786,10 @@ function useAutocomplete(props) {
|
|
|
757
786
|
option: value[index]
|
|
758
787
|
});
|
|
759
788
|
}
|
|
760
|
-
if (!multiple && renderValue && !readOnly) {
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
789
|
+
if (!multiple && renderValue && !readOnly && inputValue === '') {
|
|
790
|
+
handleValue(event, null, 'removeOption', {
|
|
791
|
+
option: value
|
|
792
|
+
});
|
|
764
793
|
}
|
|
765
794
|
break;
|
|
766
795
|
case 'Delete':
|
|
@@ -773,10 +802,12 @@ function useAutocomplete(props) {
|
|
|
773
802
|
option: value[index]
|
|
774
803
|
});
|
|
775
804
|
}
|
|
776
|
-
if (!multiple && renderValue && !readOnly) {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
805
|
+
if (!multiple && renderValue && !readOnly && inputValue === '') {
|
|
806
|
+
// Single-value rendering: Delete on empty input removes
|
|
807
|
+
// the single rendered option, same "removeOption" reason as multiple.
|
|
808
|
+
handleValue(event, null, 'removeOption', {
|
|
809
|
+
option: value
|
|
810
|
+
});
|
|
780
811
|
}
|
|
781
812
|
break;
|
|
782
813
|
default:
|
|
@@ -826,7 +857,9 @@ function useAutocomplete(props) {
|
|
|
826
857
|
}
|
|
827
858
|
}
|
|
828
859
|
if (newValue === '') {
|
|
829
|
-
|
|
860
|
+
// For normal single-select, clearing the input clears the value.
|
|
861
|
+
// For renderValue (chip-style single), only Backspace/Delete clear the value.
|
|
862
|
+
if (!disableClearable && !multiple && !renderValue) {
|
|
830
863
|
handleValue(event, null, 'clear');
|
|
831
864
|
}
|
|
832
865
|
} else {
|
package/esm/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "7.3.
|
|
1
|
+
export const version = "7.3.7";
|
|
2
2
|
export const major = Number("7");
|
|
3
3
|
export const minor = Number("3");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("7");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|
package/index.js
CHANGED
package/internal/SwitchBase.js
CHANGED
|
@@ -142,7 +142,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
|
|
|
142
142
|
};
|
|
143
143
|
const handleInputChange = event => {
|
|
144
144
|
// Workaround for https://github.com/facebook/react/issues/9023
|
|
145
|
-
if (event.nativeEvent.defaultPrevented) {
|
|
145
|
+
if (event.nativeEvent.defaultPrevented || readOnly) {
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
const newChecked = event.target.checked;
|
package/locale/arEG.js
CHANGED
package/locale/arSA.js
CHANGED
package/locale/arSD.js
CHANGED
package/locale/kuCKB.js
CHANGED
package/locale/neNP.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.7",
|
|
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
|
"keywords": [
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"@popperjs/core": "^2.11.8",
|
|
30
30
|
"@types/react-transition-group": "^4.4.12",
|
|
31
31
|
"clsx": "^2.1.1",
|
|
32
|
-
"csstype": "^3.
|
|
32
|
+
"csstype": "^3.2.3",
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
|
-
"react-is": "^19.2.
|
|
34
|
+
"react-is": "^19.2.3",
|
|
35
35
|
"react-transition-group": "^4.4.5",
|
|
36
|
-
"@mui/core-downloads-tracker": "^7.3.
|
|
37
|
-
"@mui/system": "^7.3.
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/
|
|
36
|
+
"@mui/core-downloads-tracker": "^7.3.7",
|
|
37
|
+
"@mui/system": "^7.3.7",
|
|
38
|
+
"@mui/utils": "^7.3.7",
|
|
39
|
+
"@mui/types": "^7.4.10"
|
|
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": "^7.3.
|
|
47
|
+
"@mui/material-pigment-css": "^7.3.7"
|
|
48
48
|
},
|
|
49
49
|
"peerDependenciesMeta": {
|
|
50
50
|
"@types/react": {
|
|
@@ -592,9 +592,17 @@ function useAutocomplete(props) {
|
|
|
592
592
|
handleClose(event, 'toggleInput');
|
|
593
593
|
}
|
|
594
594
|
let nextItem = focusedItem;
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
595
|
+
|
|
596
|
+
// When moving focus from the input to tags with ArrowLeft,
|
|
597
|
+
// always jump to the last tag (if any) from the input.
|
|
598
|
+
if (focusedItem === -1 && direction === 'previous') {
|
|
599
|
+
nextItem = value.length - 1;
|
|
600
|
+
// In freeSolo, clear any draft text so it doesn't "come back" later.
|
|
601
|
+
if (freeSolo && inputValue !== '') {
|
|
602
|
+
setInputValueState('');
|
|
603
|
+
if (onInputChange) {
|
|
604
|
+
onInputChange(event, '', 'reset');
|
|
605
|
+
}
|
|
598
606
|
}
|
|
599
607
|
} else {
|
|
600
608
|
nextItem += direction === 'next' ? 1 : -1;
|
|
@@ -701,13 +709,34 @@ function useAutocomplete(props) {
|
|
|
701
709
|
handleOpen(event);
|
|
702
710
|
break;
|
|
703
711
|
case 'ArrowLeft':
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
712
|
+
{
|
|
713
|
+
const input = inputRef.current;
|
|
714
|
+
// Only handle ArrowLeft when the caret is at the start of the input.
|
|
715
|
+
// Otherwise let the browser move the caret normally.
|
|
716
|
+
const caretAtStart = input && input.selectionStart === 0 && input.selectionEnd === 0;
|
|
717
|
+
if (!caretAtStart) {
|
|
718
|
+
// Let the browser handle normal cursor movement
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
// Single-value rendering: move focus from input to the single tag.
|
|
723
|
+
if (!multiple && renderValue && value != null) {
|
|
724
|
+
// Moving from input to single tag; clear freeSolo draft text,
|
|
725
|
+
// so it doesn't reappear when we move back.
|
|
726
|
+
if (freeSolo && inputValue !== '') {
|
|
727
|
+
setInputValueState('');
|
|
728
|
+
if (onInputChange) {
|
|
729
|
+
onInputChange(event, '', 'reset');
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
setFocusedItem(0);
|
|
733
|
+
focusItem(0);
|
|
734
|
+
} else {
|
|
735
|
+
// Multi-value: delegate to tag navigation helper.
|
|
736
|
+
handleFocusItem(event, 'previous');
|
|
737
|
+
}
|
|
738
|
+
break;
|
|
709
739
|
}
|
|
710
|
-
break;
|
|
711
740
|
case 'ArrowRight':
|
|
712
741
|
if (!multiple && renderValue) {
|
|
713
742
|
setFocusedItem(-1);
|
|
@@ -765,10 +794,10 @@ function useAutocomplete(props) {
|
|
|
765
794
|
option: value[index]
|
|
766
795
|
});
|
|
767
796
|
}
|
|
768
|
-
if (!multiple && renderValue && !readOnly) {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
797
|
+
if (!multiple && renderValue && !readOnly && inputValue === '') {
|
|
798
|
+
handleValue(event, null, 'removeOption', {
|
|
799
|
+
option: value
|
|
800
|
+
});
|
|
772
801
|
}
|
|
773
802
|
break;
|
|
774
803
|
case 'Delete':
|
|
@@ -781,10 +810,12 @@ function useAutocomplete(props) {
|
|
|
781
810
|
option: value[index]
|
|
782
811
|
});
|
|
783
812
|
}
|
|
784
|
-
if (!multiple && renderValue && !readOnly) {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
813
|
+
if (!multiple && renderValue && !readOnly && inputValue === '') {
|
|
814
|
+
// Single-value rendering: Delete on empty input removes
|
|
815
|
+
// the single rendered option, same "removeOption" reason as multiple.
|
|
816
|
+
handleValue(event, null, 'removeOption', {
|
|
817
|
+
option: value
|
|
818
|
+
});
|
|
788
819
|
}
|
|
789
820
|
break;
|
|
790
821
|
default:
|
|
@@ -834,7 +865,9 @@ function useAutocomplete(props) {
|
|
|
834
865
|
}
|
|
835
866
|
}
|
|
836
867
|
if (newValue === '') {
|
|
837
|
-
|
|
868
|
+
// For normal single-select, clearing the input clears the value.
|
|
869
|
+
// For renderValue (chip-style single), only Backspace/Delete clear the value.
|
|
870
|
+
if (!disableClearable && !multiple && !renderValue) {
|
|
838
871
|
handleValue(event, null, 'clear');
|
|
839
872
|
}
|
|
840
873
|
} else {
|
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 = "7.3.
|
|
7
|
+
const version = exports.version = "7.3.7";
|
|
8
8
|
const major = exports.major = Number("7");
|
|
9
9
|
const minor = exports.minor = Number("3");
|
|
10
|
-
const patch = exports.patch = Number("
|
|
10
|
+
const patch = exports.patch = Number("7");
|
|
11
11
|
const prerelease = exports.prerelease = undefined;
|
|
12
12
|
var _default = exports.default = version;
|