@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
52 lines (50 loc) • 1.48 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 { i as S, j as t, F as d } from "../_mysheerid-preview.js";
import { F as m } from "./FormFieldInputSelect-CjWY_ush.js";
const I = ({
value: o,
isErrored: r,
options: a,
onChange: n,
intl: i,
placeholder: s = "",
label: c = "",
isRequired: f = !1,
disabled: u = !1
}) => {
const l = "state";
return /* @__PURE__ */ t.jsx(
m,
{
fieldId: l,
value: a.find((e) => e.value === o),
refId: "state",
onChange: (e) => n(e),
placeholder: s || i.formatHTMLMessage({
id: "statePlaceholder",
defaultMessage: "State"
}),
label: c || /* @__PURE__ */ t.jsx(d, { id: "state", defaultMessage: "State" }),
errorMessage: r && /* @__PURE__ */ t.jsx(d, { id: "errorId.invalidState", defaultMessage: "Invalid state" }),
showPlaceholderAndHideLabel: !!s,
options: a,
isRequired: f,
buttonRef: "inputSelectButtonState",
containerId: `sid-${l}__select`,
disabled: u,
autoComplete: "address-level1"
}
);
}, p = S(I);
export {
p as S
};