@elliemae/ds-modal-slide 3.25.0-rc.0 → 3.26.0-next.2
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 +61 -109
- package/dist/cjs/DSModalSlide.js.map +3 -3
- package/dist/cjs/DSModalSlideDefinitions.js +58 -0
- package/dist/cjs/DSModalSlideDefinitions.js.map +7 -0
- package/dist/cjs/components/Footer.js +32 -69
- package/dist/cjs/components/Footer.js.map +2 -2
- package/dist/cjs/components/Header.js +23 -44
- package/dist/cjs/components/Header.js.map +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-desc-prop-types.js +150 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/styled.js +223 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/esm/DSModalSlide.js +69 -110
- package/dist/esm/DSModalSlide.js.map +3 -3
- package/dist/esm/DSModalSlideDefinitions.js +28 -0
- package/dist/esm/DSModalSlideDefinitions.js.map +7 -0
- package/dist/esm/components/Footer.js +33 -70
- package/dist/esm/components/Footer.js.map +2 -2
- package/dist/esm/components/Header.js +31 -45
- package/dist/esm/components/Header.js.map +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +120 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/styled.js +193 -0
- package/dist/esm/styled.js.map +7 -0
- package/dist/types/DSModalSlide.d.ts +3 -36
- package/dist/types/DSModalSlideDefinitions.d.ts +19 -0
- package/dist/types/components/Footer.d.ts +3 -50
- package/dist/types/components/Header.d.ts +3 -21
- package/dist/types/index.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +64 -0
- package/dist/types/styled.d.ts +43 -0
- package/package.json +10 -9
- package/dist/cjs/components/blocks.js +0 -66
- package/dist/cjs/components/blocks.js.map +0 -7
- package/dist/esm/components/blocks.js +0 -36
- package/dist/esm/components/blocks.js.map +0 -7
- package/dist/types/components/blocks.d.ts +0 -11
package/dist/cjs/DSModalSlide.js
CHANGED
|
@@ -42,46 +42,30 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
42
42
|
var import_lodash = require("lodash");
|
|
43
43
|
var import_react_dom = __toESM(require("react-dom"));
|
|
44
44
|
var import_ds_system = require("@elliemae/ds-system");
|
|
45
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
45
46
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
46
47
|
var import_ds_separator = __toESM(require("@elliemae/ds-separator"));
|
|
47
|
-
var import_blocks = require("./components/blocks.js");
|
|
48
48
|
var import_Header = __toESM(require("./components/Header.js"));
|
|
49
49
|
var import_Footer = __toESM(require("./components/Footer.js"));
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
&:focus-visible {
|
|
54
|
-
outline: 1px solid ${({ theme }) => theme.colors.brand["600"]};
|
|
55
|
-
outline-offset: -1px;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
50
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
51
|
+
var import_styled = require("./styled.js");
|
|
52
|
+
var import_DSModalSlideDefinitions = require("./DSModalSlideDefinitions.js");
|
|
58
53
|
const ModalSlideAnimationFix = import_ds_system.styled.div`
|
|
59
54
|
.em-ds-modal-slide__overlay--disappearing,
|
|
60
55
|
.em-ds-modal-slide__content--disappearing {
|
|
61
56
|
animation-fill-mode: forwards;
|
|
62
57
|
}
|
|
63
58
|
`;
|
|
64
|
-
const DSModalSlide = (
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
getContainer,
|
|
69
|
-
centered = false,
|
|
70
|
-
fullWidth = false,
|
|
71
|
-
header = null,
|
|
72
|
-
footer = null,
|
|
73
|
-
fadeOut = 1500,
|
|
74
|
-
fadeIn = 1500,
|
|
75
|
-
overrideHeight = false,
|
|
76
|
-
innerRef = null
|
|
77
|
-
} = props2;
|
|
78
|
-
const [isMoving, setMoving] = (0, import_react.useState)(false);
|
|
59
|
+
const DSModalSlide = (props) => {
|
|
60
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
61
|
+
const { isOpen, children, getContainer, fullWidth, header, footer, fadeOut, fadeIn, overrideHeight, innerRef } = propsWithDefault;
|
|
62
|
+
const [, setMoving] = (0, import_react.useState)(false);
|
|
79
63
|
const [show, setShow] = (0, import_react.useState)(isOpen);
|
|
80
64
|
const [width, setWidth] = (0, import_react.useState)(50);
|
|
81
65
|
const [height, setHeight] = (0, import_react.useState)("100%");
|
|
82
66
|
const theme = (0, import_ds_system.useTheme)();
|
|
83
67
|
const contentRows = [...header ? ["auto", "1px"] : [], "1fr", ...footer ? ["1px", theme.space.m] : []];
|
|
84
|
-
const globalAttrs = (0, import_ds_props_helpers.useGetGlobalAttributes)(
|
|
68
|
+
const globalAttrs = (0, import_ds_props_helpers.useGetGlobalAttributes)(props);
|
|
85
69
|
const updateShow = (0, import_react.useCallback)(() => {
|
|
86
70
|
if (fullWidth)
|
|
87
71
|
setWidth(100);
|
|
@@ -93,8 +77,9 @@ const DSModalSlide = (props2) => {
|
|
|
93
77
|
setShow(isOpen);
|
|
94
78
|
}
|
|
95
79
|
}
|
|
96
|
-
}, [
|
|
97
|
-
(0,
|
|
80
|
+
}, [fullWidth, isOpen, show]);
|
|
81
|
+
const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_utilities.useOwnerProps)(propsWithDefault);
|
|
82
|
+
(0, import_react.useEffect)(updateShow, [updateShow]);
|
|
98
83
|
const container = getContainer();
|
|
99
84
|
const handleHeight = (0, import_react.useCallback)(() => {
|
|
100
85
|
const newHeight = overrideHeight && container.scrollHeight > container.getBoundingClientRect().height ? container.scrollHeight : container.getBoundingClientRect().height;
|
|
@@ -126,56 +111,60 @@ const DSModalSlide = (props2) => {
|
|
|
126
111
|
};
|
|
127
112
|
return import_react_dom.default.createPortal(
|
|
128
113
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalSlideAnimationFix, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
|
-
|
|
114
|
+
import_styled.StyledModalWrapper,
|
|
130
115
|
{
|
|
116
|
+
className: "em-ds-modal-slide__wrapper",
|
|
131
117
|
...globalAttrs,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
style: {
|
|
137
|
-
"--height": height,
|
|
138
|
-
"--fade-in": fadeIn,
|
|
139
|
-
"--fade-out": fadeOut,
|
|
140
|
-
"--width": width,
|
|
141
|
-
left: 0
|
|
142
|
-
},
|
|
118
|
+
height,
|
|
119
|
+
getOwnerProps,
|
|
120
|
+
getOwnerPropsArguments,
|
|
143
121
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
|
-
|
|
122
|
+
import_styled.StyledOverlay,
|
|
145
123
|
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
124
|
+
className: `em-ds-modal-slide__overlay ${!isOpen ? "em-ds-modal-slide__overlay--disappearing" : "em-ds-modal-slide__overlay--showing"}`,
|
|
125
|
+
fadeIn,
|
|
126
|
+
fadeOut,
|
|
127
|
+
showing: isOpen,
|
|
128
|
+
disappearing: !isOpen,
|
|
129
|
+
getOwnerProps,
|
|
130
|
+
getOwnerPropsArguments,
|
|
149
131
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
|
-
|
|
132
|
+
import_styled.StyledContent,
|
|
151
133
|
{
|
|
134
|
+
className: `em-ds-modal-slide__content ${!isOpen ? "em-ds-modal-slide__content--disappearing" : "em-ds-modal-slide__content--showing"}`,
|
|
152
135
|
onAnimationEnd: handleAnimationEnd,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
136
|
+
width,
|
|
137
|
+
height,
|
|
138
|
+
fadeIn,
|
|
139
|
+
fadeOut,
|
|
140
|
+
disappearing: !isOpen,
|
|
141
|
+
getOwnerProps,
|
|
142
|
+
getOwnerPropsArguments,
|
|
143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledGridContent, { rows: contentRows, "data-testid": "ds-modal-slide", children: [
|
|
144
|
+
header && import_react.default.cloneElement(header, { fullWidth }),
|
|
145
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_separator.default, { position: "initial", type: "non-form" }),
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { style: { overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
147
|
+
import_styled.StyledContentWrapper,
|
|
148
|
+
{
|
|
149
|
+
innerRef,
|
|
150
|
+
tabIndex: 0,
|
|
151
|
+
role: "contentinfo",
|
|
152
|
+
getOwnerProps,
|
|
153
|
+
getOwnerPropsArguments,
|
|
154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
155
|
+
import_styled.StyledActualContent,
|
|
156
|
+
{
|
|
157
|
+
className: "em-ds-modal-slide__actual-content",
|
|
158
|
+
getOwnerProps,
|
|
159
|
+
getOwnerPropsArguments,
|
|
160
|
+
children
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
) }),
|
|
165
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_separator.default, { position: "initial", type: "non-form" }),
|
|
166
|
+
footer
|
|
167
|
+
] })
|
|
179
168
|
}
|
|
180
169
|
)
|
|
181
170
|
}
|
|
@@ -185,45 +174,8 @@ const DSModalSlide = (props2) => {
|
|
|
185
174
|
container
|
|
186
175
|
);
|
|
187
176
|
};
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* If the modal slide is centered or not
|
|
191
|
-
*/
|
|
192
|
-
centered: import_ds_props_helpers.PropTypes.bool.description("If the modal slide is centered or not"),
|
|
193
|
-
/**
|
|
194
|
-
* If the modal slide is visible or not
|
|
195
|
-
*/
|
|
196
|
-
isOpen: import_ds_props_helpers.PropTypes.bool.description("If the modal slide is visible or not"),
|
|
197
|
-
/**
|
|
198
|
-
* Main content of the modal
|
|
199
|
-
*/
|
|
200
|
-
children: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.element, import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.any]).isRequired.description(
|
|
201
|
-
"Main content of the modal"
|
|
202
|
-
),
|
|
203
|
-
/**
|
|
204
|
-
* If the modal slide takes the full width or not
|
|
205
|
-
*/
|
|
206
|
-
fullWidth: import_ds_props_helpers.PropTypes.bool.description("If the modal slide takes the full width or not"),
|
|
207
|
-
/**
|
|
208
|
-
* If the modal slide has a header, only available for full width option
|
|
209
|
-
*/
|
|
210
|
-
header: import_ds_props_helpers.PropTypes.element.description("If the modal slide has a header, only available for full width option"),
|
|
211
|
-
/**
|
|
212
|
-
* Ratio of fade out
|
|
213
|
-
*/
|
|
214
|
-
fadeOut: import_ds_props_helpers.PropTypes.number.description("Ratio of fade out"),
|
|
215
|
-
/**
|
|
216
|
-
* Ratio of fade in
|
|
217
|
-
*/
|
|
218
|
-
fadeIn: import_ds_props_helpers.PropTypes.number.description("Ratio of fade in"),
|
|
219
|
-
/**
|
|
220
|
-
* Override the panel height to scroll height of the container
|
|
221
|
-
*/
|
|
222
|
-
overrideHeight: import_ds_props_helpers.PropTypes.bool.description("Override the panel height to scroll height of the container")
|
|
223
|
-
};
|
|
224
|
-
DSModalSlide.propTypes = props;
|
|
225
|
-
DSModalSlide.displayName = "DSModalSlide";
|
|
177
|
+
DSModalSlide.displayName = import_DSModalSlideDefinitions.DSModalSlideName;
|
|
226
178
|
const DSModalSlideWithSchema = (0, import_ds_props_helpers.describe)(DSModalSlide);
|
|
227
|
-
DSModalSlideWithSchema.propTypes =
|
|
179
|
+
DSModalSlideWithSchema.propTypes = import_react_desc_prop_types.DSModalSlidePropTypesSchema;
|
|
228
180
|
var DSModalSlide_default = DSModalSlide;
|
|
229
181
|
//# sourceMappingURL=DSModalSlide.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSModalSlide.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": ["ModalFooter", "ModalHeader", "
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { debounce } from 'lodash';\nimport ReactDOM from 'react-dom';\nimport { useTheme, styled } from '@elliemae/ds-system';\nimport { useOwnerProps } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-separator';\nimport ModalHeader from './components/Header.js';\nimport ModalFooter from './components/Footer.js';\nimport { defaultProps, DSModalSlidePropTypesSchema, type DSModalSlideT } from './react-desc-prop-types.js';\nimport {\n StyledActualContent,\n StyledContent,\n StyledModalWrapper,\n StyledOverlay,\n StyledContentWrapper,\n StyledGridContent,\n} from './styled.js';\nimport { DSModalSlideName } from './DSModalSlideDefinitions.js';\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`;\nconst DSModalSlide = (props: DSModalSlideT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSModalSlideT.InternalProps>(props, defaultProps);\n const { isOpen, children, getContainer, fullWidth, header, footer, fadeOut, fadeIn, overrideHeight, innerRef } =\n propsWithDefault;\n const [, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const [height, setHeight] = useState<string | number>('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 }, [fullWidth, isOpen, show]);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n\n useEffect(updateShow, [updateShow]);\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 <StyledModalWrapper\n className=\"em-ds-modal-slide__wrapper\"\n {...globalAttrs}\n height={height}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledOverlay\n className={`em-ds-modal-slide__overlay ${\n !isOpen ? 'em-ds-modal-slide__overlay--disappearing' : 'em-ds-modal-slide__overlay--showing'\n }`}\n fadeIn={fadeIn}\n fadeOut={fadeOut}\n showing={isOpen}\n disappearing={!isOpen}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledContent\n className={`em-ds-modal-slide__content ${\n !isOpen ? 'em-ds-modal-slide__content--disappearing' : 'em-ds-modal-slide__content--showing'\n }`}\n onAnimationEnd={handleAnimationEnd}\n width={width}\n height={height}\n fadeIn={fadeIn}\n fadeOut={fadeOut}\n disappearing={!isOpen}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledGridContent rows={contentRows} data-testid=\"ds-modal-slide\">\n {header && React.cloneElement(header, { fullWidth })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\n <Grid style={{ overflow: 'hidden' }}>\n <StyledContentWrapper\n innerRef={innerRef}\n tabIndex={0}\n role=\"contentinfo\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledActualContent\n className=\"em-ds-modal-slide__actual-content\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {children}\n </StyledActualContent>\n </StyledContentWrapper>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </StyledGridContent>\n </StyledContent>\n </StyledOverlay>\n </StyledModalWrapper>\n </ModalSlideAnimationFix>,\n container,\n );\n};\n\nDSModalSlide.displayName = DSModalSlideName;\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = DSModalSlidePropTypesSchema;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["ModalFooter", "ModalHeader", "ReactDOM", "React", "DSSeparator"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSModalSlideDefinitions_exports = {};
|
|
30
|
+
__export(DSModalSlideDefinitions_exports, {
|
|
31
|
+
DSModalSlideDataTestIds: () => DSModalSlideDataTestIds,
|
|
32
|
+
DSModalSlideName: () => DSModalSlideName,
|
|
33
|
+
DSModalSlideSlots: () => DSModalSlideSlots
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(DSModalSlideDefinitions_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
const DSModalSlideName = "DSModalSlide";
|
|
39
|
+
const DSModalSlideSlots = {
|
|
40
|
+
ROOT: "root",
|
|
41
|
+
OVERLAY: "overlay",
|
|
42
|
+
CONTENT: "content",
|
|
43
|
+
TITLE: "title",
|
|
44
|
+
HEADER_LEFT_SIDE: "header-left-side",
|
|
45
|
+
ACTUAL_CONTENT: "actual-content",
|
|
46
|
+
HEADER: "header",
|
|
47
|
+
FOOTER: "footer",
|
|
48
|
+
FOOTER_WRAPPER: "footer-wrapper",
|
|
49
|
+
HEADER_WRAPPER: "header-wrapper",
|
|
50
|
+
SEPARATOR: "separator",
|
|
51
|
+
CLOSE_BUTTON: "close-button",
|
|
52
|
+
CONTENT_WRAPPER: "content-wrapper"
|
|
53
|
+
};
|
|
54
|
+
const DSModalSlideDataTestIds = {
|
|
55
|
+
...(0, import_ds_system.slotObjectToDataTestIds)(DSModalSlideName, DSModalSlideSlots),
|
|
56
|
+
CLOSE_BUTTON: "modal-slider-header-close"
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=DSModalSlideDefinitions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSModalSlideDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSModalSlideName = 'DSModalSlide';\n\nexport const DSModalSlideSlots = {\n ROOT: 'root',\n OVERLAY: 'overlay',\n CONTENT: 'content',\n TITLE: 'title',\n HEADER_LEFT_SIDE: 'header-left-side',\n ACTUAL_CONTENT: 'actual-content',\n HEADER: 'header',\n FOOTER: 'footer',\n FOOTER_WRAPPER: 'footer-wrapper',\n HEADER_WRAPPER: 'header-wrapper',\n SEPARATOR: 'separator',\n CLOSE_BUTTON: 'close-button',\n CONTENT_WRAPPER: 'content-wrapper',\n};\n\nexport const DSModalSlideDataTestIds = {\n ...slotObjectToDataTestIds(DSModalSlideName, DSModalSlideSlots),\n CLOSE_BUTTON: 'modal-slider-header-close',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,mBAAmB;AAEzB,MAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,iBAAiB;AACnB;AAEO,MAAM,0BAA0B;AAAA,EACrC,OAAG,0CAAwB,kBAAkB,iBAAiB;AAAA,EAC9D,cAAc;AAChB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -36,77 +36,40 @@ var React = __toESM(require("react"));
|
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
38
|
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
onConfirm,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
onClick: onConfirm,
|
|
71
|
-
...confirmProps,
|
|
72
|
-
ml: "xs",
|
|
73
|
-
children: confirmLabel
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
] }) });
|
|
77
|
-
const props = {
|
|
78
|
-
/**
|
|
79
|
-
* Confirm Label
|
|
80
|
-
*/
|
|
81
|
-
confirmLabel: import_ds_props_helpers.PropTypes.string.description("Confirm Label"),
|
|
82
|
-
/**
|
|
83
|
-
* Reject Label
|
|
84
|
-
*/
|
|
85
|
-
rejectLabel: import_ds_props_helpers.PropTypes.string.description("Reject Label"),
|
|
86
|
-
/**
|
|
87
|
-
* Callback
|
|
88
|
-
*/
|
|
89
|
-
onConfirm: import_ds_props_helpers.PropTypes.func.description("Callback"),
|
|
90
|
-
/**
|
|
91
|
-
* Callback
|
|
92
|
-
*/
|
|
93
|
-
onReject: import_ds_props_helpers.PropTypes.func.description("Callback"),
|
|
94
|
-
/**
|
|
95
|
-
* Extra DSButton props for confirm btn.
|
|
96
|
-
*/
|
|
97
|
-
confirmProps: import_ds_props_helpers.PropTypes.shape({
|
|
98
|
-
disabled: import_ds_props_helpers.PropTypes.bool
|
|
99
|
-
}).description("Extra DSButton props for confirm btn."),
|
|
100
|
-
/**
|
|
101
|
-
* Extra DSButton props for reject btn.
|
|
102
|
-
*/
|
|
103
|
-
rejectProps: import_ds_props_helpers.PropTypes.shape({
|
|
104
|
-
disabled: import_ds_props_helpers.PropTypes.bool
|
|
105
|
-
}).description("Extra DSButton props for reject btn.")
|
|
39
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
|
+
var import_styled = require("../styled.js");
|
|
41
|
+
const ModalFooter = (props) => {
|
|
42
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.footerDefaultProps);
|
|
43
|
+
const { confirmLabel, rejectLabel, onConfirm, onReject, confirmProps, rejectProps } = propsWithDefault;
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledFooterWrapper, { className: "em-ds-modal-slide__footer-wrapper", children: [
|
|
45
|
+
!!onReject && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
import_ds_button_v2.DSButtonV2,
|
|
47
|
+
{
|
|
48
|
+
buttonType: "outline",
|
|
49
|
+
className: "action-reject",
|
|
50
|
+
"data-testid": "modal-footer-reject-btn",
|
|
51
|
+
onClick: onReject,
|
|
52
|
+
...rejectProps,
|
|
53
|
+
ml: "xs",
|
|
54
|
+
children: rejectLabel
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
!!onConfirm && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
import_ds_button_v2.DSButtonV2,
|
|
59
|
+
{
|
|
60
|
+
buttonType: "filled",
|
|
61
|
+
className: "action-confirm",
|
|
62
|
+
"data-testid": "modal-footer-confirm-btn",
|
|
63
|
+
onClick: onConfirm,
|
|
64
|
+
...confirmProps,
|
|
65
|
+
ml: "xs",
|
|
66
|
+
children: confirmLabel
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] }) });
|
|
106
70
|
};
|
|
107
|
-
ModalFooter.propTypes = props;
|
|
108
71
|
ModalFooter.displayName = "ModalFooter";
|
|
109
72
|
const DSModalSlideFooterWithSchema = (0, import_ds_props_helpers.describe)(ModalFooter);
|
|
110
|
-
DSModalSlideFooterWithSchema.propTypes =
|
|
73
|
+
DSModalSlideFooterWithSchema.propTypes = import_react_desc_prop_types.DSModalSlideFooterPropTypesSchema;
|
|
111
74
|
var Footer_default = ModalFooter;
|
|
112
75
|
//# sourceMappingURL=Footer.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/Footer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { type DSModalSlideT, footerDefaultProps, DSModalSlideFooterPropTypesSchema } from '../react-desc-prop-types.js';\nimport { StyledFooterWrapper } from '../styled.js';\n\nconst ModalFooter = (props: DSModalSlideT.FooterProps) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSModalSlideT.FooterInternalProps>(props, footerDefaultProps);\n const { confirmLabel, rejectLabel, onConfirm, onReject, confirmProps, rejectProps } = propsWithDefault;\n return (\n <>\n <StyledFooterWrapper className=\"em-ds-modal-slide__footer-wrapper\">\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 </StyledFooterWrapper>\n </>\n );\n};\n\nModalFooter.displayName = 'ModalFooter';\nconst DSModalSlideFooterWithSchema = describe(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = DSModalSlideFooterPropTypesSchema;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUnB;AATJ,8BAAuD;AACvD,0BAA2B;AAC3B,mCAA0F;AAC1F,oBAAoC;AAEpC,MAAM,cAAc,CAAC,UAAqC;AACxD,QAAM,uBAAmB,sDAAgE,OAAO,+CAAkB;AAClH,QAAM,EAAE,cAAc,aAAa,WAAW,UAAU,cAAc,YAAY,IAAI;AACtF,SACE,2EACE,uDAAC,qCAAoB,WAAU,qCAC5B;AAAA,KAAC,CAAC,YACD;AAAA,MAAC;AAAA;AAAA,QACC,YAAW;AAAA,QACX,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,SAAS;AAAA,QACR,GAAG;AAAA,QACJ,IAAG;AAAA,QAEF;AAAA;AAAA,IACH;AAAA,IAED,CAAC,CAAC,aACD;AAAA,MAAC;AAAA;AAAA,QACC,YAAW;AAAA,QACX,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,SAAS;AAAA,QACR,GAAG;AAAA,QACJ,IAAG;AAAA,QAEF;AAAA;AAAA,IACH;AAAA,KAEJ,GACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,mCAA+B,kCAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,53 +35,32 @@ module.exports = __toCommonJS(Header_exports);
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
-
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
-
var import_ds_separator = __toESM(require("@elliemae/ds-separator"));
|
|
40
38
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
align-items: center;
|
|
64
|
-
height: 48px;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
`;
|
|
67
|
-
const StyledSeparator = (0, import_ds_system.styled)(import_ds_separator.default)`
|
|
68
|
-
padding: ${(props2) => props2.theme.space.xs} 0;
|
|
69
|
-
`;
|
|
70
|
-
const StyledCloseButton = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV2)`
|
|
71
|
-
margin: ${(props2) => props2.theme.space.xs};
|
|
72
|
-
`;
|
|
73
|
-
const props = {
|
|
74
|
-
/** on modal close callback */
|
|
75
|
-
onClose: import_ds_props_helpers.PropTypes.func.description("on modal close callback"),
|
|
76
|
-
/** modal toolbar component */
|
|
77
|
-
toolbar: import_ds_props_helpers.PropTypes.node.description("modal toolbar comoponent"),
|
|
78
|
-
/** modal title */
|
|
79
|
-
title: import_ds_props_helpers.PropTypes.string.description("modal title"),
|
|
80
|
-
innerRef: import_ds_props_helpers.PropTypes.func.description("button close ref ")
|
|
39
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
|
+
var import_styled = require("../styled.js");
|
|
41
|
+
var import_DSModalSlideDefinitions = require("../DSModalSlideDefinitions.js");
|
|
42
|
+
const ModalHeader = (props) => {
|
|
43
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.headerDefaultProps);
|
|
44
|
+
const { innerRef, title: headerTitle, onClose, toolbar } = propsWithDefault;
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.HeaderWrapper, { children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledHeaderLeftSide, { className: "em-ds-modal-slide__header-left-side", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledHeader, { className: "em-ds-modal-slide__header", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledTitle, { className: "em-ds-modal-slide__title", children: headerTitle }) }) }),
|
|
47
|
+
toolbar,
|
|
48
|
+
toolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSeparator, { isVertical: true }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_styled.StyledCloseButton,
|
|
51
|
+
{
|
|
52
|
+
"data-testid": import_DSModalSlideDefinitions.DSModalSlideDataTestIds.CLOSE_BUTTON,
|
|
53
|
+
"aria-label": "Close modal slide",
|
|
54
|
+
buttonType: "icon",
|
|
55
|
+
onClick: onClose,
|
|
56
|
+
innerRef,
|
|
57
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Close, { "aria-label": "Close modal slide", size: "s" })
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] });
|
|
81
61
|
};
|
|
82
|
-
ModalHeader.propTypes = props;
|
|
83
62
|
ModalHeader.displayName = "ModalHeader";
|
|
84
63
|
const DSModalSlideHeaderWithSchema = (0, import_ds_props_helpers.describe)(ModalHeader);
|
|
85
|
-
DSModalSlideHeaderWithSchema.propTypes =
|
|
64
|
+
DSModalSlideHeaderWithSchema.propTypes = import_react_desc_prop_types.DSModalSlideHeaderPropTypesSchema;
|
|
86
65
|
var Header_default = ModalHeader;
|
|
87
66
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/Header.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { Close } from '@elliemae/ds-icons';\nimport { type DSModalSlideT, headerDefaultProps, DSModalSlideHeaderPropTypesSchema } from '../react-desc-prop-types.js';\nimport {\n StyledHeader,\n StyledHeaderLeftSide,\n StyledTitle,\n HeaderWrapper,\n StyledSeparator,\n StyledCloseButton,\n} from '../styled.js';\nimport { DSModalSlideDataTestIds } from '../DSModalSlideDefinitions.js';\n\nconst ModalHeader = (props: DSModalSlideT.HeaderProps) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSModalSlideT.HeaderInternalProps>(props, headerDefaultProps);\n const { innerRef, title: headerTitle, onClose, toolbar } = propsWithDefault;\n return (\n <HeaderWrapper>\n <StyledHeaderLeftSide className=\"em-ds-modal-slide__header-left-side\">\n <StyledHeader className=\"em-ds-modal-slide__header\">\n <StyledTitle className=\"em-ds-modal-slide__title\">{headerTitle}</StyledTitle>\n </StyledHeader>\n </StyledHeaderLeftSide>\n {toolbar}\n {toolbar && <StyledSeparator isVertical />}\n <StyledCloseButton\n data-testid={DSModalSlideDataTestIds.CLOSE_BUTTON}\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};\n\nModalHeader.displayName = 'ModalHeader';\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = DSModalSlideHeaderPropTypesSchema;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBnB;AAjBJ,8BAAuD;AACvD,sBAAsB;AACtB,mCAA0F;AAC1F,oBAOO;AACP,qCAAwC;AAExC,MAAM,cAAc,CAAC,UAAqC;AACxD,QAAM,uBAAmB,sDAAgE,OAAO,+CAAkB;AAClH,QAAM,EAAE,UAAU,OAAO,aAAa,SAAS,QAAQ,IAAI;AAC3D,SACE,6CAAC,+BACC;AAAA,gDAAC,sCAAqB,WAAU,uCAC9B,sDAAC,8BAAa,WAAU,6BACtB,sDAAC,6BAAY,WAAU,4BAA4B,uBAAY,GACjE,GACF;AAAA,IACC;AAAA,IACA,WAAW,4CAAC,iCAAgB,YAAU,MAAC;AAAA,IACxC;AAAA,MAAC;AAAA;AAAA,QACC,eAAa,uDAAwB;AAAA,QACrC,cAAW;AAAA,QACX,YAAW;AAAA,QACX,SAAS;AAAA,QACT;AAAA,QAEC,sDAAC,yBAAM,cAAW,qBAAoB,MAAK,KAAI;AAAA;AAAA,IAClD;AAAA,KACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,mCAA+B,kCAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './DSModalSlide.js';\nexport { default } from './DSModalSlide.js';\nexport { DSModalSlideHeaderWithSchema } from './components/Header.js';\nexport { DSModalSlideFooterWithSchema } from './components/Footer.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["export * from './DSModalSlide.js';\nexport { default } from './DSModalSlide.js';\nexport { DSModalSlideHeaderWithSchema } from './components/Header.js';\nexport { DSModalSlideFooterWithSchema } from './components/Footer.js';\nexport type { DSModalSlideT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AACA,0BAAwB;AACxB,oBAA6C;AAC7C,oBAA6C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|