@mui/material
Advanced tools
Comparing version 7.0.0-alpha.1 to 7.0.0-alpha.2
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { ExtendPaperTypeMap } from "../Paper/Paper.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface AccordionSlots { | ||
@@ -21,5 +21,3 @@ /** | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children?: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
@@ -29,4 +27,12 @@ export interface AccordionTransitionSlotPropsOverrides {} | ||
export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<AccordionSlots, { | ||
heading: SlotProps<React.ElementType<React.HTMLProps<HTMLHeadingElement>>, AccordionHeadingSlotPropsOverrides, AccordionOwnerState>; | ||
transition: SlotProps<React.ElementType<TransitionProps>, AccordionTransitionSlotPropsOverrides, AccordionOwnerState>; | ||
/** | ||
* Props forwarded to the heading slot. | ||
* By default, the avaible props are based on the h3 element. | ||
*/ | ||
heading: SlotProps<'h3', AccordionHeadingSlotPropsOverrides, AccordionOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & AccordionTransitionSlotPropsOverrides, AccordionOwnerState>; | ||
}>; | ||
@@ -33,0 +39,0 @@ export type AccordionTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> = ExtendPaperTypeMap<{ |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface BackdropSlots { | ||
@@ -21,5 +21,3 @@ /** | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
@@ -29,4 +27,12 @@ export interface BackdropComponentsPropsOverrides {} | ||
export type BackdropSlotsAndSlotProps = CreateSlotsAndSlotProps<BackdropSlots, { | ||
root: SlotProps<React.ElementType<HTMLDivElement>, BackdropComponentsPropsOverrides, BackdropOwnerState>; | ||
transition: SlotProps<React.JSXElementConstructor<TransitionProps>, BackdropTransitionSlotPropsOverrides, BackdropOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the div element. | ||
*/ | ||
root: SlotProps<'div', BackdropComponentsPropsOverrides, BackdropOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & BackdropTransitionSlotPropsOverrides, BackdropOwnerState>; | ||
}>; | ||
@@ -33,0 +39,0 @@ export interface BackdropOwnProps extends Partial<Omit<FadeProps, 'children'>>, BackdropSlotsAndSlotProps { |
@@ -511,5 +511,5 @@ "use strict"; | ||
} = props; | ||
const id = (0, _utils.unstable_useId)(idProp); | ||
const loadingId = (0, _utils.unstable_useId)(idProp); | ||
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, { | ||
"aria-labelledby": id, | ||
"aria-labelledby": loadingId, | ||
color: "inherit", | ||
@@ -574,3 +574,3 @@ size: 16 | ||
type: type, | ||
id: id, | ||
id: loading ? loadingId : idProp, | ||
...other, | ||
@@ -577,0 +577,0 @@ classes: classes, |
# [Versions](https://mui.com/versions/) | ||
## 7.0.0-alpha.2 | ||
<!-- generated comparing v7.0.0-alpha.1..master --> | ||
_Feb 18, 2025_ | ||
A big thanks to the 9 contributors who made this release possible. | ||
### `@mui/material@7.0.0-alpha.2` | ||
- [Autocomplete] Remove legacy `aria-owns` attribute for combobox (#45302) @ZeeshanTamboli | ||
- [Button] Apply id only if loading indicator is present (#45296) @aarongarciah | ||
- [Hidden] Remove deprecated Hidden component (#45283) @DiegoAndai | ||
- [InputBase] Deprecate composed classes (#45234) @sai6855 | ||
- [InputLabel] Changed size prop value from `normal` to `medium` (#45235) @perkrlsn | ||
- Fix `slotProps.transition` types (#45214) @siriwatknp | ||
### Docs | ||
- Fix broken links to MUI X docs (#45145) @mapache-salvaje | ||
- Add migration guide for package layout changes (#45222) @Janpot | ||
- [icons] Fix typo in material-icons.md (#45334) @a-s-russo | ||
### Core | ||
- Disallow access to esm/modern barrel files (#45332) @Janpot | ||
- [code-infra] Update `elliptic` (#45311) @Janpot | ||
- Update release guide to specify package bumping rules (#45294) @DiegoAndai | ||
All contributors of this release in alphabetical order: @a-s-russo, @aarongarciah, @DiegoAndai, @Janpot, @mapache-salvaje, @perkrlsn, @sai6855, @siriwatknp, @ZeeshanTamboli | ||
## 7.0.0-alpha.1 | ||
@@ -4,0 +35,0 @@ |
@@ -9,3 +9,3 @@ import * as React from 'react'; | ||
import { DialogClasses } from "./dialogClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface DialogSlots { | ||
@@ -61,3 +61,3 @@ /** | ||
*/ | ||
transition: SlotProps<React.ElementType<TransitionProps>, DialogTransitionSlotPropsOverrides, DialogOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & DialogTransitionSlotPropsOverrides, DialogOwnerState>; | ||
/** | ||
@@ -64,0 +64,0 @@ * Props forwarded to the paper slot. |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { ExtendPaperTypeMap } from "../Paper/Paper.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface AccordionSlots { | ||
@@ -21,5 +21,3 @@ /** | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children?: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
@@ -29,4 +27,12 @@ export interface AccordionTransitionSlotPropsOverrides {} | ||
export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<AccordionSlots, { | ||
heading: SlotProps<React.ElementType<React.HTMLProps<HTMLHeadingElement>>, AccordionHeadingSlotPropsOverrides, AccordionOwnerState>; | ||
transition: SlotProps<React.ElementType<TransitionProps>, AccordionTransitionSlotPropsOverrides, AccordionOwnerState>; | ||
/** | ||
* Props forwarded to the heading slot. | ||
* By default, the avaible props are based on the h3 element. | ||
*/ | ||
heading: SlotProps<'h3', AccordionHeadingSlotPropsOverrides, AccordionOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & AccordionTransitionSlotPropsOverrides, AccordionOwnerState>; | ||
}>; | ||
@@ -33,0 +39,0 @@ export type AccordionTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> = ExtendPaperTypeMap<{ |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface BackdropSlots { | ||
@@ -21,5 +21,3 @@ /** | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
@@ -29,4 +27,12 @@ export interface BackdropComponentsPropsOverrides {} | ||
export type BackdropSlotsAndSlotProps = CreateSlotsAndSlotProps<BackdropSlots, { | ||
root: SlotProps<React.ElementType<HTMLDivElement>, BackdropComponentsPropsOverrides, BackdropOwnerState>; | ||
transition: SlotProps<React.JSXElementConstructor<TransitionProps>, BackdropTransitionSlotPropsOverrides, BackdropOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the div element. | ||
*/ | ||
root: SlotProps<'div', BackdropComponentsPropsOverrides, BackdropOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & BackdropTransitionSlotPropsOverrides, BackdropOwnerState>; | ||
}>; | ||
@@ -33,0 +39,0 @@ export interface BackdropOwnProps extends Partial<Omit<FadeProps, 'children'>>, BackdropSlotsAndSlotProps { |
@@ -504,5 +504,5 @@ 'use client'; | ||
} = props; | ||
const id = useId(idProp); | ||
const loadingId = useId(idProp); | ||
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, { | ||
"aria-labelledby": id, | ||
"aria-labelledby": loadingId, | ||
color: "inherit", | ||
@@ -567,3 +567,3 @@ size: 16 | ||
type: type, | ||
id: id, | ||
id: loading ? loadingId : idProp, | ||
...other, | ||
@@ -570,0 +570,0 @@ classes: classes, |
@@ -9,3 +9,3 @@ import * as React from 'react'; | ||
import { DialogClasses } from "./dialogClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface DialogSlots { | ||
@@ -61,3 +61,3 @@ /** | ||
*/ | ||
transition: SlotProps<React.ElementType<TransitionProps>, DialogTransitionSlotPropsOverrides, DialogOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & DialogTransitionSlotPropsOverrides, DialogOwnerState>; | ||
/** | ||
@@ -64,0 +64,0 @@ * Props forwarded to the paper slot. |
@@ -196,5 +196,5 @@ 'use client'; | ||
} = props; | ||
const id = useId(idProp); | ||
const loadingId = useId(idProp); | ||
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, { | ||
"aria-labelledby": id, | ||
"aria-labelledby": loadingId, | ||
color: "inherit", | ||
@@ -215,3 +215,3 @@ size: 16 | ||
return /*#__PURE__*/_jsxs(IconButtonRoot, { | ||
id: id, | ||
id: loading ? loadingId : idProp, | ||
className: clsx(classes.root, className), | ||
@@ -218,0 +218,0 @@ centerRipple: true, |
@@ -156,4 +156,2 @@ import * as React from 'react'; | ||
export * from "./Grow/index.js"; | ||
export { default as Hidden } from "./Hidden/index.js"; | ||
export * from "./Hidden/index.js"; | ||
export { default as Icon } from "./Icon/index.js"; | ||
@@ -160,0 +158,0 @@ export * from "./Icon/index.js"; |
/** | ||
* @mui/material v7.0.0-alpha.1 | ||
* @mui/material v7.0.0-alpha.2 | ||
* | ||
@@ -116,4 +116,2 @@ * @license MIT | ||
export * from "./Grow/index.js"; | ||
export { default as Hidden } from "./Hidden/index.js"; | ||
export * from "./Hidden/index.js"; | ||
export { default as Icon } from "./Icon/index.js"; | ||
@@ -120,0 +118,0 @@ export * from "./Icon/index.js"; |
@@ -30,13 +30,22 @@ export interface InputBaseClasses { | ||
input: string; | ||
/** Styles applied to the input element if `size="small"`. */ | ||
/** Styles applied to the input element if `size="small"`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-sizeSmall](/material-ui/api/input-base/#inputbase-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputSizeSmall: string; | ||
/** Styles applied to the input element if `multiline={true}`. */ | ||
/** Styles applied to the input element if `multiline={true}`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-multiline](/material-ui/api/input-base/#inputbase-classes-multiline) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputMultiline: string; | ||
/** Styles applied to the input element if `type="search"`. */ | ||
inputTypeSearch: string; | ||
/** Styles applied to the input element if `startAdornment` is provided. */ | ||
/** Styles applied to the input element if `startAdornment` is provided. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedStart](/material-ui/api/input-base/#inputbase-classes-adornedStart) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputAdornedStart: string; | ||
/** Styles applied to the input element if `endAdornment` is provided. */ | ||
/** Styles applied to the input element if `endAdornment` is provided. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedEnd](/material-ui/api/input-base/#inputbase-classes-adornedEnd) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputAdornedEnd: string; | ||
/** Styles applied to the input element if `hiddenLabel={true}`. */ | ||
/** Styles applied to the input element if `hiddenLabel={true}`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-hiddenLabel](/material-ui/api/input-base/#inputbase-classes-hiddenLabel) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputHiddenLabel: string; | ||
@@ -43,0 +52,0 @@ } |
@@ -47,5 +47,5 @@ import * as React from 'react'; | ||
* The size of the component. | ||
* @default 'normal' | ||
* @default 'medium' | ||
*/ | ||
size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>; | ||
size?: OverridableStringUnion<'small' | 'medium', InputLabelPropsSizeOverrides>; | ||
/** | ||
@@ -52,0 +52,0 @@ * The system prop that allows defining system overrides as well as additional CSS styles. |
@@ -28,3 +28,3 @@ 'use client'; | ||
const slots = { | ||
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant], | ||
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'medium' && `size${capitalize(size)}`, variant], | ||
asterisk: [required && 'asterisk'] | ||
@@ -272,5 +272,5 @@ }; | ||
* The size of the component. | ||
* @default 'normal' | ||
* @default 'medium' | ||
*/ | ||
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['normal', 'small']), PropTypes.string]), | ||
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]), | ||
/** | ||
@@ -277,0 +277,0 @@ * The system prop that allows defining system overrides as well as additional CSS styles. |
@@ -54,3 +54,3 @@ import * as React from 'react'; | ||
// use SlotComponentProps because transition slot does not support `component` and `sx` prop | ||
React.ElementType<TransitionProps>, PopoverTransitionSlotPropsOverrides, PopoverOwnerState>; | ||
React.ElementType, TransitionProps & PopoverTransitionSlotPropsOverrides, PopoverOwnerState>; | ||
/** | ||
@@ -57,0 +57,0 @@ * Props forwarded to the backdrop slot. |
@@ -55,5 +55,5 @@ import * as React from 'react'; | ||
* Props applied to the transition element. | ||
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component. | ||
* By default, the element is based on the [Grow](https://mui.com/material-ui/api/grow/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType<TransitionProps>, SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>; | ||
}>; | ||
@@ -60,0 +60,0 @@ export interface SnackbarOrigin { |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { SpeedDialClasses } from "./speedDialClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js"; | ||
export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown'; | ||
@@ -16,10 +16,12 @@ export type OpenReason = 'toggle' | 'focus' | 'mouseEnter'; | ||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | ||
* @default {} | ||
* @default Zoom | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<SpeedDialSlots, { | ||
transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Zoom](https://mui.com/material-ui/api/zoom/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps, SpeedDialOwnerState>; | ||
}>; | ||
@@ -26,0 +28,0 @@ export interface SpeedDialProps extends Omit<StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>, 'slots' | 'slotProps'>, SpeedDialSlotsAndSlotProps { |
@@ -7,3 +7,3 @@ import * as React from 'react'; | ||
import { StepContentClasses } from "./stepContentClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js"; | ||
export interface StepContentSlots { | ||
@@ -24,3 +24,3 @@ /** | ||
*/ | ||
transition: SlotProps<React.ElementType<CollapseProps>, {}, StepContentOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, CollapseProps, StepContentOwnerState>; | ||
}>; | ||
@@ -27,0 +27,0 @@ export interface StepContentOwnerState extends StepContentProps {} |
@@ -35,6 +35,22 @@ import * as React from 'react'; | ||
export type TooltipSlotsAndSlotProps = CreateSlotsAndSlotProps<TooltipSlots, { | ||
/** | ||
* Props forwarded to the popper slot. | ||
* By default, the avaible props are based on the [Popper](https://mui.com/material-ui/api/popper/#props) component. | ||
*/ | ||
popper: SlotProps<React.ElementType<PopperProps>, TooltipPopperSlotPropsOverrides, TooltipOwnerState>; | ||
transition: SlotProps<React.ElementType<TransitionProps>, TooltipTransitionSlotPropsOverrides, TooltipOwnerState>; | ||
tooltip: SlotProps<React.ElementType<React.HTMLProps<HTMLDivElement>>, TooltipTooltipSlotPropsOverrides, TooltipOwnerState>; | ||
arrow: SlotProps<React.ElementType<React.HTMLProps<HTMLSpanElement>>, TooltipArrowSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Grow](https://mui.com/material-ui/api/grow/#props) component. | ||
*/ | ||
transition: SlotProps<React.ElementType, TransitionProps & TooltipTransitionSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the tooltip slot. | ||
* By default, the avaible props are based on the div element. | ||
*/ | ||
tooltip: SlotProps<'div', TooltipTooltipSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the tooltip slot. | ||
* By default, the avaible props are based on the span element. | ||
*/ | ||
arrow: SlotProps<'span', TooltipArrowSlotPropsOverrides, TooltipOwnerState>; | ||
}>; | ||
@@ -41,0 +57,0 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'title'>, TooltipSlotsAndSlotProps { |
@@ -880,3 +880,2 @@ 'use client'; | ||
getRootProps: (other = {}) => ({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null, | ||
...other, | ||
@@ -883,0 +882,0 @@ onKeyDown: handleKeyDown(other), |
import { SlotComponentProps } from '@mui/utils'; | ||
export default function mergeSlotProps<T extends SlotComponentProps<React.ElementType, {}, {}>, K = T, U = T extends Function ? T : K extends Function ? K : T extends undefined ? K : T>(externalSlotProps: T | undefined, defaultSlotProps: K): U; | ||
export default function mergeSlotProps<T extends SlotComponentProps<React.ElementType, {}, {}>, K = T, U = (T extends Function ? T : K extends Function ? K : T extends undefined ? K : T)>(externalSlotProps: T | undefined, defaultSlotProps: K): U; |
@@ -1,6 +0,6 @@ | ||
export const version = "7.0.0-alpha.1"; | ||
export const version = "7.0.0-alpha.2"; | ||
export const major = Number("7"); | ||
export const minor = Number("0"); | ||
export const patch = Number("0"); | ||
export const prerelease = "alpha.1"; | ||
export const prerelease = "alpha.2"; | ||
export default version; |
@@ -203,5 +203,5 @@ "use strict"; | ||
} = props; | ||
const id = (0, _utils.unstable_useId)(idProp); | ||
const loadingId = (0, _utils.unstable_useId)(idProp); | ||
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, { | ||
"aria-labelledby": id, | ||
"aria-labelledby": loadingId, | ||
color: "inherit", | ||
@@ -222,3 +222,3 @@ size: 16 | ||
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(IconButtonRoot, { | ||
id: id, | ||
id: loading ? loadingId : idProp, | ||
className: (0, _clsx.default)(classes.root, className), | ||
@@ -225,0 +225,0 @@ centerRipple: true, |
@@ -156,4 +156,2 @@ import * as React from 'react'; | ||
export * from "./Grow/index.js"; | ||
export { default as Hidden } from "./Hidden/index.js"; | ||
export * from "./Hidden/index.js"; | ||
export { default as Icon } from "./Icon/index.js"; | ||
@@ -160,0 +158,0 @@ export * from "./Icon/index.js"; |
@@ -30,13 +30,22 @@ export interface InputBaseClasses { | ||
input: string; | ||
/** Styles applied to the input element if `size="small"`. */ | ||
/** Styles applied to the input element if `size="small"`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-sizeSmall](/material-ui/api/input-base/#inputbase-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputSizeSmall: string; | ||
/** Styles applied to the input element if `multiline={true}`. */ | ||
/** Styles applied to the input element if `multiline={true}`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-multiline](/material-ui/api/input-base/#inputbase-classes-multiline) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputMultiline: string; | ||
/** Styles applied to the input element if `type="search"`. */ | ||
inputTypeSearch: string; | ||
/** Styles applied to the input element if `startAdornment` is provided. */ | ||
/** Styles applied to the input element if `startAdornment` is provided. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedStart](/material-ui/api/input-base/#inputbase-classes-adornedStart) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputAdornedStart: string; | ||
/** Styles applied to the input element if `endAdornment` is provided. */ | ||
/** Styles applied to the input element if `endAdornment` is provided. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedEnd](/material-ui/api/input-base/#inputbase-classes-adornedEnd) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputAdornedEnd: string; | ||
/** Styles applied to the input element if `hiddenLabel={true}`. */ | ||
/** Styles applied to the input element if `hiddenLabel={true}`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-hiddenLabel](/material-ui/api/input-base/#inputbase-classes-hiddenLabel) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputHiddenLabel: string; | ||
@@ -43,0 +52,0 @@ } |
@@ -47,5 +47,5 @@ import * as React from 'react'; | ||
* The size of the component. | ||
* @default 'normal' | ||
* @default 'medium' | ||
*/ | ||
size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>; | ||
size?: OverridableStringUnion<'small' | 'medium', InputLabelPropsSizeOverrides>; | ||
/** | ||
@@ -52,0 +52,0 @@ * The system prop that allows defining system overrides as well as additional CSS styles. |
@@ -35,3 +35,3 @@ "use strict"; | ||
const slots = { | ||
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${(0, _capitalize.default)(size)}`, variant], | ||
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'medium' && `size${(0, _capitalize.default)(size)}`, variant], | ||
asterisk: [required && 'asterisk'] | ||
@@ -279,5 +279,5 @@ }; | ||
* The size of the component. | ||
* @default 'normal' | ||
* @default 'medium' | ||
*/ | ||
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['normal', 'small']), _propTypes.default.string]), | ||
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]), | ||
/** | ||
@@ -284,0 +284,0 @@ * The system prop that allows defining system overrides as well as additional CSS styles. |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { ExtendPaperTypeMap } from "../Paper/Paper.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface AccordionSlots { | ||
@@ -21,5 +21,3 @@ /** | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children?: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
@@ -29,4 +27,12 @@ export interface AccordionTransitionSlotPropsOverrides {} | ||
export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<AccordionSlots, { | ||
heading: SlotProps<React.ElementType<React.HTMLProps<HTMLHeadingElement>>, AccordionHeadingSlotPropsOverrides, AccordionOwnerState>; | ||
transition: SlotProps<React.ElementType<TransitionProps>, AccordionTransitionSlotPropsOverrides, AccordionOwnerState>; | ||
/** | ||
* Props forwarded to the heading slot. | ||
* By default, the avaible props are based on the h3 element. | ||
*/ | ||
heading: SlotProps<'h3', AccordionHeadingSlotPropsOverrides, AccordionOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & AccordionTransitionSlotPropsOverrides, AccordionOwnerState>; | ||
}>; | ||
@@ -33,0 +39,0 @@ export type AccordionTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> = ExtendPaperTypeMap<{ |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface BackdropSlots { | ||
@@ -21,5 +21,3 @@ /** | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
@@ -29,4 +27,12 @@ export interface BackdropComponentsPropsOverrides {} | ||
export type BackdropSlotsAndSlotProps = CreateSlotsAndSlotProps<BackdropSlots, { | ||
root: SlotProps<React.ElementType<HTMLDivElement>, BackdropComponentsPropsOverrides, BackdropOwnerState>; | ||
transition: SlotProps<React.JSXElementConstructor<TransitionProps>, BackdropTransitionSlotPropsOverrides, BackdropOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the div element. | ||
*/ | ||
root: SlotProps<'div', BackdropComponentsPropsOverrides, BackdropOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & BackdropTransitionSlotPropsOverrides, BackdropOwnerState>; | ||
}>; | ||
@@ -33,0 +39,0 @@ export interface BackdropOwnProps extends Partial<Omit<FadeProps, 'children'>>, BackdropSlotsAndSlotProps { |
@@ -504,5 +504,5 @@ 'use client'; | ||
} = props; | ||
const id = useId(idProp); | ||
const loadingId = useId(idProp); | ||
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, { | ||
"aria-labelledby": id, | ||
"aria-labelledby": loadingId, | ||
color: "inherit", | ||
@@ -567,3 +567,3 @@ size: 16 | ||
type: type, | ||
id: id, | ||
id: loading ? loadingId : idProp, | ||
...other, | ||
@@ -570,0 +570,0 @@ classes: classes, |
@@ -9,3 +9,3 @@ import * as React from 'react'; | ||
import { DialogClasses } from "./dialogClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js"; | ||
export interface DialogSlots { | ||
@@ -61,3 +61,3 @@ /** | ||
*/ | ||
transition: SlotProps<React.ElementType<TransitionProps>, DialogTransitionSlotPropsOverrides, DialogOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & DialogTransitionSlotPropsOverrides, DialogOwnerState>; | ||
/** | ||
@@ -64,0 +64,0 @@ * Props forwarded to the paper slot. |
@@ -196,5 +196,5 @@ 'use client'; | ||
} = props; | ||
const id = useId(idProp); | ||
const loadingId = useId(idProp); | ||
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, { | ||
"aria-labelledby": id, | ||
"aria-labelledby": loadingId, | ||
color: "inherit", | ||
@@ -215,3 +215,3 @@ size: 16 | ||
return /*#__PURE__*/_jsxs(IconButtonRoot, { | ||
id: id, | ||
id: loading ? loadingId : idProp, | ||
className: clsx(classes.root, className), | ||
@@ -218,0 +218,0 @@ centerRipple: true, |
@@ -156,4 +156,2 @@ import * as React from 'react'; | ||
export * from "./Grow/index.js"; | ||
export { default as Hidden } from "./Hidden/index.js"; | ||
export * from "./Hidden/index.js"; | ||
export { default as Icon } from "./Icon/index.js"; | ||
@@ -160,0 +158,0 @@ export * from "./Icon/index.js"; |
/** | ||
* @mui/material v7.0.0-alpha.1 | ||
* @mui/material v7.0.0-alpha.2 | ||
* | ||
@@ -116,4 +116,2 @@ * @license MIT | ||
export * from "./Grow/index.js"; | ||
export { default as Hidden } from "./Hidden/index.js"; | ||
export * from "./Hidden/index.js"; | ||
export { default as Icon } from "./Icon/index.js"; | ||
@@ -120,0 +118,0 @@ export * from "./Icon/index.js"; |
@@ -30,13 +30,22 @@ export interface InputBaseClasses { | ||
input: string; | ||
/** Styles applied to the input element if `size="small"`. */ | ||
/** Styles applied to the input element if `size="small"`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-sizeSmall](/material-ui/api/input-base/#inputbase-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputSizeSmall: string; | ||
/** Styles applied to the input element if `multiline={true}`. */ | ||
/** Styles applied to the input element if `multiline={true}`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-multiline](/material-ui/api/input-base/#inputbase-classes-multiline) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputMultiline: string; | ||
/** Styles applied to the input element if `type="search"`. */ | ||
inputTypeSearch: string; | ||
/** Styles applied to the input element if `startAdornment` is provided. */ | ||
/** Styles applied to the input element if `startAdornment` is provided. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedStart](/material-ui/api/input-base/#inputbase-classes-adornedStart) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputAdornedStart: string; | ||
/** Styles applied to the input element if `endAdornment` is provided. */ | ||
/** Styles applied to the input element if `endAdornment` is provided. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedEnd](/material-ui/api/input-base/#inputbase-classes-adornedEnd) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputAdornedEnd: string; | ||
/** Styles applied to the input element if `hiddenLabel={true}`. */ | ||
/** Styles applied to the input element if `hiddenLabel={true}`. | ||
* @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-hiddenLabel](/material-ui/api/input-base/#inputbase-classes-hiddenLabel) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. | ||
*/ | ||
inputHiddenLabel: string; | ||
@@ -43,0 +52,0 @@ } |
@@ -47,5 +47,5 @@ import * as React from 'react'; | ||
* The size of the component. | ||
* @default 'normal' | ||
* @default 'medium' | ||
*/ | ||
size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>; | ||
size?: OverridableStringUnion<'small' | 'medium', InputLabelPropsSizeOverrides>; | ||
/** | ||
@@ -52,0 +52,0 @@ * The system prop that allows defining system overrides as well as additional CSS styles. |
@@ -28,3 +28,3 @@ 'use client'; | ||
const slots = { | ||
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant], | ||
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'medium' && `size${capitalize(size)}`, variant], | ||
asterisk: [required && 'asterisk'] | ||
@@ -272,5 +272,5 @@ }; | ||
* The size of the component. | ||
* @default 'normal' | ||
* @default 'medium' | ||
*/ | ||
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['normal', 'small']), PropTypes.string]), | ||
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]), | ||
/** | ||
@@ -277,0 +277,0 @@ * The system prop that allows defining system overrides as well as additional CSS styles. |
@@ -54,3 +54,3 @@ import * as React from 'react'; | ||
// use SlotComponentProps because transition slot does not support `component` and `sx` prop | ||
React.ElementType<TransitionProps>, PopoverTransitionSlotPropsOverrides, PopoverOwnerState>; | ||
React.ElementType, TransitionProps & PopoverTransitionSlotPropsOverrides, PopoverOwnerState>; | ||
/** | ||
@@ -57,0 +57,0 @@ * Props forwarded to the backdrop slot. |
@@ -55,5 +55,5 @@ import * as React from 'react'; | ||
* Props applied to the transition element. | ||
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component. | ||
* By default, the element is based on the [Grow](https://mui.com/material-ui/api/grow/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType<TransitionProps>, SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>; | ||
}>; | ||
@@ -60,0 +60,0 @@ export interface SnackbarOrigin { |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { SpeedDialClasses } from "./speedDialClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js"; | ||
export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown'; | ||
@@ -16,10 +16,12 @@ export type OpenReason = 'toggle' | 'focus' | 'mouseEnter'; | ||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | ||
* @default {} | ||
* @default Zoom | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<SpeedDialSlots, { | ||
transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Zoom](https://mui.com/material-ui/api/zoom/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps, SpeedDialOwnerState>; | ||
}>; | ||
@@ -26,0 +28,0 @@ export interface SpeedDialProps extends Omit<StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>, 'slots' | 'slotProps'>, SpeedDialSlotsAndSlotProps { |
@@ -7,3 +7,3 @@ import * as React from 'react'; | ||
import { StepContentClasses } from "./stepContentClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js"; | ||
export interface StepContentSlots { | ||
@@ -24,3 +24,3 @@ /** | ||
*/ | ||
transition: SlotProps<React.ElementType<CollapseProps>, {}, StepContentOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, CollapseProps, StepContentOwnerState>; | ||
}>; | ||
@@ -27,0 +27,0 @@ export interface StepContentOwnerState extends StepContentProps {} |
@@ -35,6 +35,22 @@ import * as React from 'react'; | ||
export type TooltipSlotsAndSlotProps = CreateSlotsAndSlotProps<TooltipSlots, { | ||
/** | ||
* Props forwarded to the popper slot. | ||
* By default, the avaible props are based on the [Popper](https://mui.com/material-ui/api/popper/#props) component. | ||
*/ | ||
popper: SlotProps<React.ElementType<PopperProps>, TooltipPopperSlotPropsOverrides, TooltipOwnerState>; | ||
transition: SlotProps<React.ElementType<TransitionProps>, TooltipTransitionSlotPropsOverrides, TooltipOwnerState>; | ||
tooltip: SlotProps<React.ElementType<React.HTMLProps<HTMLDivElement>>, TooltipTooltipSlotPropsOverrides, TooltipOwnerState>; | ||
arrow: SlotProps<React.ElementType<React.HTMLProps<HTMLSpanElement>>, TooltipArrowSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Grow](https://mui.com/material-ui/api/grow/#props) component. | ||
*/ | ||
transition: SlotProps<React.ElementType, TransitionProps & TooltipTransitionSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the tooltip slot. | ||
* By default, the avaible props are based on the div element. | ||
*/ | ||
tooltip: SlotProps<'div', TooltipTooltipSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the tooltip slot. | ||
* By default, the avaible props are based on the span element. | ||
*/ | ||
arrow: SlotProps<'span', TooltipArrowSlotPropsOverrides, TooltipOwnerState>; | ||
}>; | ||
@@ -41,0 +57,0 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'title'>, TooltipSlotsAndSlotProps { |
@@ -880,3 +880,2 @@ 'use client'; | ||
getRootProps: (other = {}) => ({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null, | ||
...other, | ||
@@ -883,0 +882,0 @@ onKeyDown: handleKeyDown(other), |
import { SlotComponentProps } from '@mui/utils'; | ||
export default function mergeSlotProps<T extends SlotComponentProps<React.ElementType, {}, {}>, K = T, U = T extends Function ? T : K extends Function ? K : T extends undefined ? K : T>(externalSlotProps: T | undefined, defaultSlotProps: K): U; | ||
export default function mergeSlotProps<T extends SlotComponentProps<React.ElementType, {}, {}>, K = T, U = (T extends Function ? T : K extends Function ? K : T extends undefined ? K : T)>(externalSlotProps: T | undefined, defaultSlotProps: K): U; |
@@ -1,6 +0,6 @@ | ||
export const version = "7.0.0-alpha.1"; | ||
export const version = "7.0.0-alpha.2"; | ||
export const major = Number("7"); | ||
export const minor = Number("0"); | ||
export const patch = Number("0"); | ||
export const prerelease = "alpha.1"; | ||
export const prerelease = "alpha.2"; | ||
export default version; |
{ | ||
"name": "@mui/material", | ||
"version": "7.0.0-alpha.1", | ||
"version": "7.0.0-alpha.2", | ||
"private": false, | ||
@@ -30,3 +30,3 @@ "author": "MUI Team", | ||
"dependencies": { | ||
"@babel/runtime": "^7.26.7", | ||
"@babel/runtime": "^7.26.9", | ||
"@popperjs/core": "^2.11.8", | ||
@@ -39,6 +39,6 @@ "@types/react-transition-group": "^4.4.12", | ||
"react-transition-group": "^4.4.5", | ||
"@mui/core-downloads-tracker": "^7.0.0-alpha.1", | ||
"@mui/system": "7.0.0-alpha.1", | ||
"@mui/utils": "7.0.0-alpha.1", | ||
"@mui/types": "^7.2.22" | ||
"@mui/core-downloads-tracker": "^7.0.0-alpha.2", | ||
"@mui/system": "7.0.0-alpha.2", | ||
"@mui/types": "^7.2.22", | ||
"@mui/utils": "7.0.0-alpha.2" | ||
}, | ||
@@ -51,3 +51,3 @@ "peerDependencies": { | ||
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", | ||
"@mui/material-pigment-css": "7.0.0-alpha.1" | ||
"@mui/material-pigment-css": "7.0.0-alpha.2" | ||
}, | ||
@@ -105,2 +105,4 @@ "peerDependenciesMeta": { | ||
}, | ||
"./esm": null, | ||
"./modern": null, | ||
"./ButtonBase/TouchRipple": { | ||
@@ -107,0 +109,0 @@ "require": { |
@@ -54,3 +54,3 @@ import * as React from 'react'; | ||
// use SlotComponentProps because transition slot does not support `component` and `sx` prop | ||
React.ElementType<TransitionProps>, PopoverTransitionSlotPropsOverrides, PopoverOwnerState>; | ||
React.ElementType, TransitionProps & PopoverTransitionSlotPropsOverrides, PopoverOwnerState>; | ||
/** | ||
@@ -57,0 +57,0 @@ * Props forwarded to the backdrop slot. |
@@ -55,5 +55,5 @@ import * as React from 'react'; | ||
* Props applied to the transition element. | ||
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component. | ||
* By default, the element is based on the [Grow](https://mui.com/material-ui/api/grow/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType<TransitionProps>, SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, TransitionProps & SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>; | ||
}>; | ||
@@ -60,0 +60,0 @@ export interface SnackbarOrigin { |
@@ -8,3 +8,3 @@ import * as React from 'react'; | ||
import { SpeedDialClasses } from "./speedDialClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js"; | ||
export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown'; | ||
@@ -16,10 +16,12 @@ export type OpenReason = 'toggle' | 'focus' | 'mouseEnter'; | ||
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | ||
* @default {} | ||
* @default Zoom | ||
*/ | ||
transition: React.JSXElementConstructor<TransitionProps & { | ||
children: React.ReactElement<unknown, any>; | ||
}>; | ||
transition: React.ElementType; | ||
} | ||
export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<SpeedDialSlots, { | ||
transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Zoom](https://mui.com/material-ui/api/zoom/#props) component. | ||
*/ | ||
transition: SlotComponentProps<React.ElementType, TransitionProps, SpeedDialOwnerState>; | ||
}>; | ||
@@ -26,0 +28,0 @@ export interface SpeedDialProps extends Omit<StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>, 'slots' | 'slotProps'>, SpeedDialSlotsAndSlotProps { |
@@ -7,3 +7,3 @@ import * as React from 'react'; | ||
import { StepContentClasses } from "./stepContentClasses.js"; | ||
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js"; | ||
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js"; | ||
export interface StepContentSlots { | ||
@@ -24,3 +24,3 @@ /** | ||
*/ | ||
transition: SlotProps<React.ElementType<CollapseProps>, {}, StepContentOwnerState>; | ||
transition: SlotComponentProps<React.ElementType, CollapseProps, StepContentOwnerState>; | ||
}>; | ||
@@ -27,0 +27,0 @@ export interface StepContentOwnerState extends StepContentProps {} |
@@ -35,6 +35,22 @@ import * as React from 'react'; | ||
export type TooltipSlotsAndSlotProps = CreateSlotsAndSlotProps<TooltipSlots, { | ||
/** | ||
* Props forwarded to the popper slot. | ||
* By default, the avaible props are based on the [Popper](https://mui.com/material-ui/api/popper/#props) component. | ||
*/ | ||
popper: SlotProps<React.ElementType<PopperProps>, TooltipPopperSlotPropsOverrides, TooltipOwnerState>; | ||
transition: SlotProps<React.ElementType<TransitionProps>, TooltipTransitionSlotPropsOverrides, TooltipOwnerState>; | ||
tooltip: SlotProps<React.ElementType<React.HTMLProps<HTMLDivElement>>, TooltipTooltipSlotPropsOverrides, TooltipOwnerState>; | ||
arrow: SlotProps<React.ElementType<React.HTMLProps<HTMLSpanElement>>, TooltipArrowSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the transition slot. | ||
* By default, the avaible props are based on the [Grow](https://mui.com/material-ui/api/grow/#props) component. | ||
*/ | ||
transition: SlotProps<React.ElementType, TransitionProps & TooltipTransitionSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the tooltip slot. | ||
* By default, the avaible props are based on the div element. | ||
*/ | ||
tooltip: SlotProps<'div', TooltipTooltipSlotPropsOverrides, TooltipOwnerState>; | ||
/** | ||
* Props forwarded to the tooltip slot. | ||
* By default, the avaible props are based on the span element. | ||
*/ | ||
arrow: SlotProps<'span', TooltipArrowSlotPropsOverrides, TooltipOwnerState>; | ||
}>; | ||
@@ -41,0 +57,0 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'title'>, TooltipSlotsAndSlotProps { |
@@ -886,3 +886,2 @@ "use strict"; | ||
getRootProps: (other = {}) => ({ | ||
'aria-owns': listboxAvailable ? `${id}-listbox` : null, | ||
...other, | ||
@@ -889,0 +888,0 @@ onKeyDown: handleKeyDown(other), |
import { SlotComponentProps } from '@mui/utils'; | ||
export default function mergeSlotProps<T extends SlotComponentProps<React.ElementType, {}, {}>, K = T, U = T extends Function ? T : K extends Function ? K : T extends undefined ? K : T>(externalSlotProps: T | undefined, defaultSlotProps: K): U; | ||
export default function mergeSlotProps<T extends SlotComponentProps<React.ElementType, {}, {}>, K = T, U = (T extends Function ? T : K extends Function ? K : T extends undefined ? K : T)>(externalSlotProps: T | undefined, defaultSlotProps: K): U; |
@@ -7,7 +7,7 @@ "use strict"; | ||
exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0; | ||
const version = exports.version = "7.0.0-alpha.1"; | ||
const version = exports.version = "7.0.0-alpha.2"; | ||
const major = exports.major = Number("7"); | ||
const minor = exports.minor = Number("0"); | ||
const patch = exports.patch = Number("0"); | ||
const prerelease = exports.prerelease = "alpha.1"; | ||
const prerelease = exports.prerelease = "alpha.2"; | ||
var _default = exports.default = version; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
714
8151275
3322
218608
+ Added@mui/material-pigment-css@7.0.0-alpha.2(transitive)
+ Added@mui/private-theming@7.0.0-alpha.2(transitive)
+ Added@mui/styled-engine@7.0.0-alpha.2(transitive)
+ Added@mui/system@7.0.0-alpha.2(transitive)
+ Added@mui/utils@7.0.0-alpha.2(transitive)
- Removed@mui/material-pigment-css@7.0.0-alpha.1(transitive)
- Removed@mui/private-theming@7.0.0-alpha.1(transitive)
- Removed@mui/styled-engine@7.0.0-alpha.1(transitive)
- Removed@mui/system@7.0.0-alpha.1(transitive)
- Removed@mui/utils@7.0.0-alpha.1(transitive)
Updated@babel/runtime@^7.26.9
Updated@mui/system@7.0.0-alpha.2
Updated@mui/utils@7.0.0-alpha.2