@elliemae/ds-legacy-modal-slide 1.0.0-rc.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/dist/cjs/DSModalSlide.js +229 -0
- package/dist/cjs/DSModalSlide.js.map +7 -0
- package/dist/cjs/components/Footer.js +112 -0
- package/dist/cjs/components/Footer.js.map +7 -0
- package/dist/cjs/components/Header.js +87 -0
- package/dist/cjs/components/Header.js.map +7 -0
- package/dist/cjs/components/blocks.js +66 -0
- package/dist/cjs/components/blocks.js.map +7 -0
- package/dist/cjs/index.js +42 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/esm/DSModalSlide.js +199 -0
- package/dist/esm/DSModalSlide.js.map +7 -0
- package/dist/esm/components/Footer.js +82 -0
- package/dist/esm/components/Footer.js.map +7 -0
- package/dist/esm/components/Header.js +57 -0
- package/dist/esm/components/Header.js.map +7 -0
- package/dist/esm/components/blocks.js +36 -0
- package/dist/esm/components/blocks.js.map +7 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/types/DSModalSlide.d.ts +44 -0
- package/dist/types/components/Footer.d.ts +55 -0
- package/dist/types/components/Header.d.ts +26 -0
- package/dist/types/components/blocks.d.ts +11 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/tests/DSModalSlide.test.d.ts +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React2, { useState, useEffect, useCallback, useMemo } from "react";
|
|
4
|
+
import { PropTypes, describe, useGetGlobalAttributes } from "@elliemae/ds-legacy-props-helpers";
|
|
5
|
+
import { debounce } from "lodash";
|
|
6
|
+
import ReactDOM from "react-dom";
|
|
7
|
+
import { useTheme, styled } from "@elliemae/ds-legacy-system";
|
|
8
|
+
import { Grid } from "@elliemae/ds-legacy-grid";
|
|
9
|
+
import DSSeparator from "@elliemae/ds-legacy-separator";
|
|
10
|
+
import { Wrapper, Overlay, Content, ActualContent } from "./components/blocks.js";
|
|
11
|
+
import ModalHeader from "./components/Header.js";
|
|
12
|
+
import ModalFooter from "./components/Footer.js";
|
|
13
|
+
const StyledWrapper = styled(Grid)`
|
|
14
|
+
overflow: auto;
|
|
15
|
+
&:focus,
|
|
16
|
+
&:focus-visible {
|
|
17
|
+
outline: 1px solid ${({ theme }) => theme.colors.brand["600"]};
|
|
18
|
+
outline-offset: -1px;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
const ModalSlideAnimationFix = styled.div`
|
|
22
|
+
.em-ds-modal-slide__overlay--disappearing,
|
|
23
|
+
.em-ds-modal-slide__content--disappearing {
|
|
24
|
+
animation-fill-mode: forwards;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const DSModalSlide = (props2) => {
|
|
28
|
+
const {
|
|
29
|
+
isOpen = false,
|
|
30
|
+
children,
|
|
31
|
+
getContainer,
|
|
32
|
+
centered = false,
|
|
33
|
+
fullWidth = false,
|
|
34
|
+
header = null,
|
|
35
|
+
footer = null,
|
|
36
|
+
fadeOut = 1500,
|
|
37
|
+
fadeIn = 1500,
|
|
38
|
+
overrideHeight = false,
|
|
39
|
+
innerRef = null
|
|
40
|
+
} = props2;
|
|
41
|
+
const [isMoving, setMoving] = useState(false);
|
|
42
|
+
const [show, setShow] = useState(isOpen);
|
|
43
|
+
const [width, setWidth] = useState(50);
|
|
44
|
+
const [height, setHeight] = useState("100%");
|
|
45
|
+
const theme = useTheme();
|
|
46
|
+
const contentRows = [...header ? ["auto", "1px"] : [], "1fr", ...footer ? ["1px", theme.space.m] : []];
|
|
47
|
+
const globalAttrs = useGetGlobalAttributes(props2);
|
|
48
|
+
const updateShow = useCallback(() => {
|
|
49
|
+
if (fullWidth)
|
|
50
|
+
setWidth(100);
|
|
51
|
+
else
|
|
52
|
+
setWidth(50);
|
|
53
|
+
if (isOpen !== show) {
|
|
54
|
+
setMoving(true);
|
|
55
|
+
if (isOpen) {
|
|
56
|
+
setShow(isOpen);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}, [isOpen, fullWidth, isMoving]);
|
|
60
|
+
useEffect(updateShow, [isOpen, fullWidth]);
|
|
61
|
+
const container = getContainer();
|
|
62
|
+
const handleHeight = useCallback(() => {
|
|
63
|
+
const newHeight = overrideHeight && container.scrollHeight > container.getBoundingClientRect().height ? container.scrollHeight : container.getBoundingClientRect().height;
|
|
64
|
+
setHeight(newHeight);
|
|
65
|
+
}, [container, overrideHeight]);
|
|
66
|
+
const onChangeParent = useMemo(() => debounce(handleHeight, 300, { leading: true }), [handleHeight]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
const resizeObserver = new ResizeObserver(() => onChangeParent());
|
|
69
|
+
if (container) {
|
|
70
|
+
resizeObserver.observe(container);
|
|
71
|
+
if (!container.style.position) {
|
|
72
|
+
container.style.position = "relative";
|
|
73
|
+
}
|
|
74
|
+
onChangeParent();
|
|
75
|
+
}
|
|
76
|
+
return () => {
|
|
77
|
+
if (container)
|
|
78
|
+
resizeObserver.unobserve(container);
|
|
79
|
+
};
|
|
80
|
+
}, [container, onChangeParent]);
|
|
81
|
+
if (!show)
|
|
82
|
+
return null;
|
|
83
|
+
if (!container)
|
|
84
|
+
return null;
|
|
85
|
+
const handleAnimationEnd = () => {
|
|
86
|
+
setMoving(false);
|
|
87
|
+
if (!isOpen)
|
|
88
|
+
setShow(isOpen);
|
|
89
|
+
};
|
|
90
|
+
return ReactDOM.createPortal(
|
|
91
|
+
/* @__PURE__ */ jsx(ModalSlideAnimationFix, { children: /* @__PURE__ */ jsx(
|
|
92
|
+
Wrapper,
|
|
93
|
+
{
|
|
94
|
+
...globalAttrs,
|
|
95
|
+
classProps: {
|
|
96
|
+
show: isOpen,
|
|
97
|
+
centered
|
|
98
|
+
},
|
|
99
|
+
style: {
|
|
100
|
+
"--height": height,
|
|
101
|
+
"--fade-in": fadeIn,
|
|
102
|
+
"--fade-out": fadeOut,
|
|
103
|
+
"--width": width,
|
|
104
|
+
left: 0
|
|
105
|
+
},
|
|
106
|
+
children: /* @__PURE__ */ jsx(
|
|
107
|
+
Overlay,
|
|
108
|
+
{
|
|
109
|
+
classProps: {
|
|
110
|
+
show: isOpen
|
|
111
|
+
},
|
|
112
|
+
children: /* @__PURE__ */ jsx(
|
|
113
|
+
Content,
|
|
114
|
+
{
|
|
115
|
+
onAnimationEnd: handleAnimationEnd,
|
|
116
|
+
classProps: {
|
|
117
|
+
show: isOpen
|
|
118
|
+
},
|
|
119
|
+
children: /* @__PURE__ */ jsxs(
|
|
120
|
+
Grid,
|
|
121
|
+
{
|
|
122
|
+
style: {
|
|
123
|
+
height: "100%",
|
|
124
|
+
width: "100%",
|
|
125
|
+
maxHeight: "100%",
|
|
126
|
+
overflow: "hidden",
|
|
127
|
+
"-webkit-backface-visibility": "hidden",
|
|
128
|
+
"backface-visibility": "hidden",
|
|
129
|
+
"-webkit-transform-style": "preserve-3d"
|
|
130
|
+
},
|
|
131
|
+
rows: contentRows,
|
|
132
|
+
"data-testid": "ds-modal-slide",
|
|
133
|
+
children: [
|
|
134
|
+
header && React2.cloneElement(header, { fullWidth }),
|
|
135
|
+
header && /* @__PURE__ */ jsx(DSSeparator, { position: "initial", type: "non-form" }),
|
|
136
|
+
/* @__PURE__ */ jsx(Grid, { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx(StyledWrapper, { ref: innerRef, tabIndex: 0, role: "contentinfo", children: /* @__PURE__ */ jsx(ActualContent, { children }) }) }),
|
|
137
|
+
footer && /* @__PURE__ */ jsx(DSSeparator, { position: "initial", type: "non-form" }),
|
|
138
|
+
footer
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
) }),
|
|
148
|
+
container
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
const props = {
|
|
152
|
+
/**
|
|
153
|
+
* If the modal slide is centered or not
|
|
154
|
+
*/
|
|
155
|
+
centered: PropTypes.bool.description("If the modal slide is centered or not"),
|
|
156
|
+
/**
|
|
157
|
+
* If the modal slide is visible or not
|
|
158
|
+
*/
|
|
159
|
+
isOpen: PropTypes.bool.description("If the modal slide is visible or not"),
|
|
160
|
+
/**
|
|
161
|
+
* Main content of the modal
|
|
162
|
+
*/
|
|
163
|
+
children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired.description(
|
|
164
|
+
"Main content of the modal"
|
|
165
|
+
),
|
|
166
|
+
/**
|
|
167
|
+
* If the modal slide takes the full width or not
|
|
168
|
+
*/
|
|
169
|
+
fullWidth: PropTypes.bool.description("If the modal slide takes the full width or not"),
|
|
170
|
+
/**
|
|
171
|
+
* If the modal slide has a header, only available for full width option
|
|
172
|
+
*/
|
|
173
|
+
header: PropTypes.element.description("If the modal slide has a header, only available for full width option"),
|
|
174
|
+
/**
|
|
175
|
+
* Ratio of fade out
|
|
176
|
+
*/
|
|
177
|
+
fadeOut: PropTypes.number.description("Ratio of fade out"),
|
|
178
|
+
/**
|
|
179
|
+
* Ratio of fade in
|
|
180
|
+
*/
|
|
181
|
+
fadeIn: PropTypes.number.description("Ratio of fade in"),
|
|
182
|
+
/**
|
|
183
|
+
* Override the panel height to scroll height of the container
|
|
184
|
+
*/
|
|
185
|
+
overrideHeight: PropTypes.bool.description("Override the panel height to scroll height of the container")
|
|
186
|
+
};
|
|
187
|
+
DSModalSlide.propTypes = props;
|
|
188
|
+
DSModalSlide.displayName = "DSModalSlide";
|
|
189
|
+
const DSModalSlideWithSchema = describe(DSModalSlide);
|
|
190
|
+
DSModalSlideWithSchema.propTypes = props;
|
|
191
|
+
var DSModalSlide_default = DSModalSlide;
|
|
192
|
+
export {
|
|
193
|
+
DSModalSlide,
|
|
194
|
+
DSModalSlideWithSchema,
|
|
195
|
+
ModalFooter,
|
|
196
|
+
ModalHeader,
|
|
197
|
+
DSModalSlide_default as default
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=DSModalSlide.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSModalSlide.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport { PropTypes, describe, useGetGlobalAttributes } from '@elliemae/ds-legacy-props-helpers';\nimport { debounce } from 'lodash';\nimport ReactDOM from 'react-dom';\nimport { useTheme, styled } from '@elliemae/ds-legacy-system';\nimport { Grid } from '@elliemae/ds-legacy-grid';\nimport DSSeparator from '@elliemae/ds-legacy-separator';\nimport { Wrapper, Overlay, Content, ActualContent } from './components/blocks.js';\nimport ModalHeader from './components/Header.js';\nimport ModalFooter from './components/Footer.js';\n\nconst StyledWrapper = styled(Grid)`\n overflow: auto;\n &:focus,\n &:focus-visible {\n outline: 1px solid ${({ theme }) => theme.colors.brand['600']};\n outline-offset: -1px;\n }\n`;\n// js engine and css engine can't be guaranteed to be in sync due to how they run on different threads in the browsers\n// this means that in some edge-cases react may have \"out-dated\" information like \"isMoving\" in this case\n// this can cause some animation frame to have the animation \"after\" end but before react has updated the state\n// if the css animation is not configured to stay in the end state,\n// in those edge-cases,\n// the animation will \"jump\" back to the start and cause a flicker\n// this is the fix for that, it's an hack because the component is still css classname based\n// when we re-do the modal slide, we should integrate this as the styled component css itself instead of this extra wrapper\nconst ModalSlideAnimationFix = styled.div`\n .em-ds-modal-slide__overlay--disappearing,\n .em-ds-modal-slide__content--disappearing {\n animation-fill-mode: forwards;\n }\n`;\n// eslint-disable-next-line complexity\nconst DSModalSlide = (props) => {\n const {\n isOpen = false,\n children,\n getContainer,\n centered = false,\n fullWidth = false,\n header = null,\n footer = null,\n fadeOut = 1500,\n fadeIn = 1500,\n overrideHeight = false,\n innerRef = null,\n } = props;\n const [isMoving, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const [height, setHeight] = useState('100%');\n const theme = useTheme();\n const contentRows = [...(header ? ['auto', '1px'] : []), '1fr', ...(footer ? ['1px', theme.space.m] : [])];\n const globalAttrs = useGetGlobalAttributes(props);\n const updateShow = useCallback(() => {\n if (fullWidth) setWidth(100);\n else setWidth(50);\n if (isOpen !== show) {\n setMoving(true);\n if (isOpen) {\n setShow(isOpen);\n }\n }\n }, [isOpen, fullWidth, isMoving]);\n\n useEffect(updateShow, [isOpen, fullWidth]);\n\n const container = getContainer();\n\n const handleHeight = useCallback(() => {\n const newHeight =\n overrideHeight && container.scrollHeight > container.getBoundingClientRect().height\n ? container.scrollHeight\n : container.getBoundingClientRect().height;\n setHeight(newHeight);\n }, [container, overrideHeight]);\n\n const onChangeParent = useMemo(() => debounce(handleHeight, 300, { leading: true }), [handleHeight]);\n\n useEffect(() => {\n const resizeObserver = new ResizeObserver(() => onChangeParent());\n if (container) {\n resizeObserver.observe(container);\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n onChangeParent();\n }\n return () => {\n if (container) resizeObserver.unobserve(container);\n };\n }, [container, onChangeParent]);\n\n if (!show) return null;\n if (!container) return null;\n\n const handleAnimationEnd = () => {\n setMoving(false);\n if (!isOpen) setShow(isOpen);\n };\n\n return ReactDOM.createPortal(\n <ModalSlideAnimationFix>\n <Wrapper\n {...globalAttrs}\n classProps={{\n show: isOpen,\n centered,\n }}\n style={{\n '--height': height,\n '--fade-in': fadeIn,\n '--fade-out': fadeOut,\n '--width': width,\n left: 0,\n }}\n >\n <Overlay\n classProps={{\n show: isOpen,\n }}\n >\n <Content\n onAnimationEnd={handleAnimationEnd}\n classProps={{\n show: isOpen,\n }}\n >\n <Grid\n style={{\n height: '100%',\n width: '100%',\n maxHeight: '100%',\n overflow: 'hidden',\n '-webkit-backface-visibility': 'hidden',\n 'backface-visibility': 'hidden',\n '-webkit-transform-style': 'preserve-3d',\n }}\n rows={contentRows}\n data-testid=\"ds-modal-slide\"\n >\n {header && React.cloneElement(header, { fullWidth })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\n <Grid style={{ overflow: 'hidden' }}>\n <StyledWrapper ref={innerRef} tabIndex={0} role=\"contentinfo\">\n <ActualContent>{children}</ActualContent>\n </StyledWrapper>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </Grid>\n </Content>\n </Overlay>\n </Wrapper>\n </ModalSlideAnimationFix>,\n container,\n );\n};\n\nconst props = {\n /**\n * If the modal slide is centered or not\n */\n centered: PropTypes.bool.description('If the modal slide is centered or not'),\n /**\n * If the modal slide is visible or not\n */\n isOpen: PropTypes.bool.description('If the modal slide is visible or not'),\n /**\n * Main content of the modal\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired.description(\n 'Main content of the modal',\n ),\n /**\n * If the modal slide takes the full width or not\n */\n fullWidth: PropTypes.bool.description('If the modal slide takes the full width or not'),\n /**\n * If the modal slide has a header, only available for full width option\n */\n header: PropTypes.element.description('If the modal slide has a header, only available for full width option'),\n /**\n * Ratio of fade out\n */\n fadeOut: PropTypes.number.description('Ratio of fade out'),\n /**\n * Ratio of fade in\n */\n fadeIn: PropTypes.number.description('Ratio of fade in'),\n /**\n * Override the panel height to scroll height of the container\n */\n overrideHeight: PropTypes.bool.description('Override the panel height to scroll height of the container'),\n};\n\nDSModalSlide.propTypes = props;\nDSModalSlide.displayName = 'DSModalSlide';\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = props;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmIX,SAca,KAdb;AAjIZ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,UAAU,OAAO,YAAY,mBAAmB;AAAA;AAAA;AAAA;AAAA,EAIzD,QAAQ,UAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA;AAAA;AAAA,EAIvD,gBAAgB,UAAU,KAAK,YAAY,6DAA6D;AAC1G;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
|
|
6
|
+
"names": ["React", "props"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-legacy-props-helpers";
|
|
4
|
+
import { DSButtonV2 } from "@elliemae/ds-legacy-button-v2";
|
|
5
|
+
import { FooterWrapper } from "./blocks.js";
|
|
6
|
+
const ModalFooter = ({
|
|
7
|
+
confirmLabel = "Confirm",
|
|
8
|
+
rejectLabel = "Cancel",
|
|
9
|
+
onConfirm,
|
|
10
|
+
onReject,
|
|
11
|
+
confirmProps = {
|
|
12
|
+
disabled: false
|
|
13
|
+
},
|
|
14
|
+
rejectProps = {
|
|
15
|
+
disabled: false
|
|
16
|
+
}
|
|
17
|
+
}) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(FooterWrapper, { children: [
|
|
18
|
+
!!onReject && /* @__PURE__ */ jsx(
|
|
19
|
+
DSButtonV2,
|
|
20
|
+
{
|
|
21
|
+
buttonType: "outline",
|
|
22
|
+
className: "action-reject",
|
|
23
|
+
"data-testid": "modal-footer-reject-btn",
|
|
24
|
+
onClick: onReject,
|
|
25
|
+
...rejectProps,
|
|
26
|
+
ml: "xs",
|
|
27
|
+
children: rejectLabel
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
!!onConfirm && /* @__PURE__ */ jsx(
|
|
31
|
+
DSButtonV2,
|
|
32
|
+
{
|
|
33
|
+
buttonType: "filled",
|
|
34
|
+
className: "action-confirm",
|
|
35
|
+
"data-testid": "modal-footer-confirm-btn",
|
|
36
|
+
onClick: onConfirm,
|
|
37
|
+
...confirmProps,
|
|
38
|
+
ml: "xs",
|
|
39
|
+
children: confirmLabel
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] }) });
|
|
43
|
+
const props = {
|
|
44
|
+
/**
|
|
45
|
+
* Confirm Label
|
|
46
|
+
*/
|
|
47
|
+
confirmLabel: PropTypes.string.description("Confirm Label"),
|
|
48
|
+
/**
|
|
49
|
+
* Reject Label
|
|
50
|
+
*/
|
|
51
|
+
rejectLabel: PropTypes.string.description("Reject Label"),
|
|
52
|
+
/**
|
|
53
|
+
* Callback
|
|
54
|
+
*/
|
|
55
|
+
onConfirm: PropTypes.func.description("Callback"),
|
|
56
|
+
/**
|
|
57
|
+
* Callback
|
|
58
|
+
*/
|
|
59
|
+
onReject: PropTypes.func.description("Callback"),
|
|
60
|
+
/**
|
|
61
|
+
* Extra DSButton props for confirm btn.
|
|
62
|
+
*/
|
|
63
|
+
confirmProps: PropTypes.shape({
|
|
64
|
+
disabled: PropTypes.bool
|
|
65
|
+
}).description("Extra DSButton props for confirm btn."),
|
|
66
|
+
/**
|
|
67
|
+
* Extra DSButton props for reject btn.
|
|
68
|
+
*/
|
|
69
|
+
rejectProps: PropTypes.shape({
|
|
70
|
+
disabled: PropTypes.bool
|
|
71
|
+
}).description("Extra DSButton props for reject btn.")
|
|
72
|
+
};
|
|
73
|
+
ModalFooter.propTypes = props;
|
|
74
|
+
ModalFooter.displayName = "ModalFooter";
|
|
75
|
+
const DSModalSlideFooterWithSchema = describe(ModalFooter);
|
|
76
|
+
DSModalSlideFooterWithSchema.propTypes = props;
|
|
77
|
+
var Footer_default = ModalFooter;
|
|
78
|
+
export {
|
|
79
|
+
DSModalSlideFooterWithSchema,
|
|
80
|
+
Footer_default as default
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=Footer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Footer.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-props-helpers';\nimport { DSButtonV2 } from '@elliemae/ds-legacy-button-v2';\nimport { FooterWrapper } from './blocks.js';\n\nconst ModalFooter = ({\n confirmLabel = 'Confirm',\n rejectLabel = 'Cancel',\n onConfirm,\n onReject,\n confirmProps = {\n disabled: false,\n },\n rejectProps = {\n disabled: false,\n },\n}) => (\n <>\n <FooterWrapper>\n {!!onReject && (\n <DSButtonV2\n buttonType=\"outline\"\n className=\"action-reject\"\n data-testid=\"modal-footer-reject-btn\"\n onClick={onReject}\n {...rejectProps}\n ml=\"xs\"\n >\n {rejectLabel}\n </DSButtonV2>\n )}\n {!!onConfirm && (\n <DSButtonV2\n buttonType=\"filled\"\n className=\"action-confirm\"\n data-testid=\"modal-footer-confirm-btn\"\n onClick={onConfirm}\n {...confirmProps}\n ml=\"xs\"\n >\n {confirmLabel}\n </DSButtonV2>\n )}\n </FooterWrapper>\n </>\n);\n\nconst props = {\n /**\n * Confirm Label\n */\n confirmLabel: PropTypes.string.description('Confirm Label'),\n /**\n * Reject Label\n */\n rejectLabel: PropTypes.string.description('Reject Label'),\n /**\n * Callback\n */\n onConfirm: PropTypes.func.description('Callback'),\n /**\n * Callback\n */\n onReject: PropTypes.func.description('Callback'),\n /**\n * Extra DSButton props for confirm btn.\n */\n confirmProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for confirm btn.'),\n /**\n * Extra DSButton props for reject btn.\n */\n rejectProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for reject btn.'),\n};\n\nModalFooter.propTypes = props;\nModalFooter.displayName = 'ModalFooter';\nconst DSModalSlideFooterWithSchema = describe(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3B,UAAU,UAAU;AAAA,EACtB,CAAC,EAAE,YAAY,sCAAsC;AACvD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,+BAA+B,SAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-legacy-props-helpers";
|
|
4
|
+
import { styled } from "@elliemae/ds-legacy-system";
|
|
5
|
+
import DSSeparator from "@elliemae/ds-legacy-separator";
|
|
6
|
+
import { Close } from "@elliemae/ds-legacy-icons";
|
|
7
|
+
import { DSButtonV2 } from "@elliemae/ds-legacy-button-v2";
|
|
8
|
+
import { Header, HeaderLeftSide, Title } from "./blocks.js";
|
|
9
|
+
const ModalHeader = ({ innerRef = null, title: headerTitle = "", onClose = () => null, toolbar = null }) => /* @__PURE__ */ jsxs(HeaderWrapper, { children: [
|
|
10
|
+
/* @__PURE__ */ jsx(HeaderLeftSide, { children: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(Title, { children: headerTitle }) }) }),
|
|
11
|
+
toolbar,
|
|
12
|
+
toolbar && /* @__PURE__ */ jsx(StyledSeparator, { position: "initial", margin: "none", orientation: "vertical", type: "non-form" }),
|
|
13
|
+
/* @__PURE__ */ jsx(
|
|
14
|
+
StyledCloseButton,
|
|
15
|
+
{
|
|
16
|
+
"data-testid": "modal-slider-header-close",
|
|
17
|
+
"aria-label": "Close modal slide",
|
|
18
|
+
buttonType: "icon",
|
|
19
|
+
onClick: onClose,
|
|
20
|
+
innerRef,
|
|
21
|
+
children: /* @__PURE__ */ jsx(Close, { "aria-label": "Close modal slide", size: "s" })
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
] });
|
|
25
|
+
const HeaderWrapper = styled.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
width: 100%;
|
|
29
|
+
align-items: center;
|
|
30
|
+
height: 48px;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
`;
|
|
33
|
+
const StyledSeparator = styled(DSSeparator)`
|
|
34
|
+
padding: ${(props2) => props2.theme.space.xs} 0;
|
|
35
|
+
`;
|
|
36
|
+
const StyledCloseButton = styled(DSButtonV2)`
|
|
37
|
+
margin: ${(props2) => props2.theme.space.xs};
|
|
38
|
+
`;
|
|
39
|
+
const props = {
|
|
40
|
+
/** on modal close callback */
|
|
41
|
+
onClose: PropTypes.func.description("on modal close callback"),
|
|
42
|
+
/** modal toolbar component */
|
|
43
|
+
toolbar: PropTypes.node.description("modal toolbar comoponent"),
|
|
44
|
+
/** modal title */
|
|
45
|
+
title: PropTypes.string.description("modal title"),
|
|
46
|
+
innerRef: PropTypes.func.description("button close ref ")
|
|
47
|
+
};
|
|
48
|
+
ModalHeader.propTypes = props;
|
|
49
|
+
ModalHeader.displayName = "ModalHeader";
|
|
50
|
+
const DSModalSlideHeaderWithSchema = describe(ModalHeader);
|
|
51
|
+
DSModalSlideHeaderWithSchema.propTypes = props;
|
|
52
|
+
var Header_default = ModalHeader;
|
|
53
|
+
export {
|
|
54
|
+
DSModalSlideHeaderWithSchema,
|
|
55
|
+
Header_default as default
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Header.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-props-helpers';\nimport { styled } from '@elliemae/ds-legacy-system';\nimport DSSeparator from '@elliemae/ds-legacy-separator';\nimport { Close } from '@elliemae/ds-legacy-icons';\nimport { DSButtonV2 } from '@elliemae/ds-legacy-button-v2';\nimport { Header, HeaderLeftSide, Title } from './blocks.js';\n\nconst ModalHeader = ({ innerRef = null, title: headerTitle = '', onClose = () => null, toolbar = null }) => (\n <HeaderWrapper>\n <HeaderLeftSide>\n <Header>\n <Title>{headerTitle}</Title>\n </Header>\n </HeaderLeftSide>\n {toolbar}\n {toolbar && <StyledSeparator position=\"initial\" margin=\"none\" orientation=\"vertical\" type=\"non-form\" />}\n <StyledCloseButton\n data-testid=\"modal-slider-header-close\"\n aria-label=\"Close modal slide\"\n buttonType=\"icon\"\n onClick={onClose}\n innerRef={innerRef}\n >\n {<Close aria-label=\"Close modal slide\" size=\"s\" />}\n </StyledCloseButton>\n </HeaderWrapper>\n);\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n height: 48px;\n overflow: hidden;\n`;\n\nconst StyledSeparator = styled(DSSeparator)`\n padding: ${(props) => props.theme.space.xs} 0;\n`;\n\nconst StyledCloseButton = styled(DSButtonV2)`\n margin: ${(props) => props.theme.space.xs};\n`;\n\nconst props = {\n /** on modal close callback */\n onClose: PropTypes.func.description('on modal close callback'),\n /** modal toolbar component */\n toolbar: PropTypes.node.description('modal toolbar comoponent'),\n /** modal title */\n title: PropTypes.string.description('modal title'),\n innerRef: PropTypes.func.description('button close ref '),\n};\n\nModalHeader.propTypes = props;\nModalHeader.displayName = 'ModalHeader';\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = props;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACSrB,SAGM,KAHN;AARF,SAAS,WAAW,gBAAgB;AACpC,SAAS,cAAc;AACvB,OAAO,iBAAiB;AACxB,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAC3B,SAAS,QAAQ,gBAAgB,aAAa;AAE9C,MAAM,cAAc,CAAC,EAAE,WAAW,MAAM,OAAO,cAAc,IAAI,UAAU,MAAM,MAAM,UAAU,KAAK,MACpG,qBAAC,iBACC;AAAA,sBAAC,kBACC,8BAAC,UACC,8BAAC,SAAO,uBAAY,GACtB,GACF;AAAA,EACC;AAAA,EACA,WAAW,oBAAC,mBAAgB,UAAS,WAAU,QAAO,QAAO,aAAY,YAAW,MAAK,YAAW;AAAA,EACrG;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,cAAW;AAAA,MACX,YAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MAEC,8BAAC,SAAM,cAAW,qBAAoB,MAAK,KAAI;AAAA;AAAA,EAClD;AAAA,GACF;AAGF,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,kBAAkB,OAAO,WAAW;AAAA,aAC7B,CAACA,WAAUA,OAAM,MAAM,MAAM;AAAA;AAG1C,MAAM,oBAAoB,OAAO,UAAU;AAAA,YAC/B,CAACA,WAAUA,OAAM,MAAM,MAAM;AAAA;AAGzC,MAAM,QAAQ;AAAA;AAAA,EAEZ,SAAS,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE7D,SAAS,UAAU,KAAK,YAAY,0BAA0B;AAAA;AAAA,EAE9D,OAAO,UAAU,OAAO,YAAY,aAAa;AAAA,EACjD,UAAU,UAAU,KAAK,YAAY,mBAAmB;AAC1D;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,+BAA+B,SAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
|
|
6
|
+
"names": ["props"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-legacy-classnames";
|
|
3
|
+
const blockName = "modal-slide";
|
|
4
|
+
const Wrapper = aggregatedClasses("div")(blockName, "wrapper", ({ show, centered }) => ({
|
|
5
|
+
showing: show,
|
|
6
|
+
disappearing: !show,
|
|
7
|
+
centered
|
|
8
|
+
}));
|
|
9
|
+
const Overlay = aggregatedClasses("div")(blockName, "overlay", ({ show }) => ({
|
|
10
|
+
showing: show,
|
|
11
|
+
disappearing: !show
|
|
12
|
+
}));
|
|
13
|
+
const Content = aggregatedClasses("div")(blockName, "content", ({ show }) => ({
|
|
14
|
+
showing: show,
|
|
15
|
+
disappearing: !show
|
|
16
|
+
}));
|
|
17
|
+
const Title = aggregatedClasses("div")(blockName, "title", () => ({}));
|
|
18
|
+
const BreadcrumTitle = aggregatedClasses("div")(blockName, "breadcrum-title", () => ({}));
|
|
19
|
+
const HeaderLeftSide = aggregatedClasses("div")(blockName, "header-left-side", () => ({}));
|
|
20
|
+
const ActualContent = aggregatedClasses("div")(blockName, "actual-content", () => ({}));
|
|
21
|
+
const Header = aggregatedClasses("div")(blockName, "header", () => ({}));
|
|
22
|
+
const Footer = aggregatedClasses("div")(blockName, "footer", () => ({}));
|
|
23
|
+
const FooterWrapper = aggregatedClasses("div")(blockName, "footer-wrapper", () => ({}));
|
|
24
|
+
export {
|
|
25
|
+
ActualContent,
|
|
26
|
+
BreadcrumTitle,
|
|
27
|
+
Content,
|
|
28
|
+
Footer,
|
|
29
|
+
FooterWrapper,
|
|
30
|
+
Header,
|
|
31
|
+
HeaderLeftSide,
|
|
32
|
+
Overlay,
|
|
33
|
+
Title,
|
|
34
|
+
Wrapper
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/blocks.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-legacy-classnames';\n\nconst blockName = 'modal-slide';\n\nexport const Wrapper = aggregatedClasses('div')(blockName, 'wrapper', ({ show, centered }) => ({\n showing: show,\n disappearing: !show,\n centered,\n}));\n\nexport const Overlay = aggregatedClasses('div')(blockName, 'overlay', ({ show }) => ({\n showing: show,\n disappearing: !show,\n}));\n\nexport const Content = aggregatedClasses('div')(blockName, 'content', ({ show }) => ({\n showing: show,\n disappearing: !show,\n}));\n\nexport const Title = aggregatedClasses('div')(blockName, 'title', () => ({}));\n\nexport const BreadcrumTitle = aggregatedClasses('div')(blockName, 'breadcrum-title', () => ({}));\n\nexport const HeaderLeftSide = aggregatedClasses('div')(blockName, 'header-left-side', () => ({}));\n\nexport const ActualContent = aggregatedClasses('div')(blockName, 'actual-content', () => ({}));\nexport const Header = aggregatedClasses('div')(blockName, 'header', () => ({}));\nexport const Footer = aggregatedClasses('div')(blockName, 'footer', () => ({}));\n\nexport const FooterWrapper = aggregatedClasses('div')(blockName, 'footer-wrapper', () => ({}));\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAEX,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,WAAW,CAAC,EAAE,MAAM,SAAS,OAAO;AAAA,EAC7F,SAAS;AAAA,EACT,cAAc,CAAC;AAAA,EACf;AACF,EAAE;AAEK,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,WAAW,CAAC,EAAE,KAAK,OAAO;AAAA,EACnF,SAAS;AAAA,EACT,cAAc,CAAC;AACjB,EAAE;AAEK,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,WAAW,CAAC,EAAE,KAAK,OAAO;AAAA,EACnF,SAAS;AAAA,EACT,cAAc,CAAC;AACjB,EAAE;AAEK,MAAM,QAAQ,kBAAkB,KAAK,EAAE,WAAW,SAAS,OAAO,CAAC,EAAE;AAErE,MAAM,iBAAiB,kBAAkB,KAAK,EAAE,WAAW,mBAAmB,OAAO,CAAC,EAAE;AAExF,MAAM,iBAAiB,kBAAkB,KAAK,EAAE,WAAW,oBAAoB,OAAO,CAAC,EAAE;AAEzF,MAAM,gBAAgB,kBAAkB,KAAK,EAAE,WAAW,kBAAkB,OAAO,CAAC,EAAE;AACtF,MAAM,SAAS,kBAAkB,KAAK,EAAE,WAAW,UAAU,OAAO,CAAC,EAAE;AACvE,MAAM,SAAS,kBAAkB,KAAK,EAAE,WAAW,UAAU,OAAO,CAAC,EAAE;AAEvE,MAAM,gBAAgB,kBAAkB,KAAK,EAAE,WAAW,kBAAkB,OAAO,CAAC,EAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export * from "./DSModalSlide.js";
|
|
3
|
+
import { default as default2 } from "./DSModalSlide.js";
|
|
4
|
+
import { DSModalSlideHeaderWithSchema } from "./components/Header.js";
|
|
5
|
+
import { DSModalSlideFooterWithSchema } from "./components/Footer.js";
|
|
6
|
+
export {
|
|
7
|
+
DSModalSlideFooterWithSchema,
|
|
8
|
+
DSModalSlideHeaderWithSchema,
|
|
9
|
+
default2 as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSModalSlide.js';\nexport { default } from './DSModalSlide.js';\nexport { DSModalSlideHeaderWithSchema } from './components/Header.js';\nexport { DSModalSlideFooterWithSchema } from './components/Footer.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;AACxB,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ModalHeader from './components/Header.js';
|
|
3
|
+
import ModalFooter from './components/Footer.js';
|
|
4
|
+
declare const DSModalSlide: {
|
|
5
|
+
(props: any): React.ReactPortal | null;
|
|
6
|
+
propTypes: {
|
|
7
|
+
/**
|
|
8
|
+
* If the modal slide is centered or not
|
|
9
|
+
*/
|
|
10
|
+
centered: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
11
|
+
/**
|
|
12
|
+
* If the modal slide is visible or not
|
|
13
|
+
*/
|
|
14
|
+
isOpen: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
15
|
+
/**
|
|
16
|
+
* Main content of the modal
|
|
17
|
+
*/
|
|
18
|
+
children: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
19
|
+
/**
|
|
20
|
+
* If the modal slide takes the full width or not
|
|
21
|
+
*/
|
|
22
|
+
fullWidth: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
23
|
+
/**
|
|
24
|
+
* If the modal slide has a header, only available for full width option
|
|
25
|
+
*/
|
|
26
|
+
header: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
+
/**
|
|
28
|
+
* Ratio of fade out
|
|
29
|
+
*/
|
|
30
|
+
fadeOut: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
|
+
/**
|
|
32
|
+
* Ratio of fade in
|
|
33
|
+
*/
|
|
34
|
+
fadeIn: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
35
|
+
/**
|
|
36
|
+
* Override the panel height to scroll height of the container
|
|
37
|
+
*/
|
|
38
|
+
overrideHeight: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
39
|
+
};
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
42
|
+
declare const DSModalSlideWithSchema: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<any>;
|
|
43
|
+
export { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };
|
|
44
|
+
export default DSModalSlide;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
declare const ModalFooter: {
|
|
2
|
+
({ confirmLabel, rejectLabel, onConfirm, onReject, confirmProps, rejectProps, }: {
|
|
3
|
+
confirmLabel?: string | undefined;
|
|
4
|
+
rejectLabel?: string | undefined;
|
|
5
|
+
onConfirm: any;
|
|
6
|
+
onReject: any;
|
|
7
|
+
confirmProps?: {
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
} | undefined;
|
|
10
|
+
rejectProps?: {
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
} | undefined;
|
|
13
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
14
|
+
propTypes: {
|
|
15
|
+
/**
|
|
16
|
+
* Confirm Label
|
|
17
|
+
*/
|
|
18
|
+
confirmLabel: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
19
|
+
/**
|
|
20
|
+
* Reject Label
|
|
21
|
+
*/
|
|
22
|
+
rejectLabel: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
23
|
+
/**
|
|
24
|
+
* Callback
|
|
25
|
+
*/
|
|
26
|
+
onConfirm: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
+
/**
|
|
28
|
+
* Callback
|
|
29
|
+
*/
|
|
30
|
+
onReject: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
|
+
/**
|
|
32
|
+
* Extra DSButton props for confirm btn.
|
|
33
|
+
*/
|
|
34
|
+
confirmProps: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
35
|
+
/**
|
|
36
|
+
* Extra DSButton props for reject btn.
|
|
37
|
+
*/
|
|
38
|
+
rejectProps: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
39
|
+
};
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
42
|
+
declare const DSModalSlideFooterWithSchema: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
43
|
+
confirmLabel?: string | undefined;
|
|
44
|
+
rejectLabel?: string | undefined;
|
|
45
|
+
onConfirm: any;
|
|
46
|
+
onReject: any;
|
|
47
|
+
confirmProps?: {
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
} | undefined;
|
|
50
|
+
rejectProps?: {
|
|
51
|
+
disabled: boolean;
|
|
52
|
+
} | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export { DSModalSlideFooterWithSchema };
|
|
55
|
+
export default ModalFooter;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const ModalHeader: {
|
|
2
|
+
({ innerRef, title: headerTitle, onClose, toolbar }: {
|
|
3
|
+
innerRef?: null | undefined;
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
onClose?: (() => null) | undefined;
|
|
6
|
+
toolbar?: null | undefined;
|
|
7
|
+
}): import("react/jsx-runtime.js").JSX.Element;
|
|
8
|
+
propTypes: {
|
|
9
|
+
/** on modal close callback */
|
|
10
|
+
onClose: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
11
|
+
/** modal toolbar component */
|
|
12
|
+
toolbar: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
13
|
+
/** modal title */
|
|
14
|
+
title: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
15
|
+
innerRef: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
16
|
+
};
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const DSModalSlideHeaderWithSchema: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
20
|
+
innerRef?: null | undefined;
|
|
21
|
+
title?: string | undefined;
|
|
22
|
+
onClose?: (() => null) | undefined;
|
|
23
|
+
toolbar?: null | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export { DSModalSlideHeaderWithSchema };
|
|
26
|
+
export default ModalHeader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Wrapper: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
3
|
+
export declare const Overlay: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
4
|
+
export declare const Content: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
5
|
+
export declare const Title: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
6
|
+
export declare const BreadcrumTitle: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
7
|
+
export declare const HeaderLeftSide: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
8
|
+
export declare const ActualContent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
9
|
+
export declare const Header: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
10
|
+
export declare const Footer: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
11
|
+
export declare const FooterWrapper: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|