jb-mobile-input
Version:
mobile input web component
33 lines (32 loc) • 936 B
JavaScript
import n, { forwardRef as o, useImperativeHandle as e, useRef as t } from "react";
import "jb-mobile-input";
import { useJBInputAttribute as i, useJBInputEvents as r } from "jb-input/react";
const u = o((o, u) => {
const l = t(null);
e(u, () => l.current ?? void 0, [l]);
const { disabled: a, initialValue: p, required: d, validationList: c, value: s, onBeforeinput: m, onBlur: b, onChange: f, onEnter: v, onFocus: y, onInput: B, onKeydown: g, onKeyup: K, ...h } = o;
return i(l, {
disabled: a,
required: d,
validationList: c,
...h
}), r(l, {
onBeforeinput: m,
onBlur: b,
onChange: f,
onEnter: v,
onFocus: y,
onInput: B,
onKeydown: g,
onKeyup: K,
...h
}), n.createElement("jb-mobile-input", {
ref: l,
value: s?.toString() ?? "",
initialValue: p?.toString() ?? "",
...h
}, o.children);
});
u.displayName = "JBMobileInput";
export { u as JBMobileInput };
//# sourceMappingURL=JBMobileInput.js.map