@elliemae/ds-modal-slide 3.0.0-next.7 → 3.0.0-next.70

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.
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var DSModalSlide_exports = {};
29
22
  __export(DSModalSlide_exports, {
30
23
  DSModalSlide: () => DSModalSlide,
@@ -33,6 +26,7 @@ __export(DSModalSlide_exports, {
33
26
  ModalHeader: () => import_Header.default,
34
27
  default: () => DSModalSlide_default
35
28
  });
29
+ module.exports = __toCommonJS(DSModalSlide_exports);
36
30
  var React = __toESM(require("react"));
37
31
  var import_react = __toESM(require("react"));
38
32
  var import_react_desc = require("react-desc");
@@ -59,7 +53,7 @@ const DSModalSlide = ({
59
53
  const [show, setShow] = (0, import_react.useState)(isOpen);
60
54
  const [width, setWidth] = (0, import_react.useState)(50);
61
55
  const theme = (0, import_ds_system.useTheme)();
62
- const contentRows = [...header ? [theme.space.m] : [], "0px", "auto", "0px", ...footer ? [theme.space.m] : []];
56
+ const contentRows = [...header ? ["auto", "1px"] : [], "1fr", ...footer ? ["1px", theme.space.m] : []];
63
57
  const updateShow = (0, import_react.useCallback)(() => {
64
58
  if (fullWidth)
65
59
  setWidth(100);
@@ -145,8 +139,8 @@ const props = {
145
139
  overrideHeight: import_react_desc.PropTypes.bool.description("Override the panel height to scroll height of the container")
146
140
  };
147
141
  DSModalSlide.propTypes = props;
142
+ DSModalSlide.displayName = "DSModalSlide";
148
143
  const DSModalSlideWithSchema = (0, import_react_desc.describe)(DSModalSlide);
149
144
  DSModalSlideWithSchema.propTypes = props;
150
145
  var DSModalSlide_default = DSModalSlide;
151
- module.exports = __toCommonJS(DSModalSlide_exports);
152
146
  //# sourceMappingURL=DSModalSlide.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSModalSlide.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Wrapper, Overlay, Content, ActualContent } from './components/blocks';\nimport ModalHeader from './components/Header';\nimport ModalFooter from './components/Footer';\n\n// eslint-disable-next-line complexity\nconst DSModalSlide = ({\n isOpen = false,\n children,\n getContainer,\n centered = false,\n fullWidth = false,\n header = null,\n footer = null,\n fadeOut = 1500,\n fadeIn = 1500,\n overrideHeight = false,\n}) => {\n const [isMoving, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const theme = useTheme();\n const contentRows = [...(header ? [theme.space.m] : []), '0px', 'auto', '0px', ...(footer ? [theme.space.m] : [])];\n\n const updateShow = useCallback(() => {\n if (fullWidth) setWidth(100);\n else setWidth(50);\n if (isOpen !== show) {\n setMoving(true);\n if (isOpen) {\n setShow(isOpen);\n }\n }\n }, [isOpen, fullWidth, isMoving]);\n\n useEffect(updateShow, [isOpen, fullWidth]);\n\n if (!show) return null;\n\n const container = getContainer();\n if (!container) return null;\n\n const handleAnimationEnd = () => {\n setMoving(false);\n if (!isOpen) setShow(isOpen);\n };\n\n let { height } = container.getBoundingClientRect();\n if (overrideHeight && container.scrollHeight > height) {\n height = container.scrollHeight;\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n\n return ReactDOM.createPortal(\n <Wrapper\n classProps={{\n show: isOpen,\n centered,\n }}\n style={{\n '--height': height,\n '--fade-in': fadeIn,\n '--fade-out': fadeOut,\n '--width': width,\n }}\n >\n <Overlay\n classProps={{\n show: isOpen,\n }}\n >\n <Content\n onAnimationEnd={handleAnimationEnd}\n classProps={{\n show: isOpen,\n }}\n >\n <Grid\n style={{\n height: '100%',\n width: '100%',\n maxHeight: '100%',\n overflow: 'hidden',\n '-webkit-backface-visibility': 'hidden',\n 'backface-visibility': 'hidden',\n '-webkit-transform-style': 'preserve-3d',\n }}\n rows={contentRows}\n data-testid=\"ds-modal-slide\"\n >\n {header && React.cloneElement(header, { fullWidth })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ActualContent>{children}</ActualContent>\n </Grid>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </Grid>\n </Content>\n </Overlay>\n </Wrapper>,\n container,\n );\n};\n\nconst props = {\n /**\n * If the modal slide is centered or not\n */\n centered: PropTypes.bool.description('If the modal slide is centered or not'),\n /**\n * If the modal slide is visible or not\n */\n isOpen: PropTypes.bool.description('If the modal slide is visible or not'),\n /**\n * Main content of the modal\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired.description(\n 'Main content of the modal',\n ),\n /**\n * If the modal slide takes the full width or not\n */\n fullWidth: PropTypes.bool.description('If the modal slide takes the full width or not'),\n /**\n * If the modal slide has a header, only available for full width option\n */\n header: PropTypes.element.description('If the modal slide has a header, only available for full width option'),\n /**\n * Ratio of fade out\n */\n fadeOut: PropTypes.number.description('Ratio of fade out'),\n /**\n * Ratio of fade in\n */\n fadeIn: PropTypes.number.description('Ratio of fade in'),\n /**\n * Override the panel height to scroll height of the container\n */\n overrideHeight: PropTypes.bool.description('Override the panel height to scroll height of the container'),\n};\n\nDSModalSlide.propTypes = props;\n\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = props;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwD;AACxD,wBAAoC;AACpC,uBAAqB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ent": ["/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Wrapper, Overlay, Content, ActualContent } from './components/blocks';\nimport ModalHeader from './components/Header';\nimport ModalFooter from './components/Footer';\n\n// eslint-disable-next-line complexity\nconst DSModalSlide = ({\n isOpen = false,\n children,\n getContainer,\n centered = false,\n fullWidth = false,\n header = null,\n footer = null,\n fadeOut = 1500,\n fadeIn = 1500,\n overrideHeight = false,\n}) => {\n const [isMoving, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const theme = useTheme();\n const contentRows = [...(header ? ['auto', '1px'] : []), '1fr', ...(footer ? ['1px', theme.space.m] : [])];\n\n const updateShow = useCallback(() => {\n if (fullWidth) setWidth(100);\n else setWidth(50);\n if (isOpen !== show) {\n setMoving(true);\n if (isOpen) {\n setShow(isOpen);\n }\n }\n }, [isOpen, fullWidth, isMoving]);\n\n useEffect(updateShow, [isOpen, fullWidth]);\n\n if (!show) return null;\n\n const container = getContainer();\n if (!container) return null;\n\n const handleAnimationEnd = () => {\n setMoving(false);\n if (!isOpen) setShow(isOpen);\n };\n\n let { height } = container.getBoundingClientRect();\n if (overrideHeight && container.scrollHeight > height) {\n height = container.scrollHeight;\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n\n return ReactDOM.createPortal(\n <Wrapper\n classProps={{\n show: isOpen,\n centered,\n }}\n style={{\n '--height': height,\n '--fade-in': fadeIn,\n '--fade-out': fadeOut,\n '--width': width,\n }}\n >\n <Overlay\n classProps={{\n show: isOpen,\n }}\n >\n <Content\n onAnimationEnd={handleAnimationEnd}\n classProps={{\n show: isOpen,\n }}\n >\n <Grid\n style={{\n height: '100%',\n width: '100%',\n maxHeight: '100%',\n overflow: 'hidden',\n '-webkit-backface-visibility': 'hidden',\n 'backface-visibility': 'hidden',\n '-webkit-transform-style': 'preserve-3d',\n }}\n rows={contentRows}\n data-testid=\"ds-modal-slide\"\n >\n {header && React.cloneElement(header, { fullWidth })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ActualContent>{children}</ActualContent>\n </Grid>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </Grid>\n </Content>\n </Overlay>\n </Wrapper>,\n container,\n );\n};\n\nconst props = {\n /**\n * If the modal slide is centered or not\n */\n centered: PropTypes.bool.description('If the modal slide is centered or not'),\n /**\n * If the modal slide is visible or not\n */\n isOpen: PropTypes.bool.description('If the modal slide is visible or not'),\n /**\n * Main content of the modal\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired.description(\n 'Main content of the modal',\n ),\n /**\n * If the modal slide takes the full width or not\n */\n fullWidth: PropTypes.bool.description('If the modal slide takes the full width or not'),\n /**\n * If the modal slide has a header, only available for full width option\n */\n header: PropTypes.element.description('If the modal slide has a header, only available for full width option'),\n /**\n * Ratio of fade out\n */\n fadeOut: PropTypes.number.description('Ratio of fade out'),\n /**\n * Ratio of fade in\n */\n fadeIn: PropTypes.number.description('Ratio of fade in'),\n /**\n * Override the panel height to scroll height of the container\n */\n overrideHeight: PropTypes.bool.description('Override the panel height to scroll height of the container'),\n};\n\nDSModalSlide.propTypes = props;\nDSModalSlide.displayName = 'DSModalSlide';\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = props;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;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gDAAgD;AAAA,EAItF,QAAQ,4BAAU,QAAQ,YAAY,uEAAuE;AAAA,EAI7G,SAAS,4BAAU,OAAO,YAAY,mBAAmB;AAAA,EAIzD,QAAQ,4BAAU,OAAO,YAAY,kBAAkB;AAAA,EAIvD,gBAAgB,4BAAU,KAAK,YAAY,6DAA6D;AAC1G;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,gCAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,32 +18,26 @@ var __spreadValues = (a, b) => {
18
18
  }
19
19
  return a;
20
20
  };
21
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
21
  var __export = (target, all) => {
23
22
  for (var name in all)
24
23
  __defProp(target, name, { get: all[name], enumerable: true });
25
24
  };
26
- var __reExport = (target, module2, copyDefault, desc) => {
27
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
28
- for (let key of __getOwnPropNames(module2))
29
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
30
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31
30
  }
32
- return target;
31
+ return to;
33
32
  };
34
- var __toESM = (module2, isNodeMode) => {
35
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
36
- };
37
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
38
- return (module2, temp) => {
39
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
40
- };
41
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
34
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
35
  var Footer_exports = {};
43
36
  __export(Footer_exports, {
44
37
  DSModalSlideFooterWithSchema: () => DSModalSlideFooterWithSchema,
45
38
  default: () => Footer_default
46
39
  });
40
+ module.exports = __toCommonJS(Footer_exports);
47
41
  var React = __toESM(require("react"));
48
42
  var import_react = __toESM(require("react"));
49
43
  var import_react_desc = require("react-desc");
@@ -86,8 +80,8 @@ const props = {
86
80
  }).description("Extra DSButton props for reject btn.")
87
81
  };
88
82
  ModalFooter.propTypes = props;
83
+ ModalFooter.displayName = "ModalFooter";
89
84
  const DSModalSlideFooterWithSchema = (0, import_react_desc.describe)(ModalFooter);
90
85
  DSModalSlideFooterWithSchema.propTypes = props;
91
86
  var Footer_default = ModalFooter;
92
- module.exports = __toCommonJS(Footer_exports);
93
87
  //# sourceMappingURL=Footer.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/Footer.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\nimport { FooterWrapper } from './blocks';\n\nconst ModalFooter = ({\n confirmLabel = 'Confirm',\n rejectLabel = 'Cancel',\n onConfirm,\n onReject,\n confirmProps = {\n disabled: false,\n },\n rejectProps = {\n disabled: false,\n },\n}) => (\n <>\n <FooterWrapper>\n {!!onReject && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...rejectProps}\n />\n )}\n {!!onConfirm && (\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...confirmProps}\n />\n )}\n </FooterWrapper>\n </>\n);\n\nconst props = {\n /**\n * Confirm Label\n */\n confirmLabel: PropTypes.string.description('Confirm Label'),\n /**\n * Reject Label\n */\n rejectLabel: PropTypes.string.description('Reject Label'),\n /**\n * Callback\n */\n onConfirm: PropTypes.func.description('Callback'),\n /**\n * Callback\n */\n onReject: PropTypes.func.description('Callback'),\n /**\n * Extra DSButton props for confirm btn.\n */\n confirmProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for confirm btn.'),\n /**\n * Extra DSButton props for reject btn.\n */\n rejectProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for reject btn.'),\n};\n\nModalFooter.propTypes = props;\n\nconst DSModalSlideFooterWithSchema = describe(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,uBAAqB;AACrB,oBAA8B;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA;AAAA,EAEZ,cAAc;AAAA,IACZ,UAAU;AAAA;AAAA,MAGZ,wFACE,mDAAC,6BAAD,MACG,CAAC,CAAC,YACD,mDAAC,0BAAD;AAAA,EACE,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe;AAAA,EACjC,WAAW;AAAA,EACX,SAAS;AAAA,GACL,eAGP,CAAC,CAAC,aACD,mDAAC,0BAAD;AAAA,EACE,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe;AAAA,EACjC,WAAW;AAAA,EACX,SAAS;AAAA,GACL;AAOd,MAAM,QAAQ;AAAA,EAIZ,cAAc,4BAAU,OAAO,YAAY;AAAA,EAI3C,aAAa,4BAAU,OAAO,YAAY;AAAA,EAI1C,WAAW,4BAAU,KAAK,YAAY;AAAA,EAItC,UAAU,4BAAU,KAAK,YAAY;AAAA,EAIrC,cAAc,4BAAU,MAAM;AAAA,IAC5B,UAAU,4BAAU;AAAA,KACnB,YAAY;AAAA,EAIf,aAAa,4BAAU,MAAM;AAAA,IAC3B,UAAU,4BAAU;AAAA,KACnB,YAAY;AAAA;AAGjB,YAAY,YAAY;AAExB,MAAM,+BAA+B,gCAAS;AAC9C,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\nimport { FooterWrapper } from './blocks';\n\nconst ModalFooter = ({\n confirmLabel = 'Confirm',\n rejectLabel = 'Cancel',\n onConfirm,\n onReject,\n confirmProps = {\n disabled: false,\n },\n rejectProps = {\n disabled: false,\n },\n}) => (\n <>\n <FooterWrapper>\n {!!onReject && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...rejectProps}\n />\n )}\n {!!onConfirm && (\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...confirmProps}\n />\n )}\n </FooterWrapper>\n </>\n);\n\nconst props = {\n /**\n * Confirm Label\n */\n confirmLabel: PropTypes.string.description('Confirm Label'),\n /**\n * Reject Label\n */\n rejectLabel: PropTypes.string.description('Reject Label'),\n /**\n * Callback\n */\n onConfirm: PropTypes.func.description('Callback'),\n /**\n * Callback\n */\n onReject: PropTypes.func.description('Callback'),\n /**\n * Extra DSButton props for confirm btn.\n */\n confirmProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for confirm btn.'),\n /**\n * Extra DSButton props for reject btn.\n */\n rejectProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for reject btn.'),\n};\n\nModalFooter.propTypes = props;\nModalFooter.displayName = 'ModalFooter';\nconst DSModalSlideFooterWithSchema = describe(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,uBAAqB;AACrB,oBAA8B;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,EACZ;AAAA,EACA,cAAc;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,MAEA,wFACE,mDAAC,mCACE,CAAC,CAAC,YACD,mDAAC;AAAA,EACC,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe,0BAA0B;AAAA,EAC3D,WAAW;AAAA,EACX,SAAS;AAAA,GACL,YACN,GAED,CAAC,CAAC,aACD,mDAAC;AAAA,EACC,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe,2BAA2B;AAAA,EAC5D,WAAW;AAAA,EACX,SAAS;AAAA,GACL,aACN,CAEJ,CACF;AAGF,MAAM,QAAQ;AAAA,EAIZ,cAAc,4BAAU,OAAO,YAAY,eAAe;AAAA,EAI1D,aAAa,4BAAU,OAAO,YAAY,cAAc;AAAA,EAIxD,WAAW,4BAAU,KAAK,YAAY,UAAU;AAAA,EAIhD,UAAU,4BAAU,KAAK,YAAY,UAAU;AAAA,EAI/C,cAAc,4BAAU,MAAM;AAAA,IAC5B,UAAU,4BAAU;AAAA,EACtB,CAAC,EAAE,YAAY,uCAAuC;AAAA,EAItD,aAAa,4BAAU,MAAM;AAAA,IAC3B,UAAU,4BAAU;AAAA,EACtB,CAAC,EAAE,YAAY,sCAAsC;AACvD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,+BAA+B,gCAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
6
6
  "names": []
7
7
  }
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var Header_exports = {};
29
22
  __export(Header_exports, {
30
23
  DSModalSlideHeaderWithSchema: () => DSModalSlideHeaderWithSchema,
31
24
  default: () => Header_default
32
25
  });
