@elliemae/ds-modal-slide 3.60.0-next.32 → 3.60.0-next.34

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.
Files changed (95) hide show
  1. package/dist/cjs/DSModalSlide.js +4 -4
  2. package/dist/cjs/DSModalSlide.js.map +3 -3
  3. package/dist/cjs/constants/index.js +2 -11
  4. package/dist/cjs/constants/index.js.map +2 -2
  5. package/dist/cjs/index.js +16 -6
  6. package/dist/cjs/index.js.map +2 -2
  7. package/dist/cjs/{components/Footer.js → parts/DSModalFooter/DSModalFooter.js} +15 -17
  8. package/dist/cjs/parts/DSModalFooter/DSModalFooter.js.map +7 -0
  9. package/dist/cjs/parts/DSModalFooter/config/useModalFooter.js +68 -0
  10. package/dist/cjs/parts/DSModalFooter/config/useModalFooter.js.map +7 -0
  11. package/dist/cjs/parts/DSModalFooter/config/useValidateProps.js +40 -0
  12. package/dist/cjs/parts/DSModalFooter/config/useValidateProps.js.map +7 -0
  13. package/dist/cjs/parts/DSModalFooter/constants/index.js +47 -0
  14. package/dist/cjs/parts/DSModalFooter/constants/index.js.map +7 -0
  15. package/dist/cjs/parts/DSModalFooter/index.js +43 -0
  16. package/dist/cjs/parts/DSModalFooter/index.js.map +7 -0
  17. package/dist/cjs/parts/DSModalFooter/react-desc-prop-types.js +62 -0
  18. package/dist/cjs/parts/DSModalFooter/react-desc-prop-types.js.map +7 -0
  19. package/dist/cjs/{components/Header.js → parts/DSModalHeader/DSModalHeader.js} +18 -19
  20. package/dist/cjs/parts/DSModalHeader/DSModalHeader.js.map +7 -0
  21. package/dist/cjs/parts/DSModalHeader/config/useModalHeader.js +68 -0
  22. package/dist/cjs/parts/DSModalHeader/config/useModalHeader.js.map +7 -0
  23. package/dist/cjs/parts/DSModalHeader/config/useValidateProps.js +40 -0
  24. package/dist/cjs/parts/DSModalHeader/config/useValidateProps.js.map +7 -0
  25. package/dist/cjs/parts/DSModalHeader/constants/index.js +52 -0
  26. package/dist/cjs/parts/DSModalHeader/constants/index.js.map +7 -0
  27. package/dist/cjs/parts/DSModalHeader/index.js +43 -0
  28. package/dist/cjs/parts/DSModalHeader/index.js.map +7 -0
  29. package/dist/cjs/parts/DSModalHeader/react-desc-prop-types.js +57 -0
  30. package/dist/cjs/parts/DSModalHeader/react-desc-prop-types.js.map +7 -0
  31. package/dist/cjs/react-desc-prop-types.js +1 -65
  32. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  33. package/dist/cjs/styled.js +18 -10
  34. package/dist/cjs/styled.js.map +3 -3
  35. package/dist/cjs/typescript-testing/typescript-modal-slide-valid.js +10 -10
  36. package/dist/cjs/typescript-testing/typescript-modal-slide-valid.js.map +2 -2
  37. package/dist/esm/DSModalSlide.js +2 -2
  38. package/dist/esm/DSModalSlide.js.map +2 -2
  39. package/dist/esm/constants/index.js +2 -11
  40. package/dist/esm/constants/index.js.map +2 -2
  41. package/dist/esm/index.js +33 -7
  42. package/dist/esm/index.js.map +3 -3
  43. package/dist/esm/{components/Footer.js → parts/DSModalFooter/DSModalFooter.js} +13 -15
  44. package/dist/esm/parts/DSModalFooter/DSModalFooter.js.map +7 -0
  45. package/dist/esm/parts/DSModalFooter/config/useModalFooter.js +43 -0
  46. package/dist/esm/parts/DSModalFooter/config/useModalFooter.js.map +7 -0
  47. package/dist/esm/parts/DSModalFooter/config/useValidateProps.js +10 -0
  48. package/dist/esm/parts/DSModalFooter/config/useValidateProps.js.map +7 -0
  49. package/dist/esm/parts/DSModalFooter/constants/index.js +17 -0
  50. package/dist/esm/parts/DSModalFooter/constants/index.js.map +7 -0
  51. package/dist/esm/parts/DSModalFooter/index.js +18 -0
  52. package/dist/esm/parts/DSModalFooter/index.js.map +7 -0
  53. package/dist/esm/parts/DSModalFooter/react-desc-prop-types.js +37 -0
  54. package/dist/esm/parts/DSModalFooter/react-desc-prop-types.js.map +7 -0
  55. package/dist/esm/{components/Header.js → parts/DSModalHeader/DSModalHeader.js} +16 -17
  56. package/dist/esm/parts/DSModalHeader/DSModalHeader.js.map +7 -0
  57. package/dist/esm/parts/DSModalHeader/config/useModalHeader.js +43 -0
  58. package/dist/esm/parts/DSModalHeader/config/useModalHeader.js.map +7 -0
  59. package/dist/esm/parts/DSModalHeader/config/useValidateProps.js +10 -0
  60. package/dist/esm/parts/DSModalHeader/config/useValidateProps.js.map +7 -0
  61. package/dist/esm/parts/DSModalHeader/constants/index.js +22 -0
  62. package/dist/esm/parts/DSModalHeader/constants/index.js.map +7 -0
  63. package/dist/esm/parts/DSModalHeader/index.js +18 -0
  64. package/dist/esm/parts/DSModalHeader/index.js.map +7 -0
  65. package/dist/esm/parts/DSModalHeader/react-desc-prop-types.js +32 -0
  66. package/dist/esm/parts/DSModalHeader/react-desc-prop-types.js.map +7 -0
  67. package/dist/esm/react-desc-prop-types.js +2 -71
  68. package/dist/esm/react-desc-prop-types.js.map +2 -2
  69. package/dist/esm/styled.js +18 -10
  70. package/dist/esm/styled.js.map +2 -2
  71. package/dist/esm/typescript-testing/typescript-modal-slide-valid.js +11 -11
  72. package/dist/esm/typescript-testing/typescript-modal-slide-valid.js.map +2 -2
  73. package/dist/types/DSModalSlide.d.ts +2 -2
  74. package/dist/types/constants/index.d.ts +0 -16
  75. package/dist/types/index.d.ts +3 -3
  76. package/dist/types/parts/DSModalFooter/DSModalFooter.d.ts +7 -0
  77. package/dist/types/parts/DSModalFooter/config/useModalFooter.d.ts +375 -0
  78. package/dist/types/parts/DSModalFooter/config/useValidateProps.d.ts +3 -0
  79. package/dist/types/parts/DSModalFooter/constants/index.d.ts +13 -0
  80. package/dist/types/parts/DSModalFooter/index.d.ts +3 -0
  81. package/dist/types/parts/DSModalFooter/react-desc-prop-types.d.ts +29 -0
  82. package/dist/types/parts/DSModalHeader/DSModalHeader.d.ts +5 -0
  83. package/dist/types/parts/DSModalHeader/config/useModalHeader.d.ts +375 -0
  84. package/dist/types/parts/DSModalHeader/config/useValidateProps.d.ts +3 -0
  85. package/dist/types/parts/DSModalHeader/constants/index.d.ts +17 -0
  86. package/dist/types/parts/DSModalHeader/index.d.ts +3 -0
  87. package/dist/types/parts/DSModalHeader/react-desc-prop-types.d.ts +25 -0
  88. package/dist/types/react-desc-prop-types.d.ts +1 -41
  89. package/package.json +9 -9
  90. package/dist/cjs/components/Footer.js.map +0 -7
  91. package/dist/cjs/components/Header.js.map +0 -7
  92. package/dist/esm/components/Footer.js.map +0 -7
  93. package/dist/esm/components/Header.js.map +0 -7
  94. package/dist/types/components/Footer.d.ts +0 -8
  95. package/dist/types/components/Header.d.ts +0 -8
