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/index.js CHANGED
@@ -207,17 +207,11 @@ var InputDropdown = forwardRef(function (props, ref) {
207
207
  };
208
208
  useEffect(function () {
209
209
  var _a;
210
- if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
211
- if (isOpen) {
212
- buttonRef.current.style.zIndex = "4";
213
- var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
214
- if (scrollContainer) {
215
- var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
216
- setIsScrollable(hasScroll);
217
- }
218
- }
219
- else {
220
- buttonRef.current.style.zIndex = "1";
210
+ if ((buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && isOpen) {
211
+ var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
212
+ if (scrollContainer) {
213
+ var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
214
+ setIsScrollable(hasScroll);
221
215
  }
222
216
  }
223
217
  }, [isOpen]);
@@ -230,7 +224,7 @@ var InputDropdown = forwardRef(function (props, ref) {
230
224
  };
231
225
  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$1(StyledDropdown$2, __assign({ "data-testid": "input_dropdown", container: true, ref: forwardedRef }, otherProps, { children: [jsx(StyledWrapper$8, __assign({ isScrollable: isScrollable }, { children: jsx(ScrollingContainer, __assign({ isScrollable: isScrollable, className: "KUI-InputDropdown_scroll" }, { children: children })) })), endComponent] })) }, { children: input })));
232
226
  });
233
- var StyledTooltip = styled(Tooltip$1)(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"])));
227
+ var StyledTooltip = styled(Tooltip$1)(templateObject_1$D || (templateObject_1$D = __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"])));
234
228
  var StyledDropdown$2 = styled(Grid)(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n width: 100%;\n user-select: none;\n"], ["\n width: 100%;\n user-select: none;\n"])));
235
229
  var StyledWrapper$8 = styled.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) {
236
230
  var isScrollable = _a.isScrollable;
@@ -285,16 +279,13 @@ var InputSelectBase = forwardRef(function (_a, ref) {
285
279
  };
286
280
  return (jsxs(Wrapper$6, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(InputSelectDropdown, { options: options, inputRef: {
287
281
  current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
288
- }, 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: [
282
+ }, 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, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
289
283
  { transition: "all linear .2s" },
290
284
  isDropdownOpen && { transform: "rotate(180deg)" },
291
285
  ] }, iconProps))) })) })] }));
292
286
  });
293
287
  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"])));
294
- var StyledInput$3 = styled(InputWithAdornments)(templateObject_2$k || (templateObject_2$k = __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) {
295
- var isDropdownOpen = _a.isDropdownOpen;
296
- return (isDropdownOpen ? 0 : 1);
297
- });
288
+ var StyledInput$3 = styled(InputWithAdornments)(templateObject_2$k || (templateObject_2$k = __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"])));
298
289
  var templateObject_1$B, templateObject_2$k;
299
290
 
300
291
  function InputSelectOption(props) {