UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

67 lines (65 loc) 1.56 kB
/** * VERSION: 2.230.0-alpha.0 * BUILD_TIMESTAMP: 1778694684677 * BUILD_DATE: Wed May 13 2026 17:51:24 GMT+0000 (Coordinated Universal Time) * BUILD_COMMIT: 7af1c105d5485ac4ed1190c56d492bb4590667a9 */ import { d as s, j as d } from "../sheerid.js"; import { F as y } from "./FormFieldLayout-DEVPpEyA.js"; import { I as L, S as $ } from "./FormSelectChoice-BahCx4wG.js"; const H = ({ fieldId: t = void 0, value: e, onChange: i, placeholder: m, label: n, errorMessage: o, showPlaceholderAndHideLabel: u = !1, isRequired: r = !0, isLoading: p = !1, disabled: c = !1, explanation: f = "", autoFocus: F, options: a, containerId: I = void 0, onKeyDown: b, refId: v = "status", suppressPlaceholder: x = !0 }) => { const l = `sid-${s(t)}`, j = `sid-${s(t)}-error`; return /* @__PURE__ */ d.jsx( y, { fieldId: t, label: n, errorMessage: o, showPlaceholderAndHideLabel: u, isRequired: r, explanation: f, containerId: I, children: /* @__PURE__ */ d.jsx( L, { autoFocus: F, fieldId: v, inputId: l, fieldLabelId: `${l}-label`, suppressPlaceholder: x, isErrored: !!o, options: $(a), onChange: i, value: a.find((S) => S.value === (e && e.value)), placeholder: m, isRequired: r, isLoading: p, disabled: c, ariaDescribedBy: o ? j : void 0, onKeyDown: b } ) } ); }; export { H as F };