@krosoft/react 0.0.147 → 0.0.148
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.
|
@@ -12,7 +12,7 @@ import "tailwind-merge";
|
|
|
12
12
|
import "./select-MWzbMBAS.js";
|
|
13
13
|
import "next-themes";
|
|
14
14
|
import "sonner";
|
|
15
|
-
import { useState as
|
|
15
|
+
import { useState as w, useEffect as ee } from "react";
|
|
16
16
|
import { useTranslation as O } from "react-i18next";
|
|
17
17
|
import { G as le } from "./GenericForm-Cy5ntJxi.js";
|
|
18
18
|
import { E as ie } from "./ErrorAlert-DH1onuyt.js";
|
|
@@ -31,11 +31,11 @@ function re({ open: t, onOpenChange: c, config: l, isLoading: u, error: s, child
|
|
|
31
31
|
/* @__PURE__ */ e(L, { className: "size-4" }),
|
|
32
32
|
/* @__PURE__ */ e(_, { className: "break-words overflow-wrap-anywhere max-w-full", children: s.message })
|
|
33
33
|
] }) }) : null,
|
|
34
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-6
|
|
35
|
-
n !== void 0 && n.length > 0 ? /* @__PURE__ */ e("div", { className: "rounded-b-lg border-t border-gray-200 dark:border-gray-700 shrink-0 p-6 light:bg-gradient-to-r light:from-gray-50 light:to-gray-100 dark:bg-gray-950", children: /* @__PURE__ */ e("div", { className: "flex justify-end gap-3", children: n.map((a,
|
|
34
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: p }),
|
|
35
|
+
n !== void 0 && n.length > 0 ? /* @__PURE__ */ e("div", { className: "rounded-b-lg border-t border-gray-200 dark:border-gray-700 shrink-0 p-6 light:bg-gradient-to-r light:from-gray-50 light:to-gray-100 dark:bg-gray-950", children: /* @__PURE__ */ e("div", { className: "flex justify-end gap-3", children: n.map((a, y) => /* @__PURE__ */ r(v, { variant: a.variant ?? "default", onClick: a.onClick, disabled: a.disabled === !0 || u === !0, children: [
|
|
36
36
|
a.icon !== void 0 ? /* @__PURE__ */ e(a.icon, { className: "size-4" }) : null,
|
|
37
37
|
i(a.label)
|
|
38
|
-
] },
|
|
38
|
+
] }, y)) }) }) : null
|
|
39
39
|
] }) });
|
|
40
40
|
}
|
|
41
41
|
function De({
|
|
@@ -52,16 +52,16 @@ function De({
|
|
|
52
52
|
saveLabel: g = "Sauvegarder",
|
|
53
53
|
cancelLabel: n = "Annuler",
|
|
54
54
|
hideSaveIcon: a = !1,
|
|
55
|
-
maxWidth:
|
|
55
|
+
maxWidth: y = "sm:max-w-4xl",
|
|
56
56
|
isLoading: h = !1
|
|
57
57
|
}) {
|
|
58
|
-
const [N, x] =
|
|
58
|
+
const [N, x] = w(m), [o, A] = w(!1), [C, P] = w(null);
|
|
59
59
|
if (ee(() => {
|
|
60
60
|
t && x(m);
|
|
61
61
|
}, [t, m]), l == null) return null;
|
|
62
62
|
const z = () => {
|
|
63
63
|
N ? i !== void 0 && C && C() : x(!0);
|
|
64
|
-
},
|
|
64
|
+
}, k = () => {
|
|
65
65
|
x(!1);
|
|
66
66
|
}, E = () => {
|
|
67
67
|
i !== void 0 && C && C();
|
|
@@ -79,7 +79,7 @@ function De({
|
|
|
79
79
|
}, D = [];
|
|
80
80
|
i !== void 0 && (N ? (n !== "" && D.push({
|
|
81
81
|
label: n,
|
|
82
|
-
onClick:
|
|
82
|
+
onClick: k,
|
|
83
83
|
variant: "outline",
|
|
84
84
|
disabled: o || h,
|
|
85
85
|
icon: S
|
|
@@ -97,7 +97,7 @@ function De({
|
|
|
97
97
|
}));
|
|
98
98
|
const H = {
|
|
99
99
|
title: u(l),
|
|
100
|
-
maxWidth:
|
|
100
|
+
maxWidth: y,
|
|
101
101
|
actions: f ? D : []
|
|
102
102
|
};
|
|
103
103
|
return /* @__PURE__ */ e(
|
|
@@ -105,7 +105,7 @@ function De({
|
|
|
105
105
|
{
|
|
106
106
|
open: t,
|
|
107
107
|
onOpenChange: (d) => {
|
|
108
|
-
c(d), d ||
|
|
108
|
+
c(d), d || k();
|
|
109
109
|
},
|
|
110
110
|
config: H,
|
|
111
111
|
isLoading: o || h,
|
|
@@ -129,7 +129,7 @@ function De({
|
|
|
129
129
|
),
|
|
130
130
|
b !== void 0 ? b(l) : null,
|
|
131
131
|
i !== void 0 && !f ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children: N ? /* @__PURE__ */ r(M, { children: [
|
|
132
|
-
n !== "" ? /* @__PURE__ */ r(v, { onClick:
|
|
132
|
+
n !== "" ? /* @__PURE__ */ r(v, { onClick: k, variant: "outline", size: "sm", disabled: o || h, children: [
|
|
133
133
|
/* @__PURE__ */ e(S, { className: "size-4 mr-2" }),
|
|
134
134
|
n
|
|
135
135
|
] }) : null,
|
|
@@ -145,7 +145,7 @@ function De({
|
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function ye({ isLoading: t, error: c, config: l, destructive: u = !1 }) {
|
|
149
149
|
const { t: s } = O();
|
|
150
150
|
if (!l) return null;
|
|
151
151
|
const p = (i) => {
|
|
@@ -180,6 +180,6 @@ function ke({ isLoading: t, error: c, config: l, destructive: u = !1 }) {
|
|
|
180
180
|
}
|
|
181
181
|
export {
|
|
182
182
|
re as A,
|
|
183
|
-
|
|
183
|
+
ye as C,
|
|
184
184
|
De as F
|
|
185
185
|
};
|
|
@@ -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-wGKgYkmd.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-BASGy2mQ.js";
|
|
3
3
|
export {
|
|
4
4
|
i as AppDialog,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as r, M as o } from "../../MetricCard-D-qPl6zh.js";
|
|
2
2
|
import { K as t, a as i, S as l, b as p } from "../../SkeletonCards-qHukR79N.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-wGKgYkmd.js";
|
|
4
4
|
import { D as A, a as D, b as T, c as n, d as c, e as x, f as S, g as C, h as F, i as P, P as h } from "../../toggle-group-BASGy2mQ.js";
|
|
5
5
|
import { A as k, a as H, F as I, S as K, T as v } from "../../TableFilter-rjiss-d9.js";
|
|
6
6
|
import { G as M } from "../../GenericForm-Cy5ntJxi.js";
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as o, M as r } from "../MetricCard-D-qPl6zh.js";
|
|
2
2
|
import { K as t, a as n, S as i, b as l } from "../SkeletonCards-qHukR79N.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-wGKgYkmd.js";
|
|
4
4
|
import { A as m, j as C, k as S, l as T, m as c, n as D, o as M, p as x, q as A, r as I, s as P, t as h, u as f, v as w, w as v, x as F, B as L, y as B, z as G, C as H, E as R, F as k, G as N, H as y, I as E, J as O, K as V, L as K, M as z, N as U, O as j, Q as q, R as J, S as Q, T as W, U as X, V as Y, W as Z, X as _, Y as $, Z as aa, _ as ea, $ as oa, a0 as ra, a1 as sa, a2 as ta, a3 as na, a4 as ia, a5 as la, a6 as ba, a7 as pa, a8 as ua, a9 as ga, aa as da, ab as ma, ac as Ca, ad as Sa, ae as Ta, af as ca, ag as Da, ah as Ma, ai as xa, aj as Aa, ak as Ia, al as Pa, am as ha, an as fa, D as wa, a as va, b as Fa, c as La, d as Ba, e as Ga, f as Ha, g as Ra, h as ka, i as Na, ao as ya, ap as Ea, aq as Oa, ar as Va, as as Ka, at as za, au as Ua, av as ja, aw as qa, ax as Ja, ay as Qa, az as Wa, aA as Xa, aB as Ya, aC as Za, aD as _a, aE as $a, aF as ae, aG as ee, aH as oe, aI as re, aJ as se, aK as te, aL as ne, aM as ie, aN as le, aO as be, aP as pe, aQ as ue, aR as ge, aS as de, aT as me, aU as Ce, aV as Se, aW as Te, aX as ce, aY as De, aZ as Me, a_ as xe, a$ as Ae, b0 as Ie, b1 as Pe, b2 as he, b3 as fe, b4 as we, b5 as ve, b6 as Fe, b7 as Le, b8 as Be, b9 as Ge, ba as He, bb as Re, bc as ke, bd as Ne, be as ye, bf as Ee, bg as Oe, bh as Ve, bi as Ke, bj as ze, bk as Ue, bl as je, bm as qe, bn as Je, bo as Qe, bp as We, bq as Xe, br as Ye, bs as Ze, bt as _e, bu as $e, bv as ao, bw as eo, bx as oo, P as ro, by as so, bz as to, bA as no, bB as io, bC as lo, bD as bo, bE as po, bF as uo, bG as go, bH as mo, bI as Co, bJ as So, bK as To, bL as co, bM as Do, bN as Mo, bO as xo, bP as Ao, bQ as Io, bR as Po, bS as ho, bT as fo, bU as wo, bV as vo, bW as Fo, bX as Lo, bY as Bo, bZ as Go, b_ as Ho, b$ as Ro, c0 as ko, c1 as No, c2 as yo, c3 as Eo } from "../toggle-group-BASGy2mQ.js";
|
|
5
5
|
import { A as Vo, a as Ko, F as zo, S as Uo, T as jo } from "../TableFilter-rjiss-d9.js";
|
|
6
6
|
import { G as Jo } from "../GenericForm-Cy5ntJxi.js";
|