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.
Files changed (57) hide show
  1. package/ButtonSelect/cjs/index.js +8 -17
  2. package/ButtonSelect/cjs/index.js.map +1 -1
  3. package/ButtonSelect/index.js +8 -17
  4. package/ButtonSelect/index.js.map +1 -1
  5. package/CalendarHeaderWithSelect/cjs/index.js +8 -17
  6. package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
  7. package/CalendarHeaderWithSelect/index.js +8 -17
  8. package/CalendarHeaderWithSelect/index.js.map +1 -1
  9. package/InputDropdown/cjs/index.js +6 -12
  10. package/InputDropdown/cjs/index.js.map +1 -1
  11. package/InputDropdown/index.js +6 -12
  12. package/InputDropdown/index.js.map +1 -1
  13. package/InputMultiSelect/cjs/index.js +8 -17
  14. package/InputMultiSelect/cjs/index.js.map +1 -1
  15. package/InputMultiSelect/index.js +8 -17
  16. package/InputMultiSelect/index.js.map +1 -1
  17. package/InputSelect/cjs/index.js +8 -17
  18. package/InputSelect/cjs/index.js.map +1 -1
  19. package/InputSelect/index.js +8 -17
  20. package/InputSelect/index.js.map +1 -1
  21. package/InputSelectBase/cjs/index.js +8 -17
  22. package/InputSelectBase/cjs/index.js.map +1 -1
  23. package/InputSelectBase/index.js +8 -17
  24. package/InputSelectBase/index.js.map +1 -1
  25. package/InputSelectDropdown/cjs/index.js +6 -12
  26. package/InputSelectDropdown/cjs/index.js.map +1 -1
  27. package/InputSelectDropdown/index.js +6 -12
  28. package/InputSelectDropdown/index.js.map +1 -1
  29. package/InputSelectWithController/cjs/index.js +8 -17
  30. package/InputSelectWithController/cjs/index.js.map +1 -1
  31. package/InputSelectWithController/index.js +8 -17
  32. package/InputSelectWithController/index.js.map +1 -1
  33. package/InputWithAutocomplete/cjs/index.js +6 -12
  34. package/InputWithAutocomplete/cjs/index.js.map +1 -1
  35. package/InputWithAutocomplete/index.js +6 -12
  36. package/InputWithAutocomplete/index.js.map +1 -1
  37. package/InputWithDatePicker/cjs/index.js +8 -17
  38. package/InputWithDatePicker/cjs/index.js.map +1 -1
  39. package/InputWithDatePicker/index.js +8 -17
  40. package/InputWithDatePicker/index.js.map +1 -1
  41. package/SelectMonth/cjs/index.js +8 -17
  42. package/SelectMonth/cjs/index.js.map +1 -1
  43. package/SelectMonth/index.js +8 -17
  44. package/SelectMonth/index.js.map +1 -1
  45. package/SelectYear/cjs/index.js +8 -17
  46. package/SelectYear/cjs/index.js.map +1 -1
  47. package/SelectYear/index.js +8 -17
  48. package/SelectYear/index.js.map +1 -1
  49. package/TestForm/cjs/index.js +8 -17
  50. package/TestForm/cjs/index.js.map +1 -1
  51. package/TestForm/index.js +8 -17
  52. package/TestForm/index.js.map +1 -1
  53. package/cjs/index.js +8 -17
  54. package/cjs/index.js.map +1 -1
  55. package/index.js +8 -17
  56. package/index.js.map +1 -1
  57. 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
- if (isOpen) {
96
- buttonRef.current.style.zIndex = "4";
97
- var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
98
- if (scrollContainer) {
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, isDropdownOpen: isDropdownOpen, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
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 .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) {
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) {