UNPKG

fui-fancyui

Version:
33 lines (32 loc) 1.32 kB
"use client"; import { jsxs as g, jsx as o } from "react/jsx-runtime"; import s from "color"; import C from "../../../design/theme/themeStore/themeStore.js"; import b from "../../atoms/CheckerBoardPattern/CheckerBoardPattern.js"; import { globalElementSizes as y } from "../../../design/theme/globalSizes.js"; import { Wrapper as S, Content as $, ColorDisplayContainer as k } from "./ColorDisplay.style.js"; import x from "./components/ClipBoardIcon/ClipBoardIcon.js"; import B from "./components/ColorText/ColorText.js"; import { sizeSettings as a } from "./sizeSettings.js"; function m(n) { const { sizeC: r = "sm", colorValue: t, opacity: e, fullHeight: p, borderRadius: i, children: h, ...c } = n, d = C.getState().isDarkTheme, l = e === void 0 ? 1 : e, f = s(t).isLight() && l > 0.5, u = s(t).rgb().alpha(l); return /* @__PURE__ */ g( S, { $fullHeight: p, $height: y[a[r].height], $borderRadius: i || a[r].borderRadius, ...c, children: [ /* @__PURE__ */ o($, { $isBright: f, $isDarkTheme: d, children: h }), /* @__PURE__ */ o(k, { style: { background: `${u.toString()}` } }), /* @__PURE__ */ o(b, { externalStyle: { position: "absolute", top: "0", left: "0" } }) ] } ); } m.ClipBoardIcon = x; m.ColorValue = B; export { m as default };