UNPKG

jb-national-input

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