@elliemae/ds-banner 2.2.0-next.6 → 2.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSBanner.js +113 -107
- package/cjs/DSBanner.js.map +7 -0
- package/cjs/defaultProps.js +39 -16
- package/cjs/defaultProps.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +37 -12
- package/cjs/index.js.map +7 -0
- package/cjs/propTypes.js +53 -22
- package/cjs/propTypes.js.map +7 -0
- package/cjs/styles.js +106 -145
- package/cjs/styles.js.map +7 -0
- package/cjs/utils/bannerTypes.js +38 -10
- package/cjs/utils/bannerTypes.js.map +7 -0
- package/cjs/utils/icons.js +40 -18
- package/cjs/utils/icons.js.map +7 -0
- package/cjs/utils/styleHelpers.js +86 -40
- package/cjs/utils/styleHelpers.js.map +7 -0
- package/esm/DSBanner.js +84 -88
- package/esm/DSBanner.js.map +7 -0
- package/esm/defaultProps.js +9 -11
- package/esm/defaultProps.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +8 -2
- package/esm/index.js.map +7 -0
- package/esm/propTypes.js +20 -14
- package/esm/propTypes.js.map +7 -0
- package/esm/styles.js +78 -131
- package/esm/styles.js.map +7 -0
- package/esm/utils/bannerTypes.js +9 -6
- package/esm/utils/bannerTypes.js.map +7 -0
- package/esm/utils/icons.js +11 -10
- package/esm/utils/icons.js.map +7 -0
- package/esm/utils/styleHelpers.js +53 -27
- package/esm/utils/styleHelpers.js.map +7 -0
- package/package.json +4 -4
- package/types/DSBanner.d.ts +2 -2
package/cjs/styles.js
CHANGED
|
@@ -1,146 +1,107 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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 styles_exports = {};
|
|
29
|
+
__export(styles_exports, {
|
|
30
|
+
StyledActionLink: () => StyledActionLink,
|
|
31
|
+
StyledBannerContainer: () => StyledBannerContainer,
|
|
32
|
+
StyledCloseButton: () => StyledCloseButton,
|
|
33
|
+
StyledIconContainer: () => StyledIconContainer,
|
|
34
|
+
StyledInnerContainer: () => StyledInnerContainer,
|
|
35
|
+
StyledSubTitle: () => StyledSubTitle,
|
|
36
|
+
StyledTitle: () => StyledTitle
|
|
31
37
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} = _ref13;
|
|
103
|
-
return theme.fontWeights.regular;
|
|
104
|
-
});
|
|
105
|
-
const StyledActionLink = dsSystem.styled('a', {
|
|
106
|
-
name: 'DS-Banner',
|
|
107
|
-
slot: 'action'
|
|
108
|
-
})(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default["default"](["\n margin-left: ", ";\n white-space: nowrap;\n text-decoration: none;\n line-height: 1.1;\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n"])), _ref14 => {
|
|
109
|
-
let {
|
|
110
|
-
theme,
|
|
111
|
-
isBodyEmpty
|
|
112
|
-
} = _ref14;
|
|
113
|
-
return isBodyEmpty ? theme.space.xs : 0;
|
|
114
|
-
}, _ref15 => {
|
|
115
|
-
let {
|
|
116
|
-
theme
|
|
117
|
-
} = _ref15;
|
|
118
|
-
return theme.fontSizes.hyperlink[400];
|
|
119
|
-
}, _ref16 => {
|
|
120
|
-
let {
|
|
121
|
-
theme
|
|
122
|
-
} = _ref16;
|
|
123
|
-
return theme.fontWeights.regular;
|
|
124
|
-
}, _ref17 => {
|
|
125
|
-
let {
|
|
126
|
-
theme
|
|
127
|
-
} = _ref17;
|
|
128
|
-
return theme.colors.brand[600];
|
|
129
|
-
});
|
|
130
|
-
const StyledCloseButton = dsSystem.styled(DSButton__default["default"], {
|
|
131
|
-
name: 'DS-Banner',
|
|
132
|
-
slot: 'closeButton'
|
|
133
|
-
})(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral__default["default"](["\n margin-left: ", ";\n &:not(focus) {\n border: transparent;\n }\n"])), _ref18 => {
|
|
134
|
-
let {
|
|
135
|
-
theme
|
|
136
|
-
} = _ref18;
|
|
137
|
-
return theme.space.xxs;
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
exports.StyledActionLink = StyledActionLink;
|
|
141
|
-
exports.StyledBannerContainer = StyledBannerContainer;
|
|
142
|
-
exports.StyledCloseButton = StyledCloseButton;
|
|
143
|
-
exports.StyledIconContainer = StyledIconContainer;
|
|
144
|
-
exports.StyledInnerContainer = StyledInnerContainer;
|
|
145
|
-
exports.StyledSubTitle = StyledSubTitle;
|
|
146
|
-
exports.StyledTitle = StyledTitle;
|
|
38
|
+
var React = __toESM(require("react"));
|
|
39
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
40
|
+
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
41
|
+
var import_styleHelpers = require("./utils/styleHelpers");
|
|
42
|
+
const StyledBannerContainer = (0, import_ds_system.styled)("div", { name: "DS-Banner", slot: "root" })`
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
height: ${({ isOpen }) => isOpen ? "auto" : "0px"};
|
|
45
|
+
${({ isAnimating, isOpen, height }) => (0, import_styleHelpers.handleAnimation)(isAnimating, isOpen, height)};
|
|
46
|
+
`;
|
|
47
|
+
const StyledInnerContainer = (0, import_ds_system.styled)("div", {
|
|
48
|
+
name: "DS-Banner",
|
|
49
|
+
slot: "innerContainer"
|
|
50
|
+
})`
|
|
51
|
+
padding-right: 6px;
|
|
52
|
+
display: grid;
|
|
53
|
+
align-items: center;
|
|
54
|
+
min-height: 41px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
background-color: ${({ theme }) => theme.colors.neutral["000"]};
|
|
57
|
+
border-bottom: 5px solid ${({ type, theme }) => (0, import_styleHelpers.handleBorderColor)(type, theme)};
|
|
58
|
+
${({ isAnimating, isOpen }) => (0, import_styleHelpers.handleAnimation)(isAnimating, isOpen)};
|
|
59
|
+
&:focus {
|
|
60
|
+
position: relative;
|
|
61
|
+
&:after {
|
|
62
|
+
content: '';
|
|
63
|
+
display: block;
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0;
|
|
66
|
+
left: 0;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
border-radius: 2px;
|
|
69
|
+
width: calc(100%);
|
|
70
|
+
border: 2px solid #1e79c2;
|
|
71
|
+
height: calc(100% + 4px);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
grid-template-columns: auto minmax(auto, auto) minmax(auto, 1fr) auto;
|
|
75
|
+
`;
|
|
76
|
+
const StyledIconContainer = (0, import_ds_system.styled)("div", { name: "DS-Banner", slot: "iconContainer" })`
|
|
77
|
+
margin-right: ${({ theme }) => theme.space.xxs};
|
|
78
|
+
margin-left: ${({ theme }) => theme.space.xs};
|
|
79
|
+
`;
|
|
80
|
+
const StyledTitle = (0, import_ds_system.styled)("div", { name: "DS-Banner", slot: "title" })`
|
|
81
|
+
color: ${({ theme }) => theme.colors.neutral[700]};
|
|
82
|
+
font-size: ${({ theme }) => theme.fontSizes.label[400]};
|
|
83
|
+
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
84
|
+
`;
|
|
85
|
+
const StyledSubTitle = (0, import_ds_system.styled)("div", { name: "DS-Banner", slot: "subtitle" })`
|
|
86
|
+
width: 100%;
|
|
87
|
+
margin-left: ${({ theme }) => theme.space.xs};
|
|
88
|
+
font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};
|
|
89
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
|
90
|
+
`;
|
|
91
|
+
const StyledActionLink = (0, import_ds_system.styled)("a", { name: "DS-Banner", slot: "action" })`
|
|
92
|
+
margin-left: ${({ theme, isBodyEmpty }) => isBodyEmpty ? theme.space.xs : 0};
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
line-height: 1.1;
|
|
96
|
+
font-size: ${({ theme }) => theme.fontSizes.hyperlink[400]};
|
|
97
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
|
98
|
+
color: ${({ theme }) => theme.colors.brand[600]};
|
|
99
|
+
`;
|
|
100
|
+
const StyledCloseButton = (0, import_ds_system.styled)(import_ds_button.default, { name: "DS-Banner", slot: "closeButton" })`
|
|
101
|
+
margin-left: ${({ theme }) => theme.space.xxs};
|
|
102
|
+
&:not(focus) {
|
|
103
|
+
border: transparent;
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
module.exports = __toCommonJS(styles_exports);
|
|
107
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport DSButton from '@elliemae/ds-button';\nimport type { StyledActionLinkT, StyledBannerContainerT, StyledInnerContainerT } from './index.d';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers';\n\nexport const StyledBannerContainer = styled<StyledBannerContainerT>('div', { name: 'DS-Banner', slot: 'root' })`\n overflow: hidden;\n height: ${({ isOpen }) => (isOpen ? 'auto' : '0px')};\n ${({ isAnimating, isOpen, height }) => handleAnimation(isAnimating, isOpen, height)};\n`;\n\nexport const StyledInnerContainer = styled<StyledInnerContainerT>('div', {\n name: 'DS-Banner',\n slot: 'innerContainer',\n})`\n padding-right: 6px;\n display: grid;\n align-items: center;\n min-height: 41px;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n border-bottom: 5px solid ${({ type, theme }) => handleBorderColor(type, theme)};\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n &:focus {\n position: relative;\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n border-radius: 2px;\n width: calc(100%);\n border: 2px solid #1e79c2;\n height: calc(100% + 4px);\n }\n }\n grid-template-columns: auto minmax(auto, auto) minmax(auto, 1fr) auto;\n`;\n\nexport const StyledIconContainer = styled('div', { name: 'DS-Banner', slot: 'iconContainer' })`\n margin-right: ${({ theme }) => theme.space.xxs};\n margin-left: ${({ theme }) => theme.space.xs};\n`;\n\nexport const StyledTitle = styled('div', { name: 'DS-Banner', slot: 'title' })`\n color: ${({ theme }) => theme.colors.neutral[700]};\n font-size: ${({ theme }) => theme.fontSizes.label[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n`;\n\nexport const StyledSubTitle = styled('div', { name: 'DS-Banner', slot: 'subtitle' })`\n width: 100%;\n margin-left: ${({ theme }) => theme.space.xs};\n font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n`;\n\nexport const StyledActionLink = styled<StyledActionLinkT>('a', { name: 'DS-Banner', slot: 'action' })`\n margin-left: ${({ theme, isBodyEmpty }) => (isBodyEmpty ? theme.space.xs : 0)};\n white-space: nowrap;\n text-decoration: none;\n line-height: 1.1;\n font-size: ${({ theme }) => theme.fontSizes.hyperlink[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme }) => theme.colors.brand[600]};\n`;\n\nexport const StyledCloseButton = styled(DSButton, { name: 'DS-Banner', slot: 'closeButton' })`\n margin-left: ${({ theme }) => theme.space.xxs};\n &:not(focus) {\n border: transparent;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,uBAAqB;AAErB,0BAAmD;AAE5C,MAAM,wBAAwB,6BAA+B,OAAO,EAAE,MAAM,aAAa,MAAM;AAAA;AAAA,YAE1F,CAAC,EAAE,aAAc,SAAS,SAAS;AAAA,IAC3C,CAAC,EAAE,aAAa,QAAQ,aAAa,yCAAgB,aAAa,QAAQ;AAAA;AAGvE,MAAM,uBAAuB,6BAA8B,OAAO;AAAA,EACvE,MAAM;AAAA,EACN,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAOc,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,6BAC7B,CAAC,EAAE,MAAM,YAAY,2CAAkB,MAAM;AAAA,IACtE,CAAC,EAAE,aAAa,aAAa,yCAAgB,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBvD,MAAM,sBAAsB,6BAAO,OAAO,EAAE,MAAM,aAAa,MAAM;AAAA,kBAC1D,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,iBAC5B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAGrC,MAAM,cAAc,6BAAO,OAAO,EAAE,MAAM,aAAa,MAAM;AAAA,WACzD,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,eAChC,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA,iBACnC,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA;AAG3C,MAAM,iBAAiB,6BAAO,OAAO,EAAE,MAAM,aAAa,MAAM;AAAA;AAAA,iBAEtD,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,eAC7B,CAAC,EAAE,YAAY,MAAM,UAAU,SAAS;AAAA,iBACtC,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA;AAG3C,MAAM,mBAAmB,6BAA0B,KAAK,EAAE,MAAM,aAAa,MAAM;AAAA,iBACzE,CAAC,EAAE,OAAO,kBAAmB,cAAc,MAAM,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,eAI9D,CAAC,EAAE,YAAY,MAAM,UAAU,UAAU;AAAA,iBACvC,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA,WACvC,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAGtC,MAAM,oBAAoB,6BAAO,0BAAU,EAAE,MAAM,aAAa,MAAM;AAAA,iBAC5D,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/utils/bannerTypes.js
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 bannerTypes_exports = {};
|
|
29
|
+
__export(bannerTypes_exports, {
|
|
30
|
+
BANNER_TYPES: () => BANNER_TYPES
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
5
33
|
const BANNER_TYPES = {
|
|
6
|
-
INFO:
|
|
7
|
-
SUCCESS:
|
|
8
|
-
WARNING:
|
|
9
|
-
DANGER:
|
|
34
|
+
INFO: "info",
|
|
35
|
+
SUCCESS: "success",
|
|
36
|
+
WARNING: "warning",
|
|
37
|
+
DANGER: "danger"
|
|
10
38
|
};
|
|
11
|
-
|
|
12
|
-
|
|
39
|
+
module.exports = __toCommonJS(bannerTypes_exports);
|
|
40
|
+
//# sourceMappingURL=bannerTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utils/bannerTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const BANNER_TYPES = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n} as const;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/utils/icons.js
CHANGED
|
@@ -1,36 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 icons_exports = {};
|
|
29
|
+
__export(icons_exports, {
|
|
30
|
+
icons: () => icons
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
13
35
|
const icons = {
|
|
14
|
-
success:
|
|
36
|
+
success: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.SuccessFill, {
|
|
15
37
|
fill: "#207e56",
|
|
16
38
|
width: "20px",
|
|
17
39
|
height: "20px"
|
|
18
40
|
}),
|
|
19
|
-
info:
|
|
41
|
+
info: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.InfoFill, {
|
|
20
42
|
fill: "#1e79c2",
|
|
21
43
|
width: "20px",
|
|
22
44
|
height: "20px"
|
|
23
45
|
}),
|
|
24
|
-
danger:
|
|
46
|
+
danger: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.AlertsDetailFill, {
|
|
25
47
|
fill: "#c64252",
|
|
26
48
|
width: "20px",
|
|
27
49
|
height: "20px"
|
|
28
50
|
}),
|
|
29
|
-
warning:
|
|
51
|
+
warning: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.WarningSquare, {
|
|
30
52
|
fill: "#d17a00",
|
|
31
53
|
width: "20px",
|
|
32
54
|
height: "20px"
|
|
33
55
|
})
|
|
34
56
|
};
|
|
35
|
-
|
|
36
|
-
|
|
57
|
+
module.exports = __toCommonJS(icons_exports);
|
|
58
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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 = {\n success: <SuccessFill fill=\"#207e56\" width=\"20px\" height=\"20px\" />,\n info: <InfoFill fill=\"#1e79c2\" width=\"20px\" height=\"20px\" />,\n danger: <AlertsDetailFill fill=\"#c64252\" width=\"20px\" height=\"20px\" />,\n warning: <WarningSquare fill=\"#d17a00\" width=\"20px\" height=\"20px\" />,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,sBAAuE;AAEhE,MAAM,QAAQ;AAAA,EACnB,SAAS,mDAAC,6BAAD;AAAA,IAAa,MAAK;AAAA,IAAU,OAAM;AAAA,IAAO,QAAO;AAAA;AAAA,EACzD,MAAM,mDAAC,0BAAD;AAAA,IAAU,MAAK;AAAA,IAAU,OAAM;AAAA,IAAO,QAAO;AAAA;AAAA,EACnD,QAAQ,mDAAC,kCAAD;AAAA,IAAkB,MAAK;AAAA,IAAU,OAAM;AAAA,IAAO,QAAO;AAAA;AAAA,EAC7D,SAAS,mDAAC,+BAAD;AAAA,IAAe,MAAK;AAAA,IAAU,OAAM;AAAA,IAAO,QAAO;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,53 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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 styleHelpers_exports = {};
|
|
29
|
+
__export(styleHelpers_exports, {
|
|
30
|
+
handleAnimation: () => handleAnimation,
|
|
31
|
+
handleBorderColor: () => handleBorderColor
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
35
|
+
var import_bannerTypes = require("./bannerTypes");
|
|
36
|
+
const slideIn = import_ds_system.kfrm`
|
|
37
|
+
0% {
|
|
38
|
+
transform: translate3d(0, -100%, 0);
|
|
39
|
+
}
|
|
40
|
+
100% {
|
|
41
|
+
transform: translate3d(0, 0, 0);
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
const slideOut = import_ds_system.kfrm`
|
|
45
|
+
0% {
|
|
46
|
+
transform: translate3d(0, 0, 0);
|
|
47
|
+
opacity: 1;
|
|
48
|
+
}
|
|
49
|
+
60% {
|
|
50
|
+
opacity: 0;
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transform: translate3d(0, -100%, 0);
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
const spanContainer = (height) => import_ds_system.kfrm`
|
|
58
|
+
0% {
|
|
59
|
+
height: 0px;
|
|
60
|
+
}
|
|
61
|
+
100% {
|
|
62
|
+
height: ${height}px;
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
const shrinkContainer = (height) => import_ds_system.kfrm`
|
|
66
|
+
0% {
|
|
67
|
+
height: ${height}px;
|
|
68
|
+
}
|
|
69
|
+
100% {
|
|
70
|
+
height: 0px;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
const handleBorderColor = (type, { colors }) => {
|
|
26
74
|
switch (type) {
|
|
27
|
-
case
|
|
75
|
+
case import_bannerTypes.BANNER_TYPES.SUCCESS:
|
|
28
76
|
return colors.success[900];
|
|
29
|
-
|
|
30
|
-
case bannerTypes.BANNER_TYPES.INFO:
|
|
77
|
+
case import_bannerTypes.BANNER_TYPES.INFO:
|
|
31
78
|
return colors.brand[600];
|
|
32
|
-
|
|
33
|
-
case bannerTypes.BANNER_TYPES.WARNING:
|
|
79
|
+
case import_bannerTypes.BANNER_TYPES.WARNING:
|
|
34
80
|
return colors.warning[900];
|
|
35
|
-
|
|
36
|
-
case bannerTypes.BANNER_TYPES.DANGER:
|
|
81
|
+
case import_bannerTypes.BANNER_TYPES.DANGER:
|
|
37
82
|
return colors.danger[900];
|
|
38
83
|
}
|
|
39
84
|
};
|
|
40
|
-
const handleAnimation =
|
|
41
|
-
let height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
42
|
-
|
|
85
|
+
const handleAnimation = (isAnimating, isOpen, height = null) => {
|
|
43
86
|
if (isAnimating) {
|
|
44
87
|
if (isOpen) {
|
|
45
|
-
return
|
|
88
|
+
return import_ds_system.css`
|
|
89
|
+
animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;
|
|
90
|
+
`;
|
|
46
91
|
} else {
|
|
47
|
-
return
|
|
92
|
+
return import_ds_system.css`
|
|
93
|
+
animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;
|
|
94
|
+
`;
|
|
48
95
|
}
|
|
49
96
|
}
|
|
50
97
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
exports.handleBorderColor = handleBorderColor;
|
|
98
|
+
module.exports = __toCommonJS(styleHelpers_exports);
|
|
99
|
+
//# sourceMappingURL=styleHelpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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 'styled-components';\nimport { BANNER_TYPES } from './bannerTypes';\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 = (type, { colors }): 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 }\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 } else {\n return css`\n animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;\n `;\n }\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA0B;AAE1B,yBAA6B;AAE7B,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;AAAA;AAAA;AAId,MAAM,kBAAkB,CAAC,WAAmB;AAAA;AAAA,cAE9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAOP,MAAM,oBAAoB,CAAC,MAAM,EAAE,aAAqB;AAC7D,UAAQ;AAAA,SACD,gCAAa;AAChB,aAAO,OAAO,QAAQ;AAAA,SACnB,gCAAa;AAChB,aAAO,OAAO,MAAM;AAAA,SACjB,gCAAa;AAChB,aAAO,OAAO,QAAQ;AAAA,SACnB,gCAAa;AAChB,aAAO,OAAO,OAAO;AAAA;AAAA;AAIpB,MAAM,kBAAkB,CAC7B,aACA,QACA,SAAwB,SACO;AAC/B,MAAI,aAAa;AACf,QAAI,QAAQ;AACV,aAAO;AAAA,qBACQ,SAAS,cAAc,UAAU;AAAA;AAAA,WAE3C;AACL,aAAO;AAAA,qBACQ,SAAS,gBAAgB,UAAU;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|