UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

51 lines (49 loc) 1.48 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 { i as p, g as C, j as e, F as d } from "../_mysheerid-preview.js"; import { F as f } from "./FormFieldText-CJ-GVpZE.js"; const m = ({ value: a, isErrored: t, onChange: l, explanation: o, intl: i, required: r = !0, // backwards compatibility. TODOv2 make this the same as other fields placeholder: s = "", disabled: n = !1 }) => C("postalCode")?.hidden ? null : /* @__PURE__ */ e.jsx( f, { fieldId: "postal-code", refId: "postalCode", pattern: "[a-zA-Z0-9 ]*", value: a, onChange: l, placeholder: s || i.formatHTMLMessage({ id: "postalCodePlaceholder", defaultMessage: "Postal Code" }), label: /* @__PURE__ */ e.jsx(d, { id: "postalCode", defaultMessage: "Postal Code" }), errorMessage: t && /* @__PURE__ */ e.jsx( d, { id: "errorId.invalidPostalCode", defaultMessage: "Invalid postal code" } ), showPlaceholderAndHideLabel: !!s, required: r, explanation: o && o, disabled: n, autoComplete: "postal-code" } ), F = p(m); export { F as P };