@mui/material 9.0.0-beta.0 → 9.0.0-beta.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/Accordion/Accordion.d.mts +1 -1
- package/Accordion/Accordion.d.ts +1 -1
- package/AccordionSummary/AccordionSummary.js +1 -0
- package/AccordionSummary/AccordionSummary.mjs +1 -0
- package/Backdrop/Backdrop.d.mts +1 -1
- package/Backdrop/Backdrop.d.ts +1 -1
- package/BottomNavigationAction/BottomNavigationAction.js +1 -0
- package/BottomNavigationAction/BottomNavigationAction.mjs +1 -0
- package/Breadcrumbs/BreadcrumbCollapsed.js +5 -1
- package/Breadcrumbs/BreadcrumbCollapsed.mjs +5 -1
- package/Button/Button.js +1 -0
- package/Button/Button.mjs +1 -0
- package/ButtonBase/ButtonBase.d.mts +5 -0
- package/ButtonBase/ButtonBase.d.ts +5 -0
- package/ButtonBase/ButtonBase.js +84 -85
- package/ButtonBase/ButtonBase.mjs +84 -85
- package/ButtonBase/useButtonBase.d.mts +91 -0
- package/ButtonBase/useButtonBase.d.ts +91 -0
- package/ButtonBase/useButtonBase.js +174 -0
- package/ButtonBase/useButtonBase.mjs +167 -0
- package/CHANGELOG.md +48 -0
- package/CardActionArea/CardActionArea.js +1 -0
- package/CardActionArea/CardActionArea.mjs +1 -0
- package/Chip/Chip.d.mts +7 -0
- package/Chip/Chip.d.ts +7 -0
- package/Chip/Chip.js +18 -1
- package/Chip/Chip.mjs +18 -1
- package/Dialog/Dialog.d.mts +8 -1
- package/Dialog/Dialog.d.ts +8 -1
- package/Dialog/Dialog.js +9 -1
- package/Dialog/Dialog.mjs +9 -1
- package/Divider/Divider.js +0 -8
- package/Divider/Divider.mjs +0 -8
- package/Drawer/Drawer.d.mts +1 -1
- package/Drawer/Drawer.d.ts +1 -1
- package/Fab/Fab.js +1 -0
- package/Fab/Fab.mjs +1 -0
- package/FilledInput/FilledInput.js +1 -1
- package/FilledInput/FilledInput.mjs +1 -1
- package/Grid/Grid.d.mts +8 -3
- package/Grid/Grid.d.ts +8 -3
- package/Grid/Grid.js +8 -3
- package/Grid/Grid.mjs +8 -3
- package/Grid/gridClasses.js +1 -1
- package/Grid/gridClasses.mjs +1 -1
- package/IconButton/IconButton.js +1 -0
- package/IconButton/IconButton.mjs +1 -0
- package/Input/Input.js +1 -1
- package/Input/Input.mjs +1 -1
- package/InputAdornment/inputAdornmentClasses.d.mts +2 -2
- package/InputAdornment/inputAdornmentClasses.d.ts +2 -2
- package/ListItemButton/ListItemButton.js +1 -0
- package/ListItemButton/ListItemButton.mjs +1 -0
- package/ListItemIcon/ListItemIcon.js +1 -1
- package/ListItemIcon/ListItemIcon.mjs +1 -1
- package/ListSubheader/ListSubheader.js +0 -3
- package/ListSubheader/ListSubheader.mjs +0 -3
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +15 -32
- package/Menu/Menu.mjs +15 -32
- package/MenuItem/MenuItem.js +36 -26
- package/MenuItem/MenuItem.mjs +34 -26
- package/MenuList/MenuList.js +136 -101
- package/MenuList/MenuList.mjs +135 -100
- package/MenuList/MenuListContext.d.mts +11 -0
- package/MenuList/MenuListContext.d.ts +11 -0
- package/MenuList/MenuListContext.js +25 -0
- package/MenuList/MenuListContext.mjs +19 -0
- package/PaginationItem/PaginationItem.d.mts +5 -0
- package/PaginationItem/PaginationItem.d.ts +5 -0
- package/PaginationItem/PaginationItem.js +6 -0
- package/PaginationItem/PaginationItem.mjs +6 -0
- package/PigmentGrid/PigmentGrid.d.mts +1 -1
- package/PigmentGrid/PigmentGrid.d.ts +1 -1
- package/PigmentGrid/PigmentGrid.js +1 -1
- package/PigmentGrid/PigmentGrid.mjs +1 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/Popover/Popover.js +19 -7
- package/Popover/Popover.mjs +18 -6
- package/Snackbar/Snackbar.d.mts +1 -1
- package/Snackbar/Snackbar.d.ts +1 -1
- package/SpeedDial/SpeedDial.d.mts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/StepButton/StepButton.js +44 -14
- package/StepButton/StepButton.mjs +44 -14
- package/StepContent/StepContent.d.mts +1 -1
- package/StepContent/StepContent.d.ts +1 -1
- package/Stepper/Stepper.js +54 -22
- package/Stepper/Stepper.mjs +54 -22
- package/Stepper/StepperContext.d.mts +0 -5
- package/Stepper/StepperContext.d.ts +0 -5
- package/Stepper/StepperContext.js +1 -2
- package/Stepper/StepperContext.mjs +0 -1
- package/Tab/Tab.js +17 -1
- package/Tab/Tab.mjs +17 -1
- package/TabScrollButton/TabScrollButton.d.mts +1 -1
- package/TabScrollButton/TabScrollButton.d.ts +1 -1
- package/TabScrollButton/TabScrollButton.js +6 -2
- package/TabScrollButton/TabScrollButton.mjs +6 -2
- package/TableSortLabel/TableSortLabel.js +4 -1
- package/TableSortLabel/TableSortLabel.mjs +4 -1
- package/Tabs/Tabs.js +30 -21
- package/Tabs/Tabs.mjs +29 -20
- package/ToggleButton/ToggleButton.js +1 -0
- package/ToggleButton/ToggleButton.mjs +1 -0
- package/Tooltip/Tooltip.d.mts +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/SwitchBase.d.mts +2 -2
- package/internal/SwitchBase.d.ts +2 -2
- package/internal/SwitchBase.js +5 -1
- package/internal/SwitchBase.mjs +5 -1
- package/locale/psAF.js +1 -1
- package/locale/psAF.mjs +1 -1
- package/package.json +5 -5
- package/styles/createThemeWithVars.js +9 -9
- package/styles/createThemeWithVars.mjs +9 -9
- package/useAutocomplete/useAutocomplete.js +8 -0
- package/useAutocomplete/useAutocomplete.mjs +8 -0
- package/utils/focusWithVisible.js +24 -0
- package/utils/focusWithVisible.mjs +19 -0
- package/utils/index.d.mts +0 -1
- package/utils/index.d.ts +0 -1
- package/utils/index.js +0 -7
- package/utils/index.mjs +0 -1
- package/utils/useFocusableWhenDisabled.d.mts +30 -0
- package/utils/useFocusableWhenDisabled.d.ts +30 -0
- package/utils/useFocusableWhenDisabled.js +47 -0
- package/utils/useFocusableWhenDisabled.mjs +41 -0
- package/utils/useRovingTabIndex.d.mts +1 -2
- package/utils/useRovingTabIndex.d.ts +1 -2
- package/utils/useRovingTabIndex.js +25 -4
- package/utils/useRovingTabIndex.mjs +1 -2
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
package/Chip/Chip.js
CHANGED
|
@@ -20,6 +20,7 @@ var _zeroStyled = require("../zero-styled");
|
|
|
20
20
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
21
21
|
var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/createSimplePaletteValueFilter"));
|
|
22
22
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
23
|
+
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
23
24
|
var _chipClasses = _interopRequireWildcard(require("./chipClasses"));
|
|
24
25
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
25
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -45,6 +46,7 @@ const useUtilityClasses = ownerState => {
|
|
|
45
46
|
const ChipRoot = (0, _zeroStyled.styled)('div', {
|
|
46
47
|
name: 'MuiChip',
|
|
47
48
|
slot: 'Root',
|
|
49
|
+
shouldForwardProp: prop => (0, _rootShouldForwardProp.default)(prop) && prop !== 'focusableWhenDisabled' && prop !== 'skipFocusWhenDisabled',
|
|
48
50
|
overridesResolver: (props, styles) => {
|
|
49
51
|
const {
|
|
50
52
|
ownerState
|
|
@@ -377,6 +379,10 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
377
379
|
slotProps = {},
|
|
378
380
|
...other
|
|
379
381
|
} = props;
|
|
382
|
+
const {
|
|
383
|
+
nativeButton,
|
|
384
|
+
...buttonBaseProps
|
|
385
|
+
} = other;
|
|
380
386
|
const chipRef = React.useRef(null);
|
|
381
387
|
const handleRef = (0, _useForkRef.default)(chipRef, ref);
|
|
382
388
|
const handleDeleteIconClick = event => {
|
|
@@ -422,9 +428,13 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
422
428
|
const classes = useUtilityClasses(ownerState);
|
|
423
429
|
const moreProps = component === _ButtonBase.default ? {
|
|
424
430
|
component: ComponentProp || 'div',
|
|
431
|
+
internalNativeButton: false,
|
|
425
432
|
focusVisibleClassName: classes.focusVisible,
|
|
426
433
|
...(onDelete && {
|
|
427
434
|
disableRipple: true
|
|
435
|
+
}),
|
|
436
|
+
...(nativeButton !== undefined && {
|
|
437
|
+
nativeButton
|
|
428
438
|
})
|
|
429
439
|
} : {};
|
|
430
440
|
let deleteIcon = null;
|
|
@@ -462,7 +472,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
462
472
|
elementType: ChipRoot,
|
|
463
473
|
externalForwardedProps: {
|
|
464
474
|
...externalForwardedProps,
|
|
465
|
-
...
|
|
475
|
+
...buttonBaseProps
|
|
466
476
|
},
|
|
467
477
|
ownerState,
|
|
468
478
|
// The `component` prop is preserved because `Chip` relies on it for internal logic. If `shouldForwardComponentProp` were `false`, `useSlot` would remove the `component` prop, potentially breaking the component's behavior.
|
|
@@ -565,6 +575,13 @@ process.env.NODE_ENV !== "production" ? Chip.propTypes /* remove-proptypes */ =
|
|
|
565
575
|
* The content of the component.
|
|
566
576
|
*/
|
|
567
577
|
label: _propTypes.default.node,
|
|
578
|
+
/**
|
|
579
|
+
* If `true`, the component is expected to resolve to a native `<button>` element.
|
|
580
|
+
* When omitted, custom components inherit the default button semantics of the current wrapper.
|
|
581
|
+
* Set to `true` when a custom component resolves to a native `<button>`, or `false`
|
|
582
|
+
* when it resolves to a non-button host.
|
|
583
|
+
*/
|
|
584
|
+
nativeButton: _propTypes.default.bool,
|
|
568
585
|
/**
|
|
569
586
|
* @ignore
|
|
570
587
|
*/
|
package/Chip/Chip.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import { styled } from "../zero-styled/index.mjs";
|
|
|
13
13
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
14
14
|
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.mjs";
|
|
15
15
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
16
|
+
import rootShouldForwardProp from "../styles/rootShouldForwardProp.mjs";
|
|
16
17
|
import chipClasses, { getChipUtilityClass } from "./chipClasses.mjs";
|
|
17
18
|
import useSlot from "../utils/useSlot.mjs";
|
|
18
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -38,6 +39,7 @@ const useUtilityClasses = ownerState => {
|
|
|
38
39
|
const ChipRoot = styled('div', {
|
|
39
40
|
name: 'MuiChip',
|
|
40
41
|
slot: 'Root',
|
|
42
|
+
shouldForwardProp: prop => rootShouldForwardProp(prop) && prop !== 'focusableWhenDisabled' && prop !== 'skipFocusWhenDisabled',
|
|
41
43
|
overridesResolver: (props, styles) => {
|
|
42
44
|
const {
|
|
43
45
|
ownerState
|
|
@@ -370,6 +372,10 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
370
372
|
slotProps = {},
|
|
371
373
|
...other
|
|
372
374
|
} = props;
|
|
375
|
+
const {
|
|
376
|
+
nativeButton,
|
|
377
|
+
...buttonBaseProps
|
|
378
|
+
} = other;
|
|
373
379
|
const chipRef = React.useRef(null);
|
|
374
380
|
const handleRef = useForkRef(chipRef, ref);
|
|
375
381
|
const handleDeleteIconClick = event => {
|
|
@@ -415,9 +421,13 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
415
421
|
const classes = useUtilityClasses(ownerState);
|
|
416
422
|
const moreProps = component === ButtonBase ? {
|
|
417
423
|
component: ComponentProp || 'div',
|
|
424
|
+
internalNativeButton: false,
|
|
418
425
|
focusVisibleClassName: classes.focusVisible,
|
|
419
426
|
...(onDelete && {
|
|
420
427
|
disableRipple: true
|
|
428
|
+
}),
|
|
429
|
+
...(nativeButton !== undefined && {
|
|
430
|
+
nativeButton
|
|
421
431
|
})
|
|
422
432
|
} : {};
|
|
423
433
|
let deleteIcon = null;
|
|
@@ -455,7 +465,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
455
465
|
elementType: ChipRoot,
|
|
456
466
|
externalForwardedProps: {
|
|
457
467
|
...externalForwardedProps,
|
|
458
|
-
...
|
|
468
|
+
...buttonBaseProps
|
|
459
469
|
},
|
|
460
470
|
ownerState,
|
|
461
471
|
// The `component` prop is preserved because `Chip` relies on it for internal logic. If `shouldForwardComponentProp` were `false`, `useSlot` would remove the `component` prop, potentially breaking the component's behavior.
|
|
@@ -558,6 +568,13 @@ process.env.NODE_ENV !== "production" ? Chip.propTypes /* remove-proptypes */ =
|
|
|
558
568
|
* The content of the component.
|
|
559
569
|
*/
|
|
560
570
|
label: PropTypes.node,
|
|
571
|
+
/**
|
|
572
|
+
* If `true`, the component is expected to resolve to a native `<button>` element.
|
|
573
|
+
* When omitted, custom components inherit the default button semantics of the current wrapper.
|
|
574
|
+
* Set to `true` when a custom component resolves to a native `<button>`, or `false`
|
|
575
|
+
* when it resolves to a non-button host.
|
|
576
|
+
*/
|
|
577
|
+
nativeButton: PropTypes.bool,
|
|
561
578
|
/**
|
|
562
579
|
* @ignore
|
|
563
580
|
*/
|
package/Dialog/Dialog.d.mts
CHANGED
|
@@ -58,7 +58,7 @@ export type DialogSlotsAndSlotProps = CreateSlotsAndSlotProps<DialogSlots, {
|
|
|
58
58
|
* Props forwarded to the transition slot.
|
|
59
59
|
* By default, the available props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component.
|
|
60
60
|
*/
|
|
61
|
-
transition: SlotComponentProps<React.ElementType
|
|
61
|
+
transition: SlotComponentProps<React.ElementType<TransitionProps>, TransitionProps & DialogTransitionSlotPropsOverrides, DialogOwnerState>;
|
|
62
62
|
/**
|
|
63
63
|
* Props forwarded to the paper slot.
|
|
64
64
|
* By default, the available props are based on the [Paper](https://mui.com/material-ui/api/paper/#props) component.
|
|
@@ -118,6 +118,13 @@ export interface DialogProps extends Omit<StandardProps<ModalProps, 'children'>,
|
|
|
118
118
|
* If `true`, the component is shown.
|
|
119
119
|
*/
|
|
120
120
|
open: ModalProps['open'];
|
|
121
|
+
/**
|
|
122
|
+
* The ARIA role for the dialog element.
|
|
123
|
+
* The main dialog role is `dialog`, but `alertdialog` can be used if the content of the dialog requires immediate attention.
|
|
124
|
+
* See https://www.w3.org/TR/wai-aria-1.2/#dialog and https://www.w3.org/TR/wai-aria-1.2/#alertdialog for more details.
|
|
125
|
+
* @default 'dialog'
|
|
126
|
+
*/
|
|
127
|
+
role?: 'dialog' | 'alertdialog' | undefined;
|
|
121
128
|
/**
|
|
122
129
|
* The component used to render the body of the dialog.
|
|
123
130
|
* @default Paper
|
package/Dialog/Dialog.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export type DialogSlotsAndSlotProps = CreateSlotsAndSlotProps<DialogSlots, {
|
|
|
58
58
|
* Props forwarded to the transition slot.
|
|
59
59
|
* By default, the available props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component.
|
|
60
60
|
*/
|
|
61
|
-
transition: SlotComponentProps<React.ElementType
|
|
61
|
+
transition: SlotComponentProps<React.ElementType<TransitionProps>, TransitionProps & DialogTransitionSlotPropsOverrides, DialogOwnerState>;
|
|
62
62
|
/**
|
|
63
63
|
* Props forwarded to the paper slot.
|
|
64
64
|
* By default, the available props are based on the [Paper](https://mui.com/material-ui/api/paper/#props) component.
|
|
@@ -118,6 +118,13 @@ export interface DialogProps extends Omit<StandardProps<ModalProps, 'children'>,
|
|
|
118
118
|
* If `true`, the component is shown.
|
|
119
119
|
*/
|
|
120
120
|
open: ModalProps['open'];
|
|
121
|
+
/**
|
|
122
|
+
* The ARIA role for the dialog element.
|
|
123
|
+
* The main dialog role is `dialog`, but `alertdialog` can be used if the content of the dialog requires immediate attention.
|
|
124
|
+
* See https://www.w3.org/TR/wai-aria-1.2/#dialog and https://www.w3.org/TR/wai-aria-1.2/#alertdialog for more details.
|
|
125
|
+
* @default 'dialog'
|
|
126
|
+
*/
|
|
127
|
+
role?: 'dialog' | 'alertdialog' | undefined;
|
|
121
128
|
/**
|
|
122
129
|
* The component used to render the body of the dialog.
|
|
123
130
|
* @default Paper
|
package/Dialog/Dialog.js
CHANGED
|
@@ -233,6 +233,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
233
233
|
onClose,
|
|
234
234
|
open,
|
|
235
235
|
PaperComponent = _Paper.default,
|
|
236
|
+
role = 'dialog',
|
|
236
237
|
scroll = 'paper',
|
|
237
238
|
slots = {},
|
|
238
239
|
slotProps = {},
|
|
@@ -340,7 +341,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
340
341
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PaperSlot, {
|
|
341
342
|
as: PaperComponent,
|
|
342
343
|
elevation: 24,
|
|
343
|
-
role:
|
|
344
|
+
role: role,
|
|
344
345
|
"aria-describedby": ariaDescribedby,
|
|
345
346
|
"aria-labelledby": ariaLabelledby,
|
|
346
347
|
"aria-modal": ariaModal,
|
|
@@ -424,6 +425,13 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
|
|
|
424
425
|
* @default Paper
|
|
425
426
|
*/
|
|
426
427
|
PaperComponent: _propTypes.default.elementType,
|
|
428
|
+
/**
|
|
429
|
+
* The ARIA role for the dialog element.
|
|
430
|
+
* The main dialog role is `dialog`, but `alertdialog` can be used if the content of the dialog requires immediate attention.
|
|
431
|
+
* See https://www.w3.org/TR/wai-aria-1.2/#dialog and https://www.w3.org/TR/wai-aria-1.2/#alertdialog for more details.
|
|
432
|
+
* @default 'dialog'
|
|
433
|
+
*/
|
|
434
|
+
role: _propTypes.default.oneOf(['alertdialog', 'dialog']),
|
|
427
435
|
/**
|
|
428
436
|
* Determine the container for scrolling the dialog.
|
|
429
437
|
* @default 'paper'
|
package/Dialog/Dialog.mjs
CHANGED
|
@@ -226,6 +226,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
226
226
|
onClose,
|
|
227
227
|
open,
|
|
228
228
|
PaperComponent = Paper,
|
|
229
|
+
role = 'dialog',
|
|
229
230
|
scroll = 'paper',
|
|
230
231
|
slots = {},
|
|
231
232
|
slotProps = {},
|
|
@@ -333,7 +334,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
333
334
|
children: /*#__PURE__*/_jsx(PaperSlot, {
|
|
334
335
|
as: PaperComponent,
|
|
335
336
|
elevation: 24,
|
|
336
|
-
role:
|
|
337
|
+
role: role,
|
|
337
338
|
"aria-describedby": ariaDescribedby,
|
|
338
339
|
"aria-labelledby": ariaLabelledby,
|
|
339
340
|
"aria-modal": ariaModal,
|
|
@@ -417,6 +418,13 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
|
|
|
417
418
|
* @default Paper
|
|
418
419
|
*/
|
|
419
420
|
PaperComponent: PropTypes.elementType,
|
|
421
|
+
/**
|
|
422
|
+
* The ARIA role for the dialog element.
|
|
423
|
+
* The main dialog role is `dialog`, but `alertdialog` can be used if the content of the dialog requires immediate attention.
|
|
424
|
+
* See https://www.w3.org/TR/wai-aria-1.2/#dialog and https://www.w3.org/TR/wai-aria-1.2/#alertdialog for more details.
|
|
425
|
+
* @default 'dialog'
|
|
426
|
+
*/
|
|
427
|
+
role: PropTypes.oneOf(['alertdialog', 'dialog']),
|
|
420
428
|
/**
|
|
421
429
|
* Determine the container for scrolling the dialog.
|
|
422
430
|
* @default 'paper'
|
package/Divider/Divider.js
CHANGED
|
@@ -236,14 +236,6 @@ const Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {
|
|
|
236
236
|
}) : null
|
|
237
237
|
});
|
|
238
238
|
});
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* The following flag is used to ensure that this component isn't tabbable i.e.
|
|
242
|
-
* does not get highlight/focus inside of MUI List.
|
|
243
|
-
*/
|
|
244
|
-
if (Divider) {
|
|
245
|
-
Divider.muiSkipListHighlight = true;
|
|
246
|
-
}
|
|
247
239
|
process.env.NODE_ENV !== "production" ? Divider.propTypes /* remove-proptypes */ = {
|
|
248
240
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
249
241
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
package/Divider/Divider.mjs
CHANGED
|
@@ -229,14 +229,6 @@ const Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {
|
|
|
229
229
|
}) : null
|
|
230
230
|
});
|
|
231
231
|
});
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* The following flag is used to ensure that this component isn't tabbable i.e.
|
|
235
|
-
* does not get highlight/focus inside of MUI List.
|
|
236
|
-
*/
|
|
237
|
-
if (Divider) {
|
|
238
|
-
Divider.muiSkipListHighlight = true;
|
|
239
|
-
}
|
|
240
232
|
process.env.NODE_ENV !== "production" ? Divider.propTypes /* remove-proptypes */ = {
|
|
241
233
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
242
234
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
package/Drawer/Drawer.d.mts
CHANGED
|
@@ -66,7 +66,7 @@ export type DrawerSlotsAndSlotProps = CreateSlotsAndSlotProps<DrawerSlots, {
|
|
|
66
66
|
* Props forwarded to the transition slot.
|
|
67
67
|
* By default, the available props are based on the [Slide](https://mui.com/material-ui/api/slide/#props) component.
|
|
68
68
|
*/
|
|
69
|
-
transition: SlotProps<React.ElementType
|
|
69
|
+
transition: SlotProps<React.ElementType<TransitionProps>, TransitionProps & DrawerTransitionSlotPropsOverrides, DrawerOwnerState>;
|
|
70
70
|
}>;
|
|
71
71
|
export interface DrawerProps extends StandardProps<ModalProps, 'open' | 'children' | 'slots' | 'slotProps'>, DrawerSlotsAndSlotProps {
|
|
72
72
|
/**
|
package/Drawer/Drawer.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export type DrawerSlotsAndSlotProps = CreateSlotsAndSlotProps<DrawerSlots, {
|
|
|
66
66
|
* Props forwarded to the transition slot.
|
|
67
67
|
* By default, the available props are based on the [Slide](https://mui.com/material-ui/api/slide/#props) component.
|
|
68
68
|
*/
|
|
69
|
-
transition: SlotProps<React.ElementType
|
|
69
|
+
transition: SlotProps<React.ElementType<TransitionProps>, TransitionProps & DrawerTransitionSlotPropsOverrides, DrawerOwnerState>;
|
|
70
70
|
}>;
|
|
71
71
|
export interface DrawerProps extends StandardProps<ModalProps, 'open' | 'children' | 'slots' | 'slotProps'>, DrawerSlotsAndSlotProps {
|
|
72
72
|
/**
|
package/Fab/Fab.js
CHANGED
|
@@ -197,6 +197,7 @@ const Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {
|
|
|
197
197
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FabRoot, {
|
|
198
198
|
className: (0, _clsx.default)(classes.root, className),
|
|
199
199
|
component: component,
|
|
200
|
+
internalNativeButton: true,
|
|
200
201
|
disabled: disabled,
|
|
201
202
|
focusRipple: !disableFocusRipple,
|
|
202
203
|
focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName),
|
package/Fab/Fab.mjs
CHANGED
|
@@ -190,6 +190,7 @@ const Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {
|
|
|
190
190
|
return /*#__PURE__*/_jsx(FabRoot, {
|
|
191
191
|
className: clsx(classes.root, className),
|
|
192
192
|
component: component,
|
|
193
|
+
internalNativeButton: true,
|
|
193
194
|
disabled: disabled,
|
|
194
195
|
focusRipple: !disableFocusRipple,
|
|
195
196
|
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
@@ -115,7 +115,7 @@ const FilledInputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
|
|
|
115
115
|
borderBottom: `1px solid ${theme.vars ? theme.alpha(theme.vars.palette.common.onBackground, theme.vars.opacity.inputUnderline) : bottomLineColor}`,
|
|
116
116
|
left: 0,
|
|
117
117
|
bottom: 0,
|
|
118
|
-
content: '"
|
|
118
|
+
content: '""',
|
|
119
119
|
position: 'absolute',
|
|
120
120
|
right: 0,
|
|
121
121
|
transition: theme.transitions.create('border-bottom-color', {
|
|
@@ -108,7 +108,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
|
|
|
108
108
|
borderBottom: `1px solid ${theme.vars ? theme.alpha(theme.vars.palette.common.onBackground, theme.vars.opacity.inputUnderline) : bottomLineColor}`,
|
|
109
109
|
left: 0,
|
|
110
110
|
bottom: 0,
|
|
111
|
-
content: '"
|
|
111
|
+
content: '""',
|
|
112
112
|
position: 'absolute',
|
|
113
113
|
right: 0,
|
|
114
114
|
transition: theme.transitions.create('border-bottom-color', {
|
package/Grid/Grid.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { SxProps } from '@mui/system';
|
|
|
2
2
|
import { OverridableComponent, OverrideProps } from '@mui/types';
|
|
3
3
|
import { Theme, Breakpoint } from "../styles/index.mjs";
|
|
4
4
|
type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };
|
|
5
|
-
export type GridDirection = 'row' | 'row-reverse'
|
|
5
|
+
export type GridDirection = 'row' | 'row-reverse';
|
|
6
6
|
export type GridSpacing = number | string;
|
|
7
7
|
export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
8
8
|
export type GridSize = 'auto' | 'grow' | number | false;
|
|
@@ -29,8 +29,13 @@ export interface GridBaseProps {
|
|
|
29
29
|
*/
|
|
30
30
|
container?: boolean | undefined;
|
|
31
31
|
/**
|
|
32
|
-
* Defines the `flex-direction` style property.
|
|
33
|
-
*
|
|
32
|
+
* Defines the `flex-direction` style property for the container.
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ Only `row` and `row-reverse` are supported. `column` and `column-reverse` are not supported,
|
|
35
|
+
* because the Grid component is designed to subdivide layouts into **columns**, not rows.
|
|
36
|
+
*
|
|
37
|
+
* For vertical layouts, use `Stack` instead.
|
|
38
|
+
*
|
|
34
39
|
* @default 'row'
|
|
35
40
|
*/
|
|
36
41
|
direction?: ResponsiveStyleValue<GridDirection> | undefined;
|
package/Grid/Grid.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SxProps } from '@mui/system';
|
|
|
2
2
|
import { OverridableComponent, OverrideProps } from '@mui/types';
|
|
3
3
|
import { Theme, Breakpoint } from "../styles/index.js";
|
|
4
4
|
type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };
|
|
5
|
-
export type GridDirection = 'row' | 'row-reverse'
|
|
5
|
+
export type GridDirection = 'row' | 'row-reverse';
|
|
6
6
|
export type GridSpacing = number | string;
|
|
7
7
|
export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
8
8
|
export type GridSize = 'auto' | 'grow' | number | false;
|
|
@@ -29,8 +29,13 @@ export interface GridBaseProps {
|
|
|
29
29
|
*/
|
|
30
30
|
container?: boolean | undefined;
|
|
31
31
|
/**
|
|
32
|
-
* Defines the `flex-direction` style property.
|
|
33
|
-
*
|
|
32
|
+
* Defines the `flex-direction` style property for the container.
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ Only `row` and `row-reverse` are supported. `column` and `column-reverse` are not supported,
|
|
35
|
+
* because the Grid component is designed to subdivide layouts into **columns**, not rows.
|
|
36
|
+
*
|
|
37
|
+
* For vertical layouts, use `Stack` instead.
|
|
38
|
+
*
|
|
34
39
|
* @default 'row'
|
|
35
40
|
*/
|
|
36
41
|
direction?: ResponsiveStyleValue<GridDirection> | undefined;
|
package/Grid/Grid.js
CHANGED
|
@@ -66,11 +66,16 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ =
|
|
|
66
66
|
*/
|
|
67
67
|
container: _propTypes.default.bool,
|
|
68
68
|
/**
|
|
69
|
-
* Defines the `flex-direction` style property.
|
|
70
|
-
*
|
|
69
|
+
* Defines the `flex-direction` style property for the container.
|
|
70
|
+
*
|
|
71
|
+
* ⚠️ Only `row` and `row-reverse` are supported. `column` and `column-reverse` are not supported,
|
|
72
|
+
* because the Grid component is designed to subdivide layouts into **columns**, not rows.
|
|
73
|
+
*
|
|
74
|
+
* For vertical layouts, use `Stack` instead.
|
|
75
|
+
*
|
|
71
76
|
* @default 'row'
|
|
72
77
|
*/
|
|
73
|
-
direction: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['
|
|
78
|
+
direction: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['row-reverse', 'row'])), _propTypes.default.object]),
|
|
74
79
|
/**
|
|
75
80
|
* Defines the offset value for the type `item` components.
|
|
76
81
|
*/
|
package/Grid/Grid.mjs
CHANGED
|
@@ -60,11 +60,16 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ =
|
|
|
60
60
|
*/
|
|
61
61
|
container: PropTypes.bool,
|
|
62
62
|
/**
|
|
63
|
-
* Defines the `flex-direction` style property.
|
|
64
|
-
*
|
|
63
|
+
* Defines the `flex-direction` style property for the container.
|
|
64
|
+
*
|
|
65
|
+
* ⚠️ Only `row` and `row-reverse` are supported. `column` and `column-reverse` are not supported,
|
|
66
|
+
* because the Grid component is designed to subdivide layouts into **columns**, not rows.
|
|
67
|
+
*
|
|
68
|
+
* For vertical layouts, use `Stack` instead.
|
|
69
|
+
*
|
|
65
70
|
* @default 'row'
|
|
66
71
|
*/
|
|
67
|
-
direction: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['
|
|
72
|
+
direction: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['row-reverse', 'row'])), PropTypes.object]),
|
|
68
73
|
/**
|
|
69
74
|
* Defines the offset value for the type `item` components.
|
|
70
75
|
*/
|
package/Grid/gridClasses.js
CHANGED
|
@@ -12,7 +12,7 @@ function getGridUtilityClass(slot) {
|
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiGrid', slot);
|
|
13
13
|
}
|
|
14
14
|
const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
15
|
-
const DIRECTIONS = ['
|
|
15
|
+
const DIRECTIONS = ['row-reverse', 'row'];
|
|
16
16
|
const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
|
|
17
17
|
const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
18
18
|
const gridClasses = (0, _generateUtilityClasses.default)('MuiGrid', ['root', 'container',
|
package/Grid/gridClasses.mjs
CHANGED
|
@@ -4,7 +4,7 @@ export function getGridUtilityClass(slot) {
|
|
|
4
4
|
return generateUtilityClass('MuiGrid', slot);
|
|
5
5
|
}
|
|
6
6
|
const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
7
|
-
const DIRECTIONS = ['
|
|
7
|
+
const DIRECTIONS = ['row-reverse', 'row'];
|
|
8
8
|
const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
|
|
9
9
|
const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
10
10
|
const gridClasses = generateUtilityClasses('MuiGrid', ['root', 'container',
|
package/IconButton/IconButton.js
CHANGED
|
@@ -219,6 +219,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
|
219
219
|
id: loading ? loadingId : idProp,
|
|
220
220
|
className: (0, _clsx.default)(classes.root, className),
|
|
221
221
|
centerRipple: true,
|
|
222
|
+
internalNativeButton: true,
|
|
222
223
|
focusRipple: !disableFocusRipple,
|
|
223
224
|
disabled: disabled || loading,
|
|
224
225
|
ref: ref,
|
|
@@ -212,6 +212,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
|
212
212
|
id: loading ? loadingId : idProp,
|
|
213
213
|
className: clsx(classes.root, className),
|
|
214
214
|
centerRipple: true,
|
|
215
|
+
internalNativeButton: true,
|
|
215
216
|
focusRipple: !disableFocusRipple,
|
|
216
217
|
disabled: disabled || loading,
|
|
217
218
|
ref: ref,
|
package/Input/Input.js
CHANGED
|
@@ -99,7 +99,7 @@ const InputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
|
|
|
99
99
|
borderBottom: `1px solid ${bottomLineColor}`,
|
|
100
100
|
left: 0,
|
|
101
101
|
bottom: 0,
|
|
102
|
-
content: '"
|
|
102
|
+
content: '""',
|
|
103
103
|
position: 'absolute',
|
|
104
104
|
right: 0,
|
|
105
105
|
transition: theme.transitions.create('border-bottom-color', {
|
package/Input/Input.mjs
CHANGED
|
@@ -92,7 +92,7 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
92
92
|
borderBottom: `1px solid ${bottomLineColor}`,
|
|
93
93
|
left: 0,
|
|
94
94
|
bottom: 0,
|
|
95
|
-
content: '"
|
|
95
|
+
content: '""',
|
|
96
96
|
position: 'absolute',
|
|
97
97
|
right: 0,
|
|
98
98
|
transition: theme.transitions.create('border-bottom-color', {
|
|
@@ -13,9 +13,9 @@ export interface InputAdornmentClasses {
|
|
|
13
13
|
positionEnd: string;
|
|
14
14
|
/** Styles applied to the root element if `disablePointerEvents={true}`. */
|
|
15
15
|
disablePointerEvents: string;
|
|
16
|
-
/** Styles applied if the adornment is used inside
|
|
16
|
+
/** Styles applied if the adornment is used inside `<FormControl hiddenLabel />`. */
|
|
17
17
|
hiddenLabel: string;
|
|
18
|
-
/** Styles applied if the adornment is used inside
|
|
18
|
+
/** Styles applied if the adornment is used inside `<FormControl size="small" />`. */
|
|
19
19
|
sizeSmall: string;
|
|
20
20
|
}
|
|
21
21
|
export type InputAdornmentClassKey = keyof InputAdornmentClasses;
|
|
@@ -13,9 +13,9 @@ export interface InputAdornmentClasses {
|
|
|
13
13
|
positionEnd: string;
|
|
14
14
|
/** Styles applied to the root element if `disablePointerEvents={true}`. */
|
|
15
15
|
disablePointerEvents: string;
|
|
16
|
-
/** Styles applied if the adornment is used inside
|
|
16
|
+
/** Styles applied if the adornment is used inside `<FormControl hiddenLabel />`. */
|
|
17
17
|
hiddenLabel: string;
|
|
18
|
-
/** Styles applied if the adornment is used inside
|
|
18
|
+
/** Styles applied if the adornment is used inside `<FormControl size="small" />`. */
|
|
19
19
|
sizeSmall: string;
|
|
20
20
|
}
|
|
21
21
|
export type InputAdornmentClassKey = keyof InputAdornmentClasses;
|
|
@@ -181,6 +181,7 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
|
|
|
181
181
|
// `ButtonBase` processes `href` or `to` if `component` is set to 'button'
|
|
182
182
|
,
|
|
183
183
|
component: (other.href || other.to) && component === 'div' ? 'button' : component,
|
|
184
|
+
internalNativeButton: false,
|
|
184
185
|
focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName),
|
|
185
186
|
ownerState: ownerState,
|
|
186
187
|
className: (0, _clsx.default)(classes.root, className),
|
|
@@ -173,6 +173,7 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
|
|
|
173
173
|
// `ButtonBase` processes `href` or `to` if `component` is set to 'button'
|
|
174
174
|
,
|
|
175
175
|
component: (other.href || other.to) && component === 'div' ? 'button' : component,
|
|
176
|
+
internalNativeButton: false,
|
|
176
177
|
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
177
178
|
ownerState: ownerState,
|
|
178
179
|
className: clsx(classes.root, className),
|
|
@@ -39,7 +39,7 @@ const ListItemIconRoot = (0, _zeroStyled.styled)('div', {
|
|
|
39
39
|
})((0, _memoTheme.default)(({
|
|
40
40
|
theme
|
|
41
41
|
}) => ({
|
|
42
|
-
minWidth:
|
|
42
|
+
minWidth: theme.spacing(4.5),
|
|
43
43
|
color: (theme.vars || theme).palette.action.active,
|
|
44
44
|
flexShrink: 0,
|
|
45
45
|
display: 'inline-flex',
|
|
@@ -121,9 +121,6 @@ const ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inPro
|
|
|
121
121
|
...other
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
|
-
if (ListSubheader) {
|
|
125
|
-
ListSubheader.muiSkipListHighlight = true;
|
|
126
|
-
}
|
|
127
124
|
process.env.NODE_ENV !== "production" ? ListSubheader.propTypes /* remove-proptypes */ = {
|
|
128
125
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
129
126
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
@@ -114,9 +114,6 @@ const ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inPro
|
|
|
114
114
|
...other
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
|
-
if (ListSubheader) {
|
|
118
|
-
ListSubheader.muiSkipListHighlight = true;
|
|
119
|
-
}
|
|
120
117
|
process.env.NODE_ENV !== "production" ? ListSubheader.propTypes /* remove-proptypes */ = {
|
|
121
118
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
122
119
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
package/Menu/Menu.d.mts
CHANGED
|
@@ -64,7 +64,7 @@ export type MenuSlotsAndSlotProps = CreateSlotsAndSlotProps<MenuSlots, {
|
|
|
64
64
|
*/
|
|
65
65
|
transition: SlotComponentProps<
|
|
66
66
|
// use SlotComponentProps because transition slot does not support `component` and `sx` prop
|
|
67
|
-
React.ElementType
|
|
67
|
+
React.ElementType<TransitionProps>, TransitionProps & MenuTransitionSlotPropsOverrides, MenuOwnerState>;
|
|
68
68
|
/**
|
|
69
69
|
* Props forwarded to the backdrop slot.
|
|
70
70
|
* By default, the available props are based on the [Backdrop](https://mui.com/material-ui/api/backdrop/#props) component.
|
package/Menu/Menu.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export type MenuSlotsAndSlotProps = CreateSlotsAndSlotProps<MenuSlots, {
|
|
|
64
64
|
*/
|
|
65
65
|
transition: SlotComponentProps<
|
|
66
66
|
// use SlotComponentProps because transition slot does not support `component` and `sx` prop
|
|
67
|
-
React.ElementType
|
|
67
|
+
React.ElementType<TransitionProps>, TransitionProps & MenuTransitionSlotPropsOverrides, MenuOwnerState>;
|
|
68
68
|
/**
|
|
69
69
|
* Props forwarded to the backdrop slot.
|
|
70
70
|
* By default, the available props are based on the [Backdrop](https://mui.com/material-ui/api/backdrop/#props) component.
|