@propellerads/card 2.0.0 → 2.2.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,14 @@
1
+ #### `2.2.0`
2
+ * updated `width` type - now it could be a number or a string
3
+ * marked unused dependencies to `peerDependencies`
4
+
5
+ #### `2.1.0`
6
+ * update style-variables
7
+
8
+ #### `2.0.1`
9
+
10
+ * Styles changes: borders
11
+
1
12
  #### `2.0.0`
2
13
 
3
14
  * update deps
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled, { css } from 'styled-components';
4
- import { borderRadius, gray95, white, spacing, fontBig, lineHeight, black } from '@propellerads/stylevariables';
4
+ import { borderRadius, gray95, white, spacing, actionColor, fontBig, lineHeight, black } from '@propellerads/stylevariables';
5
5
 
6
6
  function _taggedTemplateLiteral(strings, raw) {
7
7
  if (!raw) {
@@ -56,7 +56,7 @@ function _templateObject3() {
56
56
  }
57
57
 
58
58
  function _templateObject2() {
59
- var data = _taggedTemplateLiteral(["\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);\n border: 0;\n "]);
59
+ var data = _taggedTemplateLiteral(["\n border-color: ", ";\n "]);
60
60
 
61
61
  _templateObject2 = function _templateObject2() {
62
62
  return data;
@@ -74,8 +74,8 @@ function _templateObject() {
74
74
 
75
75
  return data;
76
76
  }
77
- var StyledCard = styled.div(_templateObject(), borderRadius * 2, gray95, white, spacing * 6, function (props) {
78
- return props.isActive && css(_templateObject2());
77
+ var StyledCard = styled.div(_templateObject(), borderRadius, gray95, white, spacing * 6, function (props) {
78
+ return props.isActive && css(_templateObject2(), actionColor);
79
79
  });
80
80
  var Header = styled.div(_templateObject3(), spacing * 3);
81
81
  var Title = styled.div(_templateObject4(), fontBig, lineHeight, black);
@@ -105,7 +105,7 @@ Card.propTypes = {
105
105
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
106
106
  children: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.node]).isRequired,
107
107
  isActive: PropTypes.bool,
108
- width: PropTypes.number,
108
+ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
109
109
  elementId: PropTypes.string
110
110
  };
111
111
  Card.defaultProps = {
@@ -1 +1 @@
1
- import e from"react";import n from"prop-types";import t,{css as r}from"styled-components";import{borderRadius as i,gray95 as o,white as l,spacing as u,fontBig as c,lineHeight as d,black as a}from"@propellerads/stylevariables";function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function p(){var e=f(["\n margin-top: ","px;\n \n button + button{\n margin-left: ","px;\n }\n"]);return p=function(){return e},e}function s(){var e=f(["\n flex: 1;\n align-items: flex-start;\n justify-content: flex-end;\n display: flex;\n"]);return s=function(){return e},e}function m(){var e=f(["\n flex: 1;\n font-size: ","px;\n font-weight: bold;\n line-height: ","px;\n color: ",";\n"]);return m=function(){return e},e}function v(){var e=f(["\n display: flex;\n margin-bottom: ","px; \n"]);return v=function(){return e},e}function b(){var e=f(["\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);\n border: 0;\n "]);return b=function(){return e},e}function x(){var e=f(["\n height: 100%;\n border-radius: ","px;\n border: solid 2px ",";\n background-color: ",";\n padding: ","px;\n \n ","\n"]);return x=function(){return e},e}var g=t.div(x(),2*i,o,l,6*u,(function(e){return e.isActive&&r(b())})),h=t.div(v(),3*u),y=t.div(m(),c,d,a),w=t.div(s()),O=t.div(p(),4*u,2*u),E=function(n){var t=n.children,r=n.title,i=n.action,o=n.label,l=n.isActive,u=n.width,c=n.elementId;return e.createElement(g,{style:{width:u},isActive:l,id:c},(r||o)&&e.createElement(h,null,r&&e.createElement(y,null,r),o&&e.createElement(w,null,o)),e.createElement("div",null,t),i&&e.createElement(O,null,i))};E.propTypes={title:n.oneOfType([n.string,n.element]),action:n.oneOfType([n.string,n.element]),label:n.oneOfType([n.string,n.element]),children:n.oneOfType([n.string,n.element,n.node]).isRequired,isActive:n.bool,width:n.number,elementId:n.string},E.defaultProps={isActive:!1,title:void 0,action:void 0,label:void 0,width:void 0,elementId:void 0};export default E;
1
+ import e from"react";import n from"prop-types";import t,{css as r}from"styled-components";import{borderRadius as i,gray95 as o,white as l,spacing as u,actionColor as c,fontBig as d,lineHeight as f,black as a}from"@propellerads/stylevariables";function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function s(){var e=p(["\n margin-top: ","px;\n \n button + button{\n margin-left: ","px;\n }\n"]);return s=function(){return e},e}function m(){var e=p(["\n flex: 1;\n align-items: flex-start;\n justify-content: flex-end;\n display: flex;\n"]);return m=function(){return e},e}function v(){var e=p(["\n flex: 1;\n font-size: ","px;\n font-weight: bold;\n line-height: ","px;\n color: ",";\n"]);return v=function(){return e},e}function b(){var e=p(["\n display: flex;\n margin-bottom: ","px; \n"]);return b=function(){return e},e}function g(){var e=p(["\n border-color: ",";\n "]);return g=function(){return e},e}function x(){var e=p(["\n height: 100%;\n border-radius: ","px;\n border: solid 2px ",";\n background-color: ",";\n padding: ","px;\n \n ","\n"]);return x=function(){return e},e}var y=t.div(x(),i,o,l,6*u,(function(e){return e.isActive&&r(g(),c)})),h=t.div(b(),3*u),O=t.div(v(),d,f,a),w=t.div(m()),E=t.div(s(),4*u,2*u),T=function(n){var t=n.children,r=n.title,i=n.action,o=n.label,l=n.isActive,u=n.width,c=n.elementId;return e.createElement(y,{style:{width:u},isActive:l,id:c},(r||o)&&e.createElement(h,null,r&&e.createElement(O,null,r),o&&e.createElement(w,null,o)),e.createElement("div",null,t),i&&e.createElement(E,null,i))};T.propTypes={title:n.oneOfType([n.string,n.element]),action:n.oneOfType([n.string,n.element]),label:n.oneOfType([n.string,n.element]),children:n.oneOfType([n.string,n.element,n.node]).isRequired,isActive:n.bool,width:n.oneOfType([n.number,n.string]),elementId:n.string},T.defaultProps={isActive:!1,title:void 0,action:void 0,label:void 0,width:void 0,elementId:void 0};export default T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@propellerads/card",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "main": "dist/index.esm.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "files": [
@@ -18,7 +18,7 @@
18
18
  "homepage": "https://github.com/propellerads/ui-components#readme",
19
19
  "private": false,
20
20
  "dependencies": {
21
- "@propellerads/stylevariables": "^1.1.0"
21
+ "@propellerads/stylevariables": "^1.3.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@babel/core": "^7.10.2",
@@ -26,10 +26,14 @@
26
26
  "@babel/plugin-transform-react-jsx": "^7.10.1",
27
27
  "@babel/preset-env": "^7.10.2",
28
28
  "@babel/preset-react": "^7.10.1",
29
- "react": "^16.13.1",
30
29
  "rollup": "^2.16.1",
31
30
  "rollup-plugin-babel": "^4.4.0",
32
- "rollup-plugin-terser": "^6.1.0",
33
- "styled-components": "^5.1.1"
34
- }
31
+ "rollup-plugin-terser": "^6.1.0"
32
+ },
33
+ "peerDependencies": {
34
+ "prop-types": "15.7.2",
35
+ "react": "^17.0.2",
36
+ "styled-components": "5.1.1"
37
+ },
38
+ "gitHead": "68a3e764dcf0f368edd5473ec6a44fc5617e3dca"
35
39
  }