@elliemae/ds-modal-slide 3.0.0-next.2 → 3.0.0-next.6

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/dist/cjs/DSModalSlide.js +152 -0
  2. package/dist/cjs/DSModalSlide.js.map +7 -0
  3. package/dist/cjs/components/Footer.js +93 -0
  4. package/dist/cjs/components/Footer.js.map +7 -0
  5. package/dist/cjs/components/Header.js +78 -0
  6. package/dist/cjs/components/Header.js.map +7 -0
  7. package/dist/cjs/components/blocks.js +65 -0
  8. package/dist/cjs/components/blocks.js.map +7 -0
  9. package/dist/cjs/index.js +40 -0
  10. package/dist/cjs/index.js.map +7 -0
  11. package/dist/esm/DSModalSlide.js +123 -0
  12. package/dist/esm/DSModalSlide.js.map +7 -0
  13. package/dist/esm/components/Footer.js +66 -0
  14. package/dist/esm/components/Footer.js.map +7 -0
  15. package/dist/esm/components/Header.js +49 -0
  16. package/dist/esm/components/Header.js.map +7 -0
  17. package/dist/esm/components/blocks.js +36 -0
  18. package/dist/esm/components/blocks.js.map +7 -0
  19. package/dist/esm/index.js +11 -0
  20. package/dist/esm/index.js.map +7 -0
  21. package/package.json +38 -29
  22. package/cjs/DSModalSlide.js +0 -176
  23. package/cjs/components/Footer.js +0 -101
  24. package/cjs/components/Header.js +0 -69
  25. package/cjs/components/blocks.js +0 -54
  26. package/cjs/index.js +0 -17
  27. package/esm/DSModalSlide.js +0 -161
  28. package/esm/components/Footer.js +0 -90
  29. package/esm/components/Header.js +0 -57
  30. package/esm/components/blocks.js +0 -41
  31. package/esm/index.js +0 -3
  32. package/types/DSModalSlide.d.ts +0 -105
  33. package/types/components/Footer.d.ts +0 -90
  34. package/types/components/Header.d.ts +0 -43
  35. package/types/components/blocks.d.ts +0 -11
  36. package/types/index.d.ts +0 -4
  37. package/types/tests/DSModalSlide.test.d.ts +0 -1
