From 129a3eff4090ebcd5bc96e7cafb5f3f4699f5c3f Mon Sep 17 00:00:00 2001 From: sai chand <60743144+sai6855@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:21:06 +0530 Subject: [PATCH] [material-ui] Change React.ReactElement type from any to unknown (#43358) --- packages/mui-material/src/Accordion/Accordion.d.ts | 4 ++-- packages/mui-material/src/Backdrop/Backdrop.d.ts | 4 ++-- packages/mui-material/src/Dialog/Dialog.d.ts | 2 +- packages/mui-material/src/Fade/Fade.d.ts | 2 +- .../mui-material/src/FormControlLabel/FormControlLabel.d.ts | 2 +- packages/mui-material/src/Grow/Grow.d.ts | 2 +- packages/mui-material/src/NativeSelect/NativeSelect.d.ts | 2 +- packages/mui-material/src/Popover/Popover.d.ts | 2 +- packages/mui-material/src/Select/Select.d.ts | 2 +- packages/mui-material/src/Slide/Slide.d.ts | 2 +- packages/mui-material/src/Snackbar/Snackbar.d.ts | 4 ++-- packages/mui-material/src/SpeedDial/SpeedDial.d.ts | 2 +- packages/mui-material/src/StepContent/StepContent.d.ts | 2 +- packages/mui-material/src/Stepper/Stepper.d.ts | 2 +- packages/mui-material/src/Tooltip/Tooltip.d.ts | 4 ++-- packages/mui-material/src/Zoom/Zoom.d.ts | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/mui-material/src/Accordion/Accordion.d.ts b/packages/mui-material/src/Accordion/Accordion.d.ts index c1f207ffa6df15..c76e67a4e19eb9 100644 --- a/packages/mui-material/src/Accordion/Accordion.d.ts +++ b/packages/mui-material/src/Accordion/Accordion.d.ts @@ -19,7 +19,7 @@ export interface AccordionSlots { * @default Collapse */ transition?: React.JSXElementConstructor< - TransitionProps & { children?: React.ReactElement } + TransitionProps & { children?: React.ReactElement } >; } @@ -92,7 +92,7 @@ export type AccordionTypeMap< * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent?: React.JSXElementConstructor< - TransitionProps & { children?: React.ReactElement } + TransitionProps & { children?: React.ReactElement } >; /** * Props applied to the transition element. diff --git a/packages/mui-material/src/Backdrop/Backdrop.d.ts b/packages/mui-material/src/Backdrop/Backdrop.d.ts index 699948790dbf10..1be692237cef65 100644 --- a/packages/mui-material/src/Backdrop/Backdrop.d.ts +++ b/packages/mui-material/src/Backdrop/Backdrop.d.ts @@ -19,7 +19,7 @@ export interface BackdropSlots { * @default Fade */ transition?: React.JSXElementConstructor< - TransitionProps & { children: React.ReactElement } + TransitionProps & { children: React.ReactElement } >; } export interface BackdropComponentsPropsOverrides {} @@ -100,7 +100,7 @@ export interface BackdropOwnProps */ TransitionComponent?: React.JSXElementConstructor< TransitionProps & { - children: React.ReactElement; + children: React.ReactElement; } >; } diff --git a/packages/mui-material/src/Dialog/Dialog.d.ts b/packages/mui-material/src/Dialog/Dialog.d.ts index a5a25d168219d5..e8b4c70b12bf09 100644 --- a/packages/mui-material/src/Dialog/Dialog.d.ts +++ b/packages/mui-material/src/Dialog/Dialog.d.ts @@ -88,7 +88,7 @@ export interface DialogProps extends StandardProps { * @default Fade */ TransitionComponent?: React.JSXElementConstructor< - TransitionProps & { children: React.ReactElement } + TransitionProps & { children: React.ReactElement } >; /** * The duration for the transition, in milliseconds. diff --git a/packages/mui-material/src/Fade/Fade.d.ts b/packages/mui-material/src/Fade/Fade.d.ts index dc29c55e69696d..a0c2fd024261f1 100644 --- a/packages/mui-material/src/Fade/Fade.d.ts +++ b/packages/mui-material/src/Fade/Fade.d.ts @@ -11,7 +11,7 @@ export interface FadeProps extends Omit { /** * A single child content element. */ - children: React.ReactElement; + children: React.ReactElement; /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values. diff --git a/packages/mui-material/src/FormControlLabel/FormControlLabel.d.ts b/packages/mui-material/src/FormControlLabel/FormControlLabel.d.ts index a473eb3bdc78fb..9a0b2e1d0caf5c 100644 --- a/packages/mui-material/src/FormControlLabel/FormControlLabel.d.ts +++ b/packages/mui-material/src/FormControlLabel/FormControlLabel.d.ts @@ -48,7 +48,7 @@ export interface FormControlLabelProps /** * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`. */ - control: React.ReactElement; + control: React.ReactElement; /** * If `true`, the control is disabled. */ diff --git a/packages/mui-material/src/Grow/Grow.d.ts b/packages/mui-material/src/Grow/Grow.d.ts index 3cc87d5fa00c6e..c01ca0614f9f1a 100644 --- a/packages/mui-material/src/Grow/Grow.d.ts +++ b/packages/mui-material/src/Grow/Grow.d.ts @@ -11,7 +11,7 @@ export interface GrowProps extends Omit { /** * A single child content element. */ - children: React.ReactElement; + children: React.ReactElement; /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values. diff --git a/packages/mui-material/src/NativeSelect/NativeSelect.d.ts b/packages/mui-material/src/NativeSelect/NativeSelect.d.ts index cedb084f32f51b..28ec68143d6468 100644 --- a/packages/mui-material/src/NativeSelect/NativeSelect.d.ts +++ b/packages/mui-material/src/NativeSelect/NativeSelect.d.ts @@ -26,7 +26,7 @@ export interface NativeSelectProps * An `Input` element; does not have to be a material-ui specific `Input`. * @default */ - input?: React.ReactElement; + input?: React.ReactElement; /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attributes) applied to the `select` element. */ diff --git a/packages/mui-material/src/Popover/Popover.d.ts b/packages/mui-material/src/Popover/Popover.d.ts index 63bdaa417ee012..3ff8f128b72a38 100644 --- a/packages/mui-material/src/Popover/Popover.d.ts +++ b/packages/mui-material/src/Popover/Popover.d.ts @@ -146,7 +146,7 @@ export interface PopoverProps * @default Grow */ TransitionComponent?: React.JSXElementConstructor< - TransitionProps & { children: React.ReactElement } + TransitionProps & { children: React.ReactElement } >; /** * Set to 'auto' to automatically calculate transition time based on height. diff --git a/packages/mui-material/src/Select/Select.d.ts b/packages/mui-material/src/Select/Select.d.ts index 1510954da84ce7..84bf9cfed790ab 100644 --- a/packages/mui-material/src/Select/Select.d.ts +++ b/packages/mui-material/src/Select/Select.d.ts @@ -63,7 +63,7 @@ export interface BaseSelectProps /** * An `Input` element; does not have to be a material-ui specific `Input`. */ - input?: React.ReactElement; + input?: React.ReactElement; /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. * When `native` is `true`, the attributes are applied on the `select` element. diff --git a/packages/mui-material/src/Slide/Slide.d.ts b/packages/mui-material/src/Slide/Slide.d.ts index e0472114a2ae86..58cf5747ff7413 100644 --- a/packages/mui-material/src/Slide/Slide.d.ts +++ b/packages/mui-material/src/Slide/Slide.d.ts @@ -11,7 +11,7 @@ export interface SlideProps extends TransitionProps { /** * A single child content element. */ - children: React.ReactElement; + children: React.ReactElement; /** * An HTML element, or a function that returns one. * It's used to set the container the Slide is transitioning from. diff --git a/packages/mui-material/src/Snackbar/Snackbar.d.ts b/packages/mui-material/src/Snackbar/Snackbar.d.ts index 3128d00d125cc8..07f9bf3a5754c0 100644 --- a/packages/mui-material/src/Snackbar/Snackbar.d.ts +++ b/packages/mui-material/src/Snackbar/Snackbar.d.ts @@ -37,7 +37,7 @@ export interface SnackbarProps extends StandardProps; + children?: React.ReactElement; /** * Override or extend the styles applied to the component. */ @@ -98,7 +98,7 @@ export interface SnackbarProps extends StandardProps } + TransitionProps & { children: React.ReactElement } >; /** * The duration for the transition, in milliseconds. diff --git a/packages/mui-material/src/SpeedDial/SpeedDial.d.ts b/packages/mui-material/src/SpeedDial/SpeedDial.d.ts index b163ce53477207..50f895905d2dac 100644 --- a/packages/mui-material/src/SpeedDial/SpeedDial.d.ts +++ b/packages/mui-material/src/SpeedDial/SpeedDial.d.ts @@ -17,7 +17,7 @@ export interface SpeedDialSlots { * @default {} */ transition?: React.JSXElementConstructor< - TransitionProps & { children: React.ReactElement } + TransitionProps & { children: React.ReactElement } >; } diff --git a/packages/mui-material/src/StepContent/StepContent.d.ts b/packages/mui-material/src/StepContent/StepContent.d.ts index 3d46e210338b64..eeb4e3e6cbf814 100644 --- a/packages/mui-material/src/StepContent/StepContent.d.ts +++ b/packages/mui-material/src/StepContent/StepContent.d.ts @@ -24,7 +24,7 @@ export interface StepContentProps extends StandardProps } + TransitionProps & { children: React.ReactElement } >; /** * Adjust the duration of the content expand transition. diff --git a/packages/mui-material/src/Stepper/Stepper.d.ts b/packages/mui-material/src/Stepper/Stepper.d.ts index 68b5afe796b4bb..f69a73fdee860a 100644 --- a/packages/mui-material/src/Stepper/Stepper.d.ts +++ b/packages/mui-material/src/Stepper/Stepper.d.ts @@ -32,7 +32,7 @@ export interface StepperOwnProps extends Pick */ - connector?: React.ReactElement | null; + connector?: React.ReactElement | null; /** * If set the `Stepper` will not assist in controlling steps for linear flow. * @default false diff --git a/packages/mui-material/src/Tooltip/Tooltip.d.ts b/packages/mui-material/src/Tooltip/Tooltip.d.ts index 8c55ac9ed79fa2..926417e83e8c3b 100644 --- a/packages/mui-material/src/Tooltip/Tooltip.d.ts +++ b/packages/mui-material/src/Tooltip/Tooltip.d.ts @@ -16,7 +16,7 @@ export interface TooltipProps extends StandardProps; + children: React.ReactElement; /** * Override or extend the styles applied to the component. */ @@ -204,7 +204,7 @@ export interface TooltipProps extends StandardProps } + TransitionProps & { children: React.ReactElement } >; /** * Props applied to the transition element. diff --git a/packages/mui-material/src/Zoom/Zoom.d.ts b/packages/mui-material/src/Zoom/Zoom.d.ts index 82a1714a29f446..0d6d8a2703a787 100644 --- a/packages/mui-material/src/Zoom/Zoom.d.ts +++ b/packages/mui-material/src/Zoom/Zoom.d.ts @@ -11,7 +11,7 @@ export interface ZoomProps extends TransitionProps { /** * A single child content element. */ - children: React.ReactElement; + children: React.ReactElement; /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values.