oolib 2.24.1 → 2.24.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.
|
@@ -9,6 +9,7 @@ var Typo_1 = require("../Typo");
|
|
|
9
9
|
var InlineAlert_1 = require("../InlineAlert");
|
|
10
10
|
var index_styled_1 = require("./index.styled");
|
|
11
11
|
var colors_1 = require("../../themes/colors");
|
|
12
|
+
var toArray_1 = require("../../utils/toArray");
|
|
12
13
|
var greyColor40 = colors_1.colors.greyColor40, greyColor80 = colors_1.colors.greyColor80;
|
|
13
14
|
var BlockLabel = function (props) {
|
|
14
15
|
var label = props.label, sublabel = props.sublabel, inputOnlyLabel = props.inputOnlyLabel, invert = props.invert, isRequired = props.isRequired, readOnly = props.readOnly, className = props.className, style = props.style, errorMsgs = props.errorMsgs;
|
|
@@ -31,6 +32,6 @@ var BlockLabel = function (props) {
|
|
|
31
32
|
optional && (react_1.default.createElement(Typo_1.SANS_3, { color: invert ? greyColor40 : greyColor80 }, '(optional)')),
|
|
32
33
|
!readOnly &&
|
|
33
34
|
(errorMsgs === null || errorMsgs === void 0 ? void 0 : errorMsgs.length) > 0 ? (react_1.default.createElement(InlineAlert_1.InlineAlert, { text: errText, type: errType, link: errLink, invert: invert })) : null),
|
|
34
|
-
!readOnly && sublabel && (react_1.default.createElement(Typo_1.SANS_3, { color: invert ? greyColor40 : greyColor80 },
|
|
35
|
+
!readOnly && sublabel && (0, toArray_1.toArray)(sublabel).map(function (subL) { return (react_1.default.createElement(Typo_1.SANS_3, { color: invert ? greyColor40 : greyColor80 }, subL)); }))));
|
|
35
36
|
};
|
|
36
37
|
exports.BlockLabel = BlockLabel;
|
|
@@ -41,6 +41,7 @@ var react_router_dom_1 = require("react-router-dom");
|
|
|
41
41
|
var lodash_1 = require("lodash");
|
|
42
42
|
var Typo_1 = require("../Typo");
|
|
43
43
|
var icons_1 = require("../../icons");
|
|
44
|
+
var themes_1 = require("../../themes");
|
|
44
45
|
var DisplayIcon = function (_a) {
|
|
45
46
|
var icon = _a.icon, size = _a.size, color = _a.color;
|
|
46
47
|
var IconComp = icons_1.icons[icon];
|
|
@@ -48,7 +49,7 @@ var DisplayIcon = function (_a) {
|
|
|
48
49
|
};
|
|
49
50
|
var ButtonStyledWrapper = function (_a) {
|
|
50
51
|
var props = _a.props, variant = _a.variant;
|
|
51
|
-
var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, 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, S = props.S, M = props.M, iconSize = props.iconSize,
|
|
52
|
+
var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, 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, S = props.S, M = props.M, iconSize = props.iconSize, _iconColor = props.iconColor, stopPropagation = props.stopPropagation;
|
|
52
53
|
/**
|
|
53
54
|
* WHY WE ARE HAVING TO DO STOP PROPAGATION IN THIS TWISTED WAY:
|
|
54
55
|
*
|
|
@@ -89,6 +90,7 @@ var ButtonStyledWrapper = function (_a) {
|
|
|
89
90
|
var thisSize = iconSize || size;
|
|
90
91
|
return thisSize === 'S' ? 15 : 20;
|
|
91
92
|
};
|
|
93
|
+
var iconColor = !disabled ? _iconColor : themes_1.colors.greyColor40;
|
|
92
94
|
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: function (e) {
|
|
93
95
|
stopPropagation && e.stopPropagation();
|
|
94
96
|
debouncedOnClick && debouncedOnClick(e);
|
|
@@ -169,7 +169,7 @@ var buttonVariantSetting = {
|
|
|
169
169
|
custom: ButtonCustom,
|
|
170
170
|
googleAuth: GoogleButton,
|
|
171
171
|
};
|
|
172
|
-
exports.ButtonStyled = styled_components_1.default.button(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n ", "\n\n ", "\n\n white-space: nowrap;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n cursor: pointer;\n border: none;\n border-radius: 2px;\n\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n\n white-space: nowrap;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n cursor: pointer;\n border: none;\n border-radius: 2px;\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
172
|
+
exports.ButtonStyled = styled_components_1.default.button(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n ", "\n\n ", "\n\n white-space: nowrap;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n cursor: pointer;\n border: none;\n border-radius: 2px;\n\n &:disabled{\n cursor: not-allowed;\n }\n\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n\n white-space: nowrap;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n cursor: pointer;\n border: none;\n border-radius: 2px;\n\n &:disabled{\n cursor: not-allowed;\n }\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
173
173
|
var composition = _a.composition, size = _a.size;
|
|
174
174
|
switch (composition) {
|
|
175
175
|
case "iconOnly":
|