@krosoft/react 0.0.20 → 0.0.22
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/KpiCards-DhstZUeY.js +336 -0
- package/dist/{LoadingState-C91zWRVu.js → LoadingState-Br3lWjL2.js} +4 -5
- package/dist/badge-CS99D5mG.js +26 -0
- package/dist/components/core/cards/KpiCard.d.ts +13 -0
- package/dist/components/core/cards/KpiCard.d.ts.map +1 -0
- package/dist/components/core/cards/KpiCards.d.ts +7 -0
- package/dist/components/core/cards/KpiCards.d.ts.map +1 -0
- package/dist/components/core/cards/index.d.ts +4 -0
- package/dist/components/core/cards/index.d.ts.map +1 -0
- package/dist/components/core/cards/index.js +5 -0
- 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 +6 -3
- package/dist/components/core/states/index.js +1 -1
- package/dist/components/index.js +27 -15
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +3 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +20 -11
- package/dist/helpers/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +28 -38
- package/dist/hooks/ui/useMobile.d.ts.map +1 -1
- package/dist/hooks/ui/useNotifications.d.ts +5 -4
- package/dist/hooks/ui/useNotifications.d.ts.map +1 -1
- package/dist/{index-DxGGCUCL.js → index-gWiv5-6R.js} +2 -2
- package/dist/{toast-DZWzsFB2.js → toast-CUZ-UU-l.js} +412 -384
- package/package.json +7 -3
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { jsxs as K, jsx as L } from "react/jsx-runtime";
|
|
2
|
+
import { C as ee, f as te, g as ne, c as re } from "./toast-CUZ-UU-l.js";
|
|
3
|
+
import { c as I } from "./index-gWiv5-6R.js";
|
|
4
|
+
import B, { createContext as ae, useContext as se, useMemo as U, useRef as A, useCallback as z, useState as oe, useEffect as ce } from "react";
|
|
5
|
+
const ie = (e) => e === void 0 ? "" : new Intl.NumberFormat("fr-FR").format(e), ue = (e, t, r, f) => {
|
|
6
|
+
var n, g, h, m;
|
|
7
|
+
const s = [r, {
|
|
8
|
+
code: t,
|
|
9
|
+
...f || {}
|
|
10
|
+
}];
|
|
11
|
+
if ((g = (n = e == null ? void 0 : e.services) == null ? void 0 : n.logger) != null && g.forward)
|
|
12
|
+
return e.services.logger.forward(s, "warn", "react-i18next::", !0);
|
|
13
|
+
b(s[0]) && (s[0] = `react-i18next:: ${s[0]}`), (m = (h = e == null ? void 0 : e.services) == null ? void 0 : h.logger) != null && m.warn ? e.services.logger.warn(...s) : console != null && console.warn && console.warn(...s);
|
|
14
|
+
}, W = {}, F = (e, t, r, f) => {
|
|
15
|
+
b(r) && W[r] || (b(r) && (W[r] = /* @__PURE__ */ new Date()), ue(e, t, r, f));
|
|
16
|
+
}, J = (e, t) => () => {
|
|
17
|
+
if (e.isInitialized)
|
|
18
|
+
t();
|
|
19
|
+
else {
|
|
20
|
+
const r = () => {
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
e.off("initialized", r);
|
|
23
|
+
}, 0), t();
|
|
24
|
+
};
|
|
25
|
+
e.on("initialized", r);
|
|
26
|
+
}
|
|
27
|
+
}, k = (e, t, r) => {
|
|
28
|
+
e.loadNamespaces(t, J(e, r));
|
|
29
|
+
}, M = (e, t, r, f) => {
|
|
30
|
+
if (b(r) && (r = [r]), e.options.preload && e.options.preload.indexOf(t) > -1) return k(e, r, f);
|
|
31
|
+
r.forEach((s) => {
|
|
32
|
+
e.options.ns.indexOf(s) < 0 && e.options.ns.push(s);
|
|
33
|
+
}), e.loadLanguages(t, J(e, f));
|
|
34
|
+
}, le = (e, t, r = {}) => !t.languages || !t.languages.length ? (F(t, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
35
|
+
languages: t.languages
|
|
36
|
+
}), !0) : t.hasLoadedNamespace(e, {
|
|
37
|
+
lng: r.lng,
|
|
38
|
+
precheck: (f, s) => {
|
|
39
|
+
if (r.bindI18n && r.bindI18n.indexOf("languageChanging") > -1 && f.services.backendConnector.backend && f.isLanguageChangingTo && !s(f.isLanguageChangingTo, e)) return !1;
|
|
40
|
+
}
|
|
41
|
+
}), b = (e) => typeof e == "string", de = (e) => typeof e == "object" && e !== null, fe = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, pe = {
|
|
42
|
+
"&": "&",
|
|
43
|
+
"&": "&",
|
|
44
|
+
"<": "<",
|
|
45
|
+
"<": "<",
|
|
46
|
+
">": ">",
|
|
47
|
+
">": ">",
|
|
48
|
+
"'": "'",
|
|
49
|
+
"'": "'",
|
|
50
|
+
""": '"',
|
|
51
|
+
""": '"',
|
|
52
|
+
" ": " ",
|
|
53
|
+
" ": " ",
|
|
54
|
+
"©": "©",
|
|
55
|
+
"©": "©",
|
|
56
|
+
"®": "®",
|
|
57
|
+
"®": "®",
|
|
58
|
+
"…": "…",
|
|
59
|
+
"…": "…",
|
|
60
|
+
"/": "/",
|
|
61
|
+
"/": "/"
|
|
62
|
+
}, ge = (e) => pe[e], me = (e) => e.replace(fe, ge);
|
|
63
|
+
let Se = {
|
|
64
|
+
bindI18n: "languageChanged",
|
|
65
|
+
bindI18nStore: "",
|
|
66
|
+
transEmptyNodeValue: "",
|
|
67
|
+
transSupportBasicHtmlNodes: !0,
|
|
68
|
+
transWrapTextNodes: "",
|
|
69
|
+
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
70
|
+
useSuspense: !0,
|
|
71
|
+
unescape: me,
|
|
72
|
+
transDefaultProps: void 0
|
|
73
|
+
};
|
|
74
|
+
const he = () => Se;
|
|
75
|
+
let ye;
|
|
76
|
+
const _e = () => ye, Ee = ae();
|
|
77
|
+
class ve {
|
|
78
|
+
constructor() {
|
|
79
|
+
this.usedNamespaces = {};
|
|
80
|
+
}
|
|
81
|
+
addUsedNamespaces(t) {
|
|
82
|
+
t.forEach((r) => {
|
|
83
|
+
this.usedNamespaces[r] || (this.usedNamespaces[r] = !0);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
getUsedNamespaces() {
|
|
87
|
+
return Object.keys(this.usedNamespaces);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
var j = { exports: {} }, G = {};
|
|
91
|
+
/**
|
|
92
|
+
* @license React
|
|
93
|
+
* use-sync-external-store-shim.production.js
|
|
94
|
+
*
|
|
95
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the MIT license found in the
|
|
98
|
+
* LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/
|
|
100
|
+
var $;
|
|
101
|
+
function Oe() {
|
|
102
|
+
if ($) return G;
|
|
103
|
+
$ = 1;
|
|
104
|
+
var e = B;
|
|
105
|
+
function t(a, p) {
|
|
106
|
+
return a === p && (a !== 0 || 1 / a === 1 / p) || a !== a && p !== p;
|
|
107
|
+
}
|
|
108
|
+
var r = typeof Object.is == "function" ? Object.is : t, f = e.useState, s = e.useEffect, n = e.useLayoutEffect, g = e.useDebugValue;
|
|
109
|
+
function h(a, p) {
|
|
110
|
+
var o = p(), i = f({ inst: { value: o, getSnapshot: p } }), l = i[0].inst, y = i[1];
|
|
111
|
+
return n(
|
|
112
|
+
function() {
|
|
113
|
+
l.value = o, l.getSnapshot = p, m(l) && y({ inst: l });
|
|
114
|
+
},
|
|
115
|
+
[a, o, p]
|
|
116
|
+
), s(
|
|
117
|
+
function() {
|
|
118
|
+
return m(l) && y({ inst: l }), a(function() {
|
|
119
|
+
m(l) && y({ inst: l });
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
[a]
|
|
123
|
+
), g(o), o;
|
|
124
|
+
}
|
|
125
|
+
function m(a) {
|
|
126
|
+
var p = a.getSnapshot;
|
|
127
|
+
a = a.value;
|
|
128
|
+
try {
|
|
129
|
+
var o = p();
|
|
130
|
+
return !r(a, o);
|
|
131
|
+
} catch {
|
|
132
|
+
return !0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function v(a, p) {
|
|
136
|
+
return p();
|
|
137
|
+
}
|
|
138
|
+
var O = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : h;
|
|
139
|
+
return G.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : O, G;
|
|
140
|
+
}
|
|
141
|
+
var H = {};
|
|
142
|
+
/**
|
|
143
|
+
* @license React
|
|
144
|
+
* use-sync-external-store-shim.development.js
|
|
145
|
+
*
|
|
146
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the MIT license found in the
|
|
149
|
+
* LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/
|
|
151
|
+
var Y;
|
|
152
|
+
function xe() {
|
|
153
|
+
return Y || (Y = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
154
|
+
function e(o, i) {
|
|
155
|
+
return o === i && (o !== 0 || 1 / o === 1 / i) || o !== o && i !== i;
|
|
156
|
+
}
|
|
157
|
+
function t(o, i) {
|
|
158
|
+
O || s.startTransition === void 0 || (O = !0, console.error(
|
|
159
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
160
|
+
));
|
|
161
|
+
var l = i();
|
|
162
|
+
if (!a) {
|
|
163
|
+
var y = i();
|
|
164
|
+
n(l, y) || (console.error(
|
|
165
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
166
|
+
), a = !0);
|
|
167
|
+
}
|
|
168
|
+
y = g({
|
|
169
|
+
inst: { value: l, getSnapshot: i }
|
|
170
|
+
});
|
|
171
|
+
var _ = y[0].inst, x = y[1];
|
|
172
|
+
return m(
|
|
173
|
+
function() {
|
|
174
|
+
_.value = l, _.getSnapshot = i, r(_) && x({ inst: _ });
|
|
175
|
+
},
|
|
176
|
+
[o, l, i]
|
|
177
|
+
), h(
|
|
178
|
+
function() {
|
|
179
|
+
return r(_) && x({ inst: _ }), o(function() {
|
|
180
|
+
r(_) && x({ inst: _ });
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
[o]
|
|
184
|
+
), v(l), l;
|
|
185
|
+
}
|
|
186
|
+
function r(o) {
|
|
187
|
+
var i = o.getSnapshot;
|
|
188
|
+
o = o.value;
|
|
189
|
+
try {
|
|
190
|
+
var l = i();
|
|
191
|
+
return !n(o, l);
|
|
192
|
+
} catch {
|
|
193
|
+
return !0;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function f(o, i) {
|
|
197
|
+
return i();
|
|
198
|
+
}
|
|
199
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
200
|
+
var s = B, n = typeof Object.is == "function" ? Object.is : e, g = s.useState, h = s.useEffect, m = s.useLayoutEffect, v = s.useDebugValue, O = !1, a = !1, p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : t;
|
|
201
|
+
H.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
202
|
+
})()), H;
|
|
203
|
+
}
|
|
204
|
+
var X;
|
|
205
|
+
function Ne() {
|
|
206
|
+
return X || (X = 1, process.env.NODE_ENV === "production" ? j.exports = Oe() : j.exports = xe()), j.exports;
|
|
207
|
+
}
|
|
208
|
+
var be = Ne();
|
|
209
|
+
const we = (e, t) => {
|
|
210
|
+
if (b(t)) return t;
|
|
211
|
+
if (de(t) && b(t.defaultValue)) return t.defaultValue;
|
|
212
|
+
if (typeof e == "function") return "";
|
|
213
|
+
if (Array.isArray(e)) {
|
|
214
|
+
const r = e[e.length - 1];
|
|
215
|
+
return typeof r == "function" ? "" : r;
|
|
216
|
+
}
|
|
217
|
+
return e;
|
|
218
|
+
}, Ce = {
|
|
219
|
+
t: we,
|
|
220
|
+
ready: !1
|
|
221
|
+
}, Le = () => () => {
|
|
222
|
+
}, Te = (e, t = {}) => {
|
|
223
|
+
var q, T, V;
|
|
224
|
+
const {
|
|
225
|
+
i18n: r
|
|
226
|
+
} = t, {
|
|
227
|
+
i18n: f,
|
|
228
|
+
defaultNS: s
|
|
229
|
+
} = se(Ee) || {}, n = r || f || _e();
|
|
230
|
+
n && !n.reportNamespaces && (n.reportNamespaces = new ve()), n || F(n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
231
|
+
const g = U(() => {
|
|
232
|
+
var c;
|
|
233
|
+
return {
|
|
234
|
+
...he(),
|
|
235
|
+
...(c = n == null ? void 0 : n.options) == null ? void 0 : c.react,
|
|
236
|
+
...t
|
|
237
|
+
};
|
|
238
|
+
}, [n, t]), {
|
|
239
|
+
useSuspense: h,
|
|
240
|
+
keyPrefix: m
|
|
241
|
+
} = g, v = s || ((q = n == null ? void 0 : n.options) == null ? void 0 : q.defaultNS), O = b(v) ? [v] : v || ["translation"], a = U(() => O, O);
|
|
242
|
+
(V = (T = n == null ? void 0 : n.reportNamespaces) == null ? void 0 : T.addUsedNamespaces) == null || V.call(T, a);
|
|
243
|
+
const p = A(0), o = z((c) => {
|
|
244
|
+
if (!n) return Le;
|
|
245
|
+
const {
|
|
246
|
+
bindI18n: u,
|
|
247
|
+
bindI18nStore: d
|
|
248
|
+
} = g, S = () => {
|
|
249
|
+
p.current += 1, c();
|
|
250
|
+
};
|
|
251
|
+
return u && n.on(u, S), d && n.store.on(d, S), () => {
|
|
252
|
+
u && u.split(" ").forEach((E) => n.off(E, S)), d && d.split(" ").forEach((E) => n.store.off(E, S));
|
|
253
|
+
};
|
|
254
|
+
}, [n, g]), i = A(), l = z(() => {
|
|
255
|
+
if (!n)
|
|
256
|
+
return Ce;
|
|
257
|
+
const c = !!(n.isInitialized || n.initializedStoreOnce) && a.every((Z) => le(Z, n, g)), u = t.lng || n.language, d = p.current, S = i.current;
|
|
258
|
+
if (S && S.ready === c && S.lng === u && S.keyPrefix === m && S.revision === d)
|
|
259
|
+
return S;
|
|
260
|
+
const R = {
|
|
261
|
+
t: n.getFixedT(u, g.nsMode === "fallback" ? a : a[0], m),
|
|
262
|
+
ready: c,
|
|
263
|
+
lng: u,
|
|
264
|
+
keyPrefix: m,
|
|
265
|
+
revision: d
|
|
266
|
+
};
|
|
267
|
+
return i.current = R, R;
|
|
268
|
+
}, [n, a, m, g, t.lng]), [y, _] = oe(0), {
|
|
269
|
+
t: x,
|
|
270
|
+
ready: N
|
|
271
|
+
} = be.useSyncExternalStore(o, l, l);
|
|
272
|
+
ce(() => {
|
|
273
|
+
if (n && !N && !h) {
|
|
274
|
+
const c = () => _((u) => u + 1);
|
|
275
|
+
t.lng ? M(n, t.lng, a, c) : k(n, a, c);
|
|
276
|
+
}
|
|
277
|
+
}, [n, t.lng, a, N, h, y]);
|
|
278
|
+
const w = n || {}, C = A(null), D = A(), P = (c) => {
|
|
279
|
+
const u = Object.getOwnPropertyDescriptors(c);
|
|
280
|
+
u.__original && delete u.__original;
|
|
281
|
+
const d = Object.create(Object.getPrototypeOf(c), u);
|
|
282
|
+
if (!Object.prototype.hasOwnProperty.call(d, "__original"))
|
|
283
|
+
try {
|
|
284
|
+
Object.defineProperty(d, "__original", {
|
|
285
|
+
value: c,
|
|
286
|
+
writable: !1,
|
|
287
|
+
enumerable: !1,
|
|
288
|
+
configurable: !1
|
|
289
|
+
});
|
|
290
|
+
} catch {
|
|
291
|
+
}
|
|
292
|
+
return d;
|
|
293
|
+
}, Q = U(() => {
|
|
294
|
+
const c = w, u = c == null ? void 0 : c.language;
|
|
295
|
+
let d = c;
|
|
296
|
+
c && (C.current && C.current.__original === c ? D.current !== u ? (d = P(c), C.current = d, D.current = u) : d = C.current : (d = P(c), C.current = d, D.current = u));
|
|
297
|
+
const S = !N && !h ? (...R) => (F(n, "USE_T_BEFORE_READY", "useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."), x(...R)) : x, E = [S, d, N];
|
|
298
|
+
return E.t = S, E.i18n = d, E.ready = N, E;
|
|
299
|
+
}, [x, w, N, w.resolvedLanguage, w.language, w.languages]);
|
|
300
|
+
if (n && h && !N)
|
|
301
|
+
throw new Promise((c) => {
|
|
302
|
+
const u = () => c();
|
|
303
|
+
t.lng ? M(n, t.lng, a, u) : k(n, a, u);
|
|
304
|
+
});
|
|
305
|
+
return Q;
|
|
306
|
+
}, Re = ({ titleKey: e, value: t, valueClassName: r, icon: f, iconClassName: s, description: n, descriptionClassName: g, onClick: h }) => {
|
|
307
|
+
const { t: m } = Te();
|
|
308
|
+
return /* @__PURE__ */ K(ee, { className: I(h ? "hover:border-primary cursor-pointer" : ""), onClick: h, children: [
|
|
309
|
+
/* @__PURE__ */ K(te, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
310
|
+
/* @__PURE__ */ L(ne, { className: "text-sm font-medium", children: m(e) }),
|
|
311
|
+
B.createElement(f, {
|
|
312
|
+
className: I("size-6 text-muted-foreground", s)
|
|
313
|
+
})
|
|
314
|
+
] }),
|
|
315
|
+
/* @__PURE__ */ K(re, { children: [
|
|
316
|
+
/* @__PURE__ */ L("div", { className: I("text-2xl font-bold", r), children: ie(t) }),
|
|
317
|
+
/* @__PURE__ */ L("p", { className: I("text-xs text-muted-foreground", g), children: n })
|
|
318
|
+
] })
|
|
319
|
+
] });
|
|
320
|
+
}, Ke = ({ stats: e }) => /* @__PURE__ */ L("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: e.map((t) => /* @__PURE__ */ L(
|
|
321
|
+
Re,
|
|
322
|
+
{
|
|
323
|
+
titleKey: t.titleKey,
|
|
324
|
+
value: t.value,
|
|
325
|
+
valueClassName: t.valueClassName,
|
|
326
|
+
icon: t.icon,
|
|
327
|
+
iconClassName: t.iconClassName,
|
|
328
|
+
description: t.description,
|
|
329
|
+
descriptionClassName: t.descriptionClassName
|
|
330
|
+
},
|
|
331
|
+
t.titleKey
|
|
332
|
+
)) });
|
|
333
|
+
export {
|
|
334
|
+
Re as K,
|
|
335
|
+
Ke as a
|
|
336
|
+
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { c as a } from "./createLucideIcon-BxMj32TH.js";
|
|
3
|
-
const d = ({ message: e }) => /* @__PURE__ */ r("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-md animate-fade-in", children: [
|
|
4
|
-
/* @__PURE__ */ t("p", { className: "font-semibold mb-2", children: "Une erreur est survenue." }),
|
|
5
|
-
e ? /* @__PURE__ */ t("p", { className: "text-sm opacity-80", children: e }) : null
|
|
6
|
-
] });
|
|
7
3
|
/**
|
|
8
4
|
* @license lucide-react v1.7.0 - ISC
|
|
9
5
|
*
|
|
10
6
|
* This source code is licensed under the ISC license.
|
|
11
7
|
* See the LICENSE file in the root directory of this source tree.
|
|
12
8
|
*/
|
|
13
|
-
const s = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], c = a("loader-circle", s),
|
|
9
|
+
const s = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], c = a("loader-circle", s), d = ({ message: e }) => /* @__PURE__ */ r("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-md animate-fade-in", children: [
|
|
10
|
+
/* @__PURE__ */ t("p", { className: "font-semibold mb-2", children: "Une erreur est survenue." }),
|
|
11
|
+
e ? /* @__PURE__ */ t("p", { className: "text-sm opacity-80", children: e }) : null
|
|
12
|
+
] }), o = ({ message: e }) => /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center p-12 text-muted-foreground animate-fade-in", children: [
|
|
14
13
|
/* @__PURE__ */ t(c, { className: "size-8 animate-spin mb-4 text-primary" }),
|
|
15
14
|
e ? /* @__PURE__ */ t("p", { className: "font-semibold text-sm", children: e }) : null
|
|
16
15
|
] });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { o as n } from "./toast-CUZ-UU-l.js";
|
|
3
|
+
import { c as a } from "./index-gWiv5-6R.js";
|
|
4
|
+
const s = n(
|
|
5
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
12
|
+
outline: "text-foreground"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function c({ className: r, variant: e, ...t }) {
|
|
21
|
+
return /* @__PURE__ */ o("div", { className: a(s({ variant: e }), r), ...t });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
c as B,
|
|
25
|
+
s as b
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface KpiCardProps {
|
|
3
|
+
titleKey: string;
|
|
4
|
+
value: number;
|
|
5
|
+
valueClassName?: string;
|
|
6
|
+
icon: React.ElementType;
|
|
7
|
+
iconClassName?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
descriptionClassName?: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const KpiCard: ({ titleKey, value, valueClassName, icon: theIcon, iconClassName, description, descriptionClassName, onClick }: KpiCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=KpiCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KpiCard.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/KpiCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,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;CACtB;AAED,eAAO,MAAM,OAAO,GAAI,+GAA+G,YAAY,4CAiBlJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KpiCards.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/KpiCards.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAW,MAAM,WAAW,CAAC;AAElD,UAAU,aAAa;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,GAAI,WAAW,aAAa,KAAG,KAAK,CAAC,GAAG,CAAC,OAe7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,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"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as o, a as t } from "../../KpiCards-DhstZUeY.js";
|
|
2
|
+
import { E as e, L as p } from "../../LoadingState-Br3lWjL2.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
o as
|
|
4
|
+
e as ErrorState,
|
|
5
|
+
o as KpiCard,
|
|
6
|
+
t as KpiCards,
|
|
7
|
+
p as LoadingState
|
|
5
8
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { K as t, a as r } from "../KpiCards-DhstZUeY.js";
|
|
2
|
+
import { E as e, L as i } from "../LoadingState-Br3lWjL2.js";
|
|
3
|
+
import { A as n, a as C, b as T, B as p, C as l, c, d as f, e as m, f as A, g as b, T as g, h as x, i as B, j as D, k as K, l as V, m as u, n as E } from "../toast-CUZ-UU-l.js";
|
|
4
|
+
import { B as S, b as h } from "../badge-CS99D5mG.js";
|
|
3
5
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
n as Alert,
|
|
7
|
+
C as AlertDescription,
|
|
6
8
|
T as AlertTitle,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
A as
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
S as Badge,
|
|
10
|
+
p as Button,
|
|
11
|
+
l as Card,
|
|
12
|
+
c as CardContent,
|
|
13
|
+
f as CardDescription,
|
|
14
|
+
m as CardFooter,
|
|
15
|
+
A as CardHeader,
|
|
16
|
+
b as CardTitle,
|
|
17
|
+
e as ErrorState,
|
|
18
|
+
t as KpiCard,
|
|
19
|
+
r as KpiCards,
|
|
20
|
+
i as LoadingState,
|
|
21
|
+
g as Toast,
|
|
22
|
+
x as ToastAction,
|
|
23
|
+
B as ToastClose,
|
|
24
|
+
D as ToastDescription,
|
|
25
|
+
K as ToastProvider,
|
|
26
|
+
V as ToastTitle,
|
|
27
|
+
u as ToastViewport,
|
|
28
|
+
h as badgeVariants,
|
|
29
|
+
E as buttonVariants
|
|
18
30
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | "styled" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
12
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,cAAc;;;8EAyBnB,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IACrH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAGV,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
9
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,QAAA,MAAM,IAAI,6GAER,CAAC;AAGH,QAAA,MAAM,UAAU,6GAEd,CAAC;AAGH,QAAA,MAAM,SAAS,uHAEb,CAAC;AAGH,QAAA,MAAM,eAAe,yHAEnB,CAAC;AAGH,QAAA,MAAM,WAAW,6GAEf,CAAC;AAGH,QAAA,MAAM,UAAU,6GAEd,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { Alert, AlertTitle, AlertDescription } from "./alert";
|
|
2
|
+
export { Button, buttonVariants } from "./button";
|
|
3
|
+
export type { ButtonProps } from "./button";
|
|
4
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from "./card";
|
|
2
5
|
export { Badge, badgeVariants } from "./badge";
|
|
3
6
|
export type { BadgeProps } from "./badge";
|
|
4
7
|
export { Toast, ToastProvider, ToastViewport, ToastTitle, ToastDescription, ToastClose, ToastAction } from "./toast";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACrH,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC/F,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACrH,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import { A as t, a as o, b as
|
|
1
|
+
import { A as t, a as o, b as r, B as e, C as i, c as d, d as n, e as T, f as C, g as l, T as p, h as c, i as A, j as b, k as B, l as f, m as g, n as m } from "../../toast-CUZ-UU-l.js";
|
|
2
|
+
import { B as V, b as u } from "../../badge-CS99D5mG.js";
|
|
2
3
|
export {
|
|
3
4
|
t as Alert,
|
|
4
5
|
o as AlertDescription,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
p as
|
|
6
|
+
r as AlertTitle,
|
|
7
|
+
V as Badge,
|
|
8
|
+
e as Button,
|
|
9
|
+
i as Card,
|
|
10
|
+
d as CardContent,
|
|
11
|
+
n as CardDescription,
|
|
12
|
+
T as CardFooter,
|
|
13
|
+
C as CardHeader,
|
|
14
|
+
l as CardTitle,
|
|
15
|
+
p as Toast,
|
|
16
|
+
c as ToastAction,
|
|
17
|
+
A as ToastClose,
|
|
18
|
+
b as ToastDescription,
|
|
19
|
+
B as ToastProvider,
|
|
20
|
+
f as ToastTitle,
|
|
21
|
+
g as ToastViewport,
|
|
22
|
+
u as badgeVariants,
|
|
23
|
+
m as buttonVariants
|
|
15
24
|
};
|
package/dist/helpers/index.js
CHANGED
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC"}
|