kui-complex 0.0.138 → 0.0.140

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 +10 -19
  2. package/ButtonSelect/cjs/index.js.map +1 -1
  3. package/ButtonSelect/index.js +10 -19
  4. package/ButtonSelect/index.js.map +1 -1
  5. package/CalendarHeaderWithSelect/cjs/index.js +10 -19
  6. package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
  7. package/CalendarHeaderWithSelect/index.js +10 -19
  8. package/CalendarHeaderWithSelect/index.js.map +1 -1
  9. package/InputDropdown/cjs/index.js +8 -14
  10. package/InputDropdown/cjs/index.js.map +1 -1
  11. package/InputDropdown/index.js +8 -14
  12. package/InputDropdown/index.js.map +1 -1
  13. package/InputMultiSelect/cjs/index.js +10 -19
  14. package/InputMultiSelect/cjs/index.js.map +1 -1
  15. package/InputMultiSelect/index.js +10 -19
  16. package/InputMultiSelect/index.js.map +1 -1
  17. package/InputSelect/cjs/index.js +10 -19
  18. package/InputSelect/cjs/index.js.map +1 -1
  19. package/InputSelect/index.js +10 -19
  20. package/InputSelect/index.js.map +1 -1
  21. package/InputSelectBase/cjs/index.js +10 -19
  22. package/InputSelectBase/cjs/index.js.map +1 -1
  23. package/InputSelectBase/index.js +10 -19
  24. package/InputSelectBase/index.js.map +1 -1
  25. package/InputSelectDropdown/cjs/index.js +8 -14
  26. package/InputSelectDropdown/cjs/index.js.map +1 -1
  27. package/InputSelectDropdown/index.js +8 -14
  28. package/InputSelectDropdown/index.js.map +1 -1
  29. package/InputSelectWithController/cjs/index.js +10 -19
  30. package/InputSelectWithController/cjs/index.js.map +1 -1
  31. package/InputSelectWithController/index.js +10 -19
  32. package/InputSelectWithController/index.js.map +1 -1
  33. package/InputWithAutocomplete/cjs/index.js +8 -14
  34. package/InputWithAutocomplete/cjs/index.js.map +1 -1
  35. package/InputWithAutocomplete/index.js +8 -14
  36. package/InputWithAutocomplete/index.js.map +1 -1
  37. package/InputWithDatePicker/cjs/index.js +10 -19
  38. package/InputWithDatePicker/cjs/index.js.map +1 -1
  39. package/InputWithDatePicker/index.js +10 -19
  40. package/InputWithDatePicker/index.js.map +1 -1
  41. package/SelectMonth/cjs/index.js +10 -19
  42. package/SelectMonth/cjs/index.js.map +1 -1
  43. package/SelectMonth/index.js +10 -19
  44. package/SelectMonth/index.js.map +1 -1
  45. package/SelectYear/cjs/index.js +10 -19
  46. package/SelectYear/cjs/index.js.map +1 -1
  47. package/SelectYear/index.js +10 -19
  48. package/SelectYear/index.js.map +1 -1
  49. package/TestForm/cjs/index.js +10 -19
  50. package/TestForm/cjs/index.js.map +1 -1
  51. package/TestForm/index.js +10 -19
  52. package/TestForm/index.js.map +1 -1
  53. package/cjs/index.js +10 -19
  54. package/cjs/index.js.map +1 -1
  55. package/index.js +10 -19
  56. package/index.js.map +1 -1
  57. package/package.json +1 -1
package/cjs/index.js CHANGED
@@ -229,7 +229,7 @@ var StyledWrapper$9 = styled__default["default"](kuiBasic.Container)(templateObj
229
229
  var templateObject_1$E, templateObject_2$n, templateObject_3$b;
230
230
 
231
231
  var InputDropdown = React.forwardRef(function (props, ref) {
232
- 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"]);
232
+ 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, onScroll = props.onScroll, otherProps = __rest(props, ["isOpen", "handleClose", "buttonRef", "children", "endComponent", "input", "className", "strategy", "onScroll"]);
233
233
  var _a = React.useState(false), isScrollable = _a[0], setIsScrollable = _a[1];
234
234
  var dropdownRef = React.useRef(null);
235
235
  var handleChange = function (open) {
@@ -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]);
@@ -260,9 +254,9 @@ var InputDropdown = React.forwardRef(function (props, ref) {
260
254
  ref.current = elem;
261
255
  dropdownRef.current = elem;
262
256
  };
263
- 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 })));
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({ onScroll: onScroll, 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) {