UNPKG

fui-fancyui

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