+
{
+ const rawValue = e.target.value;
+ const formatted =
+ type === "phoneNum" ? formatInputNumber(rawValue) : rawValue;
+
+ if (rest.onChange) {
+ rest.onChange({
+ ...e,
+ target: {
+ ...e.target,
+ value: formatted,
+ },
+ });
+ }
+ }}
+ {...rest}
+ />
+ {type === "password" && (
+
+ )}
+ {(button || validationState) && (
+
+ {button && (
+
+ )}
+ {validationState && (
+
+ )}
+
+ )}
+ {short && (
+
+ )}
+