UNPKG

fui-fancyui

Version:
74 lines (73 loc) 1.53 kB
"use client"; import { jsx as d } from "react/jsx-runtime"; import { forwardRef as w, useState as S, useId as j } from "react"; import E from "../../atoms/RawTextArea/RawTextArea.js"; import M from "../../molecules/InputWrapper/InputWrapper.js"; const W = w((c, p) => { const { id: r, value: t, themeType: m = "primary", layer: f = 2, placeholder: o, systemMessage: y, disabled: s, align: g, icon: x, label: A, onFocus: a, underline: B, onBlur: n, outlined: I, outlinedBackgroundStrength: h, outlinedRemoveBorder: v, transparentBackground: T, className: b, readOnly: i, ...F } = c, [R, u] = S(!1), k = j(), l = r || k; return /* @__PURE__ */ d( M, { id: l, isTextArea: !0, hasValue: !!t, label: A, disabled: s || i, placeholder: o, themeType: m, layer: f, align: g, isActive: R, underline: B, icon: x, className: b, systemMessage: y, transparentBackground: T, outlined: I, outlinedBackgroundStrength: h, outlinedRemoveBorder: v, InputElement: /* @__PURE__ */ d( E, { ref: p, id: l, value: t, readOnly: i, disabled: s, onFocus: (e) => { a && a(e), u(!0); }, onBlur: (e) => { n && n(e), u(!1); }, placeholder: o, ...F } ) } ); }); export { W as default };