oolib 2.2.0 → 2.2.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.
- package/dist/components/Breadcrumbs/index.js +11 -10
- package/dist/components/Buttons/index.js +3 -3
- package/dist/components/Tags/index.d.ts +6 -7
- package/dist/components/Tags/index.js +7 -11
- package/dist/components/Tags/index.styled.js +16 -17
- package/dist/themes/colors.d.ts +4 -0
- package/dist/themes/colors.js +4 -0
- package/package.json +1 -1
|
@@ -48,20 +48,21 @@ var Breadcrumbs = function (_a) {
|
|
|
48
48
|
if (containerWidth > (0, mixins_1.getBreakPoint)('md')) { // for large devices (not default since containerWidth is initialized to 0)
|
|
49
49
|
var linksDisplayed_1 = beConcise && links.length > 3 ? [links[0], { to: "", display: "..." }, links[links.length - 2], links[links.length - 1]] : links;
|
|
50
50
|
return (react_1.default.createElement(index_styled_1.StyledBreadcrumbs, { ref: measuredContainer }, linksDisplayed_1.map(function (link, ind) {
|
|
51
|
-
return (react_1.default.createElement(index_styled_1.StyledLinkCrumb, { to: link.to, invert: invert, key: ind, style:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
51
|
+
return (react_1.default.createElement(index_styled_1.StyledLinkCrumb, { to: link.to, invert: invert, key: ind, style: ind == linksDisplayed_1.length - 1 ? {
|
|
52
|
+
pointerEvents: 'none',
|
|
53
|
+
width: !beConcise ? 'auto' : (function () {
|
|
54
|
+
var children = measuredContainer.current.children;
|
|
55
|
+
var childrenCount = children.length;
|
|
56
|
+
var correctionFactor = 88;
|
|
57
|
+
return containerWidth - (children[0].scrollWidth + correctionFactor + (childrenCount > 2 &&
|
|
58
|
+
children[childrenCount - 2].scrollWidth)) + 'px';
|
|
59
|
+
})()
|
|
60
|
+
} : {} },
|
|
60
61
|
react_1.default.createElement(Typo_1.SANS_2, { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, link.display)));
|
|
61
62
|
})));
|
|
62
63
|
}
|
|
63
64
|
return (react_1.default.createElement(index_styled_1.StyledBreadcrumbs, { ref: measuredContainer },
|
|
64
|
-
react_1.default.createElement(index_styled_1.StyledLinkCrumb, { to: links[links.length - 2], invert: invert },
|
|
65
|
+
react_1.default.createElement(index_styled_1.StyledLinkCrumb, { to: links[links.length - 2].to, invert: invert },
|
|
65
66
|
react_1.default.createElement(ArrowLeft, { size: 14, weight: "bold", color: invert ? white : greyColor50 }),
|
|
66
67
|
react_1.default.createElement(Typo_1.SANS_2, { invert: invert }, "Back"))));
|
|
67
68
|
};
|
|
@@ -42,11 +42,11 @@ var DisplayIcon = function (_a) {
|
|
|
42
42
|
};
|
|
43
43
|
var ButtonStyledWrapper = function (_a) {
|
|
44
44
|
var props = _a.props, variant = _a.variant;
|
|
45
|
-
var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, onClick = props.onClick, active = props.active, S = props.S, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className;
|
|
45
|
+
var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, S = props.S, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className;
|
|
46
46
|
var displayText = (link === null || link === void 0 ? void 0 : link.displayText) || children || value;
|
|
47
47
|
var size = (S && "S") || 'M';
|
|
48
48
|
var composition = icon && displayText ? 'icon+text' : !displayText && 'iconOnly';
|
|
49
|
-
return (react_1.default.createElement(index_styled_1.ButtonStyled, { id: id, style: style, className: className, variant: variant, size: size, active: active, invert: invert, disabled: disabled, theme: theme, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, type: submit ? 'submit' : 'button', onClick: onClick, composition: composition, width: width, color: color },
|
|
49
|
+
return (react_1.default.createElement(index_styled_1.ButtonStyled, { id: id, style: style, className: className, variant: variant, size: size, active: active, invert: invert, disabled: disabled, theme: theme, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, type: submit ? 'submit' : 'button', onClick: onClick, onMouseDown: onMouseDown, composition: composition, width: width, color: color },
|
|
50
50
|
icon && react_1.default.createElement(DisplayIcon, { icon: icon, size: S ? 15 : 20 }),
|
|
51
51
|
displayText && react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, displayText)));
|
|
52
52
|
};
|
|
@@ -80,7 +80,7 @@ var UploadButton = function (props) {
|
|
|
80
80
|
exports.UploadButton = UploadButton;
|
|
81
81
|
var GoogleLogin = function (props) {
|
|
82
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;
|
|
83
|
-
var displayText = value || children ||
|
|
83
|
+
var displayText = value || children || 'Sign up with Google';
|
|
84
84
|
var size = (S && "S") || 'M';
|
|
85
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 },
|
|
86
86
|
react_1.default.createElement(DisplayIcon, { icon: 'OkeGoogleIcon', size: 24 }),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export function TagDisplay({ display, invert, M, theme,
|
|
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
|
-
|
|
6
|
+
variant: any;
|
|
7
7
|
}): JSX.Element;
|
|
8
|
-
export function TagClear({ id, display, value, M, invert, onClick, theme,
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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, {
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
47
|
-
return
|
|
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
|
|
55
|
-
return !
|
|
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
|
|
63
|
-
return
|
|
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
|
|
68
|
-
return
|
|
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\
|
|
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
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return
|
|
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/dist/themes/colors.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export namespace colors {
|
|
|
35
35
|
export { primaryColor100 };
|
|
36
36
|
export { primaryColor40 };
|
|
37
37
|
export { primaryColorText };
|
|
38
|
+
export { cyan };
|
|
39
|
+
export { lightPink };
|
|
38
40
|
}
|
|
39
41
|
declare const none: "rgba(0,0,0,0)";
|
|
40
42
|
declare const white: "#fff";
|
|
@@ -72,4 +74,6 @@ declare const primaryColor10: "#ebf6ff";
|
|
|
72
74
|
declare const primaryColor100: "#33A4FF";
|
|
73
75
|
declare const primaryColor40: "#addbff";
|
|
74
76
|
declare const primaryColorText: "#0071CC";
|
|
77
|
+
declare const cyan: "#B5F2FA";
|
|
78
|
+
declare const lightPink: "#FFE5F2";
|
|
75
79
|
export {};
|
package/dist/themes/colors.js
CHANGED
|
@@ -17,6 +17,8 @@ var lightYellow = '#FFFAE6';
|
|
|
17
17
|
var green = '#08A84B';
|
|
18
18
|
var lightGreen = '#E6F6ED';
|
|
19
19
|
var invertGreen = '#8AE5B0';
|
|
20
|
+
var cyan = '#B5F2FA';
|
|
21
|
+
var lightPink = '#FFE5F2';
|
|
20
22
|
var blue = '#33A4FF';
|
|
21
23
|
var lightBlue = '#EBF6FF';
|
|
22
24
|
var black = '#000';
|
|
@@ -74,4 +76,6 @@ exports.colors = {
|
|
|
74
76
|
primaryColor100: primaryColor100,
|
|
75
77
|
primaryColor40: primaryColor40,
|
|
76
78
|
primaryColorText: primaryColorText,
|
|
79
|
+
cyan: cyan,
|
|
80
|
+
lightPink: lightPink
|
|
77
81
|
};
|