oolib 2.193.1 → 2.193.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,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ListItem = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
4
8
|
var styled_components_1 = require("styled-components");
|
|
5
9
|
var TextLoader_1 = require("../../../../components/LoadersAndProgress/TextLoader");
|
|
6
10
|
// import { genProfileImg } from "../../Dropdowns/utils/genProfileImg";
|
|
@@ -24,26 +28,26 @@ var ListItem = function (_a) {
|
|
|
24
28
|
}
|
|
25
29
|
};
|
|
26
30
|
if (loading) {
|
|
27
|
-
return (
|
|
28
|
-
|
|
31
|
+
return (react_1.default.createElement(styled_1.StyledListItemWrapper, { isSelected: isSelected, isFocussed: isFocussed, className: "OKE-Dropdown__option", S: S },
|
|
32
|
+
react_1.default.createElement(TextLoader_1.TextLoader, { style: { width: "8rem", height: "1.5rem" } })));
|
|
29
33
|
}
|
|
30
34
|
var opIsSelected = function (thisOpData) {
|
|
31
35
|
return value === null || value === void 0 ? void 0 : value.some(function (d) { return d.value === thisOpData.value; });
|
|
32
36
|
};
|
|
33
|
-
return (
|
|
34
|
-
|
|
37
|
+
return (react_1.default.createElement(styled_1.StyledListItemWrapper, { index: index, isSelected: isSelected, isFocussed: isFocussed, className: "OKE-Dropdown__option", ref: function (el) { return isFocussed && el && scrollFocussedOpIntoView(el); }, onClick: handleClick, S: S, style: { pointerEvents: disabled && "none" } },
|
|
38
|
+
react_1.default.createElement("div", { ref: observerRef, style: {
|
|
35
39
|
display: "flex",
|
|
36
40
|
alignItems: "flex-start",
|
|
37
41
|
maxWidth: "36rem",
|
|
38
42
|
gap: icon ? "0.6rem" : "0.8rem",
|
|
39
43
|
} },
|
|
40
|
-
(image || icon || color || isMulti) && (
|
|
44
|
+
(image || icon || color || isMulti) && (react_1.default.createElement("div", { style: {
|
|
41
45
|
marginTop: "0.1rem",
|
|
42
46
|
display: "flex",
|
|
43
47
|
alignItems: "center",
|
|
44
48
|
gap: "0.5rem"
|
|
45
49
|
} },
|
|
46
|
-
isMulti && !isTagsStyle ?
|
|
50
|
+
isMulti && !isTagsStyle ? react_1.default.createElement(RadioAndCheckbox_1.CheckboxButton, { isSelected: opIsSelected(option) }) : null,
|
|
47
51
|
icon &&
|
|
48
52
|
(0, genIcon_1.genIcon)({
|
|
49
53
|
icon: icon,
|
|
@@ -52,8 +56,8 @@ var ListItem = function (_a) {
|
|
|
52
56
|
disabled: disabled
|
|
53
57
|
}),
|
|
54
58
|
color && (0, genColor_1.genColor)({ color: color }))),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
desc && (
|
|
59
|
+
react_1.default.createElement("div", null,
|
|
60
|
+
react_1.default.createElement(TypoComp, { semibold: desc ? true : false, className: "OKE-Dropdown__optionText ".concat(optionsClassName || ""), style: { color: disabled ? grey40 : grey80 } }, (0, getText_1.getText)(display)),
|
|
61
|
+
desc && (react_1.default.createElement(Typo2_1.UI_CAPTION_DF, { className: "OKE-Dropdown__optionDesc", style: { color: disabled ? grey40 : grey60, marginTop: "0.2rem" } }, (0, getText_1.getText)(desc)))))));
|
|
58
62
|
};
|
|
59
63
|
exports.ListItem = ListItem;
|