26
+ module.exports = __toCommonJS(Header_exports);
33
27
  var React = __toESM(require("react"));
34
28
  var import_react = __toESM(require("react"));
35
29
  var import_react_desc = require("react-desc");
@@ -58,6 +52,8 @@ const HeaderWrapper = import_styled_components.default.div`
58
52
  justify-content: space-between;
59
53
  width: 100%;
60
54
  align-items: center;
55
+ height: 48px;
56
+ overflow: hidden;
61
57
  `;
62
58
  const StyledSeparator = (0, import_styled_components.default)(import_ds_separator.default)`
63
59
  padding: ${(props2) => props2.theme.space.xs} 0;
@@ -71,8 +67,8 @@ const props = {
71
67
  title: import_react_desc.PropTypes.string.description("modal title")
72
68
  };
73
69
  ModalHeader.propTypes = props;
70
+ ModalHeader.displayName = "ModalHeader";
74
71
  const DSModalSlideHeaderWithSchema = (0, import_react_desc.describe)(ModalHeader);
75
72
  DSModalSlideHeaderWithSchema.propTypes = props;
76
73
  var Header_default = ModalHeader;
77
- module.exports = __toCommonJS(Header_exports);
78
74
  //# sourceMappingURL=Header.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/Header.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { Header, HeaderLeftSide, Title } from './blocks';\n\nconst ModalHeader = ({ title: headerTitle = '', onClose = () => null, toolbar = null }) => (\n <HeaderWrapper>\n <HeaderLeftSide>\n <Header>\n <Title>{headerTitle}</Title>\n </Header>\n </HeaderLeftSide>\n {toolbar}\n {toolbar && <StyledSeparator position=\"initial\" margin=\"none\" orientation=\"vertical\" type=\"non-form\" />}\n <StyledCloseButton\n data-testid=\"modal-slider-header-close\"\n aria-label=\"Close modal slide\"\n buttonType=\"text\"\n icon={<Close aria-label=\"Close modal slide\" size=\"s\" />}\n onClick={onClose}\n />\n </HeaderWrapper>\n);\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n`;\n\nconst StyledSeparator = styled(DSSeparator)`\n padding: ${(props) => props.theme.space.xs} 0;\n`;\n\nconst StyledCloseButton = styled(DSButton)`\n margin: ${(props) => props.theme.space.xs};\n`;\n\nconst props = {\n /** on modal close callback */\n onClose: PropTypes.func.description('on modal close callback'),\n /** modal toolbar component */\n toolbar: PropTypes.node.description('modal toolbar comoponent'),\n /** modal title */\n title: PropTypes.string.description('modal title'),\n};\n\nModalHeader.propTypes = props;\n\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = props;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,0BAAwB;AACxB,sBAAsB;AACtB,uBAAqB;AACrB,oBAA8C;AAE9C,MAAM,cAAc,CAAC,EAAE,OAAO,cAAc,IAAI,UAAU,MAAM,MAAM,UAAU,WAC9E,mDAAC,eAAD,MACE,mDAAC,8BAAD,MACE,mDAAC,sBAAD,MACE,mDAAC,qBAAD,MAAQ,gBAGX,SACA,WAAW,mDAAC,iBAAD;AAAA,EAAiB,UAAS;AAAA,EAAU,QAAO;AAAA,EAAO,aAAY;AAAA,EAAW,MAAK;AAAA,IAC1F,mDAAC,mBAAD;AAAA,EACE,eAAY;AAAA,EACZ,cAAW;AAAA,EACX,YAAW;AAAA,EACX,MAAM,mDAAC,uBAAD;AAAA,IAAO,cAAW;AAAA,IAAoB,MAAK;AAAA;AAAA,EACjD,SAAS;AAAA;AAKf,MAAM,gBAAgB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAO7B,MAAM,kBAAkB,sCAAO;AAAA,aAClB,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAG1C,MAAM,oBAAoB,sCAAO;AAAA,YACrB,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAGzC,MAAM,QAAQ;AAAA,EAEZ,SAAS,4BAAU,KAAK,YAAY;AAAA,EAEpC,SAAS,4BAAU,KAAK,YAAY;AAAA,EAEpC,OAAO,4BAAU,OAAO,YAAY;AAAA;AAGtC,YAAY,YAAY;AAExB,MAAM,+BAA+B,gCAAS;AAC9C,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { Header, HeaderLeftSide, Title } from './blocks';\n\nconst ModalHeader = ({ title: headerTitle = '', onClose = () => null, toolbar = null }) => (\n <HeaderWrapper>\n <HeaderLeftSide>\n <Header>\n <Title>{headerTitle}</Title>\n </Header>\n </HeaderLeftSide>\n {toolbar}\n {toolbar && <StyledSeparator position=\"initial\" margin=\"none\" orientation=\"vertical\" type=\"non-form\" />}\n <StyledCloseButton\n data-testid=\"modal-slider-header-close\"\n aria-label=\"Close modal slide\"\n buttonType=\"text\"\n icon={<Close aria-label=\"Close modal slide\" size=\"s\" />}\n onClick={onClose}\n />\n </HeaderWrapper>\n);\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n height: 48px;\n overflow: hidden;\n`;\n\nconst StyledSeparator = styled(DSSeparator)`\n padding: ${(props) => props.theme.space.xs} 0;\n`;\n\nconst StyledCloseButton = styled(DSButton)`\n margin: ${(props) => props.theme.space.xs};\n`;\n\nconst props = {\n /** on modal close callback */\n onClose: PropTypes.func.description('on modal close callback'),\n /** modal toolbar component */\n toolbar: PropTypes.node.description('modal toolbar comoponent'),\n /** modal title */\n title: PropTypes.string.description('modal title'),\n};\n\nModalHeader.propTypes = props;\nModalHeader.displayName = 'ModalHeader';\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = props;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,0BAAwB;AACxB,sBAAsB;AACtB,uBAAqB;AACrB,oBAA8C;AAE9C,MAAM,cAAc,CAAC,EAAE,OAAO,cAAc,IAAI,UAAU,MAAM,MAAM,UAAU,WAC9E,mDAAC,qBACC,mDAAC,oCACC,mDAAC,4BACC,mDAAC,2BAAO,WAAY,CACtB,CACF,GACC,SACA,WAAW,mDAAC;AAAA,EAAgB,UAAS;AAAA,EAAU,QAAO;AAAA,EAAO,aAAY;AAAA,EAAW,MAAK;AAAA,CAAW,GACrG,mDAAC;AAAA,EACC,eAAY;AAAA,EACZ,cAAW;AAAA,EACX,YAAW;AAAA,EACX,MAAM,mDAAC;AAAA,IAAM,cAAW;AAAA,IAAoB,MAAK;AAAA,GAAI;AAAA,EACrD,SAAS;AAAA,CACX,CACF;AAGF,MAAM,gBAAgB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,kBAAkB,sCAAO,2BAAW;AAAA,aAC7B,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAG1C,MAAM,oBAAoB,sCAAO,wBAAQ;AAAA,YAC7B,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAGzC,MAAM,QAAQ;AAAA,EAEZ,SAAS,4BAAU,KAAK,YAAY,yBAAyB;AAAA,EAE7D,SAAS,4BAAU,KAAK,YAAY,0BAA0B;AAAA,EAE9D,OAAO,4BAAU,OAAO,YAAY,aAAa;AACnD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,+BAA+B,gCAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
6
6
  "names": []
7
7
  }
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var blocks_exports = {};
29
22
  __export(blocks_exports, {
30
23
  ActualContent: () => ActualContent,
@@ -38,6 +31,7 @@ __export(blocks_exports, {
38
31
  Title: () => Title,
39
32
  Wrapper: () => Wrapper
40
33
  });
34
+ module.exports = __toCommonJS(blocks_exports);
41
35
  var React = __toESM(require("react"));
42
36
  var import_ds_classnames = require("@elliemae/ds-classnames");
43
37
  const blockName = "modal-slide";
@@ -61,5 +55,4 @@ const ActualContent = (0, import_ds_classnames.aggregatedClasses)("div")(blockNa
61
55
  const Header = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "header", () => ({}));
62
56
  const Footer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "footer", () => ({}));
63
57
  const FooterWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "footer-wrapper", () => ({}));
64
- module.exports = __toCommonJS(blocks_exports);
65
58
  //# sourceMappingURL=blocks.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/blocks.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'modal-slide';\n\nexport const Wrapper = aggregatedClasses('div')(\n blockName,\n 'wrapper',\n ({ show, centered }) => ({\n showing: show,\n disappearing: !show,\n centered,\n }),\n);\n\nexport const Overlay = aggregatedClasses('div')(\n blockName,\n 'overlay',\n ({ show }) => ({\n showing: show,\n disappearing: !show,\n }),\n);\n\nexport const Content = aggregatedClasses('div')(\n blockName,\n 'content',\n ({ show }) => ({\n showing: show,\n disappearing: !show,\n }),\n);\n\nexport const Title = aggregatedClasses('div')(blockName, 'title', () => ({}));\n\nexport const BreadcrumTitle = aggregatedClasses('div')(\n blockName,\n 'breadcrum-title',\n () => ({}),\n);\n\nexport const HeaderLeftSide = aggregatedClasses('div')(\n blockName,\n 'header-left-side',\n () => ({}),\n);\n\nexport const ActualContent = aggregatedClasses('div')(\n blockName,\n 'actual-content',\n () => ({}),\n);\nexport const Header = aggregatedClasses('div')(blockName, 'header', () => ({}));\nexport const Footer = aggregatedClasses('div')(blockName, 'footer', () => ({}));\n\nexport const FooterWrapper = aggregatedClasses('div')(\n blockName,\n 'footer-wrapper',\n () => ({}),\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAElC,MAAM,YAAY;AAEX,MAAM,UAAU,4CAAkB,OACvC,WACA,WACA,CAAC,EAAE,MAAM,eAAgB;AAAA,EACvB,SAAS;AAAA,E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AM,iBAAiB,4CAAkB,KAAK,EACnD,WACA,mBACA,MAAO,EAAC,EACV;AAEO,MAAM,iBAAiB,4CAAkB,KAAK,EACnD,WACA,oBACA,MAAO,EAAC,EACV;AAEO,MAAM,gBAAgB,4CAAkB,KAAK,EAClD,WACA,kBACA,MAAO,EAAC,EACV;AACO,MAAM,SAAS,4CAAkB,KAAK,EAAE,WAAW,UAAU,MAAO,EAAC,EAAE;AACvE,MAAM,SAAS,4CAAkB,KAAK,EAAE,WAAW,UAAU,MAAO,EAAC,EAAE;AAEvE,MAAM,gBAAgB,4CAAkB,KAAK,EAClD,WACA,kBACA,MAAO,EAAC,EACV;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -4,37 +4,31 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
22
  var src_exports = {};
29
23
  __export(src_exports, {
30
24
  DSModalSlideFooterWithSchema: () => import_Footer.DSModalSlideFooterWithSchema,
31
25
  DSModalSlideHeaderWithSchema: () => import_Header.DSModalSlideHeaderWithSchema,
32
26
  default: () => import_DSModalSlide.default
33
27
  });
28
+ module.exports = __toCommonJS(src_exports);
34
29
  var React = __toESM(require("react"));
35
- __reExport(src_exports, require("./DSModalSlide"));
30
+ __reExport(src_exports, require("./DSModalSlide"), module.exports);
36
31
  var import_DSModalSlide = __toESM(require("./DSModalSlide"));
37
32
  var import_Header = require("./components/Header");
38
33
  var import_Footer = require("./components/Footer");
39
- module.exports = __toCommonJS(src_exports);
40
34
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './DSModalSlide';\nexport { default } from './DSModalSlide';\nexport { DSModalSlideHeaderWithSchema } from './components/Header';\nexport { DSModalSlideFooterWithSchema } from './components/Footer';", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,0BAAwB;AACxB,oBAA6C;AAC7C,oBAA6C;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,2BAAd;AACA,0BAAwB;AACxB,oBAA6C;AAC7C,oBAA6C;",
6
6
  "names": []
7
7
  }
