oolib 2.131.3 → 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.
- package/dist/components/Dropdowns/DropdownMulti/index.d.ts +2 -1
- package/dist/components/Dropdowns/DropdownMulti/index.js +2 -2
- package/dist/components/Dropdowns/DropdownSingle/index.d.ts +2 -1
- package/dist/components/Dropdowns/DropdownSingle/index.js +2 -2
- package/dist/components/Dropdowns/comps/OptionsMulti/index.d.ts +2 -1
- package/dist/components/Dropdowns/comps/OptionsMulti/index.js +2 -2
- package/dist/components/Dropdowns/comps/OptionsSingle/index.d.ts +2 -1
- package/dist/components/Dropdowns/comps/OptionsSingle/index.js +5 -2
- package/dist/components/GroupQuestionsInputSingle/index.js +2 -2
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/index.d.ts +2 -1
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/index.js +2 -2
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/styled.js +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function DropdownMulti({ saveValueAsString, value: valueProp, id, onChange: parentOnChange, className, readOnly, invert, selectClassName, optionsClassName, selectStyleOverride, optionsFn, options: optionsProp, isTagsStyle, isSearchable, searchFieldsConfig, setFilteredOptions: setFilteredOptionsInParent, setSearchString: setSearchStringInParent, searchString: searchStringInParent, label, optionsModalLabel, genCreateTagButton, placeholder, genCustomSelectComp, disableSelectTextUpdate, selectConfig, lightboxHeight, lightboxStyle, optionsAnchor, popOutOfOverflowHiddenParent, S, disabled, broadcastShowOptions, tagColor }: {
|
|
1
|
+
export function DropdownMulti({ saveValueAsString, value: valueProp, id, onChange: parentOnChange, className, readOnly, invert, selectClassName, optionsClassName, selectStyleOverride, optionsFn, options: optionsProp, isTagsStyle, isSearchable, searchFieldsConfig, setFilteredOptions: setFilteredOptionsInParent, setSearchString: setSearchStringInParent, searchString: searchStringInParent, label, optionsModalLabel, genCreateTagButton, placeholder, genCustomSelectComp, disableSelectTextUpdate, selectConfig, lightboxHeight, lightboxStyle, optionsAnchor, popOutOfOverflowHiddenParent, S, disabled, broadcastShowOptions, tagColor, searchbarPlaceholder }: {
|
|
2
2
|
saveValueAsString: any;
|
|
3
3
|
value: any;
|
|
4
4
|
id: any;
|
|
@@ -32,5 +32,6 @@ export function DropdownMulti({ saveValueAsString, value: valueProp, id, onChang
|
|
|
32
32
|
disabled: any;
|
|
33
33
|
broadcastShowOptions: any;
|
|
34
34
|
tagColor: any;
|
|
35
|
+
searchbarPlaceholder: any;
|
|
35
36
|
}, ...args: any[]): React.JSX.Element;
|
|
36
37
|
import React from "react";
|
|
@@ -62,7 +62,7 @@ function DropdownMulti(_a) {
|
|
|
62
62
|
optionsClassName = _a.optionsClassName, //used to override font size in priimary header
|
|
63
63
|
selectStyleOverride = _a.selectStyleOverride, optionsFn = _a.optionsFn, optionsProp = _a.options, isTagsStyle = _a.isTagsStyle, isSearchable = _a.isSearchable, searchFieldsConfig = _a.searchFieldsConfig, setFilteredOptionsInParent = _a.setFilteredOptions, setSearchStringInParent = _a.setSearchString, searchStringInParent = _a.searchString, label = _a.label, optionsModalLabel = _a.optionsModalLabel, genCreateTagButton = _a.genCreateTagButton, placeholder = _a.placeholder, genCustomSelectComp = _a.genCustomSelectComp, disableSelectTextUpdate = _a.disableSelectTextUpdate, selectConfig = _a.selectConfig,
|
|
64
64
|
//props whose existence needs to be questioned:
|
|
65
|
-
lightboxHeight = _a.lightboxHeight, lightboxStyle = _a.lightboxStyle, optionsAnchor = _a.optionsAnchor, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, disabled = _a.disabled, broadcastShowOptions = _a.broadcastShowOptions, tagColor = _a.tagColor;
|
|
65
|
+
lightboxHeight = _a.lightboxHeight, lightboxStyle = _a.lightboxStyle, optionsAnchor = _a.optionsAnchor, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, disabled = _a.disabled, broadcastShowOptions = _a.broadcastShowOptions, tagColor = _a.tagColor, searchbarPlaceholder = _a.searchbarPlaceholder;
|
|
66
66
|
var theme = (0, styled_components_1.useTheme)();
|
|
67
67
|
var props = arguments[0];
|
|
68
68
|
var value = (0, getValue_1.getValue_MULTI)({ valueProp: valueProp, optionsFn: optionsFn, options: optionsProp, theme: theme, saveValueAsString: saveValueAsString });
|
|
@@ -151,7 +151,7 @@ function DropdownMulti(_a) {
|
|
|
151
151
|
? !showOptions && handleShowOptions() //if tagsStyle, then click always shows options
|
|
152
152
|
: showOptions ? handleHideOptions() : handleShowOptions(); //if dropdowns, then click toggles show/hide
|
|
153
153
|
} }, isTagsStyle ? genSelectTagsInput() : (react_1.default.createElement(SelectDropdown_1.SelectDropdown, { invert: invert, value: value, placeholder: placeholder, selectClassName: selectClassName, selectStyleOverride: selectStyleOverride, showOptions: showOptions, genCustomSelectComp: genCustomSelectComp, disableSelectTextUpdate: disableSelectTextUpdate, selectConfig: selectConfig, S: S, disabled: disabled }))),
|
|
154
|
-
react_1.default.createElement(OptionsMulti_1.OptionsMulti, { id: id, value: value, relativeToRef: selectRef, showOptions: showOptions, handleSelect: handleSelect, handleHideOptions: handleHideOptions, optionsClassName: optionsClassName, options: options, optionsFn: optionsFn, isSearchable: isTagsStyle ? false : isSearchable, searchString: searchString, setSearchString: setSearchString, label: label, optionsModalLabel: optionsModalLabel, isTagsStyle: isTagsStyle, genCreateTagButton: genCreateTagButton, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, optionsAnchor: optionsAnchor, SelectComp: isTagsStyle && genSelectTagsInput(), invert: invert, setFocusSelectTagsInput: setFocusSelectTagsInput, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, S: S })));
|
|
154
|
+
react_1.default.createElement(OptionsMulti_1.OptionsMulti, { searchbarPlaceholder: searchbarPlaceholder, id: id, value: value, relativeToRef: selectRef, showOptions: showOptions, handleSelect: handleSelect, handleHideOptions: handleHideOptions, optionsClassName: optionsClassName, options: options, optionsFn: optionsFn, isSearchable: isTagsStyle ? false : isSearchable, searchString: searchString, setSearchString: setSearchString, label: label, optionsModalLabel: optionsModalLabel, isTagsStyle: isTagsStyle, genCreateTagButton: genCreateTagButton, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, optionsAnchor: optionsAnchor, SelectComp: isTagsStyle && genSelectTagsInput(), invert: invert, setFocusSelectTagsInput: setFocusSelectTagsInput, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, S: S })));
|
|
155
155
|
};
|
|
156
156
|
return (react_1.default.createElement("div", { className: "OKE-Dropdown ".concat(className, " OKE-Dropdown--").concat(readOnly ? "displayComp" : "inputComp", " ").concat(invert ? "-invert-" : "") },
|
|
157
157
|
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, getBlockLabelProps_1.getBlockLabelProps)(props))),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, selectClassName, optionsClassName, disableSelectTextUpdate, selectStyleOverride, value: valueProp, id, onChange: parentOnChange, className, style, readOnly, invert, optionsFn, options: optionsProp, saveValueAsString, isTagsStyle, selectConfig, label, optionsModalLabel, broadcastShowOptions, isSearchable, searchFieldsConfig, setFilteredOptions: setFilteredOptionsInParent, setSearchString: setSearchStringInParent, searchString: searchStringInParent, genCustomSelectComp, placeholder, genCreateTagButton, popOutOfOverflowHiddenParent, S, disabled, tagColor, observerRef }: {
|
|
1
|
+
export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, selectClassName, optionsClassName, disableSelectTextUpdate, selectStyleOverride, value: valueProp, id, onChange: parentOnChange, className, style, readOnly, invert, optionsFn, options: optionsProp, saveValueAsString, isTagsStyle, selectConfig, label, optionsModalLabel, broadcastShowOptions, isSearchable, searchFieldsConfig, setFilteredOptions: setFilteredOptionsInParent, setSearchString: setSearchStringInParent, searchString: searchStringInParent, genCustomSelectComp, placeholder, genCreateTagButton, popOutOfOverflowHiddenParent, S, disabled, tagColor, observerRef, searchbarPlaceholder }: {
|
|
2
2
|
optionsAnchor: any;
|
|
3
3
|
lightboxHeight: any;
|
|
4
4
|
lightboxStyle: any;
|
|
@@ -34,5 +34,6 @@ export function DropdownSingle({ optionsAnchor, lightboxHeight, lightboxStyle, s
|
|
|
34
34
|
disabled: any;
|
|
35
35
|
tagColor: any;
|
|
36
36
|
observerRef: any;
|
|
37
|
+
searchbarPlaceholder: any;
|
|
37
38
|
}, ...args: any[]): React.JSX.Element;
|
|
38
39
|
import React from "react";
|
|
@@ -72,7 +72,7 @@ function DropdownSingle(_a) {
|
|
|
72
72
|
searchFieldsConfig = _a.searchFieldsConfig, setFilteredOptionsInParent = _a.setFilteredOptions, setSearchStringInParent = _a.setSearchString, searchStringInParent = _a.searchString, genCustomSelectComp = _a.genCustomSelectComp, placeholder = _a.placeholder, //
|
|
73
73
|
genCreateTagButton = _a.genCreateTagButton, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, //
|
|
74
74
|
disabled = _a.disabled, //
|
|
75
|
-
tagColor = _a.tagColor, observerRef = _a.observerRef;
|
|
75
|
+
tagColor = _a.tagColor, observerRef = _a.observerRef, searchbarPlaceholder = _a.searchbarPlaceholder;
|
|
76
76
|
var theme = (0, styled_components_1.useTheme)();
|
|
77
77
|
var props = arguments[0];
|
|
78
78
|
var value = (0, getValue_1.getValue_SINGLE)({ valueProp: valueProp, optionsFn: optionsFn, options: optionsProp, theme: theme, saveValueAsString: saveValueAsString });
|
|
@@ -130,7 +130,7 @@ function DropdownSingle(_a) {
|
|
|
130
130
|
? !showOptions && handleShowOptions() //if tagsStyle, then click always shows options
|
|
131
131
|
: showOptions ? handleHideOptions() : handleShowOptions(); //if dropdowns, then click toggles show/hide
|
|
132
132
|
} }, isTagsStyle ? genSelectTagsInput() : (react_1.default.createElement(SelectDropdown_1.SelectDropdown, { invert: invert, value: value, placeholder: placeholder, genCustomSelectComp: genCustomSelectComp, selectClassName: selectClassName, selectStyleOverride: selectStyleOverride, showOptions: showOptions, disableSelectTextUpdate: disableSelectTextUpdate, selectConfig: selectConfig, S: S, disabled: disabled }))),
|
|
133
|
-
react_1.default.createElement(OptionsSingle_1.OptionsSingle, { observerRef: observerRef, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, optionsAnchor: optionsAnchor, searchString: searchString, setSearchString: setSearchString, id: id, optionsClassName: optionsClassName, label: label, value: value, relativeToRef: selectRef, invert: invert, showOptions: showOptions, handleHideOptions: handleHideOptions, handleSelect: handleSelect, options: options, optionsFn: optionsFn, optionsModalLabel: optionsModalLabel,
|
|
133
|
+
react_1.default.createElement(OptionsSingle_1.OptionsSingle, { searchbarPlaceholder: searchbarPlaceholder, observerRef: observerRef, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, optionsAnchor: optionsAnchor, searchString: searchString, setSearchString: setSearchString, id: id, optionsClassName: optionsClassName, label: label, value: value, relativeToRef: selectRef, invert: invert, showOptions: showOptions, handleHideOptions: handleHideOptions, handleSelect: handleSelect, options: options, optionsFn: optionsFn, optionsModalLabel: optionsModalLabel,
|
|
134
134
|
//combobox specific
|
|
135
135
|
isSearchable: isTagsStyle ? false : isSearchable, genCreateTagButton: genCreateTagButton, SelectComp: isTagsStyle && genSelectTagsInput(), S: S, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent })));
|
|
136
136
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function OptionsMulti({ lightboxHeight, lightboxStyle, optionsAnchor, value, id, optionsClassName, relativeToRef, showOptions, handleHideOptions, handleSelect, options, isSearchable, label, optionsModalLabel, searchString, setSearchString, SelectComp, isTagsStyle, genCreateTagButton, invert, setFocusSelectTagsInput, popOutOfOverflowHiddenParent, S, }: {
|
|
1
|
+
export function OptionsMulti({ lightboxHeight, lightboxStyle, optionsAnchor, value, id, optionsClassName, relativeToRef, showOptions, handleHideOptions, handleSelect, options, isSearchable, label, optionsModalLabel, searchString, setSearchString, SelectComp, isTagsStyle, genCreateTagButton, invert, setFocusSelectTagsInput, popOutOfOverflowHiddenParent, S, searchbarPlaceholder }: {
|
|
2
2
|
lightboxHeight: any;
|
|
3
3
|
lightboxStyle: any;
|
|
4
4
|
optionsAnchor: any;
|
|
@@ -22,5 +22,6 @@ export function OptionsMulti({ lightboxHeight, lightboxStyle, optionsAnchor, val
|
|
|
22
22
|
setFocusSelectTagsInput: any;
|
|
23
23
|
popOutOfOverflowHiddenParent: any;
|
|
24
24
|
S: any;
|
|
25
|
+
searchbarPlaceholder: any;
|
|
25
26
|
}): React.JSX.Element;
|
|
26
27
|
import React from "react";
|
|
@@ -58,7 +58,7 @@ var OptionsMulti = function (_a) {
|
|
|
58
58
|
relativeToRef = _a.relativeToRef, //the element that this lightbox is being rendered against. i.e top or bottom
|
|
59
59
|
showOptions = _a.showOptions, handleHideOptions = _a.handleHideOptions, handleSelect = _a.handleSelect, options = _a.options, isSearchable = _a.isSearchable, label = _a.label, optionsModalLabel = _a.optionsModalLabel, //label is just a fallback for optionsModalLabel. Don't know why both are needed
|
|
60
60
|
searchString = _a.searchString, setSearchString = _a.setSearchString, SelectComp = _a.SelectComp, // for mobile
|
|
61
|
-
isTagsStyle = _a.isTagsStyle, genCreateTagButton = _a.genCreateTagButton, invert = _a.invert, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S;
|
|
61
|
+
isTagsStyle = _a.isTagsStyle, genCreateTagButton = _a.genCreateTagButton, invert = _a.invert, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, S = _a.S, searchbarPlaceholder = _a.searchbarPlaceholder;
|
|
62
62
|
//INIT ORIENTATION STATE AND CUSTOM HOOK
|
|
63
63
|
var optionsRef = (0, react_1.useRef)(null);
|
|
64
64
|
var yOrientation = (0, useSetYOrientation_1.useSetYOrientation)({
|
|
@@ -126,7 +126,7 @@ var OptionsMulti = function (_a) {
|
|
|
126
126
|
background: invert ? colors_1.colors.greyColor90 : colors_1.colors.white,
|
|
127
127
|
} },
|
|
128
128
|
react_1.default.createElement("div", { style: { padding: "1rem" }, onBlur: function () { return setSearchBarFocus(false); }, tabIndex: 0 },
|
|
129
|
-
react_1.default.createElement(TextInputs_1.TextInput, { forceFocus: searchBarFocus, invert: invert, type: "text", icon: "MagnifyingGlass", value: searchString, onChange: function (k, v) { return setSearchString(v); }, S: S })),
|
|
129
|
+
react_1.default.createElement(TextInputs_1.TextInput, { placeholder: searchbarPlaceholder, forceFocus: searchBarFocus, invert: invert, type: "text", icon: "MagnifyingGlass", value: searchString, onChange: function (k, v) { return setSearchString(v); }, S: S })),
|
|
130
130
|
react_1.default.createElement(Divider_1.Divider, { invert: invert }))); };
|
|
131
131
|
return (react_1.default.createElement(OptionsShell_1.OptionsShell, { ref: optionsRef, yOrientation: yOrientation, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, options: options, optionsAnchor: optionsAnchor, showOptions: showOptions, handleHideOptions: handleHideOptions, SelectComp: SelectComp, label: label, optionsModalLabel: optionsModalLabel, invert: invert, showDoneButton: true, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, relativeToRef: relativeToRef, S: S },
|
|
132
132
|
isSearchable && genSearchBar(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function OptionsSingle({ lightboxHeight, lightboxStyle, optionsAnchor, value, id, optionsClassName, relativeToRef, showOptions, handleHideOptions, handleSelect, options, isSearchable, label, optionsModalLabel, searchString, setSearchString, SelectComp, genCreateTagButton, invert, popOutOfOverflowHiddenParent, enableUseSetYOrientation, S, observerRef, }: {
|
|
1
|
+
export function OptionsSingle({ lightboxHeight, lightboxStyle, optionsAnchor, value, id, optionsClassName, relativeToRef, showOptions, handleHideOptions, handleSelect, options, isSearchable, label, optionsModalLabel, searchString, setSearchString, SelectComp, genCreateTagButton, invert, popOutOfOverflowHiddenParent, enableUseSetYOrientation, S, observerRef, searchbarPlaceholder }: {
|
|
2
2
|
lightboxHeight: any;
|
|
3
3
|
lightboxStyle: any;
|
|
4
4
|
optionsAnchor: any;
|
|
@@ -22,5 +22,6 @@ export function OptionsSingle({ lightboxHeight, lightboxStyle, optionsAnchor, va
|
|
|
22
22
|
enableUseSetYOrientation?: boolean;
|
|
23
23
|
S: any;
|
|
24
24
|
observerRef: any;
|
|
25
|
+
searchbarPlaceholder: any;
|
|
25
26
|
}): React.JSX.Element;
|
|
26
27
|
import React from "react";
|
|
@@ -47,7 +47,10 @@ var OptionsSingle = function (_a) {
|
|
|
47
47
|
relativeToRef = _a.relativeToRef, //the element that this lightbox is being rendered against. i.e top or bottom
|
|
48
48
|
showOptions = _a.showOptions, handleHideOptions = _a.handleHideOptions, handleSelect = _a.handleSelect, options = _a.options, isSearchable = _a.isSearchable, label = _a.label, optionsModalLabel = _a.optionsModalLabel, //label is just a fallback for optionsModalLabel. Don't know why both are needed
|
|
49
49
|
searchString = _a.searchString, setSearchString = _a.setSearchString, SelectComp = _a.SelectComp, genCreateTagButton = _a.genCreateTagButton, invert = _a.invert, popOutOfOverflowHiddenParent = _a.popOutOfOverflowHiddenParent, _b = _a.enableUseSetYOrientation, enableUseSetYOrientation = _b === void 0 ? true : _b, // if using this component standalone, this should be set to false ( if relativeToRef is not being passed thru)
|
|
50
|
-
S = _a.S, observerRef = _a.observerRef
|
|
50
|
+
S = _a.S, observerRef = _a.observerRef, searchbarPlaceholder = _a.searchbarPlaceholder
|
|
51
|
+
//disabled only with this is being used for the RTEEmbedLightbox. Also this might be temp.
|
|
52
|
+
//ensure this is set to false, if you are not passing a 'relativeToRef'
|
|
53
|
+
;
|
|
51
54
|
//INIT ORIENTATION STATE AND CUSTOM HOOK
|
|
52
55
|
var optionsRef = (0, react_1.useRef)(null);
|
|
53
56
|
var yOrientation = (0, useSetYOrientation_1.useSetYOrientation)({
|
|
@@ -76,7 +79,7 @@ var OptionsSingle = function (_a) {
|
|
|
76
79
|
background: invert ? themes_1.colors.greyColor90 : themes_1.colors.white,
|
|
77
80
|
} },
|
|
78
81
|
react_1.default.createElement("div", { style: { padding: "1rem" } },
|
|
79
|
-
react_1.default.createElement(TextInputs_1.TextInput, { invert: invert, forceFocus: searchBarFocus, type: "text", icon: "MagnifyingGlass", value: searchString, onChange: function (k, v) { return setSearchString(v); }, S: S })),
|
|
82
|
+
react_1.default.createElement(TextInputs_1.TextInput, { placeholder: searchbarPlaceholder, invert: invert, forceFocus: searchBarFocus, type: "text", icon: "MagnifyingGlass", value: searchString, onChange: function (k, v) { return setSearchString(v); }, S: S })),
|
|
80
83
|
react_1.default.createElement(Divider_1.Divider, { invert: invert }))); };
|
|
81
84
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
82
85
|
react_1.default.createElement(OptionsShell_1.OptionsShell, { ref: optionsRef, yOrientation: yOrientation, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, options: options, optionsAnchor: optionsAnchor, showOptions: showOptions, SelectComp: SelectComp, handleHideOptions: handleHideOptions, label: label, optionsModalLabel: optionsModalLabel, invert: invert, relativeToRef: relativeToRef, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, S: S },
|
|
@@ -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 :
|