@krosoft/react 0.0.182 → 0.0.184
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/{AppActions-DEkRxBia.js → AppActions-DZ7wVdmt.js} +8 -7
- package/dist/{AppSubTitle-ChCtQ7Sv.js → AppSubTitle-CZN_tmfv.js} +1 -1
- package/dist/AppVerticalTabs-C1SsBNAH.js +100 -0
- package/dist/{ConfirmationDialog-BPXA2g3g.js → ConfirmationDialog-M8sFAz4h.js} +7 -6
- package/dist/{DataTable-ny08K506.js → DataTable-KMYbhJ4C.js} +29 -28
- package/dist/{GenericForm-B39toMkE.js → GenericForm-DtY0moOD.js} +93 -92
- package/dist/{ImageInput-BoYUZx9H.js → ImageInput-3wZuCZGf.js} +2 -1
- package/dist/{KpiCardsLayout-mQ7AcbqA.js → KpiCardsLayout-DjRTqXFa.js} +16 -15
- package/dist/{MetricCard-CvQFjIOb.js → MetricCard-B0xnFyim.js} +1 -1
- package/dist/{MultiSelect-CqcbwKYV.js → MultiSelect-BhRXVpky.js} +14 -13
- package/dist/PieChart-C9gn0Dws.js +282 -0
- package/dist/SearchInput-BXOlvTO9.js +251 -0
- package/dist/{SkeletonCards-BvJYF_LK.js → SkeletonCards-av7XHlof.js} +12 -11
- package/dist/{TableFilter-CWDy_RHA.js → TableFilter-BlrrSOtg.js} +21 -20
- package/dist/chart-DntJZGxB.js +181 -0
- package/dist/components/core/cards/index.js +2 -2
- package/dist/components/core/charts/BarChartHorizontal.d.ts +24 -0
- package/dist/components/core/charts/BarChartHorizontal.d.ts.map +1 -0
- package/dist/components/core/charts/BarChartVertical.d.ts +24 -0
- package/dist/components/core/charts/BarChartVertical.d.ts.map +1 -0
- package/dist/components/core/charts/ChartCard.d.ts +31 -0
- package/dist/components/core/charts/ChartCard.d.ts.map +1 -0
- package/dist/components/core/charts/CircularGauge.d.ts +39 -0
- package/dist/components/core/charts/CircularGauge.d.ts.map +1 -0
- package/dist/components/core/charts/LineChart.d.ts +23 -0
- package/dist/components/core/charts/LineChart.d.ts.map +1 -0
- package/dist/components/core/charts/PieChart.d.ts +26 -0
- package/dist/components/core/charts/PieChart.d.ts.map +1 -0
- package/dist/components/core/charts/chartColors.d.ts +13 -0
- package/dist/components/core/charts/chartColors.d.ts.map +1 -0
- package/dist/components/core/charts/chartTooltip.helper.d.ts +14 -0
- package/dist/components/core/charts/chartTooltip.helper.d.ts.map +1 -0
- package/dist/components/core/charts/index.d.ts +14 -0
- package/dist/components/core/charts/index.d.ts.map +1 -0
- package/dist/components/core/charts/index.js +11 -0
- package/dist/components/core/dialogs/index.js +2 -2
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +80 -71
- package/dist/components/core/inputs/SearchableSelect.d.ts +16 -2
- package/dist/components/core/inputs/SearchableSelect.d.ts.map +1 -1
- package/dist/components/core/inputs/index.d.ts +1 -0
- package/dist/components/core/inputs/index.d.ts.map +1 -1
- package/dist/components/core/inputs/index.js +3 -3
- package/dist/components/core/layouts/index.js +3 -3
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/core/tabs/AppTabs.d.ts.map +1 -1
- package/dist/components/core/tabs/index.js +1 -1
- package/dist/components/index.js +307 -297
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +218 -217
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/hooks/index.js +9 -7
- package/dist/hooks/ui/index.d.ts +1 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/index.js +11 -9
- package/dist/hooks/ui/useScrollFade.d.ts +11 -0
- package/dist/hooks/ui/useScrollFade.d.ts.map +1 -0
- package/dist/tailwind/index.d.ts +7 -0
- package/dist/tailwind/index.d.ts.map +1 -1
- package/dist/tailwind/index.js +11 -2
- package/dist/{toaster-B6XKMRwI.js → toaster-Cm7utXqi.js} +13 -13
- package/dist/toggle-group-D6aFQQcf.js +1460 -0
- package/dist/types/ChartDatum.d.ts +19 -0
- package/dist/types/ChartDatum.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/useScrollFade-BA4KqJYp.js +23 -0
- package/package.json +1 -1
- package/dist/AppVerticalTabs-D8fURUUN.js +0 -94
- package/dist/SearchInput-ClZbbRWg.js +0 -254
- package/dist/toggle-group-D6c-gM1D.js +0 -1618
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { a as
|
|
4
|
-
import { B as
|
|
2
|
+
import { useState as k, useEffect as j, useMemo as A } from "react";
|
|
3
|
+
import { a as D, D as M, b as I, S as $ } from "./SearchInput-BXOlvTO9.js";
|
|
4
|
+
import { B as w, aP as z, bj as B, bl as R, bk as Q, O as C } from "./toggle-group-D6aFQQcf.js";
|
|
5
5
|
import "./alert-B9F1N9Qk.js";
|
|
6
6
|
import "@radix-ui/react-aspect-ratio";
|
|
7
|
-
import { B as
|
|
7
|
+
import { B as F, e as V } from "./tooltip-DVeqVwqV.js";
|
|
8
|
+
import "./chart-DntJZGxB.js";
|
|
8
9
|
import "@radix-ui/react-collapsible";
|
|
9
10
|
import { I as P, S as _, i as H, b as X, e as G, h as J, d as K } from "./sheet-B_uq6-K_.js";
|
|
10
11
|
import { XIcon as E, Filter as U, ChevronDown as W, Search as Y } from "lucide-react";
|
|
@@ -15,7 +16,7 @@ import { S as Z, h as q, i as ee, a as re, c as te } from "./select-BpjFWqAY.js"
|
|
|
15
16
|
import "next-themes";
|
|
16
17
|
import "sonner";
|
|
17
18
|
import { c as T } from "./tailwind.helper-B6yFEsav.js";
|
|
18
|
-
import { M as le } from "./MultiSelect-
|
|
19
|
+
import { M as le } from "./MultiSelect-BhRXVpky.js";
|
|
19
20
|
const L = (a, n, c = {}) => {
|
|
20
21
|
if (n instanceof Date)
|
|
21
22
|
return n.toLocaleDateString("fr-FR");
|
|
@@ -32,7 +33,7 @@ function ae({ filters: a, onRemoveFilter: n, onClearAll: c, filterLabels: i = {}
|
|
|
32
33
|
return m.map((x) => {
|
|
33
34
|
const p = L(h, x, d);
|
|
34
35
|
return /* @__PURE__ */ u(
|
|
35
|
-
|
|
36
|
+
w,
|
|
36
37
|
{
|
|
37
38
|
variant: "secondary",
|
|
38
39
|
className: "flex items-center gap-1 px-3 py-1 bg-blue-50 text-blue-700 border border-blue-200 hover:bg-blue-100",
|
|
@@ -56,7 +57,7 @@ function ae({ filters: a, onRemoveFilter: n, onClearAll: c, filterLabels: i = {}
|
|
|
56
57
|
);
|
|
57
58
|
});
|
|
58
59
|
const g = L(h, m, d);
|
|
59
|
-
return /* @__PURE__ */ u(
|
|
60
|
+
return /* @__PURE__ */ u(w, { variant: "secondary", className: "flex items-center gap-1 px-3 py-1 bg-blue-50 text-blue-700 border border-blue-200 hover:bg-blue-100", children: [
|
|
60
61
|
b,
|
|
61
62
|
": ",
|
|
62
63
|
g,
|
|
@@ -110,7 +111,7 @@ const se = ({
|
|
|
110
111
|
);
|
|
111
112
|
case "select":
|
|
112
113
|
return a.searchable === !0 ? /* @__PURE__ */ r(
|
|
113
|
-
|
|
114
|
+
I,
|
|
114
115
|
{
|
|
115
116
|
options: a.options ?? [],
|
|
116
117
|
value: n,
|
|
@@ -123,9 +124,9 @@ const se = ({
|
|
|
123
124
|
/* @__PURE__ */ r(re, { children: (d = a.options) == null ? void 0 : d.map((o) => /* @__PURE__ */ r(te, { value: o.value, children: o.label }, o.value)) })
|
|
124
125
|
] });
|
|
125
126
|
case "date":
|
|
126
|
-
return /* @__PURE__ */ r(
|
|
127
|
+
return /* @__PURE__ */ r(M, { date: n, onDateChange: c, placeholder: a.placeholder ?? "Sélectionner une date" });
|
|
127
128
|
case "date-range":
|
|
128
|
-
return /* @__PURE__ */ r(
|
|
129
|
+
return /* @__PURE__ */ r(D, { value: n, onChange: c, placeholder: a.placeholder });
|
|
129
130
|
case "multi-select":
|
|
130
131
|
return /* @__PURE__ */ r(
|
|
131
132
|
le,
|
|
@@ -153,8 +154,8 @@ function ce({
|
|
|
153
154
|
buttonText: i = "Plus de filtres",
|
|
154
155
|
sheetTitle: d = "Filtres avancés"
|
|
155
156
|
}) {
|
|
156
|
-
const [o, h] =
|
|
157
|
-
|
|
157
|
+
const [o, h] = k(!1), [m, b] = k(n);
|
|
158
|
+
j(() => {
|
|
158
159
|
b(n);
|
|
159
160
|
}, [n, o]);
|
|
160
161
|
const g = (l, e) => {
|
|
@@ -171,7 +172,7 @@ function ce({
|
|
|
171
172
|
return Object.entries(n).filter(([e, t]) => l.has(e) && ne(t)).length;
|
|
172
173
|
}, [a, n]);
|
|
173
174
|
return /* @__PURE__ */ u(_, { open: o, onOpenChange: h, children: [
|
|
174
|
-
/* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */ u(
|
|
175
|
+
/* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */ u(F, { variant: "outline", className: "gap-2", children: [
|
|
175
176
|
/* @__PURE__ */ r(U, { className: "size-4 shrink-0" }),
|
|
176
177
|
i,
|
|
177
178
|
v > 0 && /* @__PURE__ */ r("span", { className: "ml-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-xs font-semibold text-primary-foreground", children: v })
|
|
@@ -198,8 +199,8 @@ function ce({
|
|
|
198
199
|
] }, t.key))
|
|
199
200
|
] }, e)) }) }),
|
|
200
201
|
/* @__PURE__ */ u(K, { className: "gap-2 p-6 border-t bg-white dark:bg-gray-950", children: [
|
|
201
|
-
/* @__PURE__ */ r(
|
|
202
|
-
/* @__PURE__ */ r(
|
|
202
|
+
/* @__PURE__ */ r(F, { variant: "outline", className: "flex-1", onClick: y, children: "Effacer les filtres" }),
|
|
203
|
+
/* @__PURE__ */ r(F, { className: "flex-1 bg-orange-500 hover:bg-orange-600 text-white", onClick: p, children: "Rechercher" })
|
|
203
204
|
] })
|
|
204
205
|
] })
|
|
205
206
|
] });
|
|
@@ -214,7 +215,7 @@ function oe({
|
|
|
214
215
|
searchable: h = !1,
|
|
215
216
|
searchPlaceholder: m = "Rechercher..."
|
|
216
217
|
}) {
|
|
217
|
-
const [b, g] =
|
|
218
|
+
const [b, g] = k(""), x = c.length > 0, p = A(() => b === "" ? n : n.filter((l) => l.label.toLowerCase().includes(b.toLowerCase())), [n, b]), y = A(() => p.length === 0 ? !1 : p.every((l) => c.includes(l.value)), [p, c]), v = () => {
|
|
218
219
|
if (y)
|
|
219
220
|
if (o !== void 0) {
|
|
220
221
|
const l = p.map((t) => t.value), e = c.filter((t) => !l.includes(t));
|
|
@@ -307,7 +308,7 @@ function oe({
|
|
|
307
308
|
}
|
|
308
309
|
);
|
|
309
310
|
}
|
|
310
|
-
function
|
|
311
|
+
function Pe({
|
|
311
312
|
searchQuery: a,
|
|
312
313
|
onSearchChange: n,
|
|
313
314
|
searchPlaceholder: c = "Rechercher...",
|
|
@@ -318,7 +319,7 @@ function Ce({
|
|
|
318
319
|
sheetTitle: m = "Filtres avancés"
|
|
319
320
|
}) {
|
|
320
321
|
const b = (e, t) => {
|
|
321
|
-
const s = i[e], f = Array.isArray(s) ? s : [], N = f.includes(t) ? f.filter((
|
|
322
|
+
const s = i[e], f = Array.isArray(s) ? s : [], N = f.includes(t) ? f.filter((O) => O !== t) : [...f, t], S = { ...i };
|
|
322
323
|
N.length === 0 ? delete S[e] : S[e] = N, d(S);
|
|
323
324
|
}, g = (e) => {
|
|
324
325
|
const t = { ...i };
|
|
@@ -362,7 +363,7 @@ function Ce({
|
|
|
362
363
|
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-3 justify-between", children: [
|
|
363
364
|
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
364
365
|
n !== void 0 ? /* @__PURE__ */ r(
|
|
365
|
-
|
|
366
|
+
$,
|
|
366
367
|
{
|
|
367
368
|
searchQuery: a,
|
|
368
369
|
onSearch: n,
|
|
@@ -411,6 +412,6 @@ export {
|
|
|
411
412
|
ae as A,
|
|
412
413
|
se as F,
|
|
413
414
|
oe as S,
|
|
414
|
-
|
|
415
|
+
Pe as T,
|
|
415
416
|
ce as a
|
|
416
417
|
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { jsx as n, jsxs as g, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { c } from "./tailwind.helper-B6yFEsav.js";
|
|
4
|
+
import * as _ from "recharts";
|
|
5
|
+
const P = l.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ n("div", { ref: r, className: c("rounded-surface border bg-card text-card-foreground shadow-sm", t), ...e }));
|
|
6
|
+
P.displayName = "Card";
|
|
7
|
+
const A = l.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ n("div", { ref: r, className: c("flex flex-col space-y-1.5 p-6", t), ...e }));
|
|
8
|
+
A.displayName = "CardHeader";
|
|
9
|
+
const H = l.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ n("h3", { ref: r, className: c("text-2xl font-semibold leading-none tracking-tight", t), ...e }));
|
|
10
|
+
H.displayName = "CardTitle";
|
|
11
|
+
const I = l.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ n("p", { ref: r, className: c("text-sm text-muted-foreground", t), ...e }));
|
|
12
|
+
I.displayName = "CardDescription";
|
|
13
|
+
const S = l.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ n("div", { ref: r, className: c("p-6 pt-0", t), ...e }));
|
|
14
|
+
S.displayName = "CardContent";
|
|
15
|
+
const E = l.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ n("div", { ref: r, className: c("flex items-center p-6 pt-0", t), ...e }));
|
|
16
|
+
E.displayName = "CardFooter";
|
|
17
|
+
const K = { light: "", dark: ".dark" }, y = l.createContext(null);
|
|
18
|
+
function j() {
|
|
19
|
+
const t = l.useContext(y);
|
|
20
|
+
if (!t)
|
|
21
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
22
|
+
return t;
|
|
23
|
+
}
|
|
24
|
+
const M = l.forwardRef(({ id: t, className: e, children: r, config: o, ...a }, m) => {
|
|
25
|
+
const i = l.useId(), d = `chart-${t || i.replace(/:/g, "")}`;
|
|
26
|
+
return /* @__PURE__ */ n(y.Provider, { value: { config: o }, children: /* @__PURE__ */ g(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
"data-chart": d,
|
|
30
|
+
ref: m,
|
|
31
|
+
className: c(
|
|
32
|
+
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
|
|
33
|
+
e
|
|
34
|
+
),
|
|
35
|
+
...a,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ n(D, { id: d, config: o }),
|
|
38
|
+
/* @__PURE__ */ n(_.ResponsiveContainer, { children: r })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
) });
|
|
42
|
+
});
|
|
43
|
+
M.displayName = "Chart";
|
|
44
|
+
const D = ({ id: t, config: e }) => {
|
|
45
|
+
const r = Object.entries(e).filter(([o, a]) => a.theme || a.color);
|
|
46
|
+
return r.length ? /* @__PURE__ */ n(
|
|
47
|
+
"style",
|
|
48
|
+
{
|
|
49
|
+
dangerouslySetInnerHTML: {
|
|
50
|
+
__html: Object.entries(K).map(
|
|
51
|
+
([o, a]) => `
|
|
52
|
+
${a} [data-chart=${t}] {
|
|
53
|
+
${r.map(([m, i]) => {
|
|
54
|
+
var h;
|
|
55
|
+
const d = ((h = i.theme) == null ? void 0 : h[o]) || i.color;
|
|
56
|
+
return d ? ` --color-${m}: ${d};` : null;
|
|
57
|
+
}).join(`
|
|
58
|
+
`)}
|
|
59
|
+
}
|
|
60
|
+
`
|
|
61
|
+
).join(`
|
|
62
|
+
`)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
) : null;
|
|
66
|
+
}, B = _.Tooltip, F = l.forwardRef(
|
|
67
|
+
({
|
|
68
|
+
active: t,
|
|
69
|
+
payload: e = [],
|
|
70
|
+
className: r,
|
|
71
|
+
indicator: o = "dot",
|
|
72
|
+
hideLabel: a = !1,
|
|
73
|
+
hideIndicator: m = !1,
|
|
74
|
+
label: i = "",
|
|
75
|
+
labelFormatter: d,
|
|
76
|
+
labelClassName: h,
|
|
77
|
+
formatter: f,
|
|
78
|
+
color: R,
|
|
79
|
+
nameKey: $,
|
|
80
|
+
labelKey: C
|
|
81
|
+
}, L) => {
|
|
82
|
+
const { config: x } = j(), k = l.useMemo(() => {
|
|
83
|
+
var v;
|
|
84
|
+
if (a || !(e != null && e.length))
|
|
85
|
+
return null;
|
|
86
|
+
const [s] = e, N = `${C || s.dataKey || s.name || "value"}`, p = w(x, s, N), u = !C && typeof i == "string" ? ((v = x[i]) == null ? void 0 : v.label) || i : p == null ? void 0 : p.label;
|
|
87
|
+
return d ? /* @__PURE__ */ n("div", { className: c("font-medium", h), children: d(u, e) }) : u ? /* @__PURE__ */ n("div", { className: c("font-medium", h), children: u }) : null;
|
|
88
|
+
}, [i, d, e, a, h, x, C]);
|
|
89
|
+
if (!t || !(e != null && e.length))
|
|
90
|
+
return null;
|
|
91
|
+
const b = e.length === 1 && o !== "dot";
|
|
92
|
+
return /* @__PURE__ */ g(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
ref: L,
|
|
96
|
+
className: c("grid min-w-[8rem] items-start gap-1.5 rounded-surface border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", r),
|
|
97
|
+
children: [
|
|
98
|
+
b ? null : k,
|
|
99
|
+
/* @__PURE__ */ n("div", { className: "grid gap-1.5", children: e.map((s, N) => {
|
|
100
|
+
const p = `${$ || s.name || s.dataKey || "value"}`, u = w(x, s, p), v = R || s.payload.fill || s.color;
|
|
101
|
+
return /* @__PURE__ */ n(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: c(
|
|
105
|
+
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
106
|
+
o === "dot" && "items-center"
|
|
107
|
+
),
|
|
108
|
+
children: f && (s == null ? void 0 : s.value) !== void 0 && s.name ? f(s.value, s.name, s, N, s.payload) : /* @__PURE__ */ g(T, { children: [
|
|
109
|
+
u != null && u.icon ? /* @__PURE__ */ n(u.icon, {}) : !m && /* @__PURE__ */ n(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: c("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
113
|
+
"h-2.5 w-2.5": o === "dot",
|
|
114
|
+
"w-1": o === "line",
|
|
115
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": o === "dashed",
|
|
116
|
+
"my-0.5": b && o === "dashed"
|
|
117
|
+
}),
|
|
118
|
+
style: {
|
|
119
|
+
"--color-bg": v,
|
|
120
|
+
"--color-border": v
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ g("div", { className: c("flex flex-1 justify-between leading-none", b ? "items-end" : "items-center"), children: [
|
|
125
|
+
/* @__PURE__ */ g("div", { className: "grid gap-1.5", children: [
|
|
126
|
+
b ? k : null,
|
|
127
|
+
/* @__PURE__ */ n("span", { className: "text-muted-foreground", children: (u == null ? void 0 : u.label) || s.name })
|
|
128
|
+
] }),
|
|
129
|
+
s.value && /* @__PURE__ */ n("span", { className: "font-mono font-medium tabular-nums text-foreground", children: s.value.toLocaleString() })
|
|
130
|
+
] })
|
|
131
|
+
] })
|
|
132
|
+
},
|
|
133
|
+
s.dataKey
|
|
134
|
+
);
|
|
135
|
+
}) })
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
F.displayName = "ChartTooltip";
|
|
142
|
+
const G = _.Legend, O = l.forwardRef(({ className: t, hideIcon: e = !1, payload: r, verticalAlign: o = "bottom", nameKey: a }, m) => {
|
|
143
|
+
const { config: i } = j();
|
|
144
|
+
return !r || !Array.isArray(r) || !r.length ? null : /* @__PURE__ */ n("div", { ref: m, className: c("flex items-center justify-center gap-4", o === "top" ? "pb-3" : "pt-3", t), children: Array.isArray(r) && r.map((d) => {
|
|
145
|
+
const h = `${a || d.dataKey || "value"}`, f = w(i, d, h);
|
|
146
|
+
return /* @__PURE__ */ g("div", { className: c("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"), children: [
|
|
147
|
+
f != null && f.icon && !e ? /* @__PURE__ */ n(f.icon, {}) : /* @__PURE__ */ n(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
151
|
+
style: {
|
|
152
|
+
backgroundColor: d.color
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
f == null ? void 0 : f.label
|
|
157
|
+
] }, d.value);
|
|
158
|
+
}) });
|
|
159
|
+
});
|
|
160
|
+
O.displayName = "ChartLegend";
|
|
161
|
+
function w(t, e, r) {
|
|
162
|
+
if (typeof e != "object" || e === null)
|
|
163
|
+
return;
|
|
164
|
+
const o = "payload" in e && typeof e.payload == "object" && e.payload !== null ? e.payload : void 0;
|
|
165
|
+
let a = r;
|
|
166
|
+
return r in e && typeof e[r] == "string" ? a = e[r] : o && r in o && typeof o[r] == "string" && (a = o[r]), a in t ? t[a] : t[r];
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
P as C,
|
|
170
|
+
S as a,
|
|
171
|
+
I as b,
|
|
172
|
+
E as c,
|
|
173
|
+
A as d,
|
|
174
|
+
H as e,
|
|
175
|
+
M as f,
|
|
176
|
+
G as g,
|
|
177
|
+
O as h,
|
|
178
|
+
D as i,
|
|
179
|
+
B as j,
|
|
180
|
+
F as k
|
|
181
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as s, M as d } from "../../../MetricCard-
|
|
2
|
-
import { K as o, a as C, S as t, b as p } from "../../../SkeletonCards-
|
|
1
|
+
import { D as s, M as d } from "../../../MetricCard-B0xnFyim.js";
|
|
2
|
+
import { K as o, a as C, S as t, b as p } from "../../../SkeletonCards-av7XHlof.js";
|
|
3
3
|
export {
|
|
4
4
|
s as DashboardCard,
|
|
5
5
|
o as KpiCard,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChartDatum } from "../../../types/ChartDatum";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface BarChartHorizontalProps {
|
|
4
|
+
data: ChartDatum[];
|
|
5
|
+
/** Libellé de la série dans le tooltip. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Couleur des barres. Par défaut la couleur primaire du thème. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Largeur réservée aux libellés de catégories, en pixels. */
|
|
10
|
+
categoryWidth?: number;
|
|
11
|
+
/** Longueur max d'un libellé avant troncature. `0` désactive la troncature. */
|
|
12
|
+
maxLabelLength?: number;
|
|
13
|
+
/** Mise en forme des valeurs sur l'axe et dans le tooltip (devise, pourcentage…). */
|
|
14
|
+
valueFormatter?: (value: number) => string;
|
|
15
|
+
/** Rend les barres cliquables. */
|
|
16
|
+
onSelect?: (datum: ChartDatum, index: number) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Barres horizontales, pour les classements « top N » où les libellés de
|
|
21
|
+
* catégories sont trop longs pour tenir sur un axe des abscisses.
|
|
22
|
+
*/
|
|
23
|
+
export declare const BarChartHorizontal: ({ data, label, color, categoryWidth, maxLabelLength, valueFormatter, onSelect, className, }: BarChartHorizontalProps) => React.JSX.Element;
|
|
24
|
+
//# sourceMappingURL=BarChartHorizontal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChartHorizontal.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/BarChartHorizontal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qFAAqF;IACrF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,6FAShC,uBAAuB,KAAG,KAAK,CAAC,GAAG,CAAC,OA0CtC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChartDatum } from "../../../types/ChartDatum";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface BarChartVerticalProps {
|
|
4
|
+
data: ChartDatum[];
|
|
5
|
+
/** Libellé de la série dans le tooltip. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Couleur des barres. Par défaut la couleur primaire du thème. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Inclinaison des libellés de l'axe des abscisses, en degrés (ex. `-45` quand ils se chevauchent). */
|
|
10
|
+
labelAngle?: number;
|
|
11
|
+
/** Mise en forme des valeurs sur l'axe et dans le tooltip (devise, pourcentage…). */
|
|
12
|
+
valueFormatter?: (value: number) => string;
|
|
13
|
+
/** Autorise les graduations décimales sur l'axe des ordonnées. */
|
|
14
|
+
allowDecimals?: boolean;
|
|
15
|
+
/** Rend les barres cliquables. */
|
|
16
|
+
onSelect?: (datum: ChartDatum, index: number) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Barres verticales, pour les séries ordonnées où l'axe des abscisses porte une
|
|
21
|
+
* progression lisible de gauche à droite — typiquement une répartition par mois.
|
|
22
|
+
*/
|
|
23
|
+
export declare const BarChartVertical: ({ data, label, color, labelAngle, valueFormatter, allowDecimals, onSelect, className, }: BarChartVerticalProps) => React.JSX.Element;
|
|
24
|
+
//# sourceMappingURL=BarChartVertical.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChartVertical.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/BarChartVertical.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uGAAuG;IACvG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,kEAAkE;IAClE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,yFAS9B,qBAAqB,KAAG,KAAK,CAAC,GAAG,CAAC,OA0CpC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ChartCardProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ElementType;
|
|
6
|
+
/** Contenu aligné à droite de l'en-tête : filtre de période, bascule détaillé/agrégé… */
|
|
7
|
+
actions?: React.ReactNode;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
isEmpty?: boolean;
|
|
10
|
+
emptyLabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Hauteur de la zone de rendu, en pixels. Appliquée en style inline et non en
|
|
13
|
+
* classe Tailwind : une classe arbitraire construite dynamiquement ne serait
|
|
14
|
+
* jamais générée dans le CSS du projet consommateur.
|
|
15
|
+
*/
|
|
16
|
+
height?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
contentClassName?: string;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Carte d'accueil d'un graphe : en-tête (titre, description, icône, actions) et
|
|
23
|
+
* zone de rendu à hauteur fixe qui gère elle-même les états de chargement et
|
|
24
|
+
* d'absence de données.
|
|
25
|
+
*
|
|
26
|
+
* Le graphe passé en `children` remplit la zone via `ChartContainer` en
|
|
27
|
+
* `aspect-auto h-full w-full` — la carte ne monte pas de `ResponsiveContainer`,
|
|
28
|
+
* c'est `ChartContainer` qui s'en charge.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ChartCard: ({ title, description, icon, actions, isLoading, isEmpty, emptyLabel, height, className, contentClassName, children, }: ChartCardProps) => React.JSX.Element;
|
|
31
|
+
//# sourceMappingURL=ChartCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartCard.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/ChartCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,yFAAyF;IACzF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,uHAYvB,cAAc,KAAG,KAAK,CAAC,GAAG,CAAC,OAwC7B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface CircularGaugeThresholds {
|
|
3
|
+
/** Pourcentage de remplissage à partir duquel la jauge passe en warning. */
|
|
4
|
+
warning: number;
|
|
5
|
+
/** Pourcentage de remplissage à partir duquel la jauge passe en destructive. */
|
|
6
|
+
danger: number;
|
|
7
|
+
}
|
|
8
|
+
export interface CircularGaugeProps {
|
|
9
|
+
value: number;
|
|
10
|
+
/** Valeur correspondant à une jauge pleine. */
|
|
11
|
+
max?: number;
|
|
12
|
+
/** Diamètre extérieur, en pixels. */
|
|
13
|
+
size?: number;
|
|
14
|
+
/** Épaisseur de l'anneau, en pixels. */
|
|
15
|
+
strokeWidth?: number;
|
|
16
|
+
/** Libellé sous la jauge. */
|
|
17
|
+
label?: string;
|
|
18
|
+
/** Unité affichée sous la valeur. */
|
|
19
|
+
unit?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Couleur fixe de l'anneau. À défaut, la couleur est déduite du taux de
|
|
22
|
+
* remplissage via `thresholds`.
|
|
23
|
+
*/
|
|
24
|
+
color?: string;
|
|
25
|
+
/** Seuils de bascule de couleur, ignorés si `color` est fourni. */
|
|
26
|
+
thresholds?: CircularGaugeThresholds;
|
|
27
|
+
/** Mise en forme de la valeur affichée au centre. Une décimale par défaut. */
|
|
28
|
+
valueFormatter?: (value: number) => string;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Jauge circulaire d'une valeur rapportée à un maximum, en SVG.
|
|
33
|
+
*
|
|
34
|
+
* Sans `color`, l'anneau vire au warning puis au destructive selon `thresholds` —
|
|
35
|
+
* pour un indicateur où monter est mauvais (CPU, mémoire, disque). Pour un
|
|
36
|
+
* indicateur neutre ou où monter est bon, passer une `color` explicite.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CircularGauge: ({ value, max, size, strokeWidth, label, unit, color, thresholds, valueFormatter, className, }: CircularGaugeProps) => React.JSX.Element;
|
|
39
|
+
//# sourceMappingURL=CircularGauge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircularGauge.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/CircularGauge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,uBAAuB;IACtC,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,8EAA8E;IAC9E,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,+FAW3B,kBAAkB,KAAG,KAAK,CAAC,GAAG,CAAC,OAiCjC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChartDatum } from "../../../types/ChartDatum";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface LineChartProps {
|
|
4
|
+
data: ChartDatum[];
|
|
5
|
+
/** Libellé de la série dans le tooltip. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Couleur de la courbe. Par défaut la couleur primaire du thème. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Bornes de l'axe des ordonnées, ex. `[0, 100]` pour un pourcentage. Auto par défaut. */
|
|
10
|
+
yAxisDomain?: [number, number];
|
|
11
|
+
/** Mise en forme des valeurs sur l'axe et dans le tooltip (devise, pourcentage…). */
|
|
12
|
+
valueFormatter?: (value: number) => string;
|
|
13
|
+
/** Mise en forme des libellés de l'axe des abscisses (date, heure…). */
|
|
14
|
+
labelFormatter?: (name: string) => string;
|
|
15
|
+
/** Points sur chaque valeur. À couper au-delà d'une cinquantaine de points. */
|
|
16
|
+
showDots?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Courbe d'évolution d'une série de valeurs dans le temps.
|
|
21
|
+
*/
|
|
22
|
+
export declare const LineChart: ({ data, label, color, yAxisDomain, valueFormatter, labelFormatter, showDots, className, }: LineChartProps) => React.JSX.Element;
|
|
23
|
+
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/LineChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,qFAAqF;IACrF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,wEAAwE;IACxE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,2FASvB,cAAc,KAAG,KAAK,CAAC,GAAG,CAAC,OAqC7B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChartDatum } from "../../../types/ChartDatum";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface PieChartProps {
|
|
4
|
+
data: ChartDatum[];
|
|
5
|
+
/** Rayon intérieur, en pixels. `0` donne un camembert plein. Par défaut un anneau, adapté au mobile. */
|
|
6
|
+
innerRadius?: number;
|
|
7
|
+
/** Rayon extérieur, en pixels. Par défaut adapté au mobile. */
|
|
8
|
+
outerRadius?: number;
|
|
9
|
+
/** Légende sous le graphe. */
|
|
10
|
+
showLegend?: boolean;
|
|
11
|
+
/** Libellés `nom (valeur)` posés à l'extérieur des parts. Illisible au-delà de 5 ou 6 parts. */
|
|
12
|
+
showLabels?: boolean;
|
|
13
|
+
/** Mise en forme des valeurs dans le tooltip (devise, pourcentage…). */
|
|
14
|
+
valueFormatter?: (value: number) => string;
|
|
15
|
+
/** Rend les parts cliquables. */
|
|
16
|
+
onSelect?: (datum: ChartDatum, index: number) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Répartition en parts, en anneau par défaut.
|
|
21
|
+
*
|
|
22
|
+
* Chaque donnée est coloriée par son `color`, sinon par la palette
|
|
23
|
+
* `CHART_COLORS` dans l'ordre.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PieChart: ({ data, innerRadius, outerRadius, showLegend, showLabels, valueFormatter, onSelect, className, }: PieChartProps) => React.JSX.Element;
|
|
26
|
+
//# sourceMappingURL=PieChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChart.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/PieChart.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,wGAAwG;IACxG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gGAAgG;IAChG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,kGAStB,aAAa,KAAG,KAAK,CAAC,GAAG,CAAC,OA+C5B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Palette par défaut des graphes, appliquée dans l'ordre aux données qui ne
|
|
3
|
+
* portent pas de couleur explicite.
|
|
4
|
+
*
|
|
5
|
+
* Les variables sont déclarées dans `styles/globals.css` sur `:root` uniquement :
|
|
6
|
+
* ces teintes sont choisies pour rester lisibles aussi bien sur fond clair que
|
|
7
|
+
* sur les thèmes sombres, sans avoir à être redéfinies par chacun d'eux. Un
|
|
8
|
+
* projet qui veut sa propre palette surcharge `--k-chart-1` … `--k-chart-5`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CHART_COLORS: readonly ["hsl(var(--k-chart-1))", "hsl(var(--k-chart-2))", "hsl(var(--k-chart-3))", "hsl(var(--k-chart-4))", "hsl(var(--k-chart-5))"];
|
|
11
|
+
/** Couleur de la palette pour un index de série, en boucle au-delà de 5 entrées. */
|
|
12
|
+
export declare const getChartColor: (index: number) => string;
|
|
13
|
+
//# sourceMappingURL=chartColors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartColors.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/chartColors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,wIAMf,CAAC;AAEX,oFAAoF;AACpF,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAAmD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Construit le `formatter` de `ChartTooltipContent` pour afficher une valeur
|
|
4
|
+
* formatée (devise, pourcentage, durée…) plutôt que le `toLocaleString()` par
|
|
5
|
+
* défaut de shadcn.
|
|
6
|
+
*
|
|
7
|
+
* Renvoie `undefined` quand aucun formatage n'est demandé, pour laisser le
|
|
8
|
+
* rendu natif — y compris l'indicateur de couleur, que `formatter` remplace.
|
|
9
|
+
*
|
|
10
|
+
* @param valueFormatter Mise en forme de la valeur numérique.
|
|
11
|
+
* @param label Libellé affiché à gauche. À défaut, le nom de la série.
|
|
12
|
+
*/
|
|
13
|
+
export declare const buildTooltipValueFormatter: (valueFormatter?: (value: number) => string, label?: string) => ((value: unknown, name: unknown) => React.ReactNode) | undefined;
|
|
14
|
+
//# sourceMappingURL=chartTooltip.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartTooltip.helper.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/chartTooltip.helper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,GACrC,iBAAiB,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAC1C,QAAQ,MAAM,KACb,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,SAazD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { BarChartHorizontal } from "./BarChartHorizontal";
|
|
2
|
+
export type { BarChartHorizontalProps } from "./BarChartHorizontal";
|
|
3
|
+
export { BarChartVertical } from "./BarChartVertical";
|
|
4
|
+
export type { BarChartVerticalProps } from "./BarChartVertical";
|
|
5
|
+
export { CHART_COLORS, getChartColor } from "./chartColors";
|
|
6
|
+
export { ChartCard } from "./ChartCard";
|
|
7
|
+
export type { ChartCardProps } from "./ChartCard";
|
|
8
|
+
export { CircularGauge } from "./CircularGauge";
|
|
9
|
+
export type { CircularGaugeProps, CircularGaugeThresholds } from "./CircularGauge";
|
|
10
|
+
export { LineChart } from "./LineChart";
|
|
11
|
+
export type { LineChartProps } from "./LineChart";
|
|
12
|
+
export { PieChart } from "./PieChart";
|
|
13
|
+
export type { PieChartProps } from "./PieChart";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { B as C, a as t, C as s, b as e, c as h, L as o, P as i, g as l } from "../../../PieChart-C9gn0Dws.js";
|
|
2
|
+
export {
|
|
3
|
+
C as BarChartHorizontal,
|
|
4
|
+
t as BarChartVertical,
|
|
5
|
+
s as CHART_COLORS,
|
|
6
|
+
e as ChartCard,
|
|
7
|
+
h as CircularGauge,
|
|
8
|
+
o as LineChart,
|
|
9
|
+
i as PieChart,
|
|
10
|
+
l as getChartColor
|
|
11
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as i, C as s, F as g } from "../../../ConfirmationDialog-
|
|
2
|
-
import { D as r, a as D, b as e, c as t, d as n, e as p, f, g as m, h as C, i as F, P } from "../../../toggle-group-
|
|
1
|
+
import { A as i, C as s, F as g } from "../../../ConfirmationDialog-M8sFAz4h.js";
|
|
2
|
+
import { D as r, a as D, b as e, c as t, d as n, e as p, f, g as m, h as C, i as F, P } from "../../../toggle-group-D6aFQQcf.js";
|
|
3
3
|
export {
|
|
4
4
|
i as AppDialog,
|
|
5
5
|
s as ConfirmationDialog,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|