oolib 2.205.5 → 2.206.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/v2/components/Dropdowns/DropdownMulti/index.js +5 -2
- package/dist/v2/components/Dropdowns/comps/DisplayCompSingle/index.js +1 -7
- package/dist/v2/components/Dropdowns/comps/SelectTagsInput/index.js +2 -4
- package/dist/v2/components/RadioAndCheckbox/comps/CheckboxList/index.js +13 -3
- package/dist/v2/components/RadioAndCheckbox/comps/RadioList/index.js +4 -3
- package/dist/v2/components/TabBar/index.styled.js +2 -2
- package/package.json +1 -1
|
@@ -66,6 +66,7 @@ var styled_1 = require("../styled");
|
|
|
66
66
|
var BlockLabel_1 = require("../../BlockLabel");
|
|
67
67
|
var getBlockLabelProps_1 = require("../../../../utils/getBlockLabelProps");
|
|
68
68
|
var List_1 = require("../../List");
|
|
69
|
+
var Typo2_1 = require("../../Typo2");
|
|
69
70
|
function DropdownMulti(_a) {
|
|
70
71
|
var saveValueAsString = _a.saveValueAsString, valueProp = _a.value, id = _a.id, parentOnChange = _a.onChange, className = _a.className,
|
|
71
72
|
// injectOtherOption,
|
|
@@ -171,8 +172,10 @@ function DropdownMulti(_a) {
|
|
|
171
172
|
var genDisplayComp = function () {
|
|
172
173
|
if (!(value === null || value === void 0 ? void 0 : value.length) > 0)
|
|
173
174
|
return null;
|
|
174
|
-
return isTagsStyle ? (react_1.default.createElement(styled_1.StyledTagsInputWrapper, null, value.map(function (d) { return (0, genTagComp_1.genTagComp)(id, d, { display: true, theme: theme, color: tagColor }); }))) : (react_1.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "0.5rem" } }, value.map(function (v, i) { return
|
|
175
|
-
|
|
175
|
+
return isTagsStyle ? (react_1.default.createElement(styled_1.StyledTagsInputWrapper, null, value.map(function (d) { return (0, genTagComp_1.genTagComp)(id, d, { display: true, theme: theme, color: tagColor }); }))) : (react_1.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "0.5rem" } }, value.map(function (v, i) { return react_1.default.createElement(Typo2_1.UI_BODY_SM_DF, { key: v.value },
|
|
176
|
+
v.display,
|
|
177
|
+
" ",
|
|
178
|
+
i !== value.length - 1 ? ',' : ''); })));
|
|
176
179
|
};
|
|
177
180
|
var _h = (0, react_1.useState)(false), focusSelectTagsInput = _h[0], setFocusSelectTagsInput = _h[1];
|
|
178
181
|
var genSelectTagsInput = function (ops) {
|
|
@@ -16,12 +16,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DisplayCompSingle = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var genLinkOrText_1 = require("../../utils/genLinkOrText");
|
|
20
19
|
var styled_components_1 = require("styled-components");
|
|
21
20
|
var genProfileImg_1 = require("../../utils/genProfileImg");
|
|
22
21
|
var genIcon_1 = require("../../utils/genIcon");
|
|
23
22
|
var Typo2_1 = require("../../../Typo2");
|
|
24
|
-
var OKELink_1 = require("../../../OKELink");
|
|
25
23
|
var DisplayCompSingle = function (_a) {
|
|
26
24
|
var value = _a.value, injectComma = _a.injectComma, S = _a.S;
|
|
27
25
|
var theme = (0, styled_components_1.useTheme)();
|
|
@@ -30,10 +28,6 @@ var DisplayCompSingle = function (_a) {
|
|
|
30
28
|
return (react_1.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: '1rem' } },
|
|
31
29
|
(0, genIcon_1.genIcon)({ icon: value === null || value === void 0 ? void 0 : value.icon, S: S }),
|
|
32
30
|
(value === null || value === void 0 ? void 0 : value.image) && (0, genProfileImg_1.genProfileImg)(__assign(__assign({}, value), { theme: theme })),
|
|
33
|
-
|
|
34
|
-
link
|
|
35
|
-
? react_1.default.createElement(OKELink_1.OKELink, { to: link }, display)
|
|
36
|
-
: display,
|
|
37
|
-
injectComma && react_1.default.createElement("span", null, ","))); })));
|
|
31
|
+
react_1.default.createElement(Typo2_1.UI_BODY_SM_DF, null, value === null || value === void 0 ? void 0 : value.display)));
|
|
38
32
|
};
|
|
39
33
|
exports.DisplayCompSingle = DisplayCompSingle;
|
|
@@ -80,10 +80,8 @@ var SelectTagsInput = function (_a) {
|
|
|
80
80
|
return (react_1.default.createElement(styled_1.StyledSelectTagsWrapper, { style: style, disabled: disabled, className: "".concat(isFocussed ? "focussed" : "") },
|
|
81
81
|
react_1.default.createElement("div", { style: { display: "flex", gap: "0.4rem", alignItems: "center", height: "2.4rem" } },
|
|
82
82
|
" ",
|
|
83
|
-
single_multi === "multi"
|
|
84
|
-
react_1.default.createElement(Buttons_1.ButtonTertiaryCompact, { onClick: function () { return handleClearAll(); }, children: "Clear all", disabled: !value || !value.length })
|
|
85
|
-
:
|
|
86
|
-
react_1.default.createElement(Typo2_1.UI_BODY_SEMIBOLD_SM_DF, { style: { color: __1.colors2.grey50 } }, "Selected : "),
|
|
83
|
+
single_multi === "multi" &&
|
|
84
|
+
react_1.default.createElement(Buttons_1.ButtonTertiaryCompact, { onClick: function () { return handleClearAll(); }, children: "Clear all", disabled: !value || !value.length }),
|
|
87
85
|
value &&
|
|
88
86
|
(0, toArray_1.toArray)(value).map(function (d) {
|
|
89
87
|
return (0, genTagComp_1.genTagComp)(id, d, {
|
|
@@ -55,7 +55,6 @@ var CheckboxInput_1 = require("./comps/CheckboxInput");
|
|
|
55
55
|
var styled_2 = require("./styled");
|
|
56
56
|
var Typo2_1 = require("../../../Typo2");
|
|
57
57
|
var OKELink_1 = require("../../../OKELink");
|
|
58
|
-
var Tags_1 = require("../../../../../components/Tags");
|
|
59
58
|
var optionsContainers = {
|
|
60
59
|
checkbox: styled_1.StyledOptionsContainer,
|
|
61
60
|
tagSelect: styled_2.StyledTagOptionsContainer,
|
|
@@ -99,8 +98,19 @@ function CheckboxList(_a) {
|
|
|
99
98
|
var OptionsContainer = optionsContainers[inputStyle];
|
|
100
99
|
var blocklabelProps = (0, _EXPORTS_1.getBlockLabelProps)(props);
|
|
101
100
|
return (react_1.default.createElement("div", { className: className, id: id },
|
|
102
|
-
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, blocklabelProps, { marginBottom: (blocklabelProps === null || blocklabelProps === void 0 ? void 0 : blocklabelProps.sublabel) ? '1.4rem' : '1.2rem' })),
|
|
103
|
-
readOnly ? (react_1.default.createElement(styled_2.StyledDisplayTagsContainer, null, value === null || value === void 0 ? void 0 : value.map(function (selOp
|
|
101
|
+
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, blocklabelProps, { marginBottom: readOnly ? '0.4rem' : (blocklabelProps === null || blocklabelProps === void 0 ? void 0 : blocklabelProps.sublabel) ? '1.4rem' : '1.2rem' })),
|
|
102
|
+
readOnly ? (react_1.default.createElement(styled_2.StyledDisplayTagsContainer, null, value === null || value === void 0 ? void 0 : value.map(function (selOp, idx) {
|
|
103
|
+
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
104
|
+
react_1.default.createElement(Typo2_1.UI_BODY_SM_DF, { key: selOp.value },
|
|
105
|
+
selOp.display_desc || selOp.display,
|
|
106
|
+
" ",
|
|
107
|
+
value.length > 1 && idx < value.length - 1 ? ',' : ''));
|
|
108
|
+
}
|
|
109
|
+
// <TagDisplay key={selOp.value} //using old one till we figure out exactly what we want for readOnly
|
|
110
|
+
// invert={invert}
|
|
111
|
+
// display={selOp.display_desc || selOp.display}//prioritzing display_desc since display of 'other' option is just 'Other'
|
|
112
|
+
// />
|
|
113
|
+
))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
104
114
|
react_1.default.createElement(OptionsContainer, { style: style, listType: listType, S: S }, typicalOptions === null || typicalOptions === void 0 ? void 0 :
|
|
105
115
|
typicalOptions.map(function (option, idx) { return idx < optionsLimit && (react_1.default.createElement(CheckboxInput_1.CheckboxInput, __assign({}, InputCommonProps, { option: option, key: option.value }))); }),
|
|
106
116
|
shouldHideSomeOptions && // if we have the case of off limit options
|
|
@@ -53,7 +53,7 @@ var _EXPORTS_1 = require("../../../../../utils/_EXPORTS");
|
|
|
53
53
|
var styled_1 = require("../../styled");
|
|
54
54
|
var utils_1 = require("../../utils");
|
|
55
55
|
var comps_1 = require("./comps");
|
|
56
|
-
var
|
|
56
|
+
var Typo2_1 = require("../../../Typo2");
|
|
57
57
|
function RadioList(_a) {
|
|
58
58
|
var id = _a.id, _b = _a.injectOtherOption, injectOtherOption = _b === void 0 ? false : _b, valueProp = _a.value, onChange = _a.onChange, saveValueAsString = _a.saveValueAsString, _c = _a.options, options = _c === void 0 ? [] : _c, commonIsCorrectDesc = _a.commonIsCorrectDesc, rightWrongResult = _a.rightWrongResult, _d = _a.optionsLimit, optionsLimit = _d === void 0 ? Infinity : _d, _e = _a.listType, listType = _e === void 0 ? 'horizontal' : _e, disabled = _a.disabled, invert = _a.invert, readOnly = _a.readOnly, S = _a.S;
|
|
59
59
|
var props = arguments[0];
|
|
@@ -84,8 +84,9 @@ function RadioList(_a) {
|
|
|
84
84
|
};
|
|
85
85
|
var blocklabelProps = (0, _EXPORTS_1.getBlockLabelProps)(props);
|
|
86
86
|
return (react_1.default.createElement("div", { id: id },
|
|
87
|
-
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, blocklabelProps, { marginBottom: (blocklabelProps === null || blocklabelProps === void 0 ? void 0 : blocklabelProps.sublabel) ? '1.4rem' : '1.2rem' })),
|
|
88
|
-
readOnly ? ((value === null || value === void 0 ? void 0 : value.display) && react_1.default.createElement(
|
|
87
|
+
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, blocklabelProps, { marginBottom: readOnly ? '0.4rem' : (blocklabelProps === null || blocklabelProps === void 0 ? void 0 : blocklabelProps.sublabel) ? '1.4rem' : '1.2rem' })),
|
|
88
|
+
readOnly ? ((value === null || value === void 0 ? void 0 : value.display) && react_1.default.createElement(Typo2_1.UI_BODY_SM_DF, null, value.display_desc || value.display)
|
|
89
|
+
// <TagDisplay display={value.display_desc || value.display} invert={invert}/> //prioritzing display_desc since display of 'other' option is === other
|
|
89
90
|
) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
90
91
|
react_1.default.createElement(styled_1.StyledOptionsContainer, { listType: listType, S: S }, typicalOptions === null || typicalOptions === void 0 ? void 0 :
|
|
91
92
|
typicalOptions.map(function (option, idx) { return idx < optionsLimit && (react_1.default.createElement(comps_1.RadioInput, __assign({}, InputCommonProps, { option: option, key: option.value }))); }),
|
|
@@ -79,8 +79,8 @@ exports.tabStyles = {
|
|
|
79
79
|
var disabled = _a.disabled, active = _a.active;
|
|
80
80
|
return disabled ? white : active ? (0, getDynamicColors_1.getSecondaryContainer)(themes_1.colors) : grey10;
|
|
81
81
|
}, function (_a) {
|
|
82
|
-
var disabled = _a.disabled, colors = _a.theme.colors;
|
|
83
|
-
return disabled ? grey40 : (0, getDynamicColors_1.getOnSecondary)(colors);
|
|
82
|
+
var disabled = _a.disabled, active = _a.active, colors = _a.theme.colors;
|
|
83
|
+
return disabled ? grey40 : active ? (0, getDynamicColors_1.getOnSecondary)(colors) : grey80;
|
|
84
84
|
}, (0, mixins_1.transition)("color"))
|
|
85
85
|
};
|
|
86
86
|
exports.TabBarStyled = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n z-index: 1000;\n height: ", ";\n"], ["\n background-color: ", ";\n z-index: 1000;\n height: ", ";\n"])), white, function (_a) {
|