@propellerads/card 2.3.0 → 3.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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### `3.0.0`
2
+ * added onClick prop
3
+ * migrated to TypeScript
4
+
1
5
  #### `2.3.0`
2
6
  * it's possible to overwrite default padding and border-radius
3
7
 
@@ -0,0 +1,71 @@
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 = require('styled-components');
9
+ var styled__default = _interopDefault(styled);
10
+ var stylevariables = require('@propellerads/stylevariables');
11
+
12
+ function _taggedTemplateLiteralLoose(strings, raw) {
13
+ if (!raw) {
14
+ raw = strings.slice(0);
15
+ }
16
+ strings.raw = raw;
17
+ return strings;
18
+ }
19
+
20
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
21
+ var StyledCard = /*#__PURE__*/styled__default.div(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 100%;\n border-radius: ", "px;\n border: solid 2px ", ";\n background-color: ", ";\n padding: ", "px;\n \n ", "\n\n ", "\n\n ", "\n"])), stylevariables.borderRadius, stylevariables.gray95, stylevariables.white, stylevariables.spacing * 6, function (props) {
22
+ return props.isActive && styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n "])), stylevariables.actionColor);
23
+ }, function (props) {
24
+ return props.padding && styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n padding: ", "px;\n "])), props.padding);
25
+ }, function (props) {
26
+ return props.borderRadius && styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n border-radius: ", "px;\n "])), props.borderRadius);
27
+ });
28
+ var Header = /*#__PURE__*/styled__default.div(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n margin-bottom: ", "px; \n"])), stylevariables.spacing * 3);
29
+ var Title = /*#__PURE__*/styled__default.div(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n font-size: ", "px;\n font-weight: bold;\n line-height: ", "px;\n color: ", ";\n"])), stylevariables.fontBig, stylevariables.lineHeight, stylevariables.black);
30
+ var Label = /*#__PURE__*/styled__default.div(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n align-items: flex-start;\n justify-content: flex-end;\n display: flex;\n"])));
31
+ var Action = /*#__PURE__*/styled__default.div(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n \n button + button{\n margin-left: ", "px;\n }\n"])), stylevariables.spacing * 4, stylevariables.spacing * 2);
32
+
33
+ var Card = function Card(_ref) {
34
+ var children = _ref.children,
35
+ _ref$title = _ref.title,
36
+ title = _ref$title === void 0 ? undefined : _ref$title,
37
+ _ref$action = _ref.action,
38
+ action = _ref$action === void 0 ? undefined : _ref$action,
39
+ _ref$label = _ref.label,
40
+ label = _ref$label === void 0 ? undefined : _ref$label,
41
+ _ref$isActive = _ref.isActive,
42
+ isActive = _ref$isActive === void 0 ? false : _ref$isActive,
43
+ _ref$width = _ref.width,
44
+ width = _ref$width === void 0 ? undefined : _ref$width,
45
+ _ref$padding = _ref.padding,
46
+ padding = _ref$padding === void 0 ? undefined : _ref$padding,
47
+ _ref$borderRadius = _ref.borderRadius,
48
+ borderRadius = _ref$borderRadius === void 0 ? undefined : _ref$borderRadius,
49
+ _ref$elementId = _ref.elementId,
50
+ elementId = _ref$elementId === void 0 ? undefined : _ref$elementId,
51
+ _ref$onClick = _ref.onClick,
52
+ onClick = _ref$onClick === void 0 ? undefined : _ref$onClick;
53
+ var handleClick = function handleClick() {
54
+ if (onClick) {
55
+ onClick(elementId);
56
+ }
57
+ };
58
+ return React.createElement(StyledCard, {
59
+ style: {
60
+ width: width
61
+ },
62
+ isActive: isActive,
63
+ id: elementId,
64
+ borderRadius: borderRadius,
65
+ padding: padding,
66
+ onClick: handleClick
67
+ }, (title || label) && React.createElement(Header, null, title && React.createElement(Title, null, title), label && React.createElement(Label, null, label)), React.createElement("div", null, children), action && React.createElement(Action, null, action));
68
+ };
69
+
70
+ exports.default = Card;
71
+ //# sourceMappingURL=card.cjs.development.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.cjs.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";function n(n){return n&&"object"==typeof n&&"default"in n?n.default:n}Object.defineProperty(exports,"__esModule",{value:!0});var e,i,t,d,r,o,l,a,c=n(require("react")),s=require("styled-components"),u=n(s),v=require("@propellerads/stylevariables");function p(n,e){return e||(e=n.slice(0)),n.raw=e,n}var f=u.div(e||(e=p(["\n height: 100%;\n border-radius: ","px;\n border: solid 2px ",";\n background-color: ",";\n padding: ","px;\n \n ","\n\n ","\n\n ","\n"])),v.borderRadius,v.gray95,v.white,6*v.spacing,(function(n){return n.isActive&&s.css(i||(i=p(["\n border-color: ",";\n "])),v.actionColor)}),(function(n){return n.padding&&s.css(t||(t=p(["\n padding: ","px;\n "])),n.padding)}),(function(n){return n.borderRadius&&s.css(d||(d=p(["\n border-radius: ","px;\n "])),n.borderRadius)})),g=u.div(r||(r=p(["\n display: flex;\n margin-bottom: ","px; \n"])),3*v.spacing),b=u.div(o||(o=p(["\n flex: 1;\n font-size: ","px;\n font-weight: bold;\n line-height: ","px;\n color: ",";\n"])),v.fontBig,v.lineHeight,v.black),x=u.div(l||(l=p(["\n flex: 1;\n align-items: flex-start;\n justify-content: flex-end;\n display: flex;\n"]))),m=u.div(a||(a=p(["\n margin-top: ","px;\n \n button + button{\n margin-left: ","px;\n }\n"])),4*v.spacing,2*v.spacing);exports.default=function(n){var e=n.children,i=n.title,t=void 0===i?void 0:i,d=n.action,r=void 0===d?void 0:d,o=n.label,l=void 0===o?void 0:o,a=n.isActive,s=n.width,u=n.padding,v=n.borderRadius,p=n.elementId,h=void 0===p?void 0:p,y=n.onClick,E=void 0===y?void 0:y;return c.createElement(f,{style:{width:void 0===s?void 0:s},isActive:void 0!==a&&a,id:h,borderRadius:void 0===v?void 0:v,padding:void 0===u?void 0:u,onClick:function(){E&&E(h)}},(t||l)&&c.createElement(g,null,t&&c.createElement(b,null,t),l&&c.createElement(x,null,l)),c.createElement("div",null,e),r&&c.createElement(m,null,r))};
2
+ //# sourceMappingURL=card.cjs.production.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.cjs.production.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import styled, { css } from 'styled-components';
3
+ import { borderRadius, gray95, white, spacing, actionColor, fontBig, lineHeight, black } from '@propellerads/stylevariables';
4
+
5
+ function _taggedTemplateLiteralLoose(strings, raw) {
6
+ if (!raw) {
7
+ raw = strings.slice(0);
8
+ }
9
+ strings.raw = raw;
10
+ return strings;
11
+ }
12
+
13
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
14
+ var StyledCard = /*#__PURE__*/styled.div(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n height: 100%;\n border-radius: ", "px;\n border: solid 2px ", ";\n background-color: ", ";\n padding: ", "px;\n \n ", "\n\n ", "\n\n ", "\n"])), borderRadius, gray95, white, spacing * 6, function (props) {
15
+ return props.isActive && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n "])), actionColor);
16
+ }, function (props) {
17
+ return props.padding && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n padding: ", "px;\n "])), props.padding);
18
+ }, function (props) {
19
+ return props.borderRadius && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n border-radius: ", "px;\n "])), props.borderRadius);
20
+ });
21
+ var Header = /*#__PURE__*/styled.div(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n margin-bottom: ", "px; \n"])), spacing * 3);
22
+ var Title = /*#__PURE__*/styled.div(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n font-size: ", "px;\n font-weight: bold;\n line-height: ", "px;\n color: ", ";\n"])), fontBig, lineHeight, black);
23
+ var Label = /*#__PURE__*/styled.div(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n align-items: flex-start;\n justify-content: flex-end;\n display: flex;\n"])));
24
+ var Action = /*#__PURE__*/styled.div(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n \n button + button{\n margin-left: ", "px;\n }\n"])), spacing * 4, spacing * 2);
25
+
26
+ var Card = function Card(_ref) {
27
+ var children = _ref.children,
28
+ _ref$title = _ref.title,
29
+ title = _ref$title === void 0 ? undefined : _ref$title,
30
+ _ref$action = _ref.action,
31
+ action = _ref$action === void 0 ? undefined : _ref$action,
32
+ _ref$label = _ref.label,
33
+ label = _ref$label === void 0 ? undefined : _ref$label,
34
+ _ref$isActive = _ref.isActive,
35
+ isActive = _ref$isActive === void 0 ? false : _ref$isActive,
36
+ _ref$width = _ref.width,
37
+ width = _ref$width === void 0 ? undefined : _ref$width,
38
+ _ref$padding = _ref.padding,
39
+ padding = _ref$padding === void 0 ? undefined : _ref$padding,
40
+ _ref$borderRadius = _ref.borderRadius,
41
+ borderRadius = _ref$borderRadius === void 0 ? undefined : _ref$borderRadius,
42
+ _ref$elementId = _ref.elementId,
43
+ elementId = _ref$elementId === void 0 ? undefined : _ref$elementId,
44
+ _ref$onClick = _ref.onClick,
45
+ onClick = _ref$onClick === void 0 ? undefined : _ref$onClick;
46
+ var handleClick = function handleClick() {
47
+ if (onClick) {
48
+ onClick(elementId);
49
+ }
50
+ };
51
+ return React.createElement(StyledCard, {
52
+ style: {
53
+ width: width
54
+ },
55
+ isActive: isActive,
56
+ id: elementId,
57
+ borderRadius: borderRadius,
58
+ padding: padding,
59
+ onClick: handleClick
60
+ }, (title || label) && React.createElement(Header, null, title && React.createElement(Title, null, title), label && React.createElement(Label, null, label)), React.createElement("div", null, children), action && React.createElement(Action, null, action));
61
+ };
62
+
63
+ export default Card;
64
+ //# sourceMappingURL=card.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,14 @@
1
+ interface IProps {
2
+ title?: string | Node;
3
+ action?: string | Node;
4
+ label?: string | Node;
5
+ children: string | Node;
6
+ isActive?: boolean;
7
+ width?: string | number;
8
+ padding?: number;
9
+ borderRadius?: number;
10
+ elementId?: string;
11
+ onClick?: (string: any) => string;
12
+ }
13
+ declare const Card: ({ children, title, action, label, isActive, width, padding, borderRadius, elementId, onClick, }: IProps) => JSX.Element;
14
+ export default Card;
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ 'use strict'
3
+
4
+ if (process.env.NODE_ENV === 'production') {
5
+ module.exports = require('./card.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./card.cjs.development.js')
8
+ }
@@ -0,0 +1,14 @@
1
+ interface IProps {
2
+ isActive: boolean;
3
+ padding?: number;
4
+ borderRadius?: number;
5
+ style: {
6
+ width: number | string | undefined;
7
+ };
8
+ }
9
+ declare const StyledCard: import("styled-components").StyledComponent<"div", any, IProps, never>;
10
+ declare const Header: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ declare const Title: import("styled-components").StyledComponent<"div", any, {}, never>;
12
+ declare const Label: import("styled-components").StyledComponent<"div", any, {}, never>;
13
+ declare const Action: import("styled-components").StyledComponent<"div", any, {}, never>;
14
+ export { StyledCard, Header, Title, Label, Action, };
package/package.json CHANGED
@@ -1,39 +1,36 @@
1
1
  {
2
2
  "name": "@propellerads/card",
3
- "version": "2.3.0",
4
- "main": "dist/index.esm.js",
5
- "module": "dist/index.esm.js",
3
+ "version": "3.0.0",
4
+ "main": "dist/index.js",
5
+ "module": "dist/card.esm.js",
6
+ "typings": "dist/index.d.ts",
6
7
  "files": [
7
8
  "dist"
8
9
  ],
9
10
  "repository": "https://github.com/propellerads/ui-components.git",
10
11
  "author": "i.pasyuk@propellerads.net",
11
12
  "license": "MIT",
13
+ "private": false,
12
14
  "bugs": {
13
15
  "url": "https://github.com/propellerads/ui-components/issues"
14
16
  },
17
+ "homepage": "https://github.com/propellerads/ui-components#readme",
15
18
  "scripts": {
16
- "prepublishOnly": "rollup -c"
19
+ "prepublishOnly": "tsdx build",
20
+ "start": "tsdx watch",
21
+ "build": "tsdx build"
17
22
  },
18
- "homepage": "https://github.com/propellerads/ui-components#readme",
19
- "private": false,
20
23
  "dependencies": {
21
- "@propellerads/stylevariables": "^1.3.0"
24
+ "@propellerads/stylevariables": "^1.3.1"
22
25
  },
23
26
  "devDependencies": {
24
- "@babel/core": "^7.10.2",
25
- "@babel/plugin-proposal-object-rest-spread": "^7.10.1",
26
- "@babel/plugin-transform-react-jsx": "^7.10.1",
27
- "@babel/preset-env": "^7.10.2",
28
- "@babel/preset-react": "^7.10.1",
29
- "rollup": "^2.16.1",
30
- "rollup-plugin-babel": "^4.4.0",
31
- "rollup-plugin-terser": "^6.1.0"
27
+ "tsdx": "^0.14.1",
28
+ "tslib": "^2.3.1",
29
+ "typescript": "^4.4.2"
32
30
  },
33
31
  "peerDependencies": {
34
- "prop-types": "15.7.2",
35
32
  "react": "^17.0.2",
36
33
  "styled-components": "5.1.1"
37
34
  },
38
- "gitHead": "8d780bf408f304bcce8402f0224163981495f3de"
35
+ "gitHead": "99cc04ab639c3957e82da4b01e15d7ee980bb311"
39
36
  }
package/dist/index.esm.js DELETED
@@ -1,152 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import styled, { css } from 'styled-components';
4
- import { borderRadius, gray95, white, spacing, actionColor, fontBig, lineHeight, black } from '@propellerads/stylevariables';
5
-
6
- function _taggedTemplateLiteral(strings, raw) {
7
- if (!raw) {
8
- raw = strings.slice(0);
9
- }
10
-
11
- return Object.freeze(Object.defineProperties(strings, {
12
- raw: {
13
- value: Object.freeze(raw)
14
- }
15
- }));
16
- }
17
-
18
- function _templateObject8() {
19
- var data = _taggedTemplateLiteral(["\n margin-top: ", "px;\n \n button + button{\n margin-left: ", "px;\n }\n"]);
20
-
21
- _templateObject8 = function _templateObject8() {
22
- return data;
23
- };
24
-
25
- return data;
26
- }
27
-
28
- function _templateObject7() {
29
- var data = _taggedTemplateLiteral(["\n flex: 1;\n align-items: flex-start;\n justify-content: flex-end;\n display: flex;\n"]);
30
-
31
- _templateObject7 = function _templateObject7() {
32
- return data;
33
- };
34
-
35
- return data;
36
- }
37
-
38
- function _templateObject6() {
39
- var data = _taggedTemplateLiteral(["\n flex: 1;\n font-size: ", "px;\n font-weight: bold;\n line-height: ", "px;\n color: ", ";\n"]);
40
-
41
- _templateObject6 = function _templateObject6() {
42
- return data;
43
- };
44
-
45
- return data;
46
- }
47
-
48
- function _templateObject5() {
49
- var data = _taggedTemplateLiteral(["\n display: flex;\n margin-bottom: ", "px; \n"]);
50
-
51
- _templateObject5 = function _templateObject5() {
52
- return data;
53
- };
54
-
55
- return data;
56
- }
57
-
58
- function _templateObject4() {
59
- var data = _taggedTemplateLiteral(["\n border-radius: ", "px;\n "]);
60
-
61
- _templateObject4 = function _templateObject4() {
62
- return data;
63
- };
64
-
65
- return data;
66
- }
67
-
68
- function _templateObject3() {
69
- var data = _taggedTemplateLiteral(["\n padding: ", "px;\n "]);
70
-
71
- _templateObject3 = function _templateObject3() {
72
- return data;
73
- };
74
-
75
- return data;
76
- }
77
-
78
- function _templateObject2() {
79
- var data = _taggedTemplateLiteral(["\n border-color: ", ";\n "]);
80
-
81
- _templateObject2 = function _templateObject2() {
82
- return data;
83
- };
84
-
85
- return data;
86
- }
87
-
88
- function _templateObject() {
89
- var data = _taggedTemplateLiteral(["\n height: 100%;\n border-radius: ", "px;\n border: solid 2px ", ";\n background-color: ", ";\n padding: ", "px;\n \n ", "\n\n ", "\n\n ", "\n"]);
90
-
91
- _templateObject = function _templateObject() {
92
- return data;
93
- };
94
-
95
- return data;
96
- }
97
- var StyledCard = styled.div(_templateObject(), borderRadius, gray95, white, spacing * 6, function (props) {
98
- return props.isActive && css(_templateObject2(), actionColor);
99
- }, function (props) {
100
- return props.padding && css(_templateObject3(), props.padding);
101
- }, function (props) {
102
- return props.borderRadius && css(_templateObject4(), props.borderRadius);
103
- });
104
- var Header = styled.div(_templateObject5(), spacing * 3);
105
- var Title = styled.div(_templateObject6(), fontBig, lineHeight, black);
106
- var Label = styled.div(_templateObject7());
107
- var Action = styled.div(_templateObject8(), spacing * 4, spacing * 2);
108
-
109
- var Card = function Card(_ref) {
110
- var children = _ref.children,
111
- title = _ref.title,
112
- action = _ref.action,
113
- label = _ref.label,
114
- isActive = _ref.isActive,
115
- width = _ref.width,
116
- padding = _ref.padding,
117
- borderRadius = _ref.borderRadius,
118
- elementId = _ref.elementId;
119
- return /*#__PURE__*/React.createElement(StyledCard, {
120
- style: {
121
- width: width
122
- },
123
- isActive: isActive,
124
- id: elementId,
125
- borderRadius: borderRadius,
126
- padding: padding
127
- }, (title || label) && /*#__PURE__*/React.createElement(Header, null, title && /*#__PURE__*/React.createElement(Title, null, title), label && /*#__PURE__*/React.createElement(Label, null, label)), /*#__PURE__*/React.createElement("div", null, children), action && /*#__PURE__*/React.createElement(Action, null, action));
128
- };
129
-
130
- Card.propTypes = {
131
- title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
132
- action: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
133
- label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
134
- children: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.node]).isRequired,
135
- isActive: PropTypes.bool,
136
- width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
137
- padding: PropTypes.oneOfType([PropTypes.number]),
138
- borderRadius: PropTypes.oneOfType([PropTypes.number]),
139
- elementId: PropTypes.string
140
- };
141
- Card.defaultProps = {
142
- isActive: false,
143
- title: undefined,
144
- action: undefined,
145
- label: undefined,
146
- width: undefined,
147
- padding: undefined,
148
- borderRadius: undefined,
149
- elementId: undefined
150
- };
151
-
152
- export default Card;
@@ -1 +0,0 @@
1
- import n from"react";import e from"prop-types";import r,{css as t}from"styled-components";import{borderRadius as i,gray95 as o,white as d,spacing as u,actionColor as l,fontBig as a,lineHeight as c,black as f}from"@propellerads/stylevariables";function p(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}function s(){var n=p(["\n margin-top: ","px;\n \n button + button{\n margin-left: ","px;\n }\n"]);return s=function(){return n},n}function m(){var n=p(["\n flex: 1;\n align-items: flex-start;\n justify-content: flex-end;\n display: flex;\n"]);return m=function(){return n},n}function v(){var n=p(["\n flex: 1;\n font-size: ","px;\n font-weight: bold;\n line-height: ","px;\n color: ",";\n"]);return v=function(){return n},n}function b(){var n=p(["\n display: flex;\n margin-bottom: ","px; \n"]);return b=function(){return n},n}function g(){var n=p(["\n border-radius: ","px;\n "]);return g=function(){return n},n}function x(){var n=p(["\n padding: ","px;\n "]);return x=function(){return n},n}function y(){var n=p(["\n border-color: ",";\n "]);return y=function(){return n},n}function h(){var n=p(["\n height: 100%;\n border-radius: ","px;\n border: solid 2px ",";\n background-color: ",";\n padding: ","px;\n \n ","\n\n ","\n\n ","\n"]);return h=function(){return n},n}var O=r.div(h(),i,o,d,6*u,(function(n){return n.isActive&&t(y(),l)}),(function(n){return n.padding&&t(x(),n.padding)}),(function(n){return n.borderRadius&&t(g(),n.borderRadius)})),T=r.div(b(),3*u),R=r.div(v(),a,c,f),w=r.div(m()),E=r.div(s(),4*u,2*u),A=function(e){var r=e.children,t=e.title,i=e.action,o=e.label,d=e.isActive,u=e.width,l=e.padding,a=e.borderRadius,c=e.elementId;return n.createElement(O,{style:{width:u},isActive:d,id:c,borderRadius:a,padding:l},(t||o)&&n.createElement(T,null,t&&n.createElement(R,null,t),o&&n.createElement(w,null,o)),n.createElement("div",null,r),i&&n.createElement(E,null,i))};A.propTypes={title:e.oneOfType([e.string,e.element]),action:e.oneOfType([e.string,e.element]),label:e.oneOfType([e.string,e.element]),children:e.oneOfType([e.string,e.element,e.node]).isRequired,isActive:e.bool,width:e.oneOfType([e.number,e.string]),padding:e.oneOfType([e.number]),borderRadius:e.oneOfType([e.number]),elementId:e.string},A.defaultProps={isActive:!1,title:void 0,action:void 0,label:void 0,width:void 0,padding:void 0,borderRadius:void 0,elementId:void 0};export default A;