@krosoft/react 0.0.145 → 0.0.147
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.
- package/dist/{KpiCardsLayout-jXgAbHNB.js → KpiCardsLayout-CK1TEUc1.js} +1 -1
- package/dist/SkeletonCards-qHukR79N.js +74 -0
- package/dist/components/core/cards/KpiCard.d.ts +1 -1
- package/dist/components/core/cards/KpiCard.d.ts.map +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/index.js +2 -2
- package/dist/components/core/layouts/index.js +1 -1
- package/dist/components/index.js +2 -2
- package/package.json +3 -3
- package/dist/SkeletonCards-0NJcJ-6S.js +0 -74
|
@@ -18,7 +18,7 @@ import { A as u } from "./AppTitle-uboDuil4.js";
|
|
|
18
18
|
import { u as d } from "./useDocumentTitle-WNwdPz-I.js";
|
|
19
19
|
import { useTranslation as x } from "react-i18next";
|
|
20
20
|
import "@krosoft/core/helpers";
|
|
21
|
-
import { b as g, a as h } from "./SkeletonCards-
|
|
21
|
+
import { b as g, a as h } from "./SkeletonCards-qHukR79N.js";
|
|
22
22
|
import { E as A } from "./ErrorState-vU8d4CwD.js";
|
|
23
23
|
function M({
|
|
24
24
|
icon: e,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as o } from "react/jsx-runtime";
|
|
2
|
+
import { formatNumber as g } from "@krosoft/core/helpers";
|
|
3
|
+
import { useTranslation as b } from "react-i18next";
|
|
4
|
+
import { c as m } from "./tailwind.helper-B6yFEsav.js";
|
|
5
|
+
import { J as c, N as p, O as v, K as N } from "./toggle-group-BASGy2mQ.js";
|
|
6
|
+
import "./alert-B78CiTYe.js";
|
|
7
|
+
import "@radix-ui/react-aspect-ratio";
|
|
8
|
+
import "./tooltip-BWyFpIxo.js";
|
|
9
|
+
import "@radix-ui/react-collapsible";
|
|
10
|
+
import "./sheet-Gop1cIaU.js";
|
|
11
|
+
import "lucide-react";
|
|
12
|
+
import "react-resizable-panels";
|
|
13
|
+
import "./select-MWzbMBAS.js";
|
|
14
|
+
import { S as n } from "./skeleton-8o8eJd3P.js";
|
|
15
|
+
import "next-themes";
|
|
16
|
+
import "sonner";
|
|
17
|
+
import "react";
|
|
18
|
+
const y = ({
|
|
19
|
+
titleKey: a,
|
|
20
|
+
value: i,
|
|
21
|
+
valueClassName: t,
|
|
22
|
+
icon: r,
|
|
23
|
+
iconClassName: h,
|
|
24
|
+
description: u,
|
|
25
|
+
descriptionClassName: f,
|
|
26
|
+
onClick: d,
|
|
27
|
+
isLoading: x,
|
|
28
|
+
error: l
|
|
29
|
+
}) => {
|
|
30
|
+
const { t: C } = b();
|
|
31
|
+
return /* @__PURE__ */ s(c, { className: m(d !== void 0 ? "hover:border-primary cursor-pointer" : ""), onClick: d, children: [
|
|
32
|
+
/* @__PURE__ */ s(p, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
33
|
+
/* @__PURE__ */ e(v, { className: "text-sm font-medium", children: C(a) }),
|
|
34
|
+
/* @__PURE__ */ e(r, { className: m("size-6 text-muted-foreground", h) })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ e(N, { children: x ? /* @__PURE__ */ s(o, { children: [
|
|
37
|
+
/* @__PURE__ */ e(n, { className: "h-8 w-24 mb-1" }),
|
|
38
|
+
/* @__PURE__ */ e(n, { className: "h-3 w-32" })
|
|
39
|
+
] }) : l ? /* @__PURE__ */ s(o, { children: [
|
|
40
|
+
/* @__PURE__ */ e("div", { className: "text-2xl font-bold text-destructive", children: "—" }),
|
|
41
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-destructive", children: l })
|
|
42
|
+
] }) : /* @__PURE__ */ s(o, { children: [
|
|
43
|
+
/* @__PURE__ */ e("div", { className: m("text-2xl font-bold", t), children: typeof i == "number" ? g(i) : i instanceof Date ? i.toLocaleDateString() : i }),
|
|
44
|
+
/* @__PURE__ */ e("p", { className: m("text-xs text-muted-foreground", f), children: u })
|
|
45
|
+
] }) })
|
|
46
|
+
] });
|
|
47
|
+
}, E = ({ stats: a, isLoading: i, error: t }) => /* @__PURE__ */ e("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: a.map((r) => /* @__PURE__ */ e(
|
|
48
|
+
y,
|
|
49
|
+
{
|
|
50
|
+
titleKey: r.titleKey,
|
|
51
|
+
value: r.value,
|
|
52
|
+
valueClassName: r.valueClassName,
|
|
53
|
+
icon: r.icon,
|
|
54
|
+
iconClassName: r.iconClassName,
|
|
55
|
+
description: r.description,
|
|
56
|
+
descriptionClassName: r.descriptionClassName,
|
|
57
|
+
onClick: r.onClick,
|
|
58
|
+
isLoading: i,
|
|
59
|
+
error: t
|
|
60
|
+
},
|
|
61
|
+
r.titleKey
|
|
62
|
+
)) }), K = () => /* @__PURE__ */ s(c, { className: "animate-pulse", children: [
|
|
63
|
+
/* @__PURE__ */ e(p, { children: /* @__PURE__ */ e("div", { className: "h-6 bg-muted rounded w-1/4" }) }),
|
|
64
|
+
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
65
|
+
/* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded" }),
|
|
66
|
+
/* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded w-3/4" })
|
|
67
|
+
] }) })
|
|
68
|
+
] }), G = ({ count: a = 1 }) => /* @__PURE__ */ e("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` }, children: Array.from({ length: a }).map((i, t) => /* @__PURE__ */ e(K, {}, t)) });
|
|
69
|
+
export {
|
|
70
|
+
y as K,
|
|
71
|
+
K as S,
|
|
72
|
+
E as a,
|
|
73
|
+
G as b
|
|
74
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KpiCard.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/KpiCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"KpiCard.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/KpiCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,OAAO,GAAI,+HAWrB,YAAY,KAAG,KAAK,CAAC,YA+BvB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as s, M as d } from "../../../MetricCard-D-qPl6zh.js";
|
|
2
|
-
import { K as o, a as C, S as t, b as p } from "../../../SkeletonCards-
|
|
2
|
+
import { K as o, a as C, S as t, b as p } from "../../../SkeletonCards-qHukR79N.js";
|
|
3
3
|
export {
|
|
4
4
|
s as DashboardCard,
|
|
5
5
|
o as KpiCard,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as r, M as o } from "../../MetricCard-D-qPl6zh.js";
|
|
2
|
-
import { K as t, a as i, S as l, b as p } from "../../SkeletonCards-
|
|
2
|
+
import { K as t, a as i, S as l, b as p } from "../../SkeletonCards-qHukR79N.js";
|
|
3
3
|
import { A as m, C as d, F as g } from "../../ConfirmationDialog-DJcxTNTk.js";
|
|
4
4
|
import { D as A, a as D, b as T, c as n, d as c, e as x, f as S, g as C, h as F, i as P, P as h } from "../../toggle-group-BASGy2mQ.js";
|
|
5
5
|
import { A as k, a as H, F as I, S as K, T as v } from "../../TableFilter-rjiss-d9.js";
|
|
@@ -8,7 +8,7 @@ import { I as L } from "../../ImageInput-CJ419eqw.js";
|
|
|
8
8
|
import { D as G, a as N, S as O, b as R } from "../../SearchInput-T9TeORNA.js";
|
|
9
9
|
import { M as j } from "../../MultiSelect-DblSHEsg.js";
|
|
10
10
|
import { A as w } from "../../AppActions-DCaejx-3.js";
|
|
11
|
-
import { A as J, K as Q } from "../../KpiCardsLayout-
|
|
11
|
+
import { A as J, K as Q } from "../../KpiCardsLayout-CK1TEUc1.js";
|
|
12
12
|
import { A as W } from "../../AppSubTitle-BNd5_q0i.js";
|
|
13
13
|
import { A as Y } from "../../AppTitle-uboDuil4.js";
|
|
14
14
|
import { S as _, a as $, b as aa, T as ea } from "../../Topbar-DMyjbOTI.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as r } from "../../../AppActions-DCaejx-3.js";
|
|
2
|
-
import { A as e, K as A } from "../../../KpiCardsLayout-
|
|
2
|
+
import { A as e, K as A } from "../../../KpiCardsLayout-CK1TEUc1.js";
|
|
3
3
|
import { A as s } from "../../../AppSubTitle-BNd5_q0i.js";
|
|
4
4
|
import { A as i } from "../../../AppTitle-uboDuil4.js";
|
|
5
5
|
export {
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as o, M as r } from "../MetricCard-D-qPl6zh.js";
|
|
2
|
-
import { K as t, a as n, S as i, b as l } from "../SkeletonCards-
|
|
2
|
+
import { K as t, a as n, S as i, b as l } from "../SkeletonCards-qHukR79N.js";
|
|
3
3
|
import { A as p, C as u, F as g } from "../ConfirmationDialog-DJcxTNTk.js";
|
|
4
4
|
import { A as m, j as C, k as S, l as T, m as c, n as D, o as M, p as x, q as A, r as I, s as P, t as h, u as f, v as w, w as v, x as F, B as L, y as B, z as G, C as H, E as R, F as k, G as N, H as y, I as E, J as O, K as V, L as K, M as z, N as U, O as j, Q as q, R as J, S as Q, T as W, U as X, V as Y, W as Z, X as _, Y as $, Z as aa, _ as ea, $ as oa, a0 as ra, a1 as sa, a2 as ta, a3 as na, a4 as ia, a5 as la, a6 as ba, a7 as pa, a8 as ua, a9 as ga, aa as da, ab as ma, ac as Ca, ad as Sa, ae as Ta, af as ca, ag as Da, ah as Ma, ai as xa, aj as Aa, ak as Ia, al as Pa, am as ha, an as fa, D as wa, a as va, b as Fa, c as La, d as Ba, e as Ga, f as Ha, g as Ra, h as ka, i as Na, ao as ya, ap as Ea, aq as Oa, ar as Va, as as Ka, at as za, au as Ua, av as ja, aw as qa, ax as Ja, ay as Qa, az as Wa, aA as Xa, aB as Ya, aC as Za, aD as _a, aE as $a, aF as ae, aG as ee, aH as oe, aI as re, aJ as se, aK as te, aL as ne, aM as ie, aN as le, aO as be, aP as pe, aQ as ue, aR as ge, aS as de, aT as me, aU as Ce, aV as Se, aW as Te, aX as ce, aY as De, aZ as Me, a_ as xe, a$ as Ae, b0 as Ie, b1 as Pe, b2 as he, b3 as fe, b4 as we, b5 as ve, b6 as Fe, b7 as Le, b8 as Be, b9 as Ge, ba as He, bb as Re, bc as ke, bd as Ne, be as ye, bf as Ee, bg as Oe, bh as Ve, bi as Ke, bj as ze, bk as Ue, bl as je, bm as qe, bn as Je, bo as Qe, bp as We, bq as Xe, br as Ye, bs as Ze, bt as _e, bu as $e, bv as ao, bw as eo, bx as oo, P as ro, by as so, bz as to, bA as no, bB as io, bC as lo, bD as bo, bE as po, bF as uo, bG as go, bH as mo, bI as Co, bJ as So, bK as To, bL as co, bM as Do, bN as Mo, bO as xo, bP as Ao, bQ as Io, bR as Po, bS as ho, bT as fo, bU as wo, bV as vo, bW as Fo, bX as Lo, bY as Bo, bZ as Go, b_ as Ho, b$ as Ro, c0 as ko, c1 as No, c2 as yo, c3 as Eo } from "../toggle-group-BASGy2mQ.js";
|
|
5
5
|
import { A as Vo, a as Ko, F as zo, S as Uo, T as jo } from "../TableFilter-rjiss-d9.js";
|
|
@@ -8,7 +8,7 @@ import { I as Wo } from "../ImageInput-CJ419eqw.js";
|
|
|
8
8
|
import { D as Yo, a as Zo, S as _o, b as $o } from "../SearchInput-T9TeORNA.js";
|
|
9
9
|
import { M as er } from "../MultiSelect-DblSHEsg.js";
|
|
10
10
|
import { A as rr } from "../AppActions-DCaejx-3.js";
|
|
11
|
-
import { A as tr, K as nr } from "../KpiCardsLayout-
|
|
11
|
+
import { A as tr, K as nr } from "../KpiCardsLayout-CK1TEUc1.js";
|
|
12
12
|
import { A as lr } from "../AppSubTitle-BNd5_q0i.js";
|
|
13
13
|
import { A as pr } from "../AppTitle-uboDuil4.js";
|
|
14
14
|
import { S as gr, a as dr, b as mr, T as Cr } from "../Topbar-DMyjbOTI.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krosoft/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.147",
|
|
4
4
|
"description": "Krosoft shared React package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"react-day-picker": "^10.0.1",
|
|
84
84
|
"react-hook-form": "^7.80.0",
|
|
85
85
|
"react-resizable-panels": "^4.11.2",
|
|
86
|
-
"recharts": "^3.
|
|
86
|
+
"recharts": "^3.9.0",
|
|
87
87
|
"sonner": "^2.0.7",
|
|
88
88
|
"tailwind-merge": "^2.6.1",
|
|
89
89
|
"vaul": "^1.1.2",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@types/node": "^25.9.4",
|
|
103
103
|
"@types/react": "^19.2.17",
|
|
104
104
|
"@types/react-dom": "^19.2.3",
|
|
105
|
-
"autoprefixer": "^10.5.
|
|
105
|
+
"autoprefixer": "^10.5.2",
|
|
106
106
|
"eslint-plugin-storybook": "10.4.6",
|
|
107
107
|
"jsdom": "^29.1.1",
|
|
108
108
|
"next-themes": "^0.4.6",
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e, Fragment as l } from "react/jsx-runtime";
|
|
2
|
-
import { formatNumber as v } from "@krosoft/core/helpers";
|
|
3
|
-
import { useTranslation as g } from "react-i18next";
|
|
4
|
-
import { c as t } from "./tailwind.helper-B6yFEsav.js";
|
|
5
|
-
import { J as n, N as p, O as b, K as u } from "./toggle-group-BASGy2mQ.js";
|
|
6
|
-
import "./alert-B78CiTYe.js";
|
|
7
|
-
import "@radix-ui/react-aspect-ratio";
|
|
8
|
-
import "./tooltip-BWyFpIxo.js";
|
|
9
|
-
import "@radix-ui/react-collapsible";
|
|
10
|
-
import "./sheet-Gop1cIaU.js";
|
|
11
|
-
import "lucide-react";
|
|
12
|
-
import "react-resizable-panels";
|
|
13
|
-
import "./select-MWzbMBAS.js";
|
|
14
|
-
import { S as c } from "./skeleton-8o8eJd3P.js";
|
|
15
|
-
import "next-themes";
|
|
16
|
-
import "sonner";
|
|
17
|
-
import "react";
|
|
18
|
-
const y = ({
|
|
19
|
-
titleKey: a,
|
|
20
|
-
value: m,
|
|
21
|
-
valueClassName: i,
|
|
22
|
-
icon: r,
|
|
23
|
-
iconClassName: N,
|
|
24
|
-
description: h,
|
|
25
|
-
descriptionClassName: x,
|
|
26
|
-
onClick: o,
|
|
27
|
-
isLoading: f,
|
|
28
|
-
error: d
|
|
29
|
-
}) => {
|
|
30
|
-
const { t: C } = g();
|
|
31
|
-
return /* @__PURE__ */ s(n, { className: t(o !== void 0 ? "hover:border-primary cursor-pointer" : ""), onClick: o, children: [
|
|
32
|
-
/* @__PURE__ */ s(p, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
33
|
-
/* @__PURE__ */ e(b, { className: "text-sm font-medium", children: C(a) }),
|
|
34
|
-
/* @__PURE__ */ e(r, { className: t("size-6 text-muted-foreground", N) })
|
|
35
|
-
] }),
|
|
36
|
-
/* @__PURE__ */ e(u, { children: f ? /* @__PURE__ */ s(l, { children: [
|
|
37
|
-
/* @__PURE__ */ e(c, { className: "h-8 w-24 mb-1" }),
|
|
38
|
-
/* @__PURE__ */ e(c, { className: "h-3 w-32" })
|
|
39
|
-
] }) : d ? /* @__PURE__ */ s(l, { children: [
|
|
40
|
-
/* @__PURE__ */ e("div", { className: "text-2xl font-bold text-destructive", children: "—" }),
|
|
41
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-destructive", children: d })
|
|
42
|
-
] }) : /* @__PURE__ */ s(l, { children: [
|
|
43
|
-
/* @__PURE__ */ e("div", { className: t("text-2xl font-bold", i), children: v(m) }),
|
|
44
|
-
/* @__PURE__ */ e("p", { className: t("text-xs text-muted-foreground", x), children: h })
|
|
45
|
-
] }) })
|
|
46
|
-
] });
|
|
47
|
-
}, G = ({ stats: a, isLoading: m, error: i }) => /* @__PURE__ */ e("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: a.map((r) => /* @__PURE__ */ e(
|
|
48
|
-
y,
|
|
49
|
-
{
|
|
50
|
-
titleKey: r.titleKey,
|
|
51
|
-
value: r.value,
|
|
52
|
-
valueClassName: r.valueClassName,
|
|
53
|
-
icon: r.icon,
|
|
54
|
-
iconClassName: r.iconClassName,
|
|
55
|
-
description: r.description,
|
|
56
|
-
descriptionClassName: r.descriptionClassName,
|
|
57
|
-
onClick: r.onClick,
|
|
58
|
-
isLoading: m,
|
|
59
|
-
error: i
|
|
60
|
-
},
|
|
61
|
-
r.titleKey
|
|
62
|
-
)) }), K = () => /* @__PURE__ */ s(n, { className: "animate-pulse", children: [
|
|
63
|
-
/* @__PURE__ */ e(p, { children: /* @__PURE__ */ e("div", { className: "h-6 bg-muted rounded w-1/4" }) }),
|
|
64
|
-
/* @__PURE__ */ e(u, { children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
65
|
-
/* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded" }),
|
|
66
|
-
/* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded w-3/4" })
|
|
67
|
-
] }) })
|
|
68
|
-
] }), I = ({ count: a = 1 }) => /* @__PURE__ */ e("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` }, children: Array.from({ length: a }).map((m, i) => /* @__PURE__ */ e(K, {}, i)) });
|
|
69
|
-
export {
|
|
70
|
-
y as K,
|
|
71
|
-
K as S,
|
|
72
|
-
G as a,
|
|
73
|
-
I as b
|
|
74
|
-
};
|