@krosoft/react 0.0.180 → 0.0.182
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/{ConfirmationDialog-Ht4e-1Lg.js → ConfirmationDialog-BPXA2g3g.js} +35 -35
- package/dist/{GenericForm-COQEdT9e.js → GenericForm-B39toMkE.js} +1 -1
- 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 +4 -4
- 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/index.js +4 -4
- package/dist/tailwind/index.d.ts +10 -10
- package/dist/tailwind/index.d.ts.map +1 -1
- package/dist/tailwind/index.js +7 -3
- package/package.json +1 -1
|
@@ -12,30 +12,30 @@ import "tailwind-merge";
|
|
|
12
12
|
import "./select-BpjFWqAY.js";
|
|
13
13
|
import "next-themes";
|
|
14
14
|
import "sonner";
|
|
15
|
-
import { useState as
|
|
15
|
+
import { useState as y, 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
|
-
const { t: i } = O(), { title: b, description:
|
|
21
|
-
return /* @__PURE__ */ e(q, { open: t, onOpenChange: c, children: /* @__PURE__ */ r(B, { className: `${g} max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
|
|
20
|
+
const { t: i } = O(), { title: b, description: d, icon: f, maxWidth: g = "sm:max-w-xl", actions: n } = l;
|
|
21
|
+
return /* @__PURE__ */ e(q, { open: t, onOpenChange: c, children: /* @__PURE__ */ r(B, { className: `${g} max-h-[100dvh] sm:max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
|
|
22
22
|
u === !0 ? /* @__PURE__ */ e("div", { className: "absolute top-0 left-0 right-0 z-10", children: /* @__PURE__ */ e(R, { indeterminate: !0, className: "h-1 rounded-none" }) }) : null,
|
|
23
|
-
/* @__PURE__ */ r(W, { className: "bg-gradient-to-r from-slate-900 to-purple-700 p-6 rounded-t-surface shrink-0", children: [
|
|
24
|
-
/* @__PURE__ */ r(X, { className: "text-2xl font-bold flex items-center gap-2 text-white", children: [
|
|
23
|
+
/* @__PURE__ */ r(W, { className: "bg-gradient-to-r from-slate-900 to-purple-700 p-4 sm:p-6 sm:rounded-t-surface shrink-0", children: [
|
|
24
|
+
/* @__PURE__ */ r(X, { className: "text-xl sm:text-2xl font-bold flex items-center gap-2 text-white", children: [
|
|
25
25
|
f !== void 0 ? /* @__PURE__ */ e("div", { className: "p-2 bg-white/20 rounded-control", children: /* @__PURE__ */ e(f, { className: "size-4 text-white" }) }) : null,
|
|
26
26
|
i(b)
|
|
27
27
|
] }),
|
|
28
|
-
|
|
28
|
+
d !== void 0 && d !== "" ? /* @__PURE__ */ e($, { className: "text-indigo-100 text-base", children: i(d) }) : null
|
|
29
29
|
] }),
|
|
30
30
|
s != null ? /* @__PURE__ */ e("div", { className: "px-6 ", children: /* @__PURE__ */ r(Z, { variant: "destructive", className: "max-w-full", children: [
|
|
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 py-4", children: p }),
|
|
35
|
-
n !== void 0 && n.length > 0 ? /* @__PURE__ */ e("div", { className: "rounded-b-surface 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-4 sm:px-6 py-4", children: p }),
|
|
35
|
+
n !== void 0 && n.length > 0 ? /* @__PURE__ */ e("div", { className: "sm:rounded-b-surface border-t border-gray-200 dark:border-gray-700 shrink-0 p-4 sm: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, k) => /* @__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
|
+
] }, k)) }) }) : null
|
|
39
39
|
] }) });
|
|
40
40
|
}
|
|
41
41
|
function De({
|
|
@@ -47,29 +47,29 @@ function De({
|
|
|
47
47
|
schema: p,
|
|
48
48
|
onSave: i,
|
|
49
49
|
customFooter: b,
|
|
50
|
-
defaultEditing:
|
|
50
|
+
defaultEditing: d = !1,
|
|
51
51
|
footerActions: f = !0,
|
|
52
52
|
saveLabel: g = "Sauvegarder",
|
|
53
53
|
cancelLabel: n = "Annuler",
|
|
54
54
|
hideSaveIcon: a = !1,
|
|
55
|
-
maxWidth:
|
|
55
|
+
maxWidth: k = "sm:max-w-4xl",
|
|
56
56
|
isLoading: h = !1
|
|
57
57
|
}) {
|
|
58
|
-
const [
|
|
58
|
+
const [x, N] = y(d), [o, A] = y(!1), [C, P] = y(null);
|
|
59
59
|
if (ee(() => {
|
|
60
|
-
t &&
|
|
61
|
-
}, [t,
|
|
60
|
+
t && N(d);
|
|
61
|
+
}, [t, d]), l == null) return null;
|
|
62
62
|
const z = () => {
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
63
|
+
x ? i !== void 0 && C && C() : N(!0);
|
|
64
|
+
}, w = () => {
|
|
65
|
+
N(!1);
|
|
66
66
|
}, E = () => {
|
|
67
67
|
i !== void 0 && C && C();
|
|
68
|
-
}, G = async (
|
|
68
|
+
}, G = async (m) => {
|
|
69
69
|
if (i) {
|
|
70
70
|
A(!0);
|
|
71
71
|
try {
|
|
72
|
-
await i(
|
|
72
|
+
await i(m), N(!1);
|
|
73
73
|
} catch (K) {
|
|
74
74
|
console.error(K);
|
|
75
75
|
} finally {
|
|
@@ -77,9 +77,9 @@ function De({
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}, D = [];
|
|
80
|
-
i !== void 0 && (
|
|
80
|
+
i !== void 0 && (x ? (n !== "" && D.push({
|
|
81
81
|
label: n,
|
|
82
|
-
onClick:
|
|
82
|
+
onClick: w,
|
|
83
83
|
variant: "outline",
|
|
84
84
|
disabled: o || h,
|
|
85
85
|
icon: S
|
|
@@ -97,39 +97,39 @@ function De({
|
|
|
97
97
|
}));
|
|
98
98
|
const H = {
|
|
99
99
|
title: u(l),
|
|
100
|
-
maxWidth:
|
|
100
|
+
maxWidth: k,
|
|
101
101
|
actions: f ? D : []
|
|
102
102
|
};
|
|
103
103
|
return /* @__PURE__ */ e(
|
|
104
104
|
re,
|
|
105
105
|
{
|
|
106
106
|
open: t,
|
|
107
|
-
onOpenChange: (
|
|
108
|
-
c(
|
|
107
|
+
onOpenChange: (m) => {
|
|
108
|
+
c(m), m || w();
|
|
109
109
|
},
|
|
110
110
|
config: H,
|
|
111
111
|
isLoading: o || h,
|
|
112
|
-
children: /* @__PURE__ */ r("div", {
|
|
112
|
+
children: /* @__PURE__ */ r("div", { children: [
|
|
113
113
|
s !== void 0 ? /* @__PURE__ */ e("div", { className: "mb-4", children: s(l) }) : null,
|
|
114
114
|
/* @__PURE__ */ e(
|
|
115
115
|
le,
|
|
116
116
|
{
|
|
117
117
|
schema: p,
|
|
118
118
|
initialData: l,
|
|
119
|
-
disabled: !
|
|
120
|
-
onSubmit: (
|
|
121
|
-
G(
|
|
119
|
+
disabled: !x,
|
|
120
|
+
onSubmit: (m) => {
|
|
121
|
+
G(m);
|
|
122
122
|
},
|
|
123
123
|
renderActions: !1,
|
|
124
|
-
onRegisterSubmit: (
|
|
125
|
-
P(() =>
|
|
124
|
+
onRegisterSubmit: (m) => {
|
|
125
|
+
P(() => m);
|
|
126
126
|
},
|
|
127
127
|
isLoading: o || h
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
130
|
b !== void 0 ? b(l) : null,
|
|
131
|
-
i !== void 0 && !f ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children:
|
|
132
|
-
n !== "" ? /* @__PURE__ */ r(v, { onClick:
|
|
131
|
+
i !== void 0 && !f ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children: x ? /* @__PURE__ */ r(M, { children: [
|
|
132
|
+
n !== "" ? /* @__PURE__ */ r(v, { onClick: w, 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 ke({ 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 ye({ isLoading: t, error: c, config: l, destructive: u = !1 }) {
|
|
|
180
180
|
}
|
|
181
181
|
export {
|
|
182
182
|
re as A,
|
|
183
|
-
|
|
183
|
+
ke as C,
|
|
184
184
|
De as F
|
|
185
185
|
};
|
|
@@ -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";
|
|
@@ -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-BPXA2g3g.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,12 +1,12 @@
|
|
|
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-BPXA2g3g.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
11
|
import { A as J, K as Q } from "../../KpiCardsLayout-mQ7AcbqA.js";
|
|
12
12
|
import { A as W } from "../../AppSubTitle-ChCtQ7Sv.js";
|
|
@@ -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,
|
package/dist/components/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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-BPXA2g3g.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
11
|
import { A as tr, K as nr } from "../KpiCardsLayout-mQ7AcbqA.js";
|
|
12
12
|
import { A as lr } from "../AppSubTitle-ChCtQ7Sv.js";
|
package/dist/tailwind/index.d.ts
CHANGED
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const krosoftContent: string[];
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Preset Tailwind CSS partagé par les projets @krosoft/react.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
* -
|
|
18
|
-
* -
|
|
19
|
-
* -
|
|
20
|
-
* -
|
|
21
|
-
* -
|
|
22
|
-
* - tailwindcss-animate
|
|
16
|
+
* Regroupe les tokens de design shadcn/ui communs à tous les projets :
|
|
17
|
+
* - configuration du mode sombre ;
|
|
18
|
+
* - réglages du conteneur ;
|
|
19
|
+
* - mapping des couleurs de base (border, input, ring, background, foreground, primary…) ;
|
|
20
|
+
* - tokens de rayon de bordure ;
|
|
21
|
+
* - keyframes & animations de l'accordéon ;
|
|
22
|
+
* - plugin tailwindcss-animate.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* Utilisation dans le tailwind.config.ts d'un projet consommateur :
|
|
25
25
|
*
|
|
26
26
|
* ```ts
|
|
27
27
|
* import krosoftPreset, { krosoftContent } from "@krosoft/react/tailwind";
|
|
@@ -31,7 +31,7 @@ export declare const krosoftContent: string[];
|
|
|
31
31
|
* content: [...krosoftContent, "./src/**\/*.{ts,tsx}"],
|
|
32
32
|
* theme: {
|
|
33
33
|
* extend: {
|
|
34
|
-
* //
|
|
34
|
+
* // surcharges spécifiques au projet
|
|
35
35
|
* },
|
|
36
36
|
* },
|
|
37
37
|
* } satisfies Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tailwind/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,UAAiD,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tailwind/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,UAAiD,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+IQ,CAAC;AAE5B,eAAe,aAAa,CAAC"}
|
package/dist/tailwind/index.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import r from "tailwindcss-animate";
|
|
2
2
|
const a = ["./node_modules/@krosoft/react/dist/**/*.js"], e = {
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
|
|
3
|
+
// Les thèmes sombres sont des classes posées sur <html> ("dark", "dark-temporal", "dark-forest"…)
|
|
4
|
+
// et CSS n'a pas de syntaxe .dark*. [class*='dark'] la simulait, mais la sous-chaîne matche aussi
|
|
5
|
+
// le préfixe des utilitaires eux-mêmes (class="dark:bg-gray-900") : n'importe quel ancêtre portant
|
|
6
|
+
// une classe dark:* activait donc le mode sombre sur tout son sous-arbre, même en thème clair.
|
|
7
|
+
// Matcher "dark" comme classe entière, plus tout ce qui contient "dark-", couvre la famille .dark*
|
|
8
|
+
// sans ce faux positif.
|
|
9
|
+
darkMode: ["class", ':is([class~="dark"],[class*="dark-"])'],
|
|
6
10
|
theme: {
|
|
7
11
|
container: {
|
|
8
12
|
center: !0,
|