kui-complex 0.0.115 → 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 +6 -5
- package/ButtonSelect/cjs/index.js.map +1 -1
- package/ButtonSelect/index.js +6 -5
- package/ButtonSelect/index.js.map +1 -1
- package/CalendarHeaderWithSelect/cjs/index.js +6 -5
- package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
- package/CalendarHeaderWithSelect/index.js +6 -5
- package/CalendarHeaderWithSelect/index.js.map +1 -1
- package/InputDropdown/cjs/index.js +1 -1
- package/InputDropdown/cjs/index.js.map +1 -1
- package/InputDropdown/index.js +1 -1
- package/InputDropdown/index.js.map +1 -1
- package/InputMultiSelect/cjs/index.js +6 -5
- package/InputMultiSelect/cjs/index.js.map +1 -1
- package/InputMultiSelect/index.js +6 -5
- package/InputMultiSelect/index.js.map +1 -1
- package/InputSelect/cjs/index.js +6 -5
- package/InputSelect/cjs/index.js.map +1 -1
- package/InputSelect/index.js +6 -5
- package/InputSelect/index.js.map +1 -1
- package/InputSelectBase/cjs/index.js +6 -5
- package/InputSelectBase/cjs/index.js.map +1 -1
- package/InputSelectBase/index.js +6 -5
- package/InputSelectBase/index.js.map +1 -1
- package/InputSelectDropdown/cjs/index.js +1 -1
- package/InputSelectDropdown/cjs/index.js.map +1 -1
- package/InputSelectDropdown/index.js +1 -1
- package/InputSelectDropdown/index.js.map +1 -1
- package/InputSelectWithController/cjs/index.js +6 -5
- package/InputSelectWithController/cjs/index.js.map +1 -1
- package/InputSelectWithController/index.js +6 -5
- package/InputSelectWithController/index.js.map +1 -1
- package/InputWithAutocomplete/cjs/index.js +4 -3
- package/InputWithAutocomplete/cjs/index.js.map +1 -1
- package/InputWithAutocomplete/index.js +4 -3
- package/InputWithAutocomplete/index.js.map +1 -1
- package/InputWithDatePicker/cjs/index.js +6 -5
- package/InputWithDatePicker/cjs/index.js.map +1 -1
- package/InputWithDatePicker/index.js +6 -5
- package/InputWithDatePicker/index.js.map +1 -1
- package/SelectMonth/cjs/index.js +6 -5
- package/SelectMonth/cjs/index.js.map +1 -1
- package/SelectMonth/index.js +6 -5
- package/SelectMonth/index.js.map +1 -1
- package/SelectYear/cjs/index.js +6 -5
- package/SelectYear/cjs/index.js.map +1 -1
- package/SelectYear/index.js +6 -5
- package/SelectYear/index.js.map +1 -1
- package/TestForm/cjs/index.js +6 -5
- package/TestForm/cjs/index.js.map +1 -1
- package/TestForm/index.js +6 -5
- package/TestForm/index.js.map +1 -1
- package/cjs/index.js +9 -7
- package/cjs/index.js.map +1 -1
- package/index.js +9 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -248,7 +248,7 @@ var InputDropdown = React.forwardRef(function (props, ref) {
|
|
|
248
248
|
};
|
|
249
249
|
return (jsxRuntime.jsx(StyledTooltip, __assign({ fullWidth: 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 })));
|
|
250
250
|
});
|
|
251
|
-
var StyledTooltip = styled__default["default"](kuiBasic.Tooltip)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\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 .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"])));
|
|
251
|
+
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"])));
|
|
252
252
|
var StyledDropdown$2 = styled__default["default"](kuiBasic.Grid)(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n width: 100%;\n user-select: none;\n"], ["\n width: 100%;\n user-select: none;\n"])));
|
|
253
253
|
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) {
|
|
254
254
|
var isScrollable = _a.isScrollable;
|
|
@@ -290,7 +290,8 @@ var InputSelectBase = React.forwardRef(function (_a, ref) {
|
|
|
290
290
|
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) {
|
|
291
291
|
(_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();
|
|
292
292
|
}
|
|
293
|
-
|
|
293
|
+
if (!disabled)
|
|
294
|
+
setIsDropdownOpen(function (prev) { return !prev; });
|
|
294
295
|
};
|
|
295
296
|
var handleCloseDropdown = function () {
|
|
296
297
|
setIsDropdownOpen(false);
|
|
@@ -300,15 +301,15 @@ var InputSelectBase = React.forwardRef(function (_a, ref) {
|
|
|
300
301
|
handleChange(option);
|
|
301
302
|
handleCloseDropdown();
|
|
302
303
|
};
|
|
303
|
-
return (jsxRuntime$1.jsxs(Wrapper$6, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }),
|
|
304
|
+
return (jsxRuntime$1.jsxs(Wrapper$6, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }), jsxRuntime$1.jsx(InputSelectDropdown, { options: options, inputRef: {
|
|
304
305
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
305
306
|
}, 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, isDropdownOpen: isDropdownOpen, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsxRuntime$1.jsx(kuiIcon.HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
306
307
|
{ transition: "all linear .2s" },
|
|
307
308
|
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
308
|
-
] }, iconProps))) })) })
|
|
309
|
+
] }, iconProps))) })) })] }));
|
|
309
310
|
});
|
|
310
311
|
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"])));
|
|
311
|
-
var StyledInput$3 = styled__default["default"](kuiBasic.InputWithAdornments)(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n cursor: pointer;\n
|
|
312
|
+
var StyledInput$3 = styled__default["default"](kuiBasic.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) {
|
|
312
313
|
var isDropdownOpen = _a.isDropdownOpen;
|
|
313
314
|
return (isDropdownOpen ? 0 : 1);
|
|
314
315
|
});
|
|
@@ -1354,7 +1355,8 @@ function InputWithAutocomplete(_a) {
|
|
|
1354
1355
|
if (hideName)
|
|
1355
1356
|
form.register(hideName);
|
|
1356
1357
|
var handleOpenDropdown = function () {
|
|
1357
|
-
|
|
1358
|
+
if (!disabled)
|
|
1359
|
+
setIsOpenDropDown(true);
|
|
1358
1360
|
};
|
|
1359
1361
|
var handleCloseDropdown = function () {
|
|
1360
1362
|
setIsOpenDropDown(false);
|
|
@@ -1399,7 +1401,7 @@ function InputWithAutocomplete(_a) {
|
|
|
1399
1401
|
}
|
|
1400
1402
|
var StyledLoadingWrapper = styled__default["default"].div(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 1;\n"])));
|
|
1401
1403
|
var StyledWrapper$3 = styled__default["default"].div(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
1402
|
-
var StyledInput$2 = styled__default["default"](InputWithController)(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n .KUI-InputMessage {\n opacity: ", ";\n }\n
|
|
1404
|
+
var StyledInput$2 = styled__default["default"](InputWithController)(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n .KUI-InputMessage {\n opacity: ", ";\n }\n"], ["\n .KUI-InputMessage {\n opacity: ", ";\n }\n"])), function (_a) {
|
|
1403
1405
|
var isDropdownOpen = _a.isDropdownOpen;
|
|
1404
1406
|
return (isDropdownOpen ? 0 : 1);
|
|
1405
1407
|
});
|