kui-complex 0.0.59 → 0.0.61
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/ButtonSelect/cjs/index.js +7 -2
- package/ButtonSelect/cjs/index.js.map +1 -1
- package/ButtonSelect/index.d.ts +1 -1
- package/ButtonSelect/index.js +7 -2
- package/ButtonSelect/index.js.map +1 -1
- package/CalendarHeaderWithSelect/cjs/index.js +7 -2
- package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
- package/CalendarHeaderWithSelect/index.js +7 -2
- package/CalendarHeaderWithSelect/index.js.map +1 -1
- package/InputDropdown/cjs/index.js +7 -2
- package/InputDropdown/cjs/index.js.map +1 -1
- package/InputDropdown/index.js +7 -2
- package/InputDropdown/index.js.map +1 -1
- package/InputPassword/cjs/index.js +5 -4
- package/InputPassword/cjs/index.js.map +1 -1
- package/InputPassword/index.js +5 -4
- package/InputPassword/index.js.map +1 -1
- package/InputPhoneWithForm/index.d.ts +1 -1
- package/InputSelect/cjs/index.js +7 -2
- package/InputSelect/cjs/index.js.map +1 -1
- package/InputSelect/index.d.ts +1 -1
- package/InputSelect/index.js +7 -2
- package/InputSelect/index.js.map +1 -1
- package/InputSelectDropdown/cjs/index.js +7 -2
- package/InputSelectDropdown/cjs/index.js.map +1 -1
- package/InputSelectDropdown/index.js +7 -2
- package/InputSelectDropdown/index.js.map +1 -1
- package/InputTextAreaMobile/cjs/index.js +5 -4
- package/InputTextAreaMobile/cjs/index.js.map +1 -1
- package/InputTextAreaMobile/index.js +5 -4
- package/InputTextAreaMobile/index.js.map +1 -1
- package/InputWithController/cjs/index.js +5 -4
- package/InputWithController/cjs/index.js.map +1 -1
- package/InputWithController/index.js +5 -4
- package/InputWithController/index.js.map +1 -1
- package/InputWithDatePicker/cjs/index.js +7 -2
- package/InputWithDatePicker/cjs/index.js.map +1 -1
- package/InputWithDatePicker/index.d.ts +1 -1
- package/InputWithDatePicker/index.js +7 -2
- package/InputWithDatePicker/index.js.map +1 -1
- package/SelectMonth/cjs/index.js +7 -2
- package/SelectMonth/cjs/index.js.map +1 -1
- package/SelectMonth/index.d.ts +1 -1
- package/SelectMonth/index.js +7 -2
- package/SelectMonth/index.js.map +1 -1
- package/SelectYear/cjs/index.js +7 -2
- package/SelectYear/cjs/index.js.map +1 -1
- package/SelectYear/index.d.ts +1 -1
- package/SelectYear/index.js +7 -2
- package/SelectYear/index.js.map +1 -1
- package/TestForm/cjs/index.js +12 -6
- package/TestForm/cjs/index.js.map +1 -1
- package/TestForm/index.js +12 -6
- package/TestForm/index.js.map +1 -1
- package/cjs/index.js +12 -6
- package/cjs/index.js.map +1 -1
- package/index.d.ts +6 -6
- package/index.js +12 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -184,11 +184,14 @@ var InputDropdown = React.forwardRef(function (props, ref) {
|
|
|
184
184
|
};
|
|
185
185
|
});
|
|
186
186
|
React.useEffect(function () {
|
|
187
|
-
var _a;
|
|
187
|
+
var _a, _b;
|
|
188
188
|
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
189
|
+
var inputMessage = (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(".KUI-InputMessage");
|
|
189
190
|
if (isOpen) {
|
|
190
191
|
buttonRef.current.style.zIndex = "4";
|
|
191
|
-
|
|
192
|
+
if (inputMessage)
|
|
193
|
+
inputMessage.style.opacity = "0";
|
|
194
|
+
var scrollContainer = (_b = dropdownRef.current) === null || _b === void 0 ? void 0 : _b.children[0].children[0];
|
|
192
195
|
if (scrollContainer) {
|
|
193
196
|
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
194
197
|
setIsScrollable(hasScroll);
|
|
@@ -196,6 +199,8 @@ var InputDropdown = React.forwardRef(function (props, ref) {
|
|
|
196
199
|
}
|
|
197
200
|
else {
|
|
198
201
|
buttonRef.current.style.zIndex = "1";
|
|
202
|
+
if (inputMessage)
|
|
203
|
+
inputMessage.style.opacity = "1";
|
|
199
204
|
}
|
|
200
205
|
}
|
|
201
206
|
}, [isOpen]);
|
|
@@ -502,9 +507,11 @@ var InputWithMask = React.forwardRef(function (_a, ref) {
|
|
|
502
507
|
});
|
|
503
508
|
|
|
504
509
|
var InputWithController = React.forwardRef(function (_a, ref) {
|
|
505
|
-
var form = _a.form, name = _a.name, error = _a.error, value = _a.value, inputProps = __rest(_a, ["form", "name", "error", "value"]);
|
|
510
|
+
var form = _a.form, name = _a.name, error = _a.error, value = _a.value, type = _a.type, inputProps = __rest(_a, ["form", "name", "error", "value", "type"]);
|
|
506
511
|
var handleChange = function (e, field) {
|
|
507
|
-
|
|
512
|
+
var _a;
|
|
513
|
+
var newValue = type === "number" && !((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.length) ? null : e.target.value;
|
|
514
|
+
field.onChange(__assign(__assign({}, e), { target: __assign(__assign({}, e.target), { value: newValue }) }));
|
|
508
515
|
if (inputProps.onChange) {
|
|
509
516
|
inputProps.onChange(e);
|
|
510
517
|
}
|
|
@@ -516,11 +523,10 @@ var InputWithController = React.forwardRef(function (_a, ref) {
|
|
|
516
523
|
: (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
517
524
|
};
|
|
518
525
|
return (jsxRuntime.jsx(reactHookForm.Controller, { control: form === null || form === void 0 ? void 0 : form.control, name: name, render: function (_a) {
|
|
519
|
-
var _b;
|
|
520
526
|
var field = _a.field, fieldState = _a.fieldState;
|
|
521
527
|
return (jsxRuntime.jsx(kuiBasic.InputWithAdornments, __assign({ message: getError(fieldState) }, field, inputProps, { onChange: function (e) {
|
|
522
528
|
return handleChange(e, field);
|
|
523
|
-
},
|
|
529
|
+
}, type: type, value: value !== null && value !== void 0 ? value : field.value, inputRef: ref })));
|
|
524
530
|
} }));
|
|
525
531
|
});
|
|
526
532
|
|