@instructure/ui-modal 8.23.1-snapshot.11 → 8.23.1-snapshot.23
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/es/Modal/ModalBody/index.js +17 -13
- package/es/Modal/ModalFooter/index.js +12 -8
- package/es/Modal/ModalHeader/index.js +11 -7
- package/es/Modal/ModalLocator.js +8 -4
- package/es/Modal/index.js +40 -49
- package/es/Modal/props.js +0 -99
- package/lib/Modal/ModalBody/index.js +17 -13
- package/lib/Modal/ModalFooter/index.js +12 -8
- package/lib/Modal/ModalHeader/index.js +11 -7
- package/lib/Modal/ModalLocator.js +7 -3
- package/lib/Modal/index.js +40 -49
- package/lib/Modal/props.js +0 -99
- package/package.json +21 -21
- package/src/Modal/ModalBody/index.tsx +7 -17
- package/src/Modal/ModalFooter/index.tsx +7 -10
- package/src/Modal/ModalHeader/index.tsx +9 -12
- package/src/Modal/index.tsx +24 -37
- package/src/Modal/props.ts +131 -97
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Modal/ModalBody/index.d.ts +2 -2
- package/types/Modal/ModalBody/index.d.ts.map +1 -1
- package/types/Modal/ModalFooter/index.d.ts +4 -4
- package/types/Modal/ModalFooter/index.d.ts.map +1 -1
- package/types/Modal/ModalHeader/index.d.ts +4 -4
- package/types/Modal/ModalHeader/index.d.ts.map +1 -1
- package/types/Modal/index.d.ts +13 -78
- package/types/Modal/index.d.ts.map +1 -1
- package/types/Modal/props.d.ts +108 -22
- package/types/Modal/props.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AASrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AASrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAItE;;;;;;GAMG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;MAGlB;IAED,GAAG,EAAE,cAAc,GAAG,IAAI,CAAO;IAEjC,SAAS,OAAQ,cAAc,GAAG,IAAI,UAErC;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,cAAc,QAAO,qBAAqB,CAIzC;IAED,IAAI,eAAe,YAalB;IAED,MAAM;CAaP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/types/Modal/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
|
-
import type { TransitionType } from '@instructure/ui-motion';
|
|
4
3
|
import type { PortalNode } from '@instructure/ui-portal';
|
|
4
|
+
import { Dialog } from '@instructure/ui-dialog';
|
|
5
5
|
import { ModalHeader } from './ModalHeader';
|
|
6
6
|
import type { ModalHeaderProps } from './ModalHeader/props';
|
|
7
7
|
import { ModalBody } from './ModalBody';
|
|
@@ -9,7 +9,7 @@ import type { ModalBodyProps } from './ModalBody/props';
|
|
|
9
9
|
import { ModalFooter } from './ModalFooter';
|
|
10
10
|
import type { ModalFooterProps } from './ModalFooter/props';
|
|
11
11
|
import { jsx } from '@instructure/emotion';
|
|
12
|
-
import type { ModalProps } from './props';
|
|
12
|
+
import type { ModalProps, ModalState, ModalPropsForPortal, ModalPropsForTransition } from './props';
|
|
13
13
|
declare type HeaderChild = React.ComponentElement<ModalHeaderProps, ModalHeader>;
|
|
14
14
|
declare type BodyChild = React.ComponentElement<ModalBodyProps, ModalBody>;
|
|
15
15
|
declare type FooterChild = React.ComponentElement<ModalFooterProps, ModalFooter>;
|
|
@@ -18,107 +18,42 @@ declare type FooterChild = React.ComponentElement<ModalFooterProps, ModalFooter>
|
|
|
18
18
|
category: components
|
|
19
19
|
tags: overlay, portal, dialog
|
|
20
20
|
---
|
|
21
|
+
@tsProps
|
|
21
22
|
**/
|
|
22
|
-
declare class Modal extends Component<ModalProps> {
|
|
23
|
+
declare class Modal extends Component<ModalProps, ModalState> {
|
|
23
24
|
static readonly componentId = "Modal";
|
|
24
|
-
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof
|
|
25
|
-
|
|
26
|
-
children: React.ReactNode;
|
|
27
|
-
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
28
|
-
size?: "medium" | "small" | "auto" | "large" | "fullscreen" | undefined;
|
|
29
|
-
variant?: "default" | "inverse" | undefined;
|
|
30
|
-
open?: boolean | undefined;
|
|
31
|
-
defaultFocusElement?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((...args: any[]) => any) | undefined;
|
|
32
|
-
shouldReturnFocus?: boolean | undefined;
|
|
33
|
-
shouldCloseOnDocumentClick?: boolean | undefined;
|
|
34
|
-
onOpen?: ((DOMNode: PortalNode) => void) | undefined;
|
|
35
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
36
|
-
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
37
|
-
contentRef?: ((...args: any[]) => any) | undefined;
|
|
38
|
-
mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
|
|
39
|
-
insertAt?: "bottom" | "top" | undefined;
|
|
40
|
-
liveRegion?: import("@instructure/shared-types").LiveRegion | undefined;
|
|
41
|
-
transition?: TransitionType | undefined;
|
|
42
|
-
onEnter?: ((...args: any[]) => any) | undefined;
|
|
43
|
-
onEntering?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
onEntered?: ((...args: any[]) => any) | undefined;
|
|
45
|
-
onExit?: ((...args: any[]) => any) | undefined;
|
|
46
|
-
onExiting?: ((...args: any[]) => any) | undefined;
|
|
47
|
-
onExited?: ((type?: TransitionType | undefined) => void) | undefined;
|
|
48
|
-
constrain?: "window" | "parent" | undefined;
|
|
49
|
-
overflow?: "scroll" | "fit" | undefined;
|
|
50
|
-
}>;
|
|
51
|
-
static allowedProps: readonly (keyof {
|
|
52
|
-
label: string;
|
|
53
|
-
children: React.ReactNode;
|
|
54
|
-
as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
|
|
55
|
-
size?: "medium" | "small" | "auto" | "large" | "fullscreen" | undefined;
|
|
56
|
-
variant?: "default" | "inverse" | undefined;
|
|
57
|
-
open?: boolean | undefined;
|
|
58
|
-
defaultFocusElement?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((...args: any[]) => any) | undefined;
|
|
59
|
-
shouldReturnFocus?: boolean | undefined;
|
|
60
|
-
shouldCloseOnDocumentClick?: boolean | undefined;
|
|
61
|
-
onOpen?: ((DOMNode: PortalNode) => void) | undefined;
|
|
62
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
63
|
-
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
64
|
-
contentRef?: ((...args: any[]) => any) | undefined;
|
|
65
|
-
mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
|
|
66
|
-
insertAt?: "bottom" | "top" | undefined;
|
|
67
|
-
liveRegion?: import("@instructure/shared-types").LiveRegion | undefined;
|
|
68
|
-
transition?: TransitionType | undefined;
|
|
69
|
-
onEnter?: ((...args: any[]) => any) | undefined;
|
|
70
|
-
onEntering?: ((...args: any[]) => any) | undefined;
|
|
71
|
-
onEntered?: ((...args: any[]) => any) | undefined;
|
|
72
|
-
onExit?: ((...args: any[]) => any) | undefined;
|
|
73
|
-
onExiting?: ((...args: any[]) => any) | undefined;
|
|
74
|
-
onExited?: ((type?: TransitionType | undefined) => void) | undefined;
|
|
75
|
-
constrain?: "window" | "parent" | undefined;
|
|
76
|
-
overflow?: "scroll" | "fit" | undefined;
|
|
77
|
-
})[];
|
|
25
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"children" | "variant" | "size" | "overflow" | "contentRef" | "constrain" | keyof ModalPropsForPortal | keyof ModalPropsForTransition | keyof import("./props").ModalPropsForDialog>;
|
|
26
|
+
static allowedProps: readonly ("children" | "variant" | "size" | "overflow" | "contentRef" | "constrain" | keyof ModalPropsForPortal | keyof ModalPropsForTransition | keyof import("./props").ModalPropsForDialog)[];
|
|
78
27
|
static defaultProps: {
|
|
79
28
|
open: boolean;
|
|
80
29
|
size: string;
|
|
81
30
|
variant: string;
|
|
82
31
|
transition: string;
|
|
83
|
-
onOpen: (event: any) => void;
|
|
84
|
-
onClose: (event: any) => void;
|
|
85
|
-
onDismiss: (event: any) => void;
|
|
86
|
-
onEnter: () => void;
|
|
87
|
-
onEntering: () => void;
|
|
88
|
-
onEntered: () => void;
|
|
89
|
-
onExit: () => void;
|
|
90
|
-
onExiting: () => void;
|
|
91
|
-
onExited: () => void;
|
|
92
|
-
as: undefined;
|
|
93
|
-
mountNode: null;
|
|
94
32
|
insertAt: string;
|
|
95
|
-
liveRegion: null;
|
|
96
|
-
contentRef: (el: any) => void;
|
|
97
33
|
shouldCloseOnDocumentClick: boolean;
|
|
98
34
|
shouldReturnFocus: boolean;
|
|
99
|
-
defaultFocusElement: null;
|
|
100
|
-
children: null;
|
|
101
35
|
constrain: string;
|
|
102
36
|
overflow: string;
|
|
103
37
|
};
|
|
104
38
|
static Header: typeof ModalHeader;
|
|
105
39
|
static Body: typeof ModalBody;
|
|
106
40
|
static Footer: typeof ModalFooter;
|
|
107
|
-
constructor(props:
|
|
41
|
+
constructor(props: ModalProps);
|
|
108
42
|
_DOMNode: PortalNode;
|
|
43
|
+
_content: Dialog | null;
|
|
109
44
|
ref?: Element | null;
|
|
110
45
|
handleRef: (el?: Element | null | undefined) => void;
|
|
111
46
|
componentDidMount(): void;
|
|
112
|
-
componentDidUpdate(prevProps:
|
|
113
|
-
get defaultFocusElement():
|
|
47
|
+
componentDidUpdate(prevProps: ModalProps): void;
|
|
48
|
+
get defaultFocusElement(): import("@instructure/shared-types").UIElement | undefined;
|
|
114
49
|
get DOMNode(): PortalNode;
|
|
115
50
|
set DOMNode(el: PortalNode);
|
|
116
51
|
get maskPlacement(): "center" | "stretch";
|
|
117
52
|
handlePortalOpen: (DOMNode: PortalNode) => void;
|
|
118
|
-
handleTransitionExited:
|
|
119
|
-
contentRef: (el:
|
|
53
|
+
handleTransitionExited: ModalProps['onExited'];
|
|
54
|
+
contentRef: (el: Dialog | null) => void;
|
|
120
55
|
renderChildren(): (HeaderChild | BodyChild | FooterChild)[];
|
|
121
|
-
renderDialog(props:
|
|
56
|
+
renderDialog(props: Omit<ModalProps, keyof ModalPropsForPortal | keyof ModalPropsForTransition | 'constrain' | 'overflow'>): jsx.JSX.Element;
|
|
122
57
|
render(): jsx.JSX.Element;
|
|
123
58
|
}
|
|
124
59
|
export default Modal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Modal/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Modal/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;AAYlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CA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IAAI,CAAO;IAE3B,SAAS,4CAER;IAED,iBAAiB;IAIjB,kBAAkB,CAAC,SAAS,EAAE,UAAU;IAUxC,IAAI,mBAAmB,8DAEtB;IAED,IAAI,OAAO,IAGK,UAAU,CADzB;IACD,IAAI,OAAO,CAAC,EAAE,EAAE,UAAU,EAEzB;IAED,IAAI,aAAa,yBAMhB;IAED,gBAAgB,YAAa,UAAU,UAEtC;IAED,sBAAsB,EAAE,UAAU,CAAC,UAAU,CAAC,CAI7C;IAED,UAAU,OAAQ,MAAM,GAAG,IAAI,UAK9B;IAED,cAAc;IAsBd,YAAY,CACV,KAAK,EAAE,IAAI,CACT,UAAU,EACR,MAAM,mBAAmB,GACzB,MAAM,uBAAuB,GAC7B,WAAW,GACX,UAAU,CACb;IAiDH,MAAM;CA0DP;AAED,eAAe,KAAK,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,CAAA"}
|
package/types/Modal/props.d.ts
CHANGED
|
@@ -1,42 +1,128 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { Dialog } from '@instructure/ui-dialog';
|
|
3
|
+
import type { AsElementType, PropValidators, ModalTheme, OtherHTMLAttributes, LiveRegion, UIElement } from '@instructure/shared-types';
|
|
3
4
|
import type { PortalNode } from '@instructure/ui-portal';
|
|
4
5
|
import type { PositionMountNode } from '@instructure/ui-position';
|
|
5
6
|
import type { TransitionType } from '@instructure/ui-motion';
|
|
6
7
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
7
|
-
declare type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
size?: 'auto' | 'small' | 'medium' | 'large' | 'fullscreen';
|
|
12
|
-
variant?: 'default' | 'inverse';
|
|
8
|
+
declare type ModalPropsForPortal = {
|
|
9
|
+
/**
|
|
10
|
+
* Whether or not the `<Modal />` is open
|
|
11
|
+
*/
|
|
13
12
|
open?: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
onClose?: (...args: any[]) => any;
|
|
19
|
-
onDismiss?: (...args: any[]) => any;
|
|
20
|
-
contentRef?: (...args: any[]) => any;
|
|
13
|
+
/**
|
|
14
|
+
* An element or a function returning an element to use as the mount node
|
|
15
|
+
* for the `<Modal />` (defaults to `document.body`)
|
|
16
|
+
*/
|
|
21
17
|
mountNode?: PositionMountNode;
|
|
18
|
+
/**
|
|
19
|
+
* Insert the element at the 'top' of the mountNode or at the 'bottom'
|
|
20
|
+
*/
|
|
22
21
|
insertAt?: 'bottom' | 'top';
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Callback fired when `<Modal />` content has been mounted in the DOM
|
|
24
|
+
*/
|
|
25
|
+
onOpen?: (DOMNode: PortalNode) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Callback fired when `<Modal />` has been unmounted from the DOM
|
|
28
|
+
*/
|
|
29
|
+
onClose?: () => void;
|
|
30
|
+
};
|
|
31
|
+
declare type ModalPropsForTransition = {
|
|
24
32
|
transition?: TransitionType;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Callback fired before the <Modal /> transitions in
|
|
35
|
+
*/
|
|
36
|
+
onEnter?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Callback fired as the <Modal /> begins to transition in
|
|
39
|
+
*/
|
|
40
|
+
onEntering?: () => void;
|
|
41
|
+
/**
|
|
42
|
+
* Callback fired after the <Modal /> finishes transitioning in
|
|
43
|
+
*/
|
|
44
|
+
onEntered?: (type?: TransitionType) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Callback fired right before the <Modal /> transitions out
|
|
47
|
+
*/
|
|
48
|
+
onExit?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Callback fired as the <Modal /> begins to transition out
|
|
51
|
+
*/
|
|
52
|
+
onExiting?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Callback fired after the <Modal /> finishes transitioning out
|
|
55
|
+
*/
|
|
30
56
|
onExited?: (type?: TransitionType) => void;
|
|
57
|
+
};
|
|
58
|
+
declare type ModalPropsForDialog = {
|
|
59
|
+
/**
|
|
60
|
+
* An accessible label for the `<Modal />` content
|
|
61
|
+
*/
|
|
62
|
+
label: string;
|
|
63
|
+
/**
|
|
64
|
+
* The element to render the dialog as, `span` by default
|
|
65
|
+
*/
|
|
66
|
+
as?: AsElementType;
|
|
67
|
+
/**
|
|
68
|
+
* Whether focus should be returned to the trigger when the `<Modal/>` is closed
|
|
69
|
+
*/
|
|
70
|
+
shouldReturnFocus?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether the `<Modal/>` should request close when the document is clicked
|
|
73
|
+
*/
|
|
74
|
+
shouldCloseOnDocumentClick?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Callback fired when the `<Modal />` is requesting to be closed
|
|
77
|
+
*/
|
|
78
|
+
onDismiss?: (event: React.UIEvent | React.FocusEvent, documentClick?: boolean) => void;
|
|
79
|
+
/**
|
|
80
|
+
* An element, function returning an element, or array of elements that will not be hidden from
|
|
81
|
+
* the screen reader when the `<Modal />` is open
|
|
82
|
+
*/
|
|
83
|
+
liveRegion?: LiveRegion;
|
|
84
|
+
/**
|
|
85
|
+
* An element or a function returning an element to focus by default
|
|
86
|
+
*/
|
|
87
|
+
defaultFocusElement?: UIElement;
|
|
88
|
+
};
|
|
89
|
+
declare type ModalOwnProps = {
|
|
90
|
+
/**
|
|
91
|
+
* The children to be rendered within the `<Modal />`. Children must be type of: `Modal.Header`, `Modal.Body`, `Modal.Footer`. The `Modal.Body` child is required, and they have to follow this order.
|
|
92
|
+
*/
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* The size of the `<Modal />` content
|
|
96
|
+
*/
|
|
97
|
+
size?: 'auto' | 'small' | 'medium' | 'large' | 'fullscreen';
|
|
98
|
+
/**
|
|
99
|
+
* Designates the background style of the `<Modal />`
|
|
100
|
+
*/
|
|
101
|
+
variant?: 'default' | 'inverse';
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* A function that returns a reference to the content element
|
|
105
|
+
*/
|
|
106
|
+
contentRef?: (dialog: Dialog | null) => void;
|
|
107
|
+
/**
|
|
108
|
+
* Constrain the Modal to the document window or its closest positioned parent
|
|
109
|
+
*/
|
|
31
110
|
constrain?: 'window' | 'parent';
|
|
111
|
+
/**
|
|
112
|
+
* Should ModalBody handle overflow with scrollbars, or fit its
|
|
113
|
+
* content within its own height?
|
|
114
|
+
*/
|
|
32
115
|
overflow?: 'scroll' | 'fit';
|
|
33
|
-
};
|
|
116
|
+
} & ModalPropsForPortal & ModalPropsForTransition & ModalPropsForDialog;
|
|
34
117
|
declare type PropKeys = keyof ModalOwnProps;
|
|
35
118
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
36
119
|
declare type ModalProps = ModalOwnProps & WithStyleProps<ModalTheme, ModalStyle> & OtherHTMLAttributes<ModalOwnProps>;
|
|
37
120
|
declare type ModalStyle = ComponentStyle<'modal' | 'constrainContext'>;
|
|
121
|
+
declare type ModalState = {
|
|
122
|
+
transitioning: boolean;
|
|
123
|
+
};
|
|
38
124
|
declare const propTypes: PropValidators<PropKeys>;
|
|
39
125
|
declare const allowedProps: AllowedPropKeys;
|
|
40
|
-
export type { ModalProps, ModalStyle };
|
|
126
|
+
export type { ModalProps, ModalStyle, ModalState, ModalPropsForPortal, ModalPropsForTransition, ModalPropsForDialog };
|
|
41
127
|
export { propTypes, allowedProps };
|
|
42
128
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Modal/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Modal/props.ts"],"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