oolib 2.205.5 → 2.206.0
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 -5
- package/dist/v2/components/Dropdowns/comps/SelectTagsInput/index.js +2 -4
- package/dist/v2/components/RadioAndCheckbox/comps/CheckboxList/index.js +13 -2
- package/dist/v2/components/RadioAndCheckbox/comps/RadioList/index.js +4 -2
- 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_BOLD_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) {
|
|
@@ -30,10 +30,6 @@ var DisplayCompSingle = function (_a) {
|
|
|
30
30
|
return (react_1.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: '1rem' } },
|
|
31
31
|
(0, genIcon_1.genIcon)({ icon: value === null || value === void 0 ? void 0 : value.icon, S: S }),
|
|
32
32
|
(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, ","))); })));
|
|
33
|
+
react_1.default.createElement(Typo2_1.UI_BODY_BOLD_DF, null, value === null || value === void 0 ? void 0 : value.display)));
|
|
38
34
|
};
|
|
39
35
|
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, {
|
|
@@ -99,8 +99,19 @@ function CheckboxList(_a) {
|
|
|
99
99
|
var OptionsContainer = optionsContainers[inputStyle];
|
|
100
100
|
var blocklabelProps = (0, _EXPORTS_1.getBlockLabelProps)(props);
|
|
101
101
|
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
|
|
102
|
+
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' })),
|
|
103
|
+
readOnly ? (react_1.default.createElement(styled_2.StyledDisplayTagsContainer, null, value === null || value === void 0 ? void 0 : value.map(function (selOp, idx) {
|
|
104
|
+
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
105
|
+
react_1.default.createElement(Typo2_1.UI_BODY_BOLD_DF, { key: selOp.value },
|
|
106
|
+
selOp.display_desc || selOp.display,
|
|
107
|
+
" ",
|
|
108
|
+
value.length > 1 && idx < value.length - 1 ? ',' : ''));
|
|
109
|
+
}
|
|
110
|
+
// <TagDisplay key={selOp.value} //using old one till we figure out exactly what we want for readOnly
|
|
111
|
+
// invert={invert}
|
|
112
|
+
// display={selOp.display_desc || selOp.display}//prioritzing display_desc since display of 'other' option is just 'Other'
|
|
113
|
+
// />
|
|
114
|
+
))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
104
115
|
react_1.default.createElement(OptionsContainer, { style: style, listType: listType, S: S }, typicalOptions === null || typicalOptions === void 0 ? void 0 :
|
|
105
116
|
typicalOptions.map(function (option, idx) { return idx < optionsLimit && (react_1.default.createElement(CheckboxInput_1.CheckboxInput, __assign({}, InputCommonProps, { option: option, key: option.value }))); }),
|
|
106
117
|
shouldHideSomeOptions && // if we have the case of off limit options
|
|
@@ -54,6 +54,7 @@ var styled_1 = require("../../styled");
|
|
|
54
54
|
var utils_1 = require("../../utils");
|
|
55
55
|
var comps_1 = require("./comps");
|
|
56
56
|
var Tags_1 = require("../../../../../components/Tags");
|
|
57
|
+
var Typo2_1 = require("../../../Typo2");
|
|
57
58
|
function RadioList(_a) {
|
|
58
59
|
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
60
|
var props = arguments[0];
|
|
@@ -84,8 +85,9 @@ function RadioList(_a) {
|
|
|
84
85
|
};
|
|
85
86
|
var blocklabelProps = (0, _EXPORTS_1.getBlockLabelProps)(props);
|
|
86
87
|
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(
|
|
88
|
+
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' })),
|
|
89
|
+
readOnly ? ((value === null || value === void 0 ? void 0 : value.display) && react_1.default.createElement(Typo2_1.UI_BODY_BOLD_DF, null, value.display_desc || value.display)
|
|
90
|
+
// <TagDisplay display={value.display_desc || value.display} invert={invert}/> //prioritzing display_desc since display of 'other' option is === other
|
|
89
91
|
) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
90
92
|
react_1.default.createElement(styled_1.StyledOptionsContainer, { listType: listType, S: S }, typicalOptions === null || typicalOptions === void 0 ? void 0 :
|
|
91
93
|
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) {
|