@elliemae/ds-modal 3.16.0-next.2 → 3.16.0-next.21
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/DSModal.js +90 -3
- package/dist/cjs/DSModal.js.map +2 -2
- package/dist/cjs/constants.js +4 -0
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/index.js +7 -3
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/v1/DSModal.js +81 -2
- package/dist/cjs/v1/DSModal.js.map +2 -2
- package/dist/cjs/v1/DSModalType.js +4 -0
- package/dist/cjs/v1/DSModalType.js.map +1 -1
- package/dist/cjs/v1/DSModalWrapper.js +9 -1
- package/dist/cjs/v1/DSModalWrapper.js.map +2 -2
- package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js +5 -1
- package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js.map +2 -2
- package/dist/cjs/v2/DSModal.js +70 -31
- package/dist/cjs/v2/DSModal.js.map +2 -2
- package/dist/cjs/v2/blocks.js +4 -0
- package/dist/cjs/v2/blocks.js.map +1 -1
- package/dist/cjs/v2/components/DecisionHeader.js +5 -1
- package/dist/cjs/v2/components/DecisionHeader.js.map +2 -2
- package/dist/cjs/v2/components/FeedbackIcon.js +6 -2
- package/dist/cjs/v2/components/FeedbackIcon.js.map +2 -2
- package/dist/cjs/v2/components/Footer.js +5 -1
- package/dist/cjs/v2/components/Footer.js.map +2 -2
- package/dist/cjs/v2/components/FormHeader.js +6 -2
- package/dist/cjs/v2/components/FormHeader.js.map +2 -2
- package/dist/cjs/v2/components/ModalContent.js +16 -9
- package/dist/cjs/v2/components/ModalContent.js.map +2 -2
- package/dist/cjs/v2/components/SelectionHeader.js +6 -2
- package/dist/cjs/v2/components/SelectionHeader.js.map +2 -2
- package/dist/cjs/v2/components/Title.js +5 -1
- package/dist/cjs/v2/components/Title.js.map +2 -2
- package/dist/cjs/v2/helpers.js +5 -1
- package/dist/cjs/v2/helpers.js.map +2 -2
- package/dist/esm/DSModal.js +86 -3
- package/dist/esm/DSModal.js.map +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/v1/DSModal.js +77 -2
- package/dist/esm/v1/DSModal.js.map +2 -2
- package/dist/esm/v1/DSModalWrapper.js +5 -1
- package/dist/esm/v1/DSModalWrapper.js.map +2 -2
- package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js +1 -1
- package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js.map +1 -1
- package/dist/esm/v2/DSModal.js +38 -3
- package/dist/esm/v2/DSModal.js.map +2 -2
- package/dist/esm/v2/blocks.js.map +1 -1
- package/dist/esm/v2/components/DecisionHeader.js +1 -1
- package/dist/esm/v2/components/DecisionHeader.js.map +1 -1
- package/dist/esm/v2/components/FeedbackIcon.js +2 -2
- package/dist/esm/v2/components/FeedbackIcon.js.map +2 -2
- package/dist/esm/v2/components/Footer.js +1 -1
- package/dist/esm/v2/components/Footer.js.map +1 -1
- package/dist/esm/v2/components/FormHeader.js +2 -2
- package/dist/esm/v2/components/FormHeader.js.map +1 -1
- package/dist/esm/v2/components/ModalContent.js +12 -9
- package/dist/esm/v2/components/ModalContent.js.map +2 -2
- package/dist/esm/v2/components/SelectionHeader.js +2 -2
- package/dist/esm/v2/components/SelectionHeader.js.map +1 -1
- package/dist/esm/v2/components/Title.js +1 -1
- package/dist/esm/v2/components/Title.js.map +1 -1
- package/dist/esm/v2/helpers.js +1 -1
- package/dist/esm/v2/helpers.js.map +1 -1
- package/package.json +15 -14
- package/dist/types/DSModal.d.ts +0 -13
- package/dist/types/constants.d.ts +0 -25
- package/dist/types/index.d.ts +0 -3
- package/dist/types/v1/DSModal.d.ts +0 -142
- package/dist/types/v1/DSModalType.d.ts +0 -1
- package/dist/types/v1/DSModalWrapper.d.ts +0 -133
- package/dist/types/v1/ModalFeedBack/ModalFeedBack.d.ts +0 -10
- package/dist/types/v2/DSModal.d.ts +0 -120
- package/dist/types/v2/blocks.d.ts +0 -9
- package/dist/types/v2/components/DecisionHeader.d.ts +0 -5
- package/dist/types/v2/components/FeedbackIcon.d.ts +0 -4
- package/dist/types/v2/components/Footer.d.ts +0 -12
- package/dist/types/v2/components/FormHeader.d.ts +0 -7
- package/dist/types/v2/components/ModalContent.d.ts +0 -20
- package/dist/types/v2/components/SelectionHeader.d.ts +0 -7
- package/dist/types/v2/components/Title.d.ts +0 -5
- package/dist/types/v2/components/tests/DecisionHeader.test.d.ts +0 -1
- package/dist/types/v2/components/tests/FeedbackIcon.test.d.ts +0 -1
- package/dist/types/v2/components/tests/Footer.test.d.ts +0 -1
- package/dist/types/v2/components/tests/FormHeader.test.d.ts +0 -1
- package/dist/types/v2/components/tests/SelectionHeader.test.d.ts +0 -1
- package/dist/types/v2/helpers.d.ts +0 -16
- package/dist/types/v2/tests/DSModal.test.d.ts +0 -1
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/blocks.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'modal-v2';\n\nexport const ModalHeader = aggregatedClasses('div')(blockName, 'modal-header', ({ type, showClose }) => ({\n [type]: type,\n 'with-close': showClose,\n}));\n\nexport const ModalHeaderTopRight = aggregatedClasses('div')(blockName, 'modal-header-close', ({ type }) => ({\n [type]: type,\n}));\n\nexport const ModalFeedback = aggregatedClasses('div')(blockName, 'modal-feedback', ({ type }) => ({\n [type]: type,\n}));\n\nexport const ModalTitle = aggregatedClasses('h3')(blockName, 'modal-title', ({ type }) => ({\n [type]: type,\n}));\n\nexport const ModalContent = aggregatedClasses('div')(blockName, 'modal-content', ({ type, removePadding }) => ({\n [type]: type,\n 'remove-padding': removePadding,\n}));\n\nexport const ModalWrapper = aggregatedClasses('div')(blockName, 'modal-wrapper', ({ type, removePadding }) => ({\n [type]: type,\n 'remove-padding': removePadding,\n}));\n\nexport const ModalFooter = aggregatedClasses('div')(\n blockName,\n 'modal-footer',\n ({ type, additionalFooterCssClass }) => ({\n [type]: type,\n [additionalFooterCssClass]: additionalFooterCssClass,\n }),\n);\n\nexport const ModalFooterActions = aggregatedClasses('div')(blockName, 'modal-footer-actions', ({ type }) => ({\n [type]: type,\n}));\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAEX,MAAM,cAAc,kBAAkB,KAAK,EAAE,WAAW,gBAAgB,CAAC,EAAE,MAAM,UAAU,OAAO;AAAA,EACvG,CAAC,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAEX,MAAM,cAAc,kBAAkB,KAAK,EAAE,WAAW,gBAAgB,CAAC,EAAE,MAAM,UAAU,OAAO;AAAA,EACvG,CAAC,IAAI,GAAG;AAAA,EACR,cAAc;AAChB,EAAE;AAEK,MAAM,sBAAsB,kBAAkB,KAAK,EAAE,WAAW,sBAAsB,CAAC,EAAE,KAAK,OAAO;AAAA,EAC1G,CAAC,IAAI,GAAG;AACV,EAAE;AAEK,MAAM,gBAAgB,kBAAkB,KAAK,EAAE,WAAW,kBAAkB,CAAC,EAAE,KAAK,OAAO;AAAA,EAChG,CAAC,IAAI,GAAG;AACV,EAAE;AAEK,MAAM,aAAa,kBAAkB,IAAI,EAAE,WAAW,eAAe,CAAC,EAAE,KAAK,OAAO;AAAA,EACzF,CAAC,IAAI,GAAG;AACV,EAAE;AAEK,MAAM,eAAe,kBAAkB,KAAK,EAAE,WAAW,iBAAiB,CAAC,EAAE,MAAM,cAAc,OAAO;AAAA,EAC7G,CAAC,IAAI,GAAG;AAAA,EACR,kBAAkB;AACpB,EAAE;AAEK,MAAM,eAAe,kBAAkB,KAAK,EAAE,WAAW,iBAAiB,CAAC,EAAE,MAAM,cAAc,OAAO;AAAA,EAC7G,CAAC,IAAI,GAAG;AAAA,EACR,kBAAkB;AACpB,EAAE;AAEK,MAAM,cAAc,kBAAkB,KAAK;AAAA,EAChD;AAAA,EACA;AAAA,EACA,CAAC,EAAE,MAAM,yBAAyB,OAAO;AAAA,IACvC,CAAC,IAAI,GAAG;AAAA,IACR,CAAC,wBAAwB,GAAG;AAAA,EAC9B;AACF;AAEO,MAAM,qBAAqB,kBAAkB,KAAK,EAAE,WAAW,wBAAwB,CAAC,EAAE,KAAK,OAAO;AAAA,EAC3G,CAAC,IAAI,GAAG;AACV,EAAE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Close } from "@elliemae/ds-icons";
|
|
4
4
|
import DSButton from "@elliemae/ds-button";
|
|
5
|
-
import { ModalHeader } from "../blocks";
|
|
5
|
+
import { ModalHeader } from "../blocks.js";
|
|
6
6
|
const DecisionHeader = ({ onClose, showClose }) => /* @__PURE__ */ jsx(ModalHeader, { classProps: { type: "decision", showClose }, children: showClose && /* @__PURE__ */ jsx(
|
|
7
7
|
DSButton,
|
|
8
8
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/DecisionHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalHeader } from '../blocks';\n\nexport const DecisionHeader = ({ onClose, showClose }) => (\n <ModalHeader classProps={{ type: 'decision', showClose }}>\n {showClose && (\n <DSButton\n buttonType=\"link\"\n containerProps={{ 'data-testid': 'modal-button-close' }}\n icon={<Close color={['neutral', '900']} />}\n onClick={onClose}\n />\n )}\n </ModalHeader>\n);\n\nexport default DecisionHeader;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalHeader } from '../blocks.js';\n\nexport const DecisionHeader = ({ onClose, showClose }) => (\n <ModalHeader classProps={{ type: 'decision', showClose }}>\n {showClose && (\n <DSButton\n buttonType=\"link\"\n containerProps={{ 'data-testid': 'modal-button-close' }}\n icon={<Close color={['neutral', '900']} />}\n onClick={onClose}\n />\n )}\n </ModalHeader>\n);\n\nexport default DecisionHeader;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACYT;AAVd,SAAS,aAAa;AACtB,OAAO,cAAc;AACrB,SAAS,mBAAmB;AAErB,MAAM,iBAAiB,CAAC,EAAE,SAAS,UAAU,MAClD,oBAAC,eAAY,YAAY,EAAE,MAAM,YAAY,UAAU,GACpD,uBACC;AAAA,EAAC;AAAA;AAAA,IACC,YAAW;AAAA,IACX,gBAAgB,EAAE,eAAe,qBAAqB;AAAA,IACtD,MAAM,oBAAC,SAAM,OAAO,CAAC,WAAW,KAAK,GAAG;AAAA,IACxC,SAAS;AAAA;AACX,GAEJ;AAGF,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ErrorHexegon, WarningTriangle, CheckmarkCircle, HelpCircle, InfoCircle } from "@elliemae/ds-icons";
|
|
4
|
-
import { MODAL_SUB_TYPE_V2 } from "../../constants";
|
|
5
|
-
import { ModalFeedback } from "../blocks";
|
|
4
|
+
import { MODAL_SUB_TYPE_V2 } from "../../constants.js";
|
|
5
|
+
import { ModalFeedback } from "../blocks.js";
|
|
6
6
|
const feedbackIconSize = "xxl";
|
|
7
7
|
const getIconType = (subtype) => {
|
|
8
8
|
switch (subtype) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/FeedbackIcon.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ErrorHexegon, WarningTriangle, CheckmarkCircle, HelpCircle, InfoCircle } from '@elliemae/ds-icons';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ErrorHexegon, WarningTriangle, CheckmarkCircle, HelpCircle, InfoCircle } from '@elliemae/ds-icons';\nimport { MODAL_SUB_TYPE_V2 } from '../../constants.js';\nimport { ModalFeedback } from '../blocks.js';\n\nconst feedbackIconSize = 'xxl';\n\nconst getIconType = (subtype) => {\n switch (subtype) {\n case MODAL_SUB_TYPE_V2.WARNING:\n return <WarningTriangle data-testid=\"icon-waring\" size={feedbackIconSize} />;\n case MODAL_SUB_TYPE_V2.ERROR:\n return <ErrorHexegon data-testid=\"icon-error\" size={feedbackIconSize} />;\n case MODAL_SUB_TYPE_V2.SUCCESS:\n return <CheckmarkCircle data-testid=\"icon-success\" size={feedbackIconSize} />;\n case MODAL_SUB_TYPE_V2.INFORMATION:\n return <InfoCircle data-testid=\"icon-information\" size={feedbackIconSize} />;\n default:\n return <HelpCircle data-testid=\"icon-help\" size={feedbackIconSize} />;\n }\n};\n\nexport const FeedbackIcon = ({ modalSubType }) => (\n <ModalFeedback classProps={{ type: modalSubType }}>{getIconType(modalSubType)}</ModalFeedback>\n);\n\nexport default FeedbackIcon;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACUV;AATb,SAAS,cAAc,iBAAiB,iBAAiB,YAAY,kBAAkB;AACvF,SAAS,yBAAyB;AAClC,SAAS,qBAAqB;AAE9B,MAAM,mBAAmB;AAEzB,MAAM,cAAc,CAAC,YAAY;AAC/B,UAAQ,SAAS;AAAA,IACf,KAAK,kBAAkB;AACrB,aAAO,oBAAC,mBAAgB,eAAY,eAAc,MAAM,kBAAkB;AAAA,IAC5E,KAAK,kBAAkB;AACrB,aAAO,oBAAC,gBAAa,eAAY,cAAa,MAAM,kBAAkB;AAAA,IACxE,KAAK,kBAAkB;AACrB,aAAO,oBAAC,mBAAgB,eAAY,gBAAe,MAAM,kBAAkB;AAAA,IAC7E,KAAK,kBAAkB;AACrB,aAAO,oBAAC,cAAW,eAAY,oBAAmB,MAAM,kBAAkB;AAAA,IAC5E;AACE,aAAO,oBAAC,cAAW,eAAY,aAAY,MAAM,kBAAkB;AAAA,EACvE;AACF;AAEO,MAAM,eAAe,CAAC,EAAE,aAAa,MAC1C,oBAAC,iBAAc,YAAY,EAAE,MAAM,aAAa,GAAI,sBAAY,YAAY,GAAE;AAGhF,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import DSButton from "@elliemae/ds-button";
|
|
4
|
-
import { ModalFooter, ModalFooterActions } from "../blocks";
|
|
4
|
+
import { ModalFooter, ModalFooterActions } from "../blocks.js";
|
|
5
5
|
const Footer = ({
|
|
6
6
|
additionalFooterCssClass,
|
|
7
7
|
actionsRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/Footer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalFooter, ModalFooterActions } from '../blocks';\n\nexport const Footer = ({\n additionalFooterCssClass,\n actionsRef,\n rejectLabel,\n onReject,\n overridePropsRejectButton,\n confirmLabel,\n onConfirm,\n overridePropsConfirmButton,\n showRejectButton,\n}) => (\n <ModalFooter classProps={{ additionalFooterCssClass }} data-testid=\"modal-footer-wrapper\">\n <ModalFooterActions ref={actionsRef}>\n {showRejectButton === true && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...overridePropsRejectButton}\n />\n )}\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...overridePropsConfirmButton}\n />\n </ModalFooterActions>\n </ModalFooter>\n);\n\nexport default Footer;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalFooter, ModalFooterActions } from '../blocks.js';\n\nexport const Footer = ({\n additionalFooterCssClass,\n actionsRef,\n rejectLabel,\n onReject,\n overridePropsRejectButton,\n confirmLabel,\n onConfirm,\n overridePropsConfirmButton,\n showRejectButton,\n}) => (\n <ModalFooter classProps={{ additionalFooterCssClass }} data-testid=\"modal-footer-wrapper\">\n <ModalFooterActions ref={actionsRef}>\n {showRejectButton === true && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...overridePropsRejectButton}\n />\n )}\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...overridePropsConfirmButton}\n />\n </ModalFooterActions>\n </ModalFooter>\n);\n\nexport default Footer;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACiBnB,SAEI,KAFJ;AAfJ,OAAO,cAAc;AACrB,SAAS,aAAa,0BAA0B;AAEzC,MAAM,SAAS,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,oBAAC,eAAY,YAAY,EAAE,yBAAyB,GAAG,eAAY,wBACjE,+BAAC,sBAAmB,KAAK,YACtB;AAAA,uBAAqB,QACpB;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,WAAU;AAAA,MACV,gBAAgB,EAAE,eAAe,0BAA0B;AAAA,MAC3D,WAAW;AAAA,MACX,SAAS;AAAA,MACR,GAAG;AAAA;AAAA,EACN;AAAA,EAEF;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,WAAU;AAAA,MACV,gBAAgB,EAAE,eAAe,2BAA2B;AAAA,MAC5D,WAAW;AAAA,MACX,SAAS;AAAA,MACR,GAAG;AAAA;AAAA,EACN;AAAA,GACF,GACF;AAGF,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Close } from "@elliemae/ds-icons";
|
|
4
4
|
import DSButton from "@elliemae/ds-button";
|
|
5
|
-
import { ModalHeader, ModalHeaderTopRight } from "../blocks";
|
|
6
|
-
import { Title } from "./Title";
|
|
5
|
+
import { ModalHeader, ModalHeaderTopRight } from "../blocks.js";
|
|
6
|
+
import { Title } from "./Title.js";
|
|
7
7
|
const FormHeader = ({ showClose, modalTitle, modalType, onClose }) => /* @__PURE__ */ jsxs(ModalHeader, { classProps: { type: "selection" }, children: [
|
|
8
8
|
/* @__PURE__ */ jsx(Title, { modalTitle, modalType }),
|
|
9
9
|
/* @__PURE__ */ jsx(ModalHeaderTopRight, { classProps: { type: "form" }, children: showClose && /* @__PURE__ */ jsx(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/FormHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalHeader, ModalHeaderTopRight } from '../blocks';\nimport { Title } from './Title';\n\nexport const FormHeader = ({ showClose, modalTitle, modalType, onClose }) => (\n <ModalHeader classProps={{ type: 'selection' }}>\n <Title modalTitle={modalTitle} modalType={modalType} />\n <ModalHeaderTopRight classProps={{ type: 'form' }}>\n {showClose && (\n <DSButton\n buttonType=\"link\"\n containerProps={{ 'data-testid': 'modal-close-btn' }}\n icon={<Close color={['neutral', '900']} />}\n onClick={onClose}\n />\n )}\n </ModalHeaderTopRight>\n </ModalHeader>\n);\n\nexport default FormHeader;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalHeader, ModalHeaderTopRight } from '../blocks.js';\nimport { Title } from './Title.js';\n\nexport const FormHeader = ({ showClose, modalTitle, modalType, onClose }) => (\n <ModalHeader classProps={{ type: 'selection' }}>\n <Title modalTitle={modalTitle} modalType={modalType} />\n <ModalHeaderTopRight classProps={{ type: 'form' }}>\n {showClose && (\n <DSButton\n buttonType=\"link\"\n containerProps={{ 'data-testid': 'modal-close-btn' }}\n icon={<Close color={['neutral', '900']} />}\n onClick={onClose}\n />\n )}\n </ModalHeaderTopRight>\n </ModalHeader>\n);\n\nexport default FormHeader;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACQrB,SACE,KADF;AANF,SAAS,aAAa;AACtB,OAAO,cAAc;AACrB,SAAS,aAAa,2BAA2B;AACjD,SAAS,aAAa;AAEf,MAAM,aAAa,CAAC,EAAE,WAAW,YAAY,WAAW,QAAQ,MACrE,qBAAC,eAAY,YAAY,EAAE,MAAM,YAAY,GAC3C;AAAA,sBAAC,SAAM,YAAwB,WAAsB;AAAA,EACrD,oBAAC,uBAAoB,YAAY,EAAE,MAAM,OAAO,GAC7C,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,gBAAgB,EAAE,eAAe,kBAAkB;AAAA,MACnD,MAAM,oBAAC,SAAM,OAAO,CAAC,WAAW,KAAK,GAAG;AAAA,MACxC,SAAS;AAAA;AAAA,EACX,GAEJ;AAAA,GACF;AAGF,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { MODAL_TYPE_V2 } from "../../constants";
|
|
4
|
-
import { SelectionHeader } from "./SelectionHeader";
|
|
5
|
-
import { DecisionHeader } from "./DecisionHeader";
|
|
6
|
-
import { FormHeader } from "./FormHeader";
|
|
7
|
-
import { FeedbackIcon } from "./FeedbackIcon";
|
|
8
|
-
import { Footer } from "./Footer";
|
|
9
|
-
import { Title } from "./Title";
|
|
10
|
-
import { showDecision, showFeedBack, showFooter, showSelection, showForm } from "../helpers";
|
|
11
|
-
import { ModalContent, ModalWrapper } from "../blocks";
|
|
3
|
+
import { MODAL_TYPE_V2 } from "../../constants.js";
|
|
4
|
+
import { SelectionHeader } from "./SelectionHeader.js";
|
|
5
|
+
import { DecisionHeader } from "./DecisionHeader.js";
|
|
6
|
+
import { FormHeader } from "./FormHeader.js";
|
|
7
|
+
import { FeedbackIcon } from "./FeedbackIcon.js";
|
|
8
|
+
import { Footer } from "./Footer.js";
|
|
9
|
+
import { Title } from "./Title.js";
|
|
10
|
+
import { showDecision, showFeedBack, showFooter, showSelection, showForm } from "../helpers.js";
|
|
11
|
+
import { ModalContent, ModalWrapper } from "../blocks.js";
|
|
12
12
|
const DSModalContent = ({
|
|
13
13
|
containerProps = {},
|
|
14
|
+
//
|
|
14
15
|
modalType = MODAL_TYPE_V2.INFORMATION,
|
|
15
16
|
modalSubType = null,
|
|
16
17
|
modalTitle = "",
|
|
17
18
|
showRejectButton = false,
|
|
18
19
|
showClose = true,
|
|
19
20
|
searchProps = {},
|
|
21
|
+
// override
|
|
20
22
|
actionsRef = () => null,
|
|
21
23
|
additionalFooterCssClass,
|
|
22
24
|
overridePropsConfirmButton = {},
|
|
23
25
|
overridePropsRejectButton = {},
|
|
26
|
+
// react modal
|
|
24
27
|
children,
|
|
25
28
|
onClose = () => null,
|
|
26
29
|
onConfirm = () => null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/ModalContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { MODAL_TYPE_V2 } from '../../constants';\nimport { SelectionHeader } from './SelectionHeader';\nimport { DecisionHeader } from './DecisionHeader';\nimport { FormHeader } from './FormHeader';\nimport { FeedbackIcon } from './FeedbackIcon';\nimport { Footer } from './Footer';\nimport { Title } from './Title';\nimport { showDecision, showFeedBack, showFooter, showSelection, showForm } from '../helpers';\nimport { ModalContent, ModalWrapper } from '../blocks';\n\nexport const DSModalContent = ({\n containerProps = {},\n //\n modalType = MODAL_TYPE_V2.INFORMATION,\n modalSubType = null,\n modalTitle = '',\n showRejectButton = false,\n showClose = true,\n searchProps = {},\n // override\n actionsRef = () => null,\n additionalFooterCssClass,\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n // react modal\n children,\n onClose = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Discard',\n confirmLabel = 'Save',\n removePadding = false,\n}) => (\n <ModalWrapper {...containerProps}>\n {showForm({ modalType, modalSubType }) && (\n <FormHeader modalTitle={modalTitle} modalType={modalType} onClose={onClose} showClose={showClose} />\n )}\n {showSelection({ modalType, modalSubType }) && (\n <SelectionHeader modalTitle={modalTitle} modalType={modalType} searchProps={searchProps} showClose={showClose} />\n )}\n {showDecision({ modalType, modalSubType }) && <DecisionHeader onClose={onClose} showClose={showClose} />}\n {showFeedBack({ modalType, modalSubType }) && <FeedbackIcon modalSubType={modalSubType} />}\n {showDecision({ modalType, modalSubType }) && <Title modalTitle={modalTitle} modalType={modalType} />}\n <ModalContent classProps={{ type: modalType, removePadding }}>{children}</ModalContent>\n {showFooter({ modalType, modalSubType }) && (\n <Footer\n actionsRef={actionsRef}\n additionalFooterCssClass={additionalFooterCssClass}\n confirmLabel={confirmLabel}\n onConfirm={onConfirm}\n onReject={onReject}\n overridePropsConfirmButton={overridePropsConfirmButton}\n overridePropsRejectButton={overridePropsRejectButton}\n rejectLabel={rejectLabel}\n showRejectButton={showRejectButton}\n />\n )}\n </ModalWrapper>\n);\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACmCrB,SAEI,KAFJ;AAjCF,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,cAAc,cAAc,YAAY,eAAe,gBAAgB;AAChF,SAAS,cAAc,oBAAoB;AAEpC,MAAM,iBAAiB,CAAC;AAAA,EAC7B,iBAAiB,CAAC;AAAA,EAElB,YAAY,cAAc;AAAA,EAC1B,eAAe;AAAA,EACf,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc,CAAC;AAAA,EAEf,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA6B,CAAC;AAAA,EAC9B,4BAA4B,CAAC;AAAA,EAE7B;AAAA,EACA,UAAU,MAAM;AAAA,EAChB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,gBAAgB;AAClB,MACE,qBAAC,gBAAc,GAAG,gBACf;AAAA,WAAS,EAAE,WAAW,aAAa,CAAC,KACnC,oBAAC,cAAW,YAAwB,WAAsB,SAAkB,WAAsB;AAAA,EAEnG,cAAc,EAAE,WAAW,aAAa,CAAC,KACxC,oBAAC,mBAAgB,YAAwB,WAAsB,aAA0B,WAAsB;AAAA,EAEhH,aAAa,EAAE,WAAW,aAAa,CAAC,KAAK,oBAAC,kBAAe,SAAkB,WAAsB;AAAA,EACrG,aAAa,EAAE,WAAW,aAAa,CAAC,KAAK,oBAAC,gBAAa,cAA4B;AAAA,EACvF,aAAa,EAAE,WAAW,aAAa,CAAC,KAAK,oBAAC,SAAM,YAAwB,WAAsB;AAAA,EACnG,oBAAC,gBAAa,YAAY,EAAE,MAAM,WAAW,cAAc,GAAI,UAAS;AAAA,EACvE,WAAW,EAAE,WAAW,aAAa,CAAC,KACrC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAAA,GAEJ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { MODAL_TYPE_V2 } from '../../constants.js';\nimport { SelectionHeader } from './SelectionHeader.js';\nimport { DecisionHeader } from './DecisionHeader.js';\nimport { FormHeader } from './FormHeader.js';\nimport { FeedbackIcon } from './FeedbackIcon.js';\nimport { Footer } from './Footer.js';\nimport { Title } from './Title.js';\nimport { showDecision, showFeedBack, showFooter, showSelection, showForm } from '../helpers.js';\nimport { ModalContent, ModalWrapper } from '../blocks.js';\n\nexport const DSModalContent = ({\n containerProps = {},\n //\n modalType = MODAL_TYPE_V2.INFORMATION,\n modalSubType = null,\n modalTitle = '',\n showRejectButton = false,\n showClose = true,\n searchProps = {},\n // override\n actionsRef = () => null,\n additionalFooterCssClass,\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n // react modal\n children,\n onClose = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Discard',\n confirmLabel = 'Save',\n removePadding = false,\n}) => (\n <ModalWrapper {...containerProps}>\n {showForm({ modalType, modalSubType }) && (\n <FormHeader modalTitle={modalTitle} modalType={modalType} onClose={onClose} showClose={showClose} />\n )}\n {showSelection({ modalType, modalSubType }) && (\n <SelectionHeader modalTitle={modalTitle} modalType={modalType} searchProps={searchProps} showClose={showClose} />\n )}\n {showDecision({ modalType, modalSubType }) && <DecisionHeader onClose={onClose} showClose={showClose} />}\n {showFeedBack({ modalType, modalSubType }) && <FeedbackIcon modalSubType={modalSubType} />}\n {showDecision({ modalType, modalSubType }) && <Title modalTitle={modalTitle} modalType={modalType} />}\n <ModalContent classProps={{ type: modalType, removePadding }}>{children}</ModalContent>\n {showFooter({ modalType, modalSubType }) && (\n <Footer\n actionsRef={actionsRef}\n additionalFooterCssClass={additionalFooterCssClass}\n confirmLabel={confirmLabel}\n onConfirm={onConfirm}\n onReject={onReject}\n overridePropsConfirmButton={overridePropsConfirmButton}\n overridePropsRejectButton={overridePropsRejectButton}\n rejectLabel={rejectLabel}\n showRejectButton={showRejectButton}\n />\n )}\n </ModalWrapper>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmCrB,SAEI,KAFJ;AAjCF,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,cAAc,cAAc,YAAY,eAAe,gBAAgB;AAChF,SAAS,cAAc,oBAAoB;AAEpC,MAAM,iBAAiB,CAAC;AAAA,EAC7B,iBAAiB,CAAC;AAAA;AAAA,EAElB,YAAY,cAAc;AAAA,EAC1B,eAAe;AAAA,EACf,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc,CAAC;AAAA;AAAA,EAEf,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA6B,CAAC;AAAA,EAC9B,4BAA4B,CAAC;AAAA;AAAA,EAE7B;AAAA,EACA,UAAU,MAAM;AAAA,EAChB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,gBAAgB;AAClB,MACE,qBAAC,gBAAc,GAAG,gBACf;AAAA,WAAS,EAAE,WAAW,aAAa,CAAC,KACnC,oBAAC,cAAW,YAAwB,WAAsB,SAAkB,WAAsB;AAAA,EAEnG,cAAc,EAAE,WAAW,aAAa,CAAC,KACxC,oBAAC,mBAAgB,YAAwB,WAAsB,aAA0B,WAAsB;AAAA,EAEhH,aAAa,EAAE,WAAW,aAAa,CAAC,KAAK,oBAAC,kBAAe,SAAkB,WAAsB;AAAA,EACrG,aAAa,EAAE,WAAW,aAAa,CAAC,KAAK,oBAAC,gBAAa,cAA4B;AAAA,EACvF,aAAa,EAAE,WAAW,aAAa,CAAC,KAAK,oBAAC,SAAM,YAAwB,WAAsB;AAAA,EACnG,oBAAC,gBAAa,YAAY,EAAE,MAAM,WAAW,cAAc,GAAI,UAAS;AAAA,EACvE,WAAW,EAAE,WAAW,aAAa,CAAC,KACrC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAAA,GAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { DSSearchBox } from "@elliemae/ds-form";
|
|
4
|
-
import { ModalHeader, ModalHeaderTopRight } from "../blocks";
|
|
5
|
-
import { Title } from "./Title";
|
|
4
|
+
import { ModalHeader, ModalHeaderTopRight } from "../blocks.js";
|
|
5
|
+
import { Title } from "./Title.js";
|
|
6
6
|
const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose }) => /* @__PURE__ */ jsxs(ModalHeader, { classProps: { type: "selection" }, children: [
|
|
7
7
|
/* @__PURE__ */ jsx(Title, { modalTitle, modalType }),
|
|
8
8
|
showClose && /* @__PURE__ */ jsx(ModalHeaderTopRight, { classProps: { type: "selection" }, "data-testid": "modal-search-box", children: /* @__PURE__ */ jsx(DSSearchBox, { ...searchProps }) })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/SelectionHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSSearchBox } from '@elliemae/ds-form';\nimport { ModalHeader, ModalHeaderTopRight } from '../blocks';\nimport { Title } from './Title';\n\nexport const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose }) => (\n <ModalHeader classProps={{ type: 'selection' }}>\n <Title modalTitle={modalTitle} modalType={modalType} />\n {showClose && (\n <ModalHeaderTopRight classProps={{ type: 'selection' }} data-testid=\"modal-search-box\">\n <DSSearchBox {...searchProps} />\n </ModalHeaderTopRight>\n )}\n </ModalHeader>\n);\n\nexport default SelectionHeader;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSSearchBox } from '@elliemae/ds-form';\nimport { ModalHeader, ModalHeaderTopRight } from '../blocks.js';\nimport { Title } from './Title.js';\n\nexport const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose }) => (\n <ModalHeader classProps={{ type: 'selection' }}>\n <Title modalTitle={modalTitle} modalType={modalType} />\n {showClose && (\n <ModalHeaderTopRight classProps={{ type: 'selection' }} data-testid=\"modal-search-box\">\n <DSSearchBox {...searchProps} />\n </ModalHeaderTopRight>\n )}\n </ModalHeader>\n);\n\nexport default SelectionHeader;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACOrB,SACE,KADF;AALF,SAAS,mBAAmB;AAC5B,SAAS,aAAa,2BAA2B;AACjD,SAAS,aAAa;AAEf,MAAM,kBAAkB,CAAC,EAAE,cAAc,CAAC,GAAG,YAAY,WAAW,UAAU,MACnF,qBAAC,eAAY,YAAY,EAAE,MAAM,YAAY,GAC3C;AAAA,sBAAC,SAAM,YAAwB,WAAsB;AAAA,EACpD,aACC,oBAAC,uBAAoB,YAAY,EAAE,MAAM,YAAY,GAAG,eAAY,oBAClE,8BAAC,eAAa,GAAG,aAAa,GAChC;AAAA,GAEJ;AAGF,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { ModalTitle } from "../blocks";
|
|
3
|
+
import { ModalTitle } from "../blocks.js";
|
|
4
4
|
const Title = ({ modalTitle, modalType }) => /* @__PURE__ */ jsx(ModalTitle, { classProps: { type: modalType }, children: modalTitle });
|
|
5
5
|
var Title_default = Title;
|
|
6
6
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/Title.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { ModalTitle } from '../blocks';\n\nexport const Title = ({ modalTitle, modalType }) => (\n <ModalTitle classProps={{ type: modalType }}>{modalTitle}</ModalTitle>\n);\n\nexport default Title;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { ModalTitle } from '../blocks.js';\n\nexport const Title = ({ modalTitle, modalType }) => (\n <ModalTitle classProps={{ type: modalType }}>{modalTitle}</ModalTitle>\n);\n\nexport default Title;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACKrB;AAHF,SAAS,kBAAkB;AAEpB,MAAM,QAAQ,CAAC,EAAE,YAAY,UAAU,MAC5C,oBAAC,cAAW,YAAY,EAAE,MAAM,UAAU,GAAI,sBAAW;AAG3D,IAAO,gBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/v2/helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from "../constants";
|
|
2
|
+
import { MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from "../constants.js";
|
|
3
3
|
function showDecision({ modalType }) {
|
|
4
4
|
return [MODAL_TYPE_V2.INFORMATION, MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1;
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/helpers.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from '../constants';\n\nexport function showDecision({ modalType }) {\n return [MODAL_TYPE_V2.INFORMATION, MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1;\n}\n\nexport function showFeedBack({ modalType, modalSubType }) {\n return showDecision({ modalType }) && Object.values(MODAL_SUB_TYPE_V2).indexOf(modalSubType) > -1;\n}\n\nexport function showFooter({ modalType }) {\n return modalType !== MODAL_TYPE_V2.INFORMATION;\n}\n\nexport function showSelection({ modalType }) {\n return modalType === MODAL_TYPE_V2.SELECTION;\n}\nexport function showForm({ modalType }) {\n return modalType === MODAL_TYPE_V2.FORM;\n}\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from '../constants.js';\n\nexport function showDecision({ modalType }) {\n return [MODAL_TYPE_V2.INFORMATION, MODAL_TYPE_V2.DECISION].indexOf(modalType) > -1;\n}\n\nexport function showFeedBack({ modalType, modalSubType }) {\n return showDecision({ modalType }) && Object.values(MODAL_SUB_TYPE_V2).indexOf(modalSubType) > -1;\n}\n\nexport function showFooter({ modalType }) {\n return modalType !== MODAL_TYPE_V2.INFORMATION;\n}\n\nexport function showSelection({ modalType }) {\n return modalType === MODAL_TYPE_V2.SELECTION;\n}\nexport function showForm({ modalType }) {\n return modalType === MODAL_TYPE_V2.FORM;\n}\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe,yBAAyB;AAE1C,SAAS,aAAa,EAAE,UAAU,GAAG;AAC1C,SAAO,CAAC,cAAc,aAAa,cAAc,QAAQ,EAAE,QAAQ,SAAS,IAAI;AAClF;AAEO,SAAS,aAAa,EAAE,WAAW,aAAa,GAAG;AACxD,SAAO,aAAa,EAAE,UAAU,CAAC,KAAK,OAAO,OAAO,iBAAiB,EAAE,QAAQ,YAAY,IAAI;AACjG;AAEO,SAAS,WAAW,EAAE,UAAU,GAAG;AACxC,SAAO,cAAc,cAAc;AACrC;AAEO,SAAS,cAAc,EAAE,UAAU,GAAG;AAC3C,SAAO,cAAc,cAAc;AACrC;AACO,SAAS,SAAS,EAAE,UAAU,GAAG;AACtC,SAAO,cAAc,cAAc;AACrC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-modal",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.21",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Modal",
|
|
6
6
|
"files": [
|
|
@@ -101,18 +101,19 @@
|
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"prop-types": "~15.8.1",
|
|
103
103
|
"react-modal": "~3.16.1",
|
|
104
|
-
"styled-components": "~5.3.
|
|
105
|
-
"@elliemae/ds-button": "3.16.0-next.
|
|
106
|
-
"@elliemae/ds-
|
|
107
|
-
"@elliemae/ds-
|
|
108
|
-
"@elliemae/ds-
|
|
109
|
-
"@elliemae/ds-
|
|
110
|
-
"@elliemae/ds-
|
|
111
|
-
"@elliemae/ds-
|
|
112
|
-
"@elliemae/ds-
|
|
104
|
+
"styled-components": "~5.3.9",
|
|
105
|
+
"@elliemae/ds-button": "3.16.0-next.21",
|
|
106
|
+
"@elliemae/ds-classnames": "3.16.0-next.21",
|
|
107
|
+
"@elliemae/ds-form": "3.16.0-next.21",
|
|
108
|
+
"@elliemae/ds-icon": "3.16.0-next.21",
|
|
109
|
+
"@elliemae/ds-icons": "3.16.0-next.21",
|
|
110
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.21",
|
|
111
|
+
"@elliemae/ds-shared": "3.16.0-next.21",
|
|
112
|
+
"@elliemae/ds-system": "3.16.0-next.21",
|
|
113
|
+
"@elliemae/ds-utilities": "3.16.0-next.21"
|
|
113
114
|
},
|
|
114
115
|
"devDependencies": {
|
|
115
|
-
"@testing-library/jest-dom": "~5.16.
|
|
116
|
+
"@testing-library/jest-dom": "~5.16.5",
|
|
116
117
|
"@testing-library/react": "~12.1.3"
|
|
117
118
|
},
|
|
118
119
|
"peerDependencies": {
|
|
@@ -128,10 +129,10 @@
|
|
|
128
129
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
129
130
|
"test": "node ../../scripts/testing/test.mjs",
|
|
130
131
|
"lint": "node ../../scripts/lint.mjs",
|
|
131
|
-
"eslint:fix": "
|
|
132
|
-
"dts": "
|
|
132
|
+
"eslint:fix": "exit 0",
|
|
133
|
+
"dts": "exit 0",
|
|
133
134
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
134
|
-
"dev:build": "pnpm --filter {.}... build
|
|
135
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
135
136
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
136
137
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
137
138
|
}
|
package/dist/types/DSModal.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import { DSModalContent } from './v2/DSModal';
|
|
3
|
-
declare const DSModal: {
|
|
4
|
-
({ version, ...rest }: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
version?: number | undefined;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
propTypes: {
|
|
9
|
-
version: PropTypes.Requireable<number>;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export { DSModalContent, DSModal };
|
|
13
|
-
export default DSModal;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const MODAL_TYPE: {
|
|
2
|
-
DEFAULT: string;
|
|
3
|
-
ALERT: string;
|
|
4
|
-
CONFIRM: string;
|
|
5
|
-
NOTIFICATION: string;
|
|
6
|
-
WARNING: string;
|
|
7
|
-
ERROR: string;
|
|
8
|
-
SUCCESS: string;
|
|
9
|
-
HELP: string;
|
|
10
|
-
INFO: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const modalTypes: string[];
|
|
13
|
-
export declare const MODAL_TYPE_V2: {
|
|
14
|
-
INFORMATION: string;
|
|
15
|
-
DECISION: string;
|
|
16
|
-
SELECTION: string;
|
|
17
|
-
FORM: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const MODAL_SUB_TYPE_V2: {
|
|
20
|
-
SUCCESS: string;
|
|
21
|
-
WARNING: string;
|
|
22
|
-
ERROR: string;
|
|
23
|
-
INFORMATION: string;
|
|
24
|
-
};
|
|
25
|
-
export default MODAL_TYPE;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
declare const DSModal: {
|
|
3
|
-
({ containerProps, className, dataTestId, additionalFooterCssClass, style, iconCloseSize, modalType, showHeader, showFooter, children, centered, confirmLabel, modalTitle, size, isOpen, onClose, onAfterOpen, onConfirm, onReject, rejectLabel, shouldCloseOnOverlayClick, hasError, hasWarning, hasSuccess, hasInfo, hasHelp, actionsRef, appElement, overridePropsConfirmButton, overridePropsRejectButton, zIndex, }: {
|
|
4
|
-
containerProps?: {} | undefined;
|
|
5
|
-
className?: string | undefined;
|
|
6
|
-
dataTestId?: string | undefined;
|
|
7
|
-
additionalFooterCssClass?: string | undefined;
|
|
8
|
-
style?: {} | undefined;
|
|
9
|
-
iconCloseSize?: string | undefined;
|
|
10
|
-
modalType?: string | undefined;
|
|
11
|
-
showHeader?: boolean | undefined;
|
|
12
|
-
showFooter?: boolean | undefined;
|
|
13
|
-
children: any;
|
|
14
|
-
centered?: boolean | undefined;
|
|
15
|
-
confirmLabel?: string | undefined;
|
|
16
|
-
modalTitle?: string | undefined;
|
|
17
|
-
size?: string | undefined;
|
|
18
|
-
isOpen?: boolean | undefined;
|
|
19
|
-
onClose?: (() => null) | undefined;
|
|
20
|
-
onAfterOpen?: (() => null) | undefined;
|
|
21
|
-
onConfirm?: (() => null) | undefined;
|
|
22
|
-
onReject?: (() => null) | undefined;
|
|
23
|
-
rejectLabel?: string | undefined;
|
|
24
|
-
shouldCloseOnOverlayClick?: boolean | undefined;
|
|
25
|
-
hasError?: boolean | undefined;
|
|
26
|
-
hasWarning?: boolean | undefined;
|
|
27
|
-
hasSuccess?: boolean | undefined;
|
|
28
|
-
hasInfo?: boolean | undefined;
|
|
29
|
-
hasHelp?: boolean | undefined;
|
|
30
|
-
actionsRef?: (() => null) | undefined;
|
|
31
|
-
appElement?: string | undefined;
|
|
32
|
-
overridePropsConfirmButton?: {} | undefined;
|
|
33
|
-
overridePropsRejectButton?: {} | undefined;
|
|
34
|
-
zIndex?: number | undefined;
|
|
35
|
-
}): JSX.Element;
|
|
36
|
-
propTypes: {
|
|
37
|
-
className: PropTypes.Requireable<string>;
|
|
38
|
-
/**
|
|
39
|
-
* Add an additional css class to the footer
|
|
40
|
-
*/
|
|
41
|
-
additionalFooterCssClass: PropTypes.Requireable<string>;
|
|
42
|
-
/**
|
|
43
|
-
* Set style for the modal
|
|
44
|
-
*/
|
|
45
|
-
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
46
|
-
/**
|
|
47
|
-
* Select size for the close icon
|
|
48
|
-
*/
|
|
49
|
-
iconCloseSize: PropTypes.Requireable<"xxl" | "s" | "m" | "l" | "xxs" | "xs" | "xl">;
|
|
50
|
-
/**
|
|
51
|
-
* ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']
|
|
52
|
-
*/
|
|
53
|
-
modalType: PropTypes.Requireable<string>;
|
|
54
|
-
/**
|
|
55
|
-
* Show the header or not
|
|
56
|
-
*/
|
|
57
|
-
showHeader: PropTypes.Requireable<boolean>;
|
|
58
|
-
/**
|
|
59
|
-
* Show the footer or not
|
|
60
|
-
*/
|
|
61
|
-
showFooter: PropTypes.Requireable<boolean>;
|
|
62
|
-
/**
|
|
63
|
-
* Main content of the modal
|
|
64
|
-
*/
|
|
65
|
-
children: PropTypes.Validator<any>;
|
|
66
|
-
/**
|
|
67
|
-
* Content is centered or not
|
|
68
|
-
*/
|
|
69
|
-
centered: PropTypes.Requireable<boolean>;
|
|
70
|
-
/**
|
|
71
|
-
* Text to be added in the confirm button
|
|
72
|
-
*/
|
|
73
|
-
confirmLabel: PropTypes.Requireable<string>;
|
|
74
|
-
/**
|
|
75
|
-
* Text to be added in the modal title
|
|
76
|
-
*/
|
|
77
|
-
modalTitle: PropTypes.Requireable<string>;
|
|
78
|
-
/**
|
|
79
|
-
* Text to be added in the modal title
|
|
80
|
-
*/
|
|
81
|
-
size: PropTypes.Requireable<"small" | "medium" | "xsmall" | "large" | "xlarge">;
|
|
82
|
-
/**
|
|
83
|
-
* Modal is open or not
|
|
84
|
-
*/
|
|
85
|
-
isOpen: PropTypes.Requireable<boolean>;
|
|
86
|
-
/**
|
|
87
|
-
* Allows a function to be triggered once the modal is closed
|
|
88
|
-
*/
|
|
89
|
-
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
90
|
-
/**
|
|
91
|
-
* Allows a function to be triggered once the modal is opened
|
|
92
|
-
*/
|
|
93
|
-
onAfterOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
94
|
-
/**
|
|
95
|
-
* Allows a function to be triggered once the modal open is confirmed
|
|
96
|
-
*/
|
|
97
|
-
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
98
|
-
/**
|
|
99
|
-
* Allows a function to be triggered once the modal open is rejected
|
|
100
|
-
*/
|
|
101
|
-
onReject: PropTypes.Requireable<(...args: any[]) => any>;
|
|
102
|
-
/**
|
|
103
|
-
* Text to be added in the reject button
|
|
104
|
-
*/
|
|
105
|
-
rejectLabel: PropTypes.Requireable<string>;
|
|
106
|
-
/**
|
|
107
|
-
* If modal should close on overlay click
|
|
108
|
-
*/
|
|
109
|
-
shouldCloseOnOverlayClick: PropTypes.Requireable<boolean>;
|
|
110
|
-
/**
|
|
111
|
-
* Modal has error or not
|
|
112
|
-
*/
|
|
113
|
-
hasError: PropTypes.Requireable<boolean>;
|
|
114
|
-
/**
|
|
115
|
-
* Modal has warning or not
|
|
116
|
-
*/
|
|
117
|
-
hasWarning: PropTypes.Requireable<boolean>;
|
|
118
|
-
/**
|
|
119
|
-
* Modal has success or not
|
|
120
|
-
*/
|
|
121
|
-
hasSuccess: PropTypes.Requireable<boolean>;
|
|
122
|
-
/**
|
|
123
|
-
* Modal has info or not
|
|
124
|
-
*/
|
|
125
|
-
hasInfo: PropTypes.Requireable<boolean>;
|
|
126
|
-
/**
|
|
127
|
-
* Modal has help or not
|
|
128
|
-
*/
|
|
129
|
-
hasHelp: PropTypes.Requireable<boolean>;
|
|
130
|
-
actionsRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
|
-
appElement: PropTypes.Requireable<string>;
|
|
132
|
-
/**
|
|
133
|
-
* Customized props for the confirm button
|
|
134
|
-
*/
|
|
135
|
-
overridePropsConfirmButton: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
136
|
-
/**
|
|
137
|
-
* Customized props for the reject button
|
|
138
|
-
*/
|
|
139
|
-
overridePropsRejectButton: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
export default DSModal;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const modalTypes: any[];
|