jb-number-input
Version:
number 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 i = require("react");
var l, a = 1, p = null != (l = i) ? e(o(l)) : {};
i = ((e, o, i, l) => {
if (o && "object" == typeof o || "function" == typeof o) for (var a, p = r(o), b = 0, c = p.length; b < c; b++) a = p[b], u.call(e, a) || a === i || t(e, a, {
get: ((e) => o[e]).bind(null, a),
enumerable: !(l = n(o, a)) || l.enumerable
});
return e;
})(!a && l && l.__esModule ? p : t(p, "default", {
value: l,
enumerable: !0
}), l), require("jb-number-input");
let b = require("jb-input/react");
const c = (0, i.forwardRef)((e, t) => {
const n = (0, i.useRef)(null);
(0, i.useImperativeHandle)(t, () => n.current ?? void 0, [n]);
const { disabled: r, initialValue: o, required: u, validationList: l, value: a, onBeforeinput: p, onBlur: c, onChange: d, onEnter: s, onFocus: f, onInput: y, onKeydown: m, onKeyup: v, children: g, ...j } = e;
return (0, b.useJBInputAttribute)(n, {
disabled: r,
required: u,
validationList: l,
...j
}), (0, b.useJBInputEvents)(n, {
onBeforeinput: p,
onBlur: c,
onChange: d,
onEnter: s,
onFocus: f,
onInput: y,
onKeydown: m,
onKeyup: v,
...j
}), i.default.createElement("jb-number-input", {
ref: n,
value: a?.toString() ?? "",
initialValue: o?.toString() ?? "",
...j
}, e.children);
});
c.displayName = "JBNumberInput", exports.JBNumberInput = c;
//# sourceMappingURL=JBNumberInput.cjs.js.map