kui-complex 0.0.21 → 0.0.23

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/dist/index.js CHANGED
@@ -235,7 +235,7 @@ var getFormError = function (name, form) {
235
235
 
236
236
  var InputSelect = React.forwardRef(function (props, ref) {
237
237
  var _a, _b, _c;
238
- var options = props.options, name = props.name, handleChange = props.handleChange, form = props.form, other = __rest(props, ["options", "name", "handleChange", "form"]);
238
+ var options = props.options, name = props.name, handleChange = props.handleChange, form = props.form, iconProps = props.iconProps, other = __rest(props, ["options", "name", "handleChange", "form", "iconProps"]);
239
239
  var _d = React.useState(false), isOpenDropdown = _d[0], setIsOpenDropDown = _d[1];
240
240
  var _e = React.useState(getFormValue(name, form)), value = _e[0], setValue = _e[1];
241
241
  var error = getFormError(name, form);
@@ -277,16 +277,16 @@ var InputSelect = React.forwardRef(function (props, ref) {
277
277
  inputRef.current = e;
278
278
  register === null || register === void 0 ? void 0 : register.ref(e);
279
279
  };
280
- return (jsxRuntime$1.jsxs(Wrapper$6, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }), jsxRuntime$1.jsx(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, errorMessage: error }, other, { endIcon: !props.disabled && (jsxRuntime$1.jsx(StyledIconWrapper, { children: jsxRuntime$1.jsx(kuiIcon.HalfArrowIcon, { width: 12, height: 13, css: [
280
+ return (jsxRuntime$1.jsxs(Wrapper$6, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }), jsxRuntime$1.jsx(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, errorMessage: error }, other, { endIcon: !props.disabled && (jsxRuntime$1.jsx(StyledIconWrapper, { children: jsxRuntime$1.jsx(kuiIcon.HalfArrowIcon, __assign({ width: 12, height: 13, css: [
281
281
  { transition: "all linear .2s" },
282
282
  isOpenDropdown && { transform: "rotate(180deg)" },
283
- ] }) })) }, register, { ref: forwardedRef })), options && options.length > 0 && !props.disabled && (jsxRuntime$1.jsx(InputSelectDropdown, { options: options, inputRef: {
283
+ ] }, iconProps)) })) }, register, { ref: forwardedRef })), options && options.length > 0 && !props.disabled && (jsxRuntime$1.jsx(InputSelectDropdown, { options: options, inputRef: {
284
284
  current: (_c = (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.parentElement,
285
285
  }, isOpenDropdown: isOpenDropdown, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: other.value || value }))] }));
286
286
  });
287
- var Wrapper$6 = styled__default["default"].div(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n position: relative;\n text-align: left;\n"], ["\n position: relative;\n text-align: left;\n"])));
287
+ var Wrapper$6 = styled__default["default"].div(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n position: relative;\n text-align: left;\n width: fit-content;\n"], ["\n position: relative;\n text-align: left;\n width: fit-content;\n"])));
288
288
  var StyledInput = styled__default["default"](kuiBasic.InputWithAdornments)(templateObject_2$a || (templateObject_2$a = __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"])));
289
- var StyledIconWrapper = styled__default["default"].div(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n padding-right: 8px;\n height: 13px;\n"], ["\n padding-right: 8px;\n height: 13px;\n"])));
289
+ var StyledIconWrapper = styled__default["default"].div(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n padding-right: 8px;\n"], ["\n padding-right: 8px;\n"])));
290
290
  var templateObject_1$n, templateObject_2$a, templateObject_3$4;
291
291
 
292
292
  var SelectYear = function (_a) {
@@ -962,7 +962,7 @@ var ButtonSelect = React.forwardRef(function (props, ref) {
962
962
  var options = props.options, otherProps = __rest(props, ["options"]);
963
963
  return (jsxRuntime.jsx(StyledInputSelect, __assign({ value: options === null || options === void 0 ? void 0 : options[0].value, options: options, iconProps: { width: 9, height: 5 } }, otherProps, { ref: ref })));
964
964
  });
965
- var StyledInputSelect = styled__default["default"](InputSelect)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n & .MuiFilledInput-root {\n height: 32px;\n border-radius: 66px;\n padding: 0 12px;\n input {\n color: ", ";\n transform: none;\n font-size: 12px;\n line-height: 14px;\n margin: 0 -16px 0 0 !important;\n width: auto !important;\n }\n }\n & + div {\n top: 40px;\n }\n"], ["\n & .MuiFilledInput-root {\n height: 32px;\n border-radius: 66px;\n padding: 0 12px;\n input {\n color: ", ";\n transform: none;\n font-size: 12px;\n line-height: 14px;\n margin: 0 -16px 0 0 !important;\n width: auto !important;\n }\n }\n & + div {\n top: 40px;\n }\n"])), kuiBasic.theme.palette.grey.fiftyP);
965
+ var StyledInputSelect = styled__default["default"](InputSelect)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.KUI-Input_container {\n height: 32px;\n width: fit-content;\n input {\n height: 32px;\n border-radius: 66px;\n padding: 0 12px;\n color: ", ";\n transform: none;\n font-size: 12px;\n line-height: 14px;\n margin: 0 !important;\n width: auto !important;\n }\n }\n & + div {\n top: 40px;\n }\n"], ["\n &.KUI-Input_container {\n height: 32px;\n width: fit-content;\n input {\n height: 32px;\n border-radius: 66px;\n padding: 0 12px;\n color: ", ";\n transform: none;\n font-size: 12px;\n line-height: 14px;\n margin: 0 !important;\n width: auto !important;\n }\n }\n & + div {\n top: 40px;\n }\n"])), kuiBasic.theme.palette.grey.fiftyP);
966
966
  var templateObject_1;
967
967
 
968
968
  exports.Avatar = Avatar;