@elliemae/ds-modal 3.1.0-next.1 → 3.1.0-next.4

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.
@@ -41,12 +41,12 @@ __export(DSModal_exports, {
41
41
  module.exports = __toCommonJS(DSModal_exports);
42
42
  var React = __toESM(require("react"));
43
43
  var import_react = __toESM(require("react"));
44
- var import_react_desc = require("react-desc");
44
+ var import_ds_utilities = require("@elliemae/ds-utilities");
45
45
  var import_react_modal = __toESM(require("react-modal"));
46
46
  var import_ds_classnames = require("@elliemae/ds-classnames");
47
47
  var import_constants = require("../constants");
48
48
  var import_ModalContent = require("./components/ModalContent");
49
- var import_styled_components = require("styled-components");
49
+ var import_ds_system = require("@elliemae/ds-system");
50
50
  const DSModal = ({
51
51
  containerProps = {},
52
52
  className = "",
@@ -85,7 +85,7 @@ const DSModal = ({
85
85
  classNameBlock,
86
86
  classNameModifier
87
87
  } = (0, import_ds_classnames.convertPropToCssClassName)("modal-v2", className, { size });
88
- const theme = (0, import_react.useContext)(import_styled_components.ThemeContext);
88
+ const theme = (0, import_react.useContext)(import_ds_system.ThemeContext);
89
89
  return /* @__PURE__ */ import_react.default.createElement(import_react_modal.default, {
90
90
  testId: dataTestId,
91
91
  className: `${cssClassName} ${classNameBlock(`type-${modalType}`)}`,
@@ -98,7 +98,7 @@ const DSModal = ({
98
98
  style: {
99
99
  content: __spreadValues({}, style),
100
100
  overlay: {
101
- zIndex: theme.zIndex.dialog
101
+ zIndex: zIndex ?? theme.zIndex.dialog
102
102
  }
103
103
  }
104
104
  }, /* @__PURE__ */ import_react.default.createElement(import_ModalContent.DSModalContent, {
@@ -122,25 +122,25 @@ const DSModal = ({
122
122
  }, children));
123
123
  };
124
124
  const props = {
125
- containerProps: import_react_desc.PropTypes.object.description("inject props to container wrapper"),
126
- className: import_react_desc.PropTypes.string.description("css class"),
127
- style: import_react_desc.PropTypes.object.description("style object for container wrapper"),
128
- modalTitle: import_react_desc.PropTypes.string.description("modal container title"),
129
- centered: import_react_desc.PropTypes.bool.description("center container"),
130
- showRejectButton: import_react_desc.PropTypes.bool.description("show reject button"),
131
- showClose: import_react_desc.PropTypes.bool.description("show close button"),
132
- searchProps: import_react_desc.PropTypes.object.description("Props for search component"),
133
- additionalFooterCssClass: import_react_desc.PropTypes.string.description("css class for footer"),
134
- overridePropsConfirmButton: import_react_desc.PropTypes.object.description("override props confirm button"),
135
- overridePropsRejectButton: import_react_desc.PropTypes.object.description("override props reject button"),
136
- isOpen: import_react_desc.PropTypes.bool.description("controlled isOpen flag"),
137
- onClose: import_react_desc.PropTypes.func.description("close callback"),
138
- onAfterOpen: import_react_desc.PropTypes.func.description("after open callback"),
139
- onConfirm: import_react_desc.PropTypes.func.description("confirm callback"),
140
- onReject: import_react_desc.PropTypes.func.description("reject callback"),
141
- rejectLabel: import_react_desc.PropTypes.string.description("reject label"),
142
- confirmLabel: import_react_desc.PropTypes.string.description("confirm text string"),
143
- size: import_react_desc.PropTypes.oneOf([
125
+ containerProps: import_ds_utilities.PropTypes.object.description("inject props to container wrapper"),
126
+ className: import_ds_utilities.PropTypes.string.description("css class"),
127
+ style: import_ds_utilities.PropTypes.object.description("style object for container wrapper"),
128
+ modalTitle: import_ds_utilities.PropTypes.string.description("modal container title"),
129
+ centered: import_ds_utilities.PropTypes.bool.description("center container"),
130
+ showRejectButton: import_ds_utilities.PropTypes.bool.description("show reject button"),
131
+ showClose: import_ds_utilities.PropTypes.bool.description("show close button"),
132
+ searchProps: import_ds_utilities.PropTypes.object.description("Props for search component"),
133
+ additionalFooterCssClass: import_ds_utilities.PropTypes.string.description("css class for footer"),
134
+ overridePropsConfirmButton: import_ds_utilities.PropTypes.object.description("override props confirm button"),
135
+ overridePropsRejectButton: import_ds_utilities.PropTypes.object.description("override props reject button"),
136
+ isOpen: import_ds_utilities.PropTypes.bool.description("controlled isOpen flag"),
137
+ onClose: import_ds_utilities.PropTypes.func.description("close callback"),
138
+ onAfterOpen: import_ds_utilities.PropTypes.func.description("after open callback"),
139
+ onConfirm: import_ds_utilities.PropTypes.func.description("confirm callback"),
140
+ onReject: import_ds_utilities.PropTypes.func.description("reject callback"),
141
+ rejectLabel: import_ds_utilities.PropTypes.string.description("reject label"),
142
+ confirmLabel: import_ds_utilities.PropTypes.string.description("confirm text string"),
143
+ size: import_ds_utilities.PropTypes.oneOf([
144
144
  "default",
145
145
  "xx-large",
146
146
  "x-large",
@@ -148,21 +148,21 @@ const props = {
148
148
  "medium",
149
149
  "small"
150
150
  ]).description("modal container size"),
151
- modalSubType: import_react_desc.PropTypes.any.description("modal sub type"),
152
- modalType: import_react_desc.PropTypes.any.description("modal type"),
153
- actionsRef: import_react_desc.PropTypes.any.description("ref for modal footer actions"),
154
- children: import_react_desc.PropTypes.oneOfType([
155
- import_react_desc.PropTypes.element,
156
- import_react_desc.PropTypes.arrayOf([import_react_desc.PropTypes.element])
151
+ modalSubType: import_ds_utilities.PropTypes.any.description("modal sub type"),
152
+ modalType: import_ds_utilities.PropTypes.any.description("modal type"),
153
+ actionsRef: import_ds_utilities.PropTypes.any.description("ref for modal footer actions"),
154
+ children: import_ds_utilities.PropTypes.oneOfType([
155
+ import_ds_utilities.PropTypes.element,
156
+ import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.element)
157
157
  ]).description("modal container children"),
158
- shouldCloseOnOverlayClick: import_react_desc.PropTypes.bool.description("close on click outside container"),
159
- appElement: import_react_desc.PropTypes.string.description("App element ID to inject the modal"),
160
- zIndex: import_react_desc.PropTypes.number.description("zindex for modal container"),
161
- removePadding: import_react_desc.PropTypes.bool.description("remove modal builtin padding")
158
+ shouldCloseOnOverlayClick: import_ds_utilities.PropTypes.bool.description("close on click outside container"),
159
+ appElement: import_ds_utilities.PropTypes.string.description("App element ID to inject the modal"),
160
+ zIndex: import_ds_utilities.PropTypes.number.description("zindex for modal container"),
161
+ removePadding: import_ds_utilities.PropTypes.bool.description("remove modal builtin padding")
162
162
  };
163
163
  DSModal.propTypes = props;
164
164
  DSModal.displayName = "DSModal";
165
- const DSModalWithSchema = (0, import_react_desc.describe)(DSModal);
165
+ const DSModalWithSchema = (0, import_ds_utilities.describe)(DSModal);
166
166
  DSModalWithSchema.propTypes = props;
167
167
  var DSModal_default = DSModal;
168
168
  //# sourceMappingURL=DSModal.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v2/DSModal.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useContext } 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';\nimport { ThemeContext } from 'styled-components';\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,\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 const theme = useContext(ThemeContext);\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: theme.zIndex.dialog,\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;\nDSModal.displayName = 'DSModal';\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;AAAA;ACAA,YAAuB;ADCvB,mBAAkC;AAClC,wBAAoC;AACpC,yBAAuB;AACvB,2BAA0C;AAC1C,uBAA8B;AAC9B,0BAA+B;AAC/B,+BAA6B;AAE7B,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,OAAO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IACV,4BAAU,QAAQ,CAAC,4BAAU,OAAO,CAAC;AAAA,EACvC,CAAC,EAAE,YAAY,0BAA0B;AAAA,EAEzC,2BAA2B,4BAAU,KAAK,YACxC,kCACF;AAAA,EAIA,YAAY,4BAAU,OAAO,YAC3B,oCACF;AAAA,EAEA,QAAQ,4BAAU,OAAO,YAAY,4BAA4B;AAAA,EAEjE,eAAe,4BAAU,KAAK,YAAY,8BAA8B;AAC1E;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,gCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport ReactModal from 'react-modal';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { MODAL_TYPE_V2 } from '../constants';\nimport { DSModalContent } from './components/ModalContent';\nimport { ThemeContext } from '@elliemae/ds-system';\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,\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 const theme = useContext(ThemeContext);\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: zIndex ?? theme.zIndex.dialog,\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;\nDSModal.displayName = 'DSModal';\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;AAAA;ACAA,YAAuB;ADCvB,mBAAkC;AAClC,0BAAoC;AACpC,yBAAuB;AACvB,2BAA0C;AAC1C,uBAA8B;AAC9B,0BAA+B;AAC/B,uBAA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,YAAY,YAAY;AAAA,EAEjD,YAAY,8BAAU,IAAI,YAAY,8BAA8B;AAAA,EAEpE,UAAU,8BAAU,UAAU;AAAA,IAC5B,8BAAU;AAAA,IACV,8BAAU,QAAQ,8BAAU,OAAO;AAAA,EACrC,CAAC,EAAE,YAAY,0BAA0B;AAAA,EAEzC,2BAA2B,8BAAU,KAAK,YACxC,kCACF;AAAA,EAIA,YAAY,8BAAU,OAAO,YAC3B,oCACF;AAAA,EAEA,QAAQ,8BAAU,OAAO,YAAY,4BAA4B;AAAA,EAEjE,eAAe,8BAAU,KAAK,YAAY,8BAA8B;AAC1E;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,kCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -16,12 +16,12 @@ var __spreadValues = (a, b) => {
16
16
  };
17
17
  import * as React from "react";
18
18
  import React2, { useContext } from "react";
19
- import { PropTypes, describe } from "react-desc";
19
+ import { PropTypes, describe } from "@elliemae/ds-utilities";
20
20
  import ReactModal from "react-modal";
21
21
  import { convertPropToCssClassName } from "@elliemae/ds-classnames";
22
22
  import { MODAL_TYPE_V2 } from "../constants";
23
23
  import { DSModalContent } from "./components/ModalContent";
24
- import { ThemeContext } from "styled-components";
24
+ import { ThemeContext } from "@elliemae/ds-system";
25
25
  const DSModal = ({
26
26
  containerProps = {},
27
27
  className = "",
@@ -73,7 +73,7 @@ const DSModal = ({
73
73
  style: {
74
74
  content: __spreadValues({}, style),
75
75
  overlay: {
76
- zIndex: theme.zIndex.dialog
76
+ zIndex: zIndex ?? theme.zIndex.dialog
77
77
  }
78
78
  }
79
79
  }, /* @__PURE__ */ React2.createElement(DSModalContent, {
@@ -128,7 +128,7 @@ const props = {
128
128
  actionsRef: PropTypes.any.description("ref for modal footer actions"),
129
129
  children: PropTypes.oneOfType([
130
130
  PropTypes.element,
131
- PropTypes.arrayOf([PropTypes.element])
131
+ PropTypes.arrayOf(PropTypes.element)
132
132
  ]).description("modal container children"),
133
133
  shouldCloseOnOverlayClick: PropTypes.bool.description("close on click outside container"),
134
134
  appElement: PropTypes.string.description("App element ID to inject the modal"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/DSModal.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext } 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';\nimport { ThemeContext } from 'styled-components';\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,\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 const theme = useContext(ThemeContext);\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: theme.zIndex.dialog,\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;\nDSModal.displayName = 'DSModal';\nconst DSModalWithSchema = describe(DSModal);\nDSModalWithSchema.propTypes = props;\n\nexport { DSModalContent, DSModalWithSchema };\nexport default DSModal;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,OAAO;AAAA,EAEP,YAAY,cAAc;AAAA,EAC1B,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc,CAAC;AAAA,EAEf,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA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AK,YAAY,8BAA8B;AAC1E;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport ReactModal from 'react-modal';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { MODAL_TYPE_V2 } from '../constants';\nimport { DSModalContent } from './components/ModalContent';\nimport { ThemeContext } from '@elliemae/ds-system';\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,\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 const theme = useContext(ThemeContext);\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: zIndex ?? theme.zIndex.dialog,\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;\nDSModal.displayName = 'DSModal';\nconst DSModalWithSchema = describe(DSModal);\nDSModalWithSchema.propTypes = props;\n\nexport { DSModalContent, DSModalWithSchema };\nexport default DSModal;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,OAAO;AAAA,EAEP,YAAY,cAAc;AAAA,EAC1B,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc,CAAC;AAAA,EAEf,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA6B,CAAC;AAAA,EAC9B,4BAA4B,CAAC;AAAA,EAE7B;AAAA,EACA,SAAS;AAAA,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AoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-modal",
3
- "version": "3.1.0-next.1",
3
+ "version": "3.1.0-next.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Modal",
6
6
  "files": [
@@ -98,24 +98,18 @@
98
98
  "reportFile": "tests.xml",
99
99
  "indent": 4
100
100
  },
101
- "scripts": {
102
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
103
- "test": "node ../../scripts/testing/test.mjs",
104
- "lint": "node ../../scripts/lint.mjs",
105
- "dts": "node ../../scripts/dts.mjs",
106
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
107
- },
108
101
  "dependencies": {
109
- "@elliemae/ds-button": "3.1.0-next.1",
110
- "@elliemae/ds-classnames": "3.1.0-next.1",
111
- "@elliemae/ds-form": "3.1.0-next.1",
112
- "@elliemae/ds-icon": "3.1.0-next.1",
113
- "@elliemae/ds-icons": "3.1.0-next.1",
114
- "@elliemae/ds-shared": "3.1.0-next.1",
115
- "@elliemae/ds-system": "3.1.0-next.1",
102
+ "@elliemae/ds-button": "3.1.0-next.4",
103
+ "@elliemae/ds-classnames": "3.1.0-next.4",
104
+ "@elliemae/ds-form": "3.1.0-next.4",
105
+ "@elliemae/ds-icon": "3.1.0-next.4",
106
+ "@elliemae/ds-icons": "3.1.0-next.4",
107
+ "@elliemae/ds-shared": "3.1.0-next.4",
108
+ "@elliemae/ds-system": "3.1.0-next.4",
109
+ "@elliemae/ds-utilities": "3.1.0-next.4",
116
110
  "prop-types": "~15.8.1",
117
- "react-desc": "~4.1.3",
118
- "react-modal": "~3.12.1"
111
+ "react-modal": "~3.12.1",
112
+ "styled-components": "~5.3.5"
119
113
  },
120
114
  "devDependencies": {
121
115
  "@testing-library/jest-dom": "~5.16.2",
@@ -129,5 +123,13 @@
129
123
  "publishConfig": {
130
124
  "access": "public",
131
125
  "typeSafety": false
126
+ },
127
+ "scripts": {
128
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
129
+ "test": "node ../../scripts/testing/test.mjs",
130
+ "lint": "node ../../scripts/lint.mjs",
131
+ "dts": "node ../../scripts/dts.mjs",
132
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
133
+ "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
132
134
  }
133
- }
135
+ }