@elliemae/ds-modal-slide 3.22.0-next.3 → 3.22.0-next.30
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.map +1 -1
- package/dist/cjs/components/Footer.js.map +1 -1
- package/dist/cjs/components/Header.js.map +1 -1
- package/dist/cjs/components/blocks.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/DSModalSlide.js.map +1 -1
- package/dist/esm/components/Footer.js.map +1 -1
- package/dist/esm/components/Header.js.map +1 -1
- package/dist/esm/components/blocks.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types/DSModalSlide.d.ts +44 -0
- package/package.json +16 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSModalSlide.tsx", "
|
|
3
|
+
"sources": ["../../src/DSModalSlide.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport { PropTypes, describe, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { debounce } from 'lodash';\nimport ReactDOM from 'react-dom';\nimport { useTheme, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA;AAAA;AAAA;ACAA,YAAuB;ADmIX;AAjIZ,mBAAiE;AACjE,8BAA4D;AAC5D,oBAAyB;AACzB,uBAAqB;AACrB,uBAAiC;AACjC,qBAAqB;AACrB,0BAAwB;AACxB,oBAAyD;AACzD,oBAAwB;AACxB,oBAAwB;AAExB,MAAM,oBAAgB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,yBAIR,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,KAAK;AAAA;AAAA;AAAA;AAYhE,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtC,MAAM,eAAe,CAACC,WAAU;AAC9B,QAAM;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,WAAW;AAAA,EACb,IAAIA;AACJ,QAAM,CAAC,UAAU,SAAS,QAAI,uBAAS,KAAK;AAC5C,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,MAAM;AACvC,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAS,EAAE;AACrC,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,MAAM;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;AAAA,EAIZ,UAAU,kCAAU,KAAK,YAAY,uCAAuC;AAAA;AAAA;AAAA;AAAA,EAI5E,QAAQ,kCAAU,KAAK,YAAY,sCAAsC;AAAA;AAAA;AAAA;AAAA,EAIzE,UAAU,kCAAU,UAAU,CAAC,kCAAU,SAAS,kCAAU,QAAQ,kCAAU,GAAG,CAAC,EAAE,WAAW;AAAA,IAC7F;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,WAAW,kCAAU,KAAK,YAAY,gDAAgD;AAAA;AAAA;AAAA;AAAA,EAItF,QAAQ,kCAAU,QAAQ,YAAY,uEAAuE;AAAA;AAAA;AAAA;AAAA,EAI7G,SAAS,kCAAU,OAAO,YAAY,mBAAmB;AAAA;AAAA;AAAA;AAAA,EAIzD,QAAQ,kCAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA;AAAA;AAAA,EAIvD,gBAAgB,kCAAU,KAAK,YAAY,6DAA6D;AAC1G;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["ModalFooter", "ModalHeader", "props", "ReactDOM", "React", "DSSeparator"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Footer.tsx", "
|
|
3
|
+
"sources": ["../../../src/components/Footer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSButtonV2 } from '@elliemae/ds-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(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBrB;AAhBF,8BAAoC;AACpC,0BAA2B;AAC3B,oBAA8B;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,EACZ;AAAA,EACA,cAAc;AAAA,IACZ,UAAU;AAAA,EACZ;AACF,MACE,2EACE,uDAAC,+BACE;AAAA,GAAC,CAAC,YACD;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,SAAS;AAAA,MACR,GAAG;AAAA,MACJ,IAAG;AAAA,MAEF;AAAA;AAAA,EACH;AAAA,EAED,CAAC,CAAC,aACD;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,SAAS;AAAA,MACR,GAAG;AAAA,MACJ,IAAG;AAAA,MAEF;AAAA;AAAA,EACH;AAAA,GAEJ,GACF;AAGF,MAAM,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIZ,cAAc,kCAAU,OAAO,YAAY,eAAe;AAAA;AAAA;AAAA;AAAA,EAI1D,aAAa,kCAAU,OAAO,YAAY,cAAc;AAAA;AAAA;AAAA;AAAA,EAIxD,WAAW,kCAAU,KAAK,YAAY,UAAU;AAAA;AAAA;AAAA;AAAA,EAIhD,UAAU,kCAAU,KAAK,YAAY,UAAU;AAAA;AAAA;AAAA;AAAA,EAI/C,cAAc,kCAAU,MAAM;AAAA,IAC5B,UAAU,kCAAU;AAAA,EACtB,CAAC,EAAE,YAAY,uCAAuC;AAAA;AAAA;AAAA;AAAA,EAItD,aAAa,kCAAU,MAAM;AAAA,IAC3B,UAAU,kCAAU;AAAA,EACtB,CAAC,EAAE,YAAY,sCAAsC;AACvD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,mCAA+B,kCAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Header.tsx", "
|
|
3
|
+
"sources": ["../../../src/components/Header.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;A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1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/blocks.tsx", "
|
|
3
|
+
"sources": ["../../../src/components/blocks.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAElC,MAAM,YAAY;AAEX,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,WAAW,CAAC,EAAE,MAAM,SAAS,OAAO;AAAA,EAC7F,SAAS;AAAA,EACT,cAAc,CAAC;AAAA,EACf;AACF,EAAE;AAEK,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,WAAW,CAAC,EAAE,KAAK,OAAO;AAAA,EACnF,SAAS;AAAA,EACT,cAAc,CAAC;AACjB,EAAE;AAEK,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,WAAW,CAAC,EAAE,KAAK,OAAO;AAAA,EACnF,SAAS;AAAA,EACT,cAAc,CAAC;AACjB,EAAE;AAEK,MAAM,YAAQ,wCAAkB,KAAK,EAAE,WAAW,SAAS,OAAO,CAAC,EAAE;AAErE,MAAM,qBAAiB,wCAAkB,KAAK,EAAE,WAAW,mBAAmB,OAAO,CAAC,EAAE;AAExF,MAAM,qBAAiB,wCAAkB,KAAK,EAAE,WAAW,oBAAoB,OAAO,CAAC,EAAE;AAEzF,MAAM,oBAAgB,wCAAkB,KAAK,EAAE,WAAW,kBAAkB,OAAO,CAAC,EAAE;AACtF,MAAM,aAAS,wCAAkB,KAAK,EAAE,WAAW,UAAU,OAAO,CAAC,EAAE;AACvE,MAAM,aAAS,wCAAkB,KAAK,EAAE,WAAW,UAAU,OAAO,CAAC,EAAE;AAEvE,MAAM,oBAAgB,wCAAkB,KAAK,EAAE,WAAW,kBAAkB,OAAO,CAAC,EAAE;",
|
|
6
6
|
"names": []
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.tsx", "
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AACA,0BAAwB;AACxB,oBAA6C;AAC7C,oBAA6C;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSModalSlide.tsx"],
|
|
4
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-props-helpers';\nimport { debounce } from 'lodash';\nimport ReactDOM from 'react-dom';\nimport { useTheme, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-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
5
|
"mappings": "AAAA,YAAY,WAAW;ACmIX,SAca,KAdb;AAjIZ,OAAOA,UAAS,UAAU,WAAW,aAAa,eAAe;AACjE,SAAS,WAAW,UAAU,8BAA8B;AAC5D,SAAS,gBAAgB;AACzB,OAAO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;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
6
|
"names": ["React", "props"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Footer.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSButtonV2 } from '@elliemae/ds-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(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACiBrB,mBAGM,KAFJ,YADF;AAhBF,SAAS,WAAW,gBAAgB;AACpC,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,EACZ;AAAA,EACA,cAAc;AAAA,IACZ,UAAU;AAAA,EACZ;AACF,MACE,gCACE,+BAAC,iBACE;AAAA,GAAC,CAAC,YACD;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,SAAS;AAAA,MACR,GAAG;AAAA,MACJ,IAAG;AAAA,MAEF;AAAA;AAAA,EACH;AAAA,EAED,CAAC,CAAC,aACD;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,SAAS;AAAA,MACR,GAAG;AAAA,MACJ,IAAG;AAAA,MAEF;AAAA;AAAA,EACH;AAAA,GAEJ,GACF;AAGF,MAAM,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIZ,cAAc,UAAU,OAAO,YAAY,eAAe;AAAA;AAAA;AAAA;AAAA,EAI1D,aAAa,UAAU,OAAO,YAAY,cAAc;AAAA;AAAA;AAAA;AAAA,EAIxD,WAAW,UAAU,KAAK,YAAY,UAAU;AAAA;AAAA;AAAA;AAAA,EAIhD,UAAU,UAAU,KAAK,YAAY,UAAU;AAAA;AAAA;AAAA;AAAA,EAI/C,cAAc,UAAU,MAAM;AAAA,IAC5B,UAAU,UAAU;AAAA,EACtB,CAAC,EAAE,YAAY,uCAAuC;AAAA;AAAA;AAAA;AAAA,EAItD,aAAa,UAAU,MAAM;AAAA,IAC3B,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
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Header.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-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
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
6
|
"names": ["props"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/blocks.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-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
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
6
|
"names": []
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
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
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;AACxB,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;",
|
|
6
6
|
"names": ["default"]
|
|
@@ -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-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
11
|
+
/**
|
|
12
|
+
* If the modal slide is visible or not
|
|
13
|
+
*/
|
|
14
|
+
isOpen: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
15
|
+
/**
|
|
16
|
+
* Main content of the modal
|
|
17
|
+
*/
|
|
18
|
+
children: import("@elliemae/ds-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-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-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
+
/**
|
|
28
|
+
* Ratio of fade out
|
|
29
|
+
*/
|
|
30
|
+
fadeOut: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
|
+
/**
|
|
32
|
+
* Ratio of fade in
|
|
33
|
+
*/
|
|
34
|
+
fadeIn: import("@elliemae/ds-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-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
39
|
+
};
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
42
|
+
declare const DSModalSlideWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<any>;
|
|
43
|
+
export { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };
|
|
44
|
+
export default DSModalSlide;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-modal-slide",
|
|
3
|
-
"version": "3.22.0-next.
|
|
3
|
+
"version": "3.22.0-next.30",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Modal Slide",
|
|
6
6
|
"files": [
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-button-v2": "3.22.0-next.
|
|
55
|
-
"@elliemae/ds-classnames": "3.22.0-next.
|
|
56
|
-
"@elliemae/ds-grid": "3.22.0-next.
|
|
57
|
-
"@elliemae/ds-
|
|
58
|
-
"@elliemae/ds-
|
|
59
|
-
"@elliemae/ds-
|
|
60
|
-
"@elliemae/ds-system": "3.22.0-next.
|
|
54
|
+
"@elliemae/ds-button-v2": "3.22.0-next.30",
|
|
55
|
+
"@elliemae/ds-classnames": "3.22.0-next.30",
|
|
56
|
+
"@elliemae/ds-grid": "3.22.0-next.30",
|
|
57
|
+
"@elliemae/ds-props-helpers": "3.22.0-next.30",
|
|
58
|
+
"@elliemae/ds-separator": "3.22.0-next.30",
|
|
59
|
+
"@elliemae/ds-icons": "3.22.0-next.30",
|
|
60
|
+
"@elliemae/ds-system": "3.22.0-next.30"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@elliemae/pui-cli": "~9.0.0-next.
|
|
63
|
+
"@elliemae/pui-cli": "~9.0.0-next.22",
|
|
64
64
|
"@testing-library/react": "~12.1.3",
|
|
65
65
|
"styled-components": "~5.3.9",
|
|
66
|
-
"@elliemae/ds-monorepo-devops": "3.22.0-next.
|
|
66
|
+
"@elliemae/ds-monorepo-devops": "3.22.0-next.30"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"lodash": "~4.17.21",
|
|
@@ -76,14 +76,14 @@
|
|
|
76
76
|
"typeSafety": false
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
|
-
"dev": "cross-env NODE_ENV=development node
|
|
79
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
80
80
|
"test": "pui-cli test --passWithNoTests",
|
|
81
|
-
"lint": "node
|
|
82
|
-
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='
|
|
83
|
-
"dts": "node
|
|
84
|
-
"build": "cross-env NODE_ENV=production node
|
|
81
|
+
"lint": "node ../../../scripts/lint.mjs",
|
|
82
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
|
|
83
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
84
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
85
85
|
"dev:build": "pnpm --filter {.}... build",
|
|
86
86
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
87
|
-
"checkDeps": "npm exec
|
|
87
|
+
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
88
88
|
}
|
|
89
89
|
}
|