oolib 2.2.1 → 2.2.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.
@@ -1,11 +1,11 @@
1
- export function TagDisplay({ display, invert, M, theme, variantSecondary }: {
1
+ export function TagDisplay({ display, invert, M, theme, variant }: {
2
2
  display: any;
3
3
  invert: any;
4
4
  M: any;
5
5
  theme: any;
6
- variantSecondary: any;
6
+ variant: any;
7
7
  }): JSX.Element;
8
- export function TagClear({ id, display, value, M, invert, onClick, theme, variantSecondary, variantGhost, grey, }: {
8
+ export function TagClear({ id, display, value, M, invert, onClick, theme, variant, grey, }: {
9
9
  id: any;
10
10
  display: any;
11
11
  value: any;
@@ -13,8 +13,7 @@ export function TagClear({ id, display, value, M, invert, onClick, theme, varian
13
13
  invert: any;
14
14
  onClick?: () => void;
15
15
  theme: any;
16
- variantSecondary: any;
17
- variantGhost: any;
16
+ variant: any;
18
17
  grey: any;
19
18
  }): JSX.Element;
20
19
  export function TagSelect({ onClick, isSelected, display, value, M, theme, }: {
@@ -25,11 +24,11 @@ export function TagSelect({ onClick, isSelected, display, value, M, theme, }: {
25
24
  M: any;
26
25
  theme: any;
27
26
  }): JSX.Element;
28
- export function TagLink({ display, to, invert, M, theme, variantSecondary }: {
27
+ export function TagLink({ display, to, invert, M, theme, variant }: {
29
28
  display: any;
30
29
  to: any;
31
30
  invert: any;
32
31
  M: any;
33
32
  theme: any;
34
- variantSecondary: any;
33
+ variant: any;
35
34
  }): JSX.Element;
@@ -25,23 +25,19 @@ var index_styled_1 = require("./index.styled");
25
25
  var Typo_1 = require("../Typo");
26
26
  var icons_1 = require("../../icons");
27
27
  function TagDisplay(_a) {
28
- var display = _a.display, invert = _a.invert, M = _a.M, theme = _a.theme, variantSecondary = _a.variantSecondary;
28
+ var display = _a.display, invert = _a.invert, M = _a.M, theme = _a.theme, variant = _a.variant;
29
29
  var size = M ? 'M' : 'S';
30
- return (react_1.default.createElement(index_styled_1.StyledTagDisplay, { variantSecondary: variantSecondary, invert: invert, theme: theme, size: size },
30
+ return (react_1.default.createElement(index_styled_1.StyledTagDisplay, { variant: variant, invert: invert, theme: theme, size: size },
31
31
  react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, display)));
32
32
  }
33
33
  exports.TagDisplay = TagDisplay;
34
34
  function TagClear(_a) {
35
- var id = _a.id, display = _a.display, value = _a.value, M = _a.M, invert = _a.invert, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b, theme = _a.theme, variantSecondary = _a.variantSecondary, variantGhost = _a.variantGhost, grey = _a.grey;
35
+ var id = _a.id, display = _a.display, value = _a.value, M = _a.M, invert = _a.invert, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b, theme = _a.theme, variant = _a.variant, grey = _a.grey;
36
36
  var XIconCom = icons_1.phosphorIcons['X'];
37
37
  var size = M ? 'M' : 'S';
38
- return (react_1.default.createElement(index_styled_1.StyledTagClear, { invert: invert, theme: theme, size: size, grey: grey, variantGhost: variantGhost, variantSecondary: variantSecondary, onClick: function () {
39
- return !variantSecondary && !variantGhost && onClick(id, { display: display, value: value });
40
- } },
38
+ return (react_1.default.createElement(index_styled_1.StyledTagClear, { invert: invert, theme: theme, size: size, grey: grey, variant: variant, onClick: function () { return !variant && onClick(id, { display: display, value: value }); } },
41
39
  react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, display),
42
- react_1.default.createElement(index_styled_1.StyledIconWrapper, { theme: theme, invert: invert, grey: grey, variantSecondary: variantSecondary, onClick: function () {
43
- return (variantSecondary || variantGhost) && onClick(id, { display: display, value: value });
44
- } },
40
+ react_1.default.createElement(index_styled_1.StyledIconWrapper, { theme: theme, invert: invert, grey: grey, variant: variant, onClick: function () { return variant && onClick(id, { display: display, value: value }); } },
45
41
  react_1.default.createElement(XIconCom, { size: '15', weight: 'bold' }))));
46
42
  }
47
43
  exports.TagClear = TagClear;
@@ -63,10 +59,10 @@ function TagSelect(_a) {
63
59
  }
64
60
  exports.TagSelect = TagSelect;
65
61
  function TagLink(_a) {
66
- var display = _a.display, to = _a.to, invert = _a.invert, M = _a.M, theme = _a.theme, variantSecondary = _a.variantSecondary;
62
+ var display = _a.display, to = _a.to, invert = _a.invert, M = _a.M, theme = _a.theme, variant = _a.variant;
67
63
  var size = M ? 'M' : 'S';
68
64
  return (react_1.default.createElement(index_styled_1.StyledLink, { to: to },
69
- react_1.default.createElement(index_styled_1.StyledTagLink, { theme: theme, variantSecondary: variantSecondary, invert: invert, size: size },
65
+ react_1.default.createElement(index_styled_1.StyledTagLink, { theme: theme, variant: variant, invert: invert, size: size },
70
66
  react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, display))));
71
67
  }
72
68
  exports.TagLink = TagLink;
@@ -43,29 +43,28 @@ var StyledTagDisplay = styled_components_1.default.div(templateObject_3 || (temp
43
43
  var invert = _a.invert;
44
44
  return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t"], ["\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t"])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor40);
45
45
  }, function (_a) {
46
- var variantSecondary = _a.variantSecondary, invert = _a.invert;
47
- return variantSecondary && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid ", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid ", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15);
46
+ var variant = _a.variant, invert = _a.invert;
47
+ return variant === "secondry" && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid ", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid ", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15);
48
48
  });
49
49
  exports.StyledTagDisplay = StyledTagDisplay;
50
50
  var StyledTagClear = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", "\n \n\t", "\n\n\t", "\n\t", "\n"], ["\n ", "\n \n\t", "\n\n\t", "\n\t", "\n"])), function (_a) {
51
51
  var size = _a.size;
52
52
  return commonStyle({ size: size });
53
53
  }, function (_a) {
54
- var variantSecondary = _a.variantSecondary, variantGhost = _a.variantGhost, invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
55
- return !variantSecondary &&
56
- !variantGhost &&
54
+ var variant = _a.variant, invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
55
+ return !variant && // no variant passed, then primary (default)
57
56
  (!grey
58
57
  ? (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert
59
58
  ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100
60
59
  : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? white : greyColor100) : (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor40));
61
60
  }, function (_a) {
62
- var variantSecondary = _a.variantSecondary, invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
63
- return variantSecondary &&
61
+ var variant = _a.variant, invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
62
+ return variant === "secondry" &&
64
63
  (!grey
65
64
  ? (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid\n\t\t\t\t\t\t", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid\n\t\t\t\t\t\t", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100 : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColorText : colors === null || colors === void 0 ? void 0 : colors.primaryColor40) : (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15));
66
65
  }, function (_a) {
67
- var variantGhost = _a.variantGhost;
68
- return variantGhost && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t"])));
66
+ var variant = _a.variant;
67
+ return variant === "ghost" && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t"])));
69
68
  });
70
69
  exports.StyledTagClear = StyledTagClear;
71
70
  var StyledTagSelect = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", "\n\t", "\n"], ["\n ", "\n\t", "\n"])), function (_a) {
@@ -76,17 +75,17 @@ var StyledTagSelect = styled_components_1.default.div(templateObject_10 || (temp
76
75
  return "\n border: 2px solid ".concat(colors === null || colors === void 0 ? void 0 : colors.primaryColor100, ";\n cursor: pointer;\n background-color: ").concat(selected ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100 : null, ";\n\t\tcolor: ").concat(!selected ? colors === null || colors === void 0 ? void 0 : colors.primaryColorText : white, "\n ");
77
76
  });
78
77
  exports.StyledTagSelect = StyledTagSelect;
79
- var StyledTagLink = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n\t", "\n\n\t", "\n\t\n"], ["\n ", "\n\t", "\n\n\t", "\n\t\n"])), function (_a) {
78
+ var StyledTagLink = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n\t", "\n\t\n"], ["\n ", "\n\t", "\n\t\n"])), function (_a) {
80
79
  var size = _a.size;
81
80
  return commonStyle({ size: size });
82
81
  }, function (_a) {
83
- var variantSecondary = _a.variantSecondary, invert = _a.invert, colors = _a.theme.colors;
84
- return !variantSecondary && (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert
85
- ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100
86
- : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? white : greyColor100);
87
- }, function (_a) {
88
- var variantSecondary = _a.variantSecondary, invert = _a.invert, colors = _a.theme.colors;
89
- return variantSecondary && (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid\n\t\t\t\t", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid\n\t\t\t\t", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100 : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColorText : colors === null || colors === void 0 ? void 0 : colors.primaryColor40);
82
+ var variant = _a.variant, invert = _a.invert, colors = _a.theme.colors;
83
+ if (variant !== "secondry") {
84
+ return (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert
85
+ ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100
86
+ : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? white : greyColor100);
87
+ }
88
+ return (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid\n\t\t\t\t", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid\n\t\t\t\t", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100 : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColorText : colors === null || colors === void 0 ? void 0 : colors.primaryColor40);
90
89
  });
91
90
  exports.StyledTagLink = StyledTagLink;
92
91
  var StyledIconWrapper = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t", "\n"], ["\n display: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t", "\n"])), function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",