@krosoft/react 0.0.294 → 0.0.296
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/README.md +3 -0
- package/dist/{AppActions-CpbkO_3O.js → AppActions-BMh044Sc.js} +2 -2
- package/dist/{AppSubTitle-BOVTZlUB.js → AppSubTitle-BfZTloah.js} +1 -1
- package/dist/ErrorAlert-0L-Dwqu8.js +37 -0
- package/dist/GenericForm-BV8n9y1n.js +311 -0
- package/dist/{ImageInput-BPNEywyf.js → ImageInput-BdOxyamZ.js} +2 -2
- package/dist/{MultiSelect-CZ4hye2w.js → MultiSelect-Dmt1iWgB.js} +45 -44
- package/dist/{SearchInput-nr0CrMLK.js → SearchInput-81oecSco.js} +42 -38
- package/dist/{cards-BBgGXmYa.js → cards-BFa9EQc6.js} +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/dialogs/AppDialog.d.ts +38 -7
- package/dist/components/core/dialogs/AppDialog.d.ts.map +1 -1
- package/dist/components/core/dialogs/FormDialog.d.ts +8 -1
- package/dist/components/core/dialogs/FormDialog.d.ts.map +1 -1
- package/dist/components/core/dialogs/index.d.ts +1 -1
- package/dist/components/core/dialogs/index.d.ts.map +1 -1
- package/dist/components/core/dialogs/index.js +3 -3
- package/dist/components/core/filters/index.js +5 -5
- package/dist/components/core/forms/GenericForm.d.ts +4 -3
- package/dist/components/core/forms/GenericForm.d.ts.map +1 -1
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +17 -17
- package/dist/components/core/inputs/MultiSelect.d.ts +13 -3
- package/dist/components/core/inputs/MultiSelect.d.ts.map +1 -1
- package/dist/components/core/inputs/SingleSelect.d.ts +10 -2
- package/dist/components/core/inputs/SingleSelect.d.ts.map +1 -1
- package/dist/components/core/inputs/index.d.ts +1 -0
- package/dist/components/core/inputs/index.d.ts.map +1 -1
- package/dist/components/core/inputs/index.js +4 -4
- package/dist/components/core/language/index.js +1 -1
- package/dist/components/core/layouts/index.js +6 -6
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/states/ErrorAlert.d.ts +5 -2
- package/dist/components/core/states/ErrorAlert.d.ts.map +1 -1
- package/dist/components/core/states/index.js +2 -2
- package/dist/components/core/table/index.js +3 -3
- package/dist/components/core/tabs/index.js +4 -4
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +19 -19
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/command.d.ts +7 -7
- package/dist/components/ui/index.js +4 -4
- package/dist/components/ui/input-otp.d.ts +2 -2
- package/dist/dialogs-CUKX7EFT.js +217 -0
- package/dist/{inputs-BMCt-VqZ.js → inputs-V2h_AcMW.js} +3 -3
- package/dist/{language-DOGOdjzx.js → language-9nbLYpqG.js} +2 -2
- package/dist/{navbar-CCHGdEzE.js → navbar-BLdw6QDi.js} +2 -2
- package/dist/{select-DmLScQKX.js → select-CfhuieLs.js} +1 -1
- package/dist/{sheet-DQTOen4V.js → sheet-DRzg-JWH.js} +1 -1
- package/dist/{states-BQK9jqS4.js → states-C4MdmAbW.js} +1 -1
- package/dist/tailwind/index.d.ts +5 -0
- package/dist/tailwind/index.d.ts.map +1 -1
- package/dist/tailwind/index.js +5 -0
- package/dist/{theme-q2uzluEd.js → theme-2eQs7CHF.js} +2 -2
- package/dist/{tooltip-BmZ9Bfou.js → tooltip-Bu3wNhtW.js} +1 -1
- package/dist/types/ButtonVariantType.d.ts +9 -1
- package/dist/types/ButtonVariantType.d.ts.map +1 -1
- package/dist/{ui-D8Pg34YW.js → ui-DVtB9U8H.js} +3 -3
- package/package.json +1 -1
- package/dist/ErrorAlert-L2s8Dd1_.js +0 -27
- package/dist/GenericForm-D7ni-5-4.js +0 -309
- package/dist/dialogs-BjqvZvax.js +0 -207
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
2
|
import { r as t, t as n } from "./i18n-d2p0RJo9.js";
|
|
3
|
-
import { En as r } from "./ui-
|
|
4
|
-
import { o as i, s as a } from "./tooltip-
|
|
5
|
-
import { g as o, h as s, m as c, p as l } from "./sheet-
|
|
6
|
-
import { i as u, l as d, n as f, t as p, u as m } from "./select-
|
|
3
|
+
import { En as r } from "./ui-DVtB9U8H.js";
|
|
4
|
+
import { o as i, s as a } from "./tooltip-Bu3wNhtW.js";
|
|
5
|
+
import { g as o, h as s, m as c, p as l } from "./sheet-DRzg-JWH.js";
|
|
6
|
+
import { i as u, l as d, n as f, t as p, u as m } from "./select-CfhuieLs.js";
|
|
7
7
|
import * as h from "react";
|
|
8
8
|
import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
9
9
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
@@ -123,24 +123,26 @@ var A = ({ date: n, onDateChange: i, placeholder: o }) => {
|
|
|
123
123
|
})]
|
|
124
124
|
})
|
|
125
125
|
});
|
|
126
|
-
}, N = ({ options: t = [], value: r, onChange: a, onClear: o, searchable: h = !1, onCreate: g, placeholder: v, searchPlaceholder: S, emptyLabel: k, createLabel: A, disabled: j = !1, modal: M = !0, className: N }) => {
|
|
127
|
-
let { t:
|
|
128
|
-
|
|
126
|
+
}, N = ({ options: t = [], value: r, onChange: a, onClear: o, searchable: h = !1, onCreate: g, placeholder: v, searchPlaceholder: S, emptyLabel: k, createLabel: A, disabled: j = !1, modal: M = !0, className: N, ...P }) => {
|
|
127
|
+
let { t: F } = n(), [I, L] = y(!1), [R, z] = y(""), B = r !== void 0 && r !== "", V = _(() => B ? t.find((e) => e.value === r) : void 0, [
|
|
128
|
+
B,
|
|
129
129
|
t,
|
|
130
130
|
r
|
|
131
|
-
]),
|
|
131
|
+
]), H = B ? V?.label ?? r : void 0;
|
|
132
132
|
if (!h) return /* @__PURE__ */ x(p, {
|
|
133
133
|
value: r ?? "",
|
|
134
134
|
onValueChange: a,
|
|
135
135
|
disabled: j,
|
|
136
136
|
children: [/* @__PURE__ */ b(d, {
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
...P,
|
|
138
|
+
className: e(!B && "text-muted-foreground", N),
|
|
139
|
+
onClear: o !== void 0 && B && !j ? (e) => {
|
|
139
140
|
e.preventDefault(), e.stopPropagation(), o();
|
|
140
141
|
} : void 0,
|
|
141
|
-
children: /* @__PURE__ */ b(m, { placeholder: v ??
|
|
142
|
+
children: /* @__PURE__ */ b(m, { placeholder: v ?? F("select.placeholder") })
|
|
142
143
|
}), /* @__PURE__ */ b(f, { children: t.map((e) => /* @__PURE__ */ b(u, {
|
|
143
144
|
value: e.value,
|
|
145
|
+
disabled: e.disabled,
|
|
144
146
|
children: /* @__PURE__ */ x("span", {
|
|
145
147
|
className: "flex items-center",
|
|
146
148
|
children: [
|
|
@@ -161,46 +163,49 @@ var A = ({ date: n, onDateChange: i, placeholder: o }) => {
|
|
|
161
163
|
})
|
|
162
164
|
}, e.value)) })]
|
|
163
165
|
});
|
|
164
|
-
let
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
a(e),
|
|
166
|
+
let U = R.trim(), W = g !== void 0 && U !== "" && !t.some((e) => e.label.toLowerCase() === U.toLowerCase()), G = (e) => {
|
|
167
|
+
L(e), e || z("");
|
|
168
|
+
}, K = (e) => {
|
|
169
|
+
a(e), G(!1);
|
|
170
|
+
}, q = () => {
|
|
171
|
+
g?.(U), G(!1);
|
|
168
172
|
};
|
|
169
173
|
return /* @__PURE__ */ x(l, {
|
|
170
|
-
open:
|
|
171
|
-
onOpenChange:
|
|
174
|
+
open: I,
|
|
175
|
+
onOpenChange: G,
|
|
172
176
|
modal: M,
|
|
173
177
|
children: [/* @__PURE__ */ b(s, {
|
|
174
178
|
asChild: !0,
|
|
175
179
|
children: /* @__PURE__ */ x("button", {
|
|
180
|
+
...P,
|
|
176
181
|
type: "button",
|
|
177
182
|
role: "combobox",
|
|
178
|
-
"aria-expanded":
|
|
183
|
+
"aria-expanded": I,
|
|
179
184
|
disabled: j,
|
|
180
|
-
className: e(i, "w-full", "data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2", !
|
|
185
|
+
className: e(i, "w-full", "data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2", !B && "text-muted-foreground", N),
|
|
181
186
|
children: [/* @__PURE__ */ x("span", {
|
|
182
187
|
className: "flex items-center truncate",
|
|
183
188
|
children: [
|
|
184
|
-
|
|
189
|
+
V?.color && /* @__PURE__ */ b("span", {
|
|
185
190
|
className: "mr-2 size-2.5 shrink-0 rounded-full",
|
|
186
|
-
style: { backgroundColor:
|
|
191
|
+
style: { backgroundColor: V.color }
|
|
187
192
|
}),
|
|
188
193
|
/* @__PURE__ */ b("span", {
|
|
189
194
|
className: "truncate",
|
|
190
|
-
children:
|
|
195
|
+
children: H ?? v ?? F("select.placeholder")
|
|
191
196
|
}),
|
|
192
|
-
|
|
197
|
+
V?.description !== void 0 && /* @__PURE__ */ x("span", {
|
|
193
198
|
className: "ml-1 truncate text-muted-foreground",
|
|
194
199
|
children: [
|
|
195
200
|
"(",
|
|
196
|
-
|
|
201
|
+
V.description,
|
|
197
202
|
")"
|
|
198
203
|
]
|
|
199
204
|
})
|
|
200
205
|
]
|
|
201
206
|
}), /* @__PURE__ */ x("div", {
|
|
202
207
|
className: "flex items-center gap-1",
|
|
203
|
-
children: [o &&
|
|
208
|
+
children: [o && B && !j && /* @__PURE__ */ b("span", {
|
|
204
209
|
role: "button",
|
|
205
210
|
tabIndex: -1,
|
|
206
211
|
onClick: (e) => {
|
|
@@ -211,7 +216,7 @@ var A = ({ date: n, onDateChange: i, placeholder: o }) => {
|
|
|
211
216
|
},
|
|
212
217
|
className: "text-muted-foreground hover:text-foreground",
|
|
213
218
|
children: /* @__PURE__ */ b(D, { className: "size-4" })
|
|
214
|
-
}), /* @__PURE__ */ b(w, { className: e("size-4 shrink-0 opacity-50 transition-transform",
|
|
219
|
+
}), /* @__PURE__ */ b(w, { className: e("size-4 shrink-0 opacity-50 transition-transform", I && "rotate-180") })]
|
|
215
220
|
})]
|
|
216
221
|
})
|
|
217
222
|
}), /* @__PURE__ */ b(c, {
|
|
@@ -225,9 +230,9 @@ var A = ({ date: n, onDateChange: i, placeholder: o }) => {
|
|
|
225
230
|
children: /* @__PURE__ */ x("div", {
|
|
226
231
|
className: "relative",
|
|
227
232
|
children: [/* @__PURE__ */ b(E, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ b(O.Input, {
|
|
228
|
-
value:
|
|
229
|
-
onValueChange:
|
|
230
|
-
placeholder: S ??
|
|
233
|
+
value: R,
|
|
234
|
+
onValueChange: z,
|
|
235
|
+
placeholder: S ?? F("search.placeholder"),
|
|
231
236
|
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",
|
|
232
237
|
autoFocus: !0
|
|
233
238
|
})]
|
|
@@ -235,17 +240,18 @@ var A = ({ date: n, onDateChange: i, placeholder: o }) => {
|
|
|
235
240
|
}), /* @__PURE__ */ x(O.List, {
|
|
236
241
|
className: "flex flex-col gap-0.5 max-h-56 overflow-y-auto overflow-x-hidden 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",
|
|
237
242
|
children: [
|
|
238
|
-
!
|
|
243
|
+
!W && /* @__PURE__ */ b(O.Empty, {
|
|
239
244
|
className: "px-2 py-3 text-center text-xs text-muted-foreground",
|
|
240
|
-
children: k ??
|
|
245
|
+
children: k ?? F("states.noResult")
|
|
241
246
|
}),
|
|
242
247
|
t.map((t) => /* @__PURE__ */ x(O.Item, {
|
|
243
248
|
value: t.value,
|
|
244
249
|
keywords: [t.label, t.description ?? ""],
|
|
250
|
+
disabled: t.disabled,
|
|
245
251
|
onSelect: () => {
|
|
246
|
-
|
|
252
|
+
K(t.value);
|
|
247
253
|
},
|
|
248
|
-
className: "flex min-w-0 items-center gap-2.5 rounded-md px-2 py-2 text-sm cursor-pointer transition-colors data-[selected=true]:bg-muted",
|
|
254
|
+
className: "flex min-w-0 items-center gap-2.5 rounded-md px-2 py-2 text-sm cursor-pointer transition-colors data-[selected=true]:bg-muted data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
|
|
249
255
|
children: [
|
|
250
256
|
/* @__PURE__ */ b(C, { className: e("size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") }),
|
|
251
257
|
t.color && /* @__PURE__ */ b("span", {
|
|
@@ -267,16 +273,14 @@ var A = ({ date: n, onDateChange: i, placeholder: o }) => {
|
|
|
267
273
|
})
|
|
268
274
|
]
|
|
269
275
|
}, t.value)),
|
|
270
|
-
|
|
276
|
+
W && /* @__PURE__ */ x(O.Item, {
|
|
271
277
|
forceMount: !0,
|
|
272
278
|
value: "__create__",
|
|
273
|
-
onSelect:
|
|
274
|
-
g?.(H), W(!1);
|
|
275
|
-
},
|
|
279
|
+
onSelect: q,
|
|
276
280
|
className: "flex min-w-0 items-center gap-2.5 rounded-md px-2 py-2 text-sm cursor-pointer transition-colors data-[selected=true]:bg-muted",
|
|
277
281
|
children: [/* @__PURE__ */ b(T, { className: "size-4 shrink-0" }), /* @__PURE__ */ b("span", {
|
|
278
282
|
className: "truncate",
|
|
279
|
-
children: A ? A(
|
|
283
|
+
children: A ? A(U) : F("select.create", { search: U })
|
|
280
284
|
})]
|
|
281
285
|
})
|
|
282
286
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
2
|
import { c as t, d as n, f as r, s as i } from "./chart-Dq3AIrue.js";
|
|
3
3
|
import { t as a } from "./i18n-d2p0RJo9.js";
|
|
4
|
-
import "./ui-
|
|
4
|
+
import "./ui-DVtB9U8H.js";
|
|
5
5
|
import { t as o } from "./skeleton-D6Ga4BLw.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../../../cards-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../../../cards-BFa9EQc6.js";
|
|
2
2
|
export { r as DashboardCard, e as KpiCard, t as KpiCards, i as MetricCard, n as SkeletonCard, a as SkeletonCards };
|
|
@@ -1,28 +1,59 @@
|
|
|
1
|
+
import { ErrorHttp } from "@krosoft/core/types";
|
|
2
|
+
import type { ButtonVariantType } from "../../../types";
|
|
1
3
|
import React from "react";
|
|
2
|
-
export type ButtonVariantType
|
|
4
|
+
export type { ButtonVariantType };
|
|
5
|
+
export type AppDialogSize = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full";
|
|
3
6
|
export interface DialogAction {
|
|
7
|
+
/** Clé de rendu. À défaut, le libellé sert de clé : à renseigner si deux actions partagent le même. */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** Clé i18n, ou libellé déjà résolu — le repli i18next renvoie la chaîne telle quelle. */
|
|
4
10
|
label: string;
|
|
5
|
-
onClick
|
|
11
|
+
onClick?: () => void;
|
|
6
12
|
variant?: ButtonVariantType;
|
|
7
13
|
disabled?: boolean;
|
|
8
14
|
icon?: React.ElementType;
|
|
9
15
|
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* `"submit"` combiné à `form` soumet un formulaire rendu dans `children` : c'est
|
|
18
|
+
* ce qui évite de remonter le `submit` du formulaire jusqu'au pied de la dialog.
|
|
19
|
+
*/
|
|
20
|
+
type?: "button" | "submit";
|
|
21
|
+
/** `id` du `<form>` visé par une action `"submit"`. */
|
|
22
|
+
form?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Désactivation automatique pendant `isLoading`. Passer `false` pour une action
|
|
25
|
+
* qui doit rester atteignable pendant le chargement (« Annuler » d'un envoi long).
|
|
26
|
+
*/
|
|
27
|
+
disableOnLoading?: boolean;
|
|
10
28
|
}
|
|
11
29
|
export interface AppDialogConfig {
|
|
12
|
-
|
|
13
|
-
|
|
30
|
+
/** Une chaîne est traitée comme une clé i18n ; passer un `ReactNode` pour un libellé métier à ne pas traduire. */
|
|
31
|
+
title: React.ReactNode;
|
|
32
|
+
description?: React.ReactNode;
|
|
14
33
|
icon?: React.ElementType;
|
|
34
|
+
/** Largeur maximale à partir de `sm`. `xl` par défaut. */
|
|
35
|
+
size?: AppDialogSize;
|
|
36
|
+
/**
|
|
37
|
+
* Classe de largeur brute, breakpoint compris (`"sm:max-w-4xl"`).
|
|
38
|
+
* @deprecated Préférer `size`, qui n'oblige pas à connaître le gabarit interne.
|
|
39
|
+
*/
|
|
15
40
|
maxWidth?: string;
|
|
41
|
+
/** Ignoré si un `footer` est fourni au composant. */
|
|
16
42
|
actions?: DialogAction[];
|
|
43
|
+
headerClassName?: string;
|
|
44
|
+
footerClassName?: string;
|
|
17
45
|
}
|
|
18
46
|
interface AppDialogProps {
|
|
19
47
|
open: boolean;
|
|
20
48
|
onOpenChange: (open: boolean) => void;
|
|
21
49
|
config: AppDialogConfig;
|
|
50
|
+
/** Affiche une barre de progression, désactive les actions et verrouille la fermeture. */
|
|
22
51
|
isLoading?: boolean;
|
|
23
|
-
error?: Error | null;
|
|
52
|
+
error?: ErrorHttp | Error | null;
|
|
53
|
+
/** Pied de dialog libre, prioritaire sur `config.actions`. */
|
|
54
|
+
footer?: React.ReactNode;
|
|
55
|
+
className?: string;
|
|
24
56
|
children: React.ReactNode;
|
|
25
57
|
}
|
|
26
|
-
export declare function AppDialog({ open, onOpenChange, config, isLoading, error, children }: AppDialogProps): React.ReactElement;
|
|
27
|
-
export {};
|
|
58
|
+
export declare function AppDialog({ open, onOpenChange, config, isLoading, error, footer, className, children }: AppDialogProps): React.ReactElement;
|
|
28
59
|
//# sourceMappingURL=AppDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/AppDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/AppDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAkBvF,MAAM,WAAW,YAAY;IAC3B,uGAAuG;IACvG,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,kHAAkH;IAClH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,eAAe,CAAC;IACxB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;IACjC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CA4F3I"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AppDialogSize } from "../../../components/core/dialogs/AppDialog";
|
|
1
2
|
import type { FormSchema } from "../../../types";
|
|
2
3
|
export interface FormDialogProps<T> {
|
|
3
4
|
open: boolean;
|
|
@@ -13,8 +14,14 @@ export interface FormDialogProps<T> {
|
|
|
13
14
|
saveLabel?: string;
|
|
14
15
|
cancelLabel?: string;
|
|
15
16
|
hideSaveIcon?: boolean;
|
|
17
|
+
/** Largeur maximale à partir de `sm`. `4xl` par défaut. */
|
|
18
|
+
size?: AppDialogSize;
|
|
19
|
+
/**
|
|
20
|
+
* Classe de largeur brute, breakpoint compris (`"sm:max-w-4xl"`).
|
|
21
|
+
* @deprecated Préférer `size`.
|
|
22
|
+
*/
|
|
16
23
|
maxWidth?: string;
|
|
17
24
|
isLoading?: boolean;
|
|
18
25
|
}
|
|
19
|
-
export default function FormDialog<T>({ open, onOpenChange, data, title, headerBadge, schema, onSave, customFooter, defaultEditing, footerActions, saveLabel, cancelLabel, hideSaveIcon, maxWidth, isLoading, }: FormDialogProps<T>): React.ReactElement | null;
|
|
26
|
+
export default function FormDialog<T>({ open, onOpenChange, data, title, headerBadge, schema, onSave, customFooter, defaultEditing, footerActions, saveLabel, cancelLabel, hideSaveIcon, size, maxWidth, isLoading, }: FormDialogProps<T>): React.ReactElement | null;
|
|
20
27
|
//# sourceMappingURL=FormDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/FormDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/FormDialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8B,aAAa,EAAgB,MAAM,qCAAqC,CAAC;AAK9G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,EAAE,EACpC,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,MAAM,EACN,YAAY,EACZ,cAAsB,EACtB,aAAoB,EACpB,SAAS,EACT,WAAW,EACX,YAAoB,EACpB,IAAY,EAEZ,QAAQ,EACR,SAAiB,GAClB,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAgIhD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AppDialog } from "./AppDialog";
|
|
2
|
-
export type { ButtonVariantType, DialogAction, AppDialogConfig } from "./AppDialog";
|
|
2
|
+
export type { ButtonVariantType, DialogAction, AppDialogConfig, AppDialogSize } from "./AppDialog";
|
|
3
3
|
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from "../../ui/dialog";
|
|
4
4
|
export { Progress } from "../../ui/progress";
|
|
5
5
|
export { default as FormDialog } from "./FormDialog";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as e } from "../../../ui-
|
|
2
|
-
import { A as t, D as n, E as r, F as i, M as a, N as o, O as s, P as c, j as l, k as u } from "../../../sheet-
|
|
3
|
-
import { n as d, r as f, t as p } from "../../../dialogs-
|
|
1
|
+
import { I as e } from "../../../ui-DVtB9U8H.js";
|
|
2
|
+
import { A as t, D as n, E as r, F as i, M as a, N as o, O as s, P as c, j as l, k as u } from "../../../sheet-DRzg-JWH.js";
|
|
3
|
+
import { n as d, r as f, t as p } from "../../../dialogs-CUKX7EFT.js";
|
|
4
4
|
export { f as AppDialog, p as ConfirmationDialog, r as Dialog, n as DialogClose, s as DialogContent, u as DialogDescription, t as DialogFooter, l as DialogHeader, a as DialogOverlay, o as DialogPortal, c as DialogTitle, i as DialogTrigger, d as FormDialog, e as Progress };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "../../../tailwind.helper-CJaRYBmL.js";
|
|
2
2
|
import { t } from "../../../i18n-d2p0RJo9.js";
|
|
3
|
-
import { At as n, Pn as r } from "../../../ui-
|
|
4
|
-
import { s as i } from "../../../tooltip-
|
|
5
|
-
import { a, g as o, l as s, o as c, r as l, t as u, u as d } from "../../../sheet-
|
|
6
|
-
import { t as f } from "../../../MultiSelect-
|
|
7
|
-
import { i as p, n as m, r as h, t as g } from "../../../SearchInput-
|
|
3
|
+
import { At as n, Pn as r } from "../../../ui-DVtB9U8H.js";
|
|
4
|
+
import { s as i } from "../../../tooltip-Bu3wNhtW.js";
|
|
5
|
+
import { a, g as o, l as s, o as c, r as l, t as u, u as d } from "../../../sheet-DRzg-JWH.js";
|
|
6
|
+
import { t as f } from "../../../MultiSelect-Dmt1iWgB.js";
|
|
7
|
+
import { i as p, n as m, r as h, t as g } from "../../../SearchInput-81oecSco.js";
|
|
8
8
|
import { useEffect as _, useMemo as v, useState as y } from "react";
|
|
9
9
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
10
|
import { getLocale as S } from "@krosoft/core/helpers";
|
|
@@ -39,9 +39,10 @@ interface GenericFormProps<T> {
|
|
|
39
39
|
*/
|
|
40
40
|
renderActions?: boolean;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Identifiant posé sur le `<form>`. Permet à un bouton rendu hors du formulaire
|
|
43
|
+
* (pied d'une dialog, barre d'actions) de le soumettre via `form="<id>"`.
|
|
43
44
|
*/
|
|
44
|
-
|
|
45
|
+
id?: string;
|
|
45
46
|
/**
|
|
46
47
|
* The default column span (1 to 4) for fields that do not explicitly declare a layout.cols property.
|
|
47
48
|
* Defaults to 4 (full width).
|
|
@@ -52,6 +53,6 @@ interface GenericFormProps<T> {
|
|
|
52
53
|
* A highly dynamic, Zod-validated generic form generator.
|
|
53
54
|
* Builds responsive input layouts automatically based on a structured FormSchema definition.
|
|
54
55
|
*/
|
|
55
|
-
export declare const GenericForm: <T>({ schema, isLoading, error, onSubmit, onCancel, initialData, disabled, renderActions,
|
|
56
|
+
export declare const GenericForm: <T>({ schema, isLoading, error, onSubmit, onCancel, initialData, disabled, renderActions, id, defaultCols, }: GenericFormProps<T>) => React.ReactElement | null;
|
|
56
57
|
export {};
|
|
57
58
|
//# sourceMappingURL=GenericForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericForm.d.ts","sourceRoot":"","sources":["../../../../src/components/core/forms/GenericForm.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAa,UAAU,EAAgF,MAAM,SAAS,CAAC;AAE9H,OAAO,
|
|
1
|
+
{"version":3,"file":"GenericForm.d.ts","sourceRoot":"","sources":["../../../../src/components/core/forms/GenericForm.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAa,UAAU,EAAgF,MAAM,SAAS,CAAC;AAE9H,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D;;GAEG;AACH,UAAU,gBAAgB,CAAC,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC7B;AAiED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAG,0GAW7B,gBAAgB,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,YAAY,GAAG,IAwW7C,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../GenericForm-
|
|
1
|
+
import { t as e } from "../../../GenericForm-BV8n9y1n.js";
|
|
2
2
|
export { e as GenericForm };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../../cards-
|
|
2
|
-
import { I as o } from "../../ui-
|
|
3
|
-
import { A as s, D as c, E as l, F as u, M as d, N as f, O as p, P as m, j as h, k as g } from "../../sheet-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../../cards-BFa9EQc6.js";
|
|
2
|
+
import { I as o } from "../../ui-DVtB9U8H.js";
|
|
3
|
+
import { A as s, D as c, E as l, F as u, M as d, N as f, O as p, P as m, j as h, k as g } from "../../sheet-DRzg-JWH.js";
|
|
4
4
|
import { a as _, c as v, i as y, n as b, o as x, r as S, s as C, t as w } from "../../charts-C7MWuqi9.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as O } from "../../
|
|
7
|
-
import { t as k } from "../../
|
|
8
|
-
import { t as A } from "../../
|
|
9
|
-
import { t as j } from "../../
|
|
10
|
-
import { t as M } from "../../
|
|
11
|
-
import { t as N } from "../../
|
|
12
|
-
import { i as P, n as F, r as I, t as L } from "../../SearchInput-
|
|
5
|
+
import { t as T } from "../../ErrorAlert-0L-Dwqu8.js";
|
|
6
|
+
import { n as E, r as D, t as O } from "../../dialogs-CUKX7EFT.js";
|
|
7
|
+
import { t as k } from "../../ImageInput-BdOxyamZ.js";
|
|
8
|
+
import { t as A } from "../../AppActions-BMh044Sc.js";
|
|
9
|
+
import { t as j } from "../../AppSubTitle-BfZTloah.js";
|
|
10
|
+
import { t as M } from "../../MultiSelect-Dmt1iWgB.js";
|
|
11
|
+
import { t as N } from "../../GenericForm-BV8n9y1n.js";
|
|
12
|
+
import { i as P, n as F, r as I, t as L } from "../../SearchInput-81oecSco.js";
|
|
13
13
|
import { ActiveFilters as R, AdvancedFilters as z, FilterField as B, FilterPills as V, FilterPillsGroup as H, TableFilter as U } from "./filters/index.js";
|
|
14
14
|
import "./forms/index.js";
|
|
15
|
-
import { t as W } from "../../inputs-
|
|
16
|
-
import { t as G } from "../../language-
|
|
15
|
+
import { t as W } from "../../inputs-V2h_AcMW.js";
|
|
16
|
+
import { t as G } from "../../language-9nbLYpqG.js";
|
|
17
17
|
import { t as K } from "../../AppTitle-BZ5jQWbs.js";
|
|
18
|
-
import { n as q, t as J } from "../../states-
|
|
18
|
+
import { n as q, t as J } from "../../states-C4MdmAbW.js";
|
|
19
19
|
import { AppPageHeader as Y, KpiCardsLayout as X } from "./layouts/index.js";
|
|
20
|
-
import { a as Z, i as Q, n as $, o as ee, r as te, t as ne } from "../../navbar-
|
|
20
|
+
import { a as Z, i as Q, n as $, o as ee, r as te, t as ne } from "../../navbar-BLdw6QDi.js";
|
|
21
21
|
import { DataTable as re, JsonTableOutput as ie, TableActions as ae, TableBody as oe, TableBulkActions as se, TableHeader as ce, TablePagination as le, TableSettings as ue } from "./table/index.js";
|
|
22
22
|
import { AppTabContainer as de, AppTabHeader as fe, AppTabs as pe, AppVerticalTabs as me } from "./tabs/index.js";
|
|
23
|
-
import { t as he } from "../../theme-
|
|
24
|
-
export { R as ActiveFilters, z as AdvancedFilters,
|
|
23
|
+
import { t as he } from "../../theme-2eQs7CHF.js";
|
|
24
|
+
export { R as ActiveFilters, z as AdvancedFilters, A as AppActions, D as AppDialog, Y as AppPageHeader, j as AppSubTitle, de as AppTabContainer, fe as AppTabHeader, pe as AppTabs, K as AppTitle, me as AppVerticalTabs, v as BarChartHorizontal, C as BarChartVertical, _ as CHART_COLORS, y as ChartCard, S as CircularGauge, O as ConfirmationDialog, r as DashboardCard, re as DataTable, P as DatePicker, I as DateRangePicker, l as Dialog, c as DialogClose, p as DialogContent, g as DialogDescription, s as DialogFooter, h as DialogHeader, d as DialogOverlay, f as DialogPortal, m as DialogTitle, u as DialogTrigger, T as ErrorAlert, q as ErrorState, B as FilterField, V as FilterPills, H as FilterPillsGroup, E as FormDialog, N as GenericForm, ee as GlobalSearch, k as ImageInput, ie as JsonTableOutput, e as KpiCard, t as KpiCards, X as KpiCardsLayout, G as LanguageSelector, b as LineChart, J as LoadingState, i as MetricCard, M as MultiSelect, Z as NotificationsBell, w as PieChart, o as Progress, W as RatingInput, L as SearchInput, te as Sidebar, $ as SidebarHeader, Q as SidebarNavItem, F as SingleSelect, n as SkeletonCard, a as SkeletonCards, ae as TableActions, oe as TableBody, se as TableBulkActions, U as TableFilter, ce as TableHeader, le as TablePagination, ue as TableSettings, he as ThemeSelector, ne as Topbar, x as getChartColor };
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { SelectOption } from "@krosoft/core/types";
|
|
3
|
-
interface
|
|
4
|
-
|
|
3
|
+
export interface MultiSelectOption extends SelectOption {
|
|
4
|
+
/** Option visible mais non basculable : grisée, ignorée par le clic, la navigation clavier et les actions globales. */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Les props non reconnues (et la `ref`) sont relayées au bouton du trigger : c'est ce qui permet à un
|
|
9
|
+
* `<FormControl>` (Slot) d'y poser `id`, `aria-describedby` et `aria-invalid`, et donc de raccrocher le
|
|
10
|
+
* champ à son libellé et à son message d'erreur. Sous React 19 `ref` est une prop ordinaire, elle voyage
|
|
11
|
+
* donc dans le spread : pas de `forwardRef`, qui effacerait en plus le générique `T` (voir aussi `SingleSelect`).
|
|
12
|
+
*/
|
|
13
|
+
interface MultiSelectProps<T extends string = string> extends Omit<React.ComponentProps<"button">, "children" | "disabled" | "onChange" | "onToggle" | "value"> {
|
|
14
|
+
options: MultiSelectOption[];
|
|
5
15
|
selected: T[];
|
|
6
16
|
onToggle: (val: T) => void;
|
|
7
17
|
onClear?: () => void;
|
|
@@ -21,6 +31,6 @@ interface MultiSelectProps<T extends string = string> {
|
|
|
21
31
|
maxCount?: number;
|
|
22
32
|
className?: string;
|
|
23
33
|
}
|
|
24
|
-
export declare const MultiSelect: <T extends string = string>({ options, selected, onToggle, onClear, onSelectAll, variant, placeholder, labelKey, searchable, searchPlaceholder, disabled, maxCount, className, }: MultiSelectProps<T>) => React.ReactElement;
|
|
34
|
+
export declare const MultiSelect: <T extends string = string>({ options, selected, onToggle, onClear, onSelectAll, variant, placeholder, labelKey, searchable, searchPlaceholder, disabled, maxCount, className, ...triggerProps }: MultiSelectProps<T>) => React.ReactElement;
|
|
25
35
|
export {};
|
|
26
36
|
//# sourceMappingURL=MultiSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/MultiSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/MultiSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,uHAAuH;IACvH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IAC7J,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,QAAQ,EAAE,CAAC,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iHAAiH;IACjH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,sKAepD,gBAAgB,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,YAwN9B,CAAC"}
|
|
@@ -3,8 +3,16 @@ import type { SelectOption } from "@krosoft/core/types";
|
|
|
3
3
|
export interface SingleSelectOption extends SelectOption {
|
|
4
4
|
/** Texte secondaire affiché en gris à côté du libellé (ex. le groupe d'un tenant). Inclus dans la recherche (mode `searchable`). */
|
|
5
5
|
description?: string;
|
|
6
|
+
/** Option visible mais non sélectionnable : grisée, ignorée par le clic et par la navigation clavier. */
|
|
7
|
+
disabled?: boolean;
|
|
6
8
|
}
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Les props non reconnues (et la `ref`) sont relayées au bouton du trigger, dans les deux modes : c'est ce
|
|
11
|
+
* qui permet à un `<FormControl>` (Slot) d'y poser `id`, `aria-describedby` et `aria-invalid`, et donc de
|
|
12
|
+
* raccrocher le champ à son libellé et à son message d'erreur. Sous React 19 `ref` est une prop ordinaire,
|
|
13
|
+
* elle voyage donc dans le spread : pas besoin de `forwardRef` (voir aussi `MultiSelect`).
|
|
14
|
+
*/
|
|
15
|
+
interface SingleSelectProps extends Omit<React.ComponentProps<"button">, "children" | "disabled" | "onChange" | "value"> {
|
|
8
16
|
options?: SingleSelectOption[];
|
|
9
17
|
value: string | undefined;
|
|
10
18
|
onChange: (value: string) => void;
|
|
@@ -25,6 +33,6 @@ interface SingleSelectProps {
|
|
|
25
33
|
modal?: boolean;
|
|
26
34
|
className?: string;
|
|
27
35
|
}
|
|
28
|
-
export declare const SingleSelect: ({ options, value, onChange, onClear, searchable, onCreate, placeholder, searchPlaceholder, emptyLabel, createLabel, disabled, modal, className, }: SingleSelectProps) => React.ReactElement;
|
|
36
|
+
export declare const SingleSelect: ({ options, value, onChange, onClear, searchable, onCreate, placeholder, searchPlaceholder, emptyLabel, createLabel, disabled, modal, className, ...triggerProps }: SingleSelectProps) => React.ReactElement;
|
|
29
37
|
export {};
|
|
30
38
|
//# sourceMappingURL=SingleSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/SingleSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,oIAAoI;IACpI,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SingleSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/SingleSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,oIAAoI;IACpI,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yGAAyG;IACzG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,UAAU,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IACtH,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gIAAgI;IAChI,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,GAAI,mKAe1B,iBAAiB,KAAG,KAAK,CAAC,YA6K5B,CAAC"}
|
|
@@ -5,5 +5,6 @@ export { DateRangePicker } from "./DateRangePicker";
|
|
|
5
5
|
export { SingleSelect } from "./SingleSelect";
|
|
6
6
|
export type { SingleSelectOption } from "./SingleSelect";
|
|
7
7
|
export { MultiSelect } from "./MultiSelect";
|
|
8
|
+
export type { MultiSelectOption } from "./MultiSelect";
|
|
8
9
|
export { RatingInput } from "./RatingInput";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../../../ImageInput-
|
|
2
|
-
import { t } from "../../../MultiSelect-
|
|
3
|
-
import { i as n, n as r, r as i, t as a } from "../../../SearchInput-
|
|
4
|
-
import { t as o } from "../../../inputs-
|
|
1
|
+
import { t as e } from "../../../ImageInput-BdOxyamZ.js";
|
|
2
|
+
import { t } from "../../../MultiSelect-Dmt1iWgB.js";
|
|
3
|
+
import { i as n, n as r, r as i, t as a } from "../../../SearchInput-81oecSco.js";
|
|
4
|
+
import { t as o } from "../../../inputs-V2h_AcMW.js";
|
|
5
5
|
export { n as DatePicker, i as DateRangePicker, e as ImageInput, t as MultiSelect, o as RatingInput, a as SearchInput, r as SingleSelect };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../language-
|
|
1
|
+
import { t as e } from "../../../language-9nbLYpqG.js";
|
|
2
2
|
export { e as LanguageSelector };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as e } from "../../../i18n-d2p0RJo9.js";
|
|
2
|
-
import { i as t, t as n } from "../../../cards-
|
|
3
|
-
import "../../../ui-
|
|
4
|
-
import { s as r } from "../../../tooltip-
|
|
5
|
-
import { t as i } from "../../../AppActions-
|
|
6
|
-
import { t as a } from "../../../AppSubTitle-
|
|
2
|
+
import { i as t, t as n } from "../../../cards-BFa9EQc6.js";
|
|
3
|
+
import "../../../ui-DVtB9U8H.js";
|
|
4
|
+
import { s as r } from "../../../tooltip-Bu3wNhtW.js";
|
|
5
|
+
import { t as i } from "../../../AppActions-BMh044Sc.js";
|
|
6
|
+
import { t as a } from "../../../AppSubTitle-BfZTloah.js";
|
|
7
7
|
import { t as o } from "../../../AppTitle-BZ5jQWbs.js";
|
|
8
8
|
import { t as s } from "../../../useDocumentTitle-FqaDq5xD.js";
|
|
9
|
-
import { n as c } from "../../../states-
|
|
9
|
+
import { n as c } from "../../../states-C4MdmAbW.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
12
|
import { ArrowLeftIcon as d } from "lucide-react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../../../navbar-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../../../navbar-BLdw6QDi.js";
|
|
2
2
|
export { r as GlobalSearch, e as NotificationsBell, i as Sidebar, n as SidebarHeader, t as SidebarNavItem, a as Topbar };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ErrorHttp } from "@krosoft/core/types";
|
|
2
3
|
interface ErrorAlertProps {
|
|
3
|
-
|
|
4
|
+
/** `Error` accepté au même titre qu'`ErrorHttp` : les composants reçoivent aussi bien une erreur d'API qu'une exception JS. */
|
|
5
|
+
error: ErrorHttp | Error | null | undefined;
|
|
6
|
+
className?: string;
|
|
4
7
|
}
|
|
5
|
-
export declare const ErrorAlert: ({ error }: ErrorAlertProps) =>
|
|
8
|
+
export declare const ErrorAlert: ({ error, className }: ErrorAlertProps) => React.ReactElement | null;
|
|
6
9
|
export {};
|
|
7
10
|
//# sourceMappingURL=ErrorAlert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/ErrorAlert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/ErrorAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,UAAU,eAAe;IACvB,+HAA+H;IAC/H,KAAK,EAAE,SAAS,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,eAAO,MAAM,UAAU,GAAI,sBAAsB,eAAe,KAAG,KAAK,CAAC,YAAY,GAAG,IAyBvF,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "../../../ErrorAlert-
|
|
2
|
-
import { n as t, t as n } from "../../../states-
|
|
1
|
+
import { t as e } from "../../../ErrorAlert-0L-Dwqu8.js";
|
|
2
|
+
import { n as t, t as n } from "../../../states-C4MdmAbW.js";
|
|
3
3
|
export { e as ErrorAlert, t as ErrorState, n as LoadingState };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ACTIONS_COLUMN_KEY as e, SELECTION_COLUMN_KEY as t, getAlignmentClass as n, getColumnAlignment as r, getFixedCellProps as i } from "../../../helpers/index.js";
|
|
2
2
|
import { t as a } from "../../../i18n-d2p0RJo9.js";
|
|
3
|
-
import { At as o, C as s, D as c, Ft as l, Gt as u, Mt as d, Nt as f, O as p, S as m, T as h, bn as g, jt as _, k as v, v as y } from "../../../ui-
|
|
4
|
-
import { s as b } from "../../../tooltip-
|
|
5
|
-
import { i as x, l as S, n as C, t as w, u as T } from "../../../select-
|
|
3
|
+
import { At as o, C as s, D as c, Ft as l, Gt as u, Mt as d, Nt as f, O as p, S as m, T as h, bn as g, jt as _, k as v, v as y } from "../../../ui-DVtB9U8H.js";
|
|
4
|
+
import { s as b } from "../../../tooltip-Bu3wNhtW.js";
|
|
5
|
+
import { i as x, l as S, n as C, t as w, u as T } from "../../../select-CfhuieLs.js";
|
|
6
6
|
import { n as E, t as D } from "../../../useFixedColumns-DPVEdA6b.js";
|
|
7
7
|
import { n as O, r as k } from "../../../datatable-COQcYUrk.js";
|
|
8
8
|
import { useMemo as A, useState as j } from "react";
|