oolib 2.10.1 → 2.11.1
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/Banners/index.d.ts +8 -0
- package/dist/components/Banners/index.js +73 -0
- package/dist/components/Banners/index.styled.d.ts +5 -0
- package/dist/components/Banners/index.styled.js +45 -0
- package/dist/components/BlockLabel/index.js +1 -3
- package/dist/components/Breadcrumbs/index.js +2 -2
- package/dist/components/Breadcrumbs/index.styled.js +1 -1
- package/dist/components/Buttons/index.styled.js +50 -49
- package/dist/components/InlineAlert/index.js +4 -2
- package/dist/components/Loader/index.styled.js +4 -3
- package/dist/components/OKELink/index.d.ts +16 -0
- package/dist/components/OKELink/index.js +49 -0
- package/dist/components/OKELink/styled.d.ts +1 -0
- package/dist/components/OKELink/styled.js +33 -0
- package/dist/components/OKELink/utils/index.d.ts +6 -0
- package/dist/components/OKELink/utils/index.js +20 -0
- package/dist/components/Section/index.styled.js +2 -2
- package/dist/components/TabBar/index.d.ts +9 -0
- package/dist/components/TabBar/index.js +35 -0
- package/dist/components/TabBar/index.styled.d.ts +5 -0
- package/dist/components/TabBar/index.styled.js +68 -0
- package/dist/components/Tags/index.styled.js +15 -15
- package/dist/components/TextInputs/index.js +6 -1
- package/dist/components/ToggleButton/index.d.ts +2 -0
- package/dist/components/ToggleButton/index.js +59 -0
- package/dist/components/ToggleButton/styled.d.ts +3 -0
- package/dist/components/ToggleButton/styled.js +51 -0
- package/dist/components/Tooltip/index.d.ts +6 -0
- package/dist/components/Tooltip/index.js +36 -0
- package/dist/components/Tooltip/styled.d.ts +4 -0
- package/dist/components/Tooltip/styled.js +60 -0
- package/dist/components/Tooltip/util/index.d.ts +3 -0
- package/dist/components/Tooltip/util/index.js +42 -0
- package/dist/components/UserRoleBadge/index.d.ts +8 -0
- package/dist/components/UserRoleBadge/index.js +27 -0
- package/dist/globalStyles/index.js +1 -1
- package/dist/icons/custom/index.d.ts +17 -0
- package/dist/icons/custom/index.js +82 -0
- package/dist/icons/index.d.ts +12 -6
- package/dist/icons/index.js +9 -13
- package/dist/index.d.ts +6 -0
- package/dist/index.js +10 -1
- package/dist/themes/mixins/index.d.ts +1 -3
- package/dist/themes/mixins/index.js +1 -3
- package/dist/themes/mixins/transitions.d.ts +1 -3
- package/dist/themes/mixins/transitions.js +8 -8
- package/dist/themes/typo.js +29 -28
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +10 -1
- package/dist/utilsOolib/index.d.ts +4 -4
- package/dist/utilsOolib/index.js +10 -10
- package/package.json +4 -4
- package/dist/icons/IndexIcon.d.ts +0 -1
- package/dist/icons/IndexIcon.js +0 -13
- package/dist/icons/LangIcon.d.ts +0 -5
- package/dist/icons/LangIcon.js +0 -18
- package/dist/icons/LetterH.d.ts +0 -5
- package/dist/icons/LetterH.js +0 -15
- package/dist/icons/LetterP.d.ts +0 -5
- package/dist/icons/LetterP.js +0 -13
- package/dist/icons/OkeGoogleIcon.d.ts +0 -2
- package/dist/icons/OkeGoogleIcon.js +0 -41
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function BannerAlert({ BANNER_STATE, REMOVE_ALERT_BANNER }: {
|
|
2
|
+
BANNER_STATE: any;
|
|
3
|
+
REMOVE_ALERT_BANNER: any;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export function BannerInfo({ BANNER_STATE, REMOVE_INFO_BANNER }: {
|
|
6
|
+
BANNER_STATE: any;
|
|
7
|
+
REMOVE_INFO_BANNER: any;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.BannerInfo = exports.BannerAlert = void 0;
|
|
23
|
+
var react_1 = __importStar(require("react"));
|
|
24
|
+
var index_styled_1 = require("./index.styled");
|
|
25
|
+
var Buttons_1 = require("../Buttons");
|
|
26
|
+
var icons_1 = require("../../icons");
|
|
27
|
+
var Typo_1 = require("../Typo");
|
|
28
|
+
var ICONS = {
|
|
29
|
+
red: "XCircle",
|
|
30
|
+
green: "CheckCircle",
|
|
31
|
+
yellow: "WarningCircle",
|
|
32
|
+
dark: "WarningCircle",
|
|
33
|
+
grey: "WarningCircle",
|
|
34
|
+
};
|
|
35
|
+
var DisplayIcon = function (_a) {
|
|
36
|
+
var color = _a.color;
|
|
37
|
+
var IconComp = icons_1.icons[ICONS[color]];
|
|
38
|
+
return (react_1.default.createElement("div", { style: { color: color } }, IconComp && react_1.default.createElement(IconComp, { size: 24, weight: "bold" })));
|
|
39
|
+
};
|
|
40
|
+
var Banner = function (_a) {
|
|
41
|
+
var color = _a.color, cta = _a.cta, msg = _a.msg, handleRemove = _a.handleRemove, id = _a.id, timeOut = _a.timeOut, showIcon = _a.showIcon;
|
|
42
|
+
var _b = (0, react_1.useState)(0), height = _b[0], setHeight = _b[1];
|
|
43
|
+
var ContainerRef = (0, react_1.useRef)();
|
|
44
|
+
(0, react_1.useEffect)(function () {
|
|
45
|
+
var timer;
|
|
46
|
+
setHeight(ContainerRef.current.scrollHeight);
|
|
47
|
+
if (timeOut)
|
|
48
|
+
timer = setTimeout(function () {
|
|
49
|
+
setHeight("0px");
|
|
50
|
+
handleRemove(null, id);
|
|
51
|
+
}, timeOut);
|
|
52
|
+
return function () { return (timeOut ? clearTimeout(timer) : null); };
|
|
53
|
+
}, [cta, id, msg]);
|
|
54
|
+
return (react_1.default.createElement(index_styled_1.BannerAnimateStyled, { key: id, ref: ContainerRef, maxHeight: height },
|
|
55
|
+
react_1.default.createElement(index_styled_1.BannerWrapperStyled, { color: color },
|
|
56
|
+
react_1.default.createElement(index_styled_1.BannerStyled, null,
|
|
57
|
+
showIcon && react_1.default.createElement(DisplayIcon, { color: color }),
|
|
58
|
+
react_1.default.createElement(Typo_1.SANS_2, null, msg),
|
|
59
|
+
cta && (react_1.default.createElement(Buttons_1.ButtonSecondary, { style: { marginTop: "0.5rem", marginBottom: "0.5rem" }, S: true, onClick: cta.action, invert: color === "dark" ? true : false }, cta === null || cta === void 0 ? void 0 : cta.text))),
|
|
60
|
+
react_1.default.createElement(Buttons_1.ButtonGhost, { S: true, icon: "X", invert: color === "dark" ? true : false, onClick: function (e) { return handleRemove(e, id); } }))));
|
|
61
|
+
};
|
|
62
|
+
var BannerAlert = function (_a) {
|
|
63
|
+
var _b;
|
|
64
|
+
var BANNER_STATE = _a.BANNER_STATE, REMOVE_ALERT_BANNER = _a.REMOVE_ALERT_BANNER;
|
|
65
|
+
return (react_1.default.createElement(index_styled_1.BannerAlertStyled, null, (_b = BANNER_STATE === null || BANNER_STATE === void 0 ? void 0 : BANNER_STATE.alertState) === null || _b === void 0 ? void 0 : _b.map(function (e) { return (react_1.default.createElement(Banner, { key: e.id, id: e.id, color: e.color, msg: e.msg, cta: e.cta, handleRemove: REMOVE_ALERT_BANNER, timeOut: e.timeOut, showIcon: e.showIcon })); })));
|
|
66
|
+
};
|
|
67
|
+
exports.BannerAlert = BannerAlert;
|
|
68
|
+
var BannerInfo = function (_a) {
|
|
69
|
+
var _b;
|
|
70
|
+
var BANNER_STATE = _a.BANNER_STATE, REMOVE_INFO_BANNER = _a.REMOVE_INFO_BANNER;
|
|
71
|
+
return (react_1.default.createElement(index_styled_1.BannerInfoStyled, null, (_b = BANNER_STATE === null || BANNER_STATE === void 0 ? void 0 : BANNER_STATE.infoState) === null || _b === void 0 ? void 0 : _b.map(function (e) { return (react_1.default.createElement(Banner, { key: e.id, id: e.id, color: e.color, msg: e.msg, cta: e.cta, handleRemove: REMOVE_INFO_BANNER, timeOut: e.timeOut, showIcon: e.showIcon })); })));
|
|
72
|
+
};
|
|
73
|
+
exports.BannerInfo = BannerInfo;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.BannerInfoStyled = exports.BannerAlertStyled = exports.BannerStyled = exports.BannerWrapperStyled = exports.BannerAnimateStyled = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
var themes_1 = require("../../themes");
|
|
13
|
+
var mixins_1 = require("../../themes/mixins");
|
|
14
|
+
var transitions_1 = require("../../themes/mixins/transitions");
|
|
15
|
+
var greyColor15 = themes_1.colors.greyColor15, lightRed = themes_1.colors.lightRed, lightGreen = themes_1.colors.lightGreen, lightYellow = themes_1.colors.lightYellow, red = themes_1.colors.red, green = themes_1.colors.green, yellow = themes_1.colors.yellow, greyColor5 = themes_1.colors.greyColor5, greyColor100 = themes_1.colors.greyColor100, white = themes_1.colors.white;
|
|
16
|
+
var colorConfig = {
|
|
17
|
+
red: { bgColor: lightRed, color: red },
|
|
18
|
+
green: { bgColor: lightGreen, color: green },
|
|
19
|
+
yellow: { bgColor: lightYellow, color: yellow },
|
|
20
|
+
grey: { bgColor: greyColor5 },
|
|
21
|
+
dark: { bgColor: greyColor100 },
|
|
22
|
+
};
|
|
23
|
+
exports.BannerAnimateStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n transition: inherit;\n max-height: ", "px;\n"], ["\n overflow: hidden;\n transition: inherit;\n max-height: ", "px;\n"])), function (_a) {
|
|
24
|
+
var maxHeight = _a.maxHeight;
|
|
25
|
+
return maxHeight;
|
|
26
|
+
});
|
|
27
|
+
exports.BannerWrapperStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n padding: 0.5rem 2rem;\n position: relative;\n\n gap: 1rem;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n\n box-shadow: inset 00px -2px 0px ", ";\n\n color: ", ";\n\n ", " {\n align-items: center;\n }\n"], ["\n display: flex;\n padding: 0.5rem 2rem;\n position: relative;\n\n gap: 1rem;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n\n box-shadow: inset 00px -2px 0px ", ";\n\n color: ", ";\n\n ", " {\n align-items: center;\n }\n"])), greyColor15, function (_a) {
|
|
28
|
+
var _b;
|
|
29
|
+
var color = _a.color;
|
|
30
|
+
return (_b = colorConfig[color]) === null || _b === void 0 ? void 0 : _b.bgColor;
|
|
31
|
+
}, function (_a) {
|
|
32
|
+
var _b;
|
|
33
|
+
var color = _a.color;
|
|
34
|
+
return (_b = colorConfig[color]) === null || _b === void 0 ? void 0 : _b.color;
|
|
35
|
+
}, function (_a) {
|
|
36
|
+
var color = _a.color;
|
|
37
|
+
return (color === "dark" ? white : "");
|
|
38
|
+
}, (0, mixins_1.mediaQuery)("sm"));
|
|
39
|
+
exports.BannerStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n width: 100%;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1rem;\n width: 100%;\n"])));
|
|
40
|
+
exports.BannerAlertStyled = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: sticky;\n z-index: 10000000;\n top: 0;\n gap: 0.2rem;\n width: 100%;\n height:", "px;\n ", "\n"], ["\n position: sticky;\n z-index: 10000000;\n top: 0;\n gap: 0.2rem;\n width: 100%;\n height:", "px;\n ", "\n"])), function (_a) {
|
|
41
|
+
var height = _a.height;
|
|
42
|
+
return height;
|
|
43
|
+
}, (0, transitions_1.transition)("max-height"));
|
|
44
|
+
exports.BannerInfoStyled = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: sticky;\n z-index: 10000000;\n top: 0;\n width: 100%;\n ", "\n"], ["\n position: sticky;\n z-index: 10000000;\n top: 0;\n width: 100%;\n ", "\n"])), (0, transitions_1.transition)("max-height"));
|
|
45
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -9,9 +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 red = colors_1.colors.red, greyColor40 = colors_1.colors.greyColor40, greyColor80 = colors_1.colors.greyColor80
|
|
13
|
-
//InlineAlert colors below
|
|
14
|
-
white = colors_1.colors.white, green = colors_1.colors.green, black = colors_1.colors.black, darkGrey = colors_1.colors.darkGrey, greyColor100 = colors_1.colors.greyColor100;
|
|
12
|
+
var red = colors_1.colors.red, greyColor40 = colors_1.colors.greyColor40, greyColor80 = colors_1.colors.greyColor80;
|
|
15
13
|
var BlockLabel = function (props) {
|
|
16
14
|
/*
|
|
17
15
|
missing parts of this component compared to kPlabel:
|
|
@@ -41,7 +41,7 @@ var Breadcrumbs = function (_a) {
|
|
|
41
41
|
if (containerWidth === 0)
|
|
42
42
|
return; // when the measuredRef isn't updated yet
|
|
43
43
|
var children = measuredContainer.current.children;
|
|
44
|
-
var isOverflowing = children[children.length - 1].getBoundingClientRect().right > containerWidth * 0.95; // if exceeds
|
|
44
|
+
var isOverflowing = children[children.length - 1].getBoundingClientRect().right > containerWidth * 0.95; // if exceeds 95% of the parent
|
|
45
45
|
if (isOverflowing)
|
|
46
46
|
setBeConcise(true);
|
|
47
47
|
}, [containerWidth]);
|
|
@@ -63,7 +63,7 @@ var Breadcrumbs = function (_a) {
|
|
|
63
63
|
})));
|
|
64
64
|
}
|
|
65
65
|
return (react_1.default.createElement(index_styled_1.StyledBreadcrumbs, { ref: measuredContainer },
|
|
66
|
-
react_1.default.createElement(index_styled_1.StyledLinkCrumb, { to: links[links.length - 2].to, invert: invert },
|
|
66
|
+
react_1.default.createElement(index_styled_1.StyledLinkCrumb, { to: (links[links.length - 2] || links[0]).to, invert: invert },
|
|
67
67
|
react_1.default.createElement(ArrowLeft, { size: 14, weight: "bold", color: invert ? white : greyColor100 }),
|
|
68
68
|
react_1.default.createElement(Typo_1.SANS_2, { invert: invert }, "Back"))));
|
|
69
69
|
};
|
|
@@ -11,7 +11,7 @@ exports.StyledLinkCrumb = exports.StyledBreadcrumbs = void 0;
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
var react_router_dom_1 = require("react-router-dom");
|
|
13
13
|
var themes_1 = require("../../themes");
|
|
14
|
-
var white = themes_1.colors.white,
|
|
14
|
+
var white = themes_1.colors.white, greyColor100 = themes_1.colors.greyColor100;
|
|
15
15
|
var StyledBreadcrumbs = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.5rem 0;\n gap: 15px;\n overflow: hidden;\n"], ["\n display: flex;\n align-items: center;\n padding: 0.5rem 0;\n gap: 15px;\n overflow: hidden;\n"])));
|
|
16
16
|
exports.StyledBreadcrumbs = StyledBreadcrumbs;
|
|
17
17
|
var StyledLinkCrumb = (0, styled_components_1.default)(react_router_dom_1.Link)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 5px;\n position: relative;\n text-decoration: none;\n color: ", ";\n &::after {\n content: \"\";\n width: 1px;\n height: 60%;\n border-right: 1px solid ", ";\n cursor: default;\n position: absolute;\n left: calc(100% + 7px);\n top: 25%;\n }\n &:last-child::after {content: none;}\n"], ["\n display: flex;\n align-items: center;\n gap: 5px;\n position: relative;\n text-decoration: none;\n color: ", ";\n &::after {\n content: \"\";\n width: 1px;\n height: 60%;\n border-right: 1px solid ", ";\n cursor: default;\n position: absolute;\n left: calc(100% + 7px);\n top: 25%;\n }\n &:last-child::after {content: none;}\n"])), function (_a) {
|
|
@@ -12,17 +12,18 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
12
12
|
var styled_components_2 = require("styled-components");
|
|
13
13
|
var mixins_1 = require("../../themes/mixins");
|
|
14
14
|
var colors_1 = require("../../themes/colors");
|
|
15
|
-
var
|
|
15
|
+
var utilsOolib_1 = require("../../utilsOolib");
|
|
16
|
+
var greyColor100 = colors_1.colors.greyColor100, greyColor80 = colors_1.colors.greyColor80, greyColor70 = colors_1.colors.greyColor70, greyColor15 = colors_1.colors.greyColor15, greyColor40 = colors_1.colors.greyColor40, white = colors_1.colors.white;
|
|
16
17
|
//sizes
|
|
17
18
|
var SIZES = {
|
|
18
19
|
S: "3rem",
|
|
19
20
|
M: "4rem",
|
|
20
21
|
};
|
|
21
|
-
var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: none; // $none;\n background-color: ", ";\n color: ", "
|
|
22
|
-
var invert = _a.invert,
|
|
22
|
+
var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: none; // $none;\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n"], ["\n border: none; // $none;\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n"])), function (_a) {
|
|
23
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
23
24
|
return invert
|
|
24
|
-
? (
|
|
25
|
-
: (
|
|
25
|
+
? (0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
26
|
+
: (0, utilsOolib_1.getPrimaryColor100)(_colors);
|
|
26
27
|
}, function (_a) {
|
|
27
28
|
var invert = _a.invert;
|
|
28
29
|
return invert ? greyColor100 : white;
|
|
@@ -31,48 +32,48 @@ var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateOb
|
|
|
31
32
|
return color && (0, styled_components_2.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
|
|
32
33
|
}, function (_a) {
|
|
33
34
|
var disabled = _a.disabled;
|
|
34
|
-
return disabled && (0, styled_components_2.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", "
|
|
35
|
+
return disabled && (0, styled_components_2.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n pointer-events: none;\n "], ["\n background-color: ", ";\n color: ", ";\n pointer-events: none;\n "])), function (_a) {
|
|
35
36
|
var invert = _a.invert;
|
|
36
37
|
return invert ? greyColor70 : greyColor15;
|
|
37
38
|
}, greyColor40);
|
|
38
39
|
}, function (_a) {
|
|
39
|
-
var invert = _a.invert,
|
|
40
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
40
41
|
return invert
|
|
41
|
-
? (
|
|
42
|
-
: (
|
|
42
|
+
? (0, utilsOolib_1.getPrimaryColor10)(_colors)
|
|
43
|
+
: (0, utilsOolib_1.getPrimaryColor40)(_colors);
|
|
43
44
|
}, function (_a) {
|
|
44
|
-
var invert = _a.invert,
|
|
45
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
45
46
|
return invert
|
|
46
47
|
? greyColor100
|
|
47
|
-
: (
|
|
48
|
+
: (0, utilsOolib_1.getPrimaryColorText)(_colors);
|
|
48
49
|
});
|
|
49
50
|
var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: 2px solid\n ", ";\n background-color: ", ";\n\n color: ", "; \n ", "\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", "; \n }\n"], ["\n border: 2px solid\n ", ";\n background-color: ", ";\n\n color: ", "; \n ", "\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", "; \n }\n"])), function (_a) {
|
|
50
|
-
var invert = _a.invert,
|
|
51
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
51
52
|
return invert
|
|
52
|
-
? (
|
|
53
|
-
: (
|
|
53
|
+
? (0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
54
|
+
: (0, utilsOolib_1.getPrimaryColor100)(_colors);
|
|
54
55
|
}, function (_a) {
|
|
55
56
|
var invert = _a.invert;
|
|
56
57
|
return invert ? greyColor100 : white;
|
|
57
58
|
}, function (_a) {
|
|
58
|
-
var invert = _a.invert,
|
|
59
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
59
60
|
return invert
|
|
60
|
-
? (
|
|
61
|
-
: (
|
|
61
|
+
? (0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
62
|
+
: (0, utilsOolib_1.getPrimaryColorText)(_colors);
|
|
62
63
|
}, function (_a) {
|
|
63
64
|
var color = _a.color;
|
|
64
65
|
return color && (0, styled_components_2.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
|
|
65
66
|
}, function (_a) {
|
|
66
67
|
var active = _a.active;
|
|
67
68
|
return active && (0, styled_components_2.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])), function (_a) {
|
|
68
|
-
var invert = _a.invert,
|
|
69
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
69
70
|
return invert ?
|
|
70
|
-
(
|
|
71
|
+
(0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
71
72
|
:
|
|
72
|
-
(
|
|
73
|
+
(0, utilsOolib_1.getPrimaryColor10)(_colors);
|
|
73
74
|
}, function (_a) {
|
|
74
|
-
var
|
|
75
|
-
return (
|
|
75
|
+
var _colors = _a.theme._colors;
|
|
76
|
+
return (0, utilsOolib_1.getPrimaryColorText)(_colors);
|
|
76
77
|
});
|
|
77
78
|
}, function (_a) {
|
|
78
79
|
var disabled = _a.disabled;
|
|
@@ -81,40 +82,40 @@ var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (template
|
|
|
81
82
|
return invert ? greyColor80 : white;
|
|
82
83
|
}, greyColor15, greyColor40);
|
|
83
84
|
}, function (_a) {
|
|
84
|
-
var invert = _a.invert, active = _a.active,
|
|
85
|
+
var invert = _a.invert, active = _a.active, _colors = _a.theme._colors;
|
|
85
86
|
return active
|
|
86
87
|
? ""
|
|
87
88
|
: invert
|
|
88
|
-
? (
|
|
89
|
-
: (
|
|
89
|
+
? (0, utilsOolib_1.getPrimaryColor10)(_colors)
|
|
90
|
+
: (0, utilsOolib_1.getPrimaryColor40)(_colors);
|
|
90
91
|
}, function (_a) {
|
|
91
|
-
var
|
|
92
|
-
return (
|
|
92
|
+
var _colors = _a.theme._colors;
|
|
93
|
+
return (0, utilsOolib_1.getPrimaryColorText)(_colors);
|
|
93
94
|
});
|
|
94
|
-
var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", ";\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n }\n"], ["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", ";\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
95
|
-
var invert = _a.invert,
|
|
95
|
+
var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", "\n };\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"], ["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", "\n };\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
96
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
96
97
|
return invert
|
|
97
|
-
? (
|
|
98
|
-
: (
|
|
98
|
+
? (0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
99
|
+
: (0, utilsOolib_1.getPrimaryColor100)(_colors);
|
|
99
100
|
}, function (_a) {
|
|
100
|
-
var invert = _a.invert,
|
|
101
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
101
102
|
return invert
|
|
102
|
-
? (
|
|
103
|
-
: (
|
|
103
|
+
? (0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
104
|
+
: (0, utilsOolib_1.getPrimaryColor100)(_colors);
|
|
104
105
|
}, function (_a) {
|
|
105
|
-
var invert = _a.invert
|
|
106
|
+
var invert = _a.invert;
|
|
106
107
|
return invert ? greyColor100 : white;
|
|
107
108
|
}, function (_a) {
|
|
108
|
-
var invert = _a.invert,
|
|
109
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
109
110
|
return invert
|
|
110
|
-
? (
|
|
111
|
-
: (
|
|
111
|
+
? (0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
112
|
+
: (0, utilsOolib_1.getPrimaryColorText)(_colors);
|
|
112
113
|
}, function (_a) {
|
|
113
114
|
var color = _a.color;
|
|
114
|
-
return color && (0, styled_components_2.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["
|
|
115
|
+
return color && (0, styled_components_2.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), color);
|
|
115
116
|
}, function (_a) {
|
|
116
117
|
var disabled = _a.disabled;
|
|
117
|
-
return disabled && (0, styled_components_2.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: ", "
|
|
118
|
+
return disabled && (0, styled_components_2.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: ", ";\n border: 2px solid ", "; // $darkShadowColor : $greyColor15;\n box-shadow: -4px 4px 1px ", ";\n pointer-events: none;\n background-color: ", "; \n "], ["\n color: ", ";\n border: 2px solid ", "; // $darkShadowColor : $greyColor15;\n box-shadow: -4px 4px 1px ", ";\n pointer-events: none;\n background-color: ", "; \n "])), greyColor40, function (_a) {
|
|
118
119
|
var invert = _a.invert;
|
|
119
120
|
return (invert ? greyColor40 : greyColor15);
|
|
120
121
|
}, greyColor40, function (_a) {
|
|
@@ -122,21 +123,21 @@ var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateOb
|
|
|
122
123
|
return invert ? greyColor80 : white;
|
|
123
124
|
});
|
|
124
125
|
}, function (_a) {
|
|
125
|
-
var invert = _a.invert,
|
|
126
|
+
var invert = _a.invert, _colors = _a.theme._colors;
|
|
126
127
|
return invert
|
|
127
128
|
? greyColor80
|
|
128
|
-
: (
|
|
129
|
+
: (0, utilsOolib_1.getPrimaryColor40)(_colors);
|
|
129
130
|
});
|
|
130
131
|
var ButtonGhost = (0, styled_components_2.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", "; //$white;\n color: ", ";\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"], ["\n background-color: ", "; //$white;\n color: ", ";\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
131
|
-
var active = _a.active,
|
|
132
|
-
return active ? (
|
|
132
|
+
var active = _a.active, _colors = _a.theme._colors;
|
|
133
|
+
return active ? (0, utilsOolib_1.getPrimaryColor40)(_colors) : "inherit";
|
|
133
134
|
}, function (_a) {
|
|
134
|
-
var invert = _a.invert, composition = _a.composition,
|
|
135
|
+
var invert = _a.invert, composition = _a.composition, _colors = _a.theme._colors;
|
|
135
136
|
return invert
|
|
136
|
-
? (
|
|
137
|
+
? (0, utilsOolib_1.getPrimaryColor40)(_colors)
|
|
137
138
|
: composition === "iconOnly"
|
|
138
139
|
? greyColor100
|
|
139
|
-
: (
|
|
140
|
+
: (0, utilsOolib_1.getPrimaryColorText)(_colors);
|
|
140
141
|
}, function (_a) {
|
|
141
142
|
var color = _a.color;
|
|
142
143
|
return color && (0, styled_components_2.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
|
|
@@ -150,12 +151,12 @@ var ButtonGhost = (0, styled_components_2.css)(templateObject_14 || (templateObj
|
|
|
150
151
|
var disabled = _a.disabled;
|
|
151
152
|
return disabled && (0, styled_components_2.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n color: ", "; //$greyColor40;\n pointer-events: none;\n "], ["\n color: ", "; //$greyColor40;\n pointer-events: none;\n "])), greyColor40);
|
|
152
153
|
}, function (_a) {
|
|
153
|
-
var invert = _a.invert, active = _a.active,
|
|
154
|
+
var invert = _a.invert, active = _a.active, _colors = _a.theme._colors;
|
|
154
155
|
return active
|
|
155
156
|
? ""
|
|
156
157
|
: invert
|
|
157
158
|
? greyColor70
|
|
158
|
-
: (
|
|
159
|
+
: (0, utilsOolib_1.getPrimaryColor10)(_colors);
|
|
159
160
|
});
|
|
160
161
|
var GoogleButton = (0, styled_components_2.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n color: #4285f4;\n border: 2px solid #4285f4;\n background-color: ", ";\n ", "\n"], ["\n color: #4285f4;\n border: 2px solid #4285f4;\n background-color: ", ";\n ", "\n"])), white, function (_a) {
|
|
161
162
|
var disabled = _a.disabled;
|
|
@@ -17,9 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.InlineAlert = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var colors_1 = require("../../themes/colors");
|
|
20
|
+
var utilsOolib_1 = require("../../utilsOolib");
|
|
20
21
|
var red = colors_1.colors.red, white = colors_1.colors.white, green = colors_1.colors.green, black = colors_1.colors.black, darkGrey = colors_1.colors.darkGrey, greyColor100 = colors_1.colors.greyColor100;
|
|
21
22
|
var InlineAlert = function (props) {
|
|
22
23
|
var text = props.text, link = props.link, type = props.type, style = props.style, invert = props.invert;
|
|
24
|
+
var localize = (0, utilsOolib_1.useLocale)();
|
|
23
25
|
var typeColor = {
|
|
24
26
|
success: green,
|
|
25
27
|
danger: red,
|
|
@@ -27,7 +29,7 @@ var InlineAlert = function (props) {
|
|
|
27
29
|
neutralInactive: darkGrey,
|
|
28
30
|
};
|
|
29
31
|
return (react_1.default.createElement("h5", { style: __assign({ display: 'flex', alignItems: 'center', gap: '0.5rem' }, style) },
|
|
30
|
-
react_1.default.createElement("span", { className: 'SANS_2', style: { color: typeColor[type] } }, text),
|
|
31
|
-
link && (react_1.default.createElement("a", { style: { paddingLeft: '1rem', textDecoration: 'underline', color: invert ? white : greyColor100 }, href: link.url, target: "_blank" }, link.text))));
|
|
32
|
+
react_1.default.createElement("span", { className: 'SANS_2', style: { color: typeColor[type] } }, localize(text)),
|
|
33
|
+
link && (react_1.default.createElement("a", { style: { paddingLeft: '1rem', textDecoration: 'underline', color: invert ? white : greyColor100 }, href: link.url, target: "_blank" }, localize(link.text)))));
|
|
32
34
|
};
|
|
33
35
|
exports.InlineAlert = InlineAlert;
|
|
@@ -26,13 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.StyledLoader = exports.StyledLoaderWrapper = exports.StyledLoaderOverlay = void 0;
|
|
27
27
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
28
28
|
var colors_1 = require("../../themes/colors");
|
|
29
|
-
var
|
|
29
|
+
var utilsOolib_1 = require("../../utilsOolib");
|
|
30
|
+
var greyColor10 = colors_1.colors.greyColor10, greyColor70 = colors_1.colors.greyColor70, greyColor100 = colors_1.colors.greyColor100, white = colors_1.colors.white;
|
|
30
31
|
var spin = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"], ["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"])));
|
|
31
32
|
var StyledLoader = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-block;\n animation: ", " 1.2s linear infinite;\n border-radius: 50%;\n ", "\n"], ["\n display: inline-block;\n animation: ", " 1.2s linear infinite;\n border-radius: 50%;\n ", "\n"])), spin, function (_a) {
|
|
32
|
-
var M = _a.M, L = _a.L, invert = _a.invert,
|
|
33
|
+
var M = _a.M, L = _a.L, invert = _a.invert, _colors = _a.theme._colors;
|
|
33
34
|
var size = M ? 10 : L ? 15 : 3;
|
|
34
35
|
var trackSize = size === 30 ? size / 5 : size / 7;
|
|
35
|
-
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "rem;\n height: ", "rem;\n border-style: solid;\n border-width: ", "rem;\n border-color: ", ";\n border-top-color: ", "
|
|
36
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "rem;\n height: ", "rem;\n border-style: solid;\n border-width: ", "rem;\n border-color: ", ";\n border-top-color: ", ";\n "], ["\n width: ", "rem;\n height: ", "rem;\n border-style: solid;\n border-width: ", "rem;\n border-color: ", ";\n border-top-color: ", ";\n "])), size, size, trackSize, invert ? greyColor70 : greyColor10, invert ? white : (0, utilsOolib_1.getPrimaryColor100)(_colors));
|
|
36
37
|
});
|
|
37
38
|
exports.StyledLoader = StyledLoader;
|
|
38
39
|
var StyledLoaderWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n text-align: center;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 1rem;\n\n ", ";\n"], ["\n text-align: center;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 1rem;\n\n ", ";\n"])), function (_a) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function OKELink({ invert, disabled, theme, color, invertUnderline, linkType, link: linkProp, to, text, children, onClick, icon, iconAfter, iconSize }: {
|
|
2
|
+
invert: any;
|
|
3
|
+
disabled: any;
|
|
4
|
+
theme: any;
|
|
5
|
+
color: any;
|
|
6
|
+
invertUnderline: any;
|
|
7
|
+
linkType: any;
|
|
8
|
+
link: any;
|
|
9
|
+
to: any;
|
|
10
|
+
text: any;
|
|
11
|
+
children: any;
|
|
12
|
+
onClick: any;
|
|
13
|
+
icon: any;
|
|
14
|
+
iconAfter: any;
|
|
15
|
+
iconSize: any;
|
|
16
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.OKELink = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var react_router_dom_1 = require("react-router-dom");
|
|
20
|
+
var utilsOolib_1 = require("../../utilsOolib");
|
|
21
|
+
var utils_1 = require("../../utils");
|
|
22
|
+
var icons_1 = require("../../icons");
|
|
23
|
+
var styled_1 = require("./styled");
|
|
24
|
+
var utils_2 = require("./utils");
|
|
25
|
+
var OKELink = function (_a) {
|
|
26
|
+
var invert = _a.invert, disabled = _a.disabled, theme = _a.theme, color = _a.color, invertUnderline = _a.invertUnderline, linkType = _a.linkType, linkProp = _a.link, to = _a.to, text = _a.text, children = _a.children, onClick = _a.onClick, icon = _a.icon, iconAfter = _a.iconAfter, iconSize = _a.iconSize;
|
|
27
|
+
var localize = (0, utilsOolib_1.useLocale)();
|
|
28
|
+
var link = linkProp || to;
|
|
29
|
+
var PrefixIconComp = icons_1.icons[icon];
|
|
30
|
+
var SuffixIconComp = icons_1.icons[iconAfter];
|
|
31
|
+
var iconColor = (0, utils_2.setLinkColor)({ disabled: disabled, color: color, invert: invert, theme: theme });
|
|
32
|
+
return (react_1.default.createElement(styled_1.StyledLink, __assign({ onClick: function (ev) {
|
|
33
|
+
ev.stopPropagation();
|
|
34
|
+
linkType === 'action' && !disabled && onClick(ev);
|
|
35
|
+
}, invertUnderline: invertUnderline, invert: invert, disabled: disabled, color: color }, (linkType === 'action' ?
|
|
36
|
+
{ as: 'span' }
|
|
37
|
+
: linkType === 'external' ?
|
|
38
|
+
{
|
|
39
|
+
as: react_router_dom_1.Link,
|
|
40
|
+
to: !disabled ? link : '#'
|
|
41
|
+
} : {
|
|
42
|
+
href: !disabled ? (0, utils_1.injectHttps)(link) : '#',
|
|
43
|
+
target: "_blank"
|
|
44
|
+
})),
|
|
45
|
+
PrefixIconComp && react_1.default.createElement(PrefixIconComp, { color: iconColor, size: iconSize || 15 }),
|
|
46
|
+
react_1.default.createElement("span", { className: "text" }, localize(text || children)),
|
|
47
|
+
SuffixIconComp && react_1.default.createElement(SuffixIconComp, { color: iconColor, size: iconSize || 15 })));
|
|
48
|
+
};
|
|
49
|
+
exports.OKELink = OKELink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const StyledLink: any;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.StyledLink = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
var mixins_1 = require("../../themes/mixins");
|
|
13
|
+
var utils_1 = require("./utils");
|
|
14
|
+
exports.StyledLink = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: pointer;\n pointer-events: ", ";\n display: inline-flex;\n align-items: center;\n gap: 0.7rem;\n max-width: calc(100vw - 4rem); //the margin on mobile is 2rem each on both sides \n text-decoration: none;\n\n &:hover{\n .text::after{\n width: ", ";\n }\n }\n\n & > .text {\n position: relative;\n color: ", ";\n\n & > *:first-child{ // kishan addition\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n &::after{\n content: '';\n background-color: ", ";\n position: absolute;\n bottom: 0;\n left: 0;\n width: ", ";\n height: ", ";\n ", ";\n }\n }\n"], ["\n cursor: pointer;\n pointer-events: ", ";\n display: inline-flex;\n align-items: center;\n gap: 0.7rem;\n max-width: calc(100vw - 4rem); //the margin on mobile is 2rem each on both sides \n text-decoration: none;\n\n &:hover{\n .text::after{\n width: ", ";\n }\n }\n\n & > .text {\n position: relative;\n color: ", ";\n\n & > *:first-child{ // kishan addition\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n &::after{\n content: '';\n background-color: ", ";\n position: absolute;\n bottom: 0;\n left: 0;\n width: ", ";\n height: ", ";\n ", ";\n }\n }\n"])), function (_a) {
|
|
15
|
+
var disabled = _a.disabled;
|
|
16
|
+
return disabled ? 'none' : 'auto';
|
|
17
|
+
}, function (_a) {
|
|
18
|
+
var invertUnderline = _a.invertUnderline;
|
|
19
|
+
return invertUnderline ? '100%' : 0;
|
|
20
|
+
}, function (_a) {
|
|
21
|
+
var theme = _a.theme, invert = _a.invert, disabled = _a.disabled, color = _a.color;
|
|
22
|
+
return (0, utils_1.setLinkColor)({ disabled: disabled, color: color, invert: invert, theme: theme });
|
|
23
|
+
}, function (_a) {
|
|
24
|
+
var theme = _a.theme, invert = _a.invert, color = _a.color;
|
|
25
|
+
return (0, utils_1.setLinkColor)({ theme: theme, invert: invert, color: color });
|
|
26
|
+
}, function (_a) {
|
|
27
|
+
var invertUnderline = _a.invertUnderline;
|
|
28
|
+
return invertUnderline ? 0 : '100%';
|
|
29
|
+
}, function (_a) {
|
|
30
|
+
var disabled = _a.disabled;
|
|
31
|
+
return disabled ? 0 : '1px';
|
|
32
|
+
}, (0, mixins_1.transition)('width'));
|
|
33
|
+
var templateObject_1;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setLinkColor = void 0;
|
|
4
|
+
var themes_1 = require("../../../themes");
|
|
5
|
+
var utilsOolib_1 = require("../../../utilsOolib");
|
|
6
|
+
var greyColor40 = themes_1.colors.greyColor40;
|
|
7
|
+
var setLinkColor = function (_a) {
|
|
8
|
+
var disabled = _a.disabled, color = _a.color, invert = _a.invert, theme = _a.theme;
|
|
9
|
+
switch (true) {
|
|
10
|
+
case disabled:
|
|
11
|
+
return greyColor40;
|
|
12
|
+
case !!color:
|
|
13
|
+
return color;
|
|
14
|
+
case invert:
|
|
15
|
+
return (0, utilsOolib_1.getPrimaryColor40)(theme._colors);
|
|
16
|
+
default:
|
|
17
|
+
return (0, utilsOolib_1.getPrimaryColorText)(theme._colors);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.setLinkColor = setLinkColor;
|
|
@@ -40,8 +40,8 @@ var setBorder = function (_a) {
|
|
|
40
40
|
var setFill = function (_a) {
|
|
41
41
|
var _b;
|
|
42
42
|
var props = _a.props;
|
|
43
|
-
var colorsObj = ((_b = props.theme) === null || _b === void 0 ? void 0 : _b.
|
|
44
|
-
? __assign(__assign({}, colors_1.colors), props.theme.
|
|
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;
|
|
45
45
|
var colorKey = Object.keys(props).find(function (p) { return !!colorsObj[p]; });
|
|
46
46
|
return colorKey ? "background-color: ".concat(colorsObj[colorKey], ";") : '';
|
|
47
47
|
};
|