@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
50 lines (48 loc) • 1.3 kB
JavaScript
/**
* WARNING: This file is intended to be used within MySheerID.
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
*/
/**
* VERSION: 2.230.0-alpha.0
* BUILD_TIMESTAMP: 1778694697559
* BUILD_DATE: Wed May 13 2026 17:51:37 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: 7af1c105d5485ac4ed1190c56d492bb4590667a9
*/
import { b as r, s as c, j as m } from "../_mysheerid-preview.js";
const R = ({
id: e,
isErrored: i,
className: s = void 0,
hidePlaceholder: u = !0,
refId: d,
required: n = !1,
type: f = "text",
ariaDescribedBy: l,
ariaLabel: o,
...p
// forward any remaining props to the input
}) => {
let t = "";
s && (t += `${s} `), t += "sid-text-input sid-l-full-width", u && (t += " sid-hidden-placeholder"), n && (t += " sid-text-input--required"), i && (t += " sid-text-input--error");
const x = d || e, a = r.useRef(null);
return r.useEffect(() => {
c(x, a.current);
}), /* @__PURE__ */ m.jsx(
"input",
{
className: t,
id: `sid-${e}`,
name: `sid-${e}`,
type: f,
"aria-describedby": l,
"aria-label": o,
"aria-required": n,
"aria-invalid": i,
ref: a,
...p
}
);
}, I = R;
export {
I
};