@propellerads/empty-state 3.0.1 → 4.0.0
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/index.d.ts +13 -4
- package/dist/index.js +25 -8
- package/dist/index.js.map +1 -0
- package/package.json +28 -23
- package/dist/empty-state.cjs.development.js +0 -33
- package/dist/empty-state.cjs.development.js.map +0 -1
- package/dist/empty-state.cjs.production.min.js +0 -2
- package/dist/empty-state.cjs.production.min.js.map +0 -1
- package/dist/empty-state.esm.js +0 -27
- package/dist/empty-state.esm.js.map +0 -1
- package/dist/style.d.ts +0 -5
- package/dist/types.d.ts +0 -9
- package/src/index.tsx +0 -15
- package/src/style.tsx +0 -24
- package/src/types.ts +0 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type EmptyStateProps = {
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
declare const EmptyState: ({ icon, title, description, actions }: EmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { EmptyState as default };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import t from "styled-components";
|
|
3
|
+
import { spacing as e } from "@propellerads/stylevariables";
|
|
4
|
+
const r = t.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
padding: 0 ${e * 5}px;
|
|
10
|
+
`, c = t.div`
|
|
11
|
+
margin-bottom: ${e * 9}px;
|
|
12
|
+
`, l = t.div`
|
|
13
|
+
margin-bottom: ${e * 4}px;
|
|
14
|
+
`, s = t.div`
|
|
15
|
+
margin-top: ${e * 5}px;
|
|
16
|
+
`, S = ({ icon: n, title: d, description: o, actions: m }) => /* @__PURE__ */ p(r, { children: [
|
|
17
|
+
n && /* @__PURE__ */ i(c, { children: n }),
|
|
18
|
+
d,
|
|
19
|
+
o && /* @__PURE__ */ i(l, { children: o }),
|
|
20
|
+
m && /* @__PURE__ */ i(s, { children: m })
|
|
21
|
+
] });
|
|
22
|
+
export {
|
|
23
|
+
S as default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.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 {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon, 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","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","EmptyState","icon","title","description","actions","jsxs","jsx"],"mappings":";;;AAGA,MAAMA,IAAmBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,eAKjBC,IAAU,CAAC;AAAA,GAGpBC,IAAuBF,EAAO;AAAA,mBACjBC,IAAU,CAAC;AAAA,GAGxBE,IAA8BH,EAAO;AAAA,mBACxBC,IAAU,CAAC;AAAA,GAGxBG,IAA0BJ,EAAO;AAAA,gBACvBC,IAAU,CAAC;AAAA,GCjBrBI,IAAa,CAAC,EAAC,MAAAC,GAAM,OAAAC,GAAO,aAAAC,GAAa,SAAAC,EAAA,MAC7C,gBAAAC,EAACX,GAAA,EACE,UAAA;AAAA,EAAAO,KAAQ,gBAAAK,EAACT,KAAsB,UAAAI,EAAA,CAAK;AAAA,EACpCC;AAAA,EACAC,KAAe,gBAAAG,EAACR,GAAA,EAA6B,UAAAK,EAAA,CAAY;AAAA,EACzDC,KAAW,gBAAAE,EAACP,GAAA,EAAyB,UAAAK,EAAA,CAAQ;AAAA,EAAA,CAChD;"}
|
package/package.json
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@propellerads/empty-state",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
9
12
|
"files": [
|
|
10
|
-
"dist"
|
|
11
|
-
"src"
|
|
13
|
+
"dist"
|
|
12
14
|
],
|
|
15
|
+
"repository": "https://github.com/propellerads/ui-components.git",
|
|
13
16
|
"author": "i.pasyuk@propellerads.net",
|
|
14
|
-
"
|
|
15
|
-
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/propellerads/ui-components/issues"
|
|
16
20
|
},
|
|
17
21
|
"scripts": {
|
|
18
|
-
"
|
|
19
|
-
|
|
22
|
+
"build": "tsc && vite build && rollup -c rollup.dts.config.mjs"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/propellerads/ui-components#readme",
|
|
25
|
+
"private": false,
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@propellerads/stylevariables": "^2.0.2"
|
|
20
28
|
},
|
|
21
29
|
"peerDependencies": {
|
|
22
|
-
"react": "
|
|
23
|
-
"styled-components": "5.1.1"
|
|
30
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
31
|
+
"styled-components": "^5.1.1 || ^6.0.0"
|
|
24
32
|
},
|
|
25
|
-
"module": "dist/empty-state.esm.js",
|
|
26
33
|
"devDependencies": {
|
|
27
|
-
"@types/
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"@propellerads/stylevariables": "^2.0.1"
|
|
34
|
+
"@types/react": "^19.2.14",
|
|
35
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
36
|
+
"rollup": "^4.58.0",
|
|
37
|
+
"rollup-plugin-dts": "^6.3.0",
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"vite": "^7.3.1"
|
|
35
40
|
}
|
|
36
41
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
-
|
|
7
|
-
var React = _interopDefault(require('react'));
|
|
8
|
-
var styled = _interopDefault(require('styled-components'));
|
|
9
|
-
var stylevariables = require('@propellerads/stylevariables');
|
|
10
|
-
|
|
11
|
-
function _taggedTemplateLiteralLoose(e, t) {
|
|
12
|
-
return t || (t = e.slice(0)), e.raw = t, e;
|
|
13
|
-
}
|
|
14
|
-
|
|
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);
|
|
20
|
-
|
|
21
|
-
var EmptyState = function EmptyState(_ref) {
|
|
22
|
-
var _ref$icon = _ref.icon,
|
|
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;
|
|
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));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
exports.default = EmptyState;
|
|
33
|
-
//# sourceMappingURL=empty-state.cjs.development.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=empty-state.cjs.production.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { spacing } from '@propellerads/stylevariables';
|
|
4
|
-
|
|
5
|
-
function _taggedTemplateLiteralLoose(e, t) {
|
|
6
|
-
return t || (t = e.slice(0)), e.raw = t, e;
|
|
7
|
-
}
|
|
8
|
-
|
|
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);
|
|
14
|
-
|
|
15
|
-
var EmptyState = function EmptyState(_ref) {
|
|
16
|
-
var _ref$icon = _ref.icon,
|
|
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;
|
|
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));
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default EmptyState;
|
|
27
|
-
//# sourceMappingURL=empty-state.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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/style.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const StyledEmptyState: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
declare const StyledEmptyStateIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
declare const StyledEmptyStateDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
declare const StyledEmptyStateActions: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export { StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions };
|
package/dist/types.d.ts
DELETED
package/src/index.tsx
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {EmptyStateProps} from './types';
|
|
4
|
-
import {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';
|
|
5
|
-
|
|
6
|
-
const EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (
|
|
7
|
-
<StyledEmptyState>
|
|
8
|
-
{icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}
|
|
9
|
-
{title}
|
|
10
|
-
{description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}
|
|
11
|
-
{actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}
|
|
12
|
-
</StyledEmptyState>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export default EmptyState;
|
package/src/style.tsx
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import {spacing} from '@propellerads/stylevariables';
|
|
3
|
-
|
|
4
|
-
const StyledEmptyState = styled.div`
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
padding: 0 ${spacing * 5}px;
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
const StyledEmptyStateIcon = styled.div`
|
|
13
|
-
margin-bottom: ${spacing * 9}px;
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
const StyledEmptyStateDescription = styled.div`
|
|
17
|
-
margin-bottom: ${spacing * 4}px;
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
const StyledEmptyStateActions = styled.div`
|
|
21
|
-
margin-top: ${spacing * 5}px;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
export {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};
|
package/src/types.ts
DELETED