@elliemae/ds-modal 3.0.0-alpha.0 → 3.0.0-alpha.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 (51) hide show
  1. package/dist/cjs/DSModal.js +30 -7
  2. package/dist/cjs/DSModal.js.map +1 -1
  3. package/dist/cjs/v1/DSModal.js +21 -13
  4. package/dist/cjs/v1/DSModal.js.map +1 -1
  5. package/dist/cjs/v1/DSModalWrapper.js +19 -3
  6. package/dist/cjs/v1/DSModalWrapper.js.map +1 -1
  7. package/dist/cjs/v2/DSModal.js +15 -3
  8. package/dist/cjs/v2/DSModal.js.map +1 -1
  9. package/dist/cjs/v2/components/Footer.js +19 -7
  10. package/dist/cjs/v2/components/Footer.js.map +1 -1
  11. package/dist/cjs/v2/components/ModalContent.js +15 -3
  12. package/dist/cjs/v2/components/ModalContent.js.map +1 -1
  13. package/dist/cjs/v2/components/SelectionHeader.js +15 -3
  14. package/dist/cjs/v2/components/SelectionHeader.js.map +1 -1
  15. package/dist/esm/DSModal.js +32 -7
  16. package/dist/esm/DSModal.js.map +1 -1
  17. package/dist/esm/v1/DSModal.js +23 -13
  18. package/dist/esm/v1/DSModal.js.map +1 -1
  19. package/dist/esm/v1/DSModalWrapper.js +21 -3
  20. package/dist/esm/v1/DSModalWrapper.js.map +1 -1
  21. package/dist/esm/v2/DSModal.js +17 -3
  22. package/dist/esm/v2/DSModal.js.map +1 -1
  23. package/dist/esm/v2/components/Footer.js +21 -7
  24. package/dist/esm/v2/components/Footer.js.map +1 -1
  25. package/dist/esm/v2/components/ModalContent.js +17 -3
  26. package/dist/esm/v2/components/ModalContent.js.map +1 -1
  27. package/dist/esm/v2/components/SelectionHeader.js +17 -3
  28. package/dist/esm/v2/components/SelectionHeader.js.map +1 -1
  29. package/package.json +9 -8
  30. package/dist/types/DSModal.d.ts +0 -14
  31. package/dist/types/constants.d.ts +0 -25
  32. package/dist/types/index.d.ts +0 -3
  33. package/dist/types/v1/DSModal.d.ts +0 -143
  34. package/dist/types/v1/DSModalType.d.ts +0 -1
  35. package/dist/types/v1/ModalFeedBack/ModalFeedBack.d.ts +0 -11
  36. package/dist/types/v2/DSModal.d.ts +0 -231
  37. package/dist/types/v2/blocks.d.ts +0 -9
  38. package/dist/types/v2/components/DecisionHeader.d.ts +0 -6
  39. package/dist/types/v2/components/FeedbackIcon.d.ts +0 -5
  40. package/dist/types/v2/components/Footer.d.ts +0 -13
  41. package/dist/types/v2/components/FormHeader.d.ts +0 -8
  42. package/dist/types/v2/components/ModalContent.d.ts +0 -21
  43. package/dist/types/v2/components/SelectionHeader.d.ts +0 -8
  44. package/dist/types/v2/components/Title.d.ts +0 -6
  45. package/dist/types/v2/components/tests/DecisionHeader.test.d.ts +0 -1
  46. package/dist/types/v2/components/tests/FeedbackIcon.test.d.ts +0 -1
  47. package/dist/types/v2/components/tests/Footer.test.d.ts +0 -1
  48. package/dist/types/v2/components/tests/FormHeader.test.d.ts +0 -1
  49. package/dist/types/v2/components/tests/SelectionHeader.test.d.ts +0 -1
  50. package/dist/types/v2/helpers.d.ts +0 -16
  51. package/dist/types/v2/tests/DSModal.test.d.ts +0 -1
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DSModal.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactModal from 'react-modal';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport MODAL_TYPE, { modalTypes } from '../constants';\nimport ModalFeedBack from './ModalFeedBack/ModalFeedBack';\nimport { sizes, iconSizes } from '@elliemae/ds-shared/prop-types';\n\nconst DSModal = ({\n containerProps = {},\n className = '',\n dataTestId = 'ds-modal',\n additionalFooterCssClass = '',\n style = {},\n iconCloseSize = DSIconSizes.S,\n modalType = MODAL_TYPE.DEFAULT,\n showHeader = true,\n showFooter = true,\n children,\n centered = true,\n confirmLabel = 'Accept',\n modalTitle = '',\n size = 'medium',\n isOpen = false,\n onClose = () => null,\n onAfterOpen = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Cancel',\n shouldCloseOnOverlayClick = false,\n hasError = false,\n hasWarning = false,\n hasSuccess = false,\n hasInfo = false,\n hasHelp = false,\n actionsRef = () => null,\n appElement = '#root',\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n zIndex = 10,\n}) => {\n // http://reactcommunity.org/react-modal/accessibility/ https://github.com/reactjs/react-modal#examples\n typeof document !== 'undefined' && document && ReactModal.setAppElement && ReactModal.setAppElement(appElement); // eslint-disable-line\n const { cssClassName, classNameElement, classNameBlock, classNameModifier, classNameBlockModifier } =\n convertPropToCssClassName('modal', className, {\n hasError,\n hasWarning,\n hasSuccess,\n modalType,\n size,\n });\n\n const { WARNING, ERROR, SUCCESS, HELP, INFO } = MODAL_TYPE;\n\n const isAFeedbackType = [WARNING, ERROR, SUCCESS, HELP, INFO].indexOf(modalType) > -1;\n const showFeedBack = isAFeedbackType || hasError || hasWarning || hasSuccess || hasInfo || hasHelp;\n\n return (\n <ReactModal\n testId={dataTestId}\n className={cssClassName}\n contentLabel={modalTitle}\n isOpen={isOpen}\n onAfterOpen={onAfterOpen}\n onRequestClose={onClose}\n overlayClassName={`${classNameBlock('overlay')} ${classNameModifier(centered && 'center')}`}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n style={{\n content: {\n ...style,\n },\n overlay: {\n zIndex,\n },\n }}\n >\n <div {...containerProps}>\n {showHeader && (\n <div className={classNameBlock('modal-header')}>\n <div className={classNameElement('title', 'modal-header')}>{modalTitle}</div>\n <div className={classNameElement('icon', 'modal-header')}>\n <DSButton buttonType=\"link\" icon={<Close />} onClick={onClose} size={iconCloseSize} />\n </div>\n </div>\n )}\n <div className={classNameElement('body')}>\n {showFeedBack && (\n <ModalFeedBack\n hasError={hasError}\n hasHelp={hasHelp}\n hasInfo={hasInfo}\n hasSuccess={hasSuccess}\n hasWarning={hasWarning}\n modalType={modalType}\n />\n )}\n {children}\n </div>\n {showFooter && !isAFeedbackType && (\n <div\n className={`${classNameBlock('modal-footer')} ${\n additionalFooterCssClass ? classNameBlockModifier(additionalFooterCssClass, 'modal-footer') : ''\n }`}\n >\n <div ref={actionsRef} className={classNameBlock('modal-footer-actions')}>\n {modalType === MODAL_TYPE.CONFIRM && (\n <DSButton\n buttonType=\"secondary\"\n className={`${classNameElement('button-action')} ${classNameModifier('reject', 'button-action')} `}\n labelText={rejectLabel}\n onClick={onReject}\n {...overridePropsRejectButton}\n />\n )}\n <DSButton\n buttonType=\"primary\"\n className={`${classNameElement('button-action')} ${classNameModifier('confirm', 'button-action')} `}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...overridePropsConfirmButton}\n />\n </div>\n </div>\n )}\n </div>\n </ReactModal>\n );\n};\n\nDSModal.propTypes = {\n className: PropTypes.string,\n /**\n * Add an additional css class to the footer\n */\n additionalFooterCssClass: PropTypes.string,\n /**\n * Set style for the modal\n */\n style: PropTypes.shape({}),\n /**\n * Select size for the close icon\n */\n iconCloseSize: PropTypes.oneOf(iconSizes),\n /**\n * ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']\n */\n modalType: PropTypes.oneOf(modalTypes),\n /**\n * Show the header or not\n */\n showHeader: PropTypes.bool,\n /**\n * Show the footer or not\n */\n showFooter: PropTypes.bool,\n /**\n * Main content of the modal\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired,\n /**\n * Content is centered or not\n */\n centered: PropTypes.bool,\n /**\n * Text to be added in the confirm button\n */\n confirmLabel: PropTypes.string,\n /**\n * Text to be added in the modal title\n */\n modalTitle: PropTypes.string,\n /**\n * Text to be added in the modal title\n */\n size: PropTypes.oneOf(sizes),\n /**\n * Modal is open or not\n */\n isOpen: PropTypes.bool,\n /**\n * Allows a function to be triggered once the modal is closed\n */\n onClose: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal is opened\n */\n onAfterOpen: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal open is confirmed\n */\n onConfirm: PropTypes.func,\n /**\n * Allows a function to be triggered once the modal open is rejected\n */\n onReject: PropTypes.func,\n /**\n * Text to be added in the reject button\n */\n rejectLabel: PropTypes.string,\n /**\n * If modal should close on overlay click\n */\n shouldCloseOnOverlayClick: PropTypes.bool,\n /**\n * Modal has error or not\n */\n hasError: PropTypes.bool,\n /**\n * Modal has warning or not\n */\n hasWarning: PropTypes.bool,\n /**\n * Modal has success or not\n */\n hasSuccess: PropTypes.bool,\n /**\n * Modal has info or not\n */\n hasInfo: PropTypes.bool,\n /**\n * Modal has help or not\n */\n hasHelp: PropTypes.bool,\n actionsRef: PropTypes.func,\n appElement: PropTypes.string,\n /**\n * Customized props for the confirm button\n */\n overridePropsConfirmButton: PropTypes.shape({}),\n /**\n * Customized props for the reject button\n */\n overridePropsRejectButton: PropTypes.shape({}),\n};\n\nexport default DSModal;\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,2BAA2B;AAAA,EAC3B,QAAQ;AAAA,EACR,gBAAgB,YAAY;AAAA,EAC5B,YAAY,WAAW;AAAA,EACvB,aAAa;AAAA,EACb,aAAa;AAAA,EACb;AAAA,EACA,WAAW;AAAA,EACX,eAAe;AAAA,EACf,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU,MAAM;AAAA,EAChB,cAAc,MAAM;AAAA,EACpB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,4BAA4B;AAAA,EAC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F,WAAW;AAAA,IACX,SAAS;AAAA,KACL;AAAA;AAUpB,QAAQ,YAAY;AAAA,EAClB,WAAW,UAAU;AAAA,EAIrB,0BAA0B,UAAU;AAAA,EAIpC,OAAO,UAAU,MAAM;AAAA,EAIvB,eAAe,UAAU,MAAM;AAAA,EAI/B,WAAW,UAAU,MAAM;AAAA,EAI3B,YAAY,UAAU;AAAA,EAItB,YAAY,UAAU;AAAA,EAItB,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,MAAM;AAAA,EAIpF,UAAU,UAAU;AAAA,EAIpB,cAAc,UAAU;AAAA,EAIxB,YAAY,UAAU;AAAA,EAItB,MAAM,UAAU,MAAM;AAAA,EAItB,QAAQ,UAAU;AAAA,EAIlB,SAAS,UAAU;AAAA,EAInB,aAAa,UAAU;AAAA,EAIvB,WAAW,UAAU;AAAA,EAIrB,UAAU,UAAU;AAAA,EAIpB,aAAa,UAAU;AAAA,EAIvB,2BAA2B,UAAU;AAAA,EAIrC,UAAU,UAAU;AAAA,EAIpB,YAAY,UAAU;AAAA,EAItB,YAAY,UAAU;AAAA,EAItB,SAAS,UAAU;AAAA,EAInB,SAAS,UAAU;AAAA,EACnB,YAAY,UAAU;AAAA,EACtB,YAAY,UAAU;AAAA,EAItB,4BAA4B,UAAU,MAAM;AAAA,EAI5C,2BAA2B,UAAU,MAAM;AAAA;AAG7C,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,22 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1
20
  import * as React from "react";
2
21
  import { Component, createElement } from "react";
3
22
  import { MODAL_TYPE } from "../constants";
@@ -75,8 +94,7 @@ var DSModalWrapper_default = (WrappedComponent) => {
75
94
  render() {
76
95
  const { props, state } = this;
77
96
  const { additionalFooterCssClass, height } = state;
78
- return createElement(WrappedComponent, {
79
- ...props,
97
+ return createElement(WrappedComponent, __spreadProps(__spreadValues({}, props), {
80
98
  height,
81
99
  onResize: this.onResize,
82
100
  onFooterHeight: this.onFooterHeight,
@@ -89,7 +107,7 @@ var DSModalWrapper_default = (WrappedComponent) => {
89
107
  props.onAfterOpen();
90
108
  this.verifyNodes();
91
109
  }
92
- });
110
+ }));
93
111
  }
94
112
  }
95
113
  return DSModalWrapper;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DSModalWrapper.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Component, createElement } from 'react';\nimport { MODAL_TYPE } from '../constants';\n\nexport default (WrappedComponent) => {\n class DSModalWrapper extends Component {\n state = {\n childready: false,\n additionalFooterCssClass: 'loading',\n container: null,\n actions: null,\n height: '100%',\n };\n\n componentDidMount() {\n window.addEventListener('resize', this.handleResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize);\n }\n\n onHeaderHeight = (e) => {\n this.heightHeaderFlag = true;\n this.heightHeader = e.height || 0;\n };\n\n onFooterHeight = (e) => {\n this.heightFooterFlag = true;\n this.heightFooter = e.height || 0;\n };\n\n onResize = ({ bounds }) => {\n if (this.heightFooterFlag && this.heightHeaderFlag) {\n return this.setState({\n height: bounds.height - this.heightFooter - this.heightHeader,\n });\n }\n return setTimeout(this.onResize({ bounds }), 0);\n };\n\n handleContainer = (node) => {\n if (node) this.setState({ container: node });\n this.handleResize();\n };\n\n handleActions = (node) => {\n if (node) this.setState({ actions: node });\n this.handleResize();\n };\n\n /**\n * Change button width to 100% if the\n * combined width of the button (or button group) exceed 50% of the container width.\n */\n handleResize() {\n if (!this.state) return null;\n const { container, actions, childready } = this.state;\n if (!childready) return null;\n this.setState({ additionalFooterCssClass: null }); // !important reset to default state to recalculate\n const { clientWidth: containerWidth } = container;\n const { clientWidth: actionsWidth } = actions;\n // Change button width to 100% if the combined width of the button (or button group) exceed 50% of the container width.\n if (\n containerWidth &&\n actionsWidth &&\n (actionsWidth / containerWidth) * 100 > 50\n ) {\n return this.setState({ additionalFooterCssClass: 'fluid-actions' });\n }\n return this.setState({ additionalFooterCssClass: null });\n }\n\n verifyNodes() {\n const { modalType } = this.props;\n if (modalType !== MODAL_TYPE.DEFAULT) {\n const nodesInterval = setInterval(() => {\n // !important it checks when nodes are availables\n const { container, actions } = this.state;\n if (!container || !actions) return null;\n clearInterval(nodesInterval);\n this.setState({ childready: true });\n return this.handleResize();\n }, 100);\n }\n }\n\n render() {\n const { props, state } = this;\n const { additionalFooterCssClass, height } = state;\n return createElement(WrappedComponent, {\n ...props,\n height,\n onResize: this.onResize,\n onFooterHeight: this.onFooterHeight,\n onHeaderHeight: this.onHeaderHeight,\n containerRef: this.handleContainer,\n actionsRef: this.handleActions,\n additionalFooterCssClass,\n onAfterOpen: () => {\n if (props.onAfterOpen) props.onAfterOpen();\n this.verifyNodes();\n },\n });\n }\n }\n\n return DSModalWrapper;\n};\n"],
5
- "mappings": "AAAA;ACAA;AACA;AAEA,IAAO,yBAAQ,CAAC,qBAAqB;AACnC,+BAA6B,UAAU;AAAA,IAAvC,cAJF;AAIE;AACE,mBAAQ;AAAA,QACN,Y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AAA;AAAA;AAAA;AAMb,SAAO;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,19 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
1
17
  import * as React from "react";
2
18
  import React2 from "react";
3
19
  import { PropTypes, describe } from "react-desc";
@@ -53,9 +69,7 @@ const DSModal = ({
53
69
  overlayClassName: `${classNameBlock("overlay")} ${classNameModifier(centered ? "center" : "top")}`,
54
70
  shouldCloseOnOverlayClick,
55
71
  style: {
56
- content: {
57
- ...style
58
- },
72
+ content: __spreadValues({}, style),
59
73
  overlay: {
60
74
  zIndex
61
75
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/DSModal.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactModal from 'react-modal';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { MODAL_TYPE_V2 } from '../constants';\nimport { DSModalContent } from './components/ModalContent';\n\nconst DSModal = ({\n containerProps = {},\n className = '',\n style = {},\n size = 'default',\n //\n modalType = MODAL_TYPE_V2.INFORMATION,\n modalSubType = null,\n modalTitle = '',\n dataTestId = 'ds-modal',\n centered = false,\n showRejectButton = false,\n showClose = true,\n searchProps = {},\n // override\n actionsRef = () => null,\n additionalFooterCssClass,\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n // react modal\n children,\n isOpen = true,\n onClose = () => null,\n onAfterOpen = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Discard',\n confirmLabel = 'Save',\n shouldCloseOnOverlayClick = false,\n appElement = '#root',\n zIndex = 10,\n removePadding = false,\n}) => {\n if (\n typeof document !== 'undefined' &&\n process.env.NODE_ENV !== 'test' &&\n document &&\n ReactModal.setAppElement\n ) {\n ReactModal.setAppElement(appElement);\n }\n\n const {\n cssClassName,\n classNameBlock,\n classNameModifier,\n } = convertPropToCssClassName('modal-v2', className, { size });\n\n return (\n <ReactModal\n testId={dataTestId}\n className={`${cssClassName} ${classNameBlock(`type-${modalType}`)}`}\n contentLabel={modalTitle}\n isOpen={isOpen}\n onAfterOpen={onAfterOpen}\n onRequestClose={onClose}\n overlayClassName={`${classNameBlock('overlay')} ${classNameModifier(\n centered ? 'center' : 'top',\n )}`}\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\n style={{\n content: {\n ...style,\n },\n overlay: {\n // position: 'absolute', https://jira.elliemae.io/browse/PUI-1471, the overlay should be positioned based on the browser window rather positioned absolute to its parent\n zIndex,\n },\n }}\n >\n <DSModalContent\n actionsRef={actionsRef}\n additionalFooterCssClass={additionalFooterCssClass}\n confirmLabel={confirmLabel}\n containerProps={containerProps}\n modalSubType={modalSubType}\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={onClose}\n onConfirm={onConfirm}\n onReject={onReject}\n overridePropsConfirmButton={overridePropsConfirmButton}\n overridePropsRejectButton={overridePropsRejectButton}\n rejectLabel={rejectLabel}\n searchProps={searchProps}\n showClose={showClose}\n showRejectButton={showRejectButton}\n removePadding={removePadding}\n >\n {children}\n </DSModalContent>\n </ReactModal>\n );\n};\n\nconst props = {\n /** inject props to container wrapper */\n containerProps: PropTypes.object.description(\n 'inject props to container wrapper',\n ),\n /** css class */\n className: PropTypes.string.description('css class'),\n /** style object for container wrapper */\n style: PropTypes.object.description('style object for container wrapper'),\n /** modal container title */\n modalTitle: PropTypes.string.description('modal container title'),\n /** center container */\n centered: PropTypes.bool.description('center container'),\n /** show reject button */\n showRejectButton: PropTypes.bool.description('show reject button'),\n /** show close button */\n showClose: PropTypes.bool.description('show close button'),\n /*\n Props for search component\n */\n searchProps: PropTypes.object.description('Props for search component'),\n /** css class for footer */\n additionalFooterCssClass: PropTypes.string.description(\n 'css class for footer',\n ),\n /** override props confirm button */\n overridePropsConfirmButton: PropTypes.object.description(\n 'override props confirm button',\n ),\n /** override props reject button */\n overridePropsRejectButton: PropTypes.object.description(\n 'override props reject button',\n ),\n /** controlled isOpen flag */\n isOpen: PropTypes.bool.description('controlled isOpen flag'),\n /** close callback */\n onClose: PropTypes.func.description('close callback'),\n /** after open callback */\n onAfterOpen: PropTypes.func.description('after open callback'),\n /** confirm callback */\n onConfirm: PropTypes.func.description('confirm callback'),\n /** reject callback */\n onReject: PropTypes.func.description('reject callback'),\n /** reject label */\n rejectLabel: PropTypes.string.description('reject label'),\n /** confirm text string */\n confirmLabel: PropTypes.string.description('confirm text string'),\n /** modal container size */\n size: PropTypes.oneOf([\n 'default',\n 'xx-large',\n 'x-large',\n 'large',\n 'medium',\n 'small',\n ]).description('modal container size'),\n /** modal sub type */\n modalSubType: PropTypes.any.description('modal sub type'),\n /** modal type */\n modalType: PropTypes.any.description('modal type'),\n /** ref for modal footer actions */\n actionsRef: PropTypes.any.description('ref for modal footer actions'),\n /** modal container children */\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf([PropTypes.element]),\n ]).description('modal container children'),\n /** close on click outside container */\n shouldCloseOnOverlayClick: PropTypes.bool.description(\n 'close on click outside container',\n ),\n /*\n App element ID to inject the modal\n */\n appElement: PropTypes.string.description(\n 'App element ID to inject the modal',\n ),\n /** zindex for modal container */\n zIndex: PropTypes.number.description('zindex for modal container'),\n /** remove modal builtin padding */\n removePadding: PropTypes.bool.description('remove modal builtin padding'),\n};\n\nDSModal.propTypes = props;\n\nconst DSModalWithSchema = describe(DSModal);\nDSModalWithSchema.propTypes = props;\n\nexport { DSModalContent, DSModalWithSchema };\nexport default DSModal;\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,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;AAAA,EAEd,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA6B;AAAA,EAC7B,4BAA4B;AAAA,EAE5B;AAAA,EACA,SAAS;AAAA,EACT,UAAU,MAAM;AAAA,EAChB,cAAc,MAAM;AAAA,EACpB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,4BAA4B;AAAA,EAC5B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,gBAAgB;AAAA,MACZ;AACJ,MACE,OAAO,aAAa,eACpB,QACA,YACA,WAAW,eACX;AACA,eAAW,cAAc;AAAA;AAG3B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,MACE,0BAA0B,YAAY,WAAW,EAAE;AAEvD,SACE,qCAAC,YAAD;AAAA,IACE,QAAQ;AAAA,IACR,WAAW,GAAG,gBAAgB,eAAe,QAAQ;AAAA,IACrD,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,kBAAkB,GAAG,eAAe,cAAc,kBAChD,WAAW,WAAW;AAAA,IAExB;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,WACJ;A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cAAc,UAAU,IAAI,YAAY;AAAA,EAExC,WAAW,UAAU,IAAI,YAAY;AAAA,EAErC,YAAY,UAAU,IAAI,YAAY;AAAA,EAEtC,UAAU,UAAU,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UAAU,QAAQ,CAAC,UAAU;AAAA,KAC5B,YAAY;AAAA,EAEf,2BAA2B,UAAU,KAAK,YACxC;AAAA,EAKF,YAAY,UAAU,OAAO,YAC3B;AAAA,EAGF,QAAQ,UAAU,OAAO,YAAY;AAAA,EAErC,eAAe,UAAU,KAAK,YAAY;AAAA;AAG5C,QAAQ,YAAY;AAEpB,MAAM,oBAAoB,SAAS;AACnC,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,19 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
1
17
  import * as React from "react";
2
18
  import React2 from "react";
3
19
  import DSButton from "@elliemae/ds-button";
@@ -17,21 +33,19 @@ const Footer = ({
17
33
  "data-testid": "modal-footer-wrapper"
18
34
  }, /* @__PURE__ */ React2.createElement(ModalFooterActions, {
19
35
  ref: actionsRef
20
- }, showRejectButton === true && /* @__PURE__ */ React2.createElement(DSButton, {
36
+ }, showRejectButton === true && /* @__PURE__ */ React2.createElement(DSButton, __spreadValues({
21
37
  buttonType: "secondary",
22
38
  className: "action-reject",
23
39
  containerProps: { "data-testid": "modal-footer-reject-btn" },
24
40
  labelText: rejectLabel,
25
- onClick: onReject,
26
- ...overridePropsRejectButton
27
- }), /* @__PURE__ */ React2.createElement(DSButton, {
41
+ onClick: onReject
42
+ }, overridePropsRejectButton)), /* @__PURE__ */ React2.createElement(DSButton, __spreadValues({
28
43
  buttonType: "primary",
29
44
  className: "action-confirm",
30
45
  containerProps: { "data-testid": "modal-footer-confirm-btn" },
31
46
  labelText: confirmLabel,
32
- onClick: onConfirm,
33
- ...overridePropsConfirmButton
34
- })));
47
+ onClick: onConfirm
48
+ }, overridePropsConfirmButton))));
35
49
  var Footer_default = Footer;
36
50
  export {
37
51
  Footer,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/Footer.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport DSButton from '@elliemae/ds-button';\nimport { ModalFooter, ModalFooterActions } from '../blocks';\n\nexport const Footer = ({\n additionalFooterCssClass,\n actionsRef,\n rejectLabel,\n onReject,\n overridePropsRejectButton,\n confirmLabel,\n onConfirm,\n overridePropsConfirmButton,\n showRejectButton,\n}) => (\n <ModalFooter classProps={{ additionalFooterCssClass }} data-testid=\"modal-footer-wrapper\">\n <ModalFooterActions ref={actionsRef}>\n {showRejectButton === true && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...overridePropsRejectButton}\n />\n )}\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...overridePropsConfirmButton}\n />\n </ModalFooterActions>\n </ModalFooter>\n);\n\nexport default Footer;\n"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Prop = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
1
17
  import * as React from "react";
2
18
  import React2 from "react";
3
19
  import { MODAL_TYPE_V2 } from "../../constants";
@@ -34,9 +50,7 @@ const DSModalContent = ({
34
50
  rejectLabel = "Discard",
35
51
  confirmLabel = "Save",
36
52
  removePadding = false
37
- }) => /* @__PURE__ */ React2.createElement(ModalWrapper, {
38
- ...containerProps
39
- }, showForm({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(FormHeader, {
53
+ }) => /* @__PURE__ */ React2.createElement(ModalWrapper, __spreadValues({}, containerProps), showForm({ modalType, modalSubType }) && /* @__PURE__ */ React2.createElement(FormHeader, {
40
54
  modalTitle,
41
55
  modalType,
42
56
  onClose,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/ModalContent.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { MODAL_TYPE_V2 } from '../../constants';\nimport { SelectionHeader } from './SelectionHeader';\nimport { DecisionHeader } from './DecisionHeader';\nimport { FormHeader } from './FormHeader';\nimport { FeedbackIcon } from './FeedbackIcon';\nimport { Footer } from './Footer';\nimport { Title } from './Title';\nimport {\n showDecision,\n showFeedBack,\n showFooter,\n showSelection,\n showForm,\n} from '../helpers';\nimport { ModalContent, ModalWrapper } from '../blocks';\n\nexport const DSModalContent = ({\n containerProps = {},\n //\n modalType = MODAL_TYPE_V2.INFORMATION,\n modalSubType = null,\n modalTitle = '',\n showRejectButton = false,\n showClose = true,\n searchProps = {},\n // override\n actionsRef = () => null,\n additionalFooterCssClass,\n overridePropsConfirmButton = {},\n overridePropsRejectButton = {},\n // react modal\n children,\n onClose = () => null,\n onConfirm = () => null,\n onReject = () => null,\n rejectLabel = 'Discard',\n confirmLabel = 'Save',\n removePadding = false,\n}) => (\n <ModalWrapper {...containerProps}>\n {showForm({ modalType, modalSubType }) && (\n <FormHeader\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={onClose}\n showClose={showClose}\n />\n )}\n {showSelection({ modalType, modalSubType }) && (\n <SelectionHeader\n modalTitle={modalTitle}\n modalType={modalType}\n searchProps={searchProps}\n showClose={showClose}\n />\n )}\n {showDecision({ modalType, modalSubType }) && (\n <DecisionHeader onClose={onClose} showClose={showClose} />\n )}\n {showFeedBack({ modalType, modalSubType }) && (\n <FeedbackIcon modalSubType={modalSubType} />\n )}\n {showDecision({ modalType, modalSubType }) && (\n <Title modalTitle={modalTitle} modalType={modalType} />\n )}\n <ModalContent classProps={{ type: modalType, removePadding }}>\n {children}\n </ModalContent>\n {showFooter({ modalType, modalSubType }) && (\n <Footer\n actionsRef={actionsRef}\n additionalFooterCssClass={additionalFooterCssClass}\n confirmLabel={confirmLabel}\n onConfirm={onConfirm}\n onReject={onReject}\n overridePropsConfirmButton={overridePropsConfirmButton}\n overridePropsRejectButton={overridePropsRejectButton}\n rejectLabel={rejectLabel}\n showRejectButton={showRejectButton}\n />\n )}\n </ModalWrapper>\n);\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAEO,MAAM,iBAAiB,CAAC;AAAA,EAC7B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AAA,EACf,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc;AAAA,EAEd,aAAa,MAAM;AAAA,EACnB;AAAA,EACA,6BAA6B;AAAA,EAC7B,4BAA4B;AAAA,EAE5B;AAAA,EACA,UAAU,MAAM;AAAA,EAChB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,gBAAgB;AAAA,MAEhB,qCAAC,cAAD,mBAAkB,iBACf,SAAS,EAAE,WAAW,mBACrB,qCAAC,YAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,IAGH,cAAc,EAAE,WAAW,mBAC1B,qCAAC,iBAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,IAGH,aAAa,EAAE,WAAW,mBACzB,qCAAC,gBAAD;AAAA,EAAgB;AAAA,EAAkB;AAAA,IAEnC,aAAa,EAAE,WAAW,mBACzB,qCAAC,cAAD;AAAA,EAAc;AAAA,IAEf,aAAa,EAAE,WAAW,mBACzB,qCAAC,OAAD;AAAA,EAAO;AAAA,EAAwB;AAAA,IAEjC,qCAAC,cAAD;AAAA,EAAc,YAAY,EAAE,MAAM,WAAW;AAAA,GAC1C,WAEF,WAAW,EAAE,WAAW,mBACvB,qCAAC,QAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,19 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
1
17
  import * as React from "react";
2
18
  import React2 from "react";
3
19
  import { DSSearchBox } from "@elliemae/ds-form";
@@ -11,9 +27,7 @@ const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose })
11
27
  }), showClose && /* @__PURE__ */ React2.createElement(ModalHeaderTopRight, {
12
28
  classProps: { type: "selection" },
13
29
  "data-testid": "modal-search-box"
14
- }, /* @__PURE__ */ React2.createElement(DSSearchBox, {
15
- ...searchProps
16
- })));
30
+ }, /* @__PURE__ */ React2.createElement(DSSearchBox, __spreadValues({}, searchProps))));
17
31
  var SelectionHeader_default = SelectionHeader;
18
32
  export {
19
33
  SelectionHeader,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/components/SelectionHeader.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSSearchBox } from '@elliemae/ds-form';\nimport { ModalHeader, ModalHeaderTopRight } from '../blocks';\nimport { Title } from './Title';\n\nexport const SelectionHeader = ({ searchProps = {}, modalTitle, modalType, showClose }) => (\n <ModalHeader classProps={{ type: 'selection' }}>\n <Title modalTitle={modalTitle} modalType={modalType} />\n {showClose && (\n <ModalHeaderTopRight classProps={{ type: 'selection' }} data-testid=\"modal-search-box\">\n <DSSearchBox {...searchProps} />\n </ModalHeaderTopRight>\n )}\n </ModalHeader>\n);\n\nexport default SelectionHeader;\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEO,MAAM,kBAAkB,CAAC,EAAE,cAAc,IAAI,YAAY,WAAW,gBACzE,qCAAC,aAAD;AAAA,EAAa,YAAY,EAAE,MAAM;AAAA,GAC/B,qCAAC,OAAD;AAAA,EAAO;AAAA,EAAwB;AAAA,IAC9B,aACC,qCAAC,qBAAD;AAAA,EAAqB,YAAY,EAAE,MAAM;AAAA,EAAe,eAAY;AAAA,GAClE,qCAAC,aAAD;AAAA,KAAiB;AAAA;AAMzB,IAAO,0BAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AAEO,MAAM,kBAAkB,CAAC,EAAE,cAAc,IAAI,YAAY,WAAW,gBACzE,qCAAC,aAAD;AAAA,EAAa,YAAY,EAAE,MAAM;AAAA,GAC/B,qCAAC,OAAD;AAAA,EAAO;AAAA,EAAwB;AAAA,IAC9B,aACC,qCAAC,qBAAD;AAAA,EAAqB,YAAY,EAAE,MAAM;AAAA,EAAe,eAAY;AAAA,GAClE,qCAAC,aAAD,mBAAiB;AAMzB,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-modal",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Modal",
6
6
  "files": [
@@ -99,13 +99,13 @@
99
99
  "indent": 4
100
100
  },
101
101
  "dependencies": {
102
- "@elliemae/ds-button": "3.0.0-alpha.0",
103
- "@elliemae/ds-classnames": "3.0.0-alpha.0",
104
- "@elliemae/ds-form": "3.0.0-alpha.0",
105
- "@elliemae/ds-icon": "3.0.0-alpha.0",
106
- "@elliemae/ds-icons": "3.0.0-alpha.0",
107
- "@elliemae/ds-shared": "3.0.0-alpha.0",
108
- "@elliemae/ds-system": "3.0.0-alpha.0",
102
+ "@elliemae/ds-button": "3.0.0-alpha.1",
103
+ "@elliemae/ds-classnames": "3.0.0-alpha.1",
104
+ "@elliemae/ds-form": "3.0.0-alpha.1",
105
+ "@elliemae/ds-icon": "3.0.0-alpha.1",
106
+ "@elliemae/ds-icons": "3.0.0-alpha.1",
107
+ "@elliemae/ds-shared": "3.0.0-alpha.1",
108
+ "@elliemae/ds-system": "3.0.0-alpha.1",
109
109
  "prop-types": "~15.7.2",
110
110
  "react-desc": "~4.1.3",
111
111
  "react-modal": "~3.12.1"
@@ -127,6 +127,7 @@
127
127
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
128
128
  "test": "node ../../scripts/testing/test.mjs",
129
129
  "lint": "node ../../scripts/lint.mjs",
130
+ "dts": "node ../../scripts/dts.mjs",
130
131
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
131
132
  }
132
133
  }
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
- import { DSModalContent } from './v2/DSModal';
4
- declare const DSModal: {
5
- ({ version, ...rest }: {
6
- [x: string]: any;
7
- version?: number | undefined;
8
- }): JSX.Element;
9
- propTypes: {
10
- version: PropTypes.Requireable<number>;
11
- };
12
- };
13
- export { DSModalContent, DSModal };
14
- export default DSModal;
@@ -1,25 +0,0 @@
1
- export declare const MODAL_TYPE: {
2
- DEFAULT: string;
3
- ALERT: string;
4
- CONFIRM: string;
5
- NOTIFICATION: string;
6
- WARNING: string;
7
- ERROR: string;
8
- SUCCESS: string;
9
- HELP: string;
10
- INFO: string;
11
- };
12
- export declare const modalTypes: string[];
13
- export declare const MODAL_TYPE_V2: {
14
- INFORMATION: string;
15
- DECISION: string;
16
- SELECTION: string;
17
- FORM: string;
18
- };
19
- export declare const MODAL_SUB_TYPE_V2: {
20
- SUCCESS: string;
21
- WARNING: string;
22
- ERROR: string;
23
- INFORMATION: string;
24
- };
25
- export default MODAL_TYPE;
@@ -1,3 +0,0 @@
1
- export { DSModal, DSModal as default } from './DSModal';
2
- export { MODAL_TYPE, modalTypes, MODAL_TYPE_V2, MODAL_SUB_TYPE_V2 } from './constants';
3
- export { DSModalWithSchema } from './v2/DSModal';
@@ -1,143 +0,0 @@
1
- /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
- declare const DSModal: {
4
- ({ containerProps, className, dataTestId, additionalFooterCssClass, style, iconCloseSize, modalType, showHeader, showFooter, children, centered, confirmLabel, modalTitle, size, isOpen, onClose, onAfterOpen, onConfirm, onReject, rejectLabel, shouldCloseOnOverlayClick, hasError, hasWarning, hasSuccess, hasInfo, hasHelp, actionsRef, appElement, overridePropsConfirmButton, overridePropsRejectButton, zIndex, }: {
5
- containerProps?: {} | undefined;
6
- className?: string | undefined;
7
- dataTestId?: string | undefined;
8
- additionalFooterCssClass?: string | undefined;
9
- style?: {} | undefined;
10
- iconCloseSize?: string | undefined;
11
- modalType?: string | undefined;
12
- showHeader?: boolean | undefined;
13
- showFooter?: boolean | undefined;
14
- children: any;
15
- centered?: boolean | undefined;
16
- confirmLabel?: string | undefined;
17
- modalTitle?: string | undefined;
18
- size?: string | undefined;
19
- isOpen?: boolean | undefined;
20
- onClose?: (() => null) | undefined;
21
- onAfterOpen?: (() => null) | undefined;
22
- onConfirm?: (() => null) | undefined;
23
- onReject?: (() => null) | undefined;
24
- rejectLabel?: string | undefined;
25
- shouldCloseOnOverlayClick?: boolean | undefined;
26
- hasError?: boolean | undefined;
27
- hasWarning?: boolean | undefined;
28
- hasSuccess?: boolean | undefined;
29
- hasInfo?: boolean | undefined;
30
- hasHelp?: boolean | undefined;
31
- actionsRef?: (() => null) | undefined;
32
- appElement?: string | undefined;
33
- overridePropsConfirmButton?: {} | undefined;
34
- overridePropsRejectButton?: {} | undefined;
35
- zIndex?: number | undefined;
36
- }): JSX.Element;
37
- propTypes: {
38
- className: PropTypes.Requireable<string>;
39
- /**
40
- * Add an additional css class to the footer
41
- */
42
- additionalFooterCssClass: PropTypes.Requireable<string>;
43
- /**
44
- * Set style for the modal
45
- */
46
- style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
47
- /**
48
- * Select size for the close icon
49
- */
50
- iconCloseSize: PropTypes.Requireable<unknown>;
51
- /**
52
- * ['default', 'alert', 'confirm', 'notification', 'warning', 'error', 'success', 'help', 'info']
53
- */
54
- modalType: PropTypes.Requireable<string>;
55
- /**
56
- * Show the header or not
57
- */
58
- showHeader: PropTypes.Requireable<boolean>;
59
- /**
60
- * Show the footer or not
61
- */
62
- showFooter: PropTypes.Requireable<boolean>;
63
- /**
64
- * Main content of the modal
65
- */
66
- children: PropTypes.Validator<any>;
67
- /**
68
- * Content is centered or not
69
- */
70
- centered: PropTypes.Requireable<boolean>;
71
- /**
72
- * Text to be added in the confirm button
73
- */
74
- confirmLabel: PropTypes.Requireable<string>;
75
- /**
76
- * Text to be added in the modal title
77
- */
78
- modalTitle: PropTypes.Requireable<string>;
79
- /**
80
- * Text to be added in the modal title
81
- */
82
- size: PropTypes.Requireable<unknown>;
83
- /**
84
- * Modal is open or not
85
- */
86
- isOpen: PropTypes.Requireable<boolean>;
87
- /**
88
- * Allows a function to be triggered once the modal is closed
89
- */
90
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
91
- /**
92
- * Allows a function to be triggered once the modal is opened
93
- */
94
- onAfterOpen: PropTypes.Requireable<(...args: any[]) => any>;
95
- /**
96
- * Allows a function to be triggered once the modal open is confirmed
97
- */
98
- onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
99
- /**
100
- * Allows a function to be triggered once the modal open is rejected
101
- */
102
- onReject: PropTypes.Requireable<(...args: any[]) => any>;
103
- /**
104
- * Text to be added in the reject button
105
- */
106
- rejectLabel: PropTypes.Requireable<string>;
107
- /**
108
- * If modal should close on overlay click
109
- */
110
- shouldCloseOnOverlayClick: PropTypes.Requireable<boolean>;
111
- /**
112
- * Modal has error or not
113
- */
114
- hasError: PropTypes.Requireable<boolean>;
115
- /**
116
- * Modal has warning or not
117
- */
118
- hasWarning: PropTypes.Requireable<boolean>;
119
- /**
120
- * Modal has success or not
121
- */
122
- hasSuccess: PropTypes.Requireable<boolean>;
123
- /**
124
- * Modal has info or not
125
- */
126
- hasInfo: PropTypes.Requireable<boolean>;
127
- /**
128
- * Modal has help or not
129
- */
130
- hasHelp: PropTypes.Requireable<boolean>;
131
- actionsRef: PropTypes.Requireable<(...args: any[]) => any>;
132
- appElement: PropTypes.Requireable<string>;
133
- /**
134
- * Customized props for the confirm button
135
- */
136
- overridePropsConfirmButton: PropTypes.Requireable<PropTypes.InferProps<{}>>;
137
- /**
138
- * Customized props for the reject button
139
- */
140
- overridePropsRejectButton: PropTypes.Requireable<PropTypes.InferProps<{}>>;
141
- };
142
- };
143
- export default DSModal;
@@ -1 +0,0 @@
1
- export declare const modalTypes: any[];
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- declare const ModalFeedBack: ({ className, modalType, hasError, hasWarning, hasSuccess, hasInfo, hasHelp, }: {
3
- className?: string | undefined;
4
- modalType?: null | undefined;
5
- hasError?: boolean | undefined;
6
- hasWarning?: boolean | undefined;
7
- hasSuccess?: boolean | undefined;
8
- hasInfo?: boolean | undefined;
9
- hasHelp?: boolean | undefined;
10
- }) => JSX.Element;
11
- export default ModalFeedBack;