fui-fancyui
Version:
FancyUI Libary
62 lines (61 loc) • 1.5 kB
JavaScript
"use client";
import { jsxs as y, jsx as r } from "react/jsx-runtime";
import b from "../../../utils/functions/clampLayer/clampLayer.js";
import { Wrapper as f, InputWrapper as x } from "./LabeledInput.style.js";
import T from "../../atoms/InputLabel/InputLabel.js";
import L from "../../atoms/FancyLine/FancyLine.js";
import v from "../../../design/designFunctions/getOpositMainThemeType/getOpositMainThemeType.js";
function j(n) {
const {
id: m,
inputElement: c,
systemMessageType: a,
label: e,
hasValue: t,
hasPlaceholder: l,
isTextArea: h,
themeType: s = "primary",
layer: o = 3,
underline: d,
labelVariant: p,
isActive: i,
align: u
} = n;
return /* @__PURE__ */ y(f, { $hasLabel: !!e, $isTextArea: h, children: [
e && /* @__PURE__ */ r(
T,
{
lableVariant: p,
align: u,
themeType: v(s),
htmlFor: m,
isMovedUp: l || t,
isActive: i || t,
systemMessageType: a,
children: e
}
),
/* @__PURE__ */ r(
x,
{
$isActive: p !== "static" && (!!l || !!t || !!i),
$isLabelProvided: !!e,
children: c
}
),
d && /* @__PURE__ */ r(
L,
{
systemMessageType: a,
themeType: s,
thickness: "2px",
layer: o ? b(o + 2) : 3,
isActive: i,
externalStyle: { position: "absolute", bottom: 0, left: 0, width: "100%" }
}
)
] });
}
export {
j as default
};