@@ -24,7 +24,7 @@ const DSModalSlide = ({
24
24
  const [show, setShow] = useState(isOpen);
25
25
  const [width, setWidth] = useState(50);
26
26
  const theme = useTheme();
27
- const contentRows = [...header ? [theme.space.m] : [], "0px", "auto", "0px", ...footer ? [theme.space.m] : []];
27
+ const contentRows = [...header ? ["auto", "1px"] : [], "1fr", ...footer ? ["1px", theme.space.m] : []];
28
28
  const updateShow = useCallback(() => {
29
29
  if (fullWidth)
30
30
  setWidth(100);
@@ -110,6 +110,7 @@ const props = {
110
110
  overrideHeight: PropTypes.bool.description("Override the panel height to scroll height of the container")
111
111
  };
112
112
  DSModalSlide.propTypes = props;
113
+ DSModalSlide.displayName = "DSModalSlide";
113
114
  const DSModalSlideWithSchema = describe(DSModalSlide);
114
115
  DSModalSlideWithSchema.propTypes = props;
115
116
  var DSModalSlide_default = DSModalSlide;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSModalSlide.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Wrapper, Overlay, Content, ActualContent } from './components/blocks';\nimport ModalHeader from './components/Header';\nimport ModalFooter from './components/Footer';\n\n// eslint-disable-next-line complexity\nconst DSModalSlide = ({\n isOpen = false,\n children,\n getContainer,\n centered = false,\n fullWidth = false,\n header = null,\n footer = null,\n fadeOut = 1500,\n fadeIn = 1500,\n overrideHeight = false,\n}) => {\n const [isMoving, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const theme = useTheme();\n const contentRows = [...(header ? [theme.space.m] : []), '0px', 'auto', '0px', ...(footer ? [theme.space.m] : [])];\n\n const updateShow = useCallback(() => {\n if (fullWidth) setWidth(100);\n else setWidth(50);\n if (isOpen !== show) {\n setMoving(true);\n if (isOpen) {\n setShow(isOpen);\n }\n }\n }, [isOpen, fullWidth, isMoving]);\n\n useEffect(updateShow, [isOpen, fullWidth]);\n\n if (!show) return null;\n\n const container = getContainer();\n if (!container) return null;\n\n const handleAnimationEnd = () => {\n setMoving(false);\n if (!isOpen) setShow(isOpen);\n };\n\n let { height } = container.getBoundingClientRect();\n if (overrideHeight && container.scrollHeight > height) {\n height = container.scrollHeight;\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n\n return ReactDOM.createPortal(\n <Wrapper\n classProps={{\n show: isOpen,\n centered,\n }}\n style={{\n '--height': height,\n '--fade-in': fadeIn,\n '--fade-out': fadeOut,\n '--width': width,\n }}\n >\n <Overlay\n classProps={{\n show: isOpen,\n }}\n >\n <Content\n onAnimationEnd={handleAnimationEnd}\n classProps={{\n show: isOpen,\n }}\n >\n <Grid\n style={{\n height: '100%',\n width: '100%',\n maxHeight: '100%',\n overflow: 'hidden',\n '-webkit-backface-visibility': 'hidden',\n 'backface-visibility': 'hidden',\n '-webkit-transform-style': 'preserve-3d',\n }}\n rows={contentRows}\n data-testid=\"ds-modal-slide\"\n >\n {header && React.cloneElement(header, { fullWidth })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ActualContent>{children}</ActualContent>\n </Grid>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </Grid>\n </Content>\n </Overlay>\n </Wrapper>,\n container,\n );\n};\n\nconst props = {\n /**\n * If the modal slide is centered or not\n */\n centered: PropTypes.bool.description('If the modal slide is centered or not'),\n /**\n * If the modal slide is visible or not\n */\n isOpen: PropTypes.bool.description('If the modal slide is visible or not'),\n /**\n * Main content of the modal\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired.description(\n 'Main content of the modal',\n ),\n /**\n * If the modal slide takes the full width or not\n */\n fullWidth: PropTypes.bool.description('If the modal slide takes the full width or not'),\n /**\n * If the modal slide has a header, only available for full width option\n */\n header: PropTypes.element.description('If the modal slide has a header, only available for full width option'),\n /**\n * Ratio of fade out\n */\n fadeOut: PropTypes.number.description('Ratio of fade out'),\n /**\n * Ratio of fade in\n */\n fadeIn: PropTypes.number.description('Ratio of fade in'),\n /**\n * Override the panel height to scroll height of the container\n */\n overrideHeight: PropTypes.bool.description('Override the panel height to scroll height of the container'),\n};\n\nDSModalSlide.propTypes = props;\n\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = props;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,eAAe,CAAC;AAAA,EACpB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,iBAAiB;AAAA,MACb;AACJ,QAAM,CAAC,UAAU,aAAa,SAAS;AACvC,QAAM,CAAC,MAAM,WAAW,SAAS;AACjC,QAAM,CAAC,OAAO,YAAY,SAAS;AACnC,QAAM,Q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,aAAa,QAAQ,EAAE,cACvC,UAAU,qCAAC,aAAD;AAAA,IAAa,UAAS;AAAA,IAAU,MAAK;AAAA,MAChD,qCAAC,MAAD;AAAA,IAAM,OAAO,EAAE,UAAU;AAAA,KACvB,qCAAC,MAAD;AAAA,IAAM,OAAO,EAAE,UAAU;AAAA,KACvB,qCAAC,eAAD,MAAgB,aAGnB,UAAU,qCAAC,aAAD;AAAA,IAAa,UAAS;AAAA,IAAU,MAAK;AAAA,MAC/C,YAKT;AAAA;AAIJ,MAAM,QAAQ;AAAA,EAIZ,UAAU,UAAU,KAAK,YAAY;AAAA,EAIrC,QAAQ,UAAU,KAAK,YAAY;AAAA,EAInC,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,MAAM,WAAW,YAC7F;AAAA,EAKF,WAAW,UAAU,KAAK,YAAY;AAAA,EAItC,QAAQ,UAAU,QAAQ,YAAY;AAAA,EAItC,SAAS,UAAU,OAAO,YAAY;AAAA,EAItC,QAAQ,UAAU,OAAO,YAAY;AAAA,EAIrC,gBAAgB,UAAU,KAAK,YAAY;AAAA;AAG7C,aAAa,YAAY;AAEzB,MAAM,yBAAyB,SAAS;AACxC,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport ReactDOM from 'react-dom';\nimport { useTheme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Wrapper, Overlay, Content, ActualContent } from './components/blocks';\nimport ModalHeader from './components/Header';\nimport ModalFooter from './components/Footer';\n\n// eslint-disable-next-line complexity\nconst DSModalSlide = ({\n isOpen = false,\n children,\n getContainer,\n centered = false,\n fullWidth = false,\n header = null,\n footer = null,\n fadeOut = 1500,\n fadeIn = 1500,\n overrideHeight = false,\n}) => {\n const [isMoving, setMoving] = useState(false);\n const [show, setShow] = useState(isOpen);\n const [width, setWidth] = useState(50);\n const theme = useTheme();\n const contentRows = [...(header ? ['auto', '1px'] : []), '1fr', ...(footer ? ['1px', theme.space.m] : [])];\n\n const updateShow = useCallback(() => {\n if (fullWidth) setWidth(100);\n else setWidth(50);\n if (isOpen !== show) {\n setMoving(true);\n if (isOpen) {\n setShow(isOpen);\n }\n }\n }, [isOpen, fullWidth, isMoving]);\n\n useEffect(updateShow, [isOpen, fullWidth]);\n\n if (!show) return null;\n\n const container = getContainer();\n if (!container) return null;\n\n const handleAnimationEnd = () => {\n setMoving(false);\n if (!isOpen) setShow(isOpen);\n };\n\n let { height } = container.getBoundingClientRect();\n if (overrideHeight && container.scrollHeight > height) {\n height = container.scrollHeight;\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n\n return ReactDOM.createPortal(\n <Wrapper\n classProps={{\n show: isOpen,\n centered,\n }}\n style={{\n '--height': height,\n '--fade-in': fadeIn,\n '--fade-out': fadeOut,\n '--width': width,\n }}\n >\n <Overlay\n classProps={{\n show: isOpen,\n }}\n >\n <Content\n onAnimationEnd={handleAnimationEnd}\n classProps={{\n show: isOpen,\n }}\n >\n <Grid\n style={{\n height: '100%',\n width: '100%',\n maxHeight: '100%',\n overflow: 'hidden',\n '-webkit-backface-visibility': 'hidden',\n 'backface-visibility': 'hidden',\n '-webkit-transform-style': 'preserve-3d',\n }}\n rows={contentRows}\n data-testid=\"ds-modal-slide\"\n >\n {header && React.cloneElement(header, { fullWidth })}\n {header && <DSSeparator position=\"initial\" type=\"non-form\" />}\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ActualContent>{children}</ActualContent>\n </Grid>\n </Grid>\n {footer && <DSSeparator position=\"initial\" type=\"non-form\" />}\n {footer}\n </Grid>\n </Content>\n </Overlay>\n </Wrapper>,\n container,\n );\n};\n\nconst props = {\n /**\n * If the modal slide is centered or not\n */\n centered: PropTypes.bool.description('If the modal slide is centered or not'),\n /**\n * If the modal slide is visible or not\n */\n isOpen: PropTypes.bool.description('If the modal slide is visible or not'),\n /**\n * Main content of the modal\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired.description(\n 'Main content of the modal',\n ),\n /**\n * If the modal slide takes the full width or not\n */\n fullWidth: PropTypes.bool.description('If the modal slide takes the full width or not'),\n /**\n * If the modal slide has a header, only available for full width option\n */\n header: PropTypes.element.description('If the modal slide has a header, only available for full width option'),\n /**\n * Ratio of fade out\n */\n fadeOut: PropTypes.number.description('Ratio of fade out'),\n /**\n * Ratio of fade in\n */\n fadeIn: PropTypes.number.description('Ratio of fade in'),\n /**\n * Override the panel height to scroll height of the container\n */\n overrideHeight: PropTypes.bool.description('Override the panel height to scroll height of the container'),\n};\n\nDSModalSlide.propTypes = props;\nDSModalSlide.displayName = 'DSModalSlide';\nconst DSModalSlideWithSchema = describe(DSModalSlide);\nDSModalSlideWithSchema.propTypes = props;\n\nexport { ModalHeader, ModalFooter, DSModalSlide, DSModalSlideWithSchema };\n\nexport default DSModalSlide;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,eAAe,CAAC;AAAA,EACpB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,iBAAiB;AAAA,MACb;AACJ,QAAM,CAAC,UAAU,aAAa,SAAS,KAAK;AAC5C,QAAM,CAAC,MAAM,WAAW,SAAS,MAAM;AACvC,QAAM,CAAC,OAAO,YAAY,SAAS,EAAE;AACrC,QAAM,QAAQ,SAAS;AACvB,QAAM,cAAc,CAAC,GAAI,SAAS,CAAC,QAAQ,KAAK,IAAI,CAAC,GAAI,OAAO,GAAI,SAAS,CAAC,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,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,EAAE,UAAU,CAAC,GAClD,UAAU,qCAAC;AAAA,IAAY,UAAS;AAAA,IAAU,MAAK;AAAA,GAAW,GAC3D,qCAAC;AAAA,IAAK,OAAO,EAAE,UAAU,SAAS;AAAA,KAChC,qCAAC;AAAA,IAAK,OAAO,EAAE,UAAU,OAAO;AAAA,KAC9B,qCAAC,qBAAe,QAAS,CAC3B,CACF,GACC,UAAU,qCAAC;AAAA,IAAY,UAAS;AAAA,IAAU,MAAK;AAAA,GAAW,GAC1D,MACH,CACF,CACF,CACF,GACA,SACF;AACF;AAEA,MAAM,QAAQ;AAAA,EAIZ,UAAU,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,QAAQ,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAIzE,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,GAAG,CAAC,EAAE,WAAW,YAC7F,2BACF;AAAA,EAIA,WAAW,UAAU,KAAK,YAAY,gDAAgD;AAAA,EAItF,QAAQ,UAAU,QAAQ,YAAY,uEAAuE;AAAA,EAI7G,SAAS,UAAU,OAAO,YAAY,mBAAmB;AAAA,EAIzD,QAAQ,UAAU,OAAO,YAAY,kBAAkB;AAAA,EAIvD,gBAAgB,UAAU,KAAK,YAAY,6DAA6D;AAC1G;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -56,6 +56,7 @@ const props = {
56
56
  }).description("Extra DSButton props for reject btn.")
57
57
  };
