UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

59 lines (57 loc) 1.47 kB
/** * 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 { bh as F, d as s, j as n } from "../_mysheerid-preview.js"; import { I as C } from "./InputText-PEiatRRJ.js"; import { F as h } from "./FormFieldLayout-DDEEmlGC.js"; const l = (t, r = void 0) => (F(t) || []).length >= 2 && !r, v = ({ fieldId: t, value: r, onChange: a, placeholder: m, label: d, errorMessage: o, showPlaceholderAndHideLabel: e = !1, required: i = !0, explanation: u = "", ...p }) => { const x = `sid-${s(t)}-error`; return /* @__PURE__ */ n.jsx( h, { fieldId: t, label: d, errorMessage: o, showPlaceholderAndHideLabel: e, isRequired: i, explanation: u, children: /* @__PURE__ */ n.jsx( C, { id: s(t), value: r, onChange: (c) => a(c.target.value), placeholder: e ? m : "", hidePlaceholder: !e, refId: t, isErrored: !!o, required: i, "aria-describedby": o ? x : void 0, ...p } ) } ); }; export { v as F, l as i };