@krosoft/react 0.0.179 → 0.0.180
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/KpiCardsLayout-mQ7AcbqA.js +49 -0
- package/dist/components/core/index.js +3 -3
- 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 +3 -3
- 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
|
};
|
|
@@ -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
|
+
};
|
|
@@ -8,15 +8,15 @@ 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
9
|
import { M as j } from "../../MultiSelect-DF7-91OW.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,
|
|
@@ -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
|
@@ -8,15 +8,15 @@ 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
9
|
import { M as er } from "../MultiSelect-DF7-91OW.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.180",
|
|
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
|
-
};
|