oolib 2.131.4 → 2.131.5

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.
@@ -83,7 +83,7 @@ function GroupQuestionsInputSingle(_a) {
83
83
  var _a;
84
84
  return (react_1.default.createElement("td", { key: "".concat(subQuestion === null || subQuestion === void 0 ? void 0 : subQuestion.value, "-").concat(option === null || option === void 0 ? void 0 : option.value), style: { borderLeft: "1px solid ".concat(greyColor10) } },
85
85
  react_1.default.createElement(styled_1.StyledElem, null,
86
- react_1.default.createElement(RadioAndCheckbox_1.RadioButton, { isSelected: (value &&
86
+ react_1.default.createElement(RadioAndCheckbox_1.RadioButton, { readOnly: readOnly, isSelected: (value &&
87
87
  (subQuestion === null || subQuestion === void 0 ? void 0 : subQuestion.value) &&
88
88
  ((_a = value[subQuestion.value]) === null || _a === void 0 ? void 0 : _a.value) ===
89
89
  (option === null || option === void 0 ? void 0 : option.value)) ||
@@ -93,7 +93,7 @@ function GroupQuestionsInputSingle(_a) {
93
93
  } }))));
94
94
  }))); })))) : (react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', gap: '2rem' } }, subQuestionLabels.map(function (subQuestion) { return (react_1.default.createElement("div", null,
95
95
  react_1.default.createElement(Typo_1.SANS_2, { semibold: true, style: { paddingBottom: "1rem" } }, subQuestion.display),
96
- react_1.default.createElement(DropdownSingle_1.DropdownSingle, { options: options, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, value: value && value[subQuestion.value], onChange: function (k, v) {
96
+ react_1.default.createElement(DropdownSingle_1.DropdownSingle, { readOnly: readOnly, options: options, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, value: value && value[subQuestion.value], onChange: function (k, v) {
97
97
  handleChange(subQuestion.value, v);
98
98
  } }))); }))))));
99
99
  }
@@ -1,9 +1,10 @@
1
- export function RadioButton({ isSelected, onClick, disabled, invert, S }: {
1
+ export function RadioButton({ isSelected, onClick, disabled, invert, S, readOnly }: {
2
2
  isSelected: any;
3
3
  onClick: any;
4
4
  disabled: any;
5
5
  invert: any;
6
6
  S: any;
7
+ readOnly: any;
7
8
  }): React.JSX.Element;
8
9
  export function RadioInput({ option, onClick, disabled, invert, value, S, rightWrongResult, }: {
9
10
  option: any;
@@ -14,8 +14,8 @@ var styled_2 = require("./styled");
14
14
  var invertGreen = themes_1.colors.invertGreen, red = themes_1.colors.red, greyColor40 = themes_1.colors.greyColor40, green = themes_1.colors.green, invertRed = themes_1.colors.invertRed;
15
15
  var XCircle = icons_1.icons.XCircle, CheckCircle = icons_1.icons.CheckCircle;
16
16
  var RadioButton = function (_a) {
17
- var isSelected = _a.isSelected, onClick = _a.onClick, disabled = _a.disabled, invert = _a.invert, S = _a.S;
18
- return (react_1.default.createElement(styled_2.StyledRadioInput, { onClick: function (ev) { return onClick && onClick(ev); }, isSelected: isSelected, disabled: disabled, invert: invert, S: S }, isSelected && react_1.default.createElement(styled_2.StyledRadioInputFill, { invert: invert, S: S })));
17
+ var isSelected = _a.isSelected, onClick = _a.onClick, disabled = _a.disabled, invert = _a.invert, S = _a.S, readOnly = _a.readOnly;
18
+ return (react_1.default.createElement(styled_2.StyledRadioInput, { onClick: function (ev) { return onClick && onClick(ev); }, isSelected: isSelected, disabled: disabled, invert: invert, S: S, readOnly: readOnly }, isSelected && react_1.default.createElement(styled_2.StyledRadioInputFill, { invert: invert, S: S })));
19
19
  };
20
20
  exports.RadioButton = RadioButton;
21
21
  var RadioInput = function (_a) {
@@ -44,8 +44,8 @@ exports.StyledRadioInput = styled_components_1.default.button(templateObject_3 |
44
44
  return disabled ? greyColor40 :
45
45
  invert ? (0, utilsOolib_1.getPrimaryColor40)(colors) : (0, utilsOolib_1.getPrimaryColor100)(colors);
46
46
  }, none, function (_a) {
47
- var disabled = _a.disabled;
48
- return disabled ? 'not-allowed' : 'pointer';
47
+ var disabled = _a.disabled, readOnly = _a.readOnly;
48
+ return disabled ? 'not-allowed' : readOnly ? 'default' : 'pointer';
49
49
  }, (0, mixins_1.transition)('background-color 0.2s'), function (_a) {
50
50
  var isSelected = _a.isSelected;
51
51
  return isSelected && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color:", ";\n display: flex;\n align-items: center;\n justify-content: center;\n "], ["\n background-color:", ";\n display: flex;\n align-items: center;\n justify-content: center;\n "])), function (_a) {
@@ -54,8 +54,8 @@ exports.StyledRadioInput = styled_components_1.default.button(templateObject_3 |
54
54
  invert ? (0, utilsOolib_1.getPrimaryColor40)(colors) : (0, utilsOolib_1.getPrimaryColor100)(colors);
55
55
  });
56
56
  }, function (_a) {
57
- var isSelected = _a.isSelected, disabled = _a.disabled, theme = _a.theme, invert = _a.invert;
58
- return !isSelected && !disabled && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), invert ? greyColor80 : (0, utilsOolib_1.getPrimaryColor10)(theme.colors));
57
+ var isSelected = _a.isSelected, disabled = _a.disabled, theme = _a.theme, invert = _a.invert, readOnly = _a.readOnly;
58
+ return !isSelected && !disabled && !readOnly && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), invert ? greyColor80 : (0, utilsOolib_1.getPrimaryColor10)(theme.colors));
59
59
  }, function (_a) {
60
60
  var colors = _a.theme.colors, disabled = _a.disabled, invert = _a.invert;
61
61
  return disabled ? greyColor40 :
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.131.4",
3
+ "version": "2.131.5",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",