UNPKG

@payfit/unity-components

Version:

41 lines (40 loc) 1.37 kB
import { TanstackFormFeedbackText as e } from "../form-field/parts/TanstackFormFeedbackText.js"; import { TanstackFormField as t } from "../form-field/TanstackFormField.js"; import { TanstackFormHelperText as n } from "../form-field/parts/TanstackFormHelperText.js"; import { TanstackFormLabel as r } from "../form-field/parts/TanstackFormLabel.js"; import { TanstackInput as i } from "../input/TanstackInput.js"; import { TanstackTextArea as a } from "../text-area/TanstackTextArea.js"; import { forwardRef as o } from "react"; import { jsx as s, jsxs as c } from "react/jsx-runtime"; //#region src/components/text-field/TanstackTextField.tsx function l({ label: o, helperText: l, contextualLink: u, multiline: d, isRequired: f, isLoading: p, isDisabled: m, isReadOnly: h, requiredVariant: g, ..._ }, v) { let y = { isLoading: p, isDisabled: m, isReadOnly: h }, { onClearButtonPress: b } = d ? {} : _; return /* @__PURE__ */ c(t, { children: [ /* @__PURE__ */ s(r, { requiredVariant: g, isRequired: f, children: o }), l && /* @__PURE__ */ s(n, { children: l }), d ? /* @__PURE__ */ s(a, { ref: v, ...y, ..._ }) : /* @__PURE__ */ s(i, { ref: v, onClearButtonPress: b, ...y, ..._ }), /* @__PURE__ */ s(e, {}), u ] }); } var u = o(l); u.displayName = "TanstackTextField"; //#endregion export { u as TanstackTextField };