kui-complex 0.0.114 → 0.0.116
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 +3 -3
- package/ButtonSelect/cjs/index.js.map +1 -1
- package/ButtonSelect/index.js +3 -3
- package/ButtonSelect/index.js.map +1 -1
- package/CalendarHeaderWithSelect/cjs/index.js +3 -3
- package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
- package/CalendarHeaderWithSelect/index.js +3 -3
- package/CalendarHeaderWithSelect/index.js.map +1 -1
- package/InputDropdown/cjs/index.js +3 -3
- package/InputDropdown/cjs/index.js.map +1 -1
- package/InputDropdown/index.d.ts +3 -1
- package/InputDropdown/index.js +3 -3
- package/InputDropdown/index.js.map +1 -1
- package/InputMultiSelect/cjs/index.js +3 -3
- package/InputMultiSelect/cjs/index.js.map +1 -1
- package/InputMultiSelect/index.js +3 -3
- package/InputMultiSelect/index.js.map +1 -1
- package/InputSelect/cjs/index.js +3 -3
- package/InputSelect/cjs/index.js.map +1 -1
- package/InputSelect/index.js +3 -3
- package/InputSelect/index.js.map +1 -1
- package/InputSelectBase/cjs/index.js +3 -3
- package/InputSelectBase/cjs/index.js.map +1 -1
- package/InputSelectBase/index.js +3 -3
- package/InputSelectBase/index.js.map +1 -1
- package/InputSelectDropdown/cjs/index.js +3 -3
- package/InputSelectDropdown/cjs/index.js.map +1 -1
- package/InputSelectDropdown/index.js +3 -3
- package/InputSelectDropdown/index.js.map +1 -1
- package/InputSelectWithController/cjs/index.js +3 -3
- package/InputSelectWithController/cjs/index.js.map +1 -1
- package/InputSelectWithController/index.js +3 -3
- package/InputSelectWithController/index.js.map +1 -1
- package/InputWithAutocomplete/cjs/index.js +3 -3
- package/InputWithAutocomplete/cjs/index.js.map +1 -1
- package/InputWithAutocomplete/index.js +3 -3
- package/InputWithAutocomplete/index.js.map +1 -1
- package/InputWithDatePicker/cjs/index.js +3 -3
- package/InputWithDatePicker/cjs/index.js.map +1 -1
- package/InputWithDatePicker/index.js +3 -3
- package/InputWithDatePicker/index.js.map +1 -1
- package/SelectMonth/cjs/index.js +7 -6
- package/SelectMonth/cjs/index.js.map +1 -1
- package/SelectMonth/index.js +7 -6
- package/SelectMonth/index.js.map +1 -1
- package/SelectYear/cjs/index.js +7 -6
- package/SelectYear/cjs/index.js.map +1 -1
- package/SelectYear/index.js +7 -6
- package/SelectYear/index.js.map +1 -1
- package/TestForm/cjs/index.js +7 -6
- package/TestForm/cjs/index.js.map +1 -1
- package/TestForm/index.js +7 -6
- package/TestForm/index.js.map +1 -1
- package/cjs/index.js +3 -3
- package/cjs/index.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/TestForm/index.js
CHANGED
|
@@ -81,7 +81,7 @@ var InputWithController = forwardRef(function (_a, ref) {
|
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
var InputDropdown = forwardRef(function (props, ref) {
|
|
84
|
-
var isOpen = props.isOpen, handleClose = props.handleClose, buttonRef = props.buttonRef, children = props.children, endComponent = props.endComponent, input = props.input, className = props.className, otherProps = __rest(props, ["isOpen", "handleClose", "buttonRef", "children", "endComponent", "input", "className"]);
|
|
84
|
+
var isOpen = props.isOpen, handleClose = props.handleClose, buttonRef = props.buttonRef, children = props.children, endComponent = props.endComponent, input = props.input, className = props.className, strategy = props.strategy, otherProps = __rest(props, ["isOpen", "handleClose", "buttonRef", "children", "endComponent", "input", "className", "strategy"]);
|
|
85
85
|
var _a = useState(false), isScrollable = _a[0], setIsScrollable = _a[1];
|
|
86
86
|
var dropdownRef = useRef(null);
|
|
87
87
|
var handleChange = function (open) {
|
|
@@ -112,9 +112,9 @@ var InputDropdown = forwardRef(function (props, ref) {
|
|
|
112
112
|
ref.current = elem;
|
|
113
113
|
dropdownRef.current = elem;
|
|
114
114
|
};
|
|
115
|
-
return (jsx(StyledTooltip, __assign({ fullWidth: true, open: isOpen, onChange: handleChange, toggleMethod: "controlled", strategy: "fixed", placement: "bottom", className: className, 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 })));
|
|
115
|
+
return (jsx(StyledTooltip, __assign({ fullWidth: 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
116
|
});
|
|
117
|
-
var StyledTooltip = styled(Tooltip)(templateObject_1$e || (templateObject_1$e = __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"])));
|
|
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"])));
|
|
118
118
|
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
119
|
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
120
|
var isScrollable = _a.isScrollable;
|
|
@@ -156,7 +156,8 @@ var InputSelectBase = forwardRef(function (_a, ref) {
|
|
|
156
156
|
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) {
|
|
157
157
|
(_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();
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
if (!disabled)
|
|
160
|
+
setIsDropdownOpen(function (prev) { return !prev; });
|
|
160
161
|
};
|
|
161
162
|
var handleCloseDropdown = function () {
|
|
162
163
|
setIsDropdownOpen(false);
|
|
@@ -166,12 +167,12 @@ var InputSelectBase = forwardRef(function (_a, ref) {
|
|
|
166
167
|
handleChange(option);
|
|
167
168
|
handleCloseDropdown();
|
|
168
169
|
};
|
|
169
|
-
return (jsxs$1(Wrapper$4, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }),
|
|
170
|
+
return (jsxs$1(Wrapper$4, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(InputSelectDropdown, { options: options, inputRef: {
|
|
170
171
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
171
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, isDropdownOpen: isDropdownOpen, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
172
173
|
{ transition: "all linear .2s" },
|
|
173
174
|
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
174
|
-
] }, iconProps))) })) })
|
|
175
|
+
] }, iconProps))) })) })] }));
|
|
175
176
|
});
|
|
176
177
|
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"])));
|
|
177
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 .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) {
|