kui-complex 0.0.116 → 0.0.117
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 +4 -3
- package/ButtonSelect/cjs/index.js.map +1 -1
- package/ButtonSelect/index.js +4 -3
- package/ButtonSelect/index.js.map +1 -1
- package/CalendarHeaderWithSelect/cjs/index.js +4 -3
- package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
- package/CalendarHeaderWithSelect/index.js +4 -3
- package/CalendarHeaderWithSelect/index.js.map +1 -1
- package/InputMultiSelect/cjs/index.js +4 -3
- package/InputMultiSelect/cjs/index.js.map +1 -1
- package/InputMultiSelect/index.js +4 -3
- package/InputMultiSelect/index.js.map +1 -1
- package/InputSelect/cjs/index.js +4 -3
- package/InputSelect/cjs/index.js.map +1 -1
- package/InputSelect/index.js +4 -3
- package/InputSelect/index.js.map +1 -1
- package/InputSelectBase/cjs/index.js +4 -3
- package/InputSelectBase/cjs/index.js.map +1 -1
- package/InputSelectBase/index.js +4 -3
- package/InputSelectBase/index.js.map +1 -1
- package/InputSelectWithController/cjs/index.js +4 -3
- package/InputSelectWithController/cjs/index.js.map +1 -1
- package/InputSelectWithController/index.js +4 -3
- package/InputSelectWithController/index.js.map +1 -1
- package/InputWithAutocomplete/cjs/index.js +2 -1
- package/InputWithAutocomplete/cjs/index.js.map +1 -1
- package/InputWithAutocomplete/index.js +2 -1
- package/InputWithAutocomplete/index.js.map +1 -1
- package/InputWithDatePicker/cjs/index.js +4 -3
- package/InputWithDatePicker/cjs/index.js.map +1 -1
- package/InputWithDatePicker/index.js +4 -3
- package/InputWithDatePicker/index.js.map +1 -1
- package/cjs/index.js +6 -4
- package/cjs/index.js.map +1 -1
- package/index.js +6 -4
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -258,7 +258,8 @@ var InputSelectBase = forwardRef(function (_a, ref) {
|
|
|
258
258
|
if ((_b = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) {
|
|
259
259
|
(_d = (_c = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.parentElement.focus();
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
if (!disabled)
|
|
262
|
+
setIsDropdownOpen(function (prev) { return !prev; });
|
|
262
263
|
};
|
|
263
264
|
var handleCloseDropdown = function () {
|
|
264
265
|
setIsDropdownOpen(false);
|
|
@@ -268,12 +269,12 @@ var InputSelectBase = forwardRef(function (_a, ref) {
|
|
|
268
269
|
handleChange(option);
|
|
269
270
|
handleCloseDropdown();
|
|
270
271
|
};
|
|
271
|
-
return (jsxs(Wrapper$6, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }),
|
|
272
|
+
return (jsxs(Wrapper$6, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(InputSelectDropdown, { options: options, inputRef: {
|
|
272
273
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
273
274
|
}, 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, isDropdownOpen: isDropdownOpen, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
274
275
|
{ transition: "all linear .2s" },
|
|
275
276
|
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
276
|
-
] }, iconProps))) })) })
|
|
277
|
+
] }, iconProps))) })) })] }));
|
|
277
278
|
});
|
|
278
279
|
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"])));
|
|
279
280
|
var StyledInput$3 = styled(InputWithAdornments)(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n .KUI-InputMessage {\n opacity: ", ";\n }\n"], ["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n .KUI-InputMessage {\n opacity: ", ";\n }\n"])), function (_a) {
|
|
@@ -1322,7 +1323,8 @@ function InputWithAutocomplete(_a) {
|
|
|
1322
1323
|
if (hideName)
|
|
1323
1324
|
form.register(hideName);
|
|
1324
1325
|
var handleOpenDropdown = function () {
|
|
1325
|
-
|
|
1326
|
+
if (!disabled)
|
|
1327
|
+
setIsOpenDropDown(true);
|
|
1326
1328
|
};
|
|
1327
1329
|
var handleCloseDropdown = function () {
|
|
1328
1330
|
setIsOpenDropDown(false);
|