@elliemae/ds-banner 3.53.0-alpha.1 → 3.53.0-alpha.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.
- package/dist/cjs/DSBanner.js +121 -108
- package/dist/cjs/DSBanner.js.map +3 -3
- package/dist/cjs/DSBannerContent.js +101 -0
- package/dist/cjs/DSBannerContent.js.map +7 -0
- package/dist/cjs/exported-related/index.js +5 -1
- package/dist/cjs/exported-related/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +7 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styles.js +70 -27
- package/dist/cjs/styles.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-banner-valid.js +12 -4
- package/dist/cjs/typescript-testing/typescript-banner-valid.js.map +2 -2
- package/dist/esm/DSBanner.js +126 -115
- package/dist/esm/DSBanner.js.map +2 -2
- package/dist/esm/DSBannerContent.js +71 -0
- package/dist/esm/DSBannerContent.js.map +7 -0
- package/dist/esm/exported-related/index.js +5 -1
- package/dist/esm/exported-related/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +14 -4
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styles.js +70 -27
- package/dist/esm/styles.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-banner-valid.js +12 -4
- package/dist/esm/typescript-testing/typescript-banner-valid.js.map +2 -2
- package/dist/types/DSBannerContent.d.ts +8 -0
- package/dist/types/exported-related/index.d.ts +5 -0
- package/dist/types/react-desc-prop-types.d.ts +5 -3
- package/dist/types/styles.d.ts +9 -11
- package/package.json +10 -9
- package/dist/cjs/utils/icons.js +0 -43
- package/dist/cjs/utils/icons.js.map +0 -7
- package/dist/cjs/utils/styleHelpers.js +0 -102
- package/dist/cjs/utils/styleHelpers.js.map +0 -7
- package/dist/esm/utils/icons.js +0 -13
- package/dist/esm/utils/icons.js.map +0 -7
- package/dist/esm/utils/styleHelpers.js +0 -72
- package/dist/esm/utils/styleHelpers.js.map +0 -7
- package/dist/types/utils/icons.d.ts +0 -2
- package/dist/types/utils/styleHelpers.d.ts +0 -6
package/dist/cjs/utils/icons.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var icons_exports = {};
|
|
30
|
-
__export(icons_exports, {
|
|
31
|
-
icons: () => icons
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(icons_exports);
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
|
-
const icons = {
|
|
38
|
-
success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.SuccessFill, { color: ["success", "900"], width: "20px", height: "20px" }),
|
|
39
|
-
info: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.InfoFill, { color: ["brand-primary", "600"], width: "20px", height: "20px" }),
|
|
40
|
-
danger: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.AlertsDetailFill, { color: ["danger", "900"], width: "20px", height: "20px" }),
|
|
41
|
-
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.WarningSquare, { color: ["warning", "900"], width: "20px", height: "20px" })
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=icons.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/utils/icons.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { AlertsDetailFill, InfoFill, SuccessFill, WarningSquare } from '@elliemae/ds-icons';\n\nexport const icons: Record<string, JSX.Element> = {\n success: <SuccessFill color={['success', '900']} width=\"20px\" height=\"20px\" />,\n info: <InfoFill color={['brand-primary', '600']} width=\"20px\" height=\"20px\" />,\n danger: <AlertsDetailFill color={['danger', '900']} width=\"20px\" height=\"20px\" />,\n warning: <WarningSquare color={['warning', '900']} width=\"20px\" height=\"20px\" />,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIZ;AAHX,sBAAuE;AAEhE,MAAM,QAAqC;AAAA,EAChD,SAAS,4CAAC,+BAAY,OAAO,CAAC,WAAW,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAAA,EAC5E,MAAM,4CAAC,4BAAS,OAAO,CAAC,iBAAiB,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAAA,EAC5E,QAAQ,4CAAC,oCAAiB,OAAO,CAAC,UAAU,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAAA,EAC/E,SAAS,4CAAC,iCAAc,OAAO,CAAC,WAAW,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAChF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var styleHelpers_exports = {};
|
|
30
|
-
__export(styleHelpers_exports, {
|
|
31
|
-
handleAnimation: () => handleAnimation,
|
|
32
|
-
handleBorderColor: () => handleBorderColor
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(styleHelpers_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_ds_system = require("@elliemae/ds-system");
|
|
37
|
-
var import_exported_related = require("../exported-related/index.js");
|
|
38
|
-
const slideIn = import_ds_system.kfrm`
|
|
39
|
-
0% {
|
|
40
|
-
transform: translate3d(0, -100%, 0);
|
|
41
|
-
}
|
|
42
|
-
100% {
|
|
43
|
-
transform: translate3d(0, 0, 0);
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
const slideOut = import_ds_system.kfrm`
|
|
47
|
-
0% {
|
|
48
|
-
transform: translate3d(0, 0, 0);
|
|
49
|
-
opacity: 1;
|
|
50
|
-
}
|
|
51
|
-
60% {
|
|
52
|
-
opacity: 0;
|
|
53
|
-
}
|
|
54
|
-
100% {
|
|
55
|
-
opacity: 0;
|
|
56
|
-
transform: translate3d(0, -100%, 0);
|
|
57
|
-
}
|
|
58
|
-
`;
|
|
59
|
-
const spanContainer = (height) => import_ds_system.kfrm`
|
|
60
|
-
0% {
|
|
61
|
-
height: 0px;
|
|
62
|
-
}
|
|
63
|
-
100% {
|
|
64
|
-
height: ${height}px;
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
const shrinkContainer = (height) => import_ds_system.kfrm`
|
|
68
|
-
0% {
|
|
69
|
-
height: ${height}px;
|
|
70
|
-
}
|
|
71
|
-
100% {
|
|
72
|
-
height: 0px;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
75
|
-
const handleBorderColor = (type, { colors }) => {
|
|
76
|
-
switch (type) {
|
|
77
|
-
case import_exported_related.BANNER_TYPES.SUCCESS:
|
|
78
|
-
return colors.success[900];
|
|
79
|
-
case import_exported_related.BANNER_TYPES.INFO:
|
|
80
|
-
return colors.brand[600];
|
|
81
|
-
case import_exported_related.BANNER_TYPES.WARNING:
|
|
82
|
-
return colors.warning[900];
|
|
83
|
-
case import_exported_related.BANNER_TYPES.DANGER:
|
|
84
|
-
return colors.danger[900];
|
|
85
|
-
default:
|
|
86
|
-
return "should_not_happen";
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
const handleAnimation = (isAnimating, isOpen, height = null) => {
|
|
90
|
-
if (isAnimating) {
|
|
91
|
-
if (isOpen) {
|
|
92
|
-
return import_ds_system.css`
|
|
93
|
-
animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;
|
|
94
|
-
`;
|
|
95
|
-
}
|
|
96
|
-
return import_ds_system.css`
|
|
97
|
-
animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;
|
|
98
|
-
`;
|
|
99
|
-
}
|
|
100
|
-
return import_ds_system.css``;
|
|
101
|
-
};
|
|
102
|
-
//# sourceMappingURL=styleHelpers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/utils/styleHelpers.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { kfrm, css } from '@elliemae/ds-system';\nimport type { FlattenSimpleInterpolation } from '@elliemae/ds-system';\nimport { BANNER_TYPES } from '../exported-related/index.js';\nimport type { DSBannerT } from '../react-desc-prop-types.js';\n\nconst slideIn = kfrm`\n 0% {\n transform: translate3d(0, -100%, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n`;\n\nconst slideOut = kfrm`\n 0% {\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n 60% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n transform: translate3d(0, -100%, 0);\n }\n`;\n\nconst spanContainer = (height: number) => kfrm`\n 0% {\n height: 0px;\n }\n 100% {\n height: ${height}px;\n }\n`;\n\nconst shrinkContainer = (height: number) => kfrm`\n 0% {\n height: ${height}px;\n }\n 100% {\n height: 0px;\n }\n`;\n\nexport const handleBorderColor = (\n type: DSBannerT.BannerTypesT,\n { colors }: { colors: Record<string, Record<string, string>> },\n): string => {\n switch (type) {\n case BANNER_TYPES.SUCCESS:\n return colors.success[900];\n case BANNER_TYPES.INFO:\n return colors.brand[600];\n case BANNER_TYPES.WARNING:\n return colors.warning[900];\n case BANNER_TYPES.DANGER:\n return colors.danger[900];\n default:\n return 'should_not_happen';\n }\n};\n\nexport const handleAnimation = (\n isAnimating: boolean,\n isOpen: boolean,\n height: number | null = null,\n): FlattenSimpleInterpolation => {\n if (isAnimating) {\n if (isOpen) {\n return css`\n animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;\n `;\n }\n return css`\n animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;\n `;\n }\n return css``;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA0B;AAE1B,8BAA6B;AAG7B,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAShB,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcjB,MAAM,gBAAgB,CAAC,WAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,cAK5B,MAAM;AAAA;AAAA;AAIpB,MAAM,kBAAkB,CAAC,WAAmB;AAAA;AAAA,cAE9B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAOb,MAAM,oBAAoB,CAC/B,MACA,EAAE,OAAO,MACE;AACX,UAAQ,MAAM;AAAA,IACZ,KAAK,qCAAa;AAChB,aAAO,OAAO,QAAQ,GAAG;AAAA,IAC3B,KAAK,qCAAa;AAChB,aAAO,OAAO,MAAM,GAAG;AAAA,IACzB,KAAK,qCAAa;AAChB,aAAO,OAAO,QAAQ,GAAG;AAAA,IAC3B,KAAK,qCAAa;AAChB,aAAO,OAAO,OAAO,GAAG;AAAA,IAC1B;AACE,aAAO;AAAA,EACX;AACF;AAEO,MAAM,kBAAkB,CAC7B,aACA,QACA,SAAwB,SACO;AAC/B,MAAI,aAAa;AACf,QAAI,QAAQ;AACV,aAAO;AAAA,qBACQ,SAAS,cAAc,MAAM,IAAI,OAAO;AAAA;AAAA,IAEzD;AACA,WAAO;AAAA,mBACQ,SAAS,gBAAgB,MAAM,IAAI,QAAQ;AAAA;AAAA,EAE5D;AACA,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/utils/icons.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { AlertsDetailFill, InfoFill, SuccessFill, WarningSquare } from "@elliemae/ds-icons";
|
|
4
|
-
const icons = {
|
|
5
|
-
success: /* @__PURE__ */ jsx(SuccessFill, { color: ["success", "900"], width: "20px", height: "20px" }),
|
|
6
|
-
info: /* @__PURE__ */ jsx(InfoFill, { color: ["brand-primary", "600"], width: "20px", height: "20px" }),
|
|
7
|
-
danger: /* @__PURE__ */ jsx(AlertsDetailFill, { color: ["danger", "900"], width: "20px", height: "20px" }),
|
|
8
|
-
warning: /* @__PURE__ */ jsx(WarningSquare, { color: ["warning", "900"], width: "20px", height: "20px" })
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
icons
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=icons.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/icons.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { AlertsDetailFill, InfoFill, SuccessFill, WarningSquare } from '@elliemae/ds-icons';\n\nexport const icons: Record<string, JSX.Element> = {\n success: <SuccessFill color={['success', '900']} width=\"20px\" height=\"20px\" />,\n info: <InfoFill color={['brand-primary', '600']} width=\"20px\" height=\"20px\" />,\n danger: <AlertsDetailFill color={['danger', '900']} width=\"20px\" height=\"20px\" />,\n warning: <WarningSquare color={['warning', '900']} width=\"20px\" height=\"20px\" />,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACIZ;AAHX,SAAS,kBAAkB,UAAU,aAAa,qBAAqB;AAEhE,MAAM,QAAqC;AAAA,EAChD,SAAS,oBAAC,eAAY,OAAO,CAAC,WAAW,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAAA,EAC5E,MAAM,oBAAC,YAAS,OAAO,CAAC,iBAAiB,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAAA,EAC5E,QAAQ,oBAAC,oBAAiB,OAAO,CAAC,UAAU,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAAA,EAC/E,SAAS,oBAAC,iBAAc,OAAO,CAAC,WAAW,KAAK,GAAG,OAAM,QAAO,QAAO,QAAO;AAChF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { kfrm, css } from "@elliemae/ds-system";
|
|
3
|
-
import { BANNER_TYPES } from "../exported-related/index.js";
|
|
4
|
-
const slideIn = kfrm`
|
|
5
|
-
0% {
|
|
6
|
-
transform: translate3d(0, -100%, 0);
|
|
7
|
-
}
|
|
8
|
-
100% {
|
|
9
|
-
transform: translate3d(0, 0, 0);
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
const slideOut = kfrm`
|
|
13
|
-
0% {
|
|
14
|
-
transform: translate3d(0, 0, 0);
|
|
15
|
-
opacity: 1;
|
|
16
|
-
}
|
|
17
|
-
60% {
|
|
18
|
-
opacity: 0;
|
|
19
|
-
}
|
|
20
|
-
100% {
|
|
21
|
-
opacity: 0;
|
|
22
|
-
transform: translate3d(0, -100%, 0);
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
const spanContainer = (height) => kfrm`
|
|
26
|
-
0% {
|
|
27
|
-
height: 0px;
|
|
28
|
-
}
|
|
29
|
-
100% {
|
|
30
|
-
height: ${height}px;
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
const shrinkContainer = (height) => kfrm`
|
|
34
|
-
0% {
|
|
35
|
-
height: ${height}px;
|
|
36
|
-
}
|
|
37
|
-
100% {
|
|
38
|
-
height: 0px;
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
41
|
-
const handleBorderColor = (type, { colors }) => {
|
|
42
|
-
switch (type) {
|
|
43
|
-
case BANNER_TYPES.SUCCESS:
|
|
44
|
-
return colors.success[900];
|
|
45
|
-
case BANNER_TYPES.INFO:
|
|
46
|
-
return colors.brand[600];
|
|
47
|
-
case BANNER_TYPES.WARNING:
|
|
48
|
-
return colors.warning[900];
|
|
49
|
-
case BANNER_TYPES.DANGER:
|
|
50
|
-
return colors.danger[900];
|
|
51
|
-
default:
|
|
52
|
-
return "should_not_happen";
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
const handleAnimation = (isAnimating, isOpen, height = null) => {
|
|
56
|
-
if (isAnimating) {
|
|
57
|
-
if (isOpen) {
|
|
58
|
-
return css`
|
|
59
|
-
animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;
|
|
60
|
-
`;
|
|
61
|
-
}
|
|
62
|
-
return css`
|
|
63
|
-
animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
return css``;
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
handleAnimation,
|
|
70
|
-
handleBorderColor
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=styleHelpers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/styleHelpers.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { kfrm, css } from '@elliemae/ds-system';\nimport type { FlattenSimpleInterpolation } from '@elliemae/ds-system';\nimport { BANNER_TYPES } from '../exported-related/index.js';\nimport type { DSBannerT } from '../react-desc-prop-types.js';\n\nconst slideIn = kfrm`\n 0% {\n transform: translate3d(0, -100%, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n`;\n\nconst slideOut = kfrm`\n 0% {\n transform: translate3d(0, 0, 0);\n opacity: 1;\n }\n 60% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n transform: translate3d(0, -100%, 0);\n }\n`;\n\nconst spanContainer = (height: number) => kfrm`\n 0% {\n height: 0px;\n }\n 100% {\n height: ${height}px;\n }\n`;\n\nconst shrinkContainer = (height: number) => kfrm`\n 0% {\n height: ${height}px;\n }\n 100% {\n height: 0px;\n }\n`;\n\nexport const handleBorderColor = (\n type: DSBannerT.BannerTypesT,\n { colors }: { colors: Record<string, Record<string, string>> },\n): string => {\n switch (type) {\n case BANNER_TYPES.SUCCESS:\n return colors.success[900];\n case BANNER_TYPES.INFO:\n return colors.brand[600];\n case BANNER_TYPES.WARNING:\n return colors.warning[900];\n case BANNER_TYPES.DANGER:\n return colors.danger[900];\n default:\n return 'should_not_happen';\n }\n};\n\nexport const handleAnimation = (\n isAnimating: boolean,\n isOpen: boolean,\n height: number | null = null,\n): FlattenSimpleInterpolation => {\n if (isAnimating) {\n if (isOpen) {\n return css`\n animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;\n `;\n }\n return css`\n animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;\n `;\n }\n return css``;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,MAAM,WAAW;AAE1B,SAAS,oBAAoB;AAG7B,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAShB,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcjB,MAAM,gBAAgB,CAAC,WAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,cAK5B,MAAM;AAAA;AAAA;AAIpB,MAAM,kBAAkB,CAAC,WAAmB;AAAA;AAAA,cAE9B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAOb,MAAM,oBAAoB,CAC/B,MACA,EAAE,OAAO,MACE;AACX,UAAQ,MAAM;AAAA,IACZ,KAAK,aAAa;AAChB,aAAO,OAAO,QAAQ,GAAG;AAAA,IAC3B,KAAK,aAAa;AAChB,aAAO,OAAO,MAAM,GAAG;AAAA,IACzB,KAAK,aAAa;AAChB,aAAO,OAAO,QAAQ,GAAG;AAAA,IAC3B,KAAK,aAAa;AAChB,aAAO,OAAO,OAAO,GAAG;AAAA,IAC1B;AACE,aAAO;AAAA,EACX;AACF;AAEO,MAAM,kBAAkB,CAC7B,aACA,QACA,SAAwB,SACO;AAC/B,MAAI,aAAa;AACf,QAAI,QAAQ;AACV,aAAO;AAAA,qBACQ,SAAS,cAAc,MAAM,IAAI,OAAO;AAAA;AAAA,IAEzD;AACA,WAAO;AAAA,mBACQ,SAAS,gBAAgB,MAAM,IAAI,QAAQ;AAAA;AAAA,EAE5D;AACA,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { FlattenSimpleInterpolation } from '@elliemae/ds-system';
|
|
2
|
-
import type { DSBannerT } from '../react-desc-prop-types.js';
|
|
3
|
-
export declare const handleBorderColor: (type: DSBannerT.BannerTypesT, { colors }: {
|
|
4
|
-
colors: Record<string, Record<string, string>>;
|
|
5
|
-
}) => string;
|
|
6
|
-
export declare const handleAnimation: (isAnimating: boolean, isOpen: boolean, height?: number | null) => FlattenSimpleInterpolation;
|