@krosoft/react 0.0.73 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { c as m, g as u, h as f, d as p } from "./calendar-cHag6u-j.js";
3
+ import "./index-BQOmHRsD.js";
4
+ import { c as n } from "./index-gWiv5-6R.js";
5
+ import "./select-Dv9bdUCB.js";
6
+ import g from "react";
7
+ import { formatNumber as h } from "@krosoft/core/helpers";
8
+ import { useTranslation as N } from "react-i18next";
9
+ const b = ({ titleKey: t, value: e, valueClassName: i, icon: d, iconClassName: s, description: l, descriptionClassName: c, onClick: a }) => {
10
+ const { t: x } = N();
11
+ return /* @__PURE__ */ o(m, { className: n(a ? "hover:border-primary cursor-pointer" : ""), onClick: a, children: [
12
+ /* @__PURE__ */ o(u, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
13
+ /* @__PURE__ */ r(f, { className: "text-sm font-medium", children: x(t) }),
14
+ g.createElement(d, {
15
+ className: n("size-6 text-muted-foreground", s)
16
+ })
17
+ ] }),
18
+ /* @__PURE__ */ o(p, { children: [
19
+ /* @__PURE__ */ r("div", { className: n("text-2xl font-bold", i), children: h(e) }),
20
+ /* @__PURE__ */ r("p", { className: n("text-xs text-muted-foreground", c), children: l })
21
+ ] })
22
+ ] });
23
+ }, $ = ({ stats: t }) => /* @__PURE__ */ r("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: t.map((e) => /* @__PURE__ */ r(
24
+ b,
25
+ {
26
+ titleKey: e.titleKey,
27
+ value: e.value,
28
+ valueClassName: e.valueClassName,
29
+ icon: e.icon,
30
+ iconClassName: e.iconClassName,
31
+ description: e.description,
32
+ descriptionClassName: e.descriptionClassName,
33
+ onClick: e.onClick
34
+ },
35
+ e.titleKey
36
+ )) }), v = {
37
+ blue: "from-blue-500 to-cyan-500",
38
+ green: "from-green-500 to-emerald-500",
39
+ orange: "from-orange-500 to-yellow-500",
40
+ red: "from-red-500 to-pink-500",
41
+ purple: "from-purple-500 to-indigo-500"
42
+ }, C = (t) => t === "up" ? "↗" : t === "down" ? "↘" : "→", w = (t) => t === "up" ? "text-green-600" : t === "down" ? "text-red-600" : "text-muted-foreground", E = ({ title: t, value: e, unit: i, icon: d, trend: s, trendValue: l, color: c = "blue", children: a }) => /* @__PURE__ */ o(m, { className: "relative overflow-hidden bg-card border shadow-lg hover:shadow-xl transition-all duration-300", children: [
43
+ /* @__PURE__ */ r("div", { className: "absolute inset-0 bg-white/5" }),
44
+ /* @__PURE__ */ o(u, { className: "flex flex-row items-center justify-between space-y-0 pb-2 relative z-10", children: [
45
+ /* @__PURE__ */ r(f, { className: "text-sm font-medium text-muted-foreground", children: t }),
46
+ /* @__PURE__ */ r("div", { className: `p-2 rounded-lg bg-gradient-to-br ${v[c]} shadow-lg`, children: /* @__PURE__ */ r(d, { className: "h-4 w-4 text-white" }) })
47
+ ] }),
48
+ /* @__PURE__ */ o(p, { className: "relative z-10", children: [
49
+ /* @__PURE__ */ o("div", { className: "flex items-baseline space-x-2", children: [
50
+ /* @__PURE__ */ r("div", { className: "text-2xl font-bold text-card-foreground", children: typeof e == "number" ? e.toFixed(1) : e }),
51
+ i && /* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground font-medium", children: i })
52
+ ] }),
53
+ s && l && /* @__PURE__ */ o("div", { className: `flex items-center space-x-1 mt-2 text-xs ${w(s)}`, children: [
54
+ /* @__PURE__ */ r("span", { children: C(s) }),
55
+ /* @__PURE__ */ r("span", { children: l })
56
+ ] }),
57
+ a && /* @__PURE__ */ r("div", { className: "mt-4", children: a })
58
+ ] })
59
+ ] });
60
+ export {
61
+ b as K,
62
+ E as M,
63
+ $ as a
64
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
2
  import { B as m } from "./index-BQOmHRsD.js";
3
- import { S as h, f as u, g, a as f, c as v } from "./select-CdiR6cO0.js";
3
+ import { S as h, f as u, g, a as f, c as v } from "./select-Dv9bdUCB.js";
4
4
  import { T as b, a as N, b as S, c as x } from "./tooltip-Dep8OR3c.js";
5
5
  import { u as C } from "./useTheme-D__o7mLN.js";
6
6
  function j({ themeOptions: c, variant: t = "select" }) {