@elliemae/ds-modal-slide 2.3.0-alpha.9 → 2.3.0-next.3

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 (37) hide show
  1. package/cjs/DSModalSlide.js +176 -0
  2. package/cjs/components/Footer.js +101 -0
  3. package/cjs/components/Header.js +69 -0
  4. package/cjs/components/blocks.js +54 -0
  5. package/cjs/index.js +17 -0
  6. package/esm/DSModalSlide.js +161 -0
  7. package/esm/components/Footer.js +90 -0
  8. package/esm/components/Header.js +57 -0
  9. package/esm/components/blocks.js +41 -0
  10. package/esm/index.js +3 -0
  11. package/package.json +30 -32
  12. package/{dist/types → types}/DSModalSlide.d.ts +0 -0
  13. package/{dist/types → types}/components/Footer.d.ts +0 -0
  14. package/{dist/types → types}/components/Header.d.ts +0 -0
  15. package/{dist/types → types}/components/blocks.d.ts +0 -0
  16. package/{dist/types → types}/index.d.ts +1 -1
  17. package/{dist/types → types}/tests/DSModalSlide.test.d.ts +0 -0
  18. package/dist/cjs/DSModalSlide.js +0 -152
  19. package/dist/cjs/DSModalSlide.js.map +0 -7
  20. package/dist/cjs/components/Footer.js +0 -81
  21. package/dist/cjs/components/Footer.js.map +0 -7
  22. package/dist/cjs/components/Header.js +0 -78
  23. package/dist/cjs/components/Header.js.map +0 -7
  24. package/dist/cjs/components/blocks.js +0 -65
  25. package/dist/cjs/components/blocks.js.map +0 -7
  26. package/dist/cjs/index.js +0 -40
  27. package/dist/cjs/index.js.map +0 -7
  28. package/dist/esm/DSModalSlide.js +0 -123
  29. package/dist/esm/DSModalSlide.js.map +0 -7
  30. package/dist/esm/components/Footer.js +0 -52
  31. package/dist/esm/components/Footer.js.map +0 -7
  32. package/dist/esm/components/Header.js +0 -49
  33. package/dist/esm/components/Header.js.map +0 -7
  34. package/dist/esm/components/blocks.js +0 -36
  35. package/dist/esm/components/blocks.js.map +0 -7
  36. package/dist/esm/index.js +0 -11
  37. package/dist/esm/index.js.map +0 -7
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/blocks.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
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,EACT,cAAc,CAAC;AAAA,EACf;AAAA;AAIG,MAAM,UAAU,4CAAkB,OACvC,WACA,WACA,CAAC,EAAE,WAAY;AAAA,EACb,SAAS;AAAA,EACT,cAAc,CAAC;AAAA;AAIZ,MAAM,UAAU,4CAAkB,OACvC,WACA,WACA,CAAC,EAAE,WAAY;AAAA,EACb,SAAS;AAAA,EACT,cAAc,CAAC;AAAA;AAIZ,MAAM,QAAQ,4CAAkB,OAAO,WAAW,SAAS,MAAO;AAElE,MAAM,iBAAiB,4CAAkB,OAC9C,WACA,mBACA,MAAO;AAGF,MAAM,iBAAiB,4CAAkB,OAC9C,WACA,oBACA,MAAO;AAGF,MAAM,gBAAgB,4CAAkB,OAC7C,WACA,kBACA,MAAO;AAEF,MAAM,SAAS,4CAAkB,OAAO,WAAW,UAAU,MAAO;AACpE,MAAM,SAAS,4CAAkB,OAAO,WAAW,UAAU,MAAO;AAEpE,MAAM,gBAAgB,4CAAkB,OAC7C,WACA,kBACA,MAAO;",
6
- "names": []
7
- }
package/dist/cjs/index.js DELETED
@@ -1,40 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var src_exports = {};
29
- __export(src_exports, {
30
- DSModalSlideFooterWithSchema: () => import_Footer.DSModalSlideFooterWithSchema,
31
- DSModalSlideHeaderWithSchema: () => import_Header.DSModalSlideHeaderWithSchema,
32
- default: () => import_DSModalSlide.default
33
- });
34
- var React = __toESM(require("react"));
35
- __reExport(src_exports, require("./DSModalSlide"));
36
- var import_DSModalSlide = __toESM(require("./DSModalSlide"));
37
- var import_Header = require("./components/Header");
38
- var import_Footer = require("./components/Footer");
39
- module.exports = __toCommonJS(src_exports);
40
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
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;",
6
- "names": []
7
- }
@@ -1,123 +0,0 @@
1
- import * as React from "react";
2
- import React2, { useState, useEffect, useCallback } from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import ReactDOM from "react-dom";
5
- import { useTheme } from "@elliemae/ds-system";
6
- import { Grid } from "@elliemae/ds-grid";
7
- import DSSeparator from "@elliemae/ds-separator";
8
- import { Wrapper, Overlay, Content, ActualContent } from "./components/blocks";
9
- import ModalHeader from "./components/Header";
10
- import ModalFooter from "./components/Footer";
11
- const DSModalSlide = ({
12
- isOpen = false,
13
- children,
14
- getContainer,
15
- centered = false,
16
- fullWidth = false,
17
- header = null,
18
- footer = null,
19
- fadeOut = 1500,
20
- fadeIn = 1500,
21
- overrideHeight = false
22
- }) => {
23
- const [isMoving, setMoving] = useState(false);
24
- const [show, setShow] = useState(isOpen);
25
- const [width, setWidth] = useState(50);
26
- const theme = useTheme();
27
- const contentRows = [...header ? [theme.space.m] : [], "0px", "auto", "0px", ...footer ? [theme.space.m] : []];
28
- const updateShow = useCallback(() => {
29
- if (fullWidth)
30
- setWidth(100);
31
- else
32
- setWidth(50);
33
- if (isOpen !== show) {
34
- setMoving(true);
35
- if (isOpen) {
36
- setShow(isOpen);
37
- }
38
- }
39
- }, [isOpen, fullWidth, isMoving]);
40
- useEffect(updateShow, [isOpen, fullWidth]);
41
- if (!show)
42
- return null;
43
- const container = getContainer();
44
- if (!container)
45
- return null;
46
- const handleAnimationEnd = () => {
47
- setMoving(false);
48
- if (!isOpen)
49
- setShow(isOpen);
50
- };
51
- let { height } = container.getBoundingClientRect();
52
- if (overrideHeight && container.scrollHeight > height) {
53
- height = container.scrollHeight;
54
- }
55
- if (!container.style.position) {
56
- container.style.position = "relative";
57
- }
58
- return ReactDOM.createPortal(/* @__PURE__ */ React2.createElement(Wrapper, {
59
- classProps: {
60
- show: isOpen,
61
- centered
62
- },
63
- style: {
64
- "--height": height,
65
- "--fade-in": fadeIn,
66
- "--fade-out": fadeOut,
67
- "--width": width
68
- }
69
- }, /* @__PURE__ */ React2.createElement(Overlay, {
70
- classProps: {
71
- show: isOpen
72
- }
73
- }, /* @__PURE__ */ React2.createElement(Content, {
74
- onAnimationEnd: handleAnimationEnd,
75
- classProps: {
76
- show: isOpen
77
- }
78
- }, /* @__PURE__ */ React2.createElement(Grid, {
79
- style: {
80
- height: "100%",
81
- width: "100%",
82
- maxHeight: "100%",
83
- overflow: "hidden",
84
- "-webkit-backface-visibility": "hidden",
85
- "backface-visibility": "hidden",
86
- "-webkit-transform-style": "preserve-3d"
87
- },
88
- rows: contentRows,
89
- "data-testid": "ds-modal-slide"
90
- }, header && React2.cloneElement(header, { fullWidth }), header && /* @__PURE__ */ React2.createElement(DSSeparator, {
91
- position: "initial",
92
- type: "non-form"
93
- }), /* @__PURE__ */ React2.createElement(Grid, {
94
- style: { overflow: "hidden" }
95
- }, /* @__PURE__ */ React2.createElement(Grid, {
96
- style: { overflow: "auto" }
97
- }, /* @__PURE__ */ React2.createElement(ActualContent, null, children))), footer && /* @__PURE__ */ React2.createElement(DSSeparator, {
98
- position: "initial",
99
- type: "non-form"
100
- }), footer)))), container);
101
- };
102
- const props = {
103
- centered: PropTypes.bool.description("If the modal slide is centered or not"),
104
- isOpen: PropTypes.bool.description("If the modal slide is visible or not"),
105
- children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.any]).isRequired.description("Main content of the modal"),
106
- fullWidth: PropTypes.bool.description("If the modal slide takes the full width or not"),
107
- header: PropTypes.element.description("If the modal slide has a header, only available for full width option"),
108
- fadeOut: PropTypes.number.description("Ratio of fade out"),
109
- fadeIn: PropTypes.number.description("Ratio of fade in"),
110
- overrideHeight: PropTypes.bool.description("Override the panel height to scroll height of the container")
111
- };
112
- DSModalSlide.propTypes = props;
113
- const DSModalSlideWithSchema = describe(DSModalSlide);
114
- DSModalSlideWithSchema.propTypes = props;
115
- var DSModalSlide_default = DSModalSlide;
116
- export {
117
- DSModalSlide,
118
- DSModalSlideWithSchema,
119
- ModalFooter,
120
- ModalHeader,
121
- DSModalSlide_default as default
122
- };
123
- //# sourceMappingURL=DSModalSlide.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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,QAAQ;AACd,QAAM,cAAc,CAAC,GAAI,SAAS,CAAC,MAAM,MAAM,KAAK,IAAK,OAAO,QAAQ,OAAO,GAAI,SAAS,CAAC,MAAM,MAAM,KAAK;AAE9G,QAAM,aAAa,YAAY,MAAM;AACnC,QAAI;AAAW,eAAS;AAAA;AACnB,eAAS;AACd,QAAI,WAAW,MAAM;AACnB,gBAAU;AACV,UAAI,QAAQ;AACV,gBAAQ;AAAA;AAAA;AAAA,KAGX,CAAC,QAAQ,WAAW;AAEvB,YAAU,YAAY,CAAC,QAAQ;AAE/B,MAAI,CAAC;AAAM,WAAO;AAElB,QAAM,YAAY;AAClB,MAAI,CAAC;AAAW,WAAO;AAEvB,QAAM,qBAAqB,MAAM;AAC/B,cAAU;AACV,QAAI,CAAC;AAAQ,cAAQ;AAAA;AAGvB,MAAI,EAAE,WAAW,UAAU;AAC3B,MAAI,kBAAkB,UAAU,eAAe,QAAQ;AACrD,aAAS,UAAU;AAAA;AAErB,MAAI,CAAC,UAAU,MAAM,UAAU;AAC7B,cAAU,MAAM,WAAW;AAAA;AAG7B,SAAO,SAAS,aACd,qCAAC,SAAD;AAAA,IACE,YAAY;AAAA,MACV,MAAM;AAAA,MACN;AAAA;AAAA,IAEF,OAAO;AAAA,MACL,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,cAAc;AAAA,MACd,WAAW;AAAA;AAAA,KAGb,qCAAC,SAAD;AAAA,IACE,YAAY;AAAA,MACV,MAAM;AAAA;AAAA,KAGR,qCAAC,SAAD;AAAA,IACE,gBAAgB;AAAA,IAChB,YAAY;AAAA,MACV,MAAM;AAAA;AAAA,KAGR,qCAAC,MAAD;AAAA,IACE,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,WAAW;AAAA,MACX,UAAU;AAAA,MACV,+BAA+B;AAAA,MAC/B,uBAAuB;AAAA,MACvB,2BAA2B;AAAA;AAAA,IAE7B,MAAM;AAAA,IACN,eAAY;AAAA,KAEX,UAAU,OAAM,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;",
6
- "names": []
7
- }
@@ -1,52 +0,0 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import DSButton from "@elliemae/ds-button";
5
- import { FooterWrapper } from "./blocks";
6
- const ModalFooter = ({
7
- confirmLabel = "Confirm",
8
- rejectLabel = "Cancel",
9
- onConfirm,
10
- onReject,
11
- confirmProps = {
12
- disabled: false
13
- },
14
- rejectProps = {
15
- disabled: false
16
- }
17
- }) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(FooterWrapper, null, !!onReject && /* @__PURE__ */ React2.createElement(DSButton, {
18
- buttonType: "secondary",
19
- className: "action-reject",
20
- containerProps: { "data-testid": "modal-footer-reject-btn" },
21
- labelText: rejectLabel,
22
- onClick: onReject,
23
- ...rejectProps
24
- }), !!onConfirm && /* @__PURE__ */ React2.createElement(DSButton, {
25
- buttonType: "primary",
26
- className: "action-confirm",
27
- containerProps: { "data-testid": "modal-footer-confirm-btn" },
28
- labelText: confirmLabel,
29
- onClick: onConfirm,
30
- ...confirmProps
31
- })));
32
- const props = {
33
- confirmLabel: PropTypes.string.description("Confirm Label"),
34
- rejectLabel: PropTypes.string.description("Reject Label"),
35
- onConfirm: PropTypes.func.description("Callback"),
36
- onReject: PropTypes.func.description("Callback"),
37
- confirmProps: PropTypes.shape({
38
- disabled: PropTypes.bool
39
- }).description("Extra DSButton props for confirm btn."),
40
- rejectProps: PropTypes.shape({
41
- disabled: PropTypes.bool
42
- }).description("Extra DSButton props for reject btn.")
43
- };
44
- ModalFooter.propTypes = props;
45
- const DSModalSlideFooterWithSchema = describe(ModalFooter);
46
- DSModalSlideFooterWithSchema.propTypes = props;
47
- var Footer_default = ModalFooter;
48
- export {
49
- DSModalSlideFooterWithSchema,
50
- Footer_default as default
51
- };
52
- //# sourceMappingURL=Footer.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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,KACL;AAAA,IAGP,CAAC,CAAC,aACD,qCAAC,UAAD;AAAA,EACE,YAAW;AAAA,EACX,WAAU;AAAA,EACV,gBAAgB,EAAE,eAAe;AAAA,EACjC,WAAW;AAAA,EACX,SAAS;AAAA,KACL;AAAA;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;",
6
- "names": []
7
- }
@@ -1,49 +0,0 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import styled from "styled-components";
5
- import DSSeparator from "@elliemae/ds-separator";
6
- import { Close } from "@elliemae/ds-icons";
7
- import DSButton from "@elliemae/ds-button";
8
- import { Header, HeaderLeftSide, Title } from "./blocks";
9
- const ModalHeader = ({ title: headerTitle = "", onClose = () => null, toolbar = null }) => /* @__PURE__ */ React2.createElement(HeaderWrapper, null, /* @__PURE__ */ React2.createElement(HeaderLeftSide, null, /* @__PURE__ */ React2.createElement(Header, null, /* @__PURE__ */ React2.createElement(Title, null, headerTitle))), toolbar, toolbar && /* @__PURE__ */ React2.createElement(StyledSeparator, {
10
- position: "initial",
11
- margin: "none",
12
- orientation: "vertical",
13
- type: "non-form"
14
- }), /* @__PURE__ */ React2.createElement(StyledCloseButton, {
15
- "data-testid": "modal-slider-header-close",
16
- "aria-label": "Close modal slide",
17
- buttonType: "text",
18
- icon: /* @__PURE__ */ React2.createElement(Close, {
19
- "aria-label": "Close modal slide",
20
- size: "s"
21
- }),
22
- onClick: onClose
23
- }));
24
- const HeaderWrapper = styled.div`
25
- display: flex;
26
- justify-content: space-between;
27
- width: 100%;
28
- align-items: center;
29
- `;
30
- const StyledSeparator = styled(DSSeparator)`
31
- padding: ${(props2) => props2.theme.space.xs} 0;
32
- `;
33
- const StyledCloseButton = styled(DSButton)`
34
- margin: ${(props2) => props2.theme.space.xs};
35
- `;
36
- const props = {
37
- onClose: PropTypes.func.description("on modal close callback"),
38
- toolbar: PropTypes.node.description("modal toolbar comoponent"),
39
- title: PropTypes.string.description("modal title")
40
- };
41
- ModalHeader.propTypes = props;
42
- const DSModalSlideHeaderWithSchema = describe(ModalHeader);
43
- DSModalSlideHeaderWithSchema.propTypes = props;
44
- var Header_default = ModalHeader;
45
- export {
46
- DSModalSlideHeaderWithSchema,
47
- Header_default as default
48
- };
49
- //# sourceMappingURL=Header.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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;",
6
- "names": []
7
- }
@@ -1,36 +0,0 @@
1
- import * as React from "react";
2
- import { aggregatedClasses } from "@elliemae/ds-classnames";
3
- const blockName = "modal-slide";
4
- const Wrapper = aggregatedClasses("div")(blockName, "wrapper", ({ show, centered }) => ({
5
- showing: show,
6
- disappearing: !show,
7
- centered
8
- }));
9
- const Overlay = aggregatedClasses("div")(blockName, "overlay", ({ show }) => ({
10
- showing: show,
11
- disappearing: !show
12
- }));
13
- const Content = aggregatedClasses("div")(blockName, "content", ({ show }) => ({
14
- showing: show,
15
- disappearing: !show
16
- }));
17
- const Title = aggregatedClasses("div")(blockName, "title", () => ({}));
18
- const BreadcrumTitle = aggregatedClasses("div")(blockName, "breadcrum-title", () => ({}));
19
- const HeaderLeftSide = aggregatedClasses("div")(blockName, "header-left-side", () => ({}));
20
- const ActualContent = aggregatedClasses("div")(blockName, "actual-content", () => ({}));
21
- const Header = aggregatedClasses("div")(blockName, "header", () => ({}));
22
- const Footer = aggregatedClasses("div")(blockName, "footer", () => ({}));
23
- const FooterWrapper = aggregatedClasses("div")(blockName, "footer-wrapper", () => ({}));
24
- export {
25
- ActualContent,
26
- BreadcrumTitle,
27
- Content,
28
- Footer,
29
- FooterWrapper,
30
- Header,
31
- HeaderLeftSide,
32
- Overlay,
33
- Title,
34
- Wrapper
35
- };
36
- //# sourceMappingURL=blocks.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/blocks.tsx"],
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;AAAA,EACT,cAAc,CAAC;AAAA,EACf;AAAA;AAIG,MAAM,UAAU,kBAAkB,OACvC,WACA,WACA,CAAC,EAAE,WAAY;AAAA,EACb,SAAS;AAAA,EACT,cAAc,CAAC;AAAA;AAIZ,MAAM,UAAU,kBAAkB,OACvC,WACA,WACA,CAAC,EAAE,WAAY;AAAA,EACb,SAAS;AAAA,EACT,cAAc,CAAC;AAAA;AAIZ,MAAM,QAAQ,kBAAkB,OAAO,WAAW,SAAS,MAAO;AAElE,MAAM,iBAAiB,kBAAkB,OAC9C,WACA,mBACA,MAAO;AAGF,MAAM,iBAAiB,kBAAkB,OAC9C,WACA,oBACA,MAAO;AAGF,MAAM,gBAAgB,kBAAkB,OAC7C,WACA,kBACA,MAAO;AAEF,MAAM,SAAS,kBAAkB,OAAO,WAAW,UAAU,MAAO;AACpE,MAAM,SAAS,kBAAkB,OAAO,WAAW,UAAU,MAAO;AAEpE,MAAM,gBAAgB,kBAAkB,OAC7C,WACA,kBACA,MAAO;",
6
- "names": []
7
- }
package/dist/esm/index.js DELETED
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- export * from "./DSModalSlide";
3
- import { default as default2 } from "./DSModalSlide";
4
- import { DSModalSlideHeaderWithSchema } from "./components/Header";
5
- import { DSModalSlideFooterWithSchema } from "./components/Footer";
6
- export {
7
- DSModalSlideFooterWithSchema,
8
- DSModalSlideHeaderWithSchema,
9
- default2 as default
10
- };
11
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSModalSlide';\nexport { default } from './DSModalSlide';\nexport { DSModalSlideHeaderWithSchema } from './components/Header';\nexport { DSModalSlideFooterWithSchema } from './components/Footer';"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;",
6
- "names": []
7
- }