@elliemae/ds-banner 2.3.0-alpha.9 → 2.3.0-next.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/cjs/DSBanner.js +132 -0
- package/cjs/defaultProps.js +22 -0
- package/cjs/index.d.js +2 -0
- package/cjs/index.js +12 -0
- package/cjs/propTypes.js +24 -0
- package/cjs/styles.js +146 -0
- package/cjs/utils/bannerTypes.js +12 -0
- package/cjs/utils/icons.js +36 -0
- package/cjs/utils/styleHelpers.js +53 -0
- package/esm/DSBanner.js +121 -0
- package/esm/defaultProps.js +18 -0
- package/esm/index.d.js +1 -0
- package/esm/index.js +2 -0
- package/esm/propTypes.js +20 -0
- package/esm/styles.js +131 -0
- package/esm/utils/bannerTypes.js +8 -0
- package/esm/utils/icons.js +28 -0
- package/esm/utils/styleHelpers.js +44 -0
- package/package.json +35 -37
- package/{dist/types → types}/DSBanner.d.ts +1 -1
- package/{dist/types → types}/defaultProps.d.ts +0 -0
- package/{dist/types → types}/index.d.ts +0 -0
- package/{dist/types → types}/propTypes.d.ts +0 -0
- package/{dist/types → types}/styles.d.ts +7 -7
- package/{dist/types → types}/tests/DSBanner.events.test.d.ts +0 -0
- package/{dist/types → types}/tests/DSBanner.test.d.ts +0 -0
- package/{dist/types → types}/utils/bannerTypes.d.ts +0 -0
- package/{dist/types → types}/utils/icons.d.ts +0 -0
- package/{dist/types → types}/utils/styleHelpers.d.ts +0 -0
- package/dist/cjs/DSBanner.js +0 -138
- package/dist/cjs/DSBanner.js.map +0 -7
- package/dist/cjs/defaultProps.js +0 -45
- package/dist/cjs/defaultProps.js.map +0 -7
- package/dist/cjs/index.d.js +0 -27
- package/dist/cjs/index.d.js.map +0 -7
- package/dist/cjs/index.js +0 -37
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/propTypes.js +0 -55
- package/dist/cjs/propTypes.js.map +0 -7
- package/dist/cjs/styles.js +0 -107
- package/dist/cjs/styles.js.map +0 -7
- package/dist/cjs/utils/bannerTypes.js +0 -40
- package/dist/cjs/utils/bannerTypes.js.map +0 -7
- package/dist/cjs/utils/icons.js +0 -58
- package/dist/cjs/utils/icons.js.map +0 -7
- package/dist/cjs/utils/styleHelpers.js +0 -99
- package/dist/cjs/utils/styleHelpers.js.map +0 -7
- package/dist/esm/DSBanner.js +0 -117
- package/dist/esm/DSBanner.js.map +0 -7
- package/dist/esm/defaultProps.js +0 -16
- package/dist/esm/defaultProps.js.map +0 -7
- package/dist/esm/index.d.js +0 -2
- package/dist/esm/index.d.js.map +0 -7
- package/dist/esm/index.js +0 -8
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/propTypes.js +0 -26
- package/dist/esm/propTypes.js.map +0 -7
- package/dist/esm/styles.js +0 -78
- package/dist/esm/styles.js.map +0 -7
- package/dist/esm/utils/bannerTypes.js +0 -11
- package/dist/esm/utils/bannerTypes.js.map +0 -7
- package/dist/esm/utils/icons.js +0 -29
- package/dist/esm/utils/icons.js.map +0 -7
- package/dist/esm/utils/styleHelpers.js +0 -70
- package/dist/esm/utils/styleHelpers.js.map +0 -7
package/esm/styles.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
|
+
import { styled } from '@elliemae/ds-system';
|
|
3
|
+
import DSButton from '@elliemae/ds-button';
|
|
4
|
+
import { handleAnimation, handleBorderColor } from './utils/styleHelpers.js';
|
|
5
|
+
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
7
|
+
const StyledBannerContainer = styled('div', {
|
|
8
|
+
name: 'DS-Banner',
|
|
9
|
+
slot: 'root'
|
|
10
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n height: ", ";\n ", ";\n"])), _ref => {
|
|
11
|
+
let {
|
|
12
|
+
isOpen
|
|
13
|
+
} = _ref;
|
|
14
|
+
return isOpen ? 'auto' : '0px';
|
|
15
|
+
}, _ref2 => {
|
|
16
|
+
let {
|
|
17
|
+
isAnimating,
|
|
18
|
+
isOpen,
|
|
19
|
+
height
|
|
20
|
+
} = _ref2;
|
|
21
|
+
return handleAnimation(isAnimating, isOpen, height);
|
|
22
|
+
});
|
|
23
|
+
const StyledInnerContainer = styled('div', {
|
|
24
|
+
name: 'DS-Banner',
|
|
25
|
+
slot: 'innerContainer'
|
|
26
|
+
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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 => {
|
|
27
|
+
let {
|
|
28
|
+
theme
|
|
29
|
+
} = _ref3;
|
|
30
|
+
return theme.colors.neutral['000'];
|
|
31
|
+
}, _ref4 => {
|
|
32
|
+
let {
|
|
33
|
+
type,
|
|
34
|
+
theme
|
|
35
|
+
} = _ref4;
|
|
36
|
+
return handleBorderColor(type, theme);
|
|
37
|
+
}, _ref5 => {
|
|
38
|
+
let {
|
|
39
|
+
isAnimating,
|
|
40
|
+
isOpen
|
|
41
|
+
} = _ref5;
|
|
42
|
+
return handleAnimation(isAnimating, isOpen);
|
|
43
|
+
});
|
|
44
|
+
const StyledIconContainer = styled('div', {
|
|
45
|
+
name: 'DS-Banner',
|
|
46
|
+
slot: 'iconContainer'
|
|
47
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: ", ";\n margin-left: ", ";\n"])), _ref6 => {
|
|
48
|
+
let {
|
|
49
|
+
theme
|
|
50
|
+
} = _ref6;
|
|
51
|
+
return theme.space.xxs;
|
|
52
|
+
}, _ref7 => {
|
|
53
|
+
let {
|
|
54
|
+
theme
|
|
55
|
+
} = _ref7;
|
|
56
|
+
return theme.space.xs;
|
|
57
|
+
});
|
|
58
|
+
const StyledTitle = styled('div', {
|
|
59
|
+
name: 'DS-Banner',
|
|
60
|
+
slot: 'title'
|
|
61
|
+
})(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n"])), _ref8 => {
|
|
62
|
+
let {
|
|
63
|
+
theme
|
|
64
|
+
} = _ref8;
|
|
65
|
+
return theme.colors.neutral[700];
|
|
66
|
+
}, _ref9 => {
|
|
67
|
+
let {
|
|
68
|
+
theme
|
|
69
|
+
} = _ref9;
|
|
70
|
+
return theme.fontSizes.label[400];
|
|
71
|
+
}, _ref10 => {
|
|
72
|
+
let {
|
|
73
|
+
theme
|
|
74
|
+
} = _ref10;
|
|
75
|
+
return theme.fontWeights.semibold;
|
|
76
|
+
});
|
|
77
|
+
const StyledSubTitle = styled('div', {
|
|
78
|
+
name: 'DS-Banner',
|
|
79
|
+
slot: 'subtitle'
|
|
80
|
+
})(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 100%;\n margin-left: ", ";\n font-size: ", ";\n font-weight: ", ";\n"])), _ref11 => {
|
|
81
|
+
let {
|
|
82
|
+
theme
|
|
83
|
+
} = _ref11;
|
|
84
|
+
return theme.space.xs;
|
|
85
|
+
}, _ref12 => {
|
|
86
|
+
let {
|
|
87
|
+
theme
|
|
88
|
+
} = _ref12;
|
|
89
|
+
return theme.fontSizes.subTitle[400];
|
|
90
|
+
}, _ref13 => {
|
|
91
|
+
let {
|
|
92
|
+
theme
|
|
93
|
+
} = _ref13;
|
|
94
|
+
return theme.fontWeights.regular;
|
|
95
|
+
});
|
|
96
|
+
const StyledActionLink = styled('a', {
|
|
97
|
+
name: 'DS-Banner',
|
|
98
|
+
slot: 'action'
|
|
99
|
+
})(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\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 => {
|
|
100
|
+
let {
|
|
101
|
+
theme,
|
|
102
|
+
isBodyEmpty
|
|
103
|
+
} = _ref14;
|
|
104
|
+
return isBodyEmpty ? theme.space.xs : 0;
|
|
105
|
+
}, _ref15 => {
|
|
106
|
+
let {
|
|
107
|
+
theme
|
|
108
|
+
} = _ref15;
|
|
109
|
+
return theme.fontSizes.hyperlink[400];
|
|
110
|
+
}, _ref16 => {
|
|
111
|
+
let {
|
|
112
|
+
theme
|
|
113
|
+
} = _ref16;
|
|
114
|
+
return theme.fontWeights.regular;
|
|
115
|
+
}, _ref17 => {
|
|
116
|
+
let {
|
|
117
|
+
theme
|
|
118
|
+
} = _ref17;
|
|
119
|
+
return theme.colors.brand[600];
|
|
120
|
+
});
|
|
121
|
+
const StyledCloseButton = styled(DSButton, {
|
|
122
|
+
name: 'DS-Banner',
|
|
123
|
+
slot: 'closeButton'
|
|
124
|
+
})(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: ", ";\n &:not(focus) {\n border: transparent;\n }\n"])), _ref18 => {
|
|
125
|
+
let {
|
|
126
|
+
theme
|
|
127
|
+
} = _ref18;
|
|
128
|
+
return theme.space.xxs;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
export { StyledActionLink, StyledBannerContainer, StyledCloseButton, StyledIconContainer, StyledInnerContainer, StyledSubTitle, StyledTitle };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { SuccessFill, InfoFill, AlertsDetailFill, WarningSquare } from '@elliemae/ds-icons';
|
|
4
|
+
|
|
5
|
+
const icons = {
|
|
6
|
+
success: /*#__PURE__*/_jsx(SuccessFill, {
|
|
7
|
+
fill: "#207e56",
|
|
8
|
+
width: "20px",
|
|
9
|
+
height: "20px"
|
|
10
|
+
}),
|
|
11
|
+
info: /*#__PURE__*/_jsx(InfoFill, {
|
|
12
|
+
fill: "#1e79c2",
|
|
13
|
+
width: "20px",
|
|
14
|
+
height: "20px"
|
|
15
|
+
}),
|
|
16
|
+
danger: /*#__PURE__*/_jsx(AlertsDetailFill, {
|
|
17
|
+
fill: "#c64252",
|
|
18
|
+
width: "20px",
|
|
19
|
+
height: "20px"
|
|
20
|
+
}),
|
|
21
|
+
warning: /*#__PURE__*/_jsx(WarningSquare, {
|
|
22
|
+
fill: "#d17a00",
|
|
23
|
+
width: "20px",
|
|
24
|
+
height: "20px"
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { icons };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
|
+
import { kfrm, css } from '@elliemae/ds-system';
|
|
3
|
+
import { BANNER_TYPES } from './bannerTypes.js';
|
|
4
|
+
|
|
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"])));
|
|
8
|
+
|
|
9
|
+
const spanContainer = height => kfrm(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n height: 0px;\n }\n 100% {\n height: ", "px;\n }\n"])), height);
|
|
10
|
+
|
|
11
|
+
const shrinkContainer = height => kfrm(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n height: ", "px;\n }\n 100% {\n height: 0px;\n }\n"])), height);
|
|
12
|
+
|
|
13
|
+
const handleBorderColor = (type, _ref) => {
|
|
14
|
+
let {
|
|
15
|
+
colors
|
|
16
|
+
} = _ref;
|
|
17
|
+
|
|
18
|
+
switch (type) {
|
|
19
|
+
case BANNER_TYPES.SUCCESS:
|
|
20
|
+
return colors.success[900];
|
|
21
|
+
|
|
22
|
+
case BANNER_TYPES.INFO:
|
|
23
|
+
return colors.brand[600];
|
|
24
|
+
|
|
25
|
+
case BANNER_TYPES.WARNING:
|
|
26
|
+
return colors.warning[900];
|
|
27
|
+
|
|
28
|
+
case BANNER_TYPES.DANGER:
|
|
29
|
+
return colors.danger[900];
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const handleAnimation = function (isAnimating, isOpen) {
|
|
33
|
+
let height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
34
|
+
|
|
35
|
+
if (isAnimating) {
|
|
36
|
+
if (isOpen) {
|
|
37
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n animation: ", " 0.5s ease-in;\n "])), height ? spanContainer(height) : slideIn);
|
|
38
|
+
} else {
|
|
39
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n animation: ", " 0.5s ease-in;\n "])), height ? shrinkContainer(height) : slideOut);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { handleAnimation, handleBorderColor };
|
package/package.json
CHANGED
|
@@ -1,46 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-banner",
|
|
3
|
-
"version": "2.3.0-
|
|
3
|
+
"version": "2.3.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Banner",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"module": "./dist/esm/index.js",
|
|
10
|
-
"main": "./dist/cjs/index.js",
|
|
11
|
-
"types": "./dist/types/index.d.ts",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
12
9
|
"exports": {
|
|
13
10
|
".": {
|
|
14
|
-
"import": "./
|
|
15
|
-
"require": "./
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
16
13
|
},
|
|
17
14
|
"./utils/styleHelpers": {
|
|
18
|
-
"import": "./
|
|
19
|
-
"require": "./
|
|
15
|
+
"import": "./esm/utils/styleHelpers.js",
|
|
16
|
+
"require": "./cjs/utils/styleHelpers.js"
|
|
20
17
|
},
|
|
21
18
|
"./utils/icons": {
|
|
22
|
-
"import": "./
|
|
23
|
-
"require": "./
|
|
19
|
+
"import": "./esm/utils/icons.js",
|
|
20
|
+
"require": "./cjs/utils/icons.js"
|
|
24
21
|
},
|
|
25
22
|
"./utils/bannerTypes": {
|
|
26
|
-
"import": "./
|
|
27
|
-
"require": "./
|
|
23
|
+
"import": "./esm/utils/bannerTypes.js",
|
|
24
|
+
"require": "./cjs/utils/bannerTypes.js"
|
|
28
25
|
},
|
|
29
26
|
"./styles": {
|
|
30
|
-
"import": "./
|
|
31
|
-
"require": "./
|
|
27
|
+
"import": "./esm/styles.js",
|
|
28
|
+
"require": "./cjs/styles.js"
|
|
32
29
|
},
|
|
33
30
|
"./propTypes": {
|
|
34
|
-
"import": "./
|
|
35
|
-
"require": "./
|
|
31
|
+
"import": "./esm/propTypes.js",
|
|
32
|
+
"require": "./cjs/propTypes.js"
|
|
36
33
|
},
|
|
37
34
|
"./DSBanner": {
|
|
38
|
-
"import": "./
|
|
39
|
-
"require": "./
|
|
35
|
+
"import": "./esm/DSBanner.js",
|
|
36
|
+
"require": "./cjs/DSBanner.js"
|
|
40
37
|
},
|
|
41
38
|
"./defaultProps": {
|
|
42
|
-
"import": "./
|
|
43
|
-
"require": "./
|
|
39
|
+
"import": "./esm/defaultProps.js",
|
|
40
|
+
"require": "./cjs/defaultProps.js"
|
|
44
41
|
}
|
|
45
42
|
},
|
|
46
43
|
"sideEffects": [
|
|
@@ -52,18 +49,24 @@
|
|
|
52
49
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
53
50
|
},
|
|
54
51
|
"engines": {
|
|
55
|
-
"
|
|
56
|
-
"node": ">=
|
|
52
|
+
"npm": ">=7",
|
|
53
|
+
"node": ">=14"
|
|
57
54
|
},
|
|
58
55
|
"author": "ICE MT",
|
|
56
|
+
"scripts": {
|
|
57
|
+
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
58
|
+
"prebuild": "exit 0",
|
|
59
|
+
"predev": "exit 0",
|
|
60
|
+
"build": "node ../../scripts/build/build.js"
|
|
61
|
+
},
|
|
59
62
|
"dependencies": {
|
|
60
|
-
"@elliemae/ds-button": "2.3.0-
|
|
61
|
-
"@elliemae/ds-icons": "2.3.0-
|
|
62
|
-
"@elliemae/ds-system": "2.3.0-
|
|
63
|
-
"react-desc": "~4.1.
|
|
63
|
+
"@elliemae/ds-button": "2.3.0-next.3",
|
|
64
|
+
"@elliemae/ds-icons": "2.3.0-next.3",
|
|
65
|
+
"@elliemae/ds-system": "2.3.0-next.1",
|
|
66
|
+
"react-desc": "~4.1.2"
|
|
64
67
|
},
|
|
65
68
|
"devDependencies": {
|
|
66
|
-
"@testing-library/jest-dom": "~5.15.
|
|
69
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
67
70
|
"@testing-library/react": "~12.1.2",
|
|
68
71
|
"@testing-library/user-event": "~13.5.0",
|
|
69
72
|
"styled-components": "~5.3.3"
|
|
@@ -76,12 +79,7 @@
|
|
|
76
79
|
},
|
|
77
80
|
"publishConfig": {
|
|
78
81
|
"access": "public",
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
"scripts": {
|
|
82
|
-
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
83
|
-
"prebuild": "exit 0",
|
|
84
|
-
"predev": "exit 0",
|
|
85
|
-
"build": "node ../../scripts/build/build.js"
|
|
82
|
+
"directory": "dist",
|
|
83
|
+
"generateSubmodules": true
|
|
86
84
|
}
|
|
87
85
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { StyledActionLinkT, StyledBannerContainerT, StyledInnerContainerT } from './index.d';
|
|
2
|
-
export declare const StyledBannerContainer: import("styled-components").StyledComponent<StyledBannerContainerT, import("@elliemae/ds-system/
|
|
3
|
-
export declare const StyledInnerContainer: import("styled-components").StyledComponent<StyledInnerContainerT, import("@elliemae/ds-system/
|
|
4
|
-
export declare const StyledIconContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/
|
|
5
|
-
export declare const StyledTitle: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/
|
|
6
|
-
export declare const StyledSubTitle: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/
|
|
7
|
-
export declare const StyledActionLink: import("styled-components").StyledComponent<StyledActionLinkT, import("@elliemae/ds-system/
|
|
8
|
-
export declare const StyledCloseButton: import("styled-components").StyledComponent<any, import("@elliemae/ds-system/
|
|
2
|
+
export declare const StyledBannerContainer: import("styled-components").StyledComponent<StyledBannerContainerT, import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
|
|
3
|
+
export declare const StyledInnerContainer: import("styled-components").StyledComponent<StyledInnerContainerT, import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
|
|
4
|
+
export declare const StyledIconContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
|
|
5
|
+
export declare const StyledTitle: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
|
|
6
|
+
export declare const StyledSubTitle: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
|
|
7
|
+
export declare const StyledActionLink: import("styled-components").StyledComponent<StyledActionLinkT, import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
|
|
8
|
+
export declare const StyledCloseButton: import("styled-components").StyledComponent<any, import("@elliemae/ds-system/types/styled/types").Theme, any, any>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/cjs/DSBanner.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
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 DSBanner_exports = {};
|
|
29
|
-
__export(DSBanner_exports, {
|
|
30
|
-
DSBanner: () => DSBanner,
|
|
31
|
-
DSBannerWithSchema: () => DSBannerWithSchema,
|
|
32
|
-
default: () => DSBanner_default
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
|
-
var import_react_desc = require("react-desc");
|
|
38
|
-
var import_icons = require("./utils/icons");
|
|
39
|
-
var import_propTypes = require("./propTypes");
|
|
40
|
-
var import_defaultProps = require("./defaultProps");
|
|
41
|
-
var import_styles = require("./styles");
|
|
42
|
-
const DSBanner = ({
|
|
43
|
-
type,
|
|
44
|
-
isOpen,
|
|
45
|
-
onClose,
|
|
46
|
-
label,
|
|
47
|
-
body,
|
|
48
|
-
actionLink,
|
|
49
|
-
showCloseButton,
|
|
50
|
-
containerProps,
|
|
51
|
-
actionRef
|
|
52
|
-
}) => {
|
|
53
|
-
const innerContainerRef = (0, import_react.useRef)(null);
|
|
54
|
-
const linkRef = (0, import_react.useRef)(null);
|
|
55
|
-
const [current, setCurrent] = (0, import_react.useState)(isOpen);
|
|
56
|
-
const [isAnimating, setIsAnimating] = (0, import_react.useState)(false);
|
|
57
|
-
const [alertTabIndex, setAlertTabIndex] = (0, import_react.useState)(void 0);
|
|
58
|
-
const ownerState = { type };
|
|
59
|
-
import_react.default.useEffect(() => {
|
|
60
|
-
if (actionRef && actionRef.current) {
|
|
61
|
-
actionRef.current.focusOnWrapper = () => {
|
|
62
|
-
if (innerContainerRef.current) {
|
|
63
|
-
setAlertTabIndex(0);
|
|
64
|
-
setTimeout(() => {
|
|
65
|
-
innerContainerRef.current.focus();
|
|
66
|
-
}, 100);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
actionRef.current.focusOnLink = () => {
|
|
70
|
-
if (linkRef.current) {
|
|
71
|
-
linkRef.current.focus();
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
}, [actionRef]);
|
|
76
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
77
|
-
if (isOpen !== current || isOpen)
|
|
78
|
-
setIsAnimating(true);
|
|
79
|
-
else
|
|
80
|
-
setIsAnimating(false);
|
|
81
|
-
}, [isOpen, current]);
|
|
82
|
-
const handleBlur = (0, import_react.useCallback)(() => {
|
|
83
|
-
setAlertTabIndex(void 0);
|
|
84
|
-
}, []);
|
|
85
|
-
const handleOnKeyDown = (0, import_react.useCallback)((e) => {
|
|
86
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
87
|
-
e.preventDefault();
|
|
88
|
-
if (linkRef.current)
|
|
89
|
-
linkRef.current.click();
|
|
90
|
-
}
|
|
91
|
-
}, []);
|
|
92
|
-
if (!isAnimating && !isOpen)
|
|
93
|
-
return null;
|
|
94
|
-
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledBannerContainer, {
|
|
95
|
-
type,
|
|
96
|
-
isOpen,
|
|
97
|
-
isAnimating,
|
|
98
|
-
onAnimationEnd: () => setCurrent(isOpen),
|
|
99
|
-
"data-testid": "ds-banner-container",
|
|
100
|
-
...containerProps,
|
|
101
|
-
ownerState
|
|
102
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledInnerContainer, {
|
|
103
|
-
type,
|
|
104
|
-
isOpen,
|
|
105
|
-
ref: innerContainerRef,
|
|
106
|
-
isAnimating,
|
|
107
|
-
"data-testid": "ds-banner",
|
|
108
|
-
role: "alert",
|
|
109
|
-
tabIndex: alertTabIndex,
|
|
110
|
-
onBlur: handleBlur
|
|
111
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledIconContainer, {
|
|
112
|
-
"data-testid": "ds-banner-icon"
|
|
113
|
-
}, import_icons.icons[type]), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTitle, null, label), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledSubTitle, null, /* @__PURE__ */ import_react.default.createElement("span", null, body), actionLink && /* @__PURE__ */ import_react.default.createElement(import_styles.StyledActionLink, {
|
|
114
|
-
"data-testid": "ds-banner-action-link",
|
|
115
|
-
onClick: actionLink.onClick,
|
|
116
|
-
href: actionLink.href,
|
|
117
|
-
ref: linkRef,
|
|
118
|
-
onKeyDown: handleOnKeyDown,
|
|
119
|
-
tabIndex: 0,
|
|
120
|
-
isBodyEmpty: body
|
|
121
|
-
}, actionLink.label)), showCloseButton ? /* @__PURE__ */ import_react.default.createElement(import_styles.StyledCloseButton, {
|
|
122
|
-
"data-testid": "ds-banner-close-button",
|
|
123
|
-
buttonType: "secondary",
|
|
124
|
-
onClick: onClose,
|
|
125
|
-
"aria-label": "Close icon",
|
|
126
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.CloseX, {
|
|
127
|
-
width: "12px",
|
|
128
|
-
height: "12px"
|
|
129
|
-
})
|
|
130
|
-
}) : /* @__PURE__ */ import_react.default.createElement("span", null)));
|
|
131
|
-
};
|
|
132
|
-
DSBanner.defaultProps = import_defaultProps.defaultProps;
|
|
133
|
-
DSBanner.propTypes = import_propTypes.propTypes;
|
|
134
|
-
const DSBannerWithSchema = (0, import_react_desc.describe)(DSBanner);
|
|
135
|
-
DSBannerWithSchema.propTypes = import_propTypes.propTypes;
|
|
136
|
-
var DSBanner_default = DSBanner;
|
|
137
|
-
module.exports = __toCommonJS(DSBanner_exports);
|
|
138
|
-
//# sourceMappingURL=DSBanner.js.map
|
package/dist/cjs/DSBanner.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSBanner.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useCallback, useState } from 'react';\nimport { CloseX } from '@elliemae/ds-icons';\nimport { describe } from 'react-desc';\nimport type { BannerPropsT } from './index.d';\nimport { icons } from './utils/icons';\nimport { propTypes } from './propTypes';\nimport { defaultProps } from './defaultProps';\nimport {\n StyledActionLink,\n StyledCloseButton,\n StyledInnerContainer,\n StyledBannerContainer,\n StyledIconContainer,\n StyledSubTitle,\n StyledTitle,\n} from './styles';\n\nconst DSBanner = ({\n type,\n isOpen,\n onClose,\n label,\n body,\n actionLink,\n showCloseButton,\n containerProps,\n actionRef,\n}: BannerPropsT): JSX.Element => {\n const innerContainerRef = useRef<HTMLDivElement | null>(null);\n const linkRef = useRef<HTMLAnchorElement | null>(null);\n const [current, setCurrent] = useState<boolean>(isOpen);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [alertTabIndex, setAlertTabIndex] = useState<number | undefined>(undefined);\n\n const ownerState = { type };\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusOnWrapper = () => {\n if (innerContainerRef.current) {\n setAlertTabIndex(0);\n setTimeout(() => {\n innerContainerRef.current.focus();\n }, 100);\n }\n };\n actionRef.current.focusOnLink = () => {\n if (linkRef.current) {\n linkRef.current.focus();\n }\n };\n }\n }, [actionRef]);\n\n useLayoutEffect(() => {\n if (isOpen !== current || isOpen) setIsAnimating(true);\n else setIsAnimating(false);\n }, [isOpen, current]);\n\n const handleBlur = useCallback(() => {\n setAlertTabIndex(undefined);\n }, []);\n const handleOnKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (linkRef.current) linkRef.current.click();\n }\n }, []);\n\n if (!isAnimating && !isOpen) return null;\n\n return (\n <StyledBannerContainer\n type={type}\n isOpen={isOpen}\n isAnimating={isAnimating}\n onAnimationEnd={() => setCurrent(isOpen)}\n data-testid=\"ds-banner-container\"\n {...containerProps}\n ownerState={ownerState}\n >\n <StyledInnerContainer\n type={type}\n isOpen={isOpen}\n ref={innerContainerRef}\n isAnimating={isAnimating}\n data-testid=\"ds-banner\"\n role=\"alert\"\n tabIndex={alertTabIndex}\n onBlur={handleBlur}\n >\n <StyledIconContainer data-testid=\"ds-banner-icon\">{icons[type]}</StyledIconContainer>\n <StyledTitle>{label}</StyledTitle>\n <StyledSubTitle>\n <span>{body}</span>\n {actionLink && (\n <StyledActionLink\n data-testid=\"ds-banner-action-link\"\n onClick={actionLink.onClick}\n href={actionLink.href}\n ref={linkRef}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n isBodyEmpty={body}\n >\n {actionLink.label}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n\n {showCloseButton ? (\n <StyledCloseButton\n data-testid=\"ds-banner-close-button\"\n buttonType=\"secondary\"\n onClick={onClose}\n aria-label=\"Close icon\"\n icon={<CloseX width=\"12px\" height=\"12px\" />}\n />\n ) : (\n <span />\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nDSBanner.defaultProps = defaultProps;\nDSBanner.propTypes = propTypes;\nconst DSBannerWithSchema = describe(DSBanner);\nDSBannerWithSchema.propTypes = propTypes;\n\nexport default DSBanner;\nexport { DSBanner, DSBannerWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAsE;AACtE,sBAAuB;AACvB,wBAAyB;AAEzB,mBAAsB;AACtB,uBAA0B;AAC1B,0BAA6B;AAC7B,oBAQO;AAEP,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAC+B;AAC/B,QAAM,oBAAoB,yBAA8B;AACxD,QAAM,UAAU,yBAAiC;AACjD,QAAM,CAAC,SAAS,cAAc,2BAAkB;AAChD,QAAM,CAAC,aAAa,kBAAkB,2BAAkB;AACxD,QAAM,CAAC,eAAe,oBAAoB,2BAA6B;AAEvE,QAAM,aAAa,EAAE;AAErB,uBAAM,UAAU,MAAM;AACpB,QAAI,aAAa,UAAU,SAAS;AAClC,gBAAU,QAAQ,iBAAiB,MAAM;AACvC,YAAI,kBAAkB,SAAS;AAC7B,2BAAiB;AACjB,qBAAW,MAAM;AACf,8BAAkB,QAAQ;AAAA,aACzB;AAAA;AAAA;AAGP,gBAAU,QAAQ,cAAc,MAAM;AACpC,YAAI,QAAQ,SAAS;AACnB,kBAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA,KAIrB,CAAC;AAEJ,oCAAgB,MAAM;AACpB,QAAI,WAAW,WAAW;AAAQ,qBAAe;AAAA;AAC5C,qBAAe;AAAA,KACnB,CAAC,QAAQ;AAEZ,QAAM,aAAa,8BAAY,MAAM;AACnC,qBAAiB;AAAA,KAChB;AACH,QAAM,kBAAkB,8BAAY,CAAC,MAA2B;AAC9D,QAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAK;AACtC,QAAE;AACF,UAAI,QAAQ;AAAS,gBAAQ,QAAQ;AAAA;AAAA,KAEtC;AAEH,MAAI,CAAC,eAAe,CAAC;AAAQ,WAAO;AAEpC,SACE,mDAAC,qCAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,MAAM,WAAW;AAAA,IACjC,eAAY;AAAA,OACR;AAAA,IACJ;AAAA,KAEA,mDAAC,oCAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL;AAAA,IACA,eAAY;AAAA,IACZ,MAAK;AAAA,IACL,UAAU;AAAA,IACV,QAAQ;AAAA,KAER,mDAAC,mCAAD;AAAA,IAAqB,eAAY;AAAA,KAAkB,mBAAM,QACzD,mDAAC,2BAAD,MAAc,QACd,mDAAC,8BAAD,MACE,mDAAC,QAAD,MAAO,OACN,cACC,mDAAC,gCAAD;AAAA,IACE,eAAY;AAAA,IACZ,SAAS,WAAW;AAAA,IACpB,MAAM,WAAW;AAAA,IACjB,KAAK;AAAA,IACL,WAAW;AAAA,IACX,UAAU;AAAA,IACV,aAAa;AAAA,KAEZ,WAAW,SAKjB,kBACC,mDAAC,iCAAD;AAAA,IACE,eAAY;AAAA,IACZ,YAAW;AAAA,IACX,SAAS;AAAA,IACT,cAAW;AAAA,IACX,MAAM,mDAAC,wBAAD;AAAA,MAAQ,OAAM;AAAA,MAAO,QAAO;AAAA;AAAA,OAGpC,mDAAC,QAAD;AAAA;AAOV,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,MAAM,qBAAqB,gCAAS;AACpC,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/defaultProps.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
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 defaultProps_exports = {};
|
|
29
|
-
__export(defaultProps_exports, {
|
|
30
|
-
defaultProps: () => defaultProps
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_bannerTypes = require("./utils/bannerTypes");
|
|
34
|
-
const defaultProps = {
|
|
35
|
-
containerProps: {},
|
|
36
|
-
label: "",
|
|
37
|
-
body: "",
|
|
38
|
-
type: import_bannerTypes.BANNER_TYPES.INFO,
|
|
39
|
-
isOpen: true,
|
|
40
|
-
onClose: () => null,
|
|
41
|
-
showCloseButton: true,
|
|
42
|
-
actionLink: { label: "", onClick: () => null, href: "" }
|
|
43
|
-
};
|
|
44
|
-
module.exports = __toCommonJS(defaultProps_exports);
|
|
45
|
-
//# sourceMappingURL=defaultProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/defaultProps.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { BANNER_TYPES } from './utils/bannerTypes';\n\nexport const defaultProps = {\n containerProps: {},\n label: '',\n body: '',\n type: BANNER_TYPES.INFO,\n isOpen: true,\n onClose: () => null,\n showCloseButton: true,\n actionLink: { label: '', onClick: () => null, href: '' },\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAA6B;AAEtB,MAAM,eAAe;AAAA,EAC1B,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM,gCAAa;AAAA,EACnB,QAAQ;AAAA,EACR,SAAS,MAAM;AAAA,EACf,iBAAiB;AAAA,EACjB,YAAY,EAAE,OAAO,IAAI,SAAS,MAAM,MAAM,MAAM;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/index.d.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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 __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(module2))
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (module2, isNodeMode) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
-
var index_d_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
module.exports = __toCommonJS(index_d_exports);
|
|
27
|
-
//# sourceMappingURL=index.d.js.map
|
package/dist/cjs/index.d.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.d.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { BANNER_TYPES } from './utils/bannerTypes';\n\ntype BannerTypesT = typeof BANNER_TYPES[keyof typeof BANNER_TYPES];\n\ninterface ActionLinkT {\n label: string;\n onClick: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | null;\n href: string;\n}\n\nexport interface BannerPropsT {\n type: BannerTypesT;\n isOpen: boolean;\n onClose: () => void | null;\n actionLink: ActionLinkT;\n label: string;\n body: string;\n showCloseButton?: boolean;\n containerProps: Record<string, unknown>;\n actionRef?: any;\n}\n\nexport interface StyledBannerContainerT {\n type: BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\nexport interface StyledInnerContainerT {\n type: BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n ref: React.MutableRefObject<HTMLDivElement>;\n}\n\nexport interface StyledActionLinkT {\n isBodyEmpty: string;\n ref: React.MutableRefObject<HTMLAnchorElement>;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|