@krosoft/react 0.0.179 → 0.0.181
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/AppTitle-D15YXeMx.js +13 -0
- package/dist/{AppVerticalTabs-BSU6M8OU.js → AppVerticalTabs-D8fURUUN.js} +45 -45
- package/dist/{ConfirmationDialog-Ht4e-1Lg.js → ConfirmationDialog-9CKgZoNY.js} +1 -1
- package/dist/{GenericForm-COQEdT9e.js → GenericForm-B39toMkE.js} +1 -1
- package/dist/KpiCardsLayout-mQ7AcbqA.js +49 -0
- package/dist/{MultiSelect-DF7-91OW.js → MultiSelect-CqcbwKYV.js} +52 -47
- package/dist/{TableFilter-Dbo7qkgR.js → TableFilter-CWDy_RHA.js} +1 -1
- package/dist/components/core/dialogs/index.js +1 -1
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +7 -7
- package/dist/components/core/inputs/MultiSelect.d.ts +3 -1
- package/dist/components/core/inputs/MultiSelect.d.ts.map +1 -1
- package/dist/components/core/inputs/index.js +1 -1
- package/dist/components/core/layouts/index.js +2 -2
- package/dist/components/core/tabs/AppTabs.d.ts.map +1 -1
- package/dist/components/core/tabs/AppVerticalTabs.d.ts.map +1 -1
- package/dist/components/core/tabs/index.js +1 -1
- package/dist/components/index.js +7 -7
- package/dist/components/ui/form.d.ts +1 -1
- package/dist/components/ui/form.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/AppTitle-uboDuil4.js +0 -13
- package/dist/KpiCardsLayout-C4Ds3BEl.js +0 -49
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as x } from "./tailwind.helper-B6yFEsav.js";
|
|
3
|
+
import { useTranslation as r } from "react-i18next";
|
|
4
|
+
function c({ titleKey: m, descriptionKey: t, isSubTitle: e }) {
|
|
5
|
+
const { t: l } = r();
|
|
6
|
+
return /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
7
|
+
/* @__PURE__ */ o("h1", { className: e ? "text-xl md:text-2xl font-semibold" : "text-xl md:text-3xl font-bold", children: l(m) ?? "" }),
|
|
8
|
+
t ? /* @__PURE__ */ o("p", { className: x("hidden md:block text-muted-foreground", e && "text-sm"), children: l(t) }) : null
|
|
9
|
+
] });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as A
|
|
13
|
+
};
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { J as
|
|
3
|
-
import { A as
|
|
4
|
-
import { A } from "./AppTitle-
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { useSearchParams as
|
|
7
|
-
import { c as
|
|
8
|
-
import { S as
|
|
9
|
-
import { ConstructionIcon as
|
|
10
|
-
function
|
|
2
|
+
import { J as g, N as y, K as T, bN as b, bP as w, bQ as S, bO as C, bA as A } from "./toggle-group-D6c-gM1D.js";
|
|
3
|
+
import { A as P } from "./AppActions-DEkRxBia.js";
|
|
4
|
+
import { A as k } from "./AppTitle-D15YXeMx.js";
|
|
5
|
+
import { useTranslation as v } from "react-i18next";
|
|
6
|
+
import { useSearchParams as N } from "react-router-dom";
|
|
7
|
+
import { c as j } from "./tailwind.helper-B6yFEsav.js";
|
|
8
|
+
import { S as z, h as K, i as V, a as L, c as q } from "./select-BpjFWqAY.js";
|
|
9
|
+
import { ConstructionIcon as f } from "lucide-react";
|
|
10
|
+
function H({ titleKey: s, descriptionKey: l, actions: c = [], className: t }) {
|
|
11
11
|
return /* @__PURE__ */ n("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
12
|
-
/* @__PURE__ */ a(
|
|
13
|
-
/* @__PURE__ */ a(
|
|
12
|
+
/* @__PURE__ */ a(k, { titleKey: s, descriptionKey: l, isSubTitle: !0 }),
|
|
13
|
+
/* @__PURE__ */ a(P, { actions: c, className: t })
|
|
14
14
|
] });
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ n(
|
|
18
|
-
/* @__PURE__ */ a(
|
|
19
|
-
/* @__PURE__ */ a(
|
|
16
|
+
function E({ titleKey: s, descriptionKey: l, actions: c = [], className: t, children: i, isSubTitle: u }) {
|
|
17
|
+
return /* @__PURE__ */ n(g, { children: [
|
|
18
|
+
/* @__PURE__ */ a(y, { children: /* @__PURE__ */ a(H, { titleKey: s, descriptionKey: l, actions: c, className: t }) }),
|
|
19
|
+
/* @__PURE__ */ a(T, { className: "space-y-4", children: i })
|
|
20
20
|
] });
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
var m;
|
|
24
|
-
const { t:
|
|
25
|
-
return /* @__PURE__ */ n(
|
|
22
|
+
function F({ tabs: s, itemId: l, item: c, fit: t }) {
|
|
23
|
+
var m, d;
|
|
24
|
+
const { t: i } = v(), [u, o] = N(), p = u.get("tab"), h = ((m = s.find((e) => e.value === p)) == null ? void 0 : m.value) ?? ((d = s[0]) == null ? void 0 : d.value);
|
|
25
|
+
return /* @__PURE__ */ n(b, { value: h, onValueChange: (e) => {
|
|
26
26
|
const r = new URLSearchParams();
|
|
27
|
-
r.set("tab", e),
|
|
27
|
+
r.set("tab", e), o(r);
|
|
28
28
|
}, children: [
|
|
29
|
-
/* @__PURE__ */ a(
|
|
29
|
+
/* @__PURE__ */ a(w, { className: j("w-full justify-start", t && "sm:w-fit"), children: s.map((e) => /* @__PURE__ */ n(S, { value: e.value, className: "gap-2", disabled: e.disabled, children: [
|
|
30
30
|
e.icon ? /* @__PURE__ */ a("span", { className: "hidden sm:inline", children: /* @__PURE__ */ a(e.icon, { className: "size-4" }) }) : null,
|
|
31
|
-
/* @__PURE__ */ a("span", { className: "text-xs sm:text-sm", children:
|
|
31
|
+
/* @__PURE__ */ a("span", { className: "text-xs sm:text-sm", children: i(e.titleKey) ?? "" }),
|
|
32
32
|
e.count ? /* @__PURE__ */ n("span", { className: "text-gray-500 text-xs", children: [
|
|
33
33
|
"(",
|
|
34
34
|
e.count(c),
|
|
35
35
|
")"
|
|
36
36
|
] }) : null
|
|
37
37
|
] }, e.value)) }),
|
|
38
|
-
s.map((e) => /* @__PURE__ */ a(
|
|
38
|
+
s.map((e) => /* @__PURE__ */ a(C, { value: e.value, className: "mt-4", children: e.component ? e.component(l) : null }, e.value))
|
|
39
39
|
] });
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
var m;
|
|
43
|
-
const { t: c } =
|
|
41
|
+
const G = ({ tabs: s, item: l }) => {
|
|
42
|
+
var m, d;
|
|
43
|
+
const { t: c } = v(), [t, i] = N(), u = t.get("tab"), o = ((m = s.find((e) => e.value === u)) == null ? void 0 : m.value) ?? ((d = s[0]) == null ? void 0 : d.value), p = (e) => {
|
|
44
44
|
const r = new URLSearchParams();
|
|
45
|
-
r.set("tab", e),
|
|
46
|
-
},
|
|
47
|
-
const e = s.find((r) => r.value ===
|
|
48
|
-
return e ? e.component ? e.component() :
|
|
49
|
-
},
|
|
50
|
-
/* @__PURE__ */ a(
|
|
45
|
+
r.set("tab", e), i(r);
|
|
46
|
+
}, h = () => {
|
|
47
|
+
const e = s.find((r) => r.value === o);
|
|
48
|
+
return e ? e.component ? e.component() : x() : null;
|
|
49
|
+
}, x = () => /* @__PURE__ */ a("div", { className: "p-4 lg:p-6", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center h-64 text-gray-500", children: /* @__PURE__ */ n("div", { className: "text-center", children: [
|
|
50
|
+
/* @__PURE__ */ a(f, { className: "h-12 w-12 mx-auto mb-4 text-amber-500" }),
|
|
51
51
|
/* @__PURE__ */ a("p", { className: "text-lg font-medium", children: "Section en cours de développement" }),
|
|
52
52
|
/* @__PURE__ */ a("p", { className: "text-sm text-gray-400", children: "Cette fonctionnalité sera bientôt disponible" })
|
|
53
53
|
] }) }) });
|
|
54
54
|
return /* @__PURE__ */ n("div", { className: "flex flex-col md:flex-row h-full min-w-0 ", children: [
|
|
55
|
-
/* @__PURE__ */ a("div", { className: "w-64 lg:w-80 flex-shrink-0 hidden md:block border-r border-gray-200 dark:border-gray-700 pr-4", children: /* @__PURE__ */ a(
|
|
55
|
+
/* @__PURE__ */ a("div", { className: "w-64 lg:w-80 flex-shrink-0 hidden md:block border-r border-gray-200 dark:border-gray-700 pr-4", children: /* @__PURE__ */ a(A, { className: "h-full", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: s.map((e, r) => /* @__PURE__ */ n(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
|
-
className: `px-2 py-2 rounded-control text-sm transition-colors flex items-center gap-2 ${e.disabled ? "text-gray-400 cursor-not-allowed opacity-50" :
|
|
59
|
-
onClick: () => !e.disabled &&
|
|
58
|
+
className: `px-2 py-2 rounded-control text-sm transition-colors flex items-center gap-2 ${e.disabled ? "text-gray-400 cursor-not-allowed opacity-50" : o === e.value ? "crm-color-styled font-medium cursor-pointer" : "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700 cursor-pointer"}`,
|
|
59
|
+
onClick: () => !e.disabled && p(e.value),
|
|
60
60
|
children: [
|
|
61
61
|
e.icon && /* @__PURE__ */ a(e.icon, { className: "size-4" }),
|
|
62
62
|
/* @__PURE__ */ a("span", { className: "flex-1", children: c(e.titleKey) }),
|
|
@@ -65,14 +65,14 @@ const E = ({ tabs: s, item: l }) => {
|
|
|
65
65
|
e.count(l),
|
|
66
66
|
")"
|
|
67
67
|
] }),
|
|
68
|
-
!e.component && /* @__PURE__ */ a(
|
|
68
|
+
!e.component && /* @__PURE__ */ a(f, { className: "size-4 text-amber-500" })
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
r
|
|
72
72
|
)) }) }) }),
|
|
73
|
-
/* @__PURE__ */ a("div", { className: "md:hidden w-full border-b pb-4 mb-4", children: /* @__PURE__ */ n(
|
|
74
|
-
/* @__PURE__ */ a(
|
|
75
|
-
/* @__PURE__ */ a(
|
|
73
|
+
/* @__PURE__ */ a("div", { className: "md:hidden w-full border-b pb-4 mb-4", children: /* @__PURE__ */ n(z, { value: o, onValueChange: p, children: [
|
|
74
|
+
/* @__PURE__ */ a(K, { className: "w-full", children: /* @__PURE__ */ a(V, { placeholder: "Sélectionner une section" }) }),
|
|
75
|
+
/* @__PURE__ */ a(L, { children: s.map((e, r) => /* @__PURE__ */ a(q, { value: e.value, disabled: e.disabled, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
76
76
|
e.icon && /* @__PURE__ */ a(e.icon, { className: "size-4" }),
|
|
77
77
|
/* @__PURE__ */ a("span", { children: c(e.titleKey) }),
|
|
78
78
|
e.count && /* @__PURE__ */ n("span", { className: "text-xs text-gray-500", children: [
|
|
@@ -80,15 +80,15 @@ const E = ({ tabs: s, item: l }) => {
|
|
|
80
80
|
e.count(l),
|
|
81
81
|
")"
|
|
82
82
|
] }),
|
|
83
|
-
!e.component && /* @__PURE__ */ a(
|
|
83
|
+
!e.component && /* @__PURE__ */ a(f, { className: "size-4 text-amber-500" })
|
|
84
84
|
] }) }, r)) })
|
|
85
85
|
] }) }),
|
|
86
|
-
/* @__PURE__ */ a("div", { className: "flex-1 md:px-4 min-w-0 overflow-auto", children:
|
|
86
|
+
/* @__PURE__ */ a("div", { className: "flex-1 md:px-4 min-w-0 overflow-auto", children: h() })
|
|
87
87
|
] });
|
|
88
88
|
};
|
|
89
89
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
E as A,
|
|
91
|
+
H as a,
|
|
92
|
+
F as b,
|
|
93
|
+
G as c
|
|
94
94
|
};
|
|
@@ -14,7 +14,7 @@ import "next-themes";
|
|
|
14
14
|
import "sonner";
|
|
15
15
|
import { useState as w, useEffect as ee } from "react";
|
|
16
16
|
import { useTranslation as O } from "react-i18next";
|
|
17
|
-
import { G as le } from "./GenericForm-
|
|
17
|
+
import { G as le } from "./GenericForm-B39toMkE.js";
|
|
18
18
|
import { E as ie } from "./ErrorAlert-SrIcU1mM.js";
|
|
19
19
|
function re({ open: t, onOpenChange: c, config: l, isLoading: u, error: s, children: p }) {
|
|
20
20
|
const { t: i } = O(), { title: b, description: m, icon: f, maxWidth: g = "sm:max-w-xl", actions: n } = l;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { I as J } from "./ImageInput-BoYUZx9H.js";
|
|
3
3
|
import { A as V } from "./AppSubTitle-ChCtQ7Sv.js";
|
|
4
|
-
import { M as Q } from "./MultiSelect-
|
|
4
|
+
import { M as Q } from "./MultiSelect-CqcbwKYV.js";
|
|
5
5
|
import { aN as W, aQ as $, aR as q, aS as D, aO as A, aT as L, J as X, N as Y, K as F, bR as ee, $ as te } from "./toggle-group-D6c-gM1D.js";
|
|
6
6
|
import "./alert-B9F1N9Qk.js";
|
|
7
7
|
import "@radix-ui/react-aspect-ratio";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "./toggle-group-D6c-gM1D.js";
|
|
3
|
+
import "./alert-B9F1N9Qk.js";
|
|
4
|
+
import "@radix-ui/react-aspect-ratio";
|
|
5
|
+
import { B as c } from "./tooltip-DVeqVwqV.js";
|
|
6
|
+
import "@radix-ui/react-collapsible";
|
|
7
|
+
import "./sheet-B_uq6-K_.js";
|
|
8
|
+
import { ArrowLeftIcon as l } from "lucide-react";
|
|
9
|
+
import "react-resizable-panels";
|
|
10
|
+
import "clsx";
|
|
11
|
+
import "tailwind-merge";
|
|
12
|
+
import "./select-BpjFWqAY.js";
|
|
13
|
+
import "next-themes";
|
|
14
|
+
import "sonner";
|
|
15
|
+
import "react";
|
|
16
|
+
import { A as f } from "./AppActions-DEkRxBia.js";
|
|
17
|
+
import { A as d } from "./AppTitle-D15YXeMx.js";
|
|
18
|
+
import { u } from "./useDocumentTitle-WNwdPz-I.js";
|
|
19
|
+
import { useTranslation as g } from "react-i18next";
|
|
20
|
+
import "@krosoft/core/helpers";
|
|
21
|
+
import { b as h, a as x } from "./SkeletonCards-BvJYF_LK.js";
|
|
22
|
+
import { E as A } from "./ErrorState-CmaxuJyW.js";
|
|
23
|
+
function M({
|
|
24
|
+
icon: t,
|
|
25
|
+
titleKey: e,
|
|
26
|
+
descriptionKey: i,
|
|
27
|
+
actions: a,
|
|
28
|
+
onBack: m,
|
|
29
|
+
renderPreActions: o,
|
|
30
|
+
className: p
|
|
31
|
+
}) {
|
|
32
|
+
const { t: n } = g();
|
|
33
|
+
return u(n(e)), /* @__PURE__ */ s("div", { className: "flex flex-row items-center justify-between gap-3 md:gap-4", children: [
|
|
34
|
+
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
|
|
35
|
+
m && /* @__PURE__ */ r(c, { variant: "ghost", size: "icon", className: "shrink-0", onClick: m, children: /* @__PURE__ */ r(l, { className: "h-4 w-4" }) }),
|
|
36
|
+
t && /* @__PURE__ */ r("div", { className: "size-12 shrink-0 bg-blue-100 rounded-control flex items-center justify-center", children: /* @__PURE__ */ r(t, { className: "h-6 w-6 text-blue-600" }) }),
|
|
37
|
+
/* @__PURE__ */ r(d, { titleKey: e, descriptionKey: i })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 md:gap-4", children: [
|
|
40
|
+
o && o(),
|
|
41
|
+
/* @__PURE__ */ r(f, { actions: a, className: p })
|
|
42
|
+
] })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
const O = ({ stats: t, isLoading: e, error: i }) => e ? /* @__PURE__ */ r(h, { count: 4 }) : i ? /* @__PURE__ */ r(A, { message: i.message }) : /* @__PURE__ */ r(x, { stats: t });
|
|
46
|
+
export {
|
|
47
|
+
M as A,
|
|
48
|
+
O as K
|
|
49
|
+
};
|
|
@@ -1,73 +1,78 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { $ as
|
|
2
|
+
import { useState as L, useRef as z, useMemo as v, useEffect as E } from "react";
|
|
3
|
+
import { $ as T } from "./toggle-group-D6c-gM1D.js";
|
|
4
4
|
import "./alert-B9F1N9Qk.js";
|
|
5
5
|
import "@radix-ui/react-aspect-ratio";
|
|
6
|
-
import { f as
|
|
6
|
+
import { f as M } from "./tooltip-DVeqVwqV.js";
|
|
7
7
|
import "@radix-ui/react-collapsible";
|
|
8
8
|
import "./sheet-B_uq6-K_.js";
|
|
9
|
-
import { XIcon as
|
|
9
|
+
import { XIcon as O, ChevronDownIcon as P, SearchIcon as S } from "lucide-react";
|
|
10
10
|
import "react-resizable-panels";
|
|
11
|
-
import { c as
|
|
11
|
+
import { c as I } from "./tailwind.helper-B6yFEsav.js";
|
|
12
12
|
import "./select-BpjFWqAY.js";
|
|
13
13
|
import "next-themes";
|
|
14
14
|
import "sonner";
|
|
15
|
-
const
|
|
16
|
-
options:
|
|
17
|
-
selected:
|
|
18
|
-
onToggle:
|
|
15
|
+
const Z = ({
|
|
16
|
+
options: s,
|
|
17
|
+
selected: t,
|
|
18
|
+
onToggle: x,
|
|
19
19
|
onClear: d,
|
|
20
20
|
onSelectAll: u,
|
|
21
|
-
placeholder:
|
|
21
|
+
placeholder: R = "Sélectionner...",
|
|
22
22
|
searchable: m = !1,
|
|
23
|
-
searchPlaceholder:
|
|
24
|
-
disabled: f = !1
|
|
23
|
+
searchPlaceholder: j = "Rechercher...",
|
|
24
|
+
disabled: f = !1,
|
|
25
|
+
maxCount: h
|
|
25
26
|
}) => {
|
|
26
|
-
const [c,
|
|
27
|
-
|
|
27
|
+
const [c, p] = L(""), [a, N] = L(!1), g = z(null), k = z(null), o = v(() => c === "" ? s : s.filter((e) => e.label.toLowerCase().includes(c.toLowerCase())), [s, c]), w = v(() => o.length === 0 ? !1 : o.every((e) => t.includes(e.value)), [o, t]), b = v(() => t.map((e) => {
|
|
28
|
+
var n;
|
|
29
|
+
return ((n = s.find((i) => i.value === e)) == null ? void 0 : n.label) ?? e;
|
|
30
|
+
}), [s, t]), y = h !== void 0 && h > 0 ? b.slice(0, h) : b, C = b.length - y.length;
|
|
31
|
+
E(() => {
|
|
28
32
|
a && m && requestAnimationFrame(() => {
|
|
29
33
|
var e;
|
|
30
|
-
(e =
|
|
34
|
+
(e = k.current) == null || e.focus();
|
|
31
35
|
});
|
|
32
|
-
}, [a, m]),
|
|
36
|
+
}, [a, m]), E(() => {
|
|
33
37
|
if (!a) return;
|
|
34
|
-
const e = (
|
|
35
|
-
|
|
38
|
+
const e = (n) => {
|
|
39
|
+
g.current !== null && !g.current.contains(n.target) && (N(!1), p(""));
|
|
36
40
|
};
|
|
37
41
|
return document.addEventListener("mousedown", e), () => {
|
|
38
42
|
document.removeEventListener("mousedown", e);
|
|
39
43
|
};
|
|
40
44
|
}, [a]);
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const e = o.map((
|
|
44
|
-
u !== void 0 ? u(
|
|
45
|
+
const D = () => {
|
|
46
|
+
if (w) {
|
|
47
|
+
const e = o.map((i) => i.value), n = t.filter((i) => !e.includes(i));
|
|
48
|
+
u !== void 0 ? u(n) : d();
|
|
45
49
|
} else {
|
|
46
|
-
const e = [...
|
|
47
|
-
o.forEach((
|
|
48
|
-
e.includes(
|
|
49
|
-
}), u !== void 0 ? u(e) : o.forEach((
|
|
50
|
-
|
|
50
|
+
const e = [...t];
|
|
51
|
+
o.forEach((n) => {
|
|
52
|
+
e.includes(n.value) || e.push(n.value);
|
|
53
|
+
}), u !== void 0 ? u(e) : o.forEach((n) => {
|
|
54
|
+
t.includes(n.value) || x(n.value);
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
};
|
|
54
|
-
return /* @__PURE__ */ l("div", { ref:
|
|
58
|
+
return /* @__PURE__ */ l("div", { ref: g, className: "relative w-full", children: [
|
|
55
59
|
/* @__PURE__ */ l(
|
|
56
60
|
"button",
|
|
57
61
|
{
|
|
58
62
|
type: "button",
|
|
59
63
|
disabled: f,
|
|
60
64
|
onClick: () => {
|
|
61
|
-
f ||
|
|
65
|
+
f || N((e) => (e && p(""), !e));
|
|
62
66
|
},
|
|
63
|
-
className:
|
|
67
|
+
className: I(M, "w-full", a && "ring-2 ring-ring ring-offset-2", t.length === 0 && "text-muted-foreground"),
|
|
64
68
|
children: [
|
|
65
|
-
/* @__PURE__ */ r("span", { className: "truncate", children:
|
|
66
|
-
var t;
|
|
67
|
-
return ((t = i.find((s) => s.value === e)) == null ? void 0 : t.label) ?? e;
|
|
68
|
-
}).join(", ") }),
|
|
69
|
+
/* @__PURE__ */ r("span", { className: "truncate", children: t.length === 0 ? R : y.join(", ") }),
|
|
69
70
|
/* @__PURE__ */ l("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
70
|
-
|
|
71
|
+
C > 0 && /* @__PURE__ */ l("span", { className: "rounded-control bg-muted px-1.5 py-0.5 text-xs font-medium text-foreground", children: [
|
|
72
|
+
"+",
|
|
73
|
+
C
|
|
74
|
+
] }),
|
|
75
|
+
t.length > 0 && !f && /* @__PURE__ */ r(
|
|
71
76
|
"span",
|
|
72
77
|
{
|
|
73
78
|
role: "button",
|
|
@@ -79,43 +84,43 @@ const K = ({
|
|
|
79
84
|
e.preventDefault(), e.stopPropagation(), d();
|
|
80
85
|
},
|
|
81
86
|
className: "text-muted-foreground hover:text-foreground",
|
|
82
|
-
children: /* @__PURE__ */ r(
|
|
87
|
+
children: /* @__PURE__ */ r(O, { className: "size-4" })
|
|
83
88
|
}
|
|
84
89
|
),
|
|
85
|
-
/* @__PURE__ */ r(
|
|
90
|
+
/* @__PURE__ */ r(P, { className: I("size-4 opacity-50 shrink-0 transition-transform", a && "rotate-180") })
|
|
86
91
|
] })
|
|
87
92
|
]
|
|
88
93
|
}
|
|
89
94
|
),
|
|
90
95
|
a ? /* @__PURE__ */ l("div", { className: "absolute left-0 right-0 top-[calc(100%+4px)] z-[100] rounded-surface border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: [
|
|
91
96
|
m ? /* @__PURE__ */ r("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
92
|
-
/* @__PURE__ */ r(
|
|
97
|
+
/* @__PURE__ */ r(S, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
93
98
|
/* @__PURE__ */ r(
|
|
94
99
|
"input",
|
|
95
100
|
{
|
|
96
|
-
ref:
|
|
101
|
+
ref: k,
|
|
97
102
|
className: "w-full rounded-control bg-muted/50 py-1.5 pl-7 pr-2 text-sm text-foreground placeholder:text-muted-foreground outline-none focus:ring-1 focus:ring-ring",
|
|
98
|
-
placeholder:
|
|
103
|
+
placeholder: j,
|
|
99
104
|
value: c,
|
|
100
105
|
onChange: (e) => {
|
|
101
|
-
|
|
106
|
+
p(e.target.value);
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
109
|
)
|
|
105
110
|
] }) }) : null,
|
|
106
111
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-0.5 max-h-56 overflow-y-auto p-1.5 scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-track]:bg-transparent", children: [
|
|
107
112
|
o.length > 0 && /* @__PURE__ */ l("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
|
|
108
|
-
/* @__PURE__ */ r(
|
|
113
|
+
/* @__PURE__ */ r(T, { checked: w, onCheckedChange: D }),
|
|
109
114
|
"Tout sélectionner"
|
|
110
115
|
] }),
|
|
111
116
|
o.length === 0 && /* @__PURE__ */ r("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
|
|
112
117
|
o.map((e) => /* @__PURE__ */ l("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
|
|
113
118
|
/* @__PURE__ */ r(
|
|
114
|
-
|
|
119
|
+
T,
|
|
115
120
|
{
|
|
116
|
-
checked:
|
|
121
|
+
checked: t.includes(e.value),
|
|
117
122
|
onCheckedChange: () => {
|
|
118
|
-
|
|
123
|
+
x(e.value);
|
|
119
124
|
}
|
|
120
125
|
}
|
|
121
126
|
),
|
|
@@ -123,7 +128,7 @@ const K = ({
|
|
|
123
128
|
e.label
|
|
124
129
|
] }, e.value))
|
|
125
130
|
] }),
|
|
126
|
-
|
|
131
|
+
t.length > 0 && /* @__PURE__ */ r("div", { className: "border-t border-border p-1.5", children: /* @__PURE__ */ r(
|
|
127
132
|
"button",
|
|
128
133
|
{
|
|
129
134
|
type: "button",
|
|
@@ -136,5 +141,5 @@ const K = ({
|
|
|
136
141
|
] });
|
|
137
142
|
};
|
|
138
143
|
export {
|
|
139
|
-
|
|
144
|
+
Z as M
|
|
140
145
|
};
|
|
@@ -15,7 +15,7 @@ import { S as Z, h as q, i as ee, a as re, c as te } from "./select-BpjFWqAY.js"
|
|
|
15
15
|
import "next-themes";
|
|
16
16
|
import "sonner";
|
|
17
17
|
import { c as T } from "./tailwind.helper-B6yFEsav.js";
|
|
18
|
-
import { M as le } from "./MultiSelect-
|
|
18
|
+
import { M as le } from "./MultiSelect-CqcbwKYV.js";
|
|
19
19
|
const L = (a, n, c = {}) => {
|
|
20
20
|
if (n instanceof Date)
|
|
21
21
|
return n.toLocaleDateString("fr-FR");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as i, C as s, F as g } from "../../../ConfirmationDialog-
|
|
1
|
+
import { A as i, C as s, F as g } from "../../../ConfirmationDialog-9CKgZoNY.js";
|
|
2
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-D6c-gM1D.js";
|
|
3
3
|
export {
|
|
4
4
|
i as AppDialog,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { D as r, M as o } from "../../MetricCard-CvQFjIOb.js";
|
|
2
2
|
import { K as t, a as i, S as l, b as p } from "../../SkeletonCards-BvJYF_LK.js";
|
|
3
|
-
import { A as m, C as d, F as g } from "../../ConfirmationDialog-
|
|
3
|
+
import { A as m, C as d, F as g } from "../../ConfirmationDialog-9CKgZoNY.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-D6c-gM1D.js";
|
|
5
|
-
import { A as k, a as H, F as I, S as K, T as v } from "../../TableFilter-
|
|
6
|
-
import { G as M } from "../../GenericForm-
|
|
5
|
+
import { A as k, a as H, F as I, S as K, T as v } from "../../TableFilter-CWDy_RHA.js";
|
|
6
|
+
import { G as M } from "../../GenericForm-B39toMkE.js";
|
|
7
7
|
import { I as L } from "../../ImageInput-BoYUZx9H.js";
|
|
8
8
|
import { D as G, a as N, S as O, b as R } from "../../SearchInput-ClZbbRWg.js";
|
|
9
|
-
import { M as j } from "../../MultiSelect-
|
|
9
|
+
import { M as j } from "../../MultiSelect-CqcbwKYV.js";
|
|
10
10
|
import { A as w } from "../../AppActions-DEkRxBia.js";
|
|
11
|
-
import { A as J, K as Q } from "../../KpiCardsLayout-
|
|
11
|
+
import { A as J, K as Q } from "../../KpiCardsLayout-mQ7AcbqA.js";
|
|
12
12
|
import { A as W } from "../../AppSubTitle-ChCtQ7Sv.js";
|
|
13
|
-
import { A as Y } from "../../AppTitle-
|
|
13
|
+
import { A as Y } from "../../AppTitle-D15YXeMx.js";
|
|
14
14
|
import { S as _, a as $, b as aa, T as ea } from "../../Topbar-CFmKB_S2.js";
|
|
15
15
|
import { E as oa } from "../../ErrorAlert-SrIcU1mM.js";
|
|
16
16
|
import { E as ta } from "../../ErrorState-CmaxuJyW.js";
|
|
17
17
|
import { L as la } from "../../LoadingState-BN0YaPSs.js";
|
|
18
18
|
import { D as ba, T as ma, a as da, b as ga, c as fa, d as Aa, e as Da } from "../../DataTable-ny08K506.js";
|
|
19
|
-
import { A as na, a as ca, b as xa, c as Sa } from "../../AppVerticalTabs-
|
|
19
|
+
import { A as na, a as ca, b as xa, c as Sa } from "../../AppVerticalTabs-D8fURUUN.js";
|
|
20
20
|
import { T as Fa } from "../../ThemeSelector-BFC37dSl.js";
|
|
21
21
|
export {
|
|
22
22
|
k as ActiveFilters,
|
|
@@ -10,7 +10,9 @@ interface MultiSelectProps {
|
|
|
10
10
|
searchable?: boolean;
|
|
11
11
|
searchPlaceholder?: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
+
/** Nombre de libellés affichés dans le trigger, le reste est résumé par un compteur `+N`. */
|
|
14
|
+
maxCount?: number;
|
|
13
15
|
}
|
|
14
|
-
export declare const MultiSelect: ({ options, selected, onToggle, onClear, onSelectAll, placeholder, searchable, searchPlaceholder, disabled, }: MultiSelectProps) => React.ReactElement;
|
|
16
|
+
export declare const MultiSelect: ({ options, selected, onToggle, onClear, onSelectAll, placeholder, searchable, searchPlaceholder, disabled, maxCount, }: MultiSelectProps) => React.ReactElement;
|
|
15
17
|
export {};
|
|
16
18
|
//# sourceMappingURL=MultiSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,UAAU,gBAAgB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAIpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,UAAU,gBAAgB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,GAAI,wHAWzB,gBAAgB,KAAG,KAAK,CAAC,YAyK3B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as r } from "../../../ImageInput-BoYUZx9H.js";
|
|
2
2
|
import { D as c, a as o, S as s, b as p } from "../../../SearchInput-ClZbbRWg.js";
|
|
3
|
-
import { M as l } from "../../../MultiSelect-
|
|
3
|
+
import { M as l } from "../../../MultiSelect-CqcbwKYV.js";
|
|
4
4
|
export {
|
|
5
5
|
c as DatePicker,
|
|
6
6
|
o as DateRangePicker,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as r } from "../../../AppActions-DEkRxBia.js";
|
|
2
|
-
import { A as e, K as A } from "../../../KpiCardsLayout-
|
|
2
|
+
import { A as e, K as A } from "../../../KpiCardsLayout-mQ7AcbqA.js";
|
|
3
3
|
import { A as s } from "../../../AppSubTitle-ChCtQ7Sv.js";
|
|
4
|
-
import { A as i } from "../../../AppTitle-
|
|
4
|
+
import { A as i } from "../../../AppTitle-D15YXeMx.js";
|
|
5
5
|
export {
|
|
6
6
|
r as AppActions,
|
|
7
7
|
e as AppPageHeader,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/core/tabs/AppTabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO;IACvC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"AppTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/core/tabs/AppTabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO;IACvC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqCpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppVerticalTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/core/tabs/AppVerticalTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,OAAO;IAC/C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,GAAI,gBAAgB,oBAAoB,KAAG,KAAK,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"AppVerticalTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/core/tabs/AppVerticalTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,OAAO;IAC/C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,GAAI,gBAAgB,oBAAoB,KAAG,KAAK,CAAC,GAAG,CAAC,OAoFhF,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { D as o, M as r } from "../MetricCard-CvQFjIOb.js";
|
|
2
2
|
import { K as t, a as n, S as i, b as l } from "../SkeletonCards-BvJYF_LK.js";
|
|
3
|
-
import { A as p, C as u, F as g } from "../ConfirmationDialog-
|
|
3
|
+
import { A as p, C as u, F as g } from "../ConfirmationDialog-9CKgZoNY.js";
|
|
4
4
|
import { A as C, j as m, k as T, l as S, 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 Ca, ac as ma, ad as Ta, ae as Sa, 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 Ce, aU as me, aV as Te, aW as Se, 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 Co, bI as mo, bJ as To, bK as So, 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-D6c-gM1D.js";
|
|
5
|
-
import { A as Vo, a as Ko, F as zo, S as Uo, T as jo } from "../TableFilter-
|
|
6
|
-
import { G as Jo } from "../GenericForm-
|
|
5
|
+
import { A as Vo, a as Ko, F as zo, S as Uo, T as jo } from "../TableFilter-CWDy_RHA.js";
|
|
6
|
+
import { G as Jo } from "../GenericForm-B39toMkE.js";
|
|
7
7
|
import { I as Wo } from "../ImageInput-BoYUZx9H.js";
|
|
8
8
|
import { D as Yo, a as Zo, S as _o, b as $o } from "../SearchInput-ClZbbRWg.js";
|
|
9
|
-
import { M as er } from "../MultiSelect-
|
|
9
|
+
import { M as er } from "../MultiSelect-CqcbwKYV.js";
|
|
10
10
|
import { A as rr } from "../AppActions-DEkRxBia.js";
|
|
11
|
-
import { A as tr, K as nr } from "../KpiCardsLayout-
|
|
11
|
+
import { A as tr, K as nr } from "../KpiCardsLayout-mQ7AcbqA.js";
|
|
12
12
|
import { A as lr } from "../AppSubTitle-ChCtQ7Sv.js";
|
|
13
|
-
import { A as pr } from "../AppTitle-
|
|
13
|
+
import { A as pr } from "../AppTitle-D15YXeMx.js";
|
|
14
14
|
import { S as gr, a as dr, b as Cr, T as mr } from "../Topbar-CFmKB_S2.js";
|
|
15
15
|
import { E as Sr } from "../ErrorAlert-SrIcU1mM.js";
|
|
16
16
|
import { E as Dr } from "../ErrorState-CmaxuJyW.js";
|
|
17
17
|
import { L as xr } from "../LoadingState-BN0YaPSs.js";
|
|
18
18
|
import { D as Ir, T as Pr, a as hr, b as fr, c as wr, d as vr, e as Fr } from "../DataTable-ny08K506.js";
|
|
19
|
-
import { A as Br, a as Gr, b as Hr, c as Rr } from "../AppVerticalTabs-
|
|
19
|
+
import { A as Br, a as Gr, b as Hr, c as Rr } from "../AppVerticalTabs-D8fURUUN.js";
|
|
20
20
|
import { T as Nr } from "../ThemeSelector-BFC37dSl.js";
|
|
21
21
|
import { A as Er, a as Or, b as Vr } from "../alert-B9F1N9Qk.js";
|
|
22
22
|
import { A as zr, C as Ur, a as jr, b as qr, R as Jr, c as Qr, d as Wr, T as Xr, e as Yr } from "../toaster-B6XKMRwI.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
3
|
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
4
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
5
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
6
6
|
declare const useFormField: () => {
|
|
7
7
|
invalid: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAc,eAAe,EAAE,SAAS,EAAE,WAAW,EAAgC,MAAM,iBAAiB,CAAC;AAKpH,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAc,eAAe,EAAE,SAAS,EAAE,WAAW,EAAgC,MAAM,iBAAiB,CAAC;AAKpH,QAAA,MAAM,IAAI,8ZAAe,CAAC;AAQ1B,QAAA,MAAM,SAAS,GAAI,YAAY,SAAS,WAAW,GAAG,WAAW,EAAE,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,cAEjI,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAQF,QAAA,MAAM,QAAQ,6GAQZ,CAAC;AAGH,QAAA,MAAM,SAAS,yJAMd,CAAC;AAGF,QAAA,MAAM,WAAW;;gFAYf,CAAC;AAGH,QAAA,MAAM,eAAe,yHAInB,CAAC;AAGH,QAAA,MAAM,WAAW,yHAaf,CAAC;AAGH,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krosoft/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.181",
|
|
4
4
|
"description": "Krosoft shared React package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@krosoft/core": ">=0.0.1",
|
|
34
34
|
"next-themes": ">=0.4.6",
|
|
35
35
|
"react": ">=19.2.7",
|
|
36
|
-
"react-i18next": ">=17.0.
|
|
36
|
+
"react-i18next": ">=17.0.10",
|
|
37
37
|
"react-router-dom": ">=7.18.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"date-fns": "^4.4.0",
|
|
80
80
|
"embla-carousel-react": "^8.6.0",
|
|
81
81
|
"input-otp": "^1.4.2",
|
|
82
|
-
"lucide-react": "^1.
|
|
82
|
+
"lucide-react": "^1.25.0",
|
|
83
83
|
"react-day-picker": "^10.0.1",
|
|
84
|
-
"react-hook-form": "^7.
|
|
84
|
+
"react-hook-form": "^7.82.0",
|
|
85
85
|
"react-resizable-panels": "^4.12.2",
|
|
86
86
|
"recharts": "^3.9.2",
|
|
87
87
|
"sonner": "^2.0.7",
|
|
@@ -95,24 +95,24 @@
|
|
|
95
95
|
"@krosoft/tooling-eslint-react": "^0.0.26",
|
|
96
96
|
"@krosoft/tooling-prettier": "^0.0.18",
|
|
97
97
|
"@krosoft/tooling-tsconfig-react": "^0.0.10",
|
|
98
|
-
"@storybook/addon-docs": "^10.5.
|
|
99
|
-
"@storybook/addon-themes": "^10.5.
|
|
100
|
-
"@storybook/react-vite": "^10.5.
|
|
98
|
+
"@storybook/addon-docs": "^10.5.2",
|
|
99
|
+
"@storybook/addon-themes": "^10.5.2",
|
|
100
|
+
"@storybook/react-vite": "^10.5.2",
|
|
101
101
|
"@testing-library/dom": "^10.4.1",
|
|
102
102
|
"@testing-library/react": "^16.3.2",
|
|
103
103
|
"@types/node": "^25.9.5",
|
|
104
104
|
"@types/react": "^19.2.17",
|
|
105
105
|
"@types/react-dom": "^19.2.3",
|
|
106
|
-
"autoprefixer": "^10.5.
|
|
107
|
-
"eslint-plugin-storybook": "10.5.
|
|
106
|
+
"autoprefixer": "^10.5.4",
|
|
107
|
+
"eslint-plugin-storybook": "10.5.7",
|
|
108
108
|
"jsdom": "^29.1.1",
|
|
109
109
|
"next-themes": "^0.4.6",
|
|
110
110
|
"prettier": "^3.9.6",
|
|
111
111
|
"react": "^19.2.7",
|
|
112
112
|
"react-dom": "^19.2.7",
|
|
113
|
-
"react-i18next": "^17.0.
|
|
113
|
+
"react-i18next": "^17.0.10",
|
|
114
114
|
"react-router-dom": "^7.18.1",
|
|
115
|
-
"storybook": "^10.5.
|
|
115
|
+
"storybook": "^10.5.2",
|
|
116
116
|
"tailwindcss": "^3.4.19",
|
|
117
117
|
"tsc-alias": "^1.9.1",
|
|
118
118
|
"typescript": "^5.9.3",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { c as r } from "./tailwind.helper-B6yFEsav.js";
|
|
3
|
-
import { useTranslation as s } from "react-i18next";
|
|
4
|
-
function d({ titleKey: x, descriptionKey: t, isSubTitle: e }) {
|
|
5
|
-
const { t: l } = s();
|
|
6
|
-
return /* @__PURE__ */ m("div", { className: "flex flex-col gap-1", children: [
|
|
7
|
-
/* @__PURE__ */ o("h1", { className: e ? "text-xl md:text-2xl font-semibold" : "text-xl md:text-3xl font-bold", children: l(x) ?? "" }),
|
|
8
|
-
t ? /* @__PURE__ */ o("p", { className: r("text-muted-foreground", e && "text-sm"), children: l(t) }) : null
|
|
9
|
-
] });
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
d as A
|
|
13
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "./toggle-group-D6c-gM1D.js";
|
|
3
|
-
import "./alert-B9F1N9Qk.js";
|
|
4
|
-
import "@radix-ui/react-aspect-ratio";
|
|
5
|
-
import { B as c } from "./tooltip-DVeqVwqV.js";
|
|
6
|
-
import "@radix-ui/react-collapsible";
|
|
7
|
-
import "./sheet-B_uq6-K_.js";
|
|
8
|
-
import { ArrowLeftIcon as l } from "lucide-react";
|
|
9
|
-
import "react-resizable-panels";
|
|
10
|
-
import "clsx";
|
|
11
|
-
import "tailwind-merge";
|
|
12
|
-
import "./select-BpjFWqAY.js";
|
|
13
|
-
import "next-themes";
|
|
14
|
-
import "sonner";
|
|
15
|
-
import "react";
|
|
16
|
-
import { A as f } from "./AppActions-DEkRxBia.js";
|
|
17
|
-
import { A as u } from "./AppTitle-uboDuil4.js";
|
|
18
|
-
import { u as d } from "./useDocumentTitle-WNwdPz-I.js";
|
|
19
|
-
import { useTranslation as x } from "react-i18next";
|
|
20
|
-
import "@krosoft/core/helpers";
|
|
21
|
-
import { b as g, a as h } from "./SkeletonCards-BvJYF_LK.js";
|
|
22
|
-
import { E as A } from "./ErrorState-CmaxuJyW.js";
|
|
23
|
-
function M({
|
|
24
|
-
icon: t,
|
|
25
|
-
titleKey: e,
|
|
26
|
-
descriptionKey: i,
|
|
27
|
-
actions: a,
|
|
28
|
-
onBack: s,
|
|
29
|
-
renderPreActions: m,
|
|
30
|
-
className: p
|
|
31
|
-
}) {
|
|
32
|
-
const { t: n } = x();
|
|
33
|
-
return d(n(e)), /* @__PURE__ */ o("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4", children: [
|
|
34
|
-
/* @__PURE__ */ o("div", { className: "flex items-center gap-4", children: [
|
|
35
|
-
s && /* @__PURE__ */ r(c, { variant: "ghost", size: "icon", onClick: s, children: /* @__PURE__ */ r(l, { className: "h-4 w-4" }) }),
|
|
36
|
-
t && /* @__PURE__ */ r("div", { className: "size-12 bg-blue-100 rounded-control flex items-center justify-center", children: /* @__PURE__ */ r(t, { className: "h-6 w-6 text-blue-600" }) }),
|
|
37
|
-
/* @__PURE__ */ r(u, { titleKey: e, descriptionKey: i })
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ o("div", { className: "flex items-center gap-4", children: [
|
|
40
|
-
m && m(),
|
|
41
|
-
/* @__PURE__ */ r(f, { actions: a, className: p })
|
|
42
|
-
] })
|
|
43
|
-
] });
|
|
44
|
-
}
|
|
45
|
-
const O = ({ stats: t, isLoading: e, error: i }) => e ? /* @__PURE__ */ r(g, { count: 4 }) : i ? /* @__PURE__ */ r(A, { message: i.message }) : /* @__PURE__ */ r(h, { stats: t });
|
|
46
|
-
export {
|
|
47
|
-
M as A,
|
|
48
|
-
O as K
|
|
49
|
-
};
|