@desynova-digital/components 8.9.0 → 8.9.4

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.
@@ -82,7 +82,7 @@ var CardV2 = function CardV2(props) {
82
82
  _react2.default.createElement(_thumbnail2.default, props),
83
83
  _react2.default.createElement(_content2.default, props)
84
84
  );
85
- }, []);
85
+ }, [props]);
86
86
 
87
87
  /**
88
88
  * based on width will render the card
@@ -98,7 +98,7 @@ var CardV2 = function CardV2(props) {
98
98
  content()
99
99
  );
100
100
  } else return content();
101
- }, []);
101
+ }, [props]);
102
102
 
103
103
  return _react2.default.createElement(
104
104
  CardStyles,
@@ -111,7 +111,7 @@ var Thumbnail = function Thumbnail(props) {
111
111
  * @const
112
112
  */
113
113
  var index = _tokens.CARD_ASSET_STATUS.findIndex(function (label) {
114
- return label.code.includes(upload_status || card_status ? (upload_status || card_status).toLowerCase().split(" ").join("_") : []);
114
+ return label.code.includes(card_status || upload_status ? (card_status || upload_status).toLowerCase().split(" ").join("_") : []);
115
115
  });
116
116
  setStatusIndex(index);
117
117
  }, [upload_status, card_status]);
@@ -169,7 +169,7 @@ var Thumbnail = function Thumbnail(props) {
169
169
  position: "relative",
170
170
  zIndex: "2"
171
171
  },
172
- (upload_status || card_status) && statusIndex && _react2.default.createElement(
172
+ (card_status || upload_status) && statusIndex && _react2.default.createElement(
173
173
  StatusBoxStyles,
174
174
  {
175
175
  hex: _tokens.CARD_ASSET_STATUS[statusIndex] ? _tokens.CARD_ASSET_STATUS[statusIndex].hex : { background: "#AFB2BA" }
@@ -183,7 +183,7 @@ var Thumbnail = function Thumbnail(props) {
183
183
  fontSize: "10px",
184
184
  color: "#FFF"
185
185
  },
186
- upload_status || card_status
186
+ card_status || upload_status
187
187
  )
188
188
  ),
189
189
  actions && actions.length > 0 && actions.map(function (item, i) {
@@ -114,7 +114,7 @@ var Checkbox = function Checkbox(props) {
114
114
  {
115
115
  theme: props.theme,
116
116
  selected: props.defaultChecked,
117
- className: props.isDisabled ? "disabled" : ""
117
+ className: props.isDisabled && props.access !== 'read' ? "disabled" : ""
118
118
  },
119
119
  props.children
120
120
  ) : null,
@@ -166,7 +166,8 @@ var CheckboxGroup = function CheckboxGroup(props) {
166
166
  onChange: child.props.isDisabled ? props.onChange : function () {},
167
167
  theme: props.theme,
168
168
  type: props.type,
169
- fillRule: props.fillRule || ''
169
+ fillRule: props.fillRule || '',
170
+ access: child.props.access
170
171
  }) : null;
171
172
  })
172
173
  );
@@ -184,7 +185,8 @@ Checkbox.propTypes = {
184
185
  /** Callback function which is called when the user selects an option */
185
186
  onChange: _propTypes2.default.func,
186
187
  type: _propTypes2.default.oneOf(["default", "label", "switch"]),
187
- fillRule: _propTypes2.default.string
188
+ fillRule: _propTypes2.default.string,
189
+ access: _propTypes2.default.string
188
190
  };
189
191
 
190
192
  Checkbox.defaultProps = {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.__ICONNAMES__ = undefined;
7
7
 
8
- var _templateObject = _taggedTemplateLiteral(['\n display: inline-block;\n line-height: 1;\n'], ['\n display: inline-block;\n line-height: 1;\n']),
8
+ var _templateObject = _taggedTemplateLiteral(['\n display: inline-block;\n line-height: 1;\n user-select: none;\n -webkit-user-select: none; /* webkit (safari, chrome) browsers */\n -moz-user-select: none; /* mozilla browsers */\n -khtml-user-select: none; /* webkit (konqueror) browsers */\n -ms-user-select: none; /* IE10+ */\n'], ['\n display: inline-block;\n line-height: 1;\n user-select: none;\n -webkit-user-select: none; /* webkit (safari, chrome) browsers */\n -moz-user-select: none; /* mozilla browsers */\n -khtml-user-select: none; /* webkit (konqueror) browsers */\n -ms-user-select: none; /* IE10+ */\n']),
9
9
  _templateObject2 = _taggedTemplateLiteral(['\n display: inline-block;\n vertical-align: middle;\n line-height: 1;\n path {\n fill: ', ';\n }\n'], ['\n display: inline-block;\n vertical-align: middle;\n line-height: 1;\n path {\n fill: ', ';\n }\n']);
10
10
 
11
11
  var _react = require('react');
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@desynova-digital/components",
3
- "version": "8.9.0",
3
+ "version": "8.9.4",
4
4
  "description": "Components for Desynova Digital",
5
5
  "main": "index.js",
6
6
  "author": "desynova-digital",
7
7
  "license": "MIT",
8
8
  "repository": "desynova-digital",
9
9
  "dependencies": {
10
- "@desynova-digital/tokens": "8.9.0",
10
+ "@desynova-digital/tokens": "8.9.4",
11
11
  "prop-types": "^15.7.2",
12
12
  "styled-components": "^4.3.2"
13
13
  },