UNPKG

@undp/design-system-react

Version:

React based design system for UNDP

66 lines (65 loc) 2.02 kB
import { t as e } from "./utils-ca9as9Ye.js"; import { t } from "./dist-CQzJbxrW.js"; import { H2 as n, H4 as r, P as i } from "./Typography.js"; import * as a from "react"; import { jsx as o } from "react/jsx-runtime"; //#region src/components/ui/stat-card.tsx var s = t("group bg-surface box-border items-stretch p-8 transition-all duration-400", { variants: { hoverColor: { default: "hover:bg-card-hover-color", primary: "hover:bg-primary", secondary: "hover:bg-secondary", tertiary: "hover:bg-tertiary", quaternary: "hover:bg-quaternary", foreground: "hover:bg-foreground", background: "hover:bg-background", success: "hover:bg-success", warning: "hover:bg-warning", info: "hover:bg-info", error: "hover:bg-error", none: "" }, size: { sm: "w-1/4", base: "w-1/3", lg: "w-1/2", xl: "w-2/3", full: "w-full" } }, defaultVariants: { hoverColor: "default", size: "full" } }), c = a.forwardRef(({ className: t, hoverColor: n = "primary", children: r, size: i, ...a }, c) => /* @__PURE__ */ o("div", { ref: c, className: e(s({ size: i, hoverColor: n }), t), ...a, children: r })); c.displayName = "StatCard"; var l = a.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ o(n, { ref: i, className: e("text-left font-heading text-transparent leading-xs [-webkit-text-stroke:2px_var(--content-primary)] [text-shadow:none] group-hover:text-content-primary rtl:text-right group-hover:[-webkit-text-stroke:0px]", t), ...r })); l.displayName = "StatCardValue"; var u = a.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ o(r, { ref: i, className: e("text-content-primary", t), ...n })); u.displayName = "StatCardTitle"; var d = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(i, { ref: r, className: e("text-content-primary", t), ...n })); d.displayName = "StatCardDescription"; //#endregion export { c as StatCard, d as StatCardDescription, u as StatCardTitle, l as StatCardValue }; //# sourceMappingURL=StatCard.js.map