@elliemae/ds-modal 3.16.0 → 3.16.1

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 (89) hide show
  1. package/dist/cjs/DSModal.js +88 -3
  2. package/dist/cjs/DSModal.js.map +2 -2
  3. package/dist/cjs/constants.js +4 -0
  4. package/dist/cjs/constants.js.map +1 -1
  5. package/dist/cjs/index.js +7 -3
  6. package/dist/cjs/index.js.map +2 -2
  7. package/dist/cjs/package.json +7 -0
  8. package/dist/cjs/v1/DSModal.js +81 -2
  9. package/dist/cjs/v1/DSModal.js.map +2 -2
  10. package/dist/cjs/v1/DSModalType.js +4 -0
  11. package/dist/cjs/v1/DSModalType.js.map +1 -1
  12. package/dist/cjs/v1/DSModalWrapper.js +9 -1
  13. package/dist/cjs/v1/DSModalWrapper.js.map +2 -2
  14. package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js +5 -1
  15. package/dist/cjs/v1/ModalFeedBack/ModalFeedBack.js.map +2 -2
  16. package/dist/cjs/v2/DSModal.js +41 -2
  17. package/dist/cjs/v2/DSModal.js.map +2 -2
  18. package/dist/cjs/v2/blocks.js +4 -0
  19. package/dist/cjs/v2/blocks.js.map +1 -1
  20. package/dist/cjs/v2/components/DecisionHeader.js +5 -1
  21. package/dist/cjs/v2/components/DecisionHeader.js.map +2 -2
  22. package/dist/cjs/v2/components/FeedbackIcon.js +6 -2
  23. package/dist/cjs/v2/components/FeedbackIcon.js.map +2 -2
  24. package/dist/cjs/v2/components/Footer.js +5 -1
  25. package/dist/cjs/v2/components/Footer.js.map +2 -2
  26. package/dist/cjs/v2/components/FormHeader.js +6 -2
  27. package/dist/cjs/v2/components/FormHeader.js.map +2 -2
  28. package/dist/cjs/v2/components/ModalContent.js +16 -9
  29. package/dist/cjs/v2/components/ModalContent.js.map +2 -2
  30. package/dist/cjs/v2/components/SelectionHeader.js +6 -2
  31. package/dist/cjs/v2/components/SelectionHeader.js.map +2 -2
  32. package/dist/cjs/v2/components/Title.js +5 -1
  33. package/dist/cjs/v2/components/Title.js.map +2 -2
  34. package/dist/cjs/v2/helpers.js +5 -1
  35. package/dist/cjs/v2/helpers.js.map +2 -2
  36. package/dist/esm/DSModal.js +84 -3
  37. package/dist/esm/DSModal.js.map +2 -2
  38. package/dist/esm/index.js +3 -3
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/package.json +7 -0
  41. package/dist/esm/v1/DSModal.js +77 -2
  42. package/dist/esm/v1/DSModal.js.map +2 -2
  43. package/dist/esm/v1/DSModalWrapper.js +5 -1
  44. package/dist/esm/v1/DSModalWrapper.js.map +2 -2
  45. package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js +1 -1
  46. package/dist/esm/v1/ModalFeedBack/ModalFeedBack.js.map +1 -1
  47. package/dist/esm/v2/DSModal.js +37 -2
  48. package/dist/esm/v2/DSModal.js.map +2 -2
  49. package/dist/esm/v2/blocks.js.map +1 -1
  50. package/dist/esm/v2/components/DecisionHeader.js +1 -1
  51. package/dist/esm/v2/components/DecisionHeader.js.map +1 -1
  52. package/dist/esm/v2/components/FeedbackIcon.js +2 -2
  53. package/dist/esm/v2/components/FeedbackIcon.js.map +1 -1
  54. package/dist/esm/v2/components/Footer.js +1 -1
  55. package/dist/esm/v2/components/Footer.js.map +1 -1
  56. package/dist/esm/v2/components/FormHeader.js +2 -2
  57. package/dist/esm/v2/components/FormHeader.js.map +1 -1
  58. package/dist/esm/v2/components/ModalContent.js +12 -9
  59. package/dist/esm/v2/components/ModalContent.js.map +2 -2
  60. package/dist/esm/v2/components/SelectionHeader.js +2 -2
  61. package/dist/esm/v2/components/SelectionHeader.js.map +1 -1
  62. package/dist/esm/v2/components/Title.js +1 -1
  63. package/dist/esm/v2/components/Title.js.map +1 -1
  64. package/dist/esm/v2/helpers.js +1 -1
  65. package/dist/esm/v2/helpers.js.map +1 -1
  66. package/package.json +14 -14
  67. package/dist/types/DSModal.d.ts +0 -13
  68. package/dist/types/constants.d.ts +0 -25
  69. package/dist/types/index.d.ts +0 -3
  70. package/dist/types/v1/DSModal.d.ts +0 -142
  71. package/dist/types/v1/DSModalType.d.ts +0 -1
  72. package/dist/types/v1/DSModalWrapper.d.ts +0 -133
  73. package/dist/types/v1/ModalFeedBack/ModalFeedBack.d.ts +0 -10
  74. package/dist/types/v2/DSModal.d.ts +0 -120
  75. package/dist/types/v2/blocks.d.ts +0 -9
  76. package/dist/types/v2/components/DecisionHeader.d.ts +0 -5
  77. package/dist/types/v2/components/FeedbackIcon.d.ts +0 -4
  78. package/dist/types/v2/components/Footer.d.ts +0 -12
  79. package/dist/types/v2/components/FormHeader.d.ts +0 -7
  80. package/dist/types/v2/components/ModalContent.d.ts +0 -20
  81. package/dist/types/v2/components/SelectionHeader.d.ts +0 -7
  82. package/dist/types/v2/components/Title.d.ts +0 -5
  83. package/dist/types/v2/components/tests/DecisionHeader.test.d.ts +0 -1
  84. package/dist/types/v2/components/tests/FeedbackIcon.test.d.ts +0 -1
  85. package/dist/types/v2/components/tests/Footer.test.d.ts +0 -1
  86. package/dist/types/v2/components/tests/FormHeader.test.d.ts +0 -1
  87. package/dist/types/v2/components/tests/SelectionHeader.test.d.ts +0 -1
  88. package/dist/types/v2/helpers.d.ts +0 -16
  89. package/dist/types/v2/tests/DSModal.test.d.ts +0 -1
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -32,9 +36,9 @@ module.exports = __toCommonJS(DSModal_exports);
32
36
  var React = __toESM(require("react"));