58
58
  ModalFooter.propTypes = props;
59
+ ModalFooter.displayName = "ModalFooter";
59
60
  const DSModalSlideFooterWithSchema = describe(ModalFooter);
60
61
  DSModalSlideFooterWithSchema.propTypes = props;
61
62
  var Footer_default = ModalFooter;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Footer.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\nimport { FooterWrapper } from './blocks';\n\nconst ModalFooter = ({\n confirmLabel = 'Confirm',\n rejectLabel = 'Cancel',\n onConfirm,\n onReject,\n confirmProps = {\n disabled: false,\n },\n rejectProps = {\n disabled: false,\n },\n}) => (\n <>\n <FooterWrapper>\n {!!onReject && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...rejectProps}\n />\n )}\n {!!onConfirm && (\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...confirmProps}\n />\n )}\n </FooterWrapper>\n </>\n);\n\nconst props = {\n /**\n * Confirm Label\n */\n confirmLabel: PropTypes.string.description('Confirm Label'),\n /**\n * Reject Label\n */\n rejectLabel: PropTypes.string.description('Reject Label'),\n /**\n * Callback\n */\n onConfirm: PropTypes.func.description('Callback'),\n /**\n * Callback\n */\n onReject: PropTypes.func.description('Callback'),\n /**\n * Extra DSButton props for confirm btn.\n */\n confirmProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for confirm btn.'),\n /**\n * Extra DSButton props for reject btn.\n */\n rejectProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for reject btn.'),\n};\n\nModalFooter.propTypes = props;\n\nconst DSModalSlideFooterWithSchema = describe(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA;AAAA,EAEZ,cAAc;AAAA,IACZ,UAAU;AAAA;AAAA,MAGZ,4DACE,qCAAC,eAAD,MACG,CAAC,CAAC,YACD,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe;AAAA,EACjC,WAAW;AAAA,EACX,SAAS;AAAA,GACL,eAGP,CAAC,CAAC,aACD,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe;AAAA,EACjC,WAAW;AAAA,EACX,SAAS;AAAA,GACL;AAOd,MAAM,QAAQ;AAAA,EAIZ,cAAc,UAAU,OAAO,YAAY;AAAA,EAI3C,aAAa,UAAU,OAAO,YAAY;AAAA,EAI1C,WAAW,UAAU,KAAK,YAAY;AAAA,EAItC,UAAU,UAAU,KAAK,YAAY;AAAA,EAIrC,cAAc,UAAU,MAAM;AAAA,IAC5B,UAAU,UAAU;AAAA,KACnB,YAAY;AAAA,EAIf,aAAa,UAAU,MAAM;AAAA,IAC3B,UAAU,UAAU;AAAA,KACnB,YAAY;AAAA;AAGjB,YAAY,YAAY;AAExB,MAAM,+BAA+B,SAAS;AAC9C,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\nimport { FooterWrapper } from './blocks';\n\nconst ModalFooter = ({\n confirmLabel = 'Confirm',\n rejectLabel = 'Cancel',\n onConfirm,\n onReject,\n confirmProps = {\n disabled: false,\n },\n rejectProps = {\n disabled: false,\n },\n}) => (\n <>\n <FooterWrapper>\n {!!onReject && (\n <DSButton\n buttonType=\"secondary\"\n className=\"action-reject\"\n containerProps={{ 'data-testid': 'modal-footer-reject-btn' }}\n labelText={rejectLabel}\n onClick={onReject}\n {...rejectProps}\n />\n )}\n {!!onConfirm && (\n <DSButton\n buttonType=\"primary\"\n className=\"action-confirm\"\n containerProps={{ 'data-testid': 'modal-footer-confirm-btn' }}\n labelText={confirmLabel}\n onClick={onConfirm}\n {...confirmProps}\n />\n )}\n </FooterWrapper>\n </>\n);\n\nconst props = {\n /**\n * Confirm Label\n */\n confirmLabel: PropTypes.string.description('Confirm Label'),\n /**\n * Reject Label\n */\n rejectLabel: PropTypes.string.description('Reject Label'),\n /**\n * Callback\n */\n onConfirm: PropTypes.func.description('Callback'),\n /**\n * Callback\n */\n onReject: PropTypes.func.description('Callback'),\n /**\n * Extra DSButton props for confirm btn.\n */\n confirmProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for confirm btn.'),\n /**\n * Extra DSButton props for reject btn.\n */\n rejectProps: PropTypes.shape({\n disabled: PropTypes.bool,\n }).description('Extra DSButton props for reject btn.'),\n};\n\nModalFooter.propTypes = props;\nModalFooter.displayName = 'ModalFooter';\nconst DSModalSlideFooterWithSchema = describe(ModalFooter);\nDSModalSlideFooterWithSchema.propTypes = props;\n\nexport { DSModalSlideFooterWithSchema };\n\nexport default ModalFooter;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,EACZ;AAAA,EACA,cAAc;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,MAEA,4DACE,qCAAC,qBACE,CAAC,CAAC,YACD,qCAAC;AAAA,EACC,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe,0BAA0B;AAAA,EAC3D,WAAW;AAAA,EACX,SAAS;AAAA,GACL,YACN,GAED,CAAC,CAAC,aACD,qCAAC;AAAA,EACC,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe,2BAA2B;AAAA,EAC5D,WAAW;AAAA,EACX,SAAS;AAAA,GACL,aACN,CAEJ,CACF;AAGF,MAAM,QAAQ;AAAA,EAIZ,cAAc,UAAU,OAAO,YAAY,eAAe;AAAA,EAI1D,aAAa,UAAU,OAAO,YAAY,cAAc;AAAA,EAIxD,WAAW,UAAU,KAAK,YAAY,UAAU;AAAA,EAIhD,UAAU,UAAU,KAAK,YAAY,UAAU;AAAA,EAI/C,cAAc,UAAU,MAAM;AAAA,IAC5B,UAAU,UAAU;AAAA,EACtB,CAAC,EAAE,YAAY,uCAAuC;AAAA,EAItD,aAAa,UAAU,MAAM;AAAA,IAC3B,UAAU,UAAU;AAAA,EACtB,CAAC,EAAE,YAAY,sCAAsC;AACvD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,+BAA+B,SAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
6
6
  "names": []
7
7
  }
@@ -26,6 +26,8 @@ const HeaderWrapper = styled.div`
26
26
  justify-content: space-between;
27
27
  width: 100%;
28
28
  align-items: center;
29
+ height: 48px;
30
+ overflow: hidden;
29
31
  `;
30
32
  const StyledSeparator = styled(DSSeparator)`
31
33
  padding: ${(props2) => props2.theme.space.xs} 0;
@@ -39,6 +41,7 @@ const props = {
39
41
  title: PropTypes.string.description("modal title")
40
42
  };
41
43
  ModalHeader.propTypes = props;
44
+ ModalHeader.displayName = "ModalHeader";
42
45
  const DSModalSlideHeaderWithSchema = describe(ModalHeader);
43
46
  DSModalSlideHeaderWithSchema.propTypes = props;
44
47
  var Header_default = ModalHeader;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Header.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { Header, HeaderLeftSide, Title } from './blocks';\n\nconst ModalHeader = ({ title: headerTitle = '', onClose = () => null, toolbar = null }) => (\n <HeaderWrapper>\n <HeaderLeftSide>\n <Header>\n <Title>{headerTitle}</Title>\n </Header>\n </HeaderLeftSide>\n {toolbar}\n {toolbar && <StyledSeparator position=\"initial\" margin=\"none\" orientation=\"vertical\" type=\"non-form\" />}\n <StyledCloseButton\n data-testid=\"modal-slider-header-close\"\n aria-label=\"Close modal slide\"\n buttonType=\"text\"\n icon={<Close aria-label=\"Close modal slide\" size=\"s\" />}\n onClick={onClose}\n />\n </HeaderWrapper>\n);\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n`;\n\nconst StyledSeparator = styled(DSSeparator)`\n padding: ${(props) => props.theme.space.xs} 0;\n`;\n\nconst StyledCloseButton = styled(DSButton)`\n margin: ${(props) => props.theme.space.xs};\n`;\n\nconst props = {\n /** on modal close callback */\n onClose: PropTypes.func.description('on modal close callback'),\n /** modal toolbar component */\n toolbar: PropTypes.node.description('modal toolbar comoponent'),\n /** modal title */\n title: PropTypes.string.description('modal title'),\n};\n\nModalHeader.propTypes = props;\n\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = props;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,cAAc,CAAC,EAAE,OAAO,cAAc,IAAI,UAAU,MAAM,MAAM,UAAU,WAC9E,qCAAC,eAAD,MACE,qCAAC,gBAAD,MACE,qCAAC,QAAD,MACE,qCAAC,OAAD,MAAQ,gBAGX,SACA,WAAW,qCAAC,iBAAD;AAAA,EAAiB,UAAS;AAAA,EAAU,QAAO;AAAA,EAAO,aAAY;AAAA,EAAW,MAAK;AAAA,IAC1F,qCAAC,mBAAD;AAAA,EACE,eAAY;AAAA,EACZ,cAAW;AAAA,EACX,YAAW;AAAA,EACX,MAAM,qCAAC,OAAD;AAAA,IAAO,cAAW;AAAA,IAAoB,MAAK;AAAA;AAAA,EACjD,SAAS;AAAA;AAKf,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAO7B,MAAM,kBAAkB,OAAO;AAAA,aAClB,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAG1C,MAAM,oBAAoB,OAAO;AAAA,YACrB,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAGzC,MAAM,QAAQ;AAAA,EAEZ,SAAS,UAAU,KAAK,YAAY;AAAA,EAEpC,SAAS,UAAU,KAAK,YAAY;AAAA,EAEpC,OAAO,UAAU,OAAO,YAAY;AAAA;AAGtC,YAAY,YAAY;AAExB,MAAM,+BAA+B,SAAS;AAC9C,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Close } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { Header, HeaderLeftSide, Title } from './blocks';\n\nconst ModalHeader = ({ title: headerTitle = '', onClose = () => null, toolbar = null }) => (\n <HeaderWrapper>\n <HeaderLeftSide>\n <Header>\n <Title>{headerTitle}</Title>\n </Header>\n </HeaderLeftSide>\n {toolbar}\n {toolbar && <StyledSeparator position=\"initial\" margin=\"none\" orientation=\"vertical\" type=\"non-form\" />}\n <StyledCloseButton\n data-testid=\"modal-slider-header-close\"\n aria-label=\"Close modal slide\"\n buttonType=\"text\"\n icon={<Close aria-label=\"Close modal slide\" size=\"s\" />}\n onClick={onClose}\n />\n </HeaderWrapper>\n);\n\nconst HeaderWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n height: 48px;\n overflow: hidden;\n`;\n\nconst StyledSeparator = styled(DSSeparator)`\n padding: ${(props) => props.theme.space.xs} 0;\n`;\n\nconst StyledCloseButton = styled(DSButton)`\n margin: ${(props) => props.theme.space.xs};\n`;\n\nconst props = {\n /** on modal close callback */\n onClose: PropTypes.func.description('on modal close callback'),\n /** modal toolbar component */\n toolbar: PropTypes.node.description('modal toolbar comoponent'),\n /** modal title */\n title: PropTypes.string.description('modal title'),\n};\n\nModalHeader.propTypes = props;\nModalHeader.displayName = 'ModalHeader';\nconst DSModalSlideHeaderWithSchema = describe(ModalHeader);\nDSModalSlideHeaderWithSchema.propTypes = props;\n\nexport { DSModalSlideHeaderWithSchema };\n\nexport default ModalHeader;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,cAAc,CAAC,EAAE,OAAO,cAAc,IAAI,UAAU,MAAM,MAAM,UAAU,WAC9E,qCAAC,qBACC,qCAAC,sBACC,qCAAC,cACC,qCAAC,aAAO,WAAY,CACtB,CACF,GACC,SACA,WAAW,qCAAC;AAAA,EAAgB,UAAS;AAAA,EAAU,QAAO;AAAA,EAAO,aAAY;AAAA,EAAW,MAAK;AAAA,CAAW,GACrG,qCAAC;AAAA,EACC,eAAY;AAAA,EACZ,cAAW;AAAA,EACX,YAAW;AAAA,EACX,MAAM,qCAAC;AAAA,IAAM,cAAW;AAAA,IAAoB,MAAK;AAAA,GAAI;AAAA,EACrD,SAAS;AAAA,CACX,CACF;AAGF,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,kBAAkB,OAAO,WAAW;AAAA,aAC7B,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAG1C,MAAM,oBAAoB,OAAO,QAAQ;AAAA,YAC7B,CAAC,WAAU,OAAM,MAAM,MAAM;AAAA;AAGzC,MAAM,QAAQ;AAAA,EAEZ,SAAS,UAAU,KAAK,YAAY,yBAAyB;AAAA,EAE7D,SAAS,UAAU,KAAK,YAAY,0BAA0B;AAAA,EAE9D,OAAO,UAAU,OAAO,YAAY,aAAa;AACnD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,+BAA+B,SAAS,WAAW;AACzD,6BAA6B,YAAY;AAIzC,IAAO,iBAAQ;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/blocks.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'modal-slide';\n\nexport const Wrapper = aggregatedClasses('div')(\n blockName,\n 'wrapper',\n ({ show, centered }) => ({\n showing: show,\n disappearing: !show,\n centered,\n }),\n);\n\nexport const Overlay = aggregatedClasses('div')(\n blockName,\n 'overlay',\n ({ show }) => ({\n showing: show,\n disappearing: !show,\n }),\n);\n\nexport const Content = aggregatedClasses('div')(\n blockName,\n 'content',\n ({ show }) => ({\n showing: show,\n disappearing: !show,\n }),\n);\n\nexport const Title = aggregatedClasses('div')(blockName, 'title', () => ({}));\n\nexport const BreadcrumTitle = aggregatedClasses('div')(\n blockName,\n 'breadcrum-title',\n () => ({}),\n);\n\nexport const HeaderLeftSide = aggregatedClasses('div')(\n blockName,\n 'header-left-side',\n () => ({}),\n);\n\nexport const ActualContent = aggregatedClasses('div')(\n blockName,\n 'actual-content',\n () => ({}),\n);\nexport const Header = aggregatedClasses('div')(blockName, 'header', () => ({}));\nexport const Footer = aggregatedClasses('div')(blockName, 'footer', () => ({}));\n\nexport const FooterWrapper = aggregatedClasses('div')(\n blockName,\n 'footer-wrapper',\n () => ({}),\n);\n"],
5
- "mappings": "AAAA;ACAA;AAEA,MAAM,YAAY;AAEX,MAAM,UAAU,kBAAkB,OACvC,WACA,WACA,CAAC,EAAE,MAAM,eAAgB;AAAA,EACvB,SAAS;AA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AC,EACV;AAEO,MAAM,gBAAgB,kBAAkB,KAAK,EAClD,WACA,kBACA,MAAO,EAAC,EACV;AACO,MAAM,SAAS,kBAAkB,KAAK,EAAE,WAAW,UAAU,MAAO,EAAC,EAAE;AACvE,MAAM,SAAS,kBAAkB,KAAK,EAAE,WAAW,UAAU,MAAO,EAAC,EAAE;AAEvE,MAAM,gBAAgB,kBAAkB,KAAK,EAClD,WACA,kBACA,MAAO,EAAC,EACV;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-modal-slide",
3
- "version": "3.0.0-next.7",
3
+ "version": "3.0.0-next.70",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Modal Slide",
6
6
  "files": [
@@ -50,14 +50,21 @@
50
50
  "reportFile": "tests.xml",
51
51
  "indent": 4
52
52
  },
53
+ "scripts": {
54
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
55
+ "test": "node ../../scripts/testing/test.mjs",
56
+ "lint": "node ../../scripts/lint.mjs",
57
+ "dts": "node ../../scripts/dts.mjs",
58
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
59
+ },
53
60
  "dependencies": {
54
- "@elliemae/ds-button": "3.0.0-next.7",
55
- "@elliemae/ds-classnames": "3.0.0-next.7",
56
- "@elliemae/ds-grid": "3.0.0-next.7",
57
- "@elliemae/ds-icons": "3.0.0-next.7",
58
- "@elliemae/ds-separator": "3.0.0-next.7",
59
- "@elliemae/ds-system": "3.0.0-next.7",
60
- "prop-types": "~15.7.2",
61
+ "@elliemae/ds-button": "workspace:*",
62
+ "@elliemae/ds-classnames": "workspace:*",
63
+ "@elliemae/ds-grid": "workspace:*",
64
+ "@elliemae/ds-icons": "workspace:*",
65
+ "@elliemae/ds-separator": "workspace:*",
66
+ "@elliemae/ds-system": "workspace:*",
67
+ "prop-types": "~15.8.1",
61
68
  "react-desc": "~4.1.3"
62
69
  },
63
70
  "devDependencies": {
@@ -66,19 +73,12 @@
66
73
  },
67
74
  "peerDependencies": {
68
75
  "lodash": "~4.17.21",
69
- "react": "~16.14.0",
70
- "react-dom": "~16.14.0",
76
+ "react": "~17.0.2",
77
+ "react-dom": "~17.0.2",
71
78
  "styled-components": "^5.3.3"
72
79
  },
73
80
  "publishConfig": {
74
81
  "access": "public",
75
82
  "typeSafety": false
76
- },
77
- "scripts": {
78
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
79
- "test": "node ../../scripts/testing/test.mjs",
80
- "lint": "node ../../scripts/lint.mjs",
81
- "dts": "node ../../scripts/dts.mjs",
82
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
83
83
  }
84
- }
84
+ }