UNPKG

jb-mobile-input

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