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/TestForm/index.js
CHANGED
|
@@ -91,17 +91,11 @@ var InputDropdown = forwardRef(function (props, ref) {
|
|
|
91
91
|
};
|
|
92
92
|
useEffect(function () {
|
|
93
93
|
var _a;
|
|
94
|
-
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var
|
|
98
|
-
|
|
99
|
-
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
100
|
-
setIsScrollable(hasScroll);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
buttonRef.current.style.zIndex = "1";
|
|
94
|
+
if ((buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && isOpen) {
|
|
95
|
+
var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
|
|
96
|
+
if (scrollContainer) {
|
|
97
|
+
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
98
|
+
setIsScrollable(hasScroll);
|
|
105
99
|
}
|
|
106
100
|
}
|
|
107
101
|
}, [isOpen]);
|
|
@@ -114,7 +108,7 @@ var InputDropdown = forwardRef(function (props, ref) {
|
|
|
114
108
|
};
|
|
115
109
|
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(StyledDropdown$1, __assign({ "data-testid": "input_dropdown", container: true, ref: forwardedRef }, otherProps, { children: [jsx(StyledWrapper, __assign({ isScrollable: isScrollable }, { children: jsx(ScrollingContainer, __assign({ isScrollable: isScrollable, className: "KUI-InputDropdown_scroll" }, { children: children })) })), endComponent] })) }, { children: input })));
|
|
116
110
|
});
|
|
117
|
-
var StyledTooltip = styled(Tooltip)(templateObject_1$e || (templateObject_1$e = __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"])));
|
|
111
|
+
var StyledTooltip = styled(Tooltip)(templateObject_1$e || (templateObject_1$e = __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"])));
|
|
118
112
|
var StyledDropdown$1 = styled(Grid)(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n width: 100%;\n user-select: none;\n"], ["\n width: 100%;\n user-select: none;\n"])));
|
|
119
113
|
var StyledWrapper = styled.div(templateObject_3$3 || (templateObject_3$3 = __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) {
|
|
120
114
|
var isScrollable = _a.isScrollable;
|
|
@@ -169,16 +163,13 @@ var InputSelectBase = forwardRef(function (_a, ref) {
|
|
|
169
163
|
};
|
|
170
164
|
return (jsxs$1(Wrapper$4, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(InputSelectDropdown, { options: options, inputRef: {
|
|
171
165
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
172
|
-
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: selectedValue, renderOption: renderOption, input: jsx$1(StyledInput, __assign({ onClick: handleOpenDropdown, ref: forwardedRef, disabled: disabled, readOnly: true, value: selectedLabel, message: error,
|
|
166
|
+
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: selectedValue, renderOption: renderOption, input: jsx$1(StyledInput, __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: [
|
|
173
167
|
{ transition: "all linear .2s" },
|
|
174
168
|
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
175
169
|
] }, iconProps))) })) })] }));
|
|
176
170
|
});
|
|
177
171
|
var Wrapper$4 = styled.div(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n position: relative;\n text-align: left;\n"], ["\n position: relative;\n text-align: left;\n"])));
|
|
178
|
-
var StyledInput = styled(InputWithAdornments)(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n
|
|
179
|
-
var isDropdownOpen = _a.isDropdownOpen;
|
|
180
|
-
return (isDropdownOpen ? 0 : 1);
|
|
181
|
-
});
|
|
172
|
+
var StyledInput = styled(InputWithAdornments)(templateObject_2$5 || (templateObject_2$5 = __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"])));
|
|
182
173
|
var templateObject_1$c, templateObject_2$5;
|
|
183
174
|
|
|
184
175
|
function InputSelectOption(props) {
|