oolib 2.8.0 → 2.8.3

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.
@@ -79,10 +79,10 @@ var UploadButton = function (props) {
79
79
  };
80
80
  exports.UploadButton = UploadButton;
81
81
  var GoogleLogin = function (props) {
82
- var theme = props.theme, S = props.S, disabled = props.disabled, width = props.width, className = props.className, style = props.style, value = props.value, children = props.children;
82
+ var theme = props.theme, S = props.S, disabled = props.disabled, width = props.width, className = props.className, style = props.style, value = props.value, children = props.children, onClick = props.onClick;
83
83
  var displayText = value || children || 'Sign up with Google';
84
84
  var size = (S && "S") || 'M';
85
- return (react_1.default.createElement(index_styled_1.ButtonStyled, { size: size, disabled: disabled, width: width, onClick: function () { return window.open('/api/OAuth/google', '_self'); }, variant: "googleAuth", theme: theme, style: style, className: className },
85
+ return (react_1.default.createElement(index_styled_1.ButtonStyled, { size: size, disabled: disabled, width: width, onClick: onClick, variant: "googleAuth", theme: theme, style: style, className: className },
86
86
  react_1.default.createElement(DisplayIcon, { icon: 'OkeGoogleIcon', size: 24 }),
87
87
  displayText && react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, displayText)));
88
88
  };
@@ -3,6 +3,17 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
4
  return cooked;
5
5
  };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
6
17
  var __importDefault = (this && this.__importDefault) || function (mod) {
7
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
8
19
  };
@@ -11,10 +22,9 @@ exports.StyledSection = void 0;
11
22
  var styled_components_1 = __importDefault(require("styled-components"));
12
23
  var colors_1 = require("../../themes/colors");
13
24
  var setBorder = function (_a) {
14
- var _b;
15
25
  var props = _a.props;
16
26
  var borderStyles = "";
17
- var greyColor15 = (((_b = props.theme) === null || _b === void 0 ? void 0 : _b.colors) || colors_1.colors).greyColor15;
27
+ var greyColor15 = colors_1.colors.greyColor15;
18
28
  if (props.borderTop || props.borderRight || props.borderLeft || props.borderBottom) {
19
29
  if (props.borderTop)
20
30
  borderStyles += "border-top: 1px solid ".concat(greyColor15, ";");
@@ -28,8 +38,10 @@ var setBorder = function (_a) {
28
38
  return borderStyles;
29
39
  };
30
40
  var setFill = function (_a) {
41
+ var _b;
31
42
  var props = _a.props;
32
- var colorsObj = props.theme.colors || colors_1.colors;
43
+ var colorsObj = ((_b = props.theme) === null || _b === void 0 ? void 0 : _b.colors)
44
+ ? __assign(__assign({}, colors_1.colors), props.theme.colors) : colors_1.colors;
33
45
  var colorKey = Object.keys(props).find(function (p) { return !!colorsObj[p]; });
34
46
  return colorKey ? "background-color: ".concat(colorsObj[colorKey], ";") : '';
35
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.8.0",
3
+ "version": "2.8.3",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",