@elliemae/ds-banner 2.2.0-alpha.4 → 3.0.0-next.2

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/styles.js CHANGED
@@ -1,107 +1,146 @@
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
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
6
+ var dsSystem = require('@elliemae/ds-system');
7
+ var DSButton = require('@elliemae/ds-button');
8
+ var styleHelpers = require('./utils/styleHelpers.js');
9
+
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
13
+ var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
14
+
15
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
16
+ const StyledBannerContainer = dsSystem.styled('div', {
17
+ name: 'DS-Banner',
18
+ slot: 'root'
19
+ })(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n overflow: hidden;\n height: ", ";\n ", ";\n"])), _ref => {
20
+ let {
21
+ isOpen
22
+ } = _ref;
23
+ return isOpen ? 'auto' : '0px';
24
+ }, _ref2 => {
25
+ let {
26
+ isAnimating,
27
+ isOpen,
28
+ height
29
+ } = _ref2;
30
+ return styleHelpers.handleAnimation(isAnimating, isOpen, height);
37
31
  });
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
32
+ const StyledInnerContainer = dsSystem.styled('div', {
33
+ name: 'DS-Banner',
34
+ slot: 'innerContainer'
35
+ })(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n padding-right: 6px;\n display: grid;\n align-items: center;\n min-height: 41px;\n width: 100%;\n background-color: ", ";\n border-bottom: 5px solid ", ";\n ", ";\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"])), _ref3 => {
36
+ let {
37
+ theme
38
+ } = _ref3;
39
+ return theme.colors.neutral['000'];
40
+ }, _ref4 => {
41
+ let {
42
+ type,
43
+ theme
44
+ } = _ref4;
45
+ return styleHelpers.handleBorderColor(type, theme);
46
+ }, _ref5 => {
47
+ let {
48
+ isAnimating,
49
+ isOpen
50
+ } = _ref5;
51
+ return styleHelpers.handleAnimation(isAnimating, isOpen);
52
+ });
53
+ const StyledIconContainer = dsSystem.styled('div', {
54
+ name: 'DS-Banner',
55
+ slot: 'iconContainer'
56
+ })(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default["default"](["\n margin-right: ", ";\n margin-left: ", ";\n"])), _ref6 => {
57
+ let {
58
+ theme
59
+ } = _ref6;
60
+ return theme.space.xxs;
61
+ }, _ref7 => {
62
+ let {
63
+ theme
64
+ } = _ref7;
65
+ return theme.space.xs;
66
+ });
67
+ const StyledTitle = dsSystem.styled('div', {
68
+ name: 'DS-Banner',
69
+ slot: 'title'
70
+ })(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral__default["default"](["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n"])), _ref8 => {
71
+ let {
72
+ theme
73
+ } = _ref8;
74
+ return theme.colors.neutral[700];
75
+ }, _ref9 => {
76
+ let {
77
+ theme
78
+ } = _ref9;
79
+ return theme.fontSizes.label[400];
80
+ }, _ref10 => {
81
+ let {
82
+ theme
83
+ } = _ref10;
84
+ return theme.fontWeights.semibold;
85
+ });
86
+ const StyledSubTitle = dsSystem.styled('div', {
87
+ name: 'DS-Banner',
88
+ slot: 'subtitle'
89
+ })(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default["default"](["\n width: 100%;\n margin-left: ", ";\n font-size: ", ";\n font-weight: ", ";\n"])), _ref11 => {
90
+ let {
91
+ theme
92
+ } = _ref11;
93
+ return theme.space.xs;
94
+ }, _ref12 => {
95
+ let {
96
+ theme
97
+ } = _ref12;
98
+ return theme.fontSizes.subTitle[400];
99
+ }, _ref13 => {
100
+ let {
101
+ theme
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;
@@ -1,40 +1,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 bannerTypes_exports = {};
29
- __export(bannerTypes_exports, {
30
- BANNER_TYPES: () => BANNER_TYPES
31
- });
32
- var React = __toESM(require("react"));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
33
5
  const BANNER_TYPES = {
34
- INFO: "info",
35
- SUCCESS: "success",
36
- WARNING: "warning",
37
- DANGER: "danger"
6
+ INFO: 'info',
7
+ SUCCESS: 'success',
8
+ WARNING: 'warning',
9
+ DANGER: 'danger'
38
10
  };
39
- module.exports = __toCommonJS(bannerTypes_exports);
40
- //# sourceMappingURL=bannerTypes.js.map
11
+
12
+ exports.BANNER_TYPES = BANNER_TYPES;
@@ -1,58 +1,36 @@
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");
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 dsIcons = require('@elliemae/ds-icons');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
12
+
35
13
  const icons = {
36
- success: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.SuccessFill, {
14
+ success: /*#__PURE__*/_jsx__default["default"](dsIcons.SuccessFill, {
37
15
  fill: "#207e56",
38
16
  width: "20px",
39
17
  height: "20px"
40
18
  }),
41
- info: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.InfoFill, {
19
+ info: /*#__PURE__*/_jsx__default["default"](dsIcons.InfoFill, {
42
20
  fill: "#1e79c2",
43
21
  width: "20px",
44
22
  height: "20px"
45
23
  }),
46
- danger: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.AlertsDetailFill, {
24
+ danger: /*#__PURE__*/_jsx__default["default"](dsIcons.AlertsDetailFill, {
47
25
  fill: "#c64252",
48
26
  width: "20px",
49
27
  height: "20px"
50
28
  }),
51
- warning: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.WarningSquare, {
29
+ warning: /*#__PURE__*/_jsx__default["default"](dsIcons.WarningSquare, {
52
30
  fill: "#d17a00",
53
31
  width: "20px",
54
32
  height: "20px"
55
33
  })
56
34
  };
57
- module.exports = __toCommonJS(icons_exports);
58
- //# sourceMappingURL=icons.js.map
35
+
36
+ exports.icons = icons;
@@ -1,99 +1,53 @@
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 }) => {
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
6
+ var dsSystem = require('@elliemae/ds-system');
7
+ var bannerTypes = require('./bannerTypes.js');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
12
+
13
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
14
+ const slideIn = dsSystem.kfrm(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n 0% {\n transform: translate3d(0, -100%, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n"])));
15
+ const slideOut = dsSystem.kfrm(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\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"])));
16
+
17
+ const spanContainer = height => dsSystem.kfrm(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default["default"](["\n 0% {\n height: 0px;\n }\n 100% {\n height: ", "px;\n }\n"])), height);
18
+
19
+ const shrinkContainer = height => dsSystem.kfrm(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral__default["default"](["\n 0% {\n height: ", "px;\n }\n 100% {\n height: 0px;\n }\n"])), height);
20
+
21
+ const handleBorderColor = (type, _ref) => {
22
+ let {
23
+ colors
24
+ } = _ref;
25
+
74
26
  switch (type) {
75
- case import_bannerTypes.BANNER_TYPES.SUCCESS:
27
+ case bannerTypes.BANNER_TYPES.SUCCESS:
76
28
  return colors.success[900];
77
- case import_bannerTypes.BANNER_TYPES.INFO:
29
+
30
+ case bannerTypes.BANNER_TYPES.INFO:
78
31
  return colors.brand[600];
79
- case import_bannerTypes.BANNER_TYPES.WARNING:
32
+
33
+ case bannerTypes.BANNER_TYPES.WARNING:
80
34
  return colors.warning[900];
81
- case import_bannerTypes.BANNER_TYPES.DANGER:
35
+
36
+ case bannerTypes.BANNER_TYPES.DANGER:
82
37
  return colors.danger[900];
83
38
  }
84
39
  };
85
- const handleAnimation = (isAnimating, isOpen, height = null) => {
40
+ const handleAnimation = function (isAnimating, isOpen) {
41
+ let height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
42
+
86
43
  if (isAnimating) {
87
44
  if (isOpen) {
88
- return import_ds_system.css`
89
- animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;
90
- `;
45
+ return dsSystem.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default["default"](["\n animation: ", " 0.5s ease-in;\n "])), height ? spanContainer(height) : slideIn);
91
46
  } else {
92
- return import_ds_system.css`
93
- animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;
94
- `;
47
+ return dsSystem.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default["default"](["\n animation: ", " 0.5s ease-in;\n "])), height ? shrinkContainer(height) : slideOut);
95
48
  }
96
49
  }
97
50
  };
98
- module.exports = __toCommonJS(styleHelpers_exports);
99
- //# sourceMappingURL=styleHelpers.js.map
51
+
52
+ exports.handleAnimation = handleAnimation;
53
+ exports.handleBorderColor = handleBorderColor;