kui-complex 0.0.138 → 0.0.139
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/ButtonSelect/cjs/index.js +8 -17
- package/ButtonSelect/cjs/index.js.map +1 -1
- package/ButtonSelect/index.js +8 -17
- package/ButtonSelect/index.js.map +1 -1
- package/CalendarHeaderWithSelect/cjs/index.js +8 -17
- package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
- package/CalendarHeaderWithSelect/index.js +8 -17
- package/CalendarHeaderWithSelect/index.js.map +1 -1
- package/InputDropdown/cjs/index.js +6 -12
- package/InputDropdown/cjs/index.js.map +1 -1
- package/InputDropdown/index.js +6 -12
- package/InputDropdown/index.js.map +1 -1
- package/InputMultiSelect/cjs/index.js +8 -17
- package/InputMultiSelect/cjs/index.js.map +1 -1
- package/InputMultiSelect/index.js +8 -17
- package/InputMultiSelect/index.js.map +1 -1
- package/InputSelect/cjs/index.js +8 -17
- package/InputSelect/cjs/index.js.map +1 -1
- package/InputSelect/index.js +8 -17
- package/InputSelect/index.js.map +1 -1
- package/InputSelectBase/cjs/index.js +8 -17
- package/InputSelectBase/cjs/index.js.map +1 -1
- package/InputSelectBase/index.js +8 -17
- package/InputSelectBase/index.js.map +1 -1
- package/InputSelectDropdown/cjs/index.js +6 -12
- package/InputSelectDropdown/cjs/index.js.map +1 -1
- package/InputSelectDropdown/index.js +6 -12
- package/InputSelectDropdown/index.js.map +1 -1
- package/InputSelectWithController/cjs/index.js +8 -17
- package/InputSelectWithController/cjs/index.js.map +1 -1
- package/InputSelectWithController/index.js +8 -17
- package/InputSelectWithController/index.js.map +1 -1
- package/InputWithAutocomplete/cjs/index.js +6 -12
- package/InputWithAutocomplete/cjs/index.js.map +1 -1
- package/InputWithAutocomplete/index.js +6 -12
- package/InputWithAutocomplete/index.js.map +1 -1
- package/InputWithDatePicker/cjs/index.js +8 -17
- package/InputWithDatePicker/cjs/index.js.map +1 -1
- package/InputWithDatePicker/index.js +8 -17
- package/InputWithDatePicker/index.js.map +1 -1
- package/SelectMonth/cjs/index.js +8 -17
- package/SelectMonth/cjs/index.js.map +1 -1
- package/SelectMonth/index.js +8 -17
- package/SelectMonth/index.js.map +1 -1
- package/SelectYear/cjs/index.js +8 -17
- package/SelectYear/cjs/index.js.map +1 -1
- package/SelectYear/index.js +8 -17
- package/SelectYear/index.js.map +1 -1
- package/TestForm/cjs/index.js +8 -17
- package/TestForm/cjs/index.js.map +1 -1
- package/TestForm/index.js +8 -17
- package/TestForm/index.js.map +1 -1
- package/cjs/index.js +8 -17
- package/cjs/index.js.map +1 -1
- package/index.js +8 -17
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -207,17 +207,11 @@ var InputDropdown = forwardRef(function (props, ref) {
|
|
|
207
207
|
};
|
|
208
208
|
useEffect(function () {
|
|
209
209
|
var _a;
|
|
210
|
-
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
216
|
-
setIsScrollable(hasScroll);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
buttonRef.current.style.zIndex = "1";
|
|
210
|
+
if ((buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && isOpen) {
|
|
211
|
+
var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
|
|
212
|
+
if (scrollContainer) {
|
|
213
|
+
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
214
|
+
setIsScrollable(hasScroll);
|
|
221
215
|
}
|
|
222
216
|
}
|
|
223
217
|
}, [isOpen]);
|
|
@@ -230,7 +224,7 @@ var InputDropdown = forwardRef(function (props, ref) {
|
|
|
230
224
|
};
|
|
231
225
|
return (jsx(StyledTooltip, __assign({ fullWidth: true, withoutMobile: true, open: isOpen, onChange: handleChange, toggleMethod: "controlled", strategy: strategy || "fixed", placement: "bottom", className: className, withShift: false, content: jsxs$1(StyledDropdown$2, __assign({ "data-testid": "input_dropdown", container: true, ref: forwardedRef }, otherProps, { children: [jsx(StyledWrapper$8, __assign({ isScrollable: isScrollable }, { children: jsx(ScrollingContainer, __assign({ isScrollable: isScrollable, className: "KUI-InputDropdown_scroll" }, { children: children })) })), endComponent] })) }, { children: input })));
|
|
232
226
|
});
|
|
233
|
-
var StyledTooltip = styled(Tooltip$1)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n width: 100%;\n > div {\n width: 100%;\n > div {\n width: 100%;\n > div {\n width: 100%;\n }\n }\n }\n .KUI-Popper {\n max-width: unset;\n > div {\n user-select: none;\n padding: 0;\n border-radius: 0 0 8px 8px;\n box-shadow: 0px 26px 34px 0px #0000001a;\n }\n }\n"], ["\n width: 100%;\n > div {\n width: 100%;\n > div {\n width: 100%;\n > div {\n width: 100%;\n }\n }\n }\n .KUI-Popper {\n max-width: unset;\n > div {\n user-select: none;\n padding: 0;\n border-radius: 0 0 8px 8px;\n box-shadow: 0px 26px 34px 0px #0000001a;\n }\n }\n"])));
|
|
227
|
+
var StyledTooltip = styled(Tooltip$1)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n width: 100%;\n > div {\n z-index: unset;\n width: 100%;\n > div {\n z-index: unset;\n width: 100%;\n > div {\n width: 100%;\n }\n }\n }\n .KUI-Popper {\n max-width: unset;\n > div {\n user-select: none;\n padding: 0;\n border-radius: 0 0 8px 8px;\n box-shadow: 0px 26px 34px 0px #0000001a;\n }\n }\n"], ["\n width: 100%;\n > div {\n z-index: unset;\n width: 100%;\n > div {\n z-index: unset;\n width: 100%;\n > div {\n width: 100%;\n }\n }\n }\n .KUI-Popper {\n max-width: unset;\n > div {\n user-select: none;\n padding: 0;\n border-radius: 0 0 8px 8px;\n box-shadow: 0px 26px 34px 0px #0000001a;\n }\n }\n"])));
|
|
234
228
|
var StyledDropdown$2 = styled(Grid)(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n width: 100%;\n user-select: none;\n"], ["\n width: 100%;\n user-select: none;\n"])));
|
|
235
229
|
var StyledWrapper$8 = styled.div(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n width: 100%;\n box-sizing: border-box;\n padding: ", ";\n"], ["\n width: 100%;\n box-sizing: border-box;\n padding: ", ";\n"])), function (_a) {
|
|
236
230
|
var isScrollable = _a.isScrollable;
|
|
@@ -285,16 +279,13 @@ var InputSelectBase = forwardRef(function (_a, ref) {
|
|
|
285
279
|
};
|
|
286
280
|
return (jsxs(Wrapper$6, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(InputSelectDropdown, { options: options, inputRef: {
|
|
287
281
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
288
|
-
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: selectedValue, renderOption: renderOption, input: jsx$1(StyledInput$3, __assign({ onClick: handleOpenDropdown, ref: forwardedRef, disabled: disabled, readOnly: true, value: selectedLabel, message: error,
|
|
282
|
+
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: selectedValue, renderOption: renderOption, input: jsx$1(StyledInput$3, __assign({ onClick: handleOpenDropdown, ref: forwardedRef, disabled: disabled, readOnly: true, value: selectedLabel, message: error, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
289
283
|
{ transition: "all linear .2s" },
|
|
290
284
|
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
291
285
|
] }, iconProps))) })) })] }));
|
|
292
286
|
});
|
|
293
287
|
var Wrapper$6 = styled.div(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n position: relative;\n text-align: left;\n"], ["\n position: relative;\n text-align: left;\n"])));
|
|
294
|
-
var StyledInput$3 = styled(InputWithAdornments)(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n
|
|
295
|
-
var isDropdownOpen = _a.isDropdownOpen;
|
|
296
|
-
return (isDropdownOpen ? 0 : 1);
|
|
297
|
-
});
|
|
288
|
+
var StyledInput$3 = styled(InputWithAdornments)(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n"], ["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n"])));
|
|
298
289
|
var templateObject_1$B, templateObject_2$k;
|
|
299
290
|
|
|
300
291
|
function InputSelectOption(props) {
|