@elliemae/ds-modal 2.3.0-next.0 → 3.0.0-alpha.0

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 (126) hide show
  1. package/dist/cjs/DSModal.js +88 -0
  2. package/dist/cjs/DSModal.js.map +7 -0
  3. package/dist/cjs/constants.js +73 -0
  4. package/dist/cjs/constants.js.map +7 -0
  5. package/dist/cjs/index.js +43 -0
  6. package/dist/cjs/index.js.map +7 -0
  7. package/dist/cjs/v1/DSModal.js +177 -0
  8. package/dist/cjs/v1/DSModal.js.map +7 -0
  9. package/dist/cjs/v1/DSModalType.js +45 -0
  10. package/dist/cjs/v1/DSModalType.js.map +7 -0
  11. package/dist/cjs/v1/DSModalWrapper.js +129 -0
  12. package/dist/cjs/v1/DSModalWrapper.js.map +7 -0
  13. package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js +103 -0
  14. package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
  15. package/dist/cjs/v2/DSModal.js +160 -0
  16. package/dist/cjs/v2/DSModal.js.map +7 -0
  17. package/dist/cjs/v2/blocks.js +71 -0
  18. package/dist/cjs/v2/blocks.js.map +7 -0
  19. package/dist/cjs/v2/components/DecisionHeader.js +48 -0
  20. package/dist/cjs/v2/components/DecisionHeader.js.map +7 -0
  21. package/dist/cjs/v2/components/FeedbackIcon.js +73 -0
  22. package/dist/cjs/v2/components/FeedbackIcon.js.map +7 -0
  23. package/dist/cjs/v2/components/Footer.js +69 -0
  24. package/dist/cjs/v2/components/Footer.js.map +7 -0
  25. package/dist/cjs/v2/components/FormHeader.js +54 -0
  26. package/dist/cjs/v2/components/FormHeader.js.map +7 -0
  27. package/dist/cjs/v2/components/ModalContent.js +96 -0
  28. package/dist/cjs/v2/components/ModalContent.js.map +7 -0
  29. package/dist/cjs/v2/components/SelectionHeader.js +51 -0
  30. package/dist/cjs/v2/components/SelectionHeader.js.map +7 -0
  31. package/dist/cjs/v2/components/Title.js +41 -0
  32. package/dist/cjs/v2/components/Title.js.map +7 -0
  33. package/dist/cjs/v2/helpers.js +54 -0
  34. package/dist/cjs/v2/helpers.js.map +7 -0
  35. package/dist/esm/DSModal.js +59 -0
  36. package/dist/esm/DSModal.js.map +7 -0
  37. package/dist/esm/constants.js +44 -0
  38. package/dist/esm/constants.js.map +7 -0
  39. package/dist/esm/index.js +14 -0
  40. package/dist/esm/index.js.map +7 -0
  41. package/dist/esm/v1/DSModal.js +148 -0
  42. package/dist/esm/v1/DSModal.js.map +7 -0
  43. package/dist/esm/v1/DSModalType.js +16 -0
  44. package/dist/esm/v1/DSModalType.js.map +7 -0
  45. package/dist/esm/v1/DSModalWrapper.js +100 -0
  46. package/dist/esm/v1/DSModalWrapper.js.map +7 -0
  47. package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js +74 -0
  48. package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
  49. package/dist/esm/v2/DSModal.js +131 -0
  50. package/dist/esm/v2/DSModal.js.map +7 -0
  51. package/dist/esm/v2/blocks.js +42 -0
  52. package/dist/esm/v2/blocks.js.map +7 -0
  53. package/dist/esm/v2/components/DecisionHeader.js +19 -0
  54. package/dist/esm/v2/components/DecisionHeader.js.map +7 -0
  55. package/dist/esm/v2/components/FeedbackIcon.js +44 -0
  56. package/dist/esm/v2/components/FeedbackIcon.js.map +7 -0
  57. package/dist/esm/v2/components/Footer.js +40 -0
  58. package/dist/esm/v2/components/Footer.js.map +7 -0
  59. package/dist/esm/v2/components/FormHeader.js +25 -0
  60. package/dist/esm/v2/components/FormHeader.js.map +7 -0
  61. package/dist/esm/v2/components/ModalContent.js +73 -0
  62. package/dist/esm/v2/components/ModalContent.js.map +7 -0
  63. package/dist/esm/v2/components/SelectionHeader.js +22 -0
  64. package/dist/esm/v2/components/SelectionHeader.js.map +7 -0
  65. package/dist/esm/v2/components/Title.js +12 -0
  66. package/dist/esm/v2/components/Title.js.map +7 -0
  67. package/dist/esm/v2/helpers.js +25 -0
  68. package/dist/esm/v2/helpers.js.map +7 -0
  69. package/{types → dist/types}/DSModal.d.ts +1 -1
  70. package/{types → dist/types}/constants.d.ts +0 -0
  71. package/dist/types/index.d.ts +3 -0
  72. package/{types → dist/types}/v1/DSModal.d.ts +0 -0
  73. package/{types → dist/types}/v1/DSModalType.d.ts +0 -0
  74. package/{types → dist/types}/v1/ModalFeedBack/ModalFeedBack.d.ts +0 -0
  75. package/{types → dist/types}/v2/DSModal.d.ts +0 -0
  76. package/{types → dist/types}/v2/blocks.d.ts +0 -0
  77. package/{types → dist/types}/v2/components/DecisionHeader.d.ts +0 -0
  78. package/{types → dist/types}/v2/components/FeedbackIcon.d.ts +0 -0
  79. package/{types → dist/types}/v2/components/Footer.d.ts +0 -0
  80. package/{types → dist/types}/v2/components/FormHeader.d.ts +0 -0
  81. package/{types → dist/types}/v2/components/ModalContent.d.ts +0 -0
  82. package/{types → dist/types}/v2/components/SelectionHeader.d.ts +0 -0
  83. package/{types → dist/types}/v2/components/Title.d.ts +0 -0
  84. package/{types → dist/types}/v2/components/tests/DecisionHeader.test.d.ts +0 -0
  85. package/{types → dist/types}/v2/components/tests/FeedbackIcon.test.d.ts +0 -0
  86. package/{types → dist/types}/v2/components/tests/Footer.test.d.ts +0 -0
  87. package/{types → dist/types}/v2/components/tests/FormHeader.test.d.ts +0 -0
  88. package/{types → dist/types}/v2/components/tests/SelectionHeader.test.d.ts +0 -0
  89. package/{types → dist/types}/v2/helpers.d.ts +0 -0
  90. package/{types → dist/types}/v2/tests/DSModal.test.d.ts +0 -0
  91. package/package.json +63 -55
  92. package/cjs/DSModal.js +0 -186
  93. package/cjs/constants.js +0 -34
  94. package/cjs/index.js +0 -18
  95. package/cjs/v1/DSModal.js +0 -148
  96. package/cjs/v1/DSModalType.js +0 -7
  97. package/cjs/v1/DSModalWrapper.js +0 -166
  98. package/cjs/v1/ModalFeedBack/ModalFeedBack.js +0 -98
  99. package/cjs/v2/DSModal.js +0 -203
  100. package/cjs/v2/blocks.js +0 -88
  101. package/cjs/v2/components/DecisionHeader.js +0 -38
  102. package/cjs/v2/components/FeedbackIcon.js +0 -64
  103. package/cjs/v2/components/Footer.js +0 -66
  104. package/cjs/v2/components/FormHeader.js +0 -47
  105. package/cjs/v2/components/ModalContent.js +0 -112
  106. package/cjs/v2/components/SelectionHeader.js +0 -49
  107. package/cjs/v2/components/Title.js +0 -26
  108. package/cjs/v2/helpers.js +0 -45
  109. package/esm/DSModal.js +0 -175
  110. package/esm/constants.js +0 -26
  111. package/esm/index.js +0 -4
  112. package/esm/v1/DSModal.js +0 -139
  113. package/esm/v1/DSModalType.js +0 -3
  114. package/esm/v1/DSModalWrapper.js +0 -160
  115. package/esm/v1/ModalFeedBack/ModalFeedBack.js +0 -92
  116. package/esm/v2/DSModal.js +0 -192
  117. package/esm/v2/blocks.js +0 -77
  118. package/esm/v2/components/DecisionHeader.js +0 -28
  119. package/esm/v2/components/FeedbackIcon.js +0 -55
  120. package/esm/v2/components/Footer.js +0 -55
  121. package/esm/v2/components/FormHeader.js +0 -37
  122. package/esm/v2/components/ModalContent.js +0 -103
  123. package/esm/v2/components/SelectionHeader.js +0 -39
  124. package/esm/v2/components/Title.js +0 -17
  125. package/esm/v2/helpers.js +0 -37
  126. package/types/index.d.ts +0 -4
