@elliemae/ds-banner 2.0.0-alpha.10 → 2.0.0-alpha.11
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 +1 -0
- package/cjs/utils/styleHelpers.js +12 -43
- package/esm/DSBanner.js +1 -0
- package/esm/utils/styleHelpers.js +8 -43
- package/package.json +3 -3
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
package/cjs/DSBanner.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
8
|
var react = require('react');
|
|
8
9
|
var CloseX = require('@elliemae/ds-icons/CloseX');
|
|
9
10
|
var reactDesc = require('react-desc');
|
|
@@ -2,48 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
5
6
|
var dsSystem = require('@elliemae/ds-system');
|
|
6
7
|
var bannerTypes = require('./bannerTypes.js');
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
0% {
|
|
10
|
-
transform: translate3d(0, -100%, 0);
|
|
11
|
-
}
|
|
12
|
-
100% {
|
|
13
|
-
transform: translate3d(0, 0, 0);
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
const slideOut = dsSystem.kfrm`
|
|
17
|
-
0% {
|
|
18
|
-
transform: translate3d(0, 0, 0);
|
|
19
|
-
opacity: 1;
|
|
20
|
-
}
|
|
21
|
-
60% {
|
|
22
|
-
opacity: 0;
|
|
23
|
-
}
|
|
24
|
-
100% {
|
|
25
|
-
opacity: 0;
|
|
26
|
-
transform: translate3d(0, -100%, 0);
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
29
10
|
|
|
30
|
-
|
|
31
|
-
0% {
|
|
32
|
-
height: 0px;
|
|
33
|
-
}
|
|
34
|
-
100% {
|
|
35
|
-
height: ${height}px;
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
11
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
38
12
|
|
|
39
|
-
|
|
40
|
-
0% {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
100% {
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
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);
|
|
47
20
|
|
|
48
21
|
const handleBorderColor = (type, {
|
|
49
22
|
colors
|
|
@@ -65,13 +38,9 @@ const handleBorderColor = (type, {
|
|
|
65
38
|
const handleAnimation = (isAnimating, isOpen, height = null) => {
|
|
66
39
|
if (isAnimating) {
|
|
67
40
|
if (isOpen) {
|
|
68
|
-
return dsSystem.css
|
|
69
|
-
animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;
|
|
70
|
-
`;
|
|
41
|
+
return dsSystem.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default["default"](["\n animation: ", " 0.5s ease-in;\n "])), height ? spanContainer(height) : slideIn);
|
|
71
42
|
} else {
|
|
72
|
-
return dsSystem.css
|
|
73
|
-
animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;
|
|
74
|
-
`;
|
|
43
|
+
return dsSystem.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default["default"](["\n animation: ", " 0.5s ease-in;\n "])), height ? shrinkContainer(height) : slideOut);
|
|
75
44
|
}
|
|
76
45
|
}
|
|
77
46
|
};
|
package/esm/DSBanner.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
4
|
import { useRef, useState, useEffect, useLayoutEffect, useCallback } from 'react';
|
|
4
5
|
import CloseX from '@elliemae/ds-icons/CloseX';
|
|
5
6
|
import { describe } from 'react-desc';
|
|
@@ -1,45 +1,14 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
1
2
|
import { kfrm, css } from '@elliemae/ds-system';
|
|
2
3
|
import { BANNER_TYPES } from './bannerTypes.js';
|
|
3
4
|
|
|
4
|
-
|
|
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
|
-
`;
|
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
6
|
+
const slideIn = kfrm(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: translate3d(0, -100%, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n"])));
|
|
7
|
+
const slideOut = kfrm(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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"])));
|
|
25
8
|
|
|
26
|
-
const spanContainer = height => kfrm
|
|
27
|
-
0% {
|
|
28
|
-
height: 0px;
|
|
29
|
-
}
|
|
30
|
-
100% {
|
|
31
|
-
height: ${height}px;
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
9
|
+
const spanContainer = height => kfrm(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n height: 0px;\n }\n 100% {\n height: ", "px;\n }\n"])), height);
|
|
34
10
|
|
|
35
|
-
const shrinkContainer = height => kfrm
|
|
36
|
-
0% {
|
|
37
|
-
height: ${height}px;
|
|
38
|
-
}
|
|
39
|
-
100% {
|
|
40
|
-
height: 0px;
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
11
|
+
const shrinkContainer = height => kfrm(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n height: ", "px;\n }\n 100% {\n height: 0px;\n }\n"])), height);
|
|
43
12
|
|
|
44
13
|
const handleBorderColor = (type, {
|
|
45
14
|
colors
|
|
@@ -61,13 +30,9 @@ const handleBorderColor = (type, {
|
|
|
61
30
|
const handleAnimation = (isAnimating, isOpen, height = null) => {
|
|
62
31
|
if (isAnimating) {
|
|
63
32
|
if (isOpen) {
|
|
64
|
-
return css
|
|
65
|
-
animation: ${height ? spanContainer(height) : slideIn} 0.5s ease-in;
|
|
66
|
-
`;
|
|
33
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: ", " 0.5s ease-in;\n "])), height ? spanContainer(height) : slideIn);
|
|
67
34
|
} else {
|
|
68
|
-
return css
|
|
69
|
-
animation: ${height ? shrinkContainer(height) : slideOut} 0.5s ease-in;
|
|
70
|
-
`;
|
|
35
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n animation: ", " 0.5s ease-in;\n "])), height ? shrinkContainer(height) : slideOut);
|
|
71
36
|
}
|
|
72
37
|
}
|
|
73
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-banner",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Banner",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"build": "node ../../scripts/build/build.js"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@elliemae/ds-basic": "2.0.0-alpha.
|
|
64
|
-
"@elliemae/ds-classnames": "2.0.0-alpha.
|
|
63
|
+
"@elliemae/ds-basic": "2.0.0-alpha.11",
|
|
64
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.11"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"styled-components": "~5.3.1"
|
package/cjs/package.json
DELETED