@elliemae/ds-modal-slide 3.33.0-next.2 → 3.33.0-next.4
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 +2 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js +4 -6
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-modal-slide-valid.js +196 -0
- package/dist/cjs/typescript-testing/typescript-modal-slide-valid.js.map +7 -0
- package/dist/esm/DSModalSlide.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js +4 -6
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-modal-slide-valid.js +173 -0
- package/dist/esm/typescript-testing/typescript-modal-slide-valid.js.map +7 -0
- package/dist/types/DSModalSlide.d.ts +1 -4
- package/dist/types/react-desc-prop-types.d.ts +3 -2
- package/dist/types/styled.d.ts +1 -10
- package/dist/types/typescript-testing/typescript-modal-slide-valid.d.ts +1 -0
- package/package.json +11 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSModalSlide.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { debounce } from 'lodash';\nimport ReactDOM from 'react-dom';\nimport { useTheme, styled } from '@elliemae/ds-system';\nimport { useOwnerProps } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport ModalHeader from './components/Header.js';\nimport ModalFooter from './components/Footer.js';\nimport { defaultProps, DSModalSlidePropTypesSchema, type DSModalSlideT } from './react-desc-prop-types.js';\nimport {\n StyledActualContent,\n StyledContent,\n StyledModalWrapper,\n StyledOverlay,\n StyledContentWrapper,\n StyledGridContent,\n} from './styled.js';\nimport { DSModalSlideName } from './DSModalSlideDefinitions.js';\n\n// js engine and css engine can't be guaranteed to be in sync due to how they run on different threads in the browsers\n// this means that in some edge-cases react may have \"out-dated\" information like \"isMoving\" in this case\n// this can cause some animation frame to have the animation \"after\" end but before react has updated the state\n// if the css animation is not configured to stay in the end state,\n// in those edge-cases,\n// the animation will \"jump\" back to the start and cause a flicker\n// this is the fix for that, it's an hack because the component is still css classname based\n// when we re-do the modal slide, we should integrate this as the styled component css itself instead of this extra wrapper\nconst ModalSlideAnimationFix = styled.div`\n .em-ds-modal-slide__overlay--disappearing,\n .em-ds-modal-slide__content--disappearing {\n animation-fill-mode: forwards;\n }\n`;\nconst DSModalSlide = (props
|
|
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,qCAAiC;AAUjC,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAMtC,MAAM,
|
|
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 role=\"contentinfo\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledActualContent\n className=\"em-ds-modal-slide__actual-content\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {children}\n </StyledActualContent>\n </StyledContentWrapper>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </StyledGridContent>\n </StyledContent>\n </StyledOverlay>\n </StyledModalWrapper>\n </ModalSlideAnimationFix>,\n container,\n );\n};\n\nDSModalSlide.displayName = DSModalSlideName;\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = DSModalSlidePropTypesSchema;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;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,qCAAiC;AAUjC,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAMtC,MAAM,eAA8C,CAAC,UAAU;AAC7D,QAAM,uBAAmB,sDAA0D,OAAO,yCAAY;AACtG,QAAM,EAAE,QAAQ,UAAU,cAAc,WAAW,QAAQ,QAAQ,SAAS,QAAQ,gBAAgB,SAAS,IAC3G;AACF,QAAM,CAAC,EAAE,SAAS,QAAI,uBAAS,KAAK;AACpC,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,MAAM;AACvC,QAAM,CAAC,OAAO,QAAQ,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AA,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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { getPropsPerDatatestIdPropTypes } from '@elliemae/ds-utilities';\nimport { DSModalSlideDataTestIds } from './DSModalSlideDefinitions.js';\n\nexport declare namespace DSModalSlideT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface RequiredProps {\n getContainer: () => HTMLElement;\n }\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n fullWidth: boolean;\n fadeOut: number;\n fadeIn: number;\n overrideHeight: boolean;\n }\n\n export interface OptionalProps {\n header
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AACvE,0BAA+C;AAC/C,qCAAwC;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { getPropsPerDatatestIdPropTypes } from '@elliemae/ds-utilities';\nimport { DSModalSlideDataTestIds } from './DSModalSlideDefinitions.js';\n\nexport declare namespace DSModalSlideT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface RequiredProps {\n getContainer: () => HTMLElement;\n }\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n fullWidth: boolean;\n fadeOut: number;\n fadeIn: number;\n overrideHeight: boolean;\n }\n\n export interface OptionalProps {\n header?: JSX.Element;\n footer?: React.ReactNode;\n children?: React.ReactNode;\n innerRef?: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;\n }\n\n export interface FooterRequiredProps {}\n\n export interface FooterDefaultProps {\n confirmLabel: string;\n rejectLabel: string;\n confirmProps: {\n disabled: boolean;\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;\n };\n rejectProps: { disabled: boolean };\n }\n\n export interface FooterOptionalProps {\n onConfirm: () => void;\n onReject: () => void;\n }\n\n export interface HeaderRequiredProps {}\n\n export interface HeaderDefaultProps {\n title: string;\n onClose: () => void;\n }\n\n export interface HeaderOptionalProps {\n toolbar?: React.ReactNode;\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;\n }\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLElement>;\n\n export type HeaderProps = PropsT<HeaderDefaultProps, HeaderRequiredProps, HeaderOptionalProps, HTMLButtonElement>;\n\n export type HeaderInternalProps = InternalPropsT<\n HeaderDefaultProps,\n HeaderRequiredProps,\n HeaderOptionalProps,\n HTMLButtonElement\n >;\n\n export type FooterProps = PropsT<FooterDefaultProps, FooterRequiredProps, FooterOptionalProps, HTMLDivElement>;\n\n export type FooterInternalProps = InternalPropsT<\n FooterDefaultProps,\n FooterRequiredProps,\n FooterOptionalProps,\n HTMLDivElement\n >;\n}\n\nexport const defaultProps: DSModalSlideT.DefaultProps = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n};\n\nexport const headerDefaultProps: DSModalSlideT.HeaderDefaultProps = {\n title: '',\n onClose: () => null,\n};\n\nexport const footerDefaultProps: DSModalSlideT.FooterDefaultProps = {\n confirmLabel: 'Confirm',\n rejectLabel: 'Cancel',\n confirmProps: { disabled: false },\n rejectProps: { disabled: false },\n};\n\nexport const DSModalSlidePropTypes: DSPropTypesSchema<DSModalSlideT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\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.node]).isRequired.description('Main content of the modal'),\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 * If the modal slide has a footer\n */\n footer: PropTypes.element.description('If the modal slide has a footer'),\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 getContainer: PropTypes.func.description('Should return the container of the modal slide').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the modal slide'),\n};\n\nexport const DSModalSlidePropTypesSchema =\n DSModalSlidePropTypes as unknown as React.WeakValidationMap<DSModalSlideT.Props>;\n\nexport const DSModalSlideHeaderPropTypes: DSPropTypesSchema<DSModalSlideT.HeaderProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.description('modal title'),\n onClose: PropTypes.func.description('on modal close callback'),\n toolbar: PropTypes.node.description('modal toolbar comoponent'),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the modal slide'),\n};\n\nexport const DSModalSlideHeaderPropTypesSchema =\n DSModalSlideHeaderPropTypes as unknown as React.WeakValidationMap<DSModalSlideT.HeaderProps>;\n\nexport const DSModalSlideFooterPropTypes: DSPropTypesSchema<DSModalSlideT.FooterProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\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 ...getPropsPerDatatestIdPropTypes(DSModalSlideDataTestIds),\n};\n\nexport const DSModalSlideFooterPropTypesSchema =\n DSModalSlideFooterPropTypes as unknown as React.WeakValidationMap<DSModalSlideT.FooterProps>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;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,EAC3F,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,wBAAwB;AACxG;AAEO,MAAM,8BACX;AAEK,MAAM,8BAA4E;AAAA,EACvF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,aAAa;AAAA,EACjD,SAAS,kCAAU,KAAK,YAAY,yBAAyB;AAAA,EAC7D,SAAS,kCAAU,KAAK,YAAY,0BAA0B;AAAA,EAC9D,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,wBAAwB;AACxG;AAEO,MAAM,oCACX;AAEK,MAAM,8BAA4E;AAAA,EACvF,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,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;AAAA,EACrD,OAAG,oDAA+B,sDAAuB;AAC3D;AAEO,MAAM,oCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -149,7 +149,10 @@ const StyledGridContent = (0, import_ds_system.styled)(import_ds_grid.Grid)`
|
|
|
149
149
|
-webkit-transform-style: preserve-3d;
|
|
150
150
|
transform-style: preserve-3d;
|
|
151
151
|
`;
|
|
152
|
-
const StyledTitle = (0, import_ds_system.styled)("div", { name: import_DSModalSlideDefinitions.DSModalSlideName, slot: import_DSModalSlideDefinitions.DSModalSlideSlots.TITLE })
|
|
152
|
+
const StyledTitle = (0, import_ds_system.styled)("div", { name: import_DSModalSlideDefinitions.DSModalSlideName, slot: import_DSModalSlideDefinitions.DSModalSlideSlots.TITLE })`
|
|
153
|
+
font-size: 1.3846rem;
|
|
154
|
+
color: neutral-700;
|
|
155
|
+
`;
|
|
153
156
|
const StyledHeaderLeftSide = (0, import_ds_system.styled)("div", { name: import_DSModalSlideDefinitions.DSModalSlideName, slot: import_DSModalSlideDefinitions.DSModalSlideSlots.HEADER_LEFT_SIDE })`
|
|
154
157
|
width: 100%;
|
|
155
158
|
display: flex;
|
|
@@ -176,11 +179,6 @@ const StyledHeader = (0, import_ds_system.styled)("div", { name: import_DSModalS
|
|
|
176
179
|
display: flex;
|
|
177
180
|
flex-direction: column;
|
|
178
181
|
justify-content: center;
|
|
179
|
-
|
|
180
|
-
${StyledTitle} {
|
|
181
|
-
font-size: 1.3846rem;
|
|
182
|
-
color: neutral-700;
|
|
183
|
-
}
|
|
184
182
|
`;
|
|
185
183
|
const StyledFooter = (0, import_ds_system.styled)("div", { name: import_DSModalSlideDefinitions.DSModalSlideName, slot: import_DSModalSlideDefinitions.DSModalSlideSlots.FOOTER })``;
|
|
186
184
|
const StyledFooterWrapper = (0, import_ds_system.styled)("div", { name: import_DSModalSlideDefinitions.DSModalSlideName, slot: import_DSModalSlideDefinitions.DSModalSlideSlots.FOOTER_WRAPPER })`
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
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 })
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAA2B;AAC3B,qBAAqB;AACrB,0BAA8B;AAC9B,uBAA6B;AAC7B,qCAAoD;AAEpD,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASzB,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5B,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASpB,MAAM,yBAAqB,yBAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,iDAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA,iBAGgB,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkB3B,MAAM,oBAAgB,yBAAO,OAAO;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,iDAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,eAKc,CAAC,UAAW,MAAM,eAAe,sBAAsB;AAAA,WAC3D,CAAC,UAAW,MAAM,eAAe,MAAM,UAAU,MAAM;AAAA;AAAA,IAE9D,CAAC,UACD,MAAM,WACN;AAAA;AAAA;AAIG,MAAM,oBAAgB,yBAAO,OAAO,EAAE,MAAM,iDAAkB,MAAM,iDAAkB,QAAQ,CAAC;AAAA,iBAOrF,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKlB,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAQlB,CAAC,UAAW,MAAM,eAAe,sBAAsB;AAAA,WAC3D,CAAC,UAAW,MAAM,eAAe,MAAM,UAAU,IAAI,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAMxE,MAAM,wBAAoB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWrC,MAAM,kBAAc,yBAAO,OAAO,EAAE,MAAM,iDAAkB,MAAM,iDAAkB,MAAM,CAAC;
|
|
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 }) => theme.colors.brand['600']};\n outline-offset: -1px;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAA2B;AAC3B,qBAAqB;AACrB,0BAA8B;AAC9B,uBAA6B;AAC7B,qCAAoD;AAEpD,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASzB,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5B,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASpB,MAAM,yBAAqB,yBAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,iDAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA,iBAGgB,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkB3B,MAAM,oBAAgB,yBAAO,OAAO;A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OAAO,CAAC;AAE7F,MAAM,0BAAsB,yBAAO,OAAO,EAAE,MAAM,iDAAkB,MAAM,iDAAkB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc5G,MAAM,oBAAgB,yBAAO,OAAO,EAAE,MAAM,iDAAkB,MAAM,iDAAkB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAStG,MAAM,sBAAkB,yBAAO,mCAAe,EAAE,MAAM,iDAAkB,MAAM,iDAAkB,UAAU,CAAC;AAAA;AAAA,gBAElG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAGpD,MAAM,wBAAoB,yBAAO,gCAAY,EAAE,MAAM,iDAAkB,MAAM,iDAAkB,aAAa,CAAC;AAAA,YACxG,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAGlC,MAAM,2BAAuB,yBAAO,qBAAM,EAAE,MAAM,iDAAkB,MAAM,iDAAkB,gBAAgB,CAAC;AAAA;AAAA;AAAA;AAAA,yBAI3F,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,KAAK;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = __toESM(require("react"));
|
|
27
|
+
var import__ = require("../index.js");
|
|
28
|
+
const ref = import_react.default.createRef();
|
|
29
|
+
const testRequiredProps = {
|
|
30
|
+
getContainer: () => ref.current
|
|
31
|
+
};
|
|
32
|
+
const testOptionalProps = {
|
|
33
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
34
|
+
import__.ModalFooter,
|
|
35
|
+
{
|
|
36
|
+
onConfirm: () => {
|
|
37
|
+
},
|
|
38
|
+
confirmProps: { disabled: false },
|
|
39
|
+
confirmLabel: "",
|
|
40
|
+
onReject: () => {
|
|
41
|
+
},
|
|
42
|
+
rejectProps: { disabled: false },
|
|
43
|
+
rejectLabel: ""
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ModalHeader, { title: "", onClose: () => {
|
|
47
|
+
}, toolbar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {}) }),
|
|
48
|
+
innerRef: ref,
|
|
49
|
+
children: "content"
|
|
50
|
+
};
|
|
51
|
+
const testPartialDefaults = {
|
|
52
|
+
fadeIn: 1e3,
|
|
53
|
+
fadeOut: 2e3,
|
|
54
|
+
isOpen: true
|
|
55
|
+
};
|
|
56
|
+
const testProps = {
|
|
57
|
+
...testRequiredProps,
|
|
58
|
+
...testOptionalProps,
|
|
59
|
+
...testPartialDefaults
|
|
60
|
+
};
|
|
61
|
+
const testPropsAsSyntax = {
|
|
62
|
+
...testRequiredProps,
|
|
63
|
+
...testOptionalProps,
|
|
64
|
+
...testPartialDefaults
|
|
65
|
+
};
|
|
66
|
+
const testCompleteDefaults = {
|
|
67
|
+
isOpen: false,
|
|
68
|
+
centered: false,
|
|
69
|
+
fullWidth: false,
|
|
70
|
+
fadeOut: 1500,
|
|
71
|
+
fadeIn: 1500,
|
|
72
|
+
overrideHeight: false
|
|
73
|
+
};
|
|
74
|
+
const testInternalProps = {
|
|
75
|
+
...testRequiredProps,
|
|
76
|
+
...testOptionalProps,
|
|
77
|
+
...testCompleteDefaults
|
|
78
|
+
};
|
|
79
|
+
const testInternalPropsAsSyntax = {
|
|
80
|
+
...testRequiredProps,
|
|
81
|
+
...testOptionalProps,
|
|
82
|
+
...testCompleteDefaults
|
|
83
|
+
};
|
|
84
|
+
const testExplicitDefinition = {
|
|
85
|
+
isOpen: false,
|
|
86
|
+
centered: false,
|
|
87
|
+
fullWidth: false,
|
|
88
|
+
fadeOut: 1500,
|
|
89
|
+
fadeIn: 1500,
|
|
90
|
+
overrideHeight: false,
|
|
91
|
+
getContainer: () => ref.current,
|
|
92
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
import__.ModalFooter,
|
|
94
|
+
{
|
|
95
|
+
onConfirm: () => {
|
|
96
|
+
},
|
|
97
|
+
confirmProps: { disabled: false },
|
|
98
|
+
confirmLabel: "",
|
|
99
|
+
onReject: () => {
|
|
100
|
+
},
|
|
101
|
+
rejectProps: { disabled: false },
|
|
102
|
+
rejectLabel: ""
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ModalHeader, { title: "", onClose: () => {
|
|
106
|
+
}, toolbar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {}) }),
|
|
107
|
+
innerRef: ref,
|
|
108
|
+
children: "content"
|
|
109
|
+
};
|
|
110
|
+
const testInferedTypeCompatibility = {
|
|
111
|
+
isOpen: false,
|
|
112
|
+
centered: false,
|
|
113
|
+
fullWidth: false,
|
|
114
|
+
fadeOut: 1500,
|
|
115
|
+
fadeIn: 1500,
|
|
116
|
+
overrideHeight: false,
|
|
117
|
+
getContainer: () => ref.current,
|
|
118
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
119
|
+
import__.ModalFooter,
|
|
120
|
+
{
|
|
121
|
+
onConfirm: () => {
|
|
122
|
+
},
|
|
123
|
+
confirmProps: { disabled: false },
|
|
124
|
+
confirmLabel: "",
|
|
125
|
+
onReject: () => {
|
|
126
|
+
},
|
|
127
|
+
rejectProps: { disabled: false },
|
|
128
|
+
rejectLabel: ""
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ModalHeader, { title: "", onClose: () => {
|
|
132
|
+
}, toolbar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {}) }),
|
|
133
|
+
innerRef: ref,
|
|
134
|
+
children: "content"
|
|
135
|
+
};
|
|
136
|
+
const testDefinitionAsConst = {
|
|
137
|
+
isOpen: false,
|
|
138
|
+
centered: false,
|
|
139
|
+
fullWidth: false,
|
|
140
|
+
fadeOut: 1500,
|
|
141
|
+
fadeIn: 1500,
|
|
142
|
+
overrideHeight: false,
|
|
143
|
+
getContainer: () => ref.current,
|
|
144
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
145
|
+
import__.ModalFooter,
|
|
146
|
+
{
|
|
147
|
+
onConfirm: () => {
|
|
148
|
+
},
|
|
149
|
+
confirmProps: { disabled: false },
|
|
150
|
+
confirmLabel: "",
|
|
151
|
+
onReject: () => {
|
|
152
|
+
},
|
|
153
|
+
rejectProps: { disabled: false },
|
|
154
|
+
rejectLabel: ""
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ModalHeader, { title: "", onClose: () => {
|
|
158
|
+
}, toolbar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {}) }),
|
|
159
|
+
innerRef: ref,
|
|
160
|
+
children: "content"
|
|
161
|
+
};
|
|
162
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSModalSlide, { ...testExplicitDefinition }),
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSModalSlide, { ...testInferedTypeCompatibility }),
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSModalSlide, { ...testDefinitionAsConst }),
|
|
166
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
167
|
+
import__.DSModalSlide,
|
|
168
|
+
{
|
|
169
|
+
isOpen: false,
|
|
170
|
+
centered: false,
|
|
171
|
+
fullWidth: false,
|
|
172
|
+
fadeOut: 1500,
|
|
173
|
+
fadeIn: 1500,
|
|
174
|
+
overrideHeight: false,
|
|
175
|
+
getContainer: () => ref.current,
|
|
176
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
177
|
+
import__.ModalFooter,
|
|
178
|
+
{
|
|
179
|
+
onConfirm: () => {
|
|
180
|
+
},
|
|
181
|
+
confirmProps: { disabled: false },
|
|
182
|
+
confirmLabel: "",
|
|
183
|
+
onReject: () => {
|
|
184
|
+
},
|
|
185
|
+
rejectProps: { disabled: false },
|
|
186
|
+
rejectLabel: ""
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ModalHeader, { title: "", onClose: () => {
|
|
190
|
+
}, toolbar: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {}) }),
|
|
191
|
+
innerRef: ref,
|
|
192
|
+
children: "content"
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] });
|
|
196
|
+
//# sourceMappingURL=typescript-modal-slide-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-modal-slide-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\nimport { DSModalSlide, ModalHeader, ModalFooter } from '../index.js';\nimport type { DSModalSlideT } from '../index.js';\nimport { disabled } from '@elliemae/ds-system';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSModalSlideT.Props;\ntype ComponentPropsInternals = DSModalSlideT.InternalProps;\ntype ComponentPropsDefaultProps = DSModalSlideT.DefaultProps;\ntype ComponentPropsOptionalProps = DSModalSlideT.OptionalProps;\ntype ComponentPropsRequiredProps = DSModalSlideT.RequiredProps;\n\nconst ref = React.createRef() as React.MutableRefObject<HTMLDivElement>;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n getContainer: () => ref.current,\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n fadeIn: 1000,\n fadeOut: 2000,\n isOpen: true,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n getContainer: () => ref.current,\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n getContainer: () => ref.current,\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n getContainer: () => ref.current,\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSModalSlide {...testExplicitDefinition} />\n <DSModalSlide {...testInferedTypeCompatibility} />\n <DSModalSlide {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSModalSlide\n isOpen={false}\n centered={false}\n fullWidth={false}\n fadeOut={1500}\n fadeIn={1500}\n overrideHeight={false}\n getContainer={() => ref.current}\n footer={\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n }\n header={<ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />}\n innerRef={ref}\n children={'content'}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACqBnB;AApBJ,mBAAkB;AAClB,eAAuD;AAWvD,MAAM,MAAM,aAAAA,QAAM,UAAU;AAE5B,MAAM,oBAAiD;AAAA,EACrD,cAAc,MAAM,IAAI;AAC1B;AAEA,MAAM,oBAAiD;AAAA,EACrD,QACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,MAAM;AAAA,MAAC;AAAA,MAClB,cAAc,EAAE,UAAU,MAAM;AAAA,MAChC,cAAa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4CAAC,yBAAc,GAAG,uBAAuB;AAAA,EAEzC;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,WAAW;AAAA,MACX,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,cAAc,MAAM,IAAI;AAAA,MACxB,QACE;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,MAAM;AAAA,UAAC;AAAA,UAClB,cAAc,EAAE,UAAU,MAAM;AAAA,UAChC,cAAa;AAAA,UACb,UAAU,MAAM;AAAA,UAAC;AAAA,UACjB,aAAa,EAAE,UAAU,MAAM;AAAA,UAC/B,aAAY;AAAA;AAAA,MACd;AAAA,MAEF,QAAQ,4CAAC,wBAAY,OAAM,IAAG,SAAS,MAAM;AAAA,MAAC,GAAG,SAAS,2EAAE,GAAK;AAAA,MACjE,UAAU;AAAA,MACV,UAAU;AAAA;AAAA,EACZ;AAAA,GACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSModalSlide.tsx"],
|
|
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 = (props
|
|
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,
|
|
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 role=\"contentinfo\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledActualContent\n className=\"em-ds-modal-slide__actual-content\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {children}\n </StyledActualContent>\n </StyledContentWrapper>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </StyledGridContent>\n </StyledContent>\n </StyledOverlay>\n </StyledModalWrapper>\n </ModalSlideAnimationFix>,\n container,\n );\n};\n\nDSModalSlide.displayName = DSModalSlideName;\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = DSModalSlidePropTypesSchema;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n"],
|
|
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,OAAO,YAAY;AACtG,QAAM,EAAE,QAAQ,UAAU,cAAc,WAAW,QAAQ,QAAQ,SAAS,QAAQ,gBAAgB,SAAS,IAC3G;AACF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S,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,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { getPropsPerDatatestIdPropTypes } from '@elliemae/ds-utilities';\nimport { DSModalSlideDataTestIds } from './DSModalSlideDefinitions.js';\n\nexport declare namespace DSModalSlideT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface RequiredProps {\n getContainer: () => HTMLElement;\n }\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n fullWidth: boolean;\n fadeOut: number;\n fadeIn: number;\n overrideHeight: boolean;\n }\n\n export interface OptionalProps {\n header
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,2BAA2B,wBAAwB;AACvE,SAAS,sCAAsC;AAC/C,SAAS,+BAA+B;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { getPropsPerDatatestIdPropTypes } from '@elliemae/ds-utilities';\nimport { DSModalSlideDataTestIds } from './DSModalSlideDefinitions.js';\n\nexport declare namespace DSModalSlideT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface RequiredProps {\n getContainer: () => HTMLElement;\n }\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n fullWidth: boolean;\n fadeOut: number;\n fadeIn: number;\n overrideHeight: boolean;\n }\n\n export interface OptionalProps {\n header?: JSX.Element;\n footer?: React.ReactNode;\n children?: React.ReactNode;\n innerRef?: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;\n }\n\n export interface FooterRequiredProps {}\n\n export interface FooterDefaultProps {\n confirmLabel: string;\n rejectLabel: string;\n confirmProps: {\n disabled: boolean;\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;\n };\n rejectProps: { disabled: boolean };\n }\n\n export interface FooterOptionalProps {\n onConfirm: () => void;\n onReject: () => void;\n }\n\n export interface HeaderRequiredProps {}\n\n export interface HeaderDefaultProps {\n title: string;\n onClose: () => void;\n }\n\n export interface HeaderOptionalProps {\n toolbar?: React.ReactNode;\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;\n }\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLElement>;\n\n export type HeaderProps = PropsT<HeaderDefaultProps, HeaderRequiredProps, HeaderOptionalProps, HTMLButtonElement>;\n\n export type HeaderInternalProps = InternalPropsT<\n HeaderDefaultProps,\n HeaderRequiredProps,\n HeaderOptionalProps,\n HTMLButtonElement\n >;\n\n export type FooterProps = PropsT<FooterDefaultProps, FooterRequiredProps, FooterOptionalProps, HTMLDivElement>;\n\n export type FooterInternalProps = InternalPropsT<\n FooterDefaultProps,\n FooterRequiredProps,\n FooterOptionalProps,\n HTMLDivElement\n >;\n}\n\nexport const defaultProps: DSModalSlideT.DefaultProps = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n};\n\nexport const headerDefaultProps: DSModalSlideT.HeaderDefaultProps = {\n title: '',\n onClose: () => null,\n};\n\nexport const footerDefaultProps: DSModalSlideT.FooterDefaultProps = {\n confirmLabel: 'Confirm',\n rejectLabel: 'Cancel',\n confirmProps: { disabled: false },\n rejectProps: { disabled: false },\n};\n\nexport const DSModalSlidePropTypes: DSPropTypesSchema<DSModalSlideT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\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.node]).isRequired.description('Main content of the modal'),\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 * If the modal slide has a footer\n */\n footer: PropTypes.element.description('If the modal slide has a footer'),\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 getContainer: PropTypes.func.description('Should return the container of the modal slide').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the modal slide'),\n};\n\nexport const DSModalSlidePropTypesSchema =\n DSModalSlidePropTypes as unknown as React.WeakValidationMap<DSModalSlideT.Props>;\n\nexport const DSModalSlideHeaderPropTypes: DSPropTypesSchema<DSModalSlideT.HeaderProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.description('modal title'),\n onClose: PropTypes.func.description('on modal close callback'),\n toolbar: PropTypes.node.description('modal toolbar comoponent'),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the modal slide'),\n};\n\nexport const DSModalSlideHeaderPropTypesSchema =\n DSModalSlideHeaderPropTypes as unknown as React.WeakValidationMap<DSModalSlideT.HeaderProps>;\n\nexport const DSModalSlideFooterPropTypes: DSPropTypesSchema<DSModalSlideT.FooterProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\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 ...getPropsPerDatatestIdPropTypes(DSModalSlideDataTestIds),\n};\n\nexport const DSModalSlideFooterPropTypesSchema =\n DSModalSlideFooterPropTypes as unknown as React.WeakValidationMap<DSModalSlideT.FooterProps>;\n"],
|
|
5
|
+
"mappings": "AAAA,Y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wB;AACxG;AAEO,MAAM,8BACX;AAEK,MAAM,8BAA4E;AAAA,EACvF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,YAAY,aAAa;AAAA,EACjD,SAAS,UAAU,KAAK,YAAY,yBAAyB;AAAA,EAC7D,SAAS,UAAU,KAAK,YAAY,0BAA0B;AAAA,EAC9D,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,EAAE,YAAY,wBAAwB;AACxG;AAEO,MAAM,oCACX;AAEK,MAAM,8BAA4E;AAAA,EACvF,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,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;AAAA,EACrD,GAAG,+BAA+B,uBAAuB;AAC3D;AAEO,MAAM,oCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -103,7 +103,10 @@ const StyledGridContent = styled(Grid)`
|
|
|
103
103
|
-webkit-transform-style: preserve-3d;
|
|
104
104
|
transform-style: preserve-3d;
|
|
105
105
|
`;
|
|
106
|
-
const StyledTitle = styled("div", { name: DSModalSlideName, slot: DSModalSlideSlots.TITLE })
|
|
106
|
+
const StyledTitle = styled("div", { name: DSModalSlideName, slot: DSModalSlideSlots.TITLE })`
|
|
107
|
+
font-size: 1.3846rem;
|
|
108
|
+
color: neutral-700;
|
|
109
|
+
`;
|
|
107
110
|
const StyledHeaderLeftSide = styled("div", { name: DSModalSlideName, slot: DSModalSlideSlots.HEADER_LEFT_SIDE })`
|
|
108
111
|
width: 100%;
|
|
109
112
|
display: flex;
|
|
@@ -130,11 +133,6 @@ const StyledHeader = styled("div", { name: DSModalSlideName, slot: DSModalSlideS
|
|
|
130
133
|
display: flex;
|
|
131
134
|
flex-direction: column;
|
|
132
135
|
justify-content: center;
|
|
133
|
-
|
|
134
|
-
${StyledTitle} {
|
|
135
|
-
font-size: 1.3846rem;
|
|
136
|
-
color: neutral-700;
|
|
137
|
-
}
|
|
138
136
|
`;
|
|
139
137
|
const StyledFooter = styled("div", { name: DSModalSlideName, slot: DSModalSlideSlots.FOOTER })``;
|
|
140
138
|
const StyledFooterWrapper = styled("div", { name: DSModalSlideName, slot: DSModalSlideSlots.FOOTER_WRAPPER })`
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
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 })
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,qBAAqB;AAC9B,SAAS,QAAQ,YAAY;AAC7B,SAAS,kBAAkB,yBAAyB;AAEpD,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASzB,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5B,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASpB,MAAM,qBAAqB,OAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA,iBAGgB,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkB3B,MAAM,gBAAgB,OAAO,OAAO;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,eAKc,CAAC,UAAW,MAAM,eAAe,sBAAsB;AAAA,WAC3D,CAAC,UAAW,MAAM,eAAe,MAAM,UAAU,MAAM;AAAA;AAAA,IAE9D,CAAC,UACD,MAAM,WACN;AAAA;AAAA;AAIG,MAAM,gBAAgB,OAAO,OAAO,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,QAAQ,CAAC;AAAA,iBAOrF,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKlB,CAAC,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAQlB,CAAC,UAAW,MAAM,eAAe,sBAAsB;AAAA,WAC3D,CAAC,UAAW,MAAM,eAAe,MAAM,UAAU,IAAI,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAMxE,MAAM,oBAAoB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWrC,MAAM,cAAc,OAAO,OAAO,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,MAAM,CAAC;
|
|
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`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A;AAGlC,MAAM,uBAAuB,OAAO,MAAM,EAAE,MAAM,kBAAkB,MAAM,kBAAkB,gBAAgB,CAAC;AAAA;AAAA;AAAA;AAAA,yBAI3F,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,KAAK;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React2 from "react";
|
|
4
|
+
import { DSModalSlide, ModalHeader, ModalFooter } from "../index.js";
|
|
5
|
+
const ref = React2.createRef();
|
|
6
|
+
const testRequiredProps = {
|
|
7
|
+
getContainer: () => ref.current
|
|
8
|
+
};
|
|
9
|
+
const testOptionalProps = {
|
|
10
|
+
footer: /* @__PURE__ */ jsx(
|
|
11
|
+
ModalFooter,
|
|
12
|
+
{
|
|
13
|
+
onConfirm: () => {
|
|
14
|
+
},
|
|
15
|
+
confirmProps: { disabled: false },
|
|
16
|
+
confirmLabel: "",
|
|
17
|
+
onReject: () => {
|
|
18
|
+
},
|
|
19
|
+
rejectProps: { disabled: false },
|
|
20
|
+
rejectLabel: ""
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
header: /* @__PURE__ */ jsx(ModalHeader, { title: "", onClose: () => {
|
|
24
|
+
}, toolbar: /* @__PURE__ */ jsx(Fragment, {}) }),
|
|
25
|
+
innerRef: ref,
|
|
26
|
+
children: "content"
|
|
27
|
+
};
|
|
28
|
+
const testPartialDefaults = {
|
|
29
|
+
fadeIn: 1e3,
|
|
30
|
+
fadeOut: 2e3,
|
|
31
|
+
isOpen: true
|
|
32
|
+
};
|
|
33
|
+
const testProps = {
|
|
34
|
+
...testRequiredProps,
|
|
35
|
+
...testOptionalProps,
|
|
36
|
+
...testPartialDefaults
|
|
37
|
+
};
|
|
38
|
+
const testPropsAsSyntax = {
|
|
39
|
+
...testRequiredProps,
|
|
40
|
+
...testOptionalProps,
|
|
41
|
+
...testPartialDefaults
|
|
42
|
+
};
|
|
43
|
+
const testCompleteDefaults = {
|
|
44
|
+
isOpen: false,
|
|
45
|
+
centered: false,
|
|
46
|
+
fullWidth: false,
|
|
47
|
+
fadeOut: 1500,
|
|
48
|
+
fadeIn: 1500,
|
|
49
|
+
overrideHeight: false
|
|
50
|
+
};
|
|
51
|
+
const testInternalProps = {
|
|
52
|
+
...testRequiredProps,
|
|
53
|
+
...testOptionalProps,
|
|
54
|
+
...testCompleteDefaults
|
|
55
|
+
};
|
|
56
|
+
const testInternalPropsAsSyntax = {
|
|
57
|
+
...testRequiredProps,
|
|
58
|
+
...testOptionalProps,
|
|
59
|
+
...testCompleteDefaults
|
|
60
|
+
};
|
|
61
|
+
const testExplicitDefinition = {
|
|
62
|
+
isOpen: false,
|
|
63
|
+
centered: false,
|
|
64
|
+
fullWidth: false,
|
|
65
|
+
fadeOut: 1500,
|
|
66
|
+
fadeIn: 1500,
|
|
67
|
+
overrideHeight: false,
|
|
68
|
+
getContainer: () => ref.current,
|
|
69
|
+
footer: /* @__PURE__ */ jsx(
|
|
70
|
+
ModalFooter,
|
|
71
|
+
{
|
|
72
|
+
onConfirm: () => {
|
|
73
|
+
},
|
|
74
|
+
confirmProps: { disabled: false },
|
|
75
|
+
confirmLabel: "",
|
|
76
|
+
onReject: () => {
|
|
77
|
+
},
|
|
78
|
+
rejectProps: { disabled: false },
|
|
79
|
+
rejectLabel: ""
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
header: /* @__PURE__ */ jsx(ModalHeader, { title: "", onClose: () => {
|
|
83
|
+
}, toolbar: /* @__PURE__ */ jsx(Fragment, {}) }),
|
|
84
|
+
innerRef: ref,
|
|
85
|
+
children: "content"
|
|
86
|
+
};
|
|
87
|
+
const testInferedTypeCompatibility = {
|
|
88
|
+
isOpen: false,
|
|
89
|
+
centered: false,
|
|
90
|
+
fullWidth: false,
|
|
91
|
+
fadeOut: 1500,
|
|
92
|
+
fadeIn: 1500,
|
|
93
|
+
overrideHeight: false,
|
|
94
|
+
getContainer: () => ref.current,
|
|
95
|
+
footer: /* @__PURE__ */ jsx(
|
|
96
|
+
ModalFooter,
|
|
97
|
+
{
|
|
98
|
+
onConfirm: () => {
|
|
99
|
+
},
|
|
100
|
+
confirmProps: { disabled: false },
|
|
101
|
+
confirmLabel: "",
|
|
102
|
+
onReject: () => {
|
|
103
|
+
},
|
|
104
|
+
rejectProps: { disabled: false },
|
|
105
|
+
rejectLabel: ""
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
header: /* @__PURE__ */ jsx(ModalHeader, { title: "", onClose: () => {
|
|
109
|
+
}, toolbar: /* @__PURE__ */ jsx(Fragment, {}) }),
|
|
110
|
+
innerRef: ref,
|
|
111
|
+
children: "content"
|
|
112
|
+
};
|
|
113
|
+
const testDefinitionAsConst = {
|
|
114
|
+
isOpen: false,
|
|
115
|
+
centered: false,
|
|
116
|
+
fullWidth: false,
|
|
117
|
+
fadeOut: 1500,
|
|
118
|
+
fadeIn: 1500,
|
|
119
|
+
overrideHeight: false,
|
|
120
|
+
getContainer: () => ref.current,
|
|
121
|
+
footer: /* @__PURE__ */ jsx(
|
|
122
|
+
ModalFooter,
|
|
123
|
+
{
|
|
124
|
+
onConfirm: () => {
|
|
125
|
+
},
|
|
126
|
+
confirmProps: { disabled: false },
|
|
127
|
+
confirmLabel: "",
|
|
128
|
+
onReject: () => {
|
|
129
|
+
},
|
|
130
|
+
rejectProps: { disabled: false },
|
|
131
|
+
rejectLabel: ""
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
header: /* @__PURE__ */ jsx(ModalHeader, { title: "", onClose: () => {
|
|
135
|
+
}, toolbar: /* @__PURE__ */ jsx(Fragment, {}) }),
|
|
136
|
+
innerRef: ref,
|
|
137
|
+
children: "content"
|
|
138
|
+
};
|
|
139
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
140
|
+
/* @__PURE__ */ jsx(DSModalSlide, { ...testExplicitDefinition }),
|
|
141
|
+
/* @__PURE__ */ jsx(DSModalSlide, { ...testInferedTypeCompatibility }),
|
|
142
|
+
/* @__PURE__ */ jsx(DSModalSlide, { ...testDefinitionAsConst }),
|
|
143
|
+
/* @__PURE__ */ jsx(
|
|
144
|
+
DSModalSlide,
|
|
145
|
+
{
|
|
146
|
+
isOpen: false,
|
|
147
|
+
centered: false,
|
|
148
|
+
fullWidth: false,
|
|
149
|
+
fadeOut: 1500,
|
|
150
|
+
fadeIn: 1500,
|
|
151
|
+
overrideHeight: false,
|
|
152
|
+
getContainer: () => ref.current,
|
|
153
|
+
footer: /* @__PURE__ */ jsx(
|
|
154
|
+
ModalFooter,
|
|
155
|
+
{
|
|
156
|
+
onConfirm: () => {
|
|
157
|
+
},
|
|
158
|
+
confirmProps: { disabled: false },
|
|
159
|
+
confirmLabel: "",
|
|
160
|
+
onReject: () => {
|
|
161
|
+
},
|
|
162
|
+
rejectProps: { disabled: false },
|
|
163
|
+
rejectLabel: ""
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
header: /* @__PURE__ */ jsx(ModalHeader, { title: "", onClose: () => {
|
|
167
|
+
}, toolbar: /* @__PURE__ */ jsx(Fragment, {}) }),
|
|
168
|
+
innerRef: ref,
|
|
169
|
+
children: "content"
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
] });
|
|
173
|
+
//# sourceMappingURL=typescript-modal-slide-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-modal-slide-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\nimport { DSModalSlide, ModalHeader, ModalFooter } from '../index.js';\nimport type { DSModalSlideT } from '../index.js';\nimport { disabled } from '@elliemae/ds-system';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSModalSlideT.Props;\ntype ComponentPropsInternals = DSModalSlideT.InternalProps;\ntype ComponentPropsDefaultProps = DSModalSlideT.DefaultProps;\ntype ComponentPropsOptionalProps = DSModalSlideT.OptionalProps;\ntype ComponentPropsRequiredProps = DSModalSlideT.RequiredProps;\n\nconst ref = React.createRef() as React.MutableRefObject<HTMLDivElement>;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n getContainer: () => ref.current,\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n fadeIn: 1000,\n fadeOut: 2000,\n isOpen: true,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n getContainer: () => ref.current,\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n getContainer: () => ref.current,\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isOpen: false,\n centered: false,\n fullWidth: false,\n fadeOut: 1500,\n fadeIn: 1500,\n overrideHeight: false,\n getContainer: () => ref.current,\n footer: (\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n ),\n header: <ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />,\n innerRef: ref,\n children: 'content',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSModalSlide {...testExplicitDefinition} />\n <DSModalSlide {...testInferedTypeCompatibility} />\n <DSModalSlide {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSModalSlide\n isOpen={false}\n centered={false}\n fullWidth={false}\n fadeOut={1500}\n fadeIn={1500}\n overrideHeight={false}\n getContainer={() => ref.current}\n footer={\n <ModalFooter\n onConfirm={() => {}}\n confirmProps={{ disabled: false }}\n confirmLabel=\"\"\n onReject={() => {}}\n rejectProps={{ disabled: false }}\n rejectLabel=\"\"\n />\n }\n header={<ModalHeader title=\"\" onClose={() => {}} toolbar={<></>} />}\n innerRef={ref}\n children={'content'}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqBnB,SASwD,UATxD,KAgIF,YAhIE;AApBJ,OAAOA,YAAW;AAClB,SAAS,cAAc,aAAa,mBAAmB;AAWvD,MAAM,MAAMA,OAAM,UAAU;AAE5B,MAAM,oBAAiD;AAAA,EACrD,cAAc,MAAM,IAAI;AAC1B;AAEA,MAAM,oBAAiD;AAAA,EACrD,QACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,MAAM;AAAA,MAAC;AAAA,MAClB,cAAc,EAAE,UAAU,MAAM;AAAA,MAChC,cAAa;AAAA,MACb,UAAU,MAAM;AAAA,MAAC;AAAA,MACjB,aAAa,EAAE,UAAU,MAAM;AAAA,MAC/B,aAAY;AAAA;AAAA,EACd;AAAA,EAEF,QAAQ,oBAAC,eAAY,OAAM,IAAG,SAAS,MAAM;AAAA,EAAC,GAAG,SAAS,gCAAE,GAAK;AAAA,EACjE,UAAU;AAAA,EACV,UAAU;AACZ;AAIA,MAAM,sBAA2D;AAAA,EAC/D,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AACV;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,gBAAgB;AAClB;AAEA,MAAM,oBAA6C;A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10 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import ModalHeader from './components/Header.js';
|
|
3
3
|
import ModalFooter from './components/Footer.js';
|
|
4
4
|
import { type DSModalSlideT } from './react-desc-prop-types.js';
|
|
5
|
-
declare const DSModalSlide:
|
|
6
|
-
(props: DSModalSlideT.Props): React.ReactPortal | null;
|
|
7
|
-
displayName: string;
|
|
8
|
-
};
|
|
5
|
+
declare const DSModalSlide: React.FC<DSModalSlideT.Props>;
|
|
9
6
|
declare const DSModalSlideWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSModalSlideT.Props>;
|
|
10
7
|
export { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };
|
|
11
8
|
export default DSModalSlide;
|
|
@@ -15,8 +15,8 @@ export declare namespace DSModalSlideT {
|
|
|
15
15
|
overrideHeight: boolean;
|
|
16
16
|
}
|
|
17
17
|
interface OptionalProps {
|
|
18
|
-
header
|
|
19
|
-
footer
|
|
18
|
+
header?: JSX.Element;
|
|
19
|
+
footer?: React.ReactNode;
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
innerRef?: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;
|
|
22
22
|
}
|
|
@@ -27,6 +27,7 @@ export declare namespace DSModalSlideT {
|
|
|
27
27
|
rejectLabel: string;
|
|
28
28
|
confirmProps: {
|
|
29
29
|
disabled: boolean;
|
|
30
|
+
innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;
|
|
30
31
|
};
|
|
31
32
|
rejectProps: {
|
|
32
33
|
disabled: boolean;
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -19,16 +19,7 @@ export declare const StyledGridContent: import("styled-components").StyledCompon
|
|
|
19
19
|
export declare const StyledTitle: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
20
20
|
export declare const StyledHeaderLeftSide: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
21
21
|
export declare const StyledActualContent: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
22
|
-
export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme,
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
[x: number]: any;
|
|
25
|
-
[x: symbol]: any;
|
|
26
|
-
} & {
|
|
27
|
-
theme?: import("@elliemae/ds-system").Theme | undefined;
|
|
28
|
-
} & {
|
|
29
|
-
as?: string | import("react").ComponentType<any> | undefined;
|
|
30
|
-
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
31
|
-
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
22
|
+
export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
32
23
|
export declare const StyledFooter: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
33
24
|
export declare const StyledFooterWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
34
25
|
export declare const HeaderWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-modal-slide",
|
|
3
|
-
"version": "3.33.0-next.
|
|
3
|
+
"version": "3.33.0-next.4",
|
|
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.33.0-next.
|
|
55
|
-
"@elliemae/ds-classnames": "3.33.0-next.
|
|
56
|
-
"@elliemae/ds-grid": "3.33.0-next.
|
|
57
|
-
"@elliemae/ds-icons": "3.33.0-next.
|
|
58
|
-
"@elliemae/ds-props-helpers": "3.33.0-next.
|
|
59
|
-
"@elliemae/ds-
|
|
60
|
-
"@elliemae/ds-
|
|
54
|
+
"@elliemae/ds-button-v2": "3.33.0-next.4",
|
|
55
|
+
"@elliemae/ds-classnames": "3.33.0-next.4",
|
|
56
|
+
"@elliemae/ds-grid": "3.33.0-next.4",
|
|
57
|
+
"@elliemae/ds-icons": "3.33.0-next.4",
|
|
58
|
+
"@elliemae/ds-props-helpers": "3.33.0-next.4",
|
|
59
|
+
"@elliemae/ds-system": "3.33.0-next.4",
|
|
60
|
+
"@elliemae/ds-separator": "3.33.0-next.4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
64
64
|
"styled-components": "~5.3.9",
|
|
65
|
-
"@elliemae/ds-monorepo-devops": "3.33.0-next.
|
|
66
|
-
"@elliemae/ds-utilities": "3.33.0-next.
|
|
65
|
+
"@elliemae/ds-monorepo-devops": "3.33.0-next.4",
|
|
66
|
+
"@elliemae/ds-utilities": "3.33.0-next.4"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"lodash": "~4.17.21",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public",
|
|
76
|
-
"typeSafety":
|
|
76
|
+
"typeSafety": true
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|