@elliemae/ds-modal-slide 3.36.0-next.0 → 3.36.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/DSModalSlide.js
CHANGED
|
@@ -67,10 +67,8 @@ const DSModalSlide = (props) => {
|
|
|
67
67
|
const contentRows = [...header ? ["auto", "1px"] : [], "1fr", ...footer ? ["1px", theme.space.m] : []];
|
|
68
68
|
const globalAttrs = (0, import_ds_props_helpers.useGetGlobalAttributes)(props);
|
|
69
69
|
const updateShow = (0, import_react.useCallback)(() => {
|
|
70
|
-
if (fullWidth)
|
|
71
|
-
|
|
72
|
-
else
|
|
73
|
-
setWidth(50);
|
|
70
|
+
if (fullWidth) setWidth(100);
|
|
71
|
+
else setWidth(50);
|
|
74
72
|
if (isOpen !== show) {
|
|
75
73
|
setMoving(true);
|
|
76
74
|
if (isOpen) {
|
|
@@ -96,18 +94,14 @@ const DSModalSlide = (props) => {
|
|
|
96
94
|
onChangeParent();
|
|
97
95
|
}
|
|
98
96
|
return () => {
|
|
99
|
-
if (container)
|
|
100
|
-
resizeObserver.unobserve(container);
|
|
97
|
+
if (container) resizeObserver.unobserve(container);
|
|
101
98
|
};
|
|
102
99
|
}, [container, onChangeParent]);
|
|
103
|
-
if (!show)
|
|
104
|
-
|
|
105
|
-
if (!container)
|
|
106
|
-
return null;
|
|
100
|
+
if (!show) return null;
|
|
101
|
+
if (!container) return null;
|
|
107
102
|
const handleAnimationEnd = () => {
|
|
108
103
|
setMoving(false);
|
|
109
|
-
if (!isOpen)
|
|
110
|
-
setShow(isOpen);
|
|
104
|
+
if (!isOpen) setShow(isOpen);
|
|
111
105
|
};
|
|
112
106
|
return import_react_dom.default.createPortal(
|
|
113
107
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalSlideAnimationFix, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSModalSlide.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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: React.FC<DSModalSlideT.Props> = (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 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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA;AAAA;AAAA;ACAA,YAAuB;AD+HX;AA/HZ,mBAAiE;AACjE,8BAA+E;AAC/E,oBAAyB;AACzB,uBAAqB;AACrB,uBAAiC;AACjC,0BAA8B;AAC9B,qBAAqB;AACrB,0BAA4B;AAC5B,oBAAwB;AACxB,oBAAwB;AACxB,mCAA8E;AAC9E,oBAOO;AACP,qCA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AAAA,kBACF,GACF;AAAA,kBACC,UAAU,4CAAC,mCAAY,UAAS,WAAU,MAAK,YAAW;AAAA,kBAC1D;AAAA,mBACH;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF,GACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["ModalFooter", "ModalHeader", "ReactDOM", "React"]
|
|
7
7
|
}
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSSeparatorV2 } from '@elliemae/ds-separator';\nimport { styled, kfrm } from '@elliemae/ds-system';\nimport { DSModalSlideName, DSModalSlideSlots } from './DSModalSlideDefinitions.js';\n\nconst overlayAnimation = kfrm`{\n 0% {\n background: rgba(37, 41, 47, 0);\n }\n 100% {\n background: rgba(37, 41, 47, 0.25);\n }\n}`;\n\nconst overlayAnimationOut = kfrm`{\n 0% {\n background: rgba(37, 41, 47, 0.25);\n }\n 100% {\n background: rgba(37, 41, 47, 0);\n }\n}`;\n\nconst contentAnimationOut = kfrm`{\n 0% {\n transform: translateX(0);\n }\n 100% {\n transform: translateX(100%);\n }\n}`;\n\nconst contentAnimationIn = kfrm`{\n 0% {\n transform: translateX(100%);\n }\n 100% {\n transform: translateX(0);\n }\n}`;\n\nexport const StyledModalWrapper = styled('div', {\n name: DSModalSlideName,\n slot: DSModalSlideSlots.ROOT,\n})<{ height: string | number }>`\n position: absolute;\n display: flex;\n height: calc(${(props) => props.height} * 1px);\n width: 100%;\n overflow: hidden;\n top: 0;\n left: 0;\n z-index: 10;\n\n .em-ds-modal-v2__modal-wrapper {\n flex: 1;\n padding: 2.46rem 0;\n }\n\n .em-ds-modal-v2__modal-title {\n max-width: 80%;\n margin: 0 auto;\n }\n`;\n\nexport const StyledOverlay = styled('div', {\n name: DSModalSlideName,\n slot: DSModalSlideSlots.OVERLAY,\n})<{ disappearing: boolean; showing: boolean; fadeIn: number; fadeOut: number }>`\n height: 100%;\n width: 100%;\n background: rgba(37, 41, 47, 0.25);\n display: flex;\n animation: ${(props) => (props.disappearing ? overlayAnimationOut : overlayAnimation)}\n calc(${(props) => (props.disappearing ? props.fadeOut : props.fadeIn)} * 1ms) linear;\n\n ${(props) =>\n props.showing &&\n `display: flex;\n height: 100%;`}\n`;\n\nexport const StyledContent = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.CONTENT })<{\n height: number | string;\n width: number | string;\n disappearing: boolean;\n fadeIn: number;\n fadeOut: number;\n}>`\n height: calc(${(props) => props.height} * 1px);\n background: neutral-000;\n box-shadow:\n 0 6px 20px 0 rgba(0, 0, 0, 0.24),\n 0 8px 17px 0 rgba(0, 0, 0, 0.19);\n width: calc(${(props) => props.width} * 1%);\n margin-left: auto;\n align-items: center;\n flex-direction: column;\n display: flex;\n overflow-y: auto;\n border: 1px solid neutral-300;\n border-left: 2px solid neutral-300;\n animation: ${(props) => (props.disappearing ? contentAnimationOut : contentAnimationIn)}\n calc(${(props) => (props.disappearing ? props.fadeOut / 2 : props.fadeIn / 2)} * 1ms) linear;\n .em-ds-separator-wrapper {\n margin-top: unset;\n }\n`;\n\nexport const StyledGridContent = styled(Grid)`\n height: 100%;\n width: 100%;\n max-height: 100%;\n overflow: hidden;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-transform-style: preserve-3d;\n transform-style: preserve-3d;\n`;\n\nexport const StyledTitle = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.TITLE })`\n font-size: 1.3846rem;\n color: neutral-700;\n`;\n\nexport const StyledHeaderLeftSide = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.HEADER_LEFT_SIDE })`\n width: 100%;\n display: flex;\n flex-direction: row;\n text-align: left;\n padding: 0.61538rem 1.23077rem 0.61538rem 0;\n height: 3.69231rem;\n\n .em-ds-button {\n .em-ds-icon {\n fill: brand-primary-600;\n }\n }\n .close-button {\n padding-left: 18px;\n }\n`;\n\nexport const StyledActualContent = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.ACTUAL_CONTENT })`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledHeader = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.HEADER })`\n padding: 0 1.23077rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n`;\n\nexport const StyledFooter = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.FOOTER })``;\n\nexport const StyledFooterWrapper = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.FOOTER_WRAPPER })`\n width: 100%;\n display: flex;\n flex-direction: row;\n text-align: left;\n align-items: center;\n justify-content: flex-end;\n padding: 0.61538rem 1.23077rem 0.61538rem 0;\n height: 3.69231rem;\n .em-ds-button {\n margin-left: 1.23077rem;\n }\n`;\n\nexport const HeaderWrapper = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.HEADER_WRAPPER })`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n height: 48px;\n overflow: hidden;\n`;\n\nexport const StyledSeparator = styled(DSSeparatorV2, { name: DSModalSlideName, slot: DSModalSlideSlots.SEPARATOR })`\n height: 33%;\n background: ${(props) => props.theme.colors.neutral['300']};\n`;\n\nexport const StyledCloseButton = styled(DSButtonV2, { name: DSModalSlideName, slot: DSModalSlideSlots.CLOSE_BUTTON })`\n margin: ${(props) => props.theme.space.xs};\n`;\n\nexport const StyledContentWrapper = styled(Grid, { name: DSModalSlideName, slot: DSModalSlideSlots.CONTENT_WRAPPER })`\n overflow: auto;\n &:focus,\n &:focus-visible {\n outline: 1px solid ${({ theme }) =>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js
CHANGED
|
@@ -37,10 +37,8 @@ const DSModalSlide = (props) => {
|
|
|
37
37
|
const contentRows = [...header ? ["auto", "1px"] : [], "1fr", ...footer ? ["1px", theme.space.m] : []];
|
|
38
38
|
const globalAttrs = useGetGlobalAttributes(props);
|
|
39
39
|
const updateShow = useCallback(() => {
|
|
40
|
-
if (fullWidth)
|
|
41
|
-
|
|
42
|
-
else
|
|
43
|
-
setWidth(50);
|
|
40
|
+
if (fullWidth) setWidth(100);
|
|
41
|
+
else setWidth(50);
|
|
44
42
|
if (isOpen !== show) {
|
|
45
43
|
setMoving(true);
|
|
46
44
|
if (isOpen) {
|
|
@@ -66,18 +64,14 @@ const DSModalSlide = (props) => {
|
|
|
66
64
|
onChangeParent();
|
|
67
65
|
}
|
|
68
66
|
return () => {
|
|
69
|
-
if (container)
|
|
70
|
-
resizeObserver.unobserve(container);
|
|
67
|
+
if (container) resizeObserver.unobserve(container);
|
|
71
68
|
};
|
|
72
69
|
}, [container, onChangeParent]);
|
|
73
|
-
if (!show)
|
|
74
|
-
|
|
75
|
-
if (!container)
|
|
76
|
-
return null;
|
|
70
|
+
if (!show) return null;
|
|
71
|
+
if (!container) return null;
|
|
77
72
|
const handleAnimationEnd = () => {
|
|
78
73
|
setMoving(false);
|
|
79
|
-
if (!isOpen)
|
|
80
|
-
setShow(isOpen);
|
|
74
|
+
if (!isOpen) setShow(isOpen);
|
|
81
75
|
};
|
|
82
76
|
return ReactDOM.createPortal(
|
|
83
77
|
/* @__PURE__ */ jsx(ModalSlideAnimationFix, { children: /* @__PURE__ */ jsx(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSModalSlide.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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: React.FC<DSModalSlideT.Props> = (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 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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC+HX,SAEa,KAFb;AA/HZ,OAAOA,UAAS,UAAU,WAAW,aAAa,eAAe;AACjE,SAAS,UAAU,wBAAwB,oCAAoC;AAC/E,SAAS,gBAAgB;AACzB,OAAO,cAAc;AACrB,SAAS,UAAU,cAAc;AACjC,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AACrB,SAAS,mBAAmB;AAC5B,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,SAAS,cAAc,mCAAuD;AAC9E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AAUjC,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAMtC,MAAM,eAA8C,CAAC,UAAU;AAC7D,QAAM,mBAAmB,6BAA0D,OAA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ACH;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF,GACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSSeparatorV2 } from '@elliemae/ds-separator';\nimport { styled, kfrm } from '@elliemae/ds-system';\nimport { DSModalSlideName, DSModalSlideSlots } from './DSModalSlideDefinitions.js';\n\nconst overlayAnimation = kfrm`{\n 0% {\n background: rgba(37, 41, 47, 0);\n }\n 100% {\n background: rgba(37, 41, 47, 0.25);\n }\n}`;\n\nconst overlayAnimationOut = kfrm`{\n 0% {\n background: rgba(37, 41, 47, 0.25);\n }\n 100% {\n background: rgba(37, 41, 47, 0);\n }\n}`;\n\nconst contentAnimationOut = kfrm`{\n 0% {\n transform: translateX(0);\n }\n 100% {\n transform: translateX(100%);\n }\n}`;\n\nconst contentAnimationIn = kfrm`{\n 0% {\n transform: translateX(100%);\n }\n 100% {\n transform: translateX(0);\n }\n}`;\n\nexport const StyledModalWrapper = styled('div', {\n name: DSModalSlideName,\n slot: DSModalSlideSlots.ROOT,\n})<{ height: string | number }>`\n position: absolute;\n display: flex;\n height: calc(${(props) => props.height} * 1px);\n width: 100%;\n overflow: hidden;\n top: 0;\n left: 0;\n z-index: 10;\n\n .em-ds-modal-v2__modal-wrapper {\n flex: 1;\n padding: 2.46rem 0;\n }\n\n .em-ds-modal-v2__modal-title {\n max-width: 80%;\n margin: 0 auto;\n }\n`;\n\nexport const StyledOverlay = styled('div', {\n name: DSModalSlideName,\n slot: DSModalSlideSlots.OVERLAY,\n})<{ disappearing: boolean; showing: boolean; fadeIn: number; fadeOut: number }>`\n height: 100%;\n width: 100%;\n background: rgba(37, 41, 47, 0.25);\n display: flex;\n animation: ${(props) => (props.disappearing ? overlayAnimationOut : overlayAnimation)}\n calc(${(props) => (props.disappearing ? props.fadeOut : props.fadeIn)} * 1ms) linear;\n\n ${(props) =>\n props.showing &&\n `display: flex;\n height: 100%;`}\n`;\n\nexport const StyledContent = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.CONTENT })<{\n height: number | string;\n width: number | string;\n disappearing: boolean;\n fadeIn: number;\n fadeOut: number;\n}>`\n height: calc(${(props) => props.height} * 1px);\n background: neutral-000;\n box-shadow:\n 0 6px 20px 0 rgba(0, 0, 0, 0.24),\n 0 8px 17px 0 rgba(0, 0, 0, 0.19);\n width: calc(${(props) => props.width} * 1%);\n margin-left: auto;\n align-items: center;\n flex-direction: column;\n display: flex;\n overflow-y: auto;\n border: 1px solid neutral-300;\n border-left: 2px solid neutral-300;\n animation: ${(props) => (props.disappearing ? contentAnimationOut : contentAnimationIn)}\n calc(${(props) => (props.disappearing ? props.fadeOut / 2 : props.fadeIn / 2)} * 1ms) linear;\n .em-ds-separator-wrapper {\n margin-top: unset;\n }\n`;\n\nexport const StyledGridContent = styled(Grid)`\n height: 100%;\n width: 100%;\n max-height: 100%;\n overflow: hidden;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-transform-style: preserve-3d;\n transform-style: preserve-3d;\n`;\n\nexport const StyledTitle = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.TITLE })`\n font-size: 1.3846rem;\n color: neutral-700;\n`;\n\nexport const StyledHeaderLeftSide = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.HEADER_LEFT_SIDE })`\n width: 100%;\n display: flex;\n flex-direction: row;\n text-align: left;\n padding: 0.61538rem 1.23077rem 0.61538rem 0;\n height: 3.69231rem;\n\n .em-ds-button {\n .em-ds-icon {\n fill: brand-primary-600;\n }\n }\n .close-button {\n padding-left: 18px;\n }\n`;\n\nexport const StyledActualContent = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.ACTUAL_CONTENT })`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledHeader = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.HEADER })`\n padding: 0 1.23077rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n`;\n\nexport const StyledFooter = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.FOOTER })``;\n\nexport const StyledFooterWrapper = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.FOOTER_WRAPPER })`\n width: 100%;\n display: flex;\n flex-direction: row;\n text-align: left;\n align-items: center;\n justify-content: flex-end;\n padding: 0.61538rem 1.23077rem 0.61538rem 0;\n height: 3.69231rem;\n .em-ds-button {\n margin-left: 1.23077rem;\n }\n`;\n\nexport const HeaderWrapper = styled('div', { name: DSModalSlideName, slot: DSModalSlideSlots.HEADER_WRAPPER })`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n height: 48px;\n overflow: hidden;\n`;\n\nexport const StyledSeparator = styled(DSSeparatorV2, { name: DSModalSlideName, slot: DSModalSlideSlots.SEPARATOR })`\n height: 33%;\n background: ${(props) => props.theme.colors.neutral['300']};\n`;\n\nexport const StyledCloseButton = styled(DSButtonV2, { name: DSModalSlideName, slot: DSModalSlideSlots.CLOSE_BUTTON })`\n margin: ${(props) => props.theme.space.xs};\n`;\n\nexport const StyledContentWrapper = styled(Grid, { name: DSModalSlideName, slot: DSModalSlideSlots.CONTENT_WRAPPER })`\n overflow: auto;\n &:focus,\n &:focus-visible {\n outline: 1px solid ${({ theme }) => theme.colors.brand['600']};\n outline-offset: -1px;\n }\n`;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,kBAAkB;A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AO7F,MAAM,eAAe,OAAO,OAAO,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,OAAO,CAAC;AAE7F,MAAM,sBAAsB,OAAO,OAAO,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc5G,MAAM,gBAAgB,OAAO,OAAO,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAStG,MAAM,kBAAkB,OAAO,eAAe,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,UAAU,CAAC;AAAA;AAAA,gBAElG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAGrD,MAAM,oBAAoB,OAAO,YAAY,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,aAAa,CAAC;AAAA,YACxG,CAAC,UAAU,MAAM,MAAM,MAAM,EAAE;AAAA;AAGpC,MAAM,uBAAuB,OAAO,MAAM,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,gBAAgB,CAAC;AAAA;AAAA;AAAA;AAAA,yBAI3F,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-modal-slide",
|
|
3
|
-
"version": "3.36.0-next.
|
|
3
|
+
"version": "3.36.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Modal Slide",
|
|
6
6
|
"files": [
|
|
@@ -52,19 +52,19 @@
|
|
|
52
52
|
"indent": 4
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@elliemae/ds-
|
|
56
|
-
"@elliemae/ds-
|
|
57
|
-
"@elliemae/ds-grid": "3.36.0-next.
|
|
58
|
-
"@elliemae/ds-
|
|
59
|
-
"@elliemae/ds-
|
|
60
|
-
"@elliemae/ds-
|
|
61
|
-
"@elliemae/ds-
|
|
55
|
+
"@elliemae/ds-classnames": "3.36.0-next.1",
|
|
56
|
+
"@elliemae/ds-button-v2": "3.36.0-next.1",
|
|
57
|
+
"@elliemae/ds-grid": "3.36.0-next.1",
|
|
58
|
+
"@elliemae/ds-props-helpers": "3.36.0-next.1",
|
|
59
|
+
"@elliemae/ds-separator": "3.36.0-next.1",
|
|
60
|
+
"@elliemae/ds-icons": "3.36.0-next.1",
|
|
61
|
+
"@elliemae/ds-system": "3.36.0-next.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
65
65
|
"styled-components": "~5.3.9",
|
|
66
|
-
"@elliemae/ds-monorepo-devops": "3.36.0-next.
|
|
67
|
-
"@elliemae/ds-utilities": "3.36.0-next.
|
|
66
|
+
"@elliemae/ds-monorepo-devops": "3.36.0-next.1",
|
|
67
|
+
"@elliemae/ds-utilities": "3.36.0-next.1"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"lodash": "~4.17.21",
|