kui-complex 0.0.22 → 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.es.js CHANGED
@@ -203,7 +203,7 @@ var getFormError = function (name, form) {
203
203
 
204
204
  var InputSelect = forwardRef(function (props, ref) {
205
205
  var _a, _b, _c;
206
- var options = props.options, name = props.name, handleChange = props.handleChange, form = props.form, other = __rest(props, ["options", "name", "handleChange", "form"]);
206
+ var options = props.options, name = props.name, handleChange = props.handleChange, form = props.form, iconProps = props.iconProps, other = __rest(props, ["options", "name", "handleChange", "form", "iconProps"]);
207
207
  var _d = useState(false), isOpenDropdown = _d[0], setIsOpenDropDown = _d[1];
208
208
  var _e = useState(getFormValue(name, form)), value = _e[0], setValue = _e[1];
209
209
  var error = getFormError(name, form);
@@ -245,16 +245,16 @@ var InputSelect = forwardRef(function (props, ref) {
245
245
  inputRef.current = e;
246
246
  register === null || register === void 0 ? void 0 : register.ref(e);
247
247
  };
248
- return (jsxs(Wrapper$6, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, errorMessage: error }, other, { endIcon: !props.disabled && (jsx$1(StyledIconWrapper, { children: jsx$1(HalfArrowIcon, { width: 12, height: 13, css: [
248
+ return (jsxs(Wrapper$6, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, errorMessage: error }, other, { endIcon: !props.disabled && (jsx$1(StyledIconWrapper, { children: jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
249
249
  { transition: "all linear .2s" },
250
250
  isOpenDropdown && { transform: "rotate(180deg)" },
251
- ] }) })) }, register, { ref: forwardedRef })), options && options.length > 0 && !props.disabled && (jsx$1(InputSelectDropdown, { options: options, inputRef: {
251
+ ] }, iconProps)) })) }, register, { ref: forwardedRef })), options && options.length > 0 && !props.disabled && (jsx$1(InputSelectDropdown, { options: options, inputRef: {
252
252
  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,
253
253
  }, isOpenDropdown: isOpenDropdown, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: other.value || value }))] }));
254
254
  });
255
- var Wrapper$6 = styled.div(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n position: relative;\n text-align: left;\n"], ["\n position: relative;\n text-align: left;\n"])));
255
+ var Wrapper$6 = styled.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"])));
256
256
  var StyledInput = styled(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"])));
257
- var StyledIconWrapper = styled.div(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n padding-right: 8px;\n height: 13px;\n"], ["\n padding-right: 8px;\n height: 13px;\n"])));
257
+ var StyledIconWrapper = styled.div(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n padding-right: 8px;\n"], ["\n padding-right: 8px;\n"])));
258
258
  var templateObject_1$n, templateObject_2$a, templateObject_3$4;
259
259
 
260
260
  var SelectYear = function (_a) {
@@ -930,7 +930,7 @@ var ButtonSelect = forwardRef(function (props, ref) {
930
930
  var options = props.options, otherProps = __rest(props, ["options"]);
931
931
  return (jsx(StyledInputSelect, __assign({ value: options === null || options === void 0 ? void 0 : options[0].value, options: options, iconProps: { width: 9, height: 5 } }, otherProps, { ref: ref })));
932
932
  });
933
- var StyledInputSelect = styled(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"])), theme.palette.grey.fiftyP);
933
+ var StyledInputSelect = styled(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"])), theme.palette.grey.fiftyP);
934
934
  var templateObject_1;
935
935
 
936
936
  export { Avatar, ButtonSelect, ButtonTab, ButtonsPanel, CalendarHeaderWithSelect, CalendarStandardContainer, CalendarStandardHeader, DesktopInputWithMonthPicker, DesktopMenuPanel, InputDropdown, InputForDatepicker, InputPassword, InputPhoneWithForm, InputSelect, InputSelectDropdown, InputTextAreaMobile, InputWithController, InputWithDatePicker, InputWithMask, InputWithMonthPicker, MenuItem, MenuPanel, MobileInputWithMonthPicker, MobileMenuPanel, MonthPickerContainer, MonthPickerHeader, PassportStrengthBar, SelectMonth, SelectYear, Switch, Table, TableCell, TableHeadCell, TableRow, Tooltip, UndefinedAvatar };