@@ -0,0 +1,66 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ import * as React from "react";
18
+ import React2 from "react";
19
+ import { PropTypes, describe } from "react-desc";
20
+ import DSButton from "@elliemae/ds-button";
21
+ import { FooterWrapper } from "./blocks";
22
+ const ModalFooter = ({
23
+ confirmLabel = "Confirm",
24
+ rejectLabel = "Cancel",
25
+ onConfirm,
26
+ onReject,
27
+ confirmProps = {
28
+ disabled: false
29
+ },
30
+ rejectProps = {
31
+ disabled: false
32
+ }
33
+ }) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(FooterWrapper, null, !!onReject && /* @__PURE__ */ React2.createElement(DSButton, __spreadValues({
34
+ buttonType: "secondary",
35
+ className: "action-reject",
36
+ containerProps: { "data-testid": "modal-footer-reject-btn" },
37
+ labelText: rejectLabel,
38
+ onClick: onReject
39
+ }, rejectProps)), !!onConfirm && /* @__PURE__ */ React2.createElement(DSButton, __spreadValues({
40
+ buttonType: "primary",
41
+ className: "action-confirm",
42
+ containerProps: { "data-testid": "modal-footer-confirm-btn" },
43
+ labelText: confirmLabel,
44
+ onClick: onConfirm
45
+ }, confirmProps))));
46
+ const props = {
47
+ confirmLabel: PropTypes.string.description("Confirm Label"),
48
+ rejectLabel: PropTypes.string.description("Reject Label"),
49
+ onConfirm: PropTypes.func.description("Callback"),
50
+ onReject: PropTypes.func.description("Callback"),
51
+ confirmProps: PropTypes.shape({
52
+ disabled: PropTypes.bool
53
+ }).description("Extra DSButton props for confirm btn."),
54
+ rejectProps: PropTypes.shape({
55
+ disabled: PropTypes.bool
56
+ }).description("Extra DSButton props for reject btn.")
57
+ };
58
+ ModalFooter.propTypes = props;
59
+ const DSModalSlideFooterWithSchema = describe(ModalFooter);
60
+ DSModalSlideFooterWithSchema.propTypes = props;
61
+ var Footer_default = ModalFooter;
62
+ export {
63
+ DSModalSlideFooterWithSchema,
64
+ Footer_default as default
65
+ };
66
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1,7 @@
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,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;",
6
+ "names": []
7
+ }
@@ -0,0 +1,49 @@
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
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,36 @@
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
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,11 @@
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
@@ -0,0 +1,7 @@
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
+ }
package/package.json CHANGED
@@ -1,31 +1,34 @@
1
1
  {
2
2
  "name": "@elliemae/ds-modal-slide",
3
- "version": "3.0.0-next.2",
3
+ "version": "3.0.0-next.6",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Modal Slide",
6
- "module": "./esm/index.js",
7
- "main": "./cjs/index.js",
8
- "types": "./types/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
9
12
  "exports": {
10
13
  ".": {
11
- "import": "./esm/index.js",
12
- "require": "./cjs/index.js"
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js"
13
16
  },
14
17
  "./DSModalSlide": {
15
- "import": "./esm/DSModalSlide.js",
16
- "require": "./cjs/DSModalSlide.js"
18
+ "import": "./dist/esm/DSModalSlide.js",
19
+ "require": "./dist/cjs/DSModalSlide.js"
17
20
  },
18
21
  "./components/Header": {
19
- "import": "./esm/components/Header.js",
20
- "require": "./cjs/components/Header.js"
22
+ "import": "./dist/esm/components/Header.js",
23
+ "require": "./dist/cjs/components/Header.js"
21
24
  },
22
25
  "./components/Footer": {
23
- "import": "./esm/components/Footer.js",
24
- "require": "./cjs/components/Footer.js"
26
+ "import": "./dist/esm/components/Footer.js",
27
+ "require": "./dist/cjs/components/Footer.js"
25
28
  },
26
29
  "./components/blocks": {
27
- "import": "./esm/components/blocks.js",
28
- "require": "./cjs/components/blocks.js"
30
+ "import": "./dist/esm/components/blocks.js",
31
+ "require": "./dist/cjs/components/blocks.js"
29
32
  }
30
33
  },
31
34
  "sideEffects": [
@@ -37,23 +40,23 @@
37
40
  "url": "https://git.elliemae.io/platform-ui/dimsum.git"
38
41
  },
39
42
  "engines": {
40
- "npm": ">=7",
41
- "node": ">=14"
43
+ "pnpm": ">=6",
44
+ "node": ">=16"
42
45
  },
43
46
  "author": "ICE MT",
44
- "scripts": {
45
- "dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
46
- "prebuild": "exit 0",
47
- "predev": "exit 0",
48
- "build": "node ../../scripts/build/build.js"
47
+ "jestSonar": {
48
+ "sonar56x": true,
49
+ "reportPath": "reports",
50
+ "reportFile": "tests.xml",
51
+ "indent": 4
49
52
  },
50
53
  "dependencies": {
51
- "@elliemae/ds-button": "3.0.0-next.2",
52
- "@elliemae/ds-classnames": "3.0.0-next.2",
53
- "@elliemae/ds-grid": "3.0.0-next.2",
54
- "@elliemae/ds-icons": "3.0.0-next.2",
55
- "@elliemae/ds-separator": "3.0.0-next.2",
56
- "@elliemae/ds-system": "3.0.0-next.2",
54
+ "@elliemae/ds-button": "3.0.0-next.6",
55
+ "@elliemae/ds-classnames": "3.0.0-next.6",
56
+ "@elliemae/ds-grid": "3.0.0-next.6",
57
+ "@elliemae/ds-icons": "3.0.0-next.6",
58
+ "@elliemae/ds-separator": "3.0.0-next.6",
59
+ "@elliemae/ds-system": "3.0.0-next.6",
57
60
  "prop-types": "~15.7.2",
58
61
  "react-desc": "~4.1.3"
59
62
  },
@@ -69,7 +72,13 @@
69
72
  },
70
73
  "publishConfig": {
71
74
  "access": "public",
72
- "directory": "dist",
73
- "generateSubmodules": true
75
+ "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"
74
83
  }
75
84
  }
