1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { FadeProps } from '../Fade';
|
4 | import { TransitionProps } from '../transitions/transition';
|
5 | import { Theme } from '../styles';
|
6 | import { BackdropClasses } from './backdropClasses';
|
7 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
8 | import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
9 |
|
10 | export interface BackdropSlots {
|
11 | |
12 |
|
13 |
|
14 |
|
15 | root: React.ElementType;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 | transition: React.JSXElementConstructor<
|
22 | TransitionProps & { children: React.ReactElement<unknown, any> }
|
23 | >;
|
24 | }
|
25 | export interface BackdropComponentsPropsOverrides {}
|
26 |
|
27 | export interface BackdropTransitionSlotPropsOverrides {}
|
28 |
|
29 | export type BackdropSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
30 | BackdropSlots,
|
31 | {
|
32 | root: SlotProps<
|
33 | React.ElementType<HTMLDivElement>,
|
34 | BackdropComponentsPropsOverrides,
|
35 | BackdropOwnerState
|
36 | >;
|
37 | transition: SlotProps<
|
38 | React.JSXElementConstructor<TransitionProps>,
|
39 | BackdropTransitionSlotPropsOverrides,
|
40 | BackdropOwnerState
|
41 | >;
|
42 | }
|
43 | >;
|
44 |
|
45 | export interface BackdropOwnProps
|
46 | extends Partial<Omit<FadeProps, 'children'>>,
|
47 | BackdropSlotsAndSlotProps {
|
48 | |
49 |
|
50 |
|
51 | children?: React.ReactNode;
|
52 | |
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | components?: {
|
60 | Root?: React.ElementType;
|
61 | };
|
62 | |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | componentsProps?: {
|
71 | root?: React.HTMLAttributes<HTMLDivElement> & BackdropComponentsPropsOverrides;
|
72 | };
|
73 | |
74 |
|
75 |
|
76 | classes?: Partial<BackdropClasses>;
|
77 | |
78 |
|
79 |
|
80 |
|
81 |
|
82 | invisible?: boolean;
|
83 | |
84 |
|
85 |
|
86 | open: boolean;
|
87 | |
88 |
|
89 |
|
90 | sx?: SxProps<Theme>;
|
91 | |
92 |
|
93 |
|
94 |
|
95 | transitionDuration?: TransitionProps['timeout'];
|
96 | |
97 |
|
98 |
|
99 |
|
100 |
|
101 | TransitionComponent?: React.JSXElementConstructor<
|
102 | TransitionProps & {
|
103 | children: React.ReactElement<unknown, any>;
|
104 | }
|
105 | >;
|
106 | }
|
107 |
|
108 | export interface BackdropTypeMap<
|
109 | AdditionalProps = {},
|
110 | RootComponent extends React.ElementType = 'div',
|
111 | > {
|
112 | props: AdditionalProps & BackdropOwnProps;
|
113 | defaultComponent: RootComponent;
|
114 | }
|
115 |
|
116 | type BackdropRootProps = NonNullable<BackdropTypeMap['props']['componentsProps']>['root'];
|
117 |
|
118 | export declare const BackdropRoot: React.FC<BackdropRootProps>;
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 | declare const Backdrop: OverridableComponent<BackdropTypeMap>;
|
132 |
|
133 | export type BackdropProps<
|
134 | RootComponent extends React.ElementType = BackdropTypeMap['defaultComponent'],
|
135 | AdditionalProps = {},
|
136 | > = OverrideProps<BackdropTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
137 | component?: React.ElementType;
|
138 | };
|
139 |
|
140 | export interface BackdropOwnerState extends BackdropProps {}
|
141 |
|
142 | export default Backdrop;
|