@elliemae/ds-modal-slide 3.70.0-next.1 → 3.70.0-next.3
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 +45 -22
- package/dist/cjs/DSModalSlide.js.map +2 -2
- package/dist/cjs/constants/index.js +7 -3
- package/dist/cjs/constants/index.js.map +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/parts/DSModalFooter/react-desc-prop-types.js +2 -2
- package/dist/cjs/parts/DSModalFooter/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSModalFooter/typescript-testing/slot-props.js +36 -0
- package/dist/cjs/parts/DSModalFooter/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/parts/DSModalHeader/DSModalHeader.js +10 -3
- package/dist/cjs/parts/DSModalHeader/DSModalHeader.js.map +2 -2
- package/dist/cjs/parts/DSModalHeader/constants/index.js +2 -0
- package/dist/cjs/parts/DSModalHeader/constants/index.js.map +2 -2
- package/dist/cjs/parts/DSModalHeader/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSModalHeader/typescript-testing/slot-props.js +42 -0
- package/dist/cjs/parts/DSModalHeader/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +2 -0
- package/dist/cjs/react-desc-prop-types.js.map +3 -3
- package/dist/cjs/styled.js +20 -4
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +46 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/DSModalSlide.js +49 -24
- package/dist/esm/DSModalSlide.js.map +2 -2
- package/dist/esm/constants/index.js +7 -3
- package/dist/esm/constants/index.js.map +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/parts/DSModalFooter/react-desc-prop-types.js +4 -4
- package/dist/esm/parts/DSModalFooter/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSModalFooter/typescript-testing/slot-props.js +13 -0
- package/dist/esm/parts/DSModalFooter/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/parts/DSModalHeader/DSModalHeader.js +11 -4
- package/dist/esm/parts/DSModalHeader/DSModalHeader.js.map +2 -2
- package/dist/esm/parts/DSModalHeader/constants/index.js +2 -0
- package/dist/esm/parts/DSModalHeader/constants/index.js.map +2 -2
- package/dist/esm/parts/DSModalHeader/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSModalHeader/typescript-testing/slot-props.js +19 -0
- package/dist/esm/parts/DSModalHeader/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +8 -1
- package/dist/esm/react-desc-prop-types.js.map +3 -3
- package/dist/esm/styled.js +20 -4
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +23 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/types/constants/index.d.ts +16 -12
- package/dist/types/parts/DSModalFooter/react-desc-prop-types.d.ts +8 -1
- package/dist/types/parts/DSModalHeader/constants/index.d.ts +2 -0
- package/dist/types/parts/DSModalHeader/react-desc-prop-types.d.ts +8 -0
- package/dist/types/react-desc-prop-types.d.ts +16 -2
- package/dist/types/styled.d.ts +15 -1
- package/dist/types/tests/DSModalSlide.a11y.test.d.ts +1 -0
- package/dist/types/tests/DSModalSlide.api.test.d.ts +1 -0
- package/dist/types/tests/DSModalSlide.data-testid.test.d.ts +1 -0
- package/dist/types/tests/DSModalSlide.events.test.d.ts +1 -0
- package/dist/types/tests/DSModalSlide.exports.test.d.ts +1 -0
- package/dist/types/tests/DSModalSlide.get-owner-props-arguments.test.d.ts +1 -0
- package/dist/types/tests/DSModalSlide.keyboard.test.d.ts +1 -0
- package/dist/types/typescript-testing/slot-props.d.ts +1 -0
- package/package.json +9 -9
- /package/dist/types/{tests/DSModalSLide.axe.test.d.ts → parts/DSModalFooter/typescript-testing/slot-props.d.ts} +0 -0
- /package/dist/types/{tests/DSModalSlide.test.d.ts → parts/DSModalHeader/typescript-testing/slot-props.d.ts} +0 -0
package/dist/cjs/DSModalSlide.js
CHANGED
|
@@ -44,7 +44,6 @@ var import_uid = require("uid");
|
|
|
44
44
|
var import_react_dom = __toESM(require("react-dom"));
|
|
45
45
|
var import_ds_system = require("@elliemae/ds-system");
|
|
46
46
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
47
|
-
var import_ds_separator = require("@elliemae/ds-separator");
|
|
48
47
|
var import_DSModalHeader = require("./parts/DSModalHeader/index.js");
|
|
49
48
|
var import_DSModalFooter = require("./parts/DSModalFooter/index.js");
|
|
50
49
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
@@ -121,6 +120,7 @@ const DSModalSlide = (props) => {
|
|
|
121
120
|
setMoving(false);
|
|
122
121
|
if (!isOpen) setShow(isOpen);
|
|
123
122
|
};
|
|
123
|
+
const modalLabelledBy = header ? modalTitleId : void 0;
|
|
124
124
|
return import_react_dom.default.createPortal(
|
|
125
125
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalSlideAnimationFix, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
126
|
import_styled.StyledModalWrapper,
|
|
@@ -152,33 +152,56 @@ const DSModalSlide = (props) => {
|
|
|
152
152
|
disappearing: !isOpen,
|
|
153
153
|
role: "dialog",
|
|
154
154
|
"aria-modal": "true",
|
|
155
|
-
"aria-labelledby":
|
|
155
|
+
"aria-labelledby": modalLabelledBy,
|
|
156
156
|
getOwnerProps,
|
|
157
157
|
getOwnerPropsArguments,
|
|
158
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
import_styled.
|
|
158
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
159
|
+
import_styled.StyledGridContent,
|
|
160
|
+
{
|
|
161
|
+
rows: contentRows,
|
|
162
|
+
"data-testid": import_constants.MODAL_SLIDE_DATA_TESTID.GRID_CONTENT,
|
|
163
|
+
getOwnerProps,
|
|
164
|
+
getOwnerPropsArguments,
|
|
165
|
+
children: [
|
|
166
|
+
header && import_react.default.cloneElement(header, { fullWidth, modalTitleId }),
|
|
167
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
168
|
+
import_styled.StyledHeaderSeparator,
|
|
169
169
|
{
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
colorType: "light",
|
|
171
|
+
getOwnerProps,
|
|
172
|
+
getOwnerPropsArguments
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { style: { overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
176
|
+
import_styled.StyledContentWrapper,
|
|
177
|
+
{
|
|
178
|
+
innerRef,
|
|
172
179
|
getOwnerProps,
|
|
173
180
|
getOwnerPropsArguments,
|
|
174
|
-
children
|
|
181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
182
|
+
import_styled.StyledActualContent,
|
|
183
|
+
{
|
|
184
|
+
className: "em-ds-modal-slide__actual-content",
|
|
185
|
+
"aria-label": "Modal Slide Content",
|
|
186
|
+
getOwnerProps,
|
|
187
|
+
getOwnerPropsArguments,
|
|
188
|
+
children
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
) }),
|
|
193
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
194
|
+
import_styled.StyledFooterSeparator,
|
|
195
|
+
{
|
|
196
|
+
colorType: "light",
|
|
197
|
+
getOwnerProps,
|
|
198
|
+
getOwnerPropsArguments
|
|
175
199
|
}
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
] })
|
|
200
|
+
),
|
|
201
|
+
footer
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
)
|
|
182
205
|
}
|
|
183
206
|
)
|
|
184
207
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSModalSlide.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-statements */\nimport React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport {\n describe,\n useGetGlobalAttributes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { debounce } from 'lodash-es';\nimport { uid } from 'uid';\nimport ReactDOM from 'react-dom';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-statements, max-lines */\nimport React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport {\n describe,\n useGetGlobalAttributes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { debounce } from 'lodash-es';\nimport { uid } from 'uid';\nimport ReactDOM from 'react-dom';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ModalHeader } from './parts/DSModalHeader/index.js';\nimport { ModalFooter } from './parts/DSModalFooter/index.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 StyledHeaderSeparator,\n StyledFooterSeparator,\n} from './styled.js';\nimport { DSModalSlideName, MODAL_SLIDE_DATA_TESTID } from './constants/index.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`;\n// eslint-disable-next-line complexity\nconst DSModalSlide: React.FC<DSModalSlideT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSModalSlideT.InternalProps>(props, defaultProps);\n const {\n isOpen,\n children,\n getContainer,\n fullWidth,\n header,\n footer,\n fadeOut,\n fadeIn,\n overrideHeight,\n innerRef,\n onClose,\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 contentRows = [...(header ? ['auto', '1px'] : []), '1fr', ...(footer ? ['1px', 'auto'] : [])];\n const modalTitleId = React.useMemo(() => `ds-modal-slide-title-${uid(5)}`, []);\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') onClose();\n },\n [onClose],\n );\n\n const globalAttrs = useGetGlobalAttributes(props, { onKeyDown: handleOnKeyDown });\n\n const updateShow = useCallback(() => {\n if (fullWidth) setWidth(100);\n else setWidth(50);\n if (isOpen !== show) {\n setMoving(true);\n if (isOpen) {\n setShow(isOpen);\n }\n }\n }, [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 const modalLabelledBy = header ? modalTitleId : undefined;\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 role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={modalLabelledBy}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledGridContent\n rows={contentRows}\n data-testid={MODAL_SLIDE_DATA_TESTID.GRID_CONTENT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {header && React.cloneElement(header, { fullWidth, modalTitleId })}\n {header && (\n <StyledHeaderSeparator\n colorType=\"light\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n <Grid style={{ overflow: 'hidden' }}>\n <StyledContentWrapper\n innerRef={innerRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledActualContent\n className=\"em-ds-modal-slide__actual-content\"\n aria-label=\"Modal Slide Content\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {children}\n </StyledActualContent>\n </StyledContentWrapper>\n </Grid>\n {footer && (\n <StyledFooterSeparator\n colorType=\"light\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n {footer}\n </StyledGridContent>\n </StyledContent>\n </StyledOverlay>\n </StyledModalWrapper>\n </ModalSlideAnimationFix>,\n container,\n );\n};\n\nDSModalSlide.displayName = DSModalSlideName;\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = DSModalSlidePropTypesSchema;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["React", "ReactDOM"]
|
|
7
7
|
}
|
|
@@ -41,10 +41,14 @@ const MODAL_SLIDE_SLOTS = {
|
|
|
41
41
|
OVERLAY: "overlay",
|
|
42
42
|
CONTENT: "content",
|
|
43
43
|
ACTUAL_CONTENT: "actual-content",
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
HEADER_SEPARATOR: "header-separator",
|
|
45
|
+
FOOTER_SEPARATOR: "footer-separator",
|
|
46
|
+
CONTENT_WRAPPER: "content-wrapper",
|
|
47
|
+
GRID_CONTENT: "grid-content"
|
|
46
48
|
};
|
|
47
49
|
const MODAL_SLIDE_DATA_TESTID = {
|
|
48
|
-
...(0, import_ds_system.slotObjectToDataTestIds)(DSModalSlideName, MODAL_SLIDE_SLOTS)
|
|
50
|
+
...(0, import_ds_system.slotObjectToDataTestIds)(DSModalSlideName, MODAL_SLIDE_SLOTS),
|
|
51
|
+
// legacy data-testid
|
|
52
|
+
GRID_CONTENT: "ds-modal-slide"
|
|
49
53
|
};
|
|
50
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/constants/index.
|
|
4
|
-
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSModalSlideName = 'DSModalslide';\n\nexport const MODAL_SLIDE_SLOTS = {\n ROOT: 'root',\n OVERLAY: 'overlay',\n CONTENT: 'content',\n ACTUAL_CONTENT: 'actual-content',\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,mBAAmB;AAEzB,MAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSModalSlideName = 'DSModalslide';\n\nexport const MODAL_SLIDE_SLOTS = {\n ROOT: 'root',\n OVERLAY: 'overlay',\n CONTENT: 'content',\n ACTUAL_CONTENT: 'actual-content',\n HEADER_SEPARATOR: 'header-separator',\n FOOTER_SEPARATOR: 'footer-separator',\n CONTENT_WRAPPER: 'content-wrapper',\n GRID_CONTENT: 'grid-content',\n} as const;\n\nexport const MODAL_SLIDE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSModalSlideName, MODAL_SLIDE_SLOTS),\n // legacy data-testid\n GRID_CONTENT: 'ds-modal-slide',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,mBAAmB;AAEzB,MAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,cAAc;AAChB;AAEO,MAAM,0BAA0B;AAAA,EACrC,OAAG,0CAAwB,kBAAkB,iBAAiB;AAAA;AAAA,EAE9D,cAAc;AAChB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { DSModalSlide, DSModalSlideWithSchema } from './DSModalSlide.js';\nexport {\n DSModalHeader,\n DSModalHeaderWithSchema,\n DSModalHeader as ModalHeader,\n DSModalHeaderWithSchema as DSModalSlideHeaderWithSchema,\n DSModalHeaderName,\n MODAL_HEADER_DATA_TESTID,\n MODAL_HEADER_SLOTS,\n type DSModalHeaderT,\n} from './parts/DSModalHeader/index.js';\nexport {\n DSModalFooter,\n DSModalFooterWithSchema,\n DSModalFooter as ModalFooter,\n DSModalFooterWithSchema as DSModalSlideFooterWithSchema,\n DSModalFooterName,\n MODAL_FOOTER_DATA_TESTID,\n MODAL_FOOTER_SLOTS,\n type DSModalFooterT,\n} from './parts/DSModalFooter/index.js';\nexport type { DSModalSlideT } from './react-desc-prop-types.js';\nexport {\n MODAL_SLIDE_SLOTS,\n MODAL_SLIDE_DATA_TESTID,\n MODAL_SLIDE_DATA_TESTID as DSModalSlideDataTestIds,\n DSModalSlideName,\n} from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAqD;AACrD,2BASO;AACP,2BASO;AAEP,uBAKO;",
|
|
6
6
|
"names": []
|
|
@@ -43,6 +43,7 @@ const defaultProps = {
|
|
|
43
43
|
rejectProps: { disabled: false, applyAriaDisabled: false }
|
|
44
44
|
};
|
|
45
45
|
const DSModalFooterPropTypes = {
|
|
46
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSModalSlideName, import_constants.MODAL_FOOTER_SLOTS),
|
|
46
47
|
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
47
48
|
...import_ds_props_helpers.xstyledPropTypes,
|
|
48
49
|
confirmLabel: import_ds_props_helpers.PropTypes.string.description("Confirm Label"),
|
|
@@ -55,8 +56,7 @@ const DSModalFooterPropTypes = {
|
|
|
55
56
|
rejectProps: import_ds_props_helpers.PropTypes.shape({
|
|
56
57
|
disabled: import_ds_props_helpers.PropTypes.bool,
|
|
57
58
|
applyAriaDisabled: import_ds_props_helpers.PropTypes.bool
|
|
58
|
-
}).description("Extra DSButton props for reject btn.")
|
|
59
|
-
...(0, import_ds_props_helpers.getPropsPerDatatestIdPropTypes)(import_constants.MODAL_FOOTER_DATA_TESTID)
|
|
59
|
+
}).description("Extra DSButton props for reject btn.")
|
|
60
60
|
};
|
|
61
61
|
const DSModalFooterPropTypesSchema = DSModalFooterPropTypes;
|
|
62
62
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSModalFooter/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSModalSlideName, MODAL_FOOTER_SLOTS } from './constants/index.js';\n\nexport declare namespace DSModalFooterT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n confirmLabel: string;\n rejectLabel: string;\n confirmProps: {\n disabled: boolean;\n applyAriaDisabled?: boolean;\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;\n };\n rejectProps: {\n disabled: boolean;\n applyAriaDisabled?: boolean;\n };\n }\n\n export type SlotFunctionArguments = {\n dsModalslideConfirmButton: () => object;\n dsModalslideRejectButton: () => object;\n dsModalslideFooterWrapper: () => object;\n };\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSModalSlideName, typeof MODAL_FOOTER_SLOTS> {\n onConfirm?: () => void;\n onReject?: () => void;\n }\n export interface Props\n extends Partial<DefaultProps>,\n RequiredProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps {}\n\n export interface InternalProps\n extends DefaultProps,\n RequiredProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps {}\n}\n\nexport const defaultProps: DSModalFooterT.DefaultProps = {\n confirmLabel: 'Confirm',\n rejectLabel: 'Cancel',\n confirmProps: { disabled: false },\n rejectProps: { disabled: false, applyAriaDisabled: false },\n};\n\nexport const DSModalFooterPropTypes: DSPropTypesSchema<DSModalFooterT.Props> = {\n ...getPropsPerSlotPropTypes(DSModalSlideName, MODAL_FOOTER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n confirmLabel: PropTypes.string.description('Confirm Label'),\n rejectLabel: PropTypes.string.description('Reject Label'),\n onConfirm: PropTypes.func.description('Callback'),\n onReject: PropTypes.func.description('Callback'),\n confirmProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for confirm btn.'),\n rejectProps: PropTypes.shape({\n disabled: PropTypes.bool,\n applyAriaDisabled: PropTypes.bool,\n }).description('Extra DSButton props for reject btn.'),\n};\n\nexport const DSModalFooterPropTypesSchema = DSModalFooterPropTypes as unknown as ValidationMap<DSModalFooterT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAEP,uBAAqD;AA6C9C,MAAM,eAA4C;AAAA,EACvD,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc,EAAE,UAAU,MAAM;AAAA,EAChC,aAAa,EAAE,UAAU,OAAO,mBAAmB,MAAM;AAC3D;AAEO,MAAM,yBAAkE;AAAA,EAC7E,OAAG,kDAAyB,mCAAkB,mCAAkB;AAAA,EAChE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,cAAc,kCAAU,OAAO,YAAY,eAAe;AAAA,EAC1D,aAAa,kCAAU,OAAO,YAAY,cAAc;AAAA,EACxD,WAAW,kCAAU,KAAK,YAAY,UAAU;AAAA,EAChD,UAAU,kCAAU,KAAK,YAAY,UAAU;AAAA,EAC/C,cAAc,kCAAU,MAAM;AAAA,IAC5B,UAAU,kCAAU;AAAA,EACtB,CAAC,EAAE,YAAY,uCAAuC;AAAA,EACtD,aAAa,kCAAU,MAAM;AAAA,IAC3B,UAAU,kCAAU;AAAA,IACpB,mBAAmB,kCAAU;AAAA,EAC/B,CAAC,EAAE,YAAY,sCAAsC;AACvD;AAEO,MAAM,+BAA+B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
const SlotPropsAsObj = {
|
|
26
|
+
dsModalslideConfirmButton: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsModalslideRejectButton: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsModalslideFooterWrapper: { "aria-label": "just a typescript test" }
|
|
29
|
+
};
|
|
30
|
+
const SlotPropsAsFunctions = {
|
|
31
|
+
dsModalslideConfirmButton: () => ({ "aria-label": "just a typescript test" }),
|
|
32
|
+
dsModalslideRejectButton: () => ({ "aria-label": "just a typescript test" }),
|
|
33
|
+
dsModalslideFooterWrapper: () => ({ "aria-label": "just a typescript test" })
|
|
34
|
+
};
|
|
35
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
36
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSModalFooter/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\n\nimport type { DSModalFooterT } from '../react-desc-prop-types.js';\nimport type { DSModalSlideName, MODAL_FOOTER_SLOTS } from '../constants/index.js';\n\nconst SlotPropsAsObj: Partial<DSModalFooterT.Props> = {\n dsModalslideConfirmButton: { 'aria-label': 'just a typescript test' },\n dsModalslideRejectButton: { 'aria-label': 'just a typescript test' },\n dsModalslideFooterWrapper: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSModalFooterT.SlotFunctionArguments = {\n dsModalslideConfirmButton: () => ({ 'aria-label': 'just a typescript test' }),\n dsModalslideRejectButton: () => ({ 'aria-label': 'just a typescript test' }),\n dsModalslideFooterWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSModalSlideName, typeof MODAL_FOOTER_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACOvB,MAAM,iBAAgD;AAAA,EACpD,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,2BAA2B,EAAE,cAAc,yBAAyB;AACtE;AAEA,MAAM,uBAA6D;AAAA,EACjE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAC7E;AAEA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -61,18 +61,25 @@ const DSModalHeader = (props) => {
|
|
|
61
61
|
}
|
|
62
62
|
) }) }),
|
|
63
63
|
toolbar,
|
|
64
|
-
toolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
+
toolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
+
import_styled.StyledToolbarSeparator,
|
|
66
|
+
{
|
|
67
|
+
isVertical: true,
|
|
68
|
+
getOwnerProps,
|
|
69
|
+
getOwnerPropsArguments
|
|
70
|
+
}
|
|
71
|
+
),
|
|
65
72
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
73
|
import_styled.StyledCloseButton,
|
|
67
74
|
{
|
|
68
75
|
"data-testid": import_constants.MODAL_HEADER_DATA_TESTID.CLOSE_BUTTON,
|
|
69
|
-
"aria-label": "Close modal slide",
|
|
76
|
+
"aria-label": title ? `Close ${title}` : "Close modal slide",
|
|
70
77
|
buttonType: "icon",
|
|
71
78
|
onClick: onClose,
|
|
72
79
|
innerRef,
|
|
73
80
|
getOwnerProps,
|
|
74
81
|
getOwnerPropsArguments,
|
|
75
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Close, {
|
|
82
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Close, { size: "s", color: ["brand-primary", "600"] })
|
|
76
83
|
}
|
|
77
84
|
)
|
|
78
85
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSModalHeader/DSModalHeader.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { Close } from '@elliemae/ds-icons';\nimport { type DSModalHeaderT, DSModalHeaderPropTypesSchema } from './react-desc-prop-types.js';\nimport { useModalHeader } from './config/useModalHeader.js';\nimport { MODAL_HEADER_DATA_TESTID, DSModalHeaderName } from './constants/index.js';\nimport {\n StyledHeader,\n StyledHeaderLeftSide,\n StyledTitle,\n HeaderWrapper,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBnB;AApBJ,8BAAyB;AACzB,sBAAsB;AACtB,mCAAkE;AAClE,4BAA+B;AAC/B,uBAA4D;AAC5D,oBAOO;AAEP,MAAM,gBAA2D,CAAC,UAAU;AAC1E,QAAM,EAAE,kBAAkB,eAAe,uBAAuB,QAAI,sCAAe,KAAK;AAExF,QAAM,EAAE,UAAU,OAAO,SAAS,SAAS,cAAc,aAAa,IAAI;AAE1E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,sCAAqB,eAA8B,wBAClD,sDAAC,8BAAa,eAA8B,wBAC1C;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ,SAAS;AAAA,YACT;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH,GACF,GACF;AAAA,QAEC;AAAA,QAEA,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { Close } from '@elliemae/ds-icons';\nimport { type DSModalHeaderT, DSModalHeaderPropTypesSchema } from './react-desc-prop-types.js';\nimport { useModalHeader } from './config/useModalHeader.js';\nimport { MODAL_HEADER_DATA_TESTID, DSModalHeaderName } from './constants/index.js';\nimport {\n StyledHeader,\n StyledHeaderLeftSide,\n StyledTitle,\n HeaderWrapper,\n StyledToolbarSeparator,\n StyledCloseButton,\n} from '../../styled.js';\n\nconst DSModalHeader: React.ComponentType<DSModalHeaderT.Props> = (props) => {\n const { propsWithDefault, getOwnerProps, getOwnerPropsArguments } = useModalHeader(props);\n\n const { innerRef, title, onClose, toolbar, headingLevel, modalTitleId } = propsWithDefault;\n\n return (\n <HeaderWrapper\n aria-label=\"Modal Slide Header\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledHeaderLeftSide getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledHeader getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledTitle\n id={modalTitleId}\n variant={headingLevel}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </StyledTitle>\n </StyledHeader>\n </StyledHeaderLeftSide>\n\n {toolbar}\n\n {toolbar && (\n <StyledToolbarSeparator\n isVertical\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n\n <StyledCloseButton\n data-testid={MODAL_HEADER_DATA_TESTID.CLOSE_BUTTON}\n aria-label={title ? `Close ${title}` : 'Close modal slide'}\n buttonType=\"icon\"\n onClick={onClose}\n innerRef={innerRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Close size=\"s\" color={['brand-primary', '600']} />\n </StyledCloseButton>\n </HeaderWrapper>\n );\n};\n\nDSModalHeader.displayName = DSModalHeaderName;\nconst DSModalHeaderWithSchema = describe(DSModalHeader);\nDSModalHeaderWithSchema.propTypes = DSModalHeaderPropTypesSchema;\n\nexport { DSModalHeader, DSModalHeaderWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBnB;AApBJ,8BAAyB;AACzB,sBAAsB;AACtB,mCAAkE;AAClE,4BAA+B;AAC/B,uBAA4D;AAC5D,oBAOO;AAEP,MAAM,gBAA2D,CAAC,UAAU;AAC1E,QAAM,EAAE,kBAAkB,eAAe,uBAAuB,QAAI,sCAAe,KAAK;AAExF,QAAM,EAAE,UAAU,OAAO,SAAS,SAAS,cAAc,aAAa,IAAI;AAE1E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,sCAAqB,eAA8B,wBAClD,sDAAC,8BAAa,eAA8B,wBAC1C;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ,SAAS;AAAA,YACT;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH,GACF,GACF;AAAA,QAEC;AAAA,QAEA,WACC;AAAA,UAAC;AAAA;AAAA,YACC,YAAU;AAAA,YACV;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QAGF;AAAA,UAAC;AAAA;AAAA,YACC,eAAa,0CAAyB;AAAA,YACtC,cAAY,QAAQ,SAAS,KAAK,KAAK;AAAA,YACvC,YAAW;AAAA,YACX,SAAS;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YAEA,sDAAC,yBAAM,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,QACnD;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -43,10 +43,12 @@ const MODAL_HEADER_SLOTS = {
|
|
|
43
43
|
HEADER_LEFT_SIDE: "header-left-side",
|
|
44
44
|
HEADER: "header",
|
|
45
45
|
HEADER_WRAPPER: "header-wrapper",
|
|
46
|
+
TOOLBAR_SEPARATOR: "toolbar-separator",
|
|
46
47
|
CLOSE_BUTTON: "close-button"
|
|
47
48
|
};
|
|
48
49
|
const MODAL_HEADER_DATA_TESTID = {
|
|
49
50
|
...(0, import_ds_system.slotObjectToDataTestIds)(import_constants.DSModalSlideName, MODAL_HEADER_SLOTS),
|
|
51
|
+
// legacy test IDs — preserved for QA/consumer compatibility, breaking change if removed
|
|
50
52
|
CLOSE_BUTTON: "modal-slider-header-close"
|
|
51
53
|
};
|
|
52
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/DSModalHeader/constants/index.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { DSModalSlideName } from '../../../constants/index.js';\nexport { DSModalSlideName };\n\nexport const DSModalHeaderName = 'DSModalHeader';\n\nexport const MODAL_HEADER_SLOTS = {\n TITLE: 'title',\n HEADER_LEFT_SIDE: 'header-left-side',\n HEADER: 'header',\n HEADER_WRAPPER: 'header-wrapper',\n CLOSE_BUTTON: 'close-button',\n} as const;\n\nexport const MODAL_HEADER_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSModalSlideName, MODAL_HEADER_SLOTS),\n CLOSE_BUTTON: 'modal-slider-header-close',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AACxC,uBAAiC;AAG1B,MAAM,oBAAoB;AAE1B,MAAM,qBAAqB;AAAA,EAChC,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,cAAc;AAChB;AAEO,MAAM,2BAA2B;AAAA,EACtC,OAAG,0CAAwB,mCAAkB,kBAAkB;AAAA,
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { DSModalSlideName } from '../../../constants/index.js';\nexport { DSModalSlideName };\n\nexport const DSModalHeaderName = 'DSModalHeader';\n\nexport const MODAL_HEADER_SLOTS = {\n TITLE: 'title',\n HEADER_LEFT_SIDE: 'header-left-side',\n HEADER: 'header',\n HEADER_WRAPPER: 'header-wrapper',\n TOOLBAR_SEPARATOR: 'toolbar-separator',\n CLOSE_BUTTON: 'close-button',\n} as const;\n\nexport const MODAL_HEADER_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSModalSlideName, MODAL_HEADER_SLOTS),\n // legacy test IDs \u2014 preserved for QA/consumer compatibility, breaking change if removed\n CLOSE_BUTTON: 'modal-slider-header-close',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AACxC,uBAAiC;AAG1B,MAAM,oBAAoB;AAE1B,MAAM,qBAAqB;AAAA,EAChC,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,cAAc;AAChB;AAEO,MAAM,2BAA2B;AAAA,EACtC,OAAG,0CAAwB,mCAAkB,kBAAkB;AAAA;AAAA,EAE/D,cAAc;AAChB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSModalHeader/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSTypographyT } from '@elliemae/ds-typography';\nimport { DSModalSlideName, MODAL_HEADER_SLOTS } from './constants/index.js';\n\nexport declare namespace DSModalHeaderT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n title: string;\n onClose: () => void;\n headingLevel: DSTypographyT.HeadingVariants;\n modalTitleId: string;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSModalSlideName, typeof MODAL_HEADER_SLOTS> {\n toolbar?: React.ReactNode;\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;\n }\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSModalHeaderT.DefaultProps = {\n title: '',\n onClose: () => null,\n headingLevel: 'h3',\n modalTitleId: 'ds-modal-slide-title',\n};\n\nexport const DSModalHeaderPropTypes: DSPropTypesSchema<DSModalHeaderT.Props> = {\n ...getPropsPerSlotPropTypes(DSModalSlideName, MODAL_HEADER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.description('Modal title'),\n onClose: PropTypes.func.description('Callback when modal is closed'),\n toolbar: PropTypes.node.description('Modal toolbar component'),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the modal header button'),\n headingLevel: PropTypes.string.description('Heading level for modal title'),\n modalTitleId: PropTypes.string.description('Id of the modal title'),\n};\n\nexport const DSModalHeaderPropTypesSchema = DSModalHeaderPropTypes as unknown as ValidationMap<DSModalHeaderT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAGP,uBAAqD;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSTypographyT } from '@elliemae/ds-typography';\nimport { DSModalSlideName, MODAL_HEADER_SLOTS } from './constants/index.js';\n\nexport declare namespace DSModalHeaderT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n title: string;\n onClose: () => void;\n headingLevel: DSTypographyT.HeadingVariants;\n modalTitleId: string;\n }\n\n export type SlotFunctionArguments = {\n dsModalslideTitle: () => object;\n dsModalslideHeaderLeftSide: () => object;\n dsModalslideHeader: () => object;\n dsModalslideHeaderWrapper: () => object;\n dsModalslideToolbarSeparator: () => object;\n dsModalslideCloseButton: () => object;\n };\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSModalSlideName, typeof MODAL_HEADER_SLOTS> {\n toolbar?: React.ReactNode;\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | React.RefCallback<HTMLButtonElement>;\n }\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSModalHeaderT.DefaultProps = {\n title: '',\n onClose: () => null,\n headingLevel: 'h3',\n modalTitleId: 'ds-modal-slide-title',\n};\n\nexport const DSModalHeaderPropTypes: DSPropTypesSchema<DSModalHeaderT.Props> = {\n ...getPropsPerSlotPropTypes(DSModalSlideName, MODAL_HEADER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.description('Modal title'),\n onClose: PropTypes.func.description('Callback when modal is closed'),\n toolbar: PropTypes.node.description('Modal toolbar component'),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the modal header button'),\n headingLevel: PropTypes.string.description('Heading level for modal title'),\n modalTitleId: PropTypes.string.description('Id of the modal title'),\n};\n\nexport const DSModalHeaderPropTypesSchema = DSModalHeaderPropTypes as unknown as ValidationMap<DSModalHeaderT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAGP,uBAAqD;AAyC9C,MAAM,eAA4C;AAAA,EACvD,OAAO;AAAA,EACP,SAAS,MAAM;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAChB;AAEO,MAAM,yBAAkE;AAAA,EAC7E,OAAG,kDAAyB,mCAAkB,mCAAkB;AAAA,EAChE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,aAAa;AAAA,EACjD,SAAS,kCAAU,KAAK,YAAY,+BAA+B;AAAA,EACnE,SAAS,kCAAU,KAAK,YAAY,yBAAyB;AAAA,EAC7D,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAC9G,cAAc,kCAAU,OAAO,YAAY,+BAA+B;AAAA,EAC1E,cAAc,kCAAU,OAAO,YAAY,uBAAuB;AACpE;AAEO,MAAM,+BAA+B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
const SlotPropsAsObj = {
|
|
26
|
+
dsModalslideTitle: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsModalslideHeaderLeftSide: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsModalslideHeader: { "aria-label": "just a typescript test" },
|
|
29
|
+
dsModalslideHeaderWrapper: { "aria-label": "just a typescript test" },
|
|
30
|
+
dsModalslideToolbarSeparator: { "aria-label": "just a typescript test" },
|
|
31
|
+
dsModalslideCloseButton: { "aria-label": "just a typescript test" }
|
|
32
|
+
};
|
|
33
|
+
const SlotPropsAsFunctions = {
|
|
34
|
+
dsModalslideTitle: () => ({ "aria-label": "just a typescript test" }),
|
|
35
|
+
dsModalslideHeaderLeftSide: () => ({ "aria-label": "just a typescript test" }),
|
|
36
|
+
dsModalslideHeader: () => ({ "aria-label": "just a typescript test" }),
|
|
37
|
+
dsModalslideHeaderWrapper: () => ({ "aria-label": "just a typescript test" }),
|
|
38
|
+
dsModalslideToolbarSeparator: () => ({ "aria-label": "just a typescript test" }),
|
|
39
|
+
dsModalslideCloseButton: () => ({ "aria-label": "just a typescript test" })
|
|
40
|
+
};
|
|
41
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
42
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSModalHeader/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\n\nimport type { DSModalHeaderT } from '../react-desc-prop-types.js';\nimport type { DSModalSlideName, MODAL_HEADER_SLOTS } from '../constants/index.js';\n\nconst SlotPropsAsObj: Partial<DSModalHeaderT.Props> = {\n dsModalslideTitle: { 'aria-label': 'just a typescript test' },\n dsModalslideHeaderLeftSide: { 'aria-label': 'just a typescript test' },\n dsModalslideHeader: { 'aria-label': 'just a typescript test' },\n dsModalslideHeaderWrapper: { 'aria-label': 'just a typescript test' },\n dsModalslideToolbarSeparator: { 'aria-label': 'just a typescript test' },\n dsModalslideCloseButton: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSModalHeaderT.SlotFunctionArguments = {\n dsModalslideTitle: () => ({ 'aria-label': 'just a typescript test' }),\n dsModalslideHeaderLeftSide: () => ({ 'aria-label': 'just a typescript test' }),\n dsModalslideHeader: () => ({ 'aria-label': 'just a typescript test' }),\n dsModalslideHeaderWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsModalslideToolbarSeparator: () => ({ 'aria-label': 'just a typescript test' }),\n dsModalslideCloseButton: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSModalSlideName, typeof MODAL_HEADER_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACOvB,MAAM,iBAAgD;AAAA,EACpD,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,oBAAoB,EAAE,cAAc,yBAAyB;AAAA,EAC7D,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,8BAA8B,EAAE,cAAc,yBAAyB;AAAA,EACvE,yBAAyB,EAAE,cAAc,yBAAyB;AACpE;AAEA,MAAM,uBAA6D;AAAA,EACjE,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,4BAA4B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,oBAAoB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACpE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,8BAA8B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9E,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAC3E;AAEA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -35,6 +35,7 @@ __export(react_desc_prop_types_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
36
|
var React = __toESM(require("react"));
|
|
37
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
38
39
|
const defaultProps = {
|
|
39
40
|
isOpen: false,
|
|
40
41
|
centered: false,
|
|
@@ -46,6 +47,7 @@ const defaultProps = {
|
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
const DSModalSlidePropTypes = {
|
|
50
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSModalSlideName, import_constants.MODAL_SLIDE_SLOTS),
|
|
49
51
|
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
50
52
|
...import_ds_props_helpers.xstyledPropTypes,
|
|
51
53
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/react-desc-prop-types.
|
|
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 {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../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 {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSModalSlideName, MODAL_SLIDE_SLOTS } from './constants/index.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 onClose: () => void;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSModalSlideName, typeof MODAL_SLIDE_SLOTS> {\n header?: React.ReactElement;\n footer?: React.ReactNode;\n children?: React.ReactNode;\n innerRef?: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;\n }\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLElement>;\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 onClose: () => {},\n};\n\nexport declare namespace DSModalSlideT {\n export type SlotFunctionArguments = {\n dsModalslideRoot: () => object;\n dsModalslideOverlay: () => object;\n dsModalslideContent: () => object;\n dsModalslideActualContent: () => object;\n dsModalslideHeaderSeparator: () => object;\n dsModalslideFooterSeparator: () => object;\n dsModalslideContentWrapper: () => object;\n dsModalslideGridContent: () => object;\n };\n}\n\nexport const DSModalSlidePropTypes: DSPropTypesSchema<DSModalSlideT.Props> = {\n ...getPropsPerSlotPropTypes(DSModalSlideName, MODAL_SLIDE_SLOTS),\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 onClose: PropTypes.func.description('On modal slide close callback'),\n};\n\nexport const DSModalSlidePropTypesSchema =\n DSModalSlidePropTypes as unknown as React.WeakValidationMap<DSModalSlideT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAEP,uBAAoD;AAiC7C,MAAM,eAA2C;AAAA,EACtD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,SAAS,MAAM;AAAA,EAAC;AAClB;AAeO,MAAM,wBAAgE;AAAA,EAC3E,OAAG,kDAAyB,mCAAkB,kCAAiB;AAAA,EAC/D,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,UAAU,kCAAU,KAAK,YAAY,uCAAuC;AAAA;AAAA;AAAA;AAAA,EAI5E,QAAQ,kCAAU,KAAK,YAAY,sCAAsC;AAAA;AAAA;AAAA;AAAA,EAIzE,UAAU,kCAAU,UAAU,CAAC,kCAAU,IAAI,CAAC,EAAE,WAAW,YAAY,2BAA2B;AAAA;AAAA;AAAA;AAAA,EAIlG,WAAW,kCAAU,KAAK,YAAY,gDAAgD;AAAA;AAAA;AAAA;AAAA,EAItF,QAAQ,kCAAU,QAAQ,YAAY,uEAAuE;AAAA;AAAA;AAAA;AAAA,EAI7G,QAAQ,kCAAU,QAAQ,YAAY,iCAAiC;AAAA;AAAA;AAAA;AAAA,EAIvE,SAAS,kCAAU,OAAO,YAAY,mBAAmB;AAAA;AAAA;AAAA;AAAA,EAIzD,QAAQ,kCAAU,OAAO,YAAY,kBAAkB;AAAA;AAAA;AAAA;AAAA,EAIvD,gBAAgB,kCAAU,KAAK,YAAY,6DAA6D;AAAA,EACxG,cAAc,kCAAU,KAAK,YAAY,gDAAgD,EAAE;AAAA,EAC3F,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,wBAAwB;AAAA,EACtG,SAAS,kCAAU,KAAK,YAAY,+BAA+B;AACrE;AAEO,MAAM,8BACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -34,15 +34,17 @@ __export(styled_exports, {
|
|
|
34
34
|
StyledConfirmButton: () => StyledConfirmButton,
|
|
35
35
|
StyledContent: () => StyledContent,
|
|
36
36
|
StyledContentWrapper: () => StyledContentWrapper,
|
|
37
|
+
StyledFooterSeparator: () => StyledFooterSeparator,
|
|
37
38
|
StyledFooterWrapper: () => StyledFooterWrapper,
|
|
38
39
|
StyledGridContent: () => StyledGridContent,
|
|
39
40
|
StyledHeader: () => StyledHeader,
|
|
40
41
|
StyledHeaderLeftSide: () => StyledHeaderLeftSide,
|
|
42
|
+
StyledHeaderSeparator: () => StyledHeaderSeparator,
|
|
41
43
|
StyledModalWrapper: () => StyledModalWrapper,
|
|
42
44
|
StyledOverlay: () => StyledOverlay,
|
|
43
45
|
StyledRejectButton: () => StyledRejectButton,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
StyledTitle: () => StyledTitle,
|
|
47
|
+
StyledToolbarSeparator: () => StyledToolbarSeparator
|
|
46
48
|
});
|
|
47
49
|
module.exports = __toCommonJS(styled_exports);
|
|
48
50
|
var React = __toESM(require("react"));
|
|
@@ -129,7 +131,10 @@ const StyledContent = (0, import_ds_system.styled)("div", { name: import_constan
|
|
|
129
131
|
animation: ${(props) => props.disappearing ? contentAnimationOut : contentAnimationIn}
|
|
130
132
|
calc(${(props) => props.disappearing ? props.fadeOut / 2 : props.fadeIn / 2} * 1ms) linear;
|
|
131
133
|
`;
|
|
132
|
-
const StyledGridContent = (0, import_ds_system.styled)(import_ds_grid.Grid
|
|
134
|
+
const StyledGridContent = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
135
|
+
name: import_constants.DSModalSlideName,
|
|
136
|
+
slot: import_constants.MODAL_SLIDE_SLOTS.GRID_CONTENT
|
|
137
|
+
})`
|
|
133
138
|
height: 100%;
|
|
134
139
|
width: 100%;
|
|
135
140
|
max-height: 100%;
|
|
@@ -185,7 +190,18 @@ const HeaderWrapper = (0, import_ds_system.styled)("div", { name: import_constan
|
|
|
185
190
|
overflow: hidden;
|
|
186
191
|
padding: ${(props) => props.theme.space.xxs} ${(props) => props.theme.space.xs};
|
|
187
192
|
`;
|
|
188
|
-
const
|
|
193
|
+
const StyledHeaderSeparator = (0, import_ds_system.styled)(import_ds_separator.DSSeparatorV2, {
|
|
194
|
+
name: import_constants.DSModalSlideName,
|
|
195
|
+
slot: import_constants.MODAL_SLIDE_SLOTS.HEADER_SEPARATOR
|
|
196
|
+
})``;
|
|
197
|
+
const StyledFooterSeparator = (0, import_ds_system.styled)(import_ds_separator.DSSeparatorV2, {
|
|
198
|
+
name: import_constants.DSModalSlideName,
|
|
199
|
+
slot: import_constants.MODAL_SLIDE_SLOTS.FOOTER_SEPARATOR
|
|
200
|
+
})``;
|
|
201
|
+
const StyledToolbarSeparator = (0, import_ds_system.styled)(import_ds_separator.DSSeparatorV2, {
|
|
202
|
+
name: import_constants.DSModalSlideName,
|
|
203
|
+
slot: import_constants3.MODAL_HEADER_SLOTS.TOOLBAR_SEPARATOR
|
|
204
|
+
})`
|
|
189
205
|
height: 33%;
|
|
190
206
|
background: ${(props) => props.theme.colors.neutral["300"]};
|
|
191
207
|
`;
|