@elliemae/ds-modal 2.2.0-next.4 → 2.3.0-alpha.2
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/cjs/DSModal.js +86 -184
- package/cjs/DSModal.js.map +7 -0
- package/cjs/constants.js +67 -28
- package/cjs/constants.js.map +7 -0
- package/cjs/index.js +43 -18
- package/cjs/index.js.map +7 -0
- package/cjs/v1/DSModal.js +159 -130
- package/cjs/v1/DSModal.js.map +7 -0
- package/cjs/v1/DSModalType.js +45 -7
- package/cjs/v1/DSModalType.js.map +7 -0
- package/cjs/v1/DSModalWrapper.js +76 -113
- package/cjs/v1/DSModalWrapper.js.map +7 -0
- package/cjs/v1/ModalFeedBack/ModalFeedBack.js +77 -72
- package/cjs/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
- package/cjs/v2/DSModal.js +143 -186
- package/cjs/v2/DSModal.js.map +7 -0
- package/cjs/v2/blocks.js +69 -86
- package/cjs/v2/blocks.js.map +7 -0
- package/cjs/v2/components/DecisionHeader.js +47 -37
- package/cjs/v2/components/DecisionHeader.js.map +7 -0
- package/cjs/v2/components/FeedbackIcon.js +59 -50
- package/cjs/v2/components/FeedbackIcon.js.map +7 -0
- package/cjs/v2/components/Footer.js +68 -65
- package/cjs/v2/components/Footer.js.map +7 -0
- package/cjs/v2/components/FormHeader.js +53 -46
- package/cjs/v2/components/FormHeader.js.map +7 -0
- package/cjs/v2/components/ModalContent.js +95 -111
- package/cjs/v2/components/ModalContent.js.map +7 -0
- package/cjs/v2/components/SelectionHeader.js +50 -48
- package/cjs/v2/components/SelectionHeader.js.map +7 -0
- package/cjs/v2/components/Title.js +40 -25
- package/cjs/v2/components/Title.js.map +7 -0
- package/cjs/v2/helpers.js +49 -40
- package/cjs/v2/helpers.js.map +7 -0
- package/esm/DSModal.js +26 -142
- package/esm/DSModal.js.map +7 -0
- package/esm/constants.js +38 -20
- package/esm/constants.js.map +7 -0
- package/esm/index.js +14 -4
- package/esm/index.js.map +7 -0
- package/esm/v1/DSModal.js +130 -121
- package/esm/v1/DSModal.js.map +7 -0
- package/esm/v1/DSModalType.js +16 -3
- package/esm/v1/DSModalType.js.map +7 -0
- package/esm/v1/DSModalWrapper.js +45 -105
- package/esm/v1/DSModalWrapper.js.map +7 -0
- package/esm/v1/ModalFeedBack/ModalFeedBack.js +48 -66
- package/esm/v1/ModalFeedBack/ModalFeedBack.js.map +7 -0
- package/esm/v2/DSModal.js +112 -173
- package/esm/v2/DSModal.js.map +7 -0
- package/esm/v2/blocks.js +42 -77
- package/esm/v2/blocks.js.map +7 -0
- package/esm/v2/components/DecisionHeader.js +18 -27
- package/esm/v2/components/DecisionHeader.js.map +7 -0
- package/esm/v2/components/FeedbackIcon.js +25 -36
- package/esm/v2/components/FeedbackIcon.js.map +7 -0
- package/esm/v2/components/Footer.js +39 -54
- package/esm/v2/components/Footer.js.map +7 -0
- package/esm/v2/components/FormHeader.js +24 -36
- package/esm/v2/components/FormHeader.js.map +7 -0
- package/esm/v2/components/ModalContent.js +72 -102
- package/esm/v2/components/ModalContent.js.map +7 -0
- package/esm/v2/components/SelectionHeader.js +21 -38
- package/esm/v2/components/SelectionHeader.js.map +7 -0
- package/esm/v2/components/Title.js +11 -16
- package/esm/v2/components/Title.js.map +7 -0
- package/esm/v2/helpers.js +16 -28
- package/esm/v2/helpers.js.map +7 -0
- package/package.json +8 -8
- package/types/DSModal.d.ts +1 -1
- package/types/index.d.ts +2 -3
- package/types/v2/DSModal.d.ts +1 -30
package/cjs/v2/DSModal.js
CHANGED
|
@@ -1,203 +1,160 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var DSModal_exports = {};
|
|
29
|
+
__export(DSModal_exports, {
|
|
30
|
+
DSModalContent: () => import_ModalContent.DSModalContent,
|
|
31
|
+
DSModalWithSchema: () => DSModalWithSchema,
|
|
32
|
+
default: () => DSModal_default
|
|
33
|
+
});
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_react_desc = require("react-desc");
|
|
37
|
+
var import_react_modal = __toESM(require("react-modal"));
|
|
38
|
+
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
39
|
+
var import_constants = require("../constants");
|
|
40
|
+
var import_ModalContent = require("./components/ModalContent");
|
|
41
|
+
const DSModal = ({
|
|
42
|
+
containerProps = {},
|
|
43
|
+
className = "",
|
|
44
|
+
style = {},
|
|
45
|
+
size = "default",
|
|
46
|
+
modalType = import_constants.MODAL_TYPE_V2.INFORMATION,
|
|
47
|
+
modalSubType = null,
|
|
48
|
+
modalTitle = "",
|
|
49
|
+
dataTestId = "ds-modal",
|
|
50
|
+
centered = false,
|
|
51
|
+
showRejectButton = false,
|
|
52
|
+
showClose = true,
|
|
53
|
+
searchProps = {},
|
|
54
|
+
actionsRef = () => null,
|
|
55
|
+
additionalFooterCssClass,
|
|
56
|
+
overridePropsConfirmButton = {},
|
|
57
|
+
overridePropsRejectButton = {},
|
|
58
|
+
children,
|
|
59
|
+
isOpen = true,
|
|
60
|
+
onClose = () => null,
|
|
61
|
+
onAfterOpen = () => null,
|
|
62
|
+
onConfirm = () => null,
|
|
63
|
+
onReject = () => null,
|
|
64
|
+
rejectLabel = "Discard",
|
|
65
|
+
confirmLabel = "Save",
|
|
66
|
+
shouldCloseOnOverlayClick = false,
|
|
67
|
+
appElement = "#root",
|
|
68
|
+
zIndex = 10,
|
|
69
|
+
removePadding = false
|
|
70
|
+
}) => {
|
|
71
|
+
if (typeof document !== "undefined" && true && document && import_react_modal.default.setAppElement) {
|
|
72
|
+
import_react_modal.default.setAppElement(appElement);
|
|
66
73
|
}
|
|
67
|
-
|
|
68
74
|
const {
|
|
69
75
|
cssClassName,
|
|
70
76
|
classNameBlock,
|
|
71
77
|
classNameModifier
|
|
72
|
-
} =
|
|
73
|
-
|
|
74
|
-
});
|
|
75
|
-
return /*#__PURE__*/_jsx__default["default"](ReactModal__default["default"], {
|
|
78
|
+
} = (0, import_ds_classnames.convertPropToCssClassName)("modal-v2", className, { size });
|
|
79
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_modal.default, {
|
|
76
80
|
testId: dataTestId,
|
|
77
|
-
className:
|
|
81
|
+
className: `${cssClassName} ${classNameBlock(`type-${modalType}`)}`,
|
|
78
82
|
contentLabel: modalTitle,
|
|
79
|
-
isOpen
|
|
80
|
-
onAfterOpen
|
|
83
|
+
isOpen,
|
|
84
|
+
onAfterOpen,
|
|
81
85
|
onRequestClose: onClose,
|
|
82
|
-
overlayClassName:
|
|
83
|
-
shouldCloseOnOverlayClick
|
|
86
|
+
overlayClassName: `${classNameBlock("overlay")} ${classNameModifier(centered ? "center" : "top")}`,
|
|
87
|
+
shouldCloseOnOverlayClick,
|
|
84
88
|
style: {
|
|
85
|
-
content:
|
|
89
|
+
content: {
|
|
90
|
+
...style
|
|
91
|
+
},
|
|
86
92
|
overlay: {
|
|
87
|
-
// 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
|
|
88
93
|
zIndex
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
|
-
},
|
|
92
|
-
actionsRef
|
|
93
|
-
additionalFooterCssClass
|
|
94
|
-
confirmLabel
|
|
95
|
-
containerProps
|
|
96
|
-
modalSubType
|
|
97
|
-
modalTitle
|
|
98
|
-
modalType
|
|
99
|
-
onClose
|
|
100
|
-
onConfirm
|
|
101
|
-
onReject
|
|
102
|
-
overridePropsConfirmButton
|
|
103
|
-
overridePropsRejectButton
|
|
104
|
-
rejectLabel
|
|
105
|
-
searchProps
|
|
106
|
-
showClose
|
|
107
|
-
showRejectButton
|
|
108
|
-
removePadding
|
|
109
|
-
},
|
|
96
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ModalContent.DSModalContent, {
|
|
97
|
+
actionsRef,
|
|
98
|
+
additionalFooterCssClass,
|
|
99
|
+
confirmLabel,
|
|
100
|
+
containerProps,
|
|
101
|
+
modalSubType,
|
|
102
|
+
modalTitle,
|
|
103
|
+
modalType,
|
|
104
|
+
onClose,
|
|
105
|
+
onConfirm,
|
|
106
|
+
onReject,
|
|
107
|
+
overridePropsConfirmButton,
|
|
108
|
+
overridePropsRejectButton,
|
|
109
|
+
rejectLabel,
|
|
110
|
+
searchProps,
|
|
111
|
+
showClose,
|
|
112
|
+
showRejectButton,
|
|
113
|
+
removePadding
|
|
114
|
+
}, children));
|
|
110
115
|
};
|
|
111
|
-
|
|
112
116
|
const props = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
/** close callback */
|
|
152
|
-
onClose: reactDesc.PropTypes.func.description('close callback'),
|
|
153
|
-
|
|
154
|
-
/** after open callback */
|
|
155
|
-
onAfterOpen: reactDesc.PropTypes.func.description('after open callback'),
|
|
156
|
-
|
|
157
|
-
/** confirm callback */
|
|
158
|
-
onConfirm: reactDesc.PropTypes.func.description('confirm callback'),
|
|
159
|
-
|
|
160
|
-
/** reject callback */
|
|
161
|
-
onReject: reactDesc.PropTypes.func.description('reject callback'),
|
|
162
|
-
|
|
163
|
-
/** reject label */
|
|
164
|
-
rejectLabel: reactDesc.PropTypes.string.description('reject label'),
|
|
165
|
-
|
|
166
|
-
/** confirm text string */
|
|
167
|
-
confirmLabel: reactDesc.PropTypes.string.description('confirm text string'),
|
|
168
|
-
|
|
169
|
-
/** modal container size */
|
|
170
|
-
size: reactDesc.PropTypes.oneOf(['default', 'xx-large', 'x-large', 'large', 'medium', 'small']).description('modal container size'),
|
|
171
|
-
|
|
172
|
-
/** modal sub type */
|
|
173
|
-
modalSubType: reactDesc.PropTypes.any.description('modal sub type'),
|
|
174
|
-
|
|
175
|
-
/** modal type */
|
|
176
|
-
modalType: reactDesc.PropTypes.any.description('modal type'),
|
|
177
|
-
|
|
178
|
-
/** ref for modal footer actions */
|
|
179
|
-
actionsRef: reactDesc.PropTypes.any.description('ref for modal footer actions'),
|
|
180
|
-
|
|
181
|
-
/** modal container children */
|
|
182
|
-
children: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.element, reactDesc.PropTypes.arrayOf([reactDesc.PropTypes.element])]).description('modal container children'),
|
|
183
|
-
|
|
184
|
-
/** close on click outside container */
|
|
185
|
-
shouldCloseOnOverlayClick: reactDesc.PropTypes.bool.description('close on click outside container'),
|
|
186
|
-
|
|
187
|
-
/*
|
|
188
|
-
App element ID to inject the modal
|
|
189
|
-
*/
|
|
190
|
-
appElement: reactDesc.PropTypes.string.description('App element ID to inject the modal'),
|
|
191
|
-
|
|
192
|
-
/** zindex for modal container */
|
|
193
|
-
zIndex: reactDesc.PropTypes.number.description('zindex for modal container'),
|
|
194
|
-
|
|
195
|
-
/** remove modal builtin padding */
|
|
196
|
-
removePadding: reactDesc.PropTypes.bool.description('remove modal builtin padding')
|
|
117
|
+
containerProps: import_react_desc.PropTypes.object.description("inject props to container wrapper"),
|
|
118
|
+
className: import_react_desc.PropTypes.string.description("css class"),
|
|
119
|
+
style: import_react_desc.PropTypes.object.description("style object for container wrapper"),
|
|
120
|
+
modalTitle: import_react_desc.PropTypes.string.description("modal container title"),
|
|
121
|
+
centered: import_react_desc.PropTypes.bool.description("center container"),
|
|
122
|
+
showRejectButton: import_react_desc.PropTypes.bool.description("show reject button"),
|
|
123
|
+
showClose: import_react_desc.PropTypes.bool.description("show close button"),
|
|
124
|
+
searchProps: import_react_desc.PropTypes.object.description("Props for search component"),
|
|
125
|
+
additionalFooterCssClass: import_react_desc.PropTypes.string.description("css class for footer"),
|
|
126
|
+
overridePropsConfirmButton: import_react_desc.PropTypes.object.description("override props confirm button"),
|
|
127
|
+
overridePropsRejectButton: import_react_desc.PropTypes.object.description("override props reject button"),
|
|
128
|
+
isOpen: import_react_desc.PropTypes.bool.description("controlled isOpen flag"),
|
|
129
|
+
onClose: import_react_desc.PropTypes.func.description("close callback"),
|
|
130
|
+
onAfterOpen: import_react_desc.PropTypes.func.description("after open callback"),
|
|
131
|
+
onConfirm: import_react_desc.PropTypes.func.description("confirm callback"),
|
|
132
|
+
onReject: import_react_desc.PropTypes.func.description("reject callback"),
|
|
133
|
+
rejectLabel: import_react_desc.PropTypes.string.description("reject label"),
|
|
134
|
+
confirmLabel: import_react_desc.PropTypes.string.description("confirm text string"),
|
|
135
|
+
size: import_react_desc.PropTypes.oneOf([
|
|
136
|
+
"default",
|
|
137
|
+
"xx-large",
|
|
138
|
+
"x-large",
|
|
139
|
+
"large",
|
|
140
|
+
"medium",
|
|
141
|
+
"small"
|
|
142
|
+
]).description("modal container size"),
|
|
143
|
+
modalSubType: import_react_desc.PropTypes.any.description("modal sub type"),
|
|
144
|
+
modalType: import_react_desc.PropTypes.any.description("modal type"),
|
|
145
|
+
actionsRef: import_react_desc.PropTypes.any.description("ref for modal footer actions"),
|
|
146
|
+
children: import_react_desc.PropTypes.oneOfType([
|
|
147
|
+
import_react_desc.PropTypes.element,
|
|
148
|
+
import_react_desc.PropTypes.arrayOf([import_react_desc.PropTypes.element])
|
|
149
|
+
]).description("modal container children"),
|
|
150
|
+
shouldCloseOnOverlayClick: import_react_desc.PropTypes.bool.description("close on click outside container"),
|
|
151
|
+
appElement: import_react_desc.PropTypes.string.description("App element ID to inject the modal"),
|
|
152
|
+
zIndex: import_react_desc.PropTypes.number.description("zindex for modal container"),
|
|
153
|
+
removePadding: import_react_desc.PropTypes.bool.description("remove modal builtin padding")
|
|
197
154
|
};
|
|
198
|
-
|
|
155
|
+
DSModal.propTypes = props;
|
|
156
|
+
const DSModalWithSchema = (0, import_react_desc.describe)(DSModal);
|
|
199
157
|
DSModalWithSchema.propTypes = props;
|
|
200
|
-
|
|
201
|
-
exports
|
|
202
|
-
|
|
203
|
-
exports["default"] = DSModal;
|
|
158
|
+
var DSModal_default = DSModal;
|
|
159
|
+
module.exports = __toCommonJS(DSModal_exports);
|
|
160
|
+
//# sourceMappingURL=DSModal.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/DSModal.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* 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;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,wBAAoC;AACpC,yBAAuB;AACvB,2BAA0C;AAC1C,uBAA8B;AAC9B,0BAA+B;AAE/B,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,OAAO;AAAA,EAEP,YAAY,+BAAc;AAAA,EAC1B,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc;AAAA,EAEd,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA6B;AAAA,EAC7B,4BAA4B;AAAA,EAE5B;AAAA,EACA,SAAS;AAAA,EACT,UAAU,MAAM;AAAA,EAChB,cAAc,MAAM;AAAA,EACpB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,4BAA4B;AAAA,EAC5B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,gBAAgB;AAAA,MACZ;AACJ,MACE,OAAO,aAAa,eACpB,QACA,YACA,2BAAW,eACX;AACA,+BAAW,cAAc;AAAA;AAG3B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,MACE,oDAA0B,YAAY,WAAW,EAAE;AAEvD,SACE,mDAAC,4BAAD;AAAA,IACE,QAAQ;AAAA,IACR,WAAW,GAAG,gBAAgB,eAAe,QAAQ;AAAA,IACrD,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,kBAAkB,GAAG,eAAe,cAAc,kBAChD,WAAW,WAAW;AAAA,IAExB;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,WACJ;AAAA;AAAA,MAEL,SAAS;AAAA,QAEP;AAAA;AAAA;AAAA,KAIJ,mDAAC,oCAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEC;AAAA;AAMT,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,4BAAU,OAAO,YAC/B;AAAA,EAGF,WAAW,4BAAU,OAAO,YAAY;AAAA,EAExC,OAAO,4BAAU,OAAO,YAAY;AAAA,EAEpC,YAAY,4BAAU,OAAO,YAAY;AAAA,EAEzC,UAAU,4BAAU,KAAK,YAAY;AAAA,EAErC,kBAAkB,4BAAU,KAAK,YAAY;AAAA,EAE7C,WAAW,4BAAU,KAAK,YAAY;AAAA,EAItC,aAAa,4BAAU,OAAO,YAAY;AAAA,EAE1C,0BAA0B,4BAAU,OAAO,YACzC;AAAA,EAGF,4BAA4B,4BAAU,OAAO,YAC3C;AAAA,EAGF,2BAA2B,4BAAU,OAAO,YAC1C;AAAA,EAGF,QAAQ,4BAAU,KAAK,YAAY;AAAA,EAEnC,SAAS,4BAAU,KAAK,YAAY;AAAA,EAEpC,aAAa,4BAAU,KAAK,YAAY;AAAA,EAExC,WAAW,4BAAU,KAAK,YAAY;AAAA,EAEtC,UAAU,4BAAU,KAAK,YAAY;AAAA,EAErC,aAAa,4BAAU,OAAO,YAAY;AAAA,EAE1C,cAAc,4BAAU,OAAO,YAAY;AAAA,EAE3C,MAAM,4BAAU,MAAM;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KACC,YAAY;AAAA,EAEf,cAAc,4BAAU,IAAI,YAAY;AAAA,EAExC,WAAW,4BAAU,IAAI,YAAY;AAAA,EAErC,YAAY,4BAAU,IAAI,YAAY;AAAA,EAEtC,UAAU,4BAAU,UAAU;AAAA,IAC5B,4BAAU;AAAA,IACV,4BAAU,QAAQ,CAAC,4BAAU;AAAA,KAC5B,YAAY;AAAA,EAEf,2BAA2B,4BAAU,KAAK,YACxC;AAAA,EAKF,YAAY,4BAAU,OAAO,YAC3B;AAAA,EAGF,QAAQ,4BAAU,OAAO,YAAY;AAAA,EAErC,eAAe,4BAAU,KAAK,YAAY;AAAA;AAG5C,QAAQ,YAAY;AAEpB,MAAM,oBAAoB,gCAAS;AACnC,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/v2/blocks.js
CHANGED
|
@@ -1,88 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
16
26
|
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var blocks_exports = {};
|
|
29
|
+
__export(blocks_exports, {
|
|
30
|
+
ModalContent: () => ModalContent,
|
|
31
|
+
ModalFeedback: () => ModalFeedback,
|
|
32
|
+
ModalFooter: () => ModalFooter,
|
|
33
|
+
ModalFooterActions: () => ModalFooterActions,
|
|
34
|
+
ModalHeader: () => ModalHeader,
|
|
35
|
+
ModalHeaderTopRight: () => ModalHeaderTopRight,
|
|
36
|
+
ModalTitle: () => ModalTitle,
|
|
37
|
+
ModalWrapper: () => ModalWrapper
|
|
17
38
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
const ModalWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'modal-wrapper', _ref6 => {
|
|
53
|
-
let {
|
|
54
|
-
type,
|
|
55
|
-
removePadding
|
|
56
|
-
} = _ref6;
|
|
57
|
-
return {
|
|
58
|
-
[type]: type,
|
|
59
|
-
'remove-padding': removePadding
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
const ModalFooter = dsClassnames.aggregatedClasses('div')(blockName, 'modal-footer', _ref7 => {
|
|
63
|
-
let {
|
|
64
|
-
type,
|
|
65
|
-
additionalFooterCssClass
|
|
66
|
-
} = _ref7;
|
|
67
|
-
return {
|
|
68
|
-
[type]: type,
|
|
69
|
-
[additionalFooterCssClass]: additionalFooterCssClass
|
|
70
|
-
};
|
|
71
|
-
});
|
|
72
|
-
const ModalFooterActions = dsClassnames.aggregatedClasses('div')(blockName, 'modal-footer-actions', _ref8 => {
|
|
73
|
-
let {
|
|
74
|
-
type
|
|
75
|
-
} = _ref8;
|
|
76
|
-
return {
|
|
77
|
-
[type]: type
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
exports.ModalContent = ModalContent;
|
|
82
|
-
exports.ModalFeedback = ModalFeedback;
|
|
83
|
-
exports.ModalFooter = ModalFooter;
|
|
84
|
-
exports.ModalFooterActions = ModalFooterActions;
|
|
85
|
-
exports.ModalHeader = ModalHeader;
|
|
86
|
-
exports.ModalHeaderTopRight = ModalHeaderTopRight;
|
|
87
|
-
exports.ModalTitle = ModalTitle;
|
|
88
|
-
exports.ModalWrapper = ModalWrapper;
|
|
39
|
+
var React = __toESM(require("react"));
|
|
40
|
+
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
41
|
+
const blockName = "modal-v2";
|
|
42
|
+
const ModalHeader = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "modal-header", ({ type, showClose }) => ({
|
|
43
|
+
[type]: type,
|
|
44
|
+
"with-close": showClose
|
|
45
|
+
}));
|
|
46
|
+
const ModalHeaderTopRight = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "modal-header-close", ({ type }) => ({
|
|
47
|
+
[type]: type
|
|
48
|
+
}));
|
|
49
|
+
const ModalFeedback = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "modal-feedback", ({ type }) => ({
|
|
50
|
+
[type]: type
|
|
51
|
+
}));
|
|
52
|
+
const ModalTitle = (0, import_ds_classnames.aggregatedClasses)("h3")(blockName, "modal-title", ({ type }) => ({
|
|
53
|
+
[type]: type
|
|
54
|
+
}));
|
|
55
|
+
const ModalContent = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "modal-content", ({ type, removePadding }) => ({
|
|
56
|
+
[type]: type,
|
|
57
|
+
"remove-padding": removePadding
|
|
58
|
+
}));
|
|
59
|
+
const ModalWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "modal-wrapper", ({ type, removePadding }) => ({
|
|
60
|
+
[type]: type,
|
|
61
|
+
"remove-padding": removePadding
|
|
62
|
+
}));
|
|
63
|
+
const ModalFooter = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "modal-footer", ({ type, additionalFooterCssClass }) => ({
|
|
64
|
+
[type]: type,
|
|
65
|
+
[additionalFooterCssClass]: additionalFooterCssClass
|
|
66
|
+
}));
|
|
67
|
+
const ModalFooterActions = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "modal-footer-actions", ({ type }) => ({
|
|
68
|
+
[type]: type
|
|
69
|
+
}));
|
|
70
|
+
module.exports = __toCommonJS(blocks_exports);
|
|
71
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/blocks.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAElC,MAAM,YAAY;AAEX,MAAM,cAAc,4CAAkB,OAAO,WAAW,gBAAgB,CAAC,EAAE,MAAM,gBAAiB;AAAA,GACtG,OAAO;AAAA,EACR,cAAc;AAAA;AAGT,MAAM,sBAAsB,4CAAkB,OAAO,WAAW,sBAAsB,CAAC,EAAE,WAAY;AAAA,GACzG,OAAO;AAAA;AAGH,MAAM,gBAAgB,4CAAkB,OAAO,WAAW,kBAAkB,CAAC,EAAE,WAAY;AAAA,GAC/F,OAAO;AAAA;AAGH,MAAM,aAAa,4CAAkB,MAAM,WAAW,eAAe,CAAC,EAAE,WAAY;AAAA,GACxF,OAAO;AAAA;AAGH,MAAM,eAAe,4CAAkB,OAAO,WAAW,iBAAiB,CAAC,EAAE,MAAM,oBAAqB;AAAA,GAC5G,OAAO;AAAA,EACR,kBAAkB;AAAA;AAGb,MAAM,eAAe,4CAAkB,OAAO,WAAW,iBAAiB,CAAC,EAAE,MAAM,oBAAqB;AAAA,GAC5G,OAAO;AAAA,EACR,kBAAkB;AAAA;AAGb,MAAM,cAAc,4CAAkB,OAC3C,WACA,gBACA,CAAC,EAAE,MAAM,+BAAgC;AAAA,GACtC,OAAO;AAAA,GACP,2BAA2B;AAAA;AAIzB,MAAM,qBAAqB,4CAAkB,OAAO,WAAW,wBAAwB,CAAC,EAAE,WAAY;AAAA,GAC1G,OAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,38 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
|
-
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
15
|
-
|
|
16
|
-
var _Close;
|
|
17
|
-
const DecisionHeader = _ref => {
|
|
18
|
-
let {
|
|
19
|
-
onClose,
|
|
20
|
-
showClose
|
|
21
|
-
} = _ref;
|
|
22
|
-
return /*#__PURE__*/_jsx__default["default"](blocks.ModalHeader, {
|
|
23
|
-
classProps: {
|
|
24
|
-
type: 'decision',
|
|
25
|
-
showClose
|
|
26
|
-
}
|
|
27
|
-
}, void 0, showClose && /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
28
|
-
buttonType: "link",
|
|
29
|
-
containerProps: {
|
|
30
|
-
'data-testid': 'modal-button-close'
|
|
31
|
-
},
|
|
32
|
-
icon: _Close || (_Close = /*#__PURE__*/_jsx__default["default"](dsIcons.Close, {})),
|
|
33
|
-
onClick: onClose
|
|
34
|
-
}));
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
35
11
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var DecisionHeader_exports = {};
|
|
29
|
+
__export(DecisionHeader_exports, {
|
|
30
|
+
DecisionHeader: () => DecisionHeader,
|
|
31
|
+
default: () => DecisionHeader_default
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
36
|
+
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
37
|
+
var import_blocks = require("../blocks");
|
|
38
|
+
const DecisionHeader = ({ onClose, showClose }) => /* @__PURE__ */ import_react.default.createElement(import_blocks.ModalHeader, {
|
|
39
|
+
classProps: { type: "decision", showClose }
|
|
40
|
+
}, showClose && /* @__PURE__ */ import_react.default.createElement(import_ds_button.default, {
|
|
41
|
+
buttonType: "link",
|
|
42
|
+
containerProps: { "data-testid": "modal-button-close" },
|
|
43
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.Close, null),
|
|
44
|
+
onClick: onClose
|
|
45
|
+
}));
|
|
46
|
+
var DecisionHeader_default = DecisionHeader;
|
|
47
|
+
module.exports = __toCommonJS(DecisionHeader_exports);
|
|
48
|
+
//# sourceMappingURL=DecisionHeader.js.map
|