fui-fancyui
Version:
FancyUI Libary
24 lines (23 loc) • 1.18 kB
JavaScript
import { styled as l } from "styled-components";
import { getTextColor as c, getBackgroundColor as i } from "../../../design/designFunctions/colorCalculatorForComponent/colorCalculatorForComponent.js";
import { generateLableVariant as s } from "./utils/generateLableVariant.js";
const p = ({ $systemMessageType: e, $isActive: t, $themeType: o = "secondary", $isMovedUp: r }) => e || (r && !t ? o : t ? "accent" : o), m = l.label`
position: absolute;
color: ${({ theme: e }) => c({ theme: e, $themeType: "secondary", $textLayer: 4 })};
${({ $lableVariant: e, $isMovedUp: t, $isActive: o, $align: r }) => s({ $lableVariant: e, $isActive: t || o, $align: r })}
font-weight: 500;
transition:
top 0.25s ease,
color 0.25s ease,
font-size 0.25s ease;
pointer-events: none; /* Ensures the input can be focused when clicking on the label */
color: ${({ $systemMessageType: e, theme: t, $isActive: o, $themeType: r = "secondary", $layer: n, $isMovedUp: a }) => i({
theme: t,
$themeType: p({ $systemMessageType: e, $isActive: o, $themeType: r, $isMovedUp: a }),
$layer: o ? 0 : n
})};
${({ $externalStyle: e }) => e};
`;
export {
m as StyledInputLabel
};