oolib 2.169.0 → 2.169.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/components/Dropdowns/DropdownMulti/index.js +7 -4
- package/dist/components/Dropdowns/comps/OptionsShell/styled.js +1 -1
- package/dist/components/Dropdowns/comps/SelectTagsInput/index.d.ts +2 -1
- package/dist/components/Dropdowns/comps/SelectTagsInput/index.js +2 -2
- package/package.json +1 -1
|
@@ -140,9 +140,12 @@ function DropdownMulti(_a) {
|
|
|
140
140
|
react_1.default.createElement(DisplayCompSingle_1.DisplayCompSingle, { value: v, invert: invert, injectComma: i !== value.length - 1, S: S }))); })));
|
|
141
141
|
};
|
|
142
142
|
var _f = (0, react_1.useState)(false), focusSelectTagsInput = _f[0], setFocusSelectTagsInput = _f[1];
|
|
143
|
-
var genSelectTagsInput = function () {
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
var genSelectTagsInput = function (options) {
|
|
144
|
+
if (options === void 0) { options = {}; }
|
|
145
|
+
return (react_1.default.createElement(SelectTagsInput_1.SelectTagsInput, __assign({ id: id, value: value, invert: invert, handleSelect: handleSelect, searchString: searchString,
|
|
146
|
+
setSearchString: setSearchString,
|
|
147
|
+
single_multi: "multi", placeholder: placeholder, focusSelectTagsInput: focusSelectTagsInput, setFocusSelectTagsInput: setFocusSelectTagsInput, showOptions: showOptions, S: S, disabled: disabled }, ((options === null || options === void 0 ? void 0 : options.style) || {}))));
|
|
148
|
+
};
|
|
146
149
|
var genInputComp = function () {
|
|
147
150
|
// const SelectComp = isTagsStyle ? SelectTagsInput : SelectDropdown
|
|
148
151
|
return (react_1.default.createElement(styled_1.StyledDropdownRefWrapper, { ref: dropdownRef },
|
|
@@ -151,7 +154,7 @@ function DropdownMulti(_a) {
|
|
|
151
154
|
? !showOptions && handleShowOptions() //if tagsStyle, then click always shows options
|
|
152
155
|
: showOptions ? handleHideOptions() : handleShowOptions(); //if dropdowns, then click toggles show/hide
|
|
153
156
|
} }, 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, { 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, alignDropdown: alignDropdown })));
|
|
157
|
+
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({ style: { position: 'sticky', top: 0, zIndex: 1000 } }), invert: invert, setFocusSelectTagsInput: setFocusSelectTagsInput, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, S: S, alignDropdown: alignDropdown })));
|
|
155
158
|
};
|
|
156
159
|
return (react_1.default.createElement("div", { className: "OKE-Dropdown ".concat(className, " OKE-Dropdown--").concat(readOnly ? "displayComp" : "inputComp", " ").concat(invert ? "-invert-" : "") },
|
|
157
160
|
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, getBlockLabelProps_1.getBlockLabelProps)(props))),
|
|
@@ -38,7 +38,7 @@ exports.StyledOptionsWrapper = styled_components_1.default.ul(templateObject_2 |
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
/** for modal shell */
|
|
41
|
-
exports.StyledModalOptionsWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n padding-left: 0;\n cursor: pointer;\n background-color: ", ";\n width: 100%;\n min-width: max-content;\n min-width: -moz-max-content;\n overflow: auto
|
|
41
|
+
exports.StyledModalOptionsWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n padding-left: 0;\n cursor: pointer;\n background-color: ", ";\n width: 100%;\n min-width: max-content;\n min-width: -moz-max-content;\n /* overflow: auto; */\n"], ["\n position: relative;\n padding-left: 0;\n cursor: pointer;\n background-color: ", ";\n width: 100%;\n min-width: max-content;\n min-width: -moz-max-content;\n /* overflow: auto; */\n"])), function (_a) {
|
|
42
42
|
var invert = _a.invert;
|
|
43
43
|
return invert ? themes_1.colors.greyColor90 : themes_1.colors.white;
|
|
44
44
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function SelectTagsInput({ invert, id, value, disabled, handleSelect, searchString, setSearchString, placeholder, setFocusSelectTagsInput, focusSelectTagsInput, single_multi, showOptions, S, tagColor, }: {
|
|
1
|
+
export function SelectTagsInput({ invert, id, value, disabled, handleSelect, searchString, setSearchString, placeholder, setFocusSelectTagsInput, focusSelectTagsInput, single_multi, showOptions, S, tagColor, style }: {
|
|
2
2
|
invert: any;
|
|
3
3
|
id: any;
|
|
4
4
|
value: any;
|
|
@@ -13,5 +13,6 @@ export function SelectTagsInput({ invert, id, value, disabled, handleSelect, sea
|
|
|
13
13
|
showOptions: any;
|
|
14
14
|
S: any;
|
|
15
15
|
tagColor: any;
|
|
16
|
+
style: any;
|
|
16
17
|
}): React.JSX.Element;
|
|
17
18
|
import React from "react";
|
|
@@ -42,7 +42,7 @@ var SelectTagsInput = function (_a) {
|
|
|
42
42
|
handleSelect = _a.handleSelect, searchString = _a.searchString, setSearchString = _a.setSearchString, placeholder = _a.placeholder,
|
|
43
43
|
// minHeight, // standard | wide | actual height in rem
|
|
44
44
|
setFocusSelectTagsInput = _a.setFocusSelectTagsInput, focusSelectTagsInput = _a.focusSelectTagsInput, //force focus when after an option is selected in multiselect
|
|
45
|
-
single_multi = _a.single_multi, showOptions = _a.showOptions, S = _a.S, tagColor = _a.tagColor;
|
|
45
|
+
single_multi = _a.single_multi, showOptions = _a.showOptions, S = _a.S, tagColor = _a.tagColor, style = _a.style;
|
|
46
46
|
var inputRef = (0, react_1.useRef)(null);
|
|
47
47
|
var theme = (0, styled_components_1.useTheme)();
|
|
48
48
|
var localize = (0, utilsOolib_1.useLocale)();
|
|
@@ -87,7 +87,7 @@ var SelectTagsInput = function (_a) {
|
|
|
87
87
|
// : "9rem"; //wide by default
|
|
88
88
|
return (react_1.default.createElement(styled_2.StyledSelectTagsInputContainer, { onKeyDown: blurInputOnEscKey,
|
|
89
89
|
// style={{ minHeight: '9rem' }}
|
|
90
|
-
className: "".concat(isFocussed ? "focussed" : ""), invert: invert, disabled: disabled, onFocus: function () {
|
|
90
|
+
style: style, className: "".concat(isFocussed ? "focussed" : ""), invert: invert, disabled: disabled, onFocus: function () {
|
|
91
91
|
handleFocus(true);
|
|
92
92
|
}, onBlur: function () { return handleFocus(false); }, tabIndex: 0 },
|
|
93
93
|
react_1.default.createElement(styled_1.StyledTagsInputWrapper, null,
|