@propellerads/icon 6.0.1 → 6.0.2

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.
@@ -10,28 +10,17 @@ var styled = require('styled-components');
10
10
  var styled__default = _interopDefault(styled);
11
11
  var stylevariables = require('@propellerads/stylevariables');
12
12
 
13
- function _objectWithoutPropertiesLoose(source, excluded) {
14
- if (source == null) return {};
15
- var target = {};
16
- var sourceKeys = Object.keys(source);
17
- var key, i;
18
-
19
- for (i = 0; i < sourceKeys.length; i++) {
20
- key = sourceKeys[i];
21
- if (excluded.indexOf(key) >= 0) continue;
22
- target[key] = source[key];
13
+ function _objectWithoutPropertiesLoose(r, e) {
14
+ if (null == r) return {};
15
+ var t = {};
16
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
17
+ if (-1 !== e.indexOf(n)) continue;
18
+ t[n] = r[n];
23
19
  }
24
-
25
- return target;
20
+ return t;
26
21
  }
27
-
28
- function _taggedTemplateLiteralLoose(strings, raw) {
29
- if (!raw) {
30
- raw = strings.slice(0);
31
- }
32
-
33
- strings.raw = raw;
34
- return strings;
22
+ function _taggedTemplateLiteralLoose(e, t) {
23
+ return t || (t = e.slice(0)), e.raw = t, e;
35
24
  }
36
25
 
37
26
  (function (SIZE) {
@@ -42,7 +31,6 @@ function _taggedTemplateLiteralLoose(strings, raw) {
42
31
  SIZE["LARGE"] = "large";
43
32
  SIZE["EXTRA_LARGE"] = "extra-large";
44
33
  })(exports.SIZE || (exports.SIZE = {}));
45
-
46
34
  (function (COLOR) {
47
35
  COLOR["BLACK"] = "black";
48
36
  COLOR["WHITE"] = "white";
@@ -74,50 +62,37 @@ var StyledIcon = /*#__PURE__*/styled__default.svg(_templateObject || (_templateO
74
62
  });
75
63
 
76
64
  var _excluded = ["children", "size", "color", "hoverColor"];
77
-
78
65
  var getColor = function getColor(color, theme) {
79
66
  var _theme$actionColor, _theme$successColor, _theme$errorColor, _theme$warningColor;
80
-
81
67
  switch (color) {
82
68
  case exports.COLOR.WHITE:
83
69
  return stylevariables.white;
84
-
85
70
  case exports.COLOR.BLUE:
86
71
  return (theme === null || theme === void 0 ? void 0 : (_theme$actionColor = theme.actionColor) === null || _theme$actionColor === void 0 ? void 0 : _theme$actionColor.main) || stylevariables.actionColor;
87
-
88
72
  case exports.COLOR.GRAY:
89
73
  return stylevariables.gray70;
90
-
91
74
  case exports.COLOR.GRAY_DARK:
92
75
  return stylevariables.gray50;
93
-
94
76
  case exports.COLOR.SUCCESS:
95
77
  return (theme === null || theme === void 0 ? void 0 : (_theme$successColor = theme.successColor) === null || _theme$successColor === void 0 ? void 0 : _theme$successColor.main) || stylevariables.successColor;
96
-
97
78
  case exports.COLOR.ERROR:
98
79
  return (theme === null || theme === void 0 ? void 0 : (_theme$errorColor = theme.errorColor) === null || _theme$errorColor === void 0 ? void 0 : _theme$errorColor.main) || stylevariables.errorColor;
99
-
100
80
  case exports.COLOR.WARNING:
101
81
  return (theme === null || theme === void 0 ? void 0 : (_theme$warningColor = theme.warningColor) === null || _theme$warningColor === void 0 ? void 0 : _theme$warningColor.main) || stylevariables.warningColor;
102
-
103
82
  case exports.COLOR.BLACK:
104
83
  return stylevariables.black;
105
-
106
84
  default:
107
85
  return color;
108
86
  }
109
87
  };
110
-
111
88
  var Icon = function Icon(_ref) {
112
89
  var children = _ref.children,
113
- _ref$size = _ref.size,
114
- size = _ref$size === void 0 ? exports.SIZE.MEDIUM : _ref$size,
115
- _ref$color = _ref.color,
116
- color = _ref$color === void 0 ? exports.COLOR.BLACK : _ref$color,
117
- hoverColor = _ref.hoverColor,
118
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
119
-
120
- // @ts-expect-error
90
+ _ref$size = _ref.size,
91
+ size = _ref$size === void 0 ? exports.SIZE.MEDIUM : _ref$size,
92
+ _ref$color = _ref.color,
93
+ color = _ref$color === void 0 ? exports.COLOR.BLACK : _ref$color,
94
+ hoverColor = _ref.hoverColor,
95
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
121
96
  var themeContext = React.useContext(styled.ThemeContext);
122
97
  return React__default.createElement(StyledIcon, Object.assign({
123
98
  size: size,
@@ -499,7 +474,7 @@ var CircleNotification = function CircleNotification(props) {
499
474
  }));
500
475
  };
501
476
 
502
- /* eslint max-len: off */
477
+ /* eslint max-len: off */ /* eslint max-len: off */
503
478
  var Chrome = function Chrome(props) {
504
479
  return React__default.createElement(Icon, Object.assign({}, props), React__default.createElement("path", {
505
480
  d: "M2.898 4.18C8.476-2.311 18.82-1.03 22.686 6.555h-9.293c-1.674 0-2.755-.038-3.926.579-1.376.724-2.414 2.067-2.777 3.644L2.898 4.181zM8.008 12c0-2.2 1.789-3.99 3.988-3.99A3.994 3.994 0 0 1 15.984 12c0 2.2-1.789 3.99-3.988 3.99-2.2 0-3.988-1.79-3.988-3.99zm5.536 5.223l-3.87 6.551C1.31 22.132-2.662 12.51 1.945 5.45c1.315 2.292 4.21 7.334 5.305 9.224 1.435 2.477 4.054 3.215 6.293 2.55zM15.7 8.009h7.609c2.837 8.053-3.445 16.498-12.062 15.967 1.472-2.482 4.509-7.607 5.46-9.248a5.464 5.464 0 0 0-1.007-6.719z"