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/cjs/index.js CHANGED
@@ -239,17 +239,11 @@ var InputDropdown = React.forwardRef(function (props, ref) {
239
239
  };
240
240
  React.useEffect(function () {
241
241
  var _a;
242
- if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
243
- if (isOpen) {
244
- buttonRef.current.style.zIndex = "4";
245
- var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
246
- if (scrollContainer) {
247
- var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
248
- setIsScrollable(hasScroll);
249
- }
250
- }
251
- else {
252
- buttonRef.current.style.zIndex = "1";
242
+ if ((buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && isOpen) {
243
+ var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
244
+ if (scrollContainer) {
245
+ var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
246
+ setIsScrollable(hasScroll);
253
247
  }
254
248
  }
255
249
  }, [isOpen]);
@@ -262,7 +256,7 @@ var InputDropdown = React.forwardRef(function (props, ref) {
262
256
  };
263
257
  return (jsxRuntime.jsx(StyledTooltip, __assign({ fullWidth: true, withoutMobile: 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 })));
264
258
  });
265
- 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"])));
259
+ var StyledTooltip = styled__default["default"](kuiBasic.Tooltip)(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"])));
266
260
  var StyledDropdown$2 = styled__default["default"](kuiBasic.Grid)(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n width: 100%;\n user-select: none;\n"], ["\n width: 100%;\n user-select: none;\n"])));
267
261
  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) {
268
262
  var isScrollable = _a.isScrollable;
@@ -317,16 +311,13 @@ var InputSelectBase = React.forwardRef(function (_a, ref) {
317
311
  };
318
312
  return (jsxRuntime$1.jsxs(Wrapper$6, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }), jsxRuntime$1.jsx(InputSelectDropdown, { options: options, inputRef: {
319
313
  current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
320
- }, 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: [
314
+ }, 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, isLabelShrink: Boolean(selectedValue) || selectedValue === 0 }, inputProps, { endIcon: !disabled && (jsxRuntime$1.jsx(kuiIcon.HalfArrowIcon, __assign({ width: 12, height: 13, css: [
321
315
  { transition: "all linear .2s" },
322
316
  isDropdownOpen && { transform: "rotate(180deg)" },
323
317
  ] }, iconProps))) })) })] }));
324
318
  });
325
319
  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"])));
326
- var StyledInput$3 = styled__default["default"](kuiBasic.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) {
327
- var isDropdownOpen = _a.isDropdownOpen;
328
- return (isDropdownOpen ? 0 : 1);
329
- });
320
+ var StyledInput$3 = styled__default["default"](kuiBasic.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"])));
330
321
  var templateObject_1$B, templateObject_2$k;
331
322
 
332
323
  function InputSelectOption(props) {