33
37
  var import_jsx_runtime = require("react/jsx-runtime");
34
38
  var import_prop_types = __toESM(require("prop-types"));
35
- var import_constants = require("./constants");
36
- var import_DSModal = __toESM(require("./v1/DSModal"));
37
- var import_DSModal2 = __toESM(require("./v2/DSModal"));
39
+ var import_constants = require("./constants.js");
40
+ var import_DSModal = __toESM(require("./v1/DSModal.js"));
41
+ var import_DSModal2 = __toESM(require("./v2/DSModal.js"));
38
42
  var import_ds_shared = require("@elliemae/ds-shared");
39
43
  var import_ds_utilities = require("@elliemae/ds-utilities");
40
44
  const DSModal = ({ version = 1, ...rest }) => {
@@ -49,34 +53,115 @@ DSModal.propTypes = {
49
53
  import_DSModal.default.propTypes = {
50
54
  version: import_prop_types.default.oneOf([1, 2]),
51
55
  className: import_prop_types.default.string,
56
+ /**
57
+ * Add an additional css class to the footer
58
+ */
52
59
  additionalFooterCssClass: import_prop_types.default.string,
60
+ /**
61
+ * Set style for the modal
62
+ */
53
63
  style: import_prop_types.default.objectOf(import_prop_types.default.string),
64
+ /**
65
+ * Select size for the close icon
66
+ */
54
67
  iconCloseSize: import_prop_types.default.oneOf(import_ds_shared.iconSizes),
68
+ /**
69
+ * ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']
70
+ */
55
71
  modalType: import_prop_types.default.oneOf(import_constants.modalTypes),
72
+ /**
73
+ * Show the header or not
74
+ */
56
75
  showHeader: import_prop_types.default.bool,
76
+ /**
77
+ * Show the footer or not
78
+ */
57
79
  showFooter: import_prop_types.default.bool,
80
+ /**
81
+ * Main content of the modal
82
+ */
58
83
  children: import_prop_types.default.element.isRequired,
84
+ /**
85
+ * Content is centered or not
86
+ */
59
87
  centered: import_prop_types.default.bool,
88
+ /**
89
+ * Text to be added in the confirm button
90
+ */
60
91
  confirmLabel: import_prop_types.default.string,
92
+ /**
93
+ * Text to be added in the modal title
94
+ */
61
95
  modalTitle: import_prop_types.default.string,
96
+ /**
97
+ * Text to be added in the modal title
98
+ */
62
99
  size: import_prop_types.default.oneOf(import_ds_shared.sizes),
100
+ /**
101
+ * Modal is open or not
102
+ */
63
103
  isOpen: import_prop_types.default.bool,
104
+ /**
105
+ * Allows a function to be triggered once the modal is closed
106
+ */
64
107
  onClose: import_prop_types.default.func,
108
+ /**
109
+ * Allows a function to be triggered once the modal is opened
110
+ */
65
111
  onAfterOpen: import_prop_types.default.func,
112
+ /**
113
+ * Allows a function to be triggered once the modal open is confirmed
114
+ */
66
115
  onConfirm: import_prop_types.default.func,
116
+ /**
117
+ * Allows a function to be triggered once the modal open is rejected
118
+ */
67
119
  onReject: import_prop_types.default.func,
120
+ /**
121
+ * Text to be added in the reject button
122
+ */
68
123
  rejectLabel: import_prop_types.default.string,
124
+ /**
125
+ * If modal should close on overlay click
126
+ */
69
127
  shouldCloseOnOverlayClick: import_prop_types.default.bool,
128
+ /**
129
+ * Modal has error or not
130
+ */
70
131
  hasError: import_prop_types.default.bool,
132
+ /**
133
+ * Modal has warning or not
134
+ */
71
135
  hasWarning: import_prop_types.default.bool,
136
+ /**
137
+ * Modal has success or not
138
+ */
72
139
  hasSuccess: import_prop_types.default.bool,
140
+ /**
141
+ * Modal has info or not
142
+ */
73
143
  hasInfo: import_prop_types.default.bool,
144
+ /**
145
+ * Modal has help or not
146
+ */
74
147
  hasHelp: import_prop_types.default.bool,
75
148
  actionsRef: import_prop_types.default.func,
76
149
  appElement: import_prop_types.default.string,
150
+ /**
151
+ * Customized props for the confirm button
152
+ */
77
153
  overridePropsConfirmButton: import_prop_types.default.objectOf(import_prop_types.default.shape({})),
154
+ /**
155
+ * Customized props for the reject button
156
+ */
78
157
  overridePropsRejectButton: import_prop_types.default.objectOf(import_prop_types.default.string),
158
+ /**
159
+ * Show confirm button
160
+ */
79
161
  showConfirmButton: import_prop_types.default.bool,
162
+ /**
163
+ * Show confirm button
164
+ */
80
165
  customCloseComponent: import_prop_types.default.element
81
166
  };
82
167
  var DSModal_default = DSModal;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSModal.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { modalTypes } from './constants';\nimport DSModalV1 from './v1/DSModal';\nimport DSModalV2, { DSModalContent } from './v2/DSModal';\nimport { sizes, iconSizes } from '@elliemae/ds-shared';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\n\nconst DSModal = ({ version = 1, ...rest }) => {\n useDeprecateComponent({ componentName: 'ds-modal', version: 'TBD Date: 2023 Q3' });\n\n if (version === 2) return <DSModalV2 {...rest} />;\n return <DSModalV1 {...rest} />;\n};\n\nDSModal.propTypes = {\n version: PropTypes.oneOf([1, 2]),\n};\n\nDSModalV1.propTypes = {\n version: PropTypes.oneOf([1, 2]),\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.objectOf(PropTypes.string),\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.element.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.objectOf(PropTypes.shape({})),\n /**\n * Customized props for the reject button\n */\n overridePropsRejectButton: PropTypes.objectOf(PropTypes.string),\n /**\n * Show confirm button\n */\n showConfirmButton: PropTypes.bool,\n /**\n * Show confirm button\n */\n customCloseComponent: PropTypes.element,\n};\nexport { DSModalContent, DSModal };\nexport default DSModal;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYK;AAV5B,wBAAsB;AACtB,uBAA2B;AAC3B,qBAAsB;AACtB,IAAAA,kBAA0C;AAC1C,uBAAiC;AACjC,0BAAsC;AAEtC,MAAM,UAAU,CAAC,EAAE,UAAU,MAAM,KAAK,MAAM;AAC5C,iDAAsB,EAAE,eAAe,YAAY,SAAS,oBAAoB,CAAC;AAEjF,MAAI,YAAY;AAAG,WAAO,4CAAC,gBAAAC,SAAA,EAAW,GAAG,MAAM;AAC/C,SAAO,4CAAC,eAAAC,SAAA,EAAW,GAAG,MAAM;AAC9B;AAEA,QAAQ,YAAY;AAAA,EAClB,SAAS,kBAAAC,QAAU,MAAM,CAAC,GAAG,CAAC,CAAC;AACjC;AAEA,eAA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AAU;AAClC;AAEA,IAAO,kBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { modalTypes } from './constants.js';\nimport DSModalV1 from './v1/DSModal.js';\nimport DSModalV2, { DSModalContent } from './v2/DSModal.js';\nimport { sizes, iconSizes } from '@elliemae/ds-shared';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\n\nconst DSModal = ({ version = 1, ...rest }) => {\n useDeprecateComponent({ componentName: 'ds-modal', version: 'TBD Date: 2023 Q3' });\n\n if (version === 2) return <DSModalV2 {...rest} />;\n return <DSModalV1 {...rest} />;\n};\n\nDSModal.propTypes = {\n version: PropTypes.oneOf([1, 2]),\n};\n\nDSModalV1.propTypes = {\n version: PropTypes.oneOf([1, 2]),\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.objectOf(PropTypes.string),\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.element.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.objectOf(PropTypes.shape({})),\n /**\n * Customized props for the reject button\n */\n overridePropsRejectButton: PropTypes.objectOf(PropTypes.string),\n /**\n * Show confirm button\n */\n showConfirmButton: PropTypes.bool,\n /**\n * Show confirm button\n */\n customCloseComponent: PropTypes.element,\n};\nexport { DSModalContent, DSModal };\nexport default DSModal;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYK;AAV5B,wBAAsB;AACtB,uBAA2B;AAC3B,qBAAsB;AACtB,IAAAA,kBAA0C;AAC1C,uBAAiC;AACjC,0BAAsC;AAEtC,MAAM,UAAU,CAAC,EAAE,UAAU,GAAG,GAAG,KAAK,MAAM;AAC5C,iDAAsB,EAAE,eAAe,YAAY,SAAS,oBAAoB,CAAC;AAEjF,MAAI,YAAY;AAAG,WAAO,4CAAC,gBAAAC,SAAA,EAAW,GAAG,MAAM;AAC/C,SAAO,4CAAC,eAAAC,SAAA,EAAW,GAAG,MAAM;AAC9B;AAEA,QAAQ,YAAY;AAAA,EAClB,SAAS,kBAAAC,QAAU,MAAM,CAAC,GAAG,CAAC,CAAC;AACjC;AAEA,eAAAD,QAA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AAAA,EAItB,YAAY,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAItB,SAAS,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAInB,SAAS,kBAAAA,QAAU;AAAA,EACnB,YAAY,kBAAAA,QAAU;AAAA,EACtB,YAAY,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAItB,4BAA4B,kBAAAA,QAAU,SAAS,kBAAAA,QAAU,MAAM,CAAC,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,EAIlE,2BAA2B,kBAAAA,QAAU,SAAS,kBAAAA,QAAU,MAAM;AAAA;AAAA;AAAA;AAAA,EAI9D,mBAAmB,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAI7B,sBAAsB,kBAAAA,QAAU;AAClC;AAEA,IAAO,kBAAQ;",
6
6
  "names": ["import_DSModal", "DSModalV2", "DSModalV1", "PropTypes"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const MODAL_TYPE = {\n DEFAULT: 'default',\n ALERT: 'alert',\n CONFIRM: 'confirm',\n NOTIFICATION: 'notification',\n WARNING: 'warning',\n ERROR: 'error',\n SUCCESS: 'success',\n HELP: 'help',\n INFO: 'info',\n};\n\nexport 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\nexport const MODAL_TYPE_V2 = {\n INFORMATION: 'information',\n DECISION: 'decision',\n SELECTION: 'selection',\n FORM: 'form',\n};\n\nexport const MODAL_SUB_TYPE_V2 = {\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n INFORMATION: 'information',\n};\n\nexport default MODAL_TYPE;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AACR;AAEO,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;AACb;AAEO,MAAM,gBAAgB;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AACR;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AACf;AAEA,IAAO,oBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAAA,EACxB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AACR;AAEO,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;AACb;AAEO,MAAM,gBAAgB;AAAA,EAC3B,aAAa;AAAA,EACb,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AACR;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AACf;AAEA,IAAO,oBAAQ;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -34,7 +38,7 @@ __export(src_exports, {
34
38
  });
35
39
  module.exports = __toCommonJS(src_exports);
36
40
  var React = __toESM(require("react"));
37
- var import_DSModal = require("./DSModal");
38
- var import_constants = require("./constants");
39
- var import_DSModal2 = require("./v2/DSModal");
41
+ var import_DSModal = require("./DSModal.js");
42
+ var import_constants = require("./constants.js");
43
+ var import_DSModal2 = require("./v2/DSModal.js");
40
44
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { DSModal, DSModal as default } from './DSModal';\nexport { MODAL_TYPE, modalTypes, MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from './constants';\nexport { DSModalWithSchema } from './v2/DSModal';\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,qBAA4C;AAC5C,uBAAyE;AACzE,IAAAA,kBAAkC;",
4
+ "sourcesContent": ["export { DSModal, DSModal as default } from './DSModal.js';\nexport { MODAL_TYPE, modalTypes, MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from './constants.js';\nexport { DSModalWithSchema } from './v2/DSModal.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAA4C;AAC5C,uBAAyE;AACzE,IAAAA,kBAAkC;",
6
6
  "names": ["import_DSModal"]
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -35,8 +39,8 @@ var import_ds_classnames = require("@elliemae/ds-classnames");
35
39
  var import_ds_icon = require("@elliemae/ds-icon");
36
40
  var import_ds_icons = require("@elliemae/ds-icons");
37
41
  var import_ds_button = __toESM(require("@elliemae/ds-button"));
38
- var import_constants = __toESM(require("../constants"));
39
- var import_ModalFeedBack = __toESM(require("./ModalFeedBack/ModalFeedBack"));
42
+ var import_constants = __toESM(require("../constants.js"));
43
+ var import_ModalFeedBack = __toESM(require("./ModalFeedBack/ModalFeedBack.js"));
40
44
  var import_ds_shared = require("@elliemae/ds-shared");
41
45
  const DSModal = ({
42
46
  containerProps = {},
@@ -154,32 +158,107 @@ const DSModal = ({
154
158
  };
155
159
  DSModal.propTypes = {
156
160
  className: import_prop_types.default.string,
161
+ /**
162
+ * Add an additional css class to the footer
163
+ */
157
164
  additionalFooterCssClass: import_prop_types.default.string,
165
+ /**
166
+ * Set style for the modal
167
+ */
158
168
  style: import_prop_types.default.shape({}),
169
+ /**
170
+ * Select size for the close icon
171
+ */
159
172
  iconCloseSize: import_prop_types.default.oneOf(import_ds_shared.iconSizes),
173
+ /**
174
+ * ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']
175
+ */
160
176
  modalType: import_prop_types.default.oneOf(import_constants.modalTypes),
177
+ /**
178
+ * Show the header or not
179
+ */
161
180
  showHeader: import_prop_types.default.bool,
181
+ /**
182
+ * Show the footer or not
183
+ */
162
184
  showFooter: import_prop_types.default.bool,
185
+ /**
186
+ * Main content of the modal
187
+ */
163
188
  children: import_prop_types.default.oneOfType([import_prop_types.default.element, import_prop_types.default.string, import_prop_types.default.any]).isRequired,
189
+ /**
190
+ * Content is centered or not
191
+ */
164
192
  centered: import_prop_types.default.bool,
193
+ /**
194
+ * Text to be added in the confirm button
195
+ */
165
196
  confirmLabel: import_prop_types.default.string,
197
+ /**
198
+ * Text to be added in the modal title
199
+ */
166
200
  modalTitle: import_prop_types.default.string,
201
+ /**
202
+ * Text to be added in the modal title
203
+ */
167
204
  size: import_prop_types.default.oneOf(import_ds_shared.sizes),
205
+ /**
206
+ * Modal is open or not
207
+ */
168
208
  isOpen: import_prop_types.default.bool,
209
+ /**
210
+ * Allows a function to be triggered once the modal is closed
211
+ */
169
212
  onClose: import_prop_types.default.func,
213
+ /**
214
+ * Allows a function to be triggered once the modal is opened
215
+ */
170
216
  onAfterOpen: import_prop_types.default.func,
217
+ /**
218
+ * Allows a function to be triggered once the modal open is confirmed
219
+ */
171
220
  onConfirm: import_prop_types.default.func,
221
+ /**
222
+ * Allows a function to be triggered once the modal open is rejected
223
+ */
172
224
  onReject: import_prop_types.default.func,
225
+ /**
226
+ * Text to be added in the reject button
227
+ */
173
228
  rejectLabel: import_prop_types.default.string,
229
+ /**
230
+ * If modal should close on overlay click
231
+ */
174
232
  shouldCloseOnOverlayClick: import_prop_types.default.bool,
233
+ /**
234
+ * Modal has error or not
235
+ */
175
236
  hasError: import_prop_types.default.bool,
237
+ /**
238
+ * Modal has warning or not
239
+ */
176
240
  hasWarning: import_prop_types.default.bool,
241
+ /**
242
+ * Modal has success or not
243
+ */
177
244
  hasSuccess: import_prop_types.default.bool,
245
+ /**
246
+ * Modal has info or not
247
+ */
178
248
  hasInfo: import_prop_types.default.bool,
249
+ /**
250
+ * Modal has help or not
251
+ */
179
252
  hasHelp: import_prop_types.default.bool,
180
253
  actionsRef: import_prop_types.default.func,
181
254
  appElement: import_prop_types.default.string,
255
+ /**
256
+ * Customized props for the confirm button
257
+ */
182
258
  overridePropsConfirmButton: import_prop_types.default.shape({}),
259
+ /**
260
+ * Customized props for the reject button
261
+ */
183
262
  overridePropsRejectButton: import_prop_types.default.shape({})
184
263
  };
185
264
  var DSModal_default = DSModal;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v1/DSModal.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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';\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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkFb;AAhFV,wBAAsB;AACtB,yBAAuB;AACvB,2BAA0C;AAC1C,qBAA4B;AAC5B,sBAAsB;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AAY,kBAAAA,QAAU;AAAA,EAItB,4BAA4B,kBAAAA,QAAU,MAAM,CAAC,CAAC;AAAA,EAI9C,2BAA2B,kBAAAA,QAAU,MAAM,CAAC,CAAC;AAC/C;AAEA,IAAO,kBAAQ;",
4
+ "sourcesContent": ["/* 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.js';\nimport ModalFeedBack from './ModalFeedBack/ModalFeedBack.js';\nimport { sizes, iconSizes } from '@elliemae/ds-shared';\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.sh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AI3B,QAAQ,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAIlB,SAAS,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAInB,aAAa,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAIvB,WAAW,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAIpB,aAAa,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAIvB,2BAA2B,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAIrC,UAAU,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAIpB,YAAY,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAItB,YAAY,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAItB,SAAS,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAInB,SAAS,kBAAAA,QAAU;AAAA,EACnB,YAAY,kBAAAA,QAAU;AAAA,EACtB,YAAY,kBAAAA,QAAU;AAAA;AAAA;AAAA;AAAA,EAItB,4BAA4B,kBAAAA,QAAU,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,EAI9C,2BAA2B,kBAAAA,QAAU,MAAM,CAAC,CAAC;AAC/C;AAEA,IAAO,kBAAQ;",
6
6
  "names": ["MODAL_TYPE", "ReactModal", "DSButton", "ModalFeedBack", "PropTypes"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v1/DSModalType.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,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;AACb;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,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;AACb;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -29,7 +33,7 @@ __export(DSModalWrapper_exports, {
29
33
  module.exports = __toCommonJS(DSModalWrapper_exports);
30
34
  var React = __toESM(require("react"));
31
35
  var import_react = require("react");
32
- var import_constants = require("../constants");
36
+ var import_constants = require("../constants.js");
33
37
  var DSModalWrapper_default = (WrappedComponent) => {
34
38
  class DSModalWrapper extends import_react.Component {
35
39
  constructor() {
@@ -67,6 +71,10 @@ var DSModalWrapper_default = (WrappedComponent) => {
67
71
  this.setState({ actions: node });
68
72
  this.handleResize();
69
73
  };
74
+ /**
75
+ * Change button width to 100% if the
76
+ * combined width of the button (or button group) exceed 50% of the container width.
77
+ */
70
78
  this.handleResize = () => {
71
79
  if (!this.state)
72
80
  return null;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v1/DSModalWrapper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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 (containerWidth && actionsWidth && (actionsWidth / containerWidth) * 100 > 50) {\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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AACzC,uBAA2B;AAE3B,IAAO,yBAAQ,CAAC,qBAAqB;AACnC,QAAM,uBAAuB,uBAAU;AAAA,IAAvC;AAAA;AACE,mBAAQ;AAAA,QACN,YAAY;AAAA,QACZ,0BAA0B;AAAA,QAC1B,WAAW;AAAA,QACX,SAAS;AAAA,QACT,QAAQ;AAAA,MACV;AAUA,4BAAiB,CAAC,MAAM;AACtB,aAAK,mBAAmB;A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U,IAAI,KAAK;AAC3B,UAAI,cAAc,4BAAW,SAAS;AACpC,cAAM,gBAAgB,YAAY,MAAM;AAEtC,gBAAM,EAAE,WAAW,QAAQ,IAAI,KAAK;AACpC,cAAI,CAAC,aAAa,CAAC;AAAS,mBAAO;AACnC,wBAAc,aAAa;AAC3B,eAAK,SAAS,EAAE,YAAY,KAAK,CAAC;AAClC,iBAAO,KAAK,aAAa;AAAA,QAC3B,GAAG,GAAG;AAAA,MACR;AAAA,IACF;AAAA,IAEA,SAAS;AACP,YAAM,EAAE,OAAO,MAAM,IAAI;AACzB,YAAM,EAAE,0BAA0B,OAAO,IAAI;AAC7C,iBAAO,4BAAc,kBAAkB;AAAA,QACrC,GAAG;AAAA,QACH;AAAA,QACA,UAAU,KAAK;AAAA,QACf,gBAAgB,KAAK;AAAA,QACrB,gBAAgB,KAAK;AAAA,QACrB,cAAc,KAAK;AAAA,QACnB,YAAY,KAAK;AAAA,QACjB;AAAA,QACA,aAAa,MAAM;AACjB,cAAI,MAAM;AAAa,kBAAM,YAAY;AACzC,eAAK,YAAY;AAAA,QACnB;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import { Component, createElement } from 'react';\nimport { MODAL_TYPE } from '../constants.js';\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 (containerWidth && actionsWidth && (actionsWidth / containerWidth) * 100 > 50) {\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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AACzC,uBAA2B;AAE3B,IAAO,yBAAQ,CAAC,qBAAqB;AACnC,QAAM,uBAAuB,uBAAU;AAAA,IAAvC;AAAA;AACE,mBAAQ;AAAA,QACN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B;AAClB,aAAO,iBAAiB,UAAU,KAAK,YAAY;AAAA,IACrD;AAAA,IAEA,uBAAuB;AACrB,aAAO,oBAAoB,UAAU,KAAK,YAAY;AAAA,IACxD;AAAA,IAiDA,cAAc;AACZ,YAAM,EAAE,UAAU,IAAI,KAAK;AAC3B,UAAI,cAAc,4BAAW,SAAS;AACpC,cAAM,gBAAgB,YAAY,MAAM;AAEtC,gBAAM,EAAE,WAAW,QAAQ,IAAI,KAAK;AACpC,cAAI,CAAC,aAAa,CAAC;AAAS,mBAAO;AACnC,wBAAc,aAAa;AAC3B,eAAK,SAAS,EAAE,YAAY,KAAK,CAAC;AAClC,iBAAO,KAAK,aAAa;AAAA,QAC3B,GAAG,GAAG;AAAA,MACR;AAAA,IACF;AAAA,IAEA,SAAS;AACP,YAAM,EAAE,OAAO,MAAM,IAAI;AACzB,YAAM,EAAE,0BAA0B,OAAO,IAAI;AAC7C,iBAAO,4BAAc,kBAAkB;AAAA,QACrC,GAAG;AAAA,QACH;AAAA,QACA,UAAU,KAAK;AAAA,QACf,gBAAgB,KAAK;AAAA,QACrB,gBAAgB,KAAK;AAAA,QACrB,cAAc,KAAK;AAAA,QACnB,YAAY,KAAK;AAAA,QACjB;AAAA,QACA,aAAa,MAAM;AACjB,cAAI,MAAM;AAAa,kBAAM,YAAY;AACzC,eAAK,YAAY;AAAA,QACnB;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -31,7 +35,7 @@ var React = __toESM(require("react"));
31
35
  var import_jsx_runtime = require("react/jsx-runtime");
32
36
  var import_ds_icons = require("@elliemae/ds-icons");
33
37
  var import_ds_classnames = require("@elliemae/ds-classnames");
34
- var import_constants = require("../../constants");
38
+ var import_constants = require("../../constants.js");
35
39
  const feedbackIconSize = "xxl";
36
40
  const { WARNING, ERROR, SUCCESS, HELP, INFO } = import_constants.MODAL_TYPE;
37
41
  const getModalType = (modalType, { hasError, hasWarning, hasSuccess, hasInfo, hasHelp }) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/v1/ModalFeedBack/ModalFeedBack.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBV;AAtBb,sBAAuE;AACvE,2BAA0C;AAC1C,uBAA2B;AAE3B,MAAM,mBAAmB;AAEzB,MAAM,EAAE,SAAS,OAAO,SAAS,MAAM,KAAK,IAAI;AAEhD,MAAM,eAAe,CAAC,WAAW,EAAE,UAAU,YAAY,YAAY,SAAS,QAAQ,MAAM;AAC1F,MAAI,CAAC,SAAS,OAAO,SAAS,MAAM,IAAI,EAAE,QAAQ,SAAS,IAAI;AAAI,WAAO;AAC1E,MAAI;AAAU,WAAO;AACrB,MAAI;AAAY,WAAO;AACvB,MAAI;AAAY,WAAO;AACvB,MAAI;AAAS,WAAO;AACpB,MAAI;AAAS,WAAO;AACpB,SAAO;AACT;AAEA,MAAM,cAAc,CAAC,cAAc;AACjC,UAAQ,WAAW;AAAA,IACjB,KAAK;AAAA,IACL,KAAK;AACH,aAAO,4CAAC,iCAAc,MAAM,kBAAkB;AAAA,IAChD,KAAK;AACH,aAAO,4CAAC,mCAAgB,MAAM,kBAAkB;AAAA,IAClD,KAAK;AACH,aAAO,4CAAC,8BAAW,MAAM,kBAAkB;AAAA,IAC7C,KAAK;AACH,aAAO,4CAAC,8BAAW,MAAM,kBAAkB;AAAA,IAC7C;AACE,aAAO,4CAAC,8BAAW,MAAM,kBAAkB;AAAA,EAC/C;AACF;AAEA,MAAM,gBAAgB,CAAC;AAAA,EACrB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AACZ,MAAM;AACJ,QAAM,OAAO,aAAa,WAAW;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,EAAE,aAAa,QAAI,gDAA0B,kBAAkB,WAAW,EAAE,WAAW,KAAK,CAAC;AACnG,QAAM,eAAe,YAAY,IAAI;AAErC,SAAO,4CAAC,SAAI,WAAW,cAAe,wBAAa;AACrD;AAEA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { WarningCircle, CheckmarkCircle, HelpCircle, InfoCircle } from '@elliemae/ds-icons';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { MODAL_TYPE } from '../../constants.js';\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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuBV;AAtBb,sBAAuE;AACvE,2BAA0C;AAC1C,uBAA2B;AAE3B,MAAM,mBAAmB;AAEzB,MAAM,EAAE,SAAS,OAAO,SAAS,MAAM,KAAK,IAAI;AAEhD,MAAM,eAAe,CAAC,WAAW,EAAE,UAAU,YAAY,YAAY,SAAS,QAAQ,MAAM;AAC1F,MAAI,CAAC,SAAS,OAAO,SAAS,MAAM,IAAI,EAAE,QAAQ,SAAS,IAAI;AAAI,WAAO;AAC1E,MAAI;AAAU,WAAO;AACrB,MAAI;AAAY,WAAO;AACvB,MAAI;AAAY,WAAO;AACvB,MAAI;AAAS,WAAO;AACpB,MAAI;AAAS,WAAO;AACpB,SAAO;AACT;AAEA,MAAM,cAAc,CAAC,cAAc;AACjC,UAAQ,WAAW;AAAA,IACjB,KAAK;AAAA,IACL,KAAK;AACH,aAAO,4CAAC,iCAAc,MAAM,kBAAkB;AAAA,IAChD,KAAK;AACH,aAAO,4CAAC,mCAAgB,MAAM,kBAAkB;AAAA,IAClD,KAAK;AACH,aAAO,4CAAC,8BAAW,MAAM,kBAAkB;AAAA,IAC7C,KAAK;AACH,aAAO,4CAAC,8BAAW,MAAM,kBAAkB;AAAA,IAC7C;AACE,aAAO,4CAAC,8BAAW,MAAM,kBAAkB;AAAA,EAC/C;AACF;AAEA,MAAM,gBAAgB,CAAC;AAAA,EACrB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AACZ,MAAM;AACJ,QAAM,OAAO,aAAa,WAAW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