@propellerads/empty-state 3.0.0 → 3.0.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/dist/empty-state.cjs.development.js +13 -56
- package/dist/empty-state.cjs.development.js.map +1 -1
- package/dist/empty-state.cjs.production.min.js +1 -1
- package/dist/empty-state.cjs.production.min.js.map +1 -1
- package/dist/empty-state.esm.js +13 -56
- package/dist/empty-state.esm.js.map +1 -1
- package/dist/types.d.ts +5 -5
- package/package.json +8 -9
- package/src/types.ts +5 -5
|
@@ -8,67 +8,24 @@ var React = _interopDefault(require('react'));
|
|
|
8
8
|
var styled = _interopDefault(require('styled-components'));
|
|
9
9
|
var stylevariables = require('@propellerads/stylevariables');
|
|
10
10
|
|
|
11
|
-
function _taggedTemplateLiteralLoose(
|
|
12
|
-
|
|
13
|
-
raw = strings.slice(0);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
strings.raw = raw;
|
|
17
|
-
return strings;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function _templateObject4() {
|
|
21
|
-
var data = _taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n"]);
|
|
22
|
-
|
|
23
|
-
_templateObject4 = function _templateObject4() {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function _templateObject3() {
|
|
31
|
-
var data = _taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"]);
|
|
32
|
-
|
|
33
|
-
_templateObject3 = function _templateObject3() {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function _templateObject2() {
|
|
41
|
-
var data = _taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"]);
|
|
42
|
-
|
|
43
|
-
_templateObject2 = function _templateObject2() {
|
|
44
|
-
return data;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return data;
|
|
11
|
+
function _taggedTemplateLiteralLoose(e, t) {
|
|
12
|
+
return t || (t = e.slice(0)), e.raw = t, e;
|
|
48
13
|
}
|
|
49
14
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return data;
|
|
58
|
-
}
|
|
59
|
-
var StyledEmptyState = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject(), stylevariables.spacing * 5);
|
|
60
|
-
var StyledEmptyStateIcon = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject2(), stylevariables.spacing * 9);
|
|
61
|
-
var StyledEmptyStateDescription = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject3(), stylevariables.spacing * 4);
|
|
62
|
-
var StyledEmptyStateActions = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject4(), stylevariables.spacing * 5);
|
|
15
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
16
|
+
var StyledEmptyState = /*#__PURE__*/styled.div(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ", "px;\n"])), stylevariables.spacing * 5);
|
|
17
|
+
var StyledEmptyStateIcon = /*#__PURE__*/styled.div(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"])), stylevariables.spacing * 9);
|
|
18
|
+
var StyledEmptyStateDescription = /*#__PURE__*/styled.div(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"])), stylevariables.spacing * 4);
|
|
19
|
+
var StyledEmptyStateActions = /*#__PURE__*/styled.div(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n"])), stylevariables.spacing * 5);
|
|
63
20
|
|
|
64
21
|
var EmptyState = function EmptyState(_ref) {
|
|
65
22
|
var _ref$icon = _ref.icon,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
23
|
+
icon = _ref$icon === void 0 ? undefined : _ref$icon,
|
|
24
|
+
title = _ref.title,
|
|
25
|
+
_ref$description = _ref.description,
|
|
26
|
+
description = _ref$description === void 0 ? '' : _ref$description,
|
|
27
|
+
_ref$actions = _ref.actions,
|
|
28
|
+
actions = _ref$actions === void 0 ? '' : _ref$actions;
|
|
72
29
|
return React.createElement(StyledEmptyState, null, icon && React.createElement(StyledEmptyStateIcon, null, icon), title, description && React.createElement(StyledEmptyStateDescription, null, description), actions && React.createElement(StyledEmptyStateActions, null, actions));
|
|
73
30
|
};
|
|
74
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.cjs.development.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","EmptyState","icon","undefined","title","description","actions","React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty-state.cjs.development.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","_templateObject","_taggedTemplateLiteralLoose","spacing","StyledEmptyStateIcon","_templateObject2","StyledEmptyStateDescription","_templateObject3","StyledEmptyStateActions","_templateObject4","EmptyState","_ref","_ref$icon","icon","undefined","title","_ref$description","description","_ref$actions","actions","React"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,eAAA,KAAAA,eAAA,gBAAAC,2BAAA,kIAKpBC,sBAAO,GAAG,CAAC,CACzB;AAED,IAAMC,oBAAoB,gBAAGL,MAAM,CAACC,GAAG,CAAAK,gBAAA,KAAAA,gBAAA,gBAAAH,2BAAA,qCACpBC,sBAAO,GAAG,CAAC,CAC7B;AAED,IAAMG,2BAA2B,gBAAGP,MAAM,CAACC,GAAG,CAAAO,gBAAA,KAAAA,gBAAA,gBAAAL,2BAAA,qCAC3BC,sBAAO,GAAG,CAAC,CAC7B;AAED,IAAMK,uBAAuB,gBAAGT,MAAM,CAACC,GAAG,CAAAS,gBAAA,KAAAA,gBAAA,gBAAAP,2BAAA,kCAC1BC,sBAAO,GAAG,CAAC,CAC1B;;AChBD,IAAMO,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA;EAAA,IAAAC,SAAA,GAAAD,IAAA,CAAKE,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAGE,SAAS,GAAAF,SAAA;IAAEG,KAAK,GAAAJ,IAAA,CAALI,KAAK;IAAAC,gBAAA,GAAAL,IAAA,CAAEM,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,EAAE,GAAAA,gBAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAAA,OAC1EE,oBAACtB,gBAAgB,QACde,IAAI,IAAIO,oBAAChB,oBAAoB,QAAES,IAAI,CAAwB,EAC3DE,KAAK,EACLE,WAAW,IAAIG,oBAACd,2BAA2B,QAAEW,WAAW,CAA+B,EACvFE,OAAO,IAAIC,oBAACZ,uBAAuB,QAAEW,OAAO,CAA2B,CACvD;AAAA,CACpB;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n,t,i,r,l=e(require("react")),a=e(require("styled-components")),o=require("@propellerads/stylevariables");function c(e,n){return n||(n=e.slice(0)),e.raw=n,e}var u=a.div(n||(n=c(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ","px;\n"])),5*o.spacing),d=a.div(t||(t=c(["\n margin-bottom: ","px;\n"])),9*o.spacing),s=a.div(i||(i=c(["\n margin-bottom: ","px;\n"])),4*o.spacing),p=a.div(r||(r=c(["\n margin-top: ","px;\n"])),5*o.spacing);exports.default=function(e){var n=e.icon,t=void 0===n?void 0:n,i=e.title,r=e.description,a=void 0===r?"":r,o=e.actions,c=void 0===o?"":o;return l.createElement(u,null,t&&l.createElement(d,null,t),i,a&&l.createElement(s,null,a),c&&l.createElement(p,null,c))};
|
|
2
2
|
//# sourceMappingURL=empty-state.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.cjs.production.min.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","icon","undefined","title","description","actions","React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty-state.cjs.production.min.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","_templateObject","_taggedTemplateLiteralLoose","spacing","StyledEmptyStateIcon","_templateObject2","StyledEmptyStateDescription","_templateObject3","StyledEmptyStateActions","_templateObject4","_ref","_ref$icon","icon","undefined","title","_ref$description","description","_ref$actions","actions","React"],"mappings":"2SAGA,IAAMA,EAAmBC,EAAOC,IAAGC,IAAAA,EAAAC,iIAKV,EAAVC,WAGTC,EAAuBL,EAAOC,IAAGK,IAAAA,EAAAH,oCACV,EAAVC,WAGbG,EAA8BP,EAAOC,IAAGO,IAAAA,EAAAL,oCACjB,EAAVC,WAGbK,EAA0BT,EAAOC,IAAGS,IAAAA,EAAAP,iCAChB,EAAVC,2BCfG,SAAHO,GAAA,IAAAC,EAAAD,EAAKE,KAAAA,WAAID,OAAGE,EAASF,EAAEG,EAAKJ,EAALI,MAAKC,EAAAL,EAAEM,YAAAA,WAAWD,EAAG,GAAEA,EAAAE,EAAAP,EAAEQ,QAAAA,WAAOD,EAAG,GAAEA,EAAA,OAC1EE,gBAACrB,OACEc,GAAQO,gBAACf,OAAsBQ,GAC/BE,EACAE,GAAeG,gBAACb,OAA6BU,GAC7CE,GAAWC,gBAACX,OAAyBU"}
|
package/dist/empty-state.esm.js
CHANGED
|
@@ -2,67 +2,24 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { spacing } from '@propellerads/stylevariables';
|
|
4
4
|
|
|
5
|
-
function _taggedTemplateLiteralLoose(
|
|
6
|
-
|
|
7
|
-
raw = strings.slice(0);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
strings.raw = raw;
|
|
11
|
-
return strings;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function _templateObject4() {
|
|
15
|
-
var data = _taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n"]);
|
|
16
|
-
|
|
17
|
-
_templateObject4 = function _templateObject4() {
|
|
18
|
-
return data;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return data;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _templateObject3() {
|
|
25
|
-
var data = _taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"]);
|
|
26
|
-
|
|
27
|
-
_templateObject3 = function _templateObject3() {
|
|
28
|
-
return data;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return data;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _templateObject2() {
|
|
35
|
-
var data = _taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"]);
|
|
36
|
-
|
|
37
|
-
_templateObject2 = function _templateObject2() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
5
|
+
function _taggedTemplateLiteralLoose(e, t) {
|
|
6
|
+
return t || (t = e.slice(0)), e.raw = t, e;
|
|
42
7
|
}
|
|
43
8
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
var StyledEmptyState = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject(), spacing * 5);
|
|
54
|
-
var StyledEmptyStateIcon = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject2(), spacing * 9);
|
|
55
|
-
var StyledEmptyStateDescription = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject3(), spacing * 4);
|
|
56
|
-
var StyledEmptyStateActions = /*#__PURE__*/styled.div( /*#__PURE__*/_templateObject4(), spacing * 5);
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
10
|
+
var StyledEmptyState = /*#__PURE__*/styled.div(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ", "px;\n"])), spacing * 5);
|
|
11
|
+
var StyledEmptyStateIcon = /*#__PURE__*/styled.div(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"])), spacing * 9);
|
|
12
|
+
var StyledEmptyStateDescription = /*#__PURE__*/styled.div(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n"])), spacing * 4);
|
|
13
|
+
var StyledEmptyStateActions = /*#__PURE__*/styled.div(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n"])), spacing * 5);
|
|
57
14
|
|
|
58
15
|
var EmptyState = function EmptyState(_ref) {
|
|
59
16
|
var _ref$icon = _ref.icon,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
17
|
+
icon = _ref$icon === void 0 ? undefined : _ref$icon,
|
|
18
|
+
title = _ref.title,
|
|
19
|
+
_ref$description = _ref.description,
|
|
20
|
+
description = _ref$description === void 0 ? '' : _ref$description,
|
|
21
|
+
_ref$actions = _ref.actions,
|
|
22
|
+
actions = _ref$actions === void 0 ? '' : _ref$actions;
|
|
66
23
|
return React.createElement(StyledEmptyState, null, icon && React.createElement(StyledEmptyStateIcon, null, icon), title, description && React.createElement(StyledEmptyStateDescription, null, description), actions && React.createElement(StyledEmptyStateActions, null, actions));
|
|
67
24
|
};
|
|
68
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.esm.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","EmptyState","icon","undefined","title","description","actions","React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty-state.esm.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","_templateObject","_taggedTemplateLiteralLoose","spacing","StyledEmptyStateIcon","_templateObject2","StyledEmptyStateDescription","_templateObject3","StyledEmptyStateActions","_templateObject4","EmptyState","_ref","_ref$icon","icon","undefined","title","_ref$description","description","_ref$actions","actions","React"],"mappings":";;;;;;;;;AAGA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,eAAA,KAAAA,eAAA,gBAAAC,2BAAA,kIAKpBC,OAAO,GAAG,CAAC,CACzB;AAED,IAAMC,oBAAoB,gBAAGL,MAAM,CAACC,GAAG,CAAAK,gBAAA,KAAAA,gBAAA,gBAAAH,2BAAA,qCACpBC,OAAO,GAAG,CAAC,CAC7B;AAED,IAAMG,2BAA2B,gBAAGP,MAAM,CAACC,GAAG,CAAAO,gBAAA,KAAAA,gBAAA,gBAAAL,2BAAA,qCAC3BC,OAAO,GAAG,CAAC,CAC7B;AAED,IAAMK,uBAAuB,gBAAGT,MAAM,CAACC,GAAG,CAAAS,gBAAA,KAAAA,gBAAA,gBAAAP,2BAAA,kCAC1BC,OAAO,GAAG,CAAC,CAC1B;;AChBD,IAAMO,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA;EAAA,IAAAC,SAAA,GAAAD,IAAA,CAAKE,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAGE,SAAS,GAAAF,SAAA;IAAEG,KAAK,GAAAJ,IAAA,CAALI,KAAK;IAAAC,gBAAA,GAAAL,IAAA,CAAEM,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,EAAE,GAAAA,gBAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAAA,OAC1EE,oBAACtB,gBAAgB,QACde,IAAI,IAAIO,oBAAChB,oBAAoB,QAAES,IAAI,CAAwB,EAC3DE,KAAK,EACLE,WAAW,IAAIG,oBAACd,2BAA2B,QAAEW,WAAW,CAA+B,EACvFE,OAAO,IAAIC,oBAACZ,uBAAuB,QAAEW,OAAO,CAA2B,CACvD;AAAA,CACpB;;;;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface EmptyStateProps {
|
|
3
|
-
title:
|
|
4
|
-
icon?:
|
|
5
|
-
description:
|
|
6
|
-
actions:
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
description: ReactNode;
|
|
6
|
+
actions: ReactNode;
|
|
7
7
|
}
|
|
8
8
|
export default class EmptyState extends React.Component<EmptyStateProps> {
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@propellerads/empty-state",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"repository": "https://github.com/propellerads/ui-components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -15,23 +15,22 @@
|
|
|
15
15
|
"node": ">=10"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"prepublishOnly": "tsdx build",
|
|
19
18
|
"start": "tsdx watch",
|
|
20
19
|
"build": "tsdx build"
|
|
21
20
|
},
|
|
22
21
|
"peerDependencies": {
|
|
23
22
|
"react": ">=18 <19",
|
|
24
|
-
"styled-components": "5.1.1"
|
|
25
|
-
"@types/styled-components": "5.1.34"
|
|
23
|
+
"styled-components": "5.1.1"
|
|
26
24
|
},
|
|
27
25
|
"module": "dist/empty-state.esm.js",
|
|
28
26
|
"devDependencies": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
27
|
+
"@types/styled-components": "5.1.35",
|
|
28
|
+
"tsdx": "0.13.3",
|
|
29
|
+
"tslib": "2.0.1",
|
|
30
|
+
"typescript": "4.9.5",
|
|
31
|
+
"@types/react": "18.3.24"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@propellerads/stylevariables": "^
|
|
34
|
+
"@propellerads/stylevariables": "^2.0.1"
|
|
36
35
|
}
|
|
37
36
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, {ReactNode} from 'react';
|
|
2
2
|
|
|
3
3
|
export interface EmptyStateProps {
|
|
4
|
-
title:
|
|
5
|
-
icon?:
|
|
6
|
-
description:
|
|
7
|
-
actions:
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
description: ReactNode;
|
|
7
|
+
actions: ReactNode;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export default class EmptyState extends React.Component<EmptyStateProps> {}
|