@@ -1,176 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- require('core-js/modules/web.dom-collections.iterator.js');
7
- var React = require('react');
8
- var reactDesc = require('react-desc');
9
- var ReactDOM = require('react-dom');
10
- var dsSystem = require('@elliemae/ds-system');
11
- var dsGrid = require('@elliemae/ds-grid');
12
- var DSSeparator = require('@elliemae/ds-separator');
13
- var blocks = require('./components/blocks.js');
14
- var Header = require('./components/Header.js');
15
- var Footer = require('./components/Footer.js');
16
-
17
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
-
19
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
20
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
- var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
22
- var DSSeparator__default = /*#__PURE__*/_interopDefaultLegacy(DSSeparator);
23
-
24
- var _DSSeparator, _DSSeparator2;
25
-
26
- const DSModalSlide = _ref => {
27
- let {
28
- isOpen = false,
29
- children,
30
- getContainer,
31
- centered = false,
32
- fullWidth = false,
33
- header = null,
34
- footer = null,
35
- fadeOut = 1500,
36
- fadeIn = 1500,
37
- overrideHeight = false
38
- } = _ref;
39
- const [isMoving, setMoving] = React.useState(false);
40
- const [show, setShow] = React.useState(isOpen);
41
- const [width, setWidth] = React.useState(50);
42
- const theme = dsSystem.useTheme();
43
- const contentRows = [...(header ? [theme.space.m] : []), '0px', 'auto', '0px', ...(footer ? [theme.space.m] : [])];
44
- const updateShow = React.useCallback(() => {
45
- if (fullWidth) setWidth(100);else setWidth(50);
46
-
47
- if (isOpen !== show) {
48
- setMoving(true);
49
-
50
- if (isOpen) {
51
- setShow(isOpen);
52
- }
53
- }
54
- }, [isOpen, fullWidth, isMoving]);
55
- React.useEffect(updateShow, [isOpen, fullWidth]);
56
- if (!show) return null;
57
- const container = getContainer();
58
- if (!container) return null;
59
-
60
- const handleAnimationEnd = () => {
61
- setMoving(false);
62
- if (!isOpen) setShow(isOpen);
63
- };
64
-
65
- let {
66
- height
67
- } = container.getBoundingClientRect();
68
-
69
- if (overrideHeight && container.scrollHeight > height) {
70
- height = container.scrollHeight;
71
- }
72
-
73
- if (!container.style.position) {
74
- container.style.position = 'relative';
75
- }
76
-
77
- return /*#__PURE__*/ReactDOM__default["default"].createPortal( /*#__PURE__*/_jsx__default["default"](blocks.Wrapper, {
78
- classProps: {
79
- show: isOpen,
80
- centered
81
- },
82
- style: {
83
- '--height': height,
84
- '--fade-in': fadeIn,
85
- '--fade-out': fadeOut,
86
- '--width': width
87
- }
88
- }, void 0, /*#__PURE__*/_jsx__default["default"](blocks.Overlay, {
89
- classProps: {
90
- show: isOpen
91
- }
92
- }, void 0, /*#__PURE__*/_jsx__default["default"](blocks.Content, {
93
- onAnimationEnd: handleAnimationEnd,
94
- classProps: {
95
- show: isOpen
96
- }
97
- }, void 0, /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
98
- style: {
99
- height: '100%',
100
- width: '100%',
101
- maxHeight: '100%',
102
- overflow: 'hidden',
103
- '-webkit-backface-visibility': 'hidden',
104
- 'backface-visibility': 'hidden',
105
- '-webkit-transform-style': 'preserve-3d'
106
- },
107
- rows: contentRows,
108
- "data-testid": "ds-modal-slide"
109
- }, void 0, header && /*#__PURE__*/React__default["default"].cloneElement(header, {
110
- fullWidth
111
- }), header && (_DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx__default["default"](DSSeparator__default["default"], {
112
- position: "initial",
113
- type: "non-form"
114
- }))), /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
115
- style: {
116
- overflow: 'hidden'
117
- }
118
- }, void 0, /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
119
- style: {
120
- overflow: 'auto'
121
- }
122
- }, void 0, /*#__PURE__*/_jsx__default["default"](blocks.ActualContent, {}, void 0, children))), footer && (_DSSeparator2 || (_DSSeparator2 = /*#__PURE__*/_jsx__default["default"](DSSeparator__default["default"], {
123
- position: "initial",
124
- type: "non-form"
125
- }))), footer)))), container);
126
- };
127
-
128
- const props = {
129
- /**
130
- * If the modal slide is centered or not
131
- */
132
- centered: reactDesc.PropTypes.bool.description('If the modal slide is centered or not'),
133
-
134
- /**
135
- * If the modal slide is visible or not
136
- */
137
- isOpen: reactDesc.PropTypes.bool.description('If the modal slide is visible or not'),
138
-
139
- /**
140
- * Main content of the modal
141
- */
142
- children: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.element, reactDesc.PropTypes.string, reactDesc.PropTypes.any]).isRequired.description('Main content of the modal'),
143
-
144
- /**
145
- * If the modal slide takes the full width or not
146
- */
147
- fullWidth: reactDesc.PropTypes.bool.description('If the modal slide takes the full width or not'),
148
-
149
- /**
150
- * If the modal slide has a header, only available for full width option
151
- */
152
- header: reactDesc.PropTypes.element.description('If the modal slide has a header, only available for full width option'),
153
-
154
- /**
155
- * Ratio of fade out
156
- */
157
- fadeOut: reactDesc.PropTypes.number.description('Ratio of fade out'),
158
-
159
- /**
160
- * Ratio of fade in
161
- */
162
- fadeIn: reactDesc.PropTypes.number.description('Ratio of fade in'),
163
-
164
- /**
165
- * Override the panel height to scroll height of the container
166
- */
167
- overrideHeight: reactDesc.PropTypes.bool.description('Override the panel height to scroll height of the container')
168
- };
169
- const DSModalSlideWithSchema = reactDesc.describe(DSModalSlide);
170
- DSModalSlideWithSchema.propTypes = props;
171
-
172
- exports.ModalHeader = Header["default"];
173
- exports.ModalFooter = Footer["default"];
174
- exports.DSModalSlide = DSModalSlide;
175
- exports.DSModalSlideWithSchema = DSModalSlideWithSchema;
176
- exports["default"] = DSModalSlide;
@@ -1,101 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.filter.js');
6
- require('core-js/modules/esnext.iterator.constructor.js');
7
- require('core-js/modules/esnext.iterator.filter.js');
8
- require('core-js/modules/esnext.async-iterator.for-each.js');
9
- require('core-js/modules/esnext.iterator.for-each.js');
10
- var _jsx = require('@babel/runtime/helpers/jsx');
11
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
- require('react');
13
- var reactDesc = require('react-desc');
14
- var DSButton = require('@elliemae/ds-button');
15
- var blocks = require('./blocks.js');
16
- var jsxRuntime = require('react/jsx-runtime');
17
-
18
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
-
20
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
21
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
22
- var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
23
-
24
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
25
-
26
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
27
-
28
- const ModalFooter = _ref => {
29
- let {
30
- confirmLabel = 'Confirm',
31
- rejectLabel = 'Cancel',
32
- onConfirm,
33
- onReject,
34
- confirmProps = {
35
- disabled: false
36
- },
37
- rejectProps = {
38
- disabled: false
39
- }
40
- } = _ref;
41
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
42
- children: /*#__PURE__*/_jsx__default["default"](blocks.FooterWrapper, {}, void 0, !!onReject && /*#__PURE__*/jsxRuntime.jsx(DSButton__default["default"], _objectSpread({
43
- buttonType: "secondary",
44
- className: "action-reject",
45
- containerProps: {
46
- 'data-testid': 'modal-footer-reject-btn'
47
- },
48
- labelText: rejectLabel,
49
- onClick: onReject
50
- }, rejectProps)), !!onConfirm && /*#__PURE__*/jsxRuntime.jsx(DSButton__default["default"], _objectSpread({
51
- buttonType: "primary",
52
- className: "action-confirm",
53
- containerProps: {
54
- 'data-testid': 'modal-footer-confirm-btn'
55
- },
56
- labelText: confirmLabel,
57
- onClick: onConfirm
58
- }, confirmProps)))
59
- });
60
- };
61
-
62
- const props = {
63
- /**
64
- * Confirm Label
65
- */
66
- confirmLabel: reactDesc.PropTypes.string.description('Confirm Label'),
67
-
68
- /**
69
- * Reject Label
70
- */
71
- rejectLabel: reactDesc.PropTypes.string.description('Reject Label'),
72
-
73
- /**
74
- * Callback
75
- */
76
- onConfirm: reactDesc.PropTypes.func.description('Callback'),
77
-
78
- /**
79
- * Callback
80
- */
81
- onReject: reactDesc.PropTypes.func.description('Callback'),
82
-
83
- /**
84
- * Extra DSButton props for confirm btn.
85
- */
86
- confirmProps: reactDesc.PropTypes.shape({
87
- disabled: reactDesc.PropTypes.bool
88
- }).description('Extra DSButton props for confirm btn.'),
89
-
90
- /**
91
- * Extra DSButton props for reject btn.
92
- */
93
- rejectProps: reactDesc.PropTypes.shape({
94
- disabled: reactDesc.PropTypes.bool
95
- }).description('Extra DSButton props for reject btn.')
96
- };
97
- const DSModalSlideFooterWithSchema = reactDesc.describe(ModalFooter);
98
- DSModalSlideFooterWithSchema.propTypes = props;
99
-
100
- exports.DSModalSlideFooterWithSchema = DSModalSlideFooterWithSchema;
101
- exports["default"] = ModalFooter;
@@ -1,69 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- require('react');
7
- var reactDesc = require('react-desc');
8
- var styled = require('styled-components');
9
- var DSSeparator = require('@elliemae/ds-separator');
10
- var dsIcons = require('@elliemae/ds-icons');
11
- var DSButton = require('@elliemae/ds-button');
12
- var blocks = require('./blocks.js');
13
-
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
-
16
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
17
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
18
- var DSSeparator__default = /*#__PURE__*/_interopDefaultLegacy(DSSeparator);
19
- var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
20
-
21
- var _StyledSeparator, _Close;
22
-
23
- const ModalHeader = _ref => {
24
- let {
25
- title: headerTitle = '',
26
- onClose = () => null,
27
- toolbar = null
28
- } = _ref;
29
- return /*#__PURE__*/_jsx__default["default"](HeaderWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](blocks.HeaderLeftSide, {}, void 0, /*#__PURE__*/_jsx__default["default"](blocks.Header, {}, void 0, /*#__PURE__*/_jsx__default["default"](blocks.Title, {}, void 0, headerTitle))), toolbar, toolbar && (_StyledSeparator || (_StyledSeparator = /*#__PURE__*/_jsx__default["default"](StyledSeparator, {
30
- position: "initial",
31
- margin: "none",
32
- orientation: "vertical",
33
- type: "non-form"
34
- }))), /*#__PURE__*/_jsx__default["default"](StyledCloseButton, {
35
- "data-testid": "modal-slider-header-close",
36
- "aria-label": "Close modal slide",
37
- buttonType: "text",
38
- icon: _Close || (_Close = /*#__PURE__*/_jsx__default["default"](dsIcons.Close, {
39
- "aria-label": "Close modal slide",
40
- size: "s"
41
- })),
42
- onClick: onClose
43
- }));
44
- };
45
-
46
- const HeaderWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
47
- componentId: "sc-oxqqo8-0"
48
- })(["display:flex;justify-content:space-between;width:100%;align-items:center;"]);
49
- const StyledSeparator = /*#__PURE__*/styled__default["default"](DSSeparator__default["default"]).withConfig({
50
- componentId: "sc-oxqqo8-1"
51
- })(["padding:", " 0;"], props => props.theme.space.xs);
52
- const StyledCloseButton = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
53
- componentId: "sc-oxqqo8-2"
54
- })(["margin:", ";"], props => props.theme.space.xs);
55
- const props = {
56
- /** on modal close callback */
57
- onClose: reactDesc.PropTypes.func.description('on modal close callback'),
58
-
59
- /** modal toolbar component */
60
- toolbar: reactDesc.PropTypes.node.description('modal toolbar comoponent'),
61
-
62
- /** modal title */
63
- title: reactDesc.PropTypes.string.description('modal title')
64
- };
65
- const DSModalSlideHeaderWithSchema = reactDesc.describe(ModalHeader);
66
- DSModalSlideHeaderWithSchema.propTypes = props;
67
-
68
- exports.DSModalSlideHeaderWithSchema = DSModalSlideHeaderWithSchema;
69
- exports["default"] = ModalHeader;