oolib 2.188.5 → 2.188.7
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.
|
@@ -173,7 +173,7 @@ exports.CheckboxList.argTypes = {
|
|
|
173
173
|
};
|
|
174
174
|
var CheckboxInput = function (args) {
|
|
175
175
|
var _a = (0, react_1.useState)([]), value = _a[0], setValue = _a[1];
|
|
176
|
-
var _b = (0, react_1.useState)({ value: "smth", display: "Squidward" }), option = _b[0], setOption = _b[1];
|
|
176
|
+
var _b = (0, react_1.useState)({ value: "smth", display: "Squidward Squidward Squidward Squidward Squidward Squidward Squidward Squidward Squidward Squidward ", desc: 'This is an explanation This is an explanation This is an explanation This is an explanation This is an explanation This is an explanation This is an explanation ' }), option = _b[0], setOption = _b[1];
|
|
177
177
|
(0, react_1.useEffect)(function () {
|
|
178
178
|
setOption(__assign(__assign({}, option), { display: args.option1 }));
|
|
179
179
|
}, [args.option1]);
|
|
@@ -182,7 +182,8 @@ var CheckboxInput = function (args) {
|
|
|
182
182
|
}, [args.optionIsCorrect]);
|
|
183
183
|
return (React.createElement("div", { style: {
|
|
184
184
|
padding: "4rem",
|
|
185
|
-
backgroundColor: args.invert ? greyColor100 : "unset",
|
|
185
|
+
backgroundColor: 'red', //args.invert ? greyColor100 : "unset",
|
|
186
|
+
width: '300px'
|
|
186
187
|
} },
|
|
187
188
|
React.createElement(RadioAndCheckbox_1.CheckboxInput, __assign({}, args, { value: value, option: option, S: args.size == "S",
|
|
188
189
|
rightWrongResult: args.markOptions,
|
|
@@ -52,7 +52,7 @@ var useStyleUpdateAfterToggleTransition_1 = require("../../../utils/useStyleUpda
|
|
|
52
52
|
var StyledContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 0.8rem;\n border: 1px solid ", ";\n background: #ffffff;\n box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.06);\n"], ["\n border-radius: 0.8rem;\n border: 1px solid ", ";\n background: #ffffff;\n box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.06);\n"])), colors_1.colors.grey10);
|
|
53
53
|
var StyledHeader = styled_components_1.default.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n padding: 1rem 1.6rem;\n text-align: left;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n"], ["\n width: 100%;\n padding: 1rem 1.6rem;\n text-align: left;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n"])));
|
|
54
54
|
var StyledRightHeaderSection = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
55
|
-
var ArrowWrapper = styled_components_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"], ["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"])), function (props) { return (props.isExpanded ?
|
|
55
|
+
var ArrowWrapper = styled_components_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"], ["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"])), function (props) { return (props.isExpanded ? 180 : 0); }, (0, mixins_1.transition)("transform"));
|
|
56
56
|
var StyledContentWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n \n ", "\n height: ", ";\n"], ["\n display: flex;\n align-items: flex-end;\n \n ", "\n height: ", ";\n"])), function (_a) {
|
|
57
57
|
var expandAnimationDuration = _a.expandAnimationDuration;
|
|
58
58
|
return (0, mixins_1.transition)("height ".concat(expandAnimationDuration / 1000, "s ease-out"));
|
|
@@ -1,4 +1,8 @@
|
|
|
1
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
|
+
};
|
|
2
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
8
|
};
|
|
@@ -13,8 +17,12 @@ var styled_1 = require("../../../../styled");
|
|
|
13
17
|
var utils_1 = require("../../../../utils");
|
|
14
18
|
var CheckboxButton_1 = require("../CheckboxButton");
|
|
15
19
|
var TextLoader_1 = require("../../../../../../../components/LoadersAndProgress/TextLoader");
|
|
20
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
21
|
+
var mixins_1 = require("../../../../../../../themes/mixins");
|
|
16
22
|
var CheckSquare = icons_1.icons.CheckSquare, XSquare = icons_1.icons.XSquare;
|
|
17
23
|
var red = themes_1.colors.red, grey40 = themes_1.colors.grey40, grey80 = themes_1.colors.grey80, onSecondary = themes_1.colors.onSecondary, invertRed = themes_1.colors.invertRed;
|
|
24
|
+
var UI_BODY_SM_DF_STYLED = (0, styled_components_1.default)(Typo2_1.UI_BODY_SM_DF)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), (0, mixins_1.clampText)(2));
|
|
25
|
+
var UI_CAPTION_DF_STYLED = (0, styled_components_1.default)(Typo2_1.UI_CAPTION_DF)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), (0, mixins_1.clampText)(2));
|
|
18
26
|
var CheckboxInput = function (_a) {
|
|
19
27
|
var option = _a.option, onClick = _a.onClick, S = _a.S, inputStyle = _a.inputStyle, _b = _a.value, value = _b === void 0 ? [] : _b, invert = _a.invert, disabled = _a.disabled, rightWrongResult = _a.rightWrongResult, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
20
28
|
var isSelected = !!value.find(function (selOp) { return selOp.value === option.value; });
|
|
@@ -43,6 +51,9 @@ var CheckboxInput = function (_a) {
|
|
|
43
51
|
: genCheckboxButton({ disabled: true }) //else rightWrongResult has come in, but this doesnt have to be marked right or wrong
|
|
44
52
|
: genCheckboxButton() // rightWrongResult has not come in. so gen normal radio button
|
|
45
53
|
),
|
|
46
|
-
react_1.default.createElement(
|
|
54
|
+
react_1.default.createElement("div", { style: { minWidth: 0 } },
|
|
55
|
+
react_1.default.createElement(UI_BODY_SM_DF_STYLED, { bold: rightWrongResult && isSelected, color: disabled ? grey40 : grey80, invert: invert }, option.display),
|
|
56
|
+
option.desc && react_1.default.createElement(UI_CAPTION_DF_STYLED, null, option.desc))));
|
|
47
57
|
};
|
|
48
58
|
exports.CheckboxInput = CheckboxInput;
|
|
59
|
+
var templateObject_1, templateObject_2;
|