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/cjs/index.js
CHANGED
|
@@ -239,17 +239,11 @@ var InputDropdown = React.forwardRef(function (props, ref) {
|
|
|
239
239
|
};
|
|
240
240
|
React.useEffect(function () {
|
|
241
241
|
var _a;
|
|
242
|
-
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
248
|
-
setIsScrollable(hasScroll);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
buttonRef.current.style.zIndex = "1";
|
|
242
|
+
if ((buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && isOpen) {
|
|
243
|
+
var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
|
|
244
|
+
if (scrollContainer) {
|
|
245
|
+
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
246
|
+
setIsScrollable(hasScroll);
|
|
253
247
|
}
|
|
254
248
|
}
|
|
255
249
|
}, [isOpen]);
|
|
@@ -262,7 +256,7 @@ var InputDropdown = React.forwardRef(function (props, ref) {
|
|
|
262
256
|
};
|
|
263
257
|
return (jsxRuntime.jsx(StyledTooltip, __assign({ fullWidth: true, withoutMobile: true, open: isOpen, onChange: handleChange, toggleMethod: "controlled", strategy: strategy || "fixed", placement: "bottom", className: className, withShift: false, content: jsxRuntime.jsxs(StyledDropdown$2, __assign({ "data-testid": "input_dropdown", container: true, ref: forwardedRef }, otherProps, { children: [jsxRuntime.jsx(StyledWrapper$8, __assign({ isScrollable: isScrollable }, { children: jsxRuntime.jsx(ScrollingContainer, __assign({ isScrollable: isScrollable, className: "KUI-InputDropdown_scroll" }, { children: children })) })), endComponent] })) }, { children: input })));
|
|
264
258
|
});
|
|
265
|
-
var StyledTooltip = styled__default["default"](kuiBasic.Tooltip)(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"])));
|
|
259
|
+
var StyledTooltip = styled__default["default"](kuiBasic.Tooltip)(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"])));
|
|
266
260
|
var StyledDropdown$2 = styled__default["default"](kuiBasic.Grid)(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n width: 100%;\n user-select: none;\n"], ["\n width: 100%;\n user-select: none;\n"])));
|
|
267
261
|
var StyledWrapper$8 = styled__default["default"].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) {
|
|
268
262
|
var isScrollable = _a.isScrollable;
|
|
@@ -317,16 +311,13 @@ var InputSelectBase = React.forwardRef(function (_a, ref) {
|
|
|
317
311
|
};
|
|
318
312
|
return (jsxRuntime$1.jsxs(Wrapper$6, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }), jsxRuntime$1.jsx(InputSelectDropdown, { options: options, inputRef: {
|
|
319
313
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
320
|
-
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: selectedValue, renderOption: renderOption, input: jsxRuntime$1.jsx(StyledInput$3, __assign({ onClick: handleOpenDropdown, ref: forwardedRef, disabled: disabled, readOnly: true, value: selectedLabel, message: error,
|
|
314
|
+
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: selectedValue, renderOption: renderOption, input: jsxRuntime$1.jsx(StyledInput$3, __assign({ onClick: handleOpenDropdown, ref: forwardedRef, disabled: disabled, readOnly: true, value: selectedLabel, message: error, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsxRuntime$1.jsx(kuiIcon.HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
321
315
|
{ transition: "all linear .2s" },
|
|
322
316
|
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
323
317
|
] }, iconProps))) })) })] }));
|
|
324
318
|
});
|
|
325
319
|
var Wrapper$6 = styled__default["default"].div(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n position: relative;\n text-align: left;\n"], ["\n position: relative;\n text-align: left;\n"])));
|
|
326
|
-
var StyledInput$3 = styled__default["default"](kuiBasic.InputWithAdornments)(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n
|
|
327
|
-
var isDropdownOpen = _a.isDropdownOpen;
|
|
328
|
-
return (isDropdownOpen ? 0 : 1);
|
|
329
|
-
});
|
|
320
|
+
var StyledInput$3 = styled__default["default"](kuiBasic.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"])));
|
|
330
321
|
var templateObject_1$B, templateObject_2$k;
|
|
331
322
|
|
|
332
323
|
function InputSelectOption(props) {
|