jb-national-input
Version:
national input web component
44 lines (43 loc) • 1.63 kB
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, o = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty;
let a = require("react");
var i, l = 1, p = null != (i = a) ? e(o(i)) : {};
a = ((e, o, a, i) => {
if (o && "object" == typeof o || "function" == typeof o) for (var l, p = r(o), d = 0, c = p.length; d < c; d++) l = p[d], u.call(e, l) || l === a || t(e, l, {
get: ((e) => o[e]).bind(null, l),
enumerable: !(i = n(o, l)) || i.enumerable
});
return e;
})(!l && i && i.__esModule ? p : t(p, "default", {
value: i,
enumerable: !0
}), i), require("jb-national-input");
let d = require("jb-input/react");
const c = a.default.forwardRef((e, t) => {
const n = (0, a.useRef)(null);
(0, a.useImperativeHandle)(t, () => n.current ?? void 0, [n]);
const { disabled: r, initialValue: o, required: u, validationList: i, value: l, children: p, onBeforeinput: c, onBlur: s, onChange: b, onEnter: f, onFocus: y, onInput: v, onKeydown: g, onKeyup: j, ...O } = e;
return (0, d.useJBInputAttribute)(n, {
disabled: r,
required: u,
validationList: i,
...O
}), (0, d.useJBInputEvents)(n, {
onBeforeinput: c,
onBlur: s,
onChange: b,
onEnter: f,
onFocus: y,
onInput: v,
onKeydown: g,
onKeyup: j,
...O
}), a.default.createElement("jb-national-input", {
ref: n,
value: l?.toString() ?? "",
initialValue: o?.toString() ?? "",
...O
}, p);
});
c.displayName = "JBNationalInput", exports.JBNationalInput = c;
//# sourceMappingURL=JBNationalInput.cjs.js.map