@elliemae/ds-modal-slide 1.57.0-rc.1 → 1.57.0-rc.5
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/cjs/DSModalSlide.js +7 -7
- package/cjs/DSModalSlide.js.map +1 -1
- package/cjs/components/Footer.js +1 -1
- package/cjs/components/Footer.js.map +1 -1
- package/cjs/components/Header.js +4 -5
- package/cjs/components/Header.js.map +1 -1
- package/cjs/index.js +4 -4
- package/esm/DSModalSlide.js +4 -4
- package/esm/DSModalSlide.js.map +1 -1
- package/esm/components/Footer.js +1 -1
- package/esm/components/Footer.js.map +1 -1
- package/esm/components/Header.js +3 -3
- package/esm/components/Header.js.map +1 -1
- package/esm/index.js +4 -4
- package/package.json +5 -5
package/cjs/DSModalSlide.js
CHANGED
|
@@ -8,15 +8,15 @@ var React = require('react');
|
|
|
8
8
|
var reactDesc = require('react-desc');
|
|
9
9
|
var ReactDOM = require('react-dom');
|
|
10
10
|
var dsSystem = require('@elliemae/ds-system');
|
|
11
|
-
var
|
|
12
|
-
var DSSeparator = require('@elliemae/ds-
|
|
11
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
12
|
+
var DSSeparator = require('@elliemae/ds-separator');
|
|
13
13
|
var components_blocks = require('./components/blocks.js');
|
|
14
14
|
var components_Header = require('./components/Header.js');
|
|
15
15
|
var components_Footer = require('./components/Footer.js');
|
|
16
16
|
require('@elliemae/ds-classnames');
|
|
17
17
|
require('styled-components');
|
|
18
|
-
require('@elliemae/ds-icons
|
|
19
|
-
require('@elliemae/ds-
|
|
18
|
+
require('@elliemae/ds-icons');
|
|
19
|
+
require('@elliemae/ds-button');
|
|
20
20
|
require('@babel/runtime/helpers/extends');
|
|
21
21
|
|
|
22
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -116,7 +116,7 @@ var DSModalSlide = function DSModalSlide(_ref) {
|
|
|
116
116
|
classProps: {
|
|
117
117
|
show: isOpen
|
|
118
118
|
}
|
|
119
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
119
|
+
}, /*#__PURE__*/React__default['default'].createElement(dsGrid.Grid, {
|
|
120
120
|
style: {
|
|
121
121
|
height: '100%',
|
|
122
122
|
width: '100%',
|
|
@@ -133,11 +133,11 @@ var DSModalSlide = function DSModalSlide(_ref) {
|
|
|
133
133
|
}), header && /*#__PURE__*/React__default['default'].createElement(DSSeparator__default['default'], {
|
|
134
134
|
position: "initial",
|
|
135
135
|
type: "non-form"
|
|
136
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
136
|
+
}), /*#__PURE__*/React__default['default'].createElement(dsGrid.Grid, {
|
|
137
137
|
style: {
|
|
138
138
|
overflow: 'hidden'
|
|
139
139
|
}
|
|
140
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
140
|
+
}, /*#__PURE__*/React__default['default'].createElement(dsGrid.Grid, {
|
|
141
141
|
style: {
|
|
142
142
|
overflow: 'auto'
|
|
143
143
|
}
|
package/cjs/DSModalSlide.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSModalSlide.js","sources":["../../src/DSModalSlide.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"DSModalSlide.js","sources":["../../src/DSModalSlide.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Wrapper, Overlay, Content, ActualContent } from './components/blocks';\nimport ModalHeader from './components/Header';\nimport ModalFooter from './components/Footer';\n\n// eslint-disable-next-line complexity\nconst DSModalSlide = ({\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}) => {\n const [isMoving, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const theme = useTheme();\n const contentRows = [...(header ? [theme.space.m] : []), '0px', 'auto', '0px', ...(footer ? [theme.space.m] : [])];\n\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 if (!show) return null;\n\n const container = getContainer();\n if (!container) return null;\n\n const handleAnimationEnd = () => {\n setMoving(false);\n if (!isOpen) setShow(isOpen);\n };\n\n let { height } = container.getBoundingClientRect();\n if (overrideHeight && container.scrollHeight > height) {\n height = container.scrollHeight;\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n\n return ReactDOM.createPortal(\n <Wrapper\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 }}\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 <Grid style={{ overflow: 'auto' }}>\n <ActualContent>{children}</ActualContent>\n </Grid>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </Grid>\n </Content>\n </Overlay>\n </Wrapper>,\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;\n\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = props;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n"],"names":["DSModalSlide","isOpen","children","getContainer","centered","fullWidth","header","footer","fadeOut","fadeIn","overrideHeight","useState","isMoving","setMoving","show","setShow","width","setWidth","theme","useTheme","contentRows","space","m","updateShow","useCallback","useEffect","container","handleAnimationEnd","getBoundingClientRect","height","scrollHeight","style","position","ReactDOM","createPortal","React","Wrapper","Overlay","Content","Grid","maxHeight","overflow","cloneElement","DSSeparator","ActualContent","props","PropTypes","bool","description","oneOfType","element","string","any","isRequired","number","propTypes","DSModalSlideWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYMA,YAAY,GAAG,SAAfA,YAAe,OAWf;AAAA,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SAAV,CAAoB,CAACH,mBAAS,CAACI,OAAX,EAAoBJ,mBAAS,CAACK,MAA9B,EAAsCL,mBAAS,CAACM,GAAhD,CAApB,EAA0EC,UAA1E,CAAqFL,WAArF,CACR,2BADQ,CAZE;;AAeZ;AACF;AACA;AACE3C,EAAAA,SAAS,EAAEyC,mBAAS,CAACC,IAAV,CAAeC,WAAf,CAA2B,gDAA3B,CAlBC;;AAmBZ;AACF;AACA;AACE1C,EAAAA,MAAM,EAAEwC,mBAAS,CAACI,OAAV,CAAkBF,WAAlB,CAA8B,uEAA9B,CAtBI;;AAuBZ;AACF;AACA;AACExC,EAAAA,OAAO,EAAEsC,mBAAS,CAACQ,MAAV,CAAiBN,WAAjB,CAA6B,mBAA7B,CA1BG;;AA2BZ;AACF;AACA;AACEvC,EAAAA,MAAM,EAAEqC,mBAAS,CAACQ,MAAV,CAAiBN,WAAjB,CAA6B,kBAA7B,CA9BI;;AA+BZ;AACF;AACA;AACEtC,EAAAA,cAAc,EAAEoC,mBAAS,CAACC,IAAV,CAAeC,WAAf,CAA2B,6DAA3B;AAlCJ,CAAd;AAqCAhD,YAAY,CAACuD,SAAb,GAAyBV,KAAzB;IAEMW,sBAAsB,GAAGC,kBAAQ,CAACzD,YAAD;AACvCwD,sBAAsB,CAACD,SAAvB,GAAmCV,KAAnC;;;;;;;;"}
|
package/cjs/components/Footer.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactDesc = require('react-desc');
|
|
8
|
-
var DSButton = require('@elliemae/ds-
|
|
8
|
+
var DSButton = require('@elliemae/ds-button');
|
|
9
9
|
var components_blocks = require('./blocks.js');
|
|
10
10
|
require('@elliemae/ds-classnames');
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sources":["../../../src/components/Footer.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../src/components/Footer.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\nimport { FooterWrapper } from './blocks';\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 <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...rejectProps}\n />\n )}\n {!!onConfirm && (\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...confirmProps}\n />\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;\n\nconst DSModalSlideFooterWithSchema = describe(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n"],"names":["ModalFooter","confirmLabel","rejectLabel","onConfirm","onReject","confirmProps","disabled","rejectProps","React","FooterWrapper","DSButton","props","PropTypes","string","description","func","shape","bool","propTypes","DSModalSlideFooterWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;IAKMA,WAAW,GAAG,SAAdA,WAAc;AAAA,+BAClBC,YADkB;AAAA,MAClBA,YADkB,kCACH,SADG;AAAA,8BAElBC,WAFkB;AAAA,MAElBA,WAFkB,iCAEJ,QAFI;AAAA,MAGlBC,SAHkB,QAGlBA,SAHkB;AAAA,MAIlBC,QAJkB,QAIlBA,QAJkB;AAAA,+BAKlBC,YALkB;AAAA,MAKlBA,YALkB,kCAKH;AACbC,IAAAA,QAAQ,EAAE;AADG,GALG;AAAA,8BAQlBC,WARkB;AAAA,MAQlBA,WARkB,iCAQJ;AACZD,IAAAA,QAAQ,EAAE;AADE,GARI;AAAA,sBAYlBE,+FACEA,wCAACC,+BAAD,QACG,CAAC,CAACL,QAAF,iBACCI,wCAACE,4BAAD;AACE,IAAA,UAAU,EAAC,WADb;AAEE,IAAA,SAAS,EAAC,eAFZ;AAGE,IAAA,cAAc,EAAE;AAAE,qBAAe;AAAjB,KAHlB;AAIE,IAAA,SAAS,EAAER,WAJb;AAKE,IAAA,OAAO,EAAEE;AALX,KAMMG,WANN,EAFJ,EAWG,CAAC,CAACJ,SAAF,iBACCK,wCAACE,4BAAD;AACE,IAAA,UAAU,EAAC,SADb;AAEE,IAAA,SAAS,EAAC,gBAFZ;AAGE,IAAA,cAAc,EAAE;AAAE,qBAAe;AAAjB,KAHlB;AAIE,IAAA,SAAS,EAAET,YAJb;AAKE,IAAA,OAAO,EAAEE;AALX,KAMME,YANN,EAZJ,CADF,CAZkB;AAAA;;AAsCpB,IAAMM,KAAK,GAAG;AACZ;AACF;AACA;AACEV,EAAAA,YAAY,EAAEW,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,eAA7B,CAJF;;AAKZ;AACF;AACA;AACEZ,EAAAA,WAAW,EAAEU,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,cAA7B,CARD;;AASZ;AACF;AACA;AACEX,EAAAA,SAAS,EAAES,mBAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,UAA3B,CAZC;;AAaZ;AACF;AACA;AACEV,EAAAA,QAAQ,EAAEQ,mBAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,UAA3B,CAhBE;;AAiBZ;AACF;AACA;AACET,EAAAA,YAAY,EAAEO,mBAAS,CAACI,KAAV,CAAgB;AAC5BV,IAAAA,QAAQ,EAAEM,mBAAS,CAACK;AADQ,GAAhB,EAEXH,WAFW,CAEC,uCAFD,CApBF;;AAuBZ;AACF;AACA;AACEP,EAAAA,WAAW,EAAEK,mBAAS,CAACI,KAAV,CAAgB;AAC3BV,IAAAA,QAAQ,EAAEM,mBAAS,CAACK;AADO,GAAhB,EAEVH,WAFU,CAEE,sCAFF;AA1BD,CAAd;AA+BAd,WAAW,CAACkB,SAAZ,GAAwBP,KAAxB;IAEMQ,4BAA4B,GAAGC,kBAAQ,CAACpB,WAAD;AAC7CmB,4BAA4B,CAACD,SAA7B,GAAyCP,KAAzC;;;;;"}
|
package/cjs/components/Header.js
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactDesc = require('react-desc');
|
|
7
7
|
var styled = require('styled-components');
|
|
8
|
-
var DSSeparator = require('@elliemae/ds-
|
|
9
|
-
var
|
|
10
|
-
var DSButton = require('@elliemae/ds-
|
|
8
|
+
var DSSeparator = require('@elliemae/ds-separator');
|
|
9
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
|
+
var DSButton = require('@elliemae/ds-button');
|
|
11
11
|
var components_blocks = require('./blocks.js');
|
|
12
12
|
require('@elliemae/ds-classnames');
|
|
13
13
|
|
|
@@ -16,7 +16,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
17
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
18
18
|
var DSSeparator__default = /*#__PURE__*/_interopDefaultLegacy(DSSeparator);
|
|
19
|
-
var Close__default = /*#__PURE__*/_interopDefaultLegacy(Close);
|
|
20
19
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
21
20
|
|
|
22
21
|
var ModalHeader = function ModalHeader(_ref) {
|
|
@@ -37,7 +36,7 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
37
36
|
"data-testid": "modal-slider-header-close",
|
|
38
37
|
"aria-label": "Close modal slide",
|
|
39
38
|
buttonType: "text",
|
|
40
|
-
icon: /*#__PURE__*/React__default['default'].createElement(
|
|
39
|
+
icon: /*#__PURE__*/React__default['default'].createElement(dsIcons.Close, {
|
|
41
40
|
"aria-label": "Close modal slide",
|
|
42
41
|
size: "s"
|
|
43
42
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../src/components/Header.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../src/components/Header.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { Header, HeaderLeftSide, Title } from './blocks';\n\nconst ModalHeader = ({ 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=\"text\"\n icon={<Close aria-label=\"Close modal slide\" size=\"s\" />}\n onClick={onClose}\n />\n </HeaderWrapper>\n);\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n`;\n\nconst StyledSeparator = styled(DSSeparator)`\n padding: ${(props) => props.theme.space.xs} 0;\n`;\n\nconst StyledCloseButton = styled(DSButton)`\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};\n\nModalHeader.propTypes = props;\n\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = props;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n"],"names":["ModalHeader","title","headerTitle","onClose","toolbar","React","HeaderLeftSide","Header","Title","Close","HeaderWrapper","styled","div","StyledSeparator","DSSeparator","props","theme","space","xs","StyledCloseButton","DSButton","PropTypes","func","description","node","string","propTypes","DSModalSlideHeaderWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;IAQMA,WAAW,GAAG,SAAdA,WAAc;AAAA,wBAAGC,KAAH;AAAA,MAAUC,WAAV,2BAAwB,EAAxB;AAAA,0BAA4BC,OAA5B;AAAA,MAA4BA,OAA5B,6BAAsC;AAAA,WAAM,IAAN;AAAA,GAAtC;AAAA,0BAAkDC,OAAlD;AAAA,MAAkDA,OAAlD,6BAA4D,IAA5D;AAAA,sBAClBC,wCAAC,aAAD,qBACEA,wCAACC,gCAAD,qBACED,wCAACE,wBAAD,qBACEF,wCAACG,uBAAD,QAAQN,WAAR,CADF,CADF,CADF,EAMGE,OANH,EAOGA,OAAO,iBAAIC,wCAAC,eAAD;AAAiB,IAAA,QAAQ,EAAC,SAA1B;AAAoC,IAAA,MAAM,EAAC,MAA3C;AAAk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12
|
require('react-dom');
|
|
13
13
|
require('@elliemae/ds-system');
|
|
14
|
-
require('@elliemae/ds-
|
|
15
|
-
require('@elliemae/ds-
|
|
14
|
+
require('@elliemae/ds-grid');
|
|
15
|
+
require('@elliemae/ds-separator');
|
|
16
16
|
require('./components/blocks.js');
|
|
17
17
|
require('@elliemae/ds-classnames');
|
|
18
18
|
require('styled-components');
|
|
19
|
-
require('@elliemae/ds-icons
|
|
20
|
-
require('@elliemae/ds-
|
|
19
|
+
require('@elliemae/ds-icons');
|
|
20
|
+
require('@elliemae/ds-button');
|
|
21
21
|
require('@babel/runtime/helpers/extends');
|
|
22
22
|
|
|
23
23
|
|
package/esm/DSModalSlide.js
CHANGED
|
@@ -4,15 +4,15 @@ import React, { useState, useCallback, useEffect } from 'react';
|
|
|
4
4
|
import { PropTypes, describe } from 'react-desc';
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
import { useTheme } from '@elliemae/ds-system';
|
|
7
|
-
import { Grid } from '@elliemae/ds-
|
|
8
|
-
import DSSeparator from '@elliemae/ds-
|
|
7
|
+
import { Grid } from '@elliemae/ds-grid';
|
|
8
|
+
import DSSeparator from '@elliemae/ds-separator';
|
|
9
9
|
import { Wrapper, Overlay, Content, ActualContent } from './components/blocks.js';
|
|
10
10
|
export { default as ModalHeader } from './components/Header.js';
|
|
11
11
|
export { default as ModalFooter } from './components/Footer.js';
|
|
12
12
|
import '@elliemae/ds-classnames';
|
|
13
13
|
import 'styled-components';
|
|
14
|
-
import '@elliemae/ds-icons
|
|
15
|
-
import '@elliemae/ds-
|
|
14
|
+
import '@elliemae/ds-icons';
|
|
15
|
+
import '@elliemae/ds-button';
|
|
16
16
|
import '@babel/runtime/helpers/esm/extends';
|
|
17
17
|
|
|
18
18
|
var DSModalSlide = function DSModalSlide(_ref) {
|
package/esm/DSModalSlide.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSModalSlide.js","sources":["../../src/DSModalSlide.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"DSModalSlide.js","sources":["../../src/DSModalSlide.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Wrapper, Overlay, Content, ActualContent } from './components/blocks';\nimport ModalHeader from './components/Header';\nimport ModalFooter from './components/Footer';\n\n// eslint-disable-next-line complexity\nconst DSModalSlide = ({\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}) => {\n const [isMoving, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const theme = useTheme();\n const contentRows = [...(header ? [theme.space.m] : []), '0px', 'auto', '0px', ...(footer ? [theme.space.m] : [])];\n\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 if (!show) return null;\n\n const container = getContainer();\n if (!container) return null;\n\n const handleAnimationEnd = () => {\n setMoving(false);\n if (!isOpen) setShow(isOpen);\n };\n\n let { height } = container.getBoundingClientRect();\n if (overrideHeight && container.scrollHeight > height) {\n height = container.scrollHeight;\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n\n return ReactDOM.createPortal(\n <Wrapper\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 }}\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 <Grid style={{ overflow: 'auto' }}>\n <ActualContent>{children}</ActualContent>\n </Grid>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </Grid>\n </Content>\n </Overlay>\n </Wrapper>,\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;\n\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = props;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n"],"names":["DSModalSlide","isOpen","children","getContainer","centered","fullWidth","header","footer","fadeOut","fadeIn","overrideHeight","useState","isMoving","setMoving","show","setShow","width","setWidth","theme","useTheme","contentRows","space","m","updateShow","useCallback","useEffect","container","handleAnimationEnd","getBoundingClientRect","height","scrollHeight","style","position","ReactDOM","createPortal","maxHeight","overflow","React","cloneElement","props","PropTypes","bool","description","oneOfType","element","string","any","isRequired","number","propTypes","DSModalSlideWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;IAYMA,YAAY,GAAG,SAAfA,YAAe,OAWf;AAAA,yBAVJC,MAUI;AAAA,MAVJA,MAUI,4BAVK,KAUL;AAAA,MATJC,QASI,QATJA,QASI;AAAA,MARJC,YAQI,QARJA,YAQI;AAAA,2BAPJC,QAOI;AAAA,MAPJA,QAOI,8BAPO,KAOP;AAAA,4BANJC,SAMI;AAAA,MANJA,SAMI,+BANQ,KAMR;AAAA,yBALJC,MAKI;AAAA,MALJA,MAKI,4BALK,IAKL;AAAA,yBAJJC,MAII;AAAA,MAJJA,MAII,4BAJK,IAIL;AAAA,0BAHJC,OAGI;AAAA,MAHJA,OAGI,6BAHM,IAGN;AAAA,yBAFJC,MAEI;AAAA,MAFJA,MAEI,4BAFK,IAEL;AAAA,iCADJC,cACI;AAAA,MADJA,cACI,oCADa,KACb;;AACJ,kBAA8BC,QAAQ,CAAC,KAAD,CAAtC;AAAA;AAAA,MAAOC,QAAP;AAAA,MAAiBC,SAAjB;;AACA,mBAAwBF,QAAQ,CAACV,MAAD,CAAhC;AAAA;AAAA,MAAOa,IAAP;AAAA,MAAaC,OAAb;;AACA,mBAA0BJ,QAAQ,CAAC,EAAD,CAAlC;AAAA;AAAA,MAAOK,KAAP;AAAA,MAAcC,QAAd;;AACA,MAAMC,KAAK,GAAGC,QAAQ,EAAtB;AACA,MAAMC,WAAW,gCAAQd,MAAM,GAAG,CAAC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@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PropTypes, describe } from 'react-desc';
|
|
4
|
-
import DSButton from '@elliemae/ds-
|
|
4
|
+
import DSButton from '@elliemae/ds-button';
|
|
5
5
|
import { FooterWrapper } from './blocks.js';
|
|
6
6
|
import '@elliemae/ds-classnames';
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sources":["../../../src/components/Footer.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../src/components/Footer.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\nimport { FooterWrapper } from './blocks';\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 <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...rejectProps}\n />\n )}\n {!!onConfirm && (\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...confirmProps}\n />\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;\n\nconst DSModalSlideFooterWithSchema = describe(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n"],"names":["ModalFooter","confirmLabel","rejectLabel","onConfirm","onReject","confirmProps","disabled","rejectProps","props","PropTypes","string","description","func","shape","bool","propTypes","DSModalSlideFooterWithSchema","describe"],"mappings":";;;;;;;IAKMA,WAAW,GAAG,SAAdA,WAAc;AAAA,+BAClBC,YADkB;AAAA,MAClBA,YADkB,kCACH,SADG;AAAA,8BAElBC,WAFkB;AAAA,MAElBA,WAFkB,iCAEJ,QAFI;AAAA,MAGlBC,SAHkB,QAGlBA,SAHkB;AAAA,MAIlBC,QAJkB,QAIlBA,QAJkB;AAAA,+BAKlBC,YALkB;AAAA,MAKlBA,YALkB,kCAKH;AACbC,IAAAA,QAAQ,EAAE;AADG,GALG;AAAA,8BAQlBC,WARkB;AAAA,MAQlBA,WARkB,iCAQJ;AACZD,IAAAA,QAAQ,EAAE;AADE,GARI;AAAA,sBAYlB,uDACE,oBAAC,aAAD,QACG,CAAC,CAACF,QAAF,iBACC,oBAAC,QAAD;AACE,IAAA,UAAU,EAAC,WADb;AAEE,IAAA,SAAS,EAAC,eAFZ;AAGE,IAAA,cAAc,EAAE;AAAE,qBAAe;AAAjB,KAHlB;AAIE,IAAA,SAAS,EAAEF,WAJb;AAKE,IAAA,OAAO,EAAEE;AALX,KAMMG,WANN,EAFJ,EAWG,CAAC,CAACJ,SAAF,iBACC,oBAAC,QAAD;AACE,IAAA,UAAU,EAAC,SADb;AAEE,IAAA,SAAS,EAAC,gBAFZ;AAGE,IAAA,cAAc,EAAE;AAAE,qBAAe;AAAjB,KAHlB;AAIE,IAAA,SAAS,EAAEF,YAJb;AAKE,IAAA,OAAO,EAAEE;AALX,KAMME,YANN,EAZJ,CADF,CAZkB;AAAA;;AAsCpB,IAAMG,KAAK,GAAG;AACZ;AACF;AACA;AACEP,EAAAA,YAAY,EAAEQ,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,eAA7B,CAJF;;AAKZ;AACF;AACA;AACET,EAAAA,WAAW,EAAEO,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,cAA7B,CARD;;AASZ;AACF;AACA;AACER,EAAAA,SAAS,EAAEM,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,UAA3B,CAZC;;AAaZ;AACF;AACA;AACEP,EAAAA,QAAQ,EAAEK,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,UAA3B,CAhBE;;AAiBZ;AACF;AACA;AACEN,EAAAA,YAAY,EAAEI,SAAS,CAACI,KAAV,CAAgB;AAC5BP,IAAAA,QAAQ,EAAEG,SAAS,CAACK;AADQ,GAAhB,EAEXH,WAFW,CAEC,uCAFD,CApBF;;AAuBZ;AACF;AACA;AACEJ,EAAAA,WAAW,EAAEE,SAAS,CAACI,KAAV,CAAgB;AAC3BP,IAAAA,QAAQ,EAAEG,SAAS,CAACK;AADO,GAAhB,EAEVH,WAFU,CAEE,sCAFF;AA1BD,CAAd;AA+BAX,WAAW,CAACe,SAAZ,GAAwBP,KAAxB;IAEMQ,4BAA4B,GAAGC,QAAQ,CAACjB,WAAD;AAC7CgB,4BAA4B,CAACD,SAA7B,GAAyCP,KAAzC;;;;"}
|
package/esm/components/Header.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PropTypes, describe } from 'react-desc';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import DSSeparator from '@elliemae/ds-
|
|
5
|
-
import Close from '@elliemae/ds-icons
|
|
6
|
-
import DSButton from '@elliemae/ds-
|
|
4
|
+
import DSSeparator from '@elliemae/ds-separator';
|
|
5
|
+
import { Close } from '@elliemae/ds-icons';
|
|
6
|
+
import DSButton from '@elliemae/ds-button';
|
|
7
7
|
import { HeaderLeftSide, Header, Title } from './blocks.js';
|
|
8
8
|
import '@elliemae/ds-classnames';
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../src/components/Header.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../src/components/Header.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { Header, HeaderLeftSide, Title } from './blocks';\n\nconst ModalHeader = ({ 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=\"text\"\n icon={<Close aria-label=\"Close modal slide\" size=\"s\" />}\n onClick={onClose}\n />\n </HeaderWrapper>\n);\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n`;\n\nconst StyledSeparator = styled(DSSeparator)`\n padding: ${(props) => props.theme.space.xs} 0;\n`;\n\nconst StyledCloseButton = styled(DSButton)`\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};\n\nModalHeader.propTypes = props;\n\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = props;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n"],"names":["ModalHeader","title","headerTitle","onClose","toolbar","HeaderWrapper","styled","div","StyledSeparator","DSSeparator","props","theme","space","xs","StyledCloseButton","DSButton","PropTypes","func","description","node","string","propTypes","DSModalSlideHeaderWithSchema","describe"],"mappings":";;;;;;;;;IAQMA,WAAW,GAAG,SAAdA,WAAc;AAAA,wBAAGC,KAAH;AAAA,MAAUC,WAAV,2BAAwB,EAAxB;AAAA,0BAA4BC,OAA5B;AAAA,MAA4BA,OAA5B,6BAAsC;AAAA,WAAM,IAAN;AAAA,GAAtC;AAAA,0BAAkDC,OAAlD;AAAA,MAAkDA,OAAlD,6BAA4D,IAA5D;AAAA,sBAClB,oBAAC,aAAD,qBACE,oBAAC,cAAD,qBACE,oBAAC,MAAD,qBACE,oBAAC,KAAD,QAAQF,WAAR,CADF,CADF,CADF,EAMGE,OANH,EAOGA,OAAO,iBAAI,oBAAC,eAAD;AAAiB,IAAA,QAAQ,EAAC,SAA1B;AAAoC,IAAA,MAAM,EAAC,MAA3C;AAAkD,IAAA,WAAW,EAAC,UAA9D;AAAyE,IAAA,IAAI,EAAC;AAA9E,IAPd,eAQE,oBAAC,iBAAD;AACE,mBAAY,2BADd;AAEE,kBAAW,mBAFb;AAGE,IAAA,UAAU,EAAC,MAHb;AAIE,IAAA,IAAI,eAAE,oBAAC,KAAD;AAAO,oBAAW,mBAAlB;AAAsC,MAAA,IAAI,EAAC;AAA3C,MAJR;AAKE,IAAA,OAAO,EAAED;AALX,IARF,CADkB;AAAA;;AAmBpB,IAAME,aAAa,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA,iFAAnB;AAOA,IAAMC,eAAe,gBAAGF,MAAM,CAACG,WAAD,CAAT;AAAA;AAAA,wBACR,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,KAAZ,CAAkBC,EAA7B;AAAA,CADQ,CAArB;AAIA,IAAMC,iBAAiB,gBAAGR,MAAM,CAACS,QAAD,CAAT;AAAA;AAAA,qBACX,UAACL,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,KAAZ,CAAkBC,EAA7B;AAAA,CADW,CAAvB;AAIA,IAAMH,KAAK,GAAG;AACZ;AACAP,EAAAA,OAAO,EAAEa,SAAS,CAACC,IAAV,CAAeC,WAAf,CAA2B,yBAA3B,CAFG;;AAGZ;AACAd,EAAAA,OAAO,EAAEY,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,0BAA3B,CAJG;;AAKZ;AACAjB,EAAAA,KAAK,EAAEe,SAAS,CAACI,MAAV,CAAiBF,WAAjB,CAA6B,aAA7B;AANK,CAAd;AASAlB,WAAW,CAACqB,SAAZ,GAAwBX,KAAxB;IAEMY,4BAA4B,GAAGC,QAAQ,CAACvB,WAAD;AAC7CsB,4BAA4B,CAACD,SAA7B,GAAyCX,KAAzC;;;;"}
|
package/esm/index.js
CHANGED
|
@@ -7,12 +7,12 @@ import 'react';
|
|
|
7
7
|
import 'react-desc';
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import '@elliemae/ds-system';
|
|
10
|
-
import '@elliemae/ds-
|
|
11
|
-
import '@elliemae/ds-
|
|
10
|
+
import '@elliemae/ds-grid';
|
|
11
|
+
import '@elliemae/ds-separator';
|
|
12
12
|
import './components/blocks.js';
|
|
13
13
|
import '@elliemae/ds-classnames';
|
|
14
14
|
import 'styled-components';
|
|
15
|
-
import '@elliemae/ds-icons
|
|
16
|
-
import '@elliemae/ds-
|
|
15
|
+
import '@elliemae/ds-icons';
|
|
16
|
+
import '@elliemae/ds-button';
|
|
17
17
|
import '@babel/runtime/helpers/esm/extends';
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-modal-slide",
|
|
3
|
-
"version": "1.57.0-rc.
|
|
3
|
+
"version": "1.57.0-rc.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Modal Slide",
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"build": "node ../../scripts/build/build.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-basic": "1.57.0-rc.
|
|
20
|
-
"@elliemae/ds-classnames": "1.57.0-rc.
|
|
21
|
-
"@elliemae/ds-icons": "1.57.0-rc.
|
|
22
|
-
"@elliemae/ds-system": "1.57.0-rc.
|
|
19
|
+
"@elliemae/ds-basic": "1.57.0-rc.5",
|
|
20
|
+
"@elliemae/ds-classnames": "1.57.0-rc.5",
|
|
21
|
+
"@elliemae/ds-icons": "1.57.0-rc.5",
|
|
22
|
+
"@elliemae/ds-system": "1.57.0-rc.5",
|
|
23
23
|
"prop-types": "~15.7.2",
|
|
24
24
|
"react-desc": "^4.1.2"
|
|
25
25
|
},
|