@@ -0,0 +1,148 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import PropTypes from "prop-types";
4
+ import ReactModal from "react-modal";
5
+ import { convertPropToCssClassName } from "@elliemae/ds-classnames";
6
+ import { DSIconSizes } from "@elliemae/ds-icon";
7
+ import { Close } from "@elliemae/ds-icons";
8
+ import DSButton from "@elliemae/ds-button";
9
+ import MODAL_TYPE, { modalTypes } from "../constants";
10
+ import ModalFeedBack from "./ModalFeedBack/ModalFeedBack";
11
+ import { sizes, iconSizes } from "@elliemae/ds-shared/prop-types";
12
+ const DSModal = ({
13
+ containerProps = {},
14
+ className = "",
15
+ dataTestId = "ds-modal",
16
+ additionalFooterCssClass = "",
17
+ style = {},
18
+ iconCloseSize = DSIconSizes.S,
19
+ modalType = MODAL_TYPE.DEFAULT,
20
+ showHeader = true,
21
+ showFooter = true,
22
+ children,
23
+ centered = true,
24
+ confirmLabel = "Accept",
25
+ modalTitle = "",
26
+ size = "medium",
27
+ isOpen = false,
28
+ onClose = () => null,
29
+ onAfterOpen = () => null,
30
+ onConfirm = () => null,
31
+ onReject = () => null,
32
+ rejectLabel = "Cancel",
33
+ shouldCloseOnOverlayClick = false,
34
+ hasError = false,
35
+ hasWarning = false,
36
+ hasSuccess = false,
37
+ hasInfo = false,
38
+ hasHelp = false,
39
+ actionsRef = () => null,
40
+ appElement = "#root",
41
+ overridePropsConfirmButton = {},
42
+ overridePropsRejectButton = {},
43
+ zIndex = 10
44
+ }) => {
45
+ typeof document !== "undefined" && document && ReactModal.setAppElement && ReactModal.setAppElement(appElement);
46
+ const { cssClassName, classNameElement, classNameBlock, classNameModifier, classNameBlockModifier } = convertPropToCssClassName("modal", className, {
47
+ hasError,
48
+ hasWarning,
49
+ hasSuccess,
50
+ modalType,
51
+ size
52
+ });
53
+ const { WARNING, ERROR, SUCCESS, HELP, INFO } = MODAL_TYPE;
54
+ const isAFeedbackType = [WARNING, ERROR, SUCCESS, HELP, INFO].indexOf(modalType) > -1;
55
+ const showFeedBack = isAFeedbackType || hasError || hasWarning || hasSuccess || hasInfo || hasHelp;
56
+ return /* @__PURE__ */ React2.createElement(ReactModal, {
57
+ testId: dataTestId,
58
+ className: cssClassName,
59
+ contentLabel: modalTitle,
60
+ isOpen,
61
+ onAfterOpen,
62
+ onRequestClose: onClose,
63
+ overlayClassName: `${classNameBlock("overlay")} ${classNameModifier(centered && "center")}`,
64
+ shouldCloseOnOverlayClick,
65
+ style: {
66
+ content: {
67
+ ...style
68
+ },
69
+ overlay: {
70
+ zIndex
71
+ }
72
+ }
73
+ }, /* @__PURE__ */ React2.createElement("div", {
74
+ ...containerProps
75
+ }, showHeader && /* @__PURE__ */ React2.createElement("div", {
76
+ className: classNameBlock("modal-header")
77
+ }, /* @__PURE__ */ React2.createElement("div", {
78
+ className: classNameElement("title", "modal-header")
79
+ }, modalTitle), /* @__PURE__ */ React2.createElement("div", {
80
+ className: classNameElement("icon", "modal-header")
81
+ }, /* @__PURE__ */ React2.createElement(DSButton, {
82
+ buttonType: "link",
83
+ icon: /* @__PURE__ */ React2.createElement(Close, null),
84
+ onClick: onClose,
85
+ size: iconCloseSize
86
+ }))), /* @__PURE__ */ React2.createElement("div", {
87
+ className: classNameElement("body")
88
+ }, showFeedBack && /* @__PURE__ */ React2.createElement(ModalFeedBack, {
89
+ hasError,
90
+ hasHelp,
91
+ hasInfo,
92
+ hasSuccess,
93
+ hasWarning,
94
+ modalType
95
+ }), children), showFooter && !isAFeedbackType && /* @__PURE__ */ React2.createElement("div", {
96
+ className: `${classNameBlock("modal-footer")} ${additionalFooterCssClass ? classNameBlockModifier(additionalFooterCssClass, "modal-footer") : ""}`
97
+ }, /* @__PURE__ */ React2.createElement("div", {
98
+ ref: actionsRef,
99
+ className: classNameBlock("modal-footer-actions")
100
+ }, modalType === MODAL_TYPE.CONFIRM && /* @__PURE__ */ React2.createElement(DSButton, {
101
+ buttonType: "secondary",
102
+ className: `${classNameElement("button-action")} ${classNameModifier("reject", "button-action")} `,
103
+ labelText: rejectLabel,
104
+ onClick: onReject,
105
+ ...overridePropsRejectButton
106
+ }), /* @__PURE__ */ React2.createElement(DSButton, {
107
+ buttonType: "primary",
108
+ className: `${classNameElement("button-action")} ${classNameModifier("confirm", "button-action")} `,
109
+ labelText: confirmLabel,
110
+ onClick: onConfirm,
111
+ ...overridePropsConfirmButton
112
+ })))));
113
+ };
114
+ DSModal.propTypes = {
115
+ className: PropTypes.string,
116
+ additionalFooterCssClass: PropTypes.string,
117
+ style: PropTypes.shape({}),
118
+ iconCloseSize: PropTypes.oneOf(iconSizes),
119
+ modalType: PropTypes.oneOf(modalTypes),
120
+ showHeader: PropTypes.bool,
121
+ showFooter: PropTypes.bool,
122
+ children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired,
123
+ centered: PropTypes.bool,
124
+ confirmLabel: PropTypes.string,
125
+ modalTitle: PropTypes.string,
126
+ size: PropTypes.oneOf(sizes),
127
+ isOpen: PropTypes.bool,
128
+ onClose: PropTypes.func,
129
+ onAfterOpen: PropTypes.func,
130
+ onConfirm: PropTypes.func,
131
+ onReject: PropTypes.func,
132
+ rejectLabel: PropTypes.string,
133
+ shouldCloseOnOverlayClick: PropTypes.bool,
134
+ hasError: PropTypes.bool,
135
+ hasWarning: PropTypes.bool,
136
+ hasSuccess: PropTypes.bool,
137
+ hasInfo: PropTypes.bool,
138
+ hasHelp: PropTypes.bool,
139
+ actionsRef: PropTypes.func,
140
+ appElement: PropTypes.string,
141
+ overridePropsConfirmButton: PropTypes.shape({}),
142
+ overridePropsRejectButton: PropTypes.shape({})
143
+ };
144
+ var DSModal_default = DSModal;
145
+ export {
146
+ DSModal_default as default
147
+ };
148
+ //# sourceMappingURL=DSModal.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DSModal.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactModal from 'react-modal';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport MODAL_TYPE, { modalTypes } from '../constants';\nimport ModalFeedBack from './ModalFeedBack/ModalFeedBack';\nimport { sizes, iconSizes } from '@elliemae/ds-shared/prop-types';\n\nconst DSModal = ({\n containerProps = {},\n className = '',\n dataTestId = 'ds-modal',\n additionalFooterCssClass = '',\n style = {},\n iconCloseSize = DSIconSizes.S,\n modalType = MODAL_TYPE.DEFAULT,\n showHeader = true,\n showFooter = true,\n children,\n centered = true,\n confirmLabel = 'Accept',\n modalTitle = '',\n size = 'medium',\n isOpen = false,\n onClose = () => null,\n onAfterOpen = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Cancel',\n shouldCloseOnOverlayClick = false,\n hasError = false,\n hasWarning = false,\n hasSuccess = false,\n hasInfo = false,\n hasHelp = false,\n actionsRef = () => null,\n appElement = '#root',\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n zIndex = 10,\n}) => {\n // http://reactcommunity.org/react-modal/accessibility/ https://github.com/reactjs/react-modal#examples\n typeof document !== 'undefined' && document && ReactModal.setAppElement && ReactModal.setAppElement(appElement); // eslint-disable-line\n const { cssClassName, classNameElement, classNameBlock, classNameModifier, classNameBlockModifier } =\n convertPropToCssClassName('modal', className, {\n hasError,\n hasWarning,\n hasSuccess,\n modalType,\n size,\n });\n\n const { WARNING, ERROR, SUCCESS, HELP, INFO } = MODAL_TYPE;\n\n const isAFeedbackType = [WARNING, ERROR, SUCCESS, HELP, INFO].indexOf(modalType) > -1;\n const showFeedBack = isAFeedbackType || hasError || hasWarning || hasSuccess || hasInfo || hasHelp;\n\n return (\n <ReactModal\n testId={dataTestId}\n className={cssClassName}\n contentLabel={modalTitle}\n isOpen={isOpen}\n onAfterOpen={onAfterOpen}\n onRequestClose={onClose}\n overlayClassName={`${classNameBlock('overlay')} ${classNameModifier(centered && 'center')}`}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n style={{\n content: {\n ...style,\n },\n overlay: {\n zIndex,\n },\n }}\n >\n <div {...containerProps}>\n {showHeader && (\n <div className={classNameBlock('modal-header')}>\n <div className={classNameElement('title', 'modal-header')}>{modalTitle}</div>\n <div className={classNameElement('icon', 'modal-header')}>\n <DSButton buttonType=\"link\" icon={<Close />} onClick={onClose} size={iconCloseSize} />\n </div>\n </div>\n )}\n <div className={classNameElement('body')}>\n {showFeedBack && (\n <ModalFeedBack\n hasError={hasError}\n hasHelp={hasHelp}\n hasInfo={hasInfo}\n hasSuccess={hasSuccess}\n hasWarning={hasWarning}\n modalType={modalType}\n />\n )}\n {children}\n </div>\n {showFooter && !isAFeedbackType && (\n <div\n className={`${classNameBlock('modal-footer')} ${\n additionalFooterCssClass ? classNameBlockModifier(additionalFooterCssClass, 'modal-footer') : ''\n }`}\n >\n <div ref={actionsRef} className={classNameBlock('modal-footer-actions')}>\n {modalType === MODAL_TYPE.CONFIRM && (\n <DSButton\n buttonType=\"secondary\"\n className={`${classNameElement('button-action')} ${classNameModifier('reject', 'button-action')} `}\n labelText={rejectLabel}\n onClick={onReject}\n {...overridePropsRejectButton}\n />\n )}\n <DSButton\n buttonType=\"primary\"\n className={`${classNameElement('button-action')} ${classNameModifier('confirm', 'button-action')} `}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...overridePropsConfirmButton}\n />\n </div>\n </div>\n )}\n </div>\n </ReactModal>\n );\n};\n\nDSModal.propTypes = {\n className: PropTypes.string,\n /**\n * Add an additional css class to the footer\n */\n additionalFooterCssClass: PropTypes.string,\n /**\n * Set style for the modal\n */\n style: PropTypes.shape({}),\n /**\n * Select size for the close icon\n */\n iconCloseSize: PropTypes.oneOf(iconSizes),\n /**\n * ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']\n */\n modalType: PropTypes.oneOf(modalTypes),\n /**\n * Show the header or not\n */\n showHeader: PropTypes.bool,\n /**\n * Show the footer or not\n */\n showFooter: PropTypes.bool,\n /**\n * Main content of the modal\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired,\n /**\n * Content is centered or not\n */\n centered: PropTypes.bool,\n /**\n * Text to be added in the confirm button\n */\n confirmLabel: PropTypes.string,\n /**\n * Text to be added in the modal title\n */\n modalTitle: PropTypes.string,\n /**\n * Text to be added in the modal title\n */\n size: PropTypes.oneOf(sizes),\n /**\n * Modal is open or not\n */\n isOpen: PropTypes.bool,\n /**\n * Allows a function to be triggered once the modal is closed\n */\n onClose: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal is opened\n */\n onAfterOpen: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal open is confirmed\n */\n onConfirm: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal open is rejected\n */\n onReject: PropTypes.func,\n /**\n * Text to be added in the reject button\n */\n rejectLabel: PropTypes.string,\n /**\n * If modal should close on overlay click\n */\n shouldCloseOnOverlayClick: PropTypes.bool,\n /**\n * Modal has error or not\n */\n hasError: PropTypes.bool,\n /**\n * Modal has warning or not\n */\n hasWarning: PropTypes.bool,\n /**\n * Modal has success or not\n */\n hasSuccess: PropTypes.bool,\n /**\n * Modal has info or not\n */\n hasInfo: PropTypes.bool,\n /**\n * Modal has help or not\n */\n hasHelp: PropTypes.bool,\n actionsRef: PropTypes.func,\n appElement: PropTypes.string,\n /**\n * Customized props for the confirm button\n */\n overridePropsConfirmButton: PropTypes.shape({}),\n /**\n * Customized props for the reject button\n */\n overridePropsRejectButton: PropTypes.shape({}),\n};\n\nexport default DSModal;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,2BAA2B;AAAA,EAC3B,QAAQ;AAAA,EACR,gBAAgB,YAAY;AAAA,EAC5B,YAAY,WAAW;AAAA,EACvB,aAAa;AAAA,EACb,aAAa;AAAA,EACb;AAAA,EACA,WAAW;AAAA,EACX,eAAe;AAAA,EACf,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU,MAAM;AAAA,EAChB,cAAc,MAAM;AAAA,EACpB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,4BAA4B;AAAA,EAC5B,WAAW;AAAA,EACX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,a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,UAAU;AAAA,EAItB,4BAA4B,UAAU,MAAM;AAAA,EAI5C,2BAA2B,UAAU,MAAM;AAAA;AAG7C,IAAO,kBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ const modalTypes = [
3
+ MODAL_TYPE.DEFAULT,
4
+ MODAL_TYPE.ALERT,
5
+ MODAL_TYPE.CONFIRM,
6
+ MODAL_TYPE.NOTIFICATION,
7
+ MODAL_TYPE.WARNING,
8
+ MODAL_TYPE.ERROR,
9
+ MODAL_TYPE.SUCCESS,
10
+ MODAL_TYPE.HELP,
11
+ MODAL_TYPE.INFO
12
+ ];
13
+ export {
14
+ modalTypes
15
+ };
16
+ //# sourceMappingURL=DSModalType.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DSModalType.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const modalTypes = [\n MODAL_TYPE.DEFAULT,\n MODAL_TYPE.ALERT,\n MODAL_TYPE.CONFIRM,\n MODAL_TYPE.NOTIFICATION,\n MODAL_TYPE.WARNING,\n MODAL_TYPE.ERROR,\n MODAL_TYPE.SUCCESS,\n MODAL_TYPE.HELP,\n MODAL_TYPE.INFO,\n];\n"],
5
+ "mappings": "AAAA;ACAO,MAAM,aAAa;AAAA,EACxB,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,100 @@
1
+ import * as React from "react";
2
+ import { Component, createElement } from "react";
3
+ import { MODAL_TYPE } from "../constants";
4
+ var DSModalWrapper_default = (WrappedComponent) => {
5
+ class DSModalWrapper extends Component {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.state = {
9
+ childready: false,
10
+ additionalFooterCssClass: "loading",
11
+ container: null,
12
+ actions: null,
13
+ height: "100%"
14
+ };
15
+ this.onHeaderHeight = (e) => {
16
+ this.heightHeaderFlag = true;
17
+ this.heightHeader = e.height || 0;
18
+ };
19
+ this.onFooterHeight = (e) => {
20
+ this.heightFooterFlag = true;
21
+ this.heightFooter = e.height || 0;
22
+ };
23
+ this.onResize = ({ bounds }) => {
24
+ if (this.heightFooterFlag && this.heightHeaderFlag) {
25
+ return this.setState({
26
+ height: bounds.height - this.heightFooter - this.heightHeader
27
+ });
28
+ }
29
+ return setTimeout(this.onResize({ bounds }), 0);
30
+ };
31
+ this.handleContainer = (node) => {
32
+ if (node)
33
+ this.setState({ container: node });
34
+ this.handleResize();
35
+ };
36
+ this.handleActions = (node) => {
37
+ if (node)
38
+ this.setState({ actions: node });
39
+ this.handleResize();
40
+ };
41
+ }
42
+ componentDidMount() {
43
+ window.addEventListener("resize", this.handleResize);
44
+ }
45
+ componentWillUnmount() {
46
+ window.removeEventListener("resize", this.handleResize);
47
+ }
48
+ handleResize() {
49
+ if (!this.state)
50
+ return null;
51
+ const { container, actions, childready } = this.state;
52
+ if (!childready)
53
+ return null;
54
+ this.setState({ additionalFooterCssClass: null });
55
+ const { clientWidth: containerWidth } = container;
56
+ const { clientWidth: actionsWidth } = actions;
57
+ if (containerWidth && actionsWidth && actionsWidth / containerWidth * 100 > 50) {
58
+ return this.setState({ additionalFooterCssClass: "fluid-actions" });
59
+ }
60
+ return this.setState({ additionalFooterCssClass: null });
61
+ }
62
+ verifyNodes() {
63
+ const { modalType } = this.props;
64
+ if (modalType !== MODAL_TYPE.DEFAULT) {
65
+ const nodesInterval = setInterval(() => {
66
+ const { container, actions } = this.state;
67
+ if (!container || !actions)
68
+ return null;
69
+ clearInterval(nodesInterval);
70
+ this.setState({ childready: true });
71
+ return this.handleResize();
72
+ }, 100);
73
+ }
74
+ }
75
+ render() {
76
+ const { props, state } = this;
77
+ const { additionalFooterCssClass, height } = state;
78
+ return createElement(WrappedComponent, {
79
+ ...props,
80
+ height,
81
+ onResize: this.onResize,
82
+ onFooterHeight: this.onFooterHeight,
83
+ onHeaderHeight: this.onHeaderHeight,
84
+ containerRef: this.handleContainer,
85
+ actionsRef: this.handleActions,
86
+ additionalFooterCssClass,
87
+ onAfterOpen: () => {
88
+ if (props.onAfterOpen)
89
+ props.onAfterOpen();
90
+ this.verifyNodes();
91
+ }
92
+ });
93
+ }
94
+ }
95
+ return DSModalWrapper;
96
+ };
97
+ export {
98
+ DSModalWrapper_default as default
99
+ };
100
+ //# sourceMappingURL=DSModalWrapper.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DSModalWrapper.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Component, createElement } from 'react';\nimport { MODAL_TYPE } from '../constants';\n\nexport default (WrappedComponent) => {\n class DSModalWrapper extends Component {\n state = {\n childready: false,\n additionalFooterCssClass: 'loading',\n container: null,\n actions: null,\n height: '100%',\n };\n\n componentDidMount() {\n window.addEventListener('resize', this.handleResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize);\n }\n\n onHeaderHeight = (e) => {\n this.heightHeaderFlag = true;\n this.heightHeader = e.height || 0;\n };\n\n onFooterHeight = (e) => {\n this.heightFooterFlag = true;\n this.heightFooter = e.height || 0;\n };\n\n onResize = ({ bounds }) => {\n if (this.heightFooterFlag && this.heightHeaderFlag) {\n return this.setState({\n height: bounds.height - this.heightFooter - this.heightHeader,\n });\n }\n return setTimeout(this.onResize({ bounds }), 0);\n };\n\n handleContainer = (node) => {\n if (node) this.setState({ container: node });\n this.handleResize();\n };\n\n handleActions = (node) => {\n if (node) this.setState({ actions: node });\n this.handleResize();\n };\n\n /**\n * Change button width to 100% if the\n * combined width of the button (or button group) exceed 50% of the container width.\n */\n handleResize() {\n if (!this.state) return null;\n const { container, actions, childready } = this.state;\n if (!childready) return null;\n this.setState({ additionalFooterCssClass: null }); // !important reset to default state to recalculate\n const { clientWidth: containerWidth } = container;\n const { clientWidth: actionsWidth } = actions;\n // Change button width to 100% if the combined width of the button (or button group) exceed 50% of the container width.\n if (\n containerWidth &&\n actionsWidth &&\n (actionsWidth / containerWidth) * 100 > 50\n ) {\n return this.setState({ additionalFooterCssClass: 'fluid-actions' });\n }\n return this.setState({ additionalFooterCssClass: null });\n }\n\n verifyNodes() {\n const { modalType } = this.props;\n if (modalType !== MODAL_TYPE.DEFAULT) {\n const nodesInterval = setInterval(() => {\n // !important it checks when nodes are availables\n const { container, actions } = this.state;\n if (!container || !actions) return null;\n clearInterval(nodesInterval);\n this.setState({ childready: true });\n return this.handleResize();\n }, 100);\n }\n }\n\n render() {\n const { props, state } = this;\n const { additionalFooterCssClass, height } = state;\n return createElement(WrappedComponent, {\n ...props,\n height,\n onResize: this.onResize,\n onFooterHeight: this.onFooterHeight,\n onHeaderHeight: this.onHeaderHeight,\n containerRef: this.handleContainer,\n actionsRef: this.handleActions,\n additionalFooterCssClass,\n onAfterOpen: () => {\n if (props.onAfterOpen) props.onAfterOpen();\n this.verifyNodes();\n },\n });\n }\n }\n\n return DSModalWrapper;\n};\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AAEA,IAAO,yBAAQ,CAAC,qBAAqB;AACnC,+BAA6B,UAAU;AAAA,IAAvC,cAJF;AAIE;AACE,mBAAQ;AAAA,QACN,YAAY;AAAA,QACZ,0BAA0B;AAAA,QAC1B,WAAW;AAAA,QACX,SAAS;AAAA,QACT,QAAQ;AAAA;AAWV,4BAAiB,CAAC,MAAM;AACtB,aAAK,mBAAmB;AACxB,aAAK,eAAe,EAAE,UAAU;AAAA;AAGlC,4BAAiB,CAAC,MAAM;AACtB,aAAK,mBAAmB;AACxB,aAAK,eAAe,EAAE,UAAU;AAAA;AAGlC,sBAAW,CAAC,EAAE,aAAa;AACzB,YAAI,KAAK,oBAAoB,KAAK,kBAAkB;AAClD,iBAAO,KAA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BAAgB,KAAK;AAAA,QACrB,gBAAgB,KAAK;AAAA,QACrB,cAAc,KAAK;AAAA,QACnB,YAAY,KAAK;AAAA,QACjB;AAAA,QACA,aAAa,MAAM;AACjB,cAAI,MAAM;AAAa,kBAAM;AAC7B,eAAK;AAAA;AAAA;AAAA;AAAA;AAMb,SAAO;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,74 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { WarningCircle, CheckmarkCircle, HelpCircle, InfoCircle } from "@elliemae/ds-icons";
4
+ import { convertPropToCssClassName } from "@elliemae/ds-classnames";
5
+ import { MODAL_TYPE } from "../../constants";
6
+ const feedbackIconSize = "xxl";
7
+ const { WARNING, ERROR, SUCCESS, HELP, INFO } = MODAL_TYPE;
8
+ const getModalType = (modalType, { hasError, hasWarning, hasSuccess, hasInfo, hasHelp }) => {
9
+ if ([WARNING, ERROR, SUCCESS, HELP, INFO].indexOf(modalType) > -1)
10
+ return modalType;
11
+ if (hasError)
12
+ return ERROR;
13
+ if (hasWarning)
14
+ return WARNING;
15
+ if (hasSuccess)
16
+ return SUCCESS;
17
+ if (hasHelp)
18
+ return HELP;
19
+ if (hasInfo)
20
+ return INFO;
21
+ return INFO;
22
+ };
23
+ const getIconType = (modalType) => {
24
+ switch (modalType) {
25
+ case WARNING:
26
+ case ERROR:
27
+ return /* @__PURE__ */ React2.createElement(WarningCircle, {
28
+ size: feedbackIconSize
29
+ });
30
+ case SUCCESS:
31
+ return /* @__PURE__ */ React2.createElement(CheckmarkCircle, {
32
+ size: feedbackIconSize
33
+ });
34
+ case HELP:
35
+ return /* @__PURE__ */ React2.createElement(HelpCircle, {
36
+ size: feedbackIconSize
37
+ });
38
+ case INFO:
39
+ return /* @__PURE__ */ React2.createElement(InfoCircle, {
40
+ size: feedbackIconSize
41
+ });
42
+ default:
43
+ return /* @__PURE__ */ React2.createElement(InfoCircle, {
44
+ size: feedbackIconSize
45
+ });
46
+ }
47
+ };
48
+ const ModalFeedBack = ({
49
+ className = "",
50
+ modalType = null,
51
+ hasError = false,
52
+ hasWarning = false,
53
+ hasSuccess = false,
54
+ hasInfo = false,
55
+ hasHelp = false
56
+ }) => {
57
+ const type = getModalType(modalType, {
58
+ hasError,
59
+ hasWarning,
60
+ hasSuccess,
61
+ hasInfo,
62
+ hasHelp
63
+ });
64
+ const { cssClassName } = convertPropToCssClassName("modal-feedback", className, { modalType: type });
65
+ const feedbackIcon = getIconType(type);
66
+ return /* @__PURE__ */ React2.createElement("div", {
67
+ className: cssClassName
68
+ }, feedbackIcon);
69
+ };
70
+ var ModalFeedBack_default = ModalFeedBack;
71
+ export {
72
+ ModalFeedBack_default as default
73
+ };
74
+ //# sourceMappingURL=ModalFeedBack.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v1/ModalFeedBack/ModalFeedBack.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { WarningCircle, CheckmarkCircle, HelpCircle, InfoCircle } from '@elliemae/ds-icons';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { MODAL_TYPE } from '../../constants';\n\nconst feedbackIconSize = 'xxl';\n\nconst { WARNING, ERROR, SUCCESS, HELP, INFO } = MODAL_TYPE;\n\nconst getModalType = (modalType, { hasError, hasWarning, hasSuccess, hasInfo, hasHelp }) => {\n if ([WARNING, ERROR, SUCCESS, HELP, INFO].indexOf(modalType) > -1) return modalType;\n if (hasError) return ERROR;\n if (hasWarning) return WARNING;\n if (hasSuccess) return SUCCESS;\n if (hasHelp) return HELP;\n if (hasInfo) return INFO;\n return INFO;\n};\n\nconst getIconType = (modalType) => {\n switch (modalType) {\n case WARNING:\n case ERROR:\n return <WarningCircle size={feedbackIconSize} />;\n case SUCCESS:\n return <CheckmarkCircle size={feedbackIconSize} />;\n case HELP:\n return <HelpCircle size={feedbackIconSize} />;\n case INFO:\n return <InfoCircle size={feedbackIconSize} />;\n default:\n return <InfoCircle size={feedbackIconSize} />;\n }\n};\n\nconst ModalFeedBack = ({\n className = '',\n modalType = null,\n hasError = false,\n hasWarning = false,\n hasSuccess = false,\n hasInfo = false,\n hasHelp = false,\n}) => {\n const type = getModalType(modalType, {\n hasError,\n hasWarning,\n hasSuccess,\n hasInfo,\n hasHelp,\n });\n const { cssClassName } = convertPropToCssClassName('modal-feedback', className, { modalType: type });\n const feedbackIcon = getIconType(type);\n\n return <div className={cssClassName}>{feedbackIcon}</div>;\n};\n\nexport default ModalFeedBack;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,mBAAmB;AAEzB,MAAM,EAAE,SAAS,OAAO,SAAS,MAAM,SAAS;AAEhD,MAAM,eAAe,CAAC,WAAW,EAAE,UAAU,YAAY,YAAY,SAAS,cAAc;AAC1F,MAAI,CAAC,SAAS,OAAO,SAAS,MAAM,MAAM,QAAQ,aAAa;AAAI,WAAO;AAC1E,MAAI;AAAU,WAAO;AACrB,MAAI;AAAY,WAAO;AACvB,MAAI;AAAY,WAAO;AACvB,MAAI;AAAS,WAAO;AACpB,MAAI;AAAS,WAAO;AACpB,SAAO;AAAA;AAGT,MAAM,cAAc,CAAC,cAAc;AACjC,UAAQ;AAAA,SACD;AAAA,SACA;AACH,aAAO,qCAAC,eAAD;AAAA,QAAe,MAAM;AAAA;AAAA,SACzB;AACH,aAAO,qCAAC,iBAAD;AAAA,QAAiB,MAAM;AAAA;AAAA,SAC3B;AACH,aAAO,qCAAC,YAAD;AAAA,QAAY,MAAM;AAAA;AAAA,SACtB;AACH,aAAO,qCAAC,YAAD;AAAA,QAAY,MAAM;AAAA;AAAA;AAEzB,aAAO,qCAAC,YAAD;AAAA,QAAY,MAAM;AAAA;AAAA;AAAA;AAI/B,MAAM,gBAAgB,CAAC;AAAA,EACrB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,MACN;AACJ,QAAM,OAAO,aAAa,WAAW;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAEF,QAAM,EAAE,iBAAiB,0BAA0B,kBAAkB,WAAW,EAAE,WAAW;AAC7F,QAAM,eAAe,YAAY;AAEjC,SAAO,qCAAC,OAAD;AAAA,IAAK,WAAW;AAAA,KAAe;AAAA;AAGxC,IAAO,wBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,131 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { PropTypes, describe } from "react-desc";
4
+ import ReactModal from "react-modal";
5
+ import { convertPropToCssClassName } from "@elliemae/ds-classnames";
6
+ import { MODAL_TYPE_V2 } from "../constants";
7
+ import { DSModalContent } from "./components/ModalContent";
8
+ const DSModal = ({
9
+ containerProps = {},
10
+ className = "",
11
+ style = {},
12
+ size = "default",
13
+ modalType = MODAL_TYPE_V2.INFORMATION,
14
+ modalSubType = null,
15
+ modalTitle = "",
16
+ dataTestId = "ds-modal",
17
+ centered = false,
18
+ showRejectButton = false,
19
+ showClose = true,
20
+ searchProps = {},
21
+ actionsRef = () => null,
22
+ additionalFooterCssClass,
23
+ overridePropsConfirmButton = {},
24
+ overridePropsRejectButton = {},
25
+ children,
26
+ isOpen = true,
27
+ onClose = () => null,
28
+ onAfterOpen = () => null,
29
+ onConfirm = () => null,
30
+ onReject = () => null,
31
+ rejectLabel = "Discard",
32
+ confirmLabel = "Save",
33
+ shouldCloseOnOverlayClick = false,
34
+ appElement = "#root",
35
+ zIndex = 10,
36
+ removePadding = false
37
+ }) => {
38
+ if (typeof document !== "undefined" && true && document && ReactModal.setAppElement) {
39
+ ReactModal.setAppElement(appElement);
40
+ }
41
+ const {
42
+ cssClassName,
43
+ classNameBlock,
44
+ classNameModifier
45
+ } = convertPropToCssClassName("modal-v2", className, { size });
46
+ return /* @__PURE__ */ React2.createElement(ReactModal, {
47
+ testId: dataTestId,
48
+ className: `${cssClassName} ${classNameBlock(`type-${modalType}`)}`,
49
+ contentLabel: modalTitle,
50
+ isOpen,
51
+ onAfterOpen,
52
+ onRequestClose: onClose,
53
+ overlayClassName: `${classNameBlock("overlay")} ${classNameModifier(centered ? "center" : "top")}`,
54
+ shouldCloseOnOverlayClick,
55
+ style: {
56
+ content: {
57
+ ...style
58
+ },
59
+ overlay: {
60
+ zIndex
61
+ }
62
+ }
63
+ }, /* @__PURE__ */ React2.createElement(DSModalContent, {
64
+ actionsRef,
65
+ additionalFooterCssClass,
66
+ confirmLabel,
67
+ containerProps,
68
+ modalSubType,
69
+ modalTitle,
70
+ modalType,
71
+ onClose,
72
+ onConfirm,
73
+ onReject,
74
+ overridePropsConfirmButton,
75
+ overridePropsRejectButton,
76
+ rejectLabel,
77
+ searchProps,
78
+ showClose,
79
+ showRejectButton,
80
+ removePadding
81
+ }, children));
82
+ };
83
+ const props = {
84
+ containerProps: PropTypes.object.description("inject props to container wrapper"),
85
+ className: PropTypes.string.description("css class"),
86
+ style: PropTypes.object.description("style object for container wrapper"),
87
+ modalTitle: PropTypes.string.description("modal container title"),
88
+ centered: PropTypes.bool.description("center container"),
89
+ showRejectButton: PropTypes.bool.description("show reject button"),
90
+ showClose: PropTypes.bool.description("show close button"),
91
+ searchProps: PropTypes.object.description("Props for search component"),
92
+ additionalFooterCssClass: PropTypes.string.description("css class for footer"),
93
+ overridePropsConfirmButton: PropTypes.object.description("override props confirm button"),
94
+ overridePropsRejectButton: PropTypes.object.description("override props reject button"),
95
+ isOpen: PropTypes.bool.description("controlled isOpen flag"),
96
+ onClose: PropTypes.func.description("close callback"),
97
+ onAfterOpen: PropTypes.func.description("after open callback"),
98
+ onConfirm: PropTypes.func.description("confirm callback"),
99
+ onReject: PropTypes.func.description("reject callback"),
100
+ rejectLabel: PropTypes.string.description("reject label"),
101
+ confirmLabel: PropTypes.string.description("confirm text string"),
102
+ size: PropTypes.oneOf([
103
+ "default",
104
+ "xx-large",
105
+ "x-large",
106
+ "large",
107
+ "medium",
108
+ "small"
109
+ ]).description("modal container size"),
110
+ modalSubType: PropTypes.any.description("modal sub type"),
111
+ modalType: PropTypes.any.description("modal type"),
112
+ actionsRef: PropTypes.any.description("ref for modal footer actions"),
113
+ children: PropTypes.oneOfType([
114
+ PropTypes.element,
115
+ PropTypes.arrayOf([PropTypes.element])
116
+ ]).description("modal container children"),
117
+ shouldCloseOnOverlayClick: PropTypes.bool.description("close on click outside container"),
118
+ appElement: PropTypes.string.description("App element ID to inject the modal"),
119
+ zIndex: PropTypes.number.description("zindex for modal container"),
120
+ removePadding: PropTypes.bool.description("remove modal builtin padding")
121
+ };
122
+ DSModal.propTypes = props;
123
+ const DSModalWithSchema = describe(DSModal);
124
+ DSModalWithSchema.propTypes = props;
125
+ var DSModal_default = DSModal;
126
+ export {
127
+ DSModalContent,
128
+ DSModalWithSchema,
129
+ DSModal_default as default
130
+ };
131
+ //# sourceMappingURL=DSModal.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/DSModal.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactModal from 'react-modal';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { MODAL_TYPE_V2 } from '../constants';\nimport { DSModalContent } from './components/ModalContent';\n\nconst DSModal = ({\n containerProps = {},\n className = '',\n style = {},\n size = 'default',\n //\n modalType = MODAL_TYPE_V2.INFORMATION,\n modalSubType = null,\n modalTitle = '',\n dataTestId = 'ds-modal',\n centered = false,\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 isOpen = true,\n onClose = () => null,\n onAfterOpen = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Discard',\n confirmLabel = 'Save',\n shouldCloseOnOverlayClick = false,\n appElement = '#root',\n zIndex = 10,\n removePadding = false,\n}) => {\n if (\n typeof document !== 'undefined' &&\n process.env.NODE_ENV !== 'test' &&\n document &&\n ReactModal.setAppElement\n ) {\n ReactModal.setAppElement(appElement);\n }\n\n const {\n cssClassName,\n classNameBlock,\n classNameModifier,\n } = convertPropToCssClassName('modal-v2', className, { size });\n\n return (\n <ReactModal\n testId={dataTestId}\n className={`${cssClassName} ${classNameBlock(`type-${modalType}`)}`}\n contentLabel={modalTitle}\n isOpen={isOpen}\n onAfterOpen={onAfterOpen}\n onRequestClose={onClose}\n overlayClassName={`${classNameBlock('overlay')} ${classNameModifier(\n centered ? 'center' : 'top',\n )}`}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n style={{\n content: {\n ...style,\n },\n overlay: {\n // position: 'absolute', https://jira.elliemae.io/browse/PUI-1471, the overlay should be positioned based on the browser window rather positioned absolute to its parent\n zIndex,\n },\n }}\n >\n <DSModalContent\n actionsRef={actionsRef}\n additionalFooterCssClass={additionalFooterCssClass}\n confirmLabel={confirmLabel}\n containerProps={containerProps}\n modalSubType={modalSubType}\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={onClose}\n onConfirm={onConfirm}\n onReject={onReject}\n overridePropsConfirmButton={overridePropsConfirmButton}\n overridePropsRejectButton={overridePropsRejectButton}\n rejectLabel={rejectLabel}\n searchProps={searchProps}\n showClose={showClose}\n showRejectButton={showRejectButton}\n removePadding={removePadding}\n >\n {children}\n </DSModalContent>\n </ReactModal>\n );\n};\n\nconst props = {\n /** inject props to container wrapper */\n containerProps: PropTypes.object.description(\n 'inject props to container wrapper',\n ),\n /** css class */\n className: PropTypes.string.description('css class'),\n /** style object for container wrapper */\n style: PropTypes.object.description('style object for container wrapper'),\n /** modal container title */\n modalTitle: PropTypes.string.description('modal container title'),\n /** center container */\n centered: PropTypes.bool.description('center container'),\n /** show reject button */\n showRejectButton: PropTypes.bool.description('show reject button'),\n /** show close button */\n showClose: PropTypes.bool.description('show close button'),\n /*\n Props for search component\n */\n searchProps: PropTypes.object.description('Props for search component'),\n /** css class for footer */\n additionalFooterCssClass: PropTypes.string.description(\n 'css class for footer',\n ),\n /** override props confirm button */\n overridePropsConfirmButton: PropTypes.object.description(\n 'override props confirm button',\n ),\n /** override props reject button */\n overridePropsRejectButton: PropTypes.object.description(\n 'override props reject button',\n ),\n /** controlled isOpen flag */\n isOpen: PropTypes.bool.description('controlled isOpen flag'),\n /** close callback */\n onClose: PropTypes.func.description('close callback'),\n /** after open callback */\n onAfterOpen: PropTypes.func.description('after open callback'),\n /** confirm callback */\n onConfirm: PropTypes.func.description('confirm callback'),\n /** reject callback */\n onReject: PropTypes.func.description('reject callback'),\n /** reject label */\n rejectLabel: PropTypes.string.description('reject label'),\n /** confirm text string */\n confirmLabel: PropTypes.string.description('confirm text string'),\n /** modal container size */\n size: PropTypes.oneOf([\n 'default',\n 'xx-large',\n 'x-large',\n 'large',\n 'medium',\n 'small',\n ]).description('modal container size'),\n /** modal sub type */\n modalSubType: PropTypes.any.description('modal sub type'),\n /** modal type */\n modalType: PropTypes.any.description('modal type'),\n /** ref for modal footer actions */\n actionsRef: PropTypes.any.description('ref for modal footer actions'),\n /** modal container children */\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf([PropTypes.element]),\n ]).description('modal container children'),\n /** close on click outside container */\n shouldCloseOnOverlayClick: PropTypes.bool.description(\n 'close on click outside container',\n ),\n /*\n App element ID to inject the modal\n */\n appElement: PropTypes.string.description(\n 'App element ID to inject the modal',\n ),\n /** zindex for modal container */\n zIndex: PropTypes.number.description('zindex for modal container'),\n /** remove modal builtin padding */\n removePadding: PropTypes.bool.description('remove modal builtin padding'),\n};\n\nDSModal.propTypes = props;\n\nconst DSModalWithSchema = describe(DSModal);\nDSModalWithSchema.propTypes = props;\n\nexport { DSModalContent, DSModalWithSchema };\nexport default DSModal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A,EAErC,eAAe,UAAU,KAAK,YAAY;AAAA;AAG5C,QAAQ,YAAY;AAEpB,MAAM,oBAAoB,SAAS;AACnC,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,42 @@
1
+ import * as React from "react";
2
+ import { aggregatedClasses } from "@elliemae/ds-classnames";
3
+ const blockName = "modal-v2";
4
+ const ModalHeader = aggregatedClasses("div")(blockName, "modal-header", ({ type, showClose }) => ({
5
+ [type]: type,
6
+ "with-close": showClose
7
+ }));
8
+ const ModalHeaderTopRight = aggregatedClasses("div")(blockName, "modal-header-close", ({ type }) => ({
9
+ [type]: type
10
+ }));
11
+ const ModalFeedback = aggregatedClasses("div")(blockName, "modal-feedback", ({ type }) => ({
12
+ [type]: type
13
+ }));
14
+ const ModalTitle = aggregatedClasses("h3")(blockName, "modal-title", ({ type }) => ({
15
+ [type]: type
16
+ }));
17
+ const ModalContent = aggregatedClasses("div")(blockName, "modal-content", ({ type, removePadding }) => ({
18
+ [type]: type,
19
+ "remove-padding": removePadding
20
+ }));
21
+ const ModalWrapper = aggregatedClasses("div")(blockName, "modal-wrapper", ({ type, removePadding }) => ({
22
+ [type]: type,
23
+ "remove-padding": removePadding
24
+ }));
25
+ const ModalFooter = aggregatedClasses("div")(blockName, "modal-footer", ({ type, additionalFooterCssClass }) => ({
26
+ [type]: type,
27
+ [additionalFooterCssClass]: additionalFooterCssClass
28
+ }));
29
+ const ModalFooterActions = aggregatedClasses("div")(blockName, "modal-footer-actions", ({ type }) => ({
30
+ [type]: type
31
+ }));
32
+ export {
33
+ ModalContent,
34
+ ModalFeedback,
35
+ ModalFooter,
36
+ ModalFooterActions,
37
+ ModalHeader,
38
+ ModalHeaderTopRight,
39
+ ModalTitle,
40
+ ModalWrapper
41
+ };
42
+ //# sourceMappingURL=blocks.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/blocks.tsx"],
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;ACAA;AAEA,MAAM,YAAY;AAEX,MAAM,cAAc,kBAAkB,OAAO,WAAW,gBAAgB,CAAC,EAAE,MAAM,gBAAiB;AAAA,GACtG,OAAO;AAAA,EACR,cAAc;AAAA;AAGT,MAAM,sBAAsB,kBAAkB,OAAO,WAAW,sBAAsB,CAAC,EAAE,WAAY;AAAA,GACzG,OAAO;AAAA;AAGH,MAAM,gBAAgB,kBAAkB,OAAO,WAAW,kBAAkB,CAAC,EAAE,WAAY;AAAA,GAC/F,OAAO;AAAA;AAGH,MAAM,aAAa,kBAAkB,MAAM,WAAW,eAAe,CAAC,EAAE,WAAY;AAAA,GACxF,OAAO;AAAA;AAGH,MAAM,eAAe,kBAAkB,OAAO,WAAW,iBAAiB,CAAC,EAAE,MAAM,oBAAqB;AAAA,GAC5G,OAAO;AAAA,EACR,kBAAkB;AAAA;AAGb,MAAM,eAAe,kBAAkB,OAAO,WAAW,iBAAiB,CAAC,EAAE,MAAM,oBAAqB;AAAA,GAC5G,OAAO;AAAA,EACR,kBAAkB;AAAA;AAGb,MAAM,cAAc,kBAAkB,OAC3C,WACA,gBACA,CAAC,EAAE,MAAM,+BAAgC;AAAA,GACtC,OAAO;AAAA,GACP,2BAA2B;AAAA;AAIzB,MAAM,qBAAqB,kBAAkB,OAAO,WAAW,wBAAwB,CAAC,EAAE,WAAY;AAAA,GAC1G,OAAO;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { Close } from "@elliemae/ds-icons";
4
+ import DSButton from "@elliemae/ds-button";
5
+ import { ModalHeader } from "../blocks";
6
+ const DecisionHeader = ({ onClose, showClose }) => /* @__PURE__ */ React2.createElement(ModalHeader, {
7
+ classProps: { type: "decision", showClose }
8
+ }, showClose && /* @__PURE__ */ React2.createElement(DSButton, {
9
+ buttonType: "link",
10
+ containerProps: { "data-testid": "modal-button-close" },
11
+ icon: /* @__PURE__ */ React2.createElement(Close, null),
12
+ onClick: onClose
13
+ }));
14
+ var DecisionHeader_default = DecisionHeader;
15
+ export {
16
+ DecisionHeader,
17
+ DecisionHeader_default as default
18
+ };
19
+ //# sourceMappingURL=DecisionHeader.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 />}\n onClick={onClose}\n />\n )}\n </ModalHeader>\n);\n\nexport default DecisionHeader;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEO,MAAM,iBAAiB,CAAC,EAAE,SAAS,gBACxC,qCAAC,aAAD;AAAA,EAAa,YAAY,EAAE,MAAM,YAAY;AAAA,GAC1C,aACC,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,gBAAgB,EAAE,eAAe;AAAA,EACjC,MAAM,qCAAC,OAAD;AAAA,EACN,SAAS;AAAA;AAMjB,IAAO,yBAAQ;",
6
+ "names": []
7
+ }