@@ -30,8 +30,8 @@ var DSModalSlide_exports = {};
30
30
  __export(DSModalSlide_exports, {
31
31
  DSModalSlide: () => DSModalSlide,
32
32
  DSModalSlideWithSchema: () => DSModalSlideWithSchema,
33
- ModalFooter: () => import_Footer.default,
34
- ModalHeader: () => import_Header.default,
33
+ ModalFooter: () => import_DSModalFooter.ModalFooter,
34
+ ModalHeader: () => import_DSModalHeader.ModalHeader,
35
35
  default: () => DSModalSlide_default
36
36
  });
37
37
  module.exports = __toCommonJS(DSModalSlide_exports);
@@ -45,8 +45,8 @@ 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
47
  var import_ds_separator = require("@elliemae/ds-separator");
48
- var import_Header = __toESM(require("./components/Header.js"));
49
- var import_Footer = __toESM(require("./components/Footer.js"));
48
+ var import_DSModalHeader = require("./parts/DSModalHeader/index.js");
49
+ var import_DSModalFooter = require("./parts/DSModalFooter/index.js");
50
50
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
51
51
  var import_styled = require("./styled.js");
52
52
  var import_constants = require("./constants/index.js");
@@ -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 { 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 './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`;\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 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={modalTitleId}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledGridContent rows={contentRows} data-testid=\"ds-modal-slide\">\n {header && React.cloneElement(header, { fullWidth, modalTitleId })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\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 && <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;AD4JX;AA3JZ,mBAAiE;AACjE,8BAKO;AACP,uBAAyB;AACzB,iBAAoB;AACpB,uBAAqB;AACrB,uBAAuB;AACvB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AAW,8BACT,CAAC,SAAS,6CAA6C,qCACzD;AAAA,gBACA,gBAAgB;AAAA,gBAChB;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,cAAc,CAAC;AAAA,gBACf,MAAK;AAAA,gBACL,cAAW;AAAA,gBACX,mBAAiB;AAAA,gBACjB;AAAA,gBACA;AAAA,gBAEA,uDAAC,mCAAkB,MAAM,aAAa,eAAY,kBAC/C;AAAA,4BAAU,aAAAD,QAAM,aAAa,QAAQ,EAAE,WAAW,aAAa,CAAC;AAAA,kBAChE,UAAU,4CAAC,mCAAY,UAAS,WAAU,MAAK,YAAW;AAAA,kBAC3D,4CAAC,uBAAK,OAAO,EAAE,UAAU,SAAS,GAChC;AAAA,oBAAC;AAAA;AAAA,sBACC;AAAA,sBACA;AAAA,sBACA;AAAA,sBAEA;AAAA,wBAAC;AAAA;AAAA,0BACC,WAAU;AAAA,0BACV,cAAW;AAAA,0BACX;AAAA,0BACA;AAAA,0BAEC;AAAA;AAAA,sBACH;AAAA;AAAA,kBACF,GACF;AAAA,kBACC,UAAU,4CAAC,mCAAY,UAAS,WAAU,MAAK,YAAW;AAAA,kBAC1D;AAAA,mBACH;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF,GACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
6
- "names": ["ModalFooter", "ModalHeader", "React", "ReactDOM"]
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 { DSSeparator } from '@elliemae/ds-separator';\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} from './styled.js';\nimport { DSModalSlideName } 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`;\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 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={modalTitleId}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledGridContent rows={contentRows} data-testid=\"ds-modal-slide\">\n {header && React.cloneElement(header, { fullWidth, modalTitleId })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\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 && <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;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4JX;AA3JZ,mBAAiE;AACjE,8BAKO;AACP,uBAAyB;AACzB,iBAAoB;AACpB,uBAAqB;AACrB,uBAAuB;AACvB,qBAAqB;AACrB,0BAA4B;AAC5B,2BAA4B;AAC5B,2BAA4B;AAC5B,mCAA8E;AAC9E,oBAOO;AACP,uBAAiC;AAUjC,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAMtC,MAAM,eAA8C,CAAC,UAAU;AAC7D,QAAM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B;AAAA,gBACA;AAAA,gBAEA,uDAAC,mCAAkB,MAAM,aAAa,eAAY,kBAC/C;AAAA,4BAAU,aAAAD,QAAM,aAAa,QAAQ,EAAE,WAAW,aAAa,CAAC;AAAA,kBAChE,UAAU,4CAAC,mCAAY,UAAS,WAAU,MAAK,YAAW;AAAA,kBAC3D,4CAAC,uBAAK,OAAO,EAAE,UAAU,SAAS,GAChC;AAAA,oBAAC;AAAA;AAAA,sBACC;AAAA,sBACA;AAAA,sBACA;AAAA,sBAEA;AAAA,wBAAC;AAAA;AAAA,0BACC,WAAU;AAAA,0BACV,cAAW;AAAA,0BACX;AAAA,0BACA;AAAA,0BAEC;AAAA;AAAA,sBACH;AAAA;AAAA,kBACF,GACF;AAAA,kBACC,UAAU,4CAAC,mCAAY,UAAS,WAAU,MAAK,YAAW;AAAA,kBAC1D;AAAA,mBACH;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF,GACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
6
+ "names": ["React", "ReactDOM"]
7
7
  }
@@ -40,20 +40,11 @@ const MODAL_SLIDE_SLOTS = {
40
40
  ROOT: "root",
41
41
  OVERLAY: "overlay",
42
42
  CONTENT: "content",
43
- TITLE: "title",
44
- HEADER_LEFT_SIDE: "header-left-side",
45
43
  ACTUAL_CONTENT: "actual-content",
46
- HEADER: "header",
47
- FOOTER_WRAPPER: "footer-wrapper",
48
- HEADER_WRAPPER: "header-wrapper",
49
44
  SEPARATOR: "separator",
50
- CLOSE_BUTTON: "close-button",
51
- CONTENT_WRAPPER: "content-wrapper",
52
- REJECT_BUTTON: "reject-button",
53
- CONFIRM_BUTTON: "confirm-button"
45
+ CONTENT_WRAPPER: "content-wrapper"
54
46
  };
55
47
  const MODAL_SLIDE_DATA_TESTID = {
56
- ...(0, import_ds_system.slotObjectToDataTestIds)(DSModalSlideName, MODAL_SLIDE_SLOTS),
57
- CLOSE_BUTTON: "modal-slider-header-close"
48
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSModalSlideName, MODAL_SLIDE_SLOTS)
58
49
  };
59
50
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/index.tsx", "../../../../../../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 TITLE: 'title',\n HEADER_LEFT_SIDE: 'header-left-side',\n ACTUAL_CONTENT: 'actual-content',\n HEADER: 'header',\n FOOTER_WRAPPER: 'footer-wrapper',\n HEADER_WRAPPER: 'header-wrapper',\n SEPARATOR: 'separator',\n CLOSE_BUTTON: 'close-button',\n CONTENT_WRAPPER: 'content-wrapper',\n REJECT_BUTTON: 'reject-button',\n CONFIRM_BUTTON: 'confirm-button',\n};\n\nexport const MODAL_SLIDE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSModalSlideName, MODAL_SLIDE_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;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,mBAAmB;AAEzB,MAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAClB;AAEO,MAAM,0BAA0B;AAAA,EACrC,OAAG,0CAAwB,kBAAkB,iBAAiB;AAAA,EAC9D,cAAc;AAChB;",
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 SEPARATOR: 'separator',\n CONTENT_WRAPPER: 'content-wrapper',\n};\n\nexport const MODAL_SLIDE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSModalSlideName, MODAL_SLIDE_SLOTS),\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,WAAW;AAAA,EACX,iBAAiB;AACnB;AAEO,MAAM,0BAA0B;AAAA,EACrC,OAAG,0CAAwB,kBAAkB,iBAAiB;AAChE;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -28,21 +28,31 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var index_exports = {};
30
30
  __export(index_exports, {
31
+ DSModalFooter: () => import_DSModalFooter.DSModalFooter,
32
+ DSModalFooterName: () => import_DSModalFooter.DSModalFooterName,
33
+ DSModalFooterWithSchema: () => import_DSModalFooter.DSModalFooterWithSchema,
34
+ DSModalHeader: () => import_DSModalHeader.DSModalHeader,
35
+ DSModalHeaderName: () => import_DSModalHeader.DSModalHeaderName,
36
+ DSModalHeaderWithSchema: () => import_DSModalHeader.DSModalHeaderWithSchema,
31
37
  DSModalSlide: () => import_DSModalSlide.DSModalSlide,
32
38
  DSModalSlideDataTestIds: () => import_constants.MODAL_SLIDE_DATA_TESTID,
33
- DSModalSlideFooterWithSchema: () => import_Footer.DSModalSlideFooterWithSchema,
34
- DSModalSlideHeaderWithSchema: () => import_Header.DSModalSlideHeaderWithSchema,
39
+ DSModalSlideFooterWithSchema: () => import_DSModalFooter.DSModalFooterWithSchema,
40
+ DSModalSlideHeaderWithSchema: () => import_DSModalHeader.DSModalHeaderWithSchema,
35
41
  DSModalSlideName: () => import_constants.DSModalSlideName,
36
42
  DSModalSlideWithSchema: () => import_DSModalSlide.DSModalSlideWithSchema,
43
+ MODAL_FOOTER_DATA_TESTID: () => import_DSModalFooter.MODAL_FOOTER_DATA_TESTID,
44
+ MODAL_FOOTER_SLOTS: () => import_DSModalFooter.MODAL_FOOTER_SLOTS,
45
+ MODAL_HEADER_DATA_TESTID: () => import_DSModalHeader.MODAL_HEADER_DATA_TESTID,
46
+ MODAL_HEADER_SLOTS: () => import_DSModalHeader.MODAL_HEADER_SLOTS,
37
47
  MODAL_SLIDE_DATA_TESTID: () => import_constants.MODAL_SLIDE_DATA_TESTID,
38
48
  MODAL_SLIDE_SLOTS: () => import_constants.MODAL_SLIDE_SLOTS,
39
- ModalFooter: () => import_DSModalSlide.ModalFooter,
40
- ModalHeader: () => import_DSModalSlide.ModalHeader
49
+ ModalFooter: () => import_DSModalFooter.DSModalFooter,
50
+ ModalHeader: () => import_DSModalHeader.DSModalHeader
41
51
  });
42
52
  module.exports = __toCommonJS(index_exports);
43
53
  var React = __toESM(require("react"));
44
54
  var import_DSModalSlide = require("./DSModalSlide.js");
45
- var import_Header = require("./components/Header.js");
46
- var import_Footer = require("./components/Footer.js");
55
+ var import_DSModalHeader = require("./parts/DSModalHeader/index.js");
56
+ var import_DSModalFooter = require("./parts/DSModalFooter/index.js");
47
57
  var import_constants = require("./constants/index.js");
48
58
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { DSModalSlide, ModalHeader, ModalFooter, DSModalSlideWithSchema } from './DSModalSlide.js';\nexport { DSModalSlideHeaderWithSchema } from './components/Header.js';\nexport { DSModalSlideFooterWithSchema } from './components/Footer.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
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA+E;AAC/E,oBAA6C;AAC7C,oBAA6C;AAE7C,uBAKO;",
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
+ "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": []
7
7
  }
@@ -26,21 +26,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var Footer_exports = {};
30
- __export(Footer_exports, {
31
- DSModalSlideFooterWithSchema: () => DSModalSlideFooterWithSchema,
32
- default: () => Footer_default
29
+ var DSModalFooter_exports = {};
30
+ __export(DSModalFooter_exports, {
31
+ DSModalFooter: () => DSModalFooter,
32
+ DSModalFooterWithSchema: () => DSModalFooterWithSchema
33
33
  });
34
- module.exports = __toCommonJS(Footer_exports);
34
+ module.exports = __toCommonJS(DSModalFooter_exports);
35
35
  var React = __toESM(require("react"));
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
- var import_react_desc_prop_types = require("../react-desc-prop-types.js");
39
- var import_styled = require("../styled.js");
40
- const ModalFooter = (props) => {
41
- const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.footerDefaultProps);
38
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
39
+ var import_styled = require("../../styled.js");
40
+ var import_constants = require("./constants/index.js");
41
+ var import_useModalFooter = require("./config/useModalFooter.js");
42
+ const DSModalFooter = (props) => {
43
+ const { propsWithDefault, getOwnerProps, getOwnerPropsArguments } = (0, import_useModalFooter.useModalFooter)(props);
42
44
  const { confirmLabel, rejectLabel, onConfirm, onReject, confirmProps, rejectProps } = propsWithDefault;
43
- const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
44
45
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
45
46
  import_styled.StyledFooterWrapper,
46
47
  {
@@ -54,7 +55,6 @@ const ModalFooter = (props) => {
54
55
  {
55
56
  buttonType: "outline",
56
57
  className: "action-reject",
57
- "data-testid": "modal-footer-reject-btn",
58
58
  onClick: onReject,
59
59
  ...rejectProps,
60
60
  ml: "xs",
@@ -68,7 +68,6 @@ const ModalFooter = (props) => {
68
68
  {
69
69
  buttonType: "filled",
70
70
  className: "action-confirm",
71
- "data-testid": "modal-footer-confirm-btn",
72
71
  onClick: onConfirm,
73
72
  ...confirmProps,
74
73
  ml: "xs",
@@ -81,8 +80,7 @@ const ModalFooter = (props) => {
81
80
  }
82
81
  );
83
82
  };
84
- ModalFooter.displayName = "ModalFooter";
85
- const DSModalSlideFooterWithSchema = (0, import_ds_props_helpers.describe)(ModalFooter);
86
- DSModalSlideFooterWithSchema.propTypes = import_react_desc_prop_types.DSModalSlideFooterPropTypesSchema;
87
- var Footer_default = ModalFooter;
88
- //# sourceMappingURL=Footer.js.map
83
+ DSModalFooter.displayName = import_constants.DSModalFooterName;
84
+ const DSModalFooterWithSchema = (0, import_ds_props_helpers.describe)(DSModalFooter);
85
+ DSModalFooterWithSchema.propTypes = import_react_desc_prop_types.DSModalFooterPropTypesSchema;
86
+ //# sourceMappingURL=DSModalFooter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/parts/DSModalFooter/DSModalFooter.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { type DSModalFooterT, DSModalFooterPropTypesSchema } from './react-desc-prop-types.js';\nimport { StyledFooterWrapper, StyledRejectButton, StyledConfirmButton } from '../../styled.js';\nimport { DSModalFooterName } from './constants/index.js';\nimport { useModalFooter } from './config/useModalFooter.js';\nconst DSModalFooter = (props: DSModalFooterT.Props) => {\n const { propsWithDefault, getOwnerProps, getOwnerPropsArguments } = useModalFooter(props);\n\n const { confirmLabel, rejectLabel, onConfirm, onReject, confirmProps, rejectProps } = propsWithDefault;\n\n return (\n <StyledFooterWrapper\n className=\"em-ds-modal-slide__footer-wrapper\"\n aria-label=\"Modal Slide Footer\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {!!onReject && (\n <StyledRejectButton\n buttonType=\"outline\"\n className=\"action-reject\"\n onClick={onReject}\n {...rejectProps}\n ml=\"xs\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {rejectLabel}\n </StyledRejectButton>\n )}\n\n {!!onConfirm && (\n <StyledConfirmButton\n buttonType=\"filled\"\n className=\"action-confirm\"\n onClick={onConfirm}\n {...confirmProps}\n ml=\"xs\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {confirmLabel}\n </StyledConfirmButton>\n )}\n </StyledFooterWrapper>\n );\n};\n\nDSModalFooter.displayName = DSModalFooterName;\nconst DSModalFooterWithSchema = describe(DSModalFooter);\nDSModalFooterWithSchema.propTypes = DSModalFooterPropTypesSchema;\n\nexport { DSModalFooter, DSModalFooterWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYnB;AAXJ,8BAAyB;AACzB,mCAAkE;AAClE,oBAA6E;AAC7E,uBAAkC;AAClC,4BAA+B;AAC/B,MAAM,gBAAgB,CAAC,UAAgC;AACrD,QAAM,EAAE,kBAAkB,eAAe,uBAAuB,QAAI,sCAAe,KAAK;AAExF,QAAM,EAAE,cAAc,aAAa,WAAW,UAAU,cAAc,YAAY,IAAI;AAEtF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,cAAW;AAAA,MACX;AAAA,MACA;AAAA,MAEC;AAAA,SAAC,CAAC,YACD;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX,WAAU;AAAA,YACV,SAAS;AAAA,YACR,GAAG;AAAA,YACJ,IAAG;AAAA,YACH;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAGD,CAAC,CAAC,aACD;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX,WAAU;AAAA,YACV,SAAS;AAAA,YACR,GAAG;AAAA,YACJ,IAAG;AAAA,YACH;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,68 @@
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 __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var useModalFooter_exports = {};
30
+ __export(useModalFooter_exports, {
31
+ useModalFooter: () => useModalFooter
32
+ });
33
+ module.exports = __toCommonJS(useModalFooter_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_react = __toESM(require("react"));
37
+ var import_uid = require("uid");
38
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
39
+ var import_useValidateProps = require("./useValidateProps.js");
40
+ const useModalFooter = (propsFromUser) => {
41
+ const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
42
+ (0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSModalFooterPropTypesSchema);
43
+ const globalProps = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault);
44
+ const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
45
+ const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
46
+ const instanceUid = import_react.default.useMemo(() => `ds-modal-footer-${(0, import_uid.uid)(5)}`, []);
47
+ return import_react.default.useMemo(
48
+ () => ({
49
+ propsWithDefault,
50
+ xstyledProps,
51
+ globalProps,
52
+ instanceUid,
53
+ getOwnerProps,
54
+ getOwnerPropsArguments
55
+ // ...eventHandlers,
56
+ }),
57
+ [
58
+ propsWithDefault,
59
+ xstyledProps,
60
+ globalProps,
61
+ instanceUid,
62
+ getOwnerProps,
63
+ getOwnerPropsArguments
64
+ // eventHandlers,
65
+ ]
66
+ );
67
+ };
68
+ //# sourceMappingURL=useModalFooter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/parts/DSModalFooter/config/useModalFooter.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport { type DSModalFooterT, DSModalFooterPropTypesSchema, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useModalFooter = (propsFromUser: DSModalFooterT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSModalFooterT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSModalFooterPropTypesSchema);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSModalFooterT.InternalProps, HTMLElement>(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // OWNER PROPS\n // =============================================================================\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const instanceUid = React.useMemo(() => `ds-modal-footer-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n getOwnerProps,\n getOwnerPropsArguments,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n getOwnerProps,\n getOwnerPropsArguments,\n // eventHandlers,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAKO;AACP,mBAAkB;AAClB,iBAAoB;AACpB,mCAAgF;AAChF,8BAAiC;AAE1B,MAAM,iBAAiB,CAAC,kBAAwC;AAIrE,QAAM,uBAAmB,sDAA2D,eAAe,yCAAY;AAC/G,gDAAiB,kBAAkB,yDAA4B;AAI/D,QAAM,kBAAc,gDAAkE,gBAAgB;AACtG,QAAM,mBAAe,4CAAmB,gBAAgB;AAIxD,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,gBAAgB;AAIhF,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,uBAAmB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAMvE,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,40 @@
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 __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var useValidateProps_exports = {};
30
+ __export(useValidateProps_exports, {
31
+ useValidateProps: () => useValidateProps
32
+ });
33
+ module.exports = __toCommonJS(useValidateProps_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_constants = require("../constants/index.js");
37
+ const useValidateProps = (props, propTypes) => {
38
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSModalFooterName);
39
+ };
40
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/parts/DSModalFooter/config/useValidateProps.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSModalFooterT } from '../react-desc-prop-types.js';\nimport { DSModalFooterName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSModalFooterT.InternalProps,\n propTypes: ValidationMap<DSModalFooterT.Props>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSModalFooterName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAkC;AAE3B,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,kCAAiB;AACpE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,47 @@
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 __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ DSModalFooterName: () => DSModalFooterName,
32
+ DSModalSlideName: () => import_constants.DSModalSlideName,
33
+ MODAL_FOOTER_DATA_TESTID: () => MODAL_FOOTER_DATA_TESTID,
34
+ MODAL_FOOTER_SLOTS: () => MODAL_FOOTER_SLOTS
35
+ });
36
+ module.exports = __toCommonJS(constants_exports);
37
+ var React = __toESM(require("react"));
38
+ var import_ds_system = require("@elliemae/ds-system");
39
+ var import_constants = require("../../../constants/index.js");
40
+ const DSModalFooterName = "DSModalFooter";
41
+ const MODAL_FOOTER_SLOTS = {
42
+ CONFIRM_BUTTON: "confirm-button",
43
+ REJECT_BUTTON: "reject-button",
44
+ FOOTER_WRAPPER: "footer-wrapper"
45
+ };
46
+ const MODAL_FOOTER_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(import_constants.DSModalSlideName, MODAL_FOOTER_SLOTS);
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/parts/DSModalFooter/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 DSModalFooterName = 'DSModalFooter';\n\nexport const MODAL_FOOTER_SLOTS = {\n CONFIRM_BUTTON: 'confirm-button',\n REJECT_BUTTON: 'reject-button',\n FOOTER_WRAPPER: 'footer-wrapper',\n} as const;\n\nexport const MODAL_FOOTER_DATA_TESTID = slotObjectToDataTestIds(DSModalSlideName, MODAL_FOOTER_SLOTS);\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,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAClB;AAEO,MAAM,+BAA2B,0CAAwB,mCAAkB,kBAAkB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
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 __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var DSModalFooter_exports = {};
30
+ __export(DSModalFooter_exports, {
31
+ DSModalFooter: () => import_DSModalFooter.DSModalFooter,
32
+ DSModalFooterName: () => import_constants.DSModalFooterName,
33
+ DSModalFooterWithSchema: () => import_DSModalFooter.DSModalFooterWithSchema,
34
+ DSModalSlideFooterWithSchema: () => import_DSModalFooter.DSModalFooterWithSchema,
35
+ MODAL_FOOTER_DATA_TESTID: () => import_constants.MODAL_FOOTER_DATA_TESTID,
36
+ MODAL_FOOTER_SLOTS: () => import_constants.MODAL_FOOTER_SLOTS,
37
+ ModalFooter: () => import_DSModalFooter.DSModalFooter
38
+ });
39
+ module.exports = __toCommonJS(DSModalFooter_exports);
40
+ var React = __toESM(require("react"));
41
+ var import_DSModalFooter = require("./DSModalFooter.js");
42
+ var import_constants = require("./constants/index.js");
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/parts/DSModalFooter/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export {\n DSModalFooter,\n DSModalFooterWithSchema,\n DSModalFooter as ModalFooter,\n DSModalFooterWithSchema as DSModalSlideFooterWithSchema,\n} from './DSModalFooter.js';\n\nexport { DSModalFooterName, MODAL_FOOTER_DATA_TESTID, MODAL_FOOTER_SLOTS } from './constants/index.js';\nexport type { DSModalFooterT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAKO;AAEP,uBAAgF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,62 @@
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 __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var react_desc_prop_types_exports = {};
30
+ __export(react_desc_prop_types_exports, {
31
+ DSModalFooterPropTypes: () => DSModalFooterPropTypes,
32
+ DSModalFooterPropTypesSchema: () => DSModalFooterPropTypesSchema,
33
+ defaultProps: () => defaultProps
34
+ });
35
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
36
+ var React = __toESM(require("react"));
37
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_constants = require("./constants/index.js");
39
+ const defaultProps = {
40
+ confirmLabel: "Confirm",
41
+ rejectLabel: "Cancel",
42
+ confirmProps: { disabled: false },
43
+ rejectProps: { disabled: false, applyAriaDisabled: false }
44
+ };
45
+ const DSModalFooterPropTypes = {
46
+ ...import_ds_props_helpers.globalAttributesPropTypes,
47
+ ...import_ds_props_helpers.xstyledPropTypes,
48
+ confirmLabel: import_ds_props_helpers.PropTypes.string.description("Confirm Label"),
49
+ rejectLabel: import_ds_props_helpers.PropTypes.string.description("Reject Label"),
50
+ onConfirm: import_ds_props_helpers.PropTypes.func.description("Callback"),
51
+ onReject: import_ds_props_helpers.PropTypes.func.description("Callback"),
52
+ confirmProps: import_ds_props_helpers.PropTypes.shape({
53
+ disabled: import_ds_props_helpers.PropTypes.bool
54
+ }).description("Extra DSButton props for confirm btn."),
55
+ rejectProps: import_ds_props_helpers.PropTypes.shape({
56
+ disabled: import_ds_props_helpers.PropTypes.bool,
57
+ 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)
60
+ };
61
+ const DSModalFooterPropTypesSchema = DSModalFooterPropTypes;
62
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 getPropsPerDatatestIdPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { MODAL_FOOTER_DATA_TESTID } 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 interface OptionalProps {\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 ...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 ...getPropsPerDatatestIdPropTypes(MODAL_FOOTER_DATA_TESTID),\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;AACP,uBAAyC;AAsClC,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,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;AAAA,EACrD,OAAG,wDAA+B,yCAAwB;AAC5D;AAEO,MAAM,+BAA+B;",
6
+ "names": []
7
+ }