@krosoft/react 0.0.102 → 0.0.103
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/{AppSubTitle-DBxJVB46.js → AppSubTitle-Cr3zbmee.js} +1 -1
- package/dist/{AppTitle-DDQoaHBb.js → AppTitle-eazxzYGa.js} +1 -1
- package/dist/{AppVerticalTabs-CYx0jMXp.js → AppVerticalTabs-ujb4jtNi.js} +2 -2
- package/dist/ConfirmationDialog-B41OAAmc.js +257 -0
- package/dist/{DataTable-CtzBzpP-.js → DataTable-jrFyuw67.js} +1 -1
- package/dist/GenericForm-D3Gxh9kf.js +11365 -0
- package/dist/{ImageInput-DVMsk_kn.js → ImageInput-BcGHoduc.js} +1 -1
- package/dist/{MetricCard-CFwSSiQY.js → MetricCard-CXDB0msa.js} +1 -1
- package/dist/MultiSelect-Bc0Re1XN.js +137 -0
- package/dist/SearchInput-DFrIqONH.js +586 -0
- package/dist/{TableFilter-DGFQNbZ_.js → TableFilter-CK8NyawM.js} +27 -26
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/dialogs/FormDialog.d.ts +6 -18
- 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 +2 -2
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/forms/GenericForm.d.ts +57 -0
- package/dist/components/core/forms/GenericForm.d.ts.map +1 -0
- package/dist/components/core/forms/index.d.ts +2 -0
- package/dist/components/core/forms/index.d.ts.map +1 -0
- package/dist/components/core/forms/index.js +4 -0
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +48 -45
- package/dist/components/core/inputs/MultiSelect.d.ts +2 -1
- package/dist/components/core/inputs/MultiSelect.d.ts.map +1 -1
- package/dist/components/core/inputs/index.js +8 -7
- package/dist/components/core/layouts/index.js +2 -2
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/core/tabs/index.js +1 -1
- package/dist/components/index.js +100 -97
- package/dist/components/ui/index.js +2 -2
- package/dist/{toaster-BTQcWjuV.js → toaster-CtADevTu.js} +1 -1
- package/dist/{toggle-group-6CH5BRLO.js → toggle-group-Cnfwf4uy.js} +8376 -7317
- package/dist/types/forms/FieldType.d.ts +2 -0
- package/dist/types/forms/FieldType.d.ts.map +1 -0
- package/dist/types/forms/FormField.d.ts +40 -0
- package/dist/types/forms/FormField.d.ts.map +1 -0
- package/dist/types/forms/FormSchema.d.ts +6 -0
- package/dist/types/forms/FormSchema.d.ts.map +1 -0
- package/dist/types/forms/FormSection.d.ts +12 -0
- package/dist/types/forms/FormSection.d.ts.map +1 -0
- package/dist/types/forms/index.d.ts +5 -0
- package/dist/types/forms/index.d.ts.map +1 -0
- package/dist/types/forms/index.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -5
- package/dist/ConfirmationDialog-bBFPpP2z.js +0 -322
- package/dist/SearchInput-CsZcpaxL.js +0 -710
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as k, useEffect as M, useMemo as A } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { aW as C, bD as
|
|
3
|
+
import { a as $, D as O, b as _, S as I } from "./SearchInput-DFrIqONH.js";
|
|
4
|
+
import { aW as C, bD as j, bM as z, bF as R, bI as B, bL as Q, a$ as V, bH as H, bv as W, bx as X, bw as G, ce as J, _ as P } from "./toggle-group-Cnfwf4uy.js";
|
|
5
5
|
import "./alert-srKINZRG.js";
|
|
6
|
-
import { B as w, C as
|
|
7
|
-
import { X as E, S as
|
|
6
|
+
import { B as w, C as K } from "./tooltip-mWS3Mix6.js";
|
|
7
|
+
import { X as E, S as U, h as Y, i as Z, a as q, c as ee } from "./select-CDIMkakd.js";
|
|
8
8
|
import "next-themes";
|
|
9
9
|
import { B as L } from "./badge-BmjaQmQ3.js";
|
|
10
|
-
import { c as
|
|
10
|
+
import { c as re } from "./tailwind.helper-gWiv5-6R.js";
|
|
11
|
+
import { M as te } from "./MultiSelect-Bc0Re1XN.js";
|
|
11
12
|
import { c as le } from "./index-BSI9LuBZ.js";
|
|
12
13
|
/**
|
|
13
14
|
* @license lucide-react v1.16.0 - ISC
|
|
@@ -112,7 +113,7 @@ const ne = ({ field: s, value: l, onChange: a, onToggleMultiSelect: o }) => {
|
|
|
112
113
|
);
|
|
113
114
|
case "select":
|
|
114
115
|
return s.searchable === !0 ? /* @__PURE__ */ r(
|
|
115
|
-
|
|
116
|
+
_,
|
|
116
117
|
{
|
|
117
118
|
options: s.options ?? [],
|
|
118
119
|
value: l,
|
|
@@ -120,17 +121,17 @@ const ne = ({ field: s, value: l, onChange: a, onToggleMultiSelect: o }) => {
|
|
|
120
121
|
placeholder: s.placeholder,
|
|
121
122
|
searchPlaceholder: s.searchPlaceholder
|
|
122
123
|
}
|
|
123
|
-
) : /* @__PURE__ */ m(
|
|
124
|
-
/* @__PURE__ */ r(
|
|
125
|
-
/* @__PURE__ */ r(
|
|
124
|
+
) : /* @__PURE__ */ m(U, { value: l ?? "", onValueChange: a, children: [
|
|
125
|
+
/* @__PURE__ */ r(Y, { className: re((l === void 0 || l === "") && "text-muted-foreground"), children: /* @__PURE__ */ r(Z, { placeholder: s.placeholder }) }),
|
|
126
|
+
/* @__PURE__ */ r(q, { children: (i = s.options) == null ? void 0 : i.map((d) => /* @__PURE__ */ r(ee, { value: d.value, children: d.label }, d.value)) })
|
|
126
127
|
] });
|
|
127
128
|
case "date":
|
|
128
|
-
return /* @__PURE__ */ r(
|
|
129
|
+
return /* @__PURE__ */ r(O, { date: l, onDateChange: a, placeholder: s.placeholder ?? "Sélectionner une date" });
|
|
129
130
|
case "date-range":
|
|
130
|
-
return /* @__PURE__ */ r(
|
|
131
|
+
return /* @__PURE__ */ r($, { value: l, onChange: a, placeholder: s.placeholder });
|
|
131
132
|
case "multi-select":
|
|
132
133
|
return /* @__PURE__ */ r(
|
|
133
|
-
|
|
134
|
+
te,
|
|
134
135
|
{
|
|
135
136
|
options: s.options ?? [],
|
|
136
137
|
selected: l ?? [],
|
|
@@ -169,17 +170,17 @@ function oe({
|
|
|
169
170
|
}, N = () => {
|
|
170
171
|
f({}), a({}), n(!1);
|
|
171
172
|
};
|
|
172
|
-
return /* @__PURE__ */ m(
|
|
173
|
-
/* @__PURE__ */ r(
|
|
173
|
+
return /* @__PURE__ */ m(j, { open: d, onOpenChange: n, children: [
|
|
174
|
+
/* @__PURE__ */ r(z, { asChild: !0, children: /* @__PURE__ */ m(w, { variant: "outline", className: "gap-2", children: [
|
|
174
175
|
/* @__PURE__ */ r(se, { className: "size-4 shrink-0" }),
|
|
175
176
|
o
|
|
176
177
|
] }) }),
|
|
177
|
-
/* @__PURE__ */ m(
|
|
178
|
-
/* @__PURE__ */ r(
|
|
178
|
+
/* @__PURE__ */ m(R, { side: "right", className: "w-[400px] sm:w-[500px] flex flex-col p-0", children: [
|
|
179
|
+
/* @__PURE__ */ r(B, { className: "p-6 pb-0", children: /* @__PURE__ */ r(Q, { children: i }) }),
|
|
179
180
|
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto p-6 pt-6", children: /* @__PURE__ */ r("div", { className: "space-y-6", children: s.map((g, t) => /* @__PURE__ */ m("div", { className: "space-y-4", children: [
|
|
180
181
|
/* @__PURE__ */ r("h3", { className: "font-semibold text-sm text-gray-900 dark:text-gray-100 border-b pb-2", children: g.title }),
|
|
181
182
|
g.filters.map((h) => /* @__PURE__ */ m("div", { className: "space-y-2", children: [
|
|
182
|
-
/* @__PURE__ */ r(
|
|
183
|
+
/* @__PURE__ */ r(V, { htmlFor: h.key, children: h.label }),
|
|
183
184
|
/* @__PURE__ */ r(
|
|
184
185
|
ne,
|
|
185
186
|
{
|
|
@@ -195,7 +196,7 @@ function oe({
|
|
|
195
196
|
)
|
|
196
197
|
] }, h.key))
|
|
197
198
|
] }, t)) }) }),
|
|
198
|
-
/* @__PURE__ */ m(
|
|
199
|
+
/* @__PURE__ */ m(H, { className: "gap-2 p-6 border-t bg-white dark:bg-gray-950", children: [
|
|
199
200
|
/* @__PURE__ */ r(w, { variant: "outline", className: "flex-1", onClick: N, children: "Effacer les filtres" }),
|
|
200
201
|
/* @__PURE__ */ r(w, { className: "flex-1 bg-orange-500 hover:bg-orange-600 text-white", onClick: b, children: "Rechercher" })
|
|
201
202
|
] })
|
|
@@ -231,26 +232,26 @@ function ie({
|
|
|
231
232
|
});
|
|
232
233
|
};
|
|
233
234
|
return /* @__PURE__ */ m(
|
|
234
|
-
|
|
235
|
+
W,
|
|
235
236
|
{
|
|
236
237
|
onOpenChange: () => {
|
|
237
238
|
x("");
|
|
238
239
|
},
|
|
239
240
|
children: [
|
|
240
|
-
/* @__PURE__ */ r(
|
|
241
|
+
/* @__PURE__ */ r(X, { asChild: !0, children: /* @__PURE__ */ m(
|
|
241
242
|
"button",
|
|
242
243
|
{
|
|
243
244
|
className: `inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm transition-colors whitespace-nowrap ${v ? "border-primary bg-primary/10 text-primary font-medium" : "border-border bg-card text-card-foreground hover:bg-muted"}`,
|
|
244
245
|
children: [
|
|
245
246
|
s,
|
|
246
247
|
a.length > 0 && /* @__PURE__ */ r("span", { className: "flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary px-1 text-[10px] font-bold text-primary-foreground", children: a.length }),
|
|
247
|
-
/* @__PURE__ */ r(
|
|
248
|
+
/* @__PURE__ */ r(K, { className: "size-3.5 opacity-60" })
|
|
248
249
|
]
|
|
249
250
|
}
|
|
250
251
|
) }),
|
|
251
|
-
/* @__PURE__ */ m(
|
|
252
|
+
/* @__PURE__ */ m(G, { className: "w-56 p-0", align: "start", children: [
|
|
252
253
|
n ? /* @__PURE__ */ r("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
253
|
-
/* @__PURE__ */ r(
|
|
254
|
+
/* @__PURE__ */ r(J, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
254
255
|
/* @__PURE__ */ r(
|
|
255
256
|
"input",
|
|
256
257
|
{
|
|
@@ -300,7 +301,7 @@ function ie({
|
|
|
300
301
|
}
|
|
301
302
|
);
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function Ae({
|
|
304
305
|
searchQuery: s,
|
|
305
306
|
onSearchChange: l,
|
|
306
307
|
searchPlaceholder: a = "Rechercher...",
|
|
@@ -355,7 +356,7 @@ function Ne({
|
|
|
355
356
|
return /* @__PURE__ */ m("div", { className: "space-y-4 w-full", children: [
|
|
356
357
|
/* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 justify-between", children: /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
357
358
|
l !== void 0 ? /* @__PURE__ */ r(
|
|
358
|
-
|
|
359
|
+
I,
|
|
359
360
|
{
|
|
360
361
|
searchQuery: s,
|
|
361
362
|
onSearch: l,
|
|
@@ -403,6 +404,6 @@ export {
|
|
|
403
404
|
ce as A,
|
|
404
405
|
ne as F,
|
|
405
406
|
ie as S,
|
|
406
|
-
|
|
407
|
+
Ae as T,
|
|
407
408
|
oe as a
|
|
408
409
|
};
|
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
label: string;
|
|
4
|
-
fullWidth?: boolean;
|
|
5
|
-
renderView?: (data: T) => React.ReactNode;
|
|
6
|
-
renderEdit?: (data: T, editedData: Partial<T>, onChange: (val: unknown) => void) => React.ReactNode;
|
|
7
|
-
getEditValue?: (data: T) => unknown;
|
|
8
|
-
}
|
|
9
|
-
export interface SectionDef<T> {
|
|
10
|
-
title: string;
|
|
11
|
-
icon?: React.ReactNode;
|
|
12
|
-
fields: FieldDef<T>[];
|
|
13
|
-
}
|
|
14
|
-
interface FormDialogProps<T> {
|
|
1
|
+
import type { FormSchema } from "@/types";
|
|
2
|
+
export interface FormDialogProps<T> {
|
|
15
3
|
open: boolean;
|
|
16
4
|
onOpenChange: (open: boolean) => void;
|
|
17
5
|
data: T | null;
|
|
18
6
|
title: (data: T) => string;
|
|
19
7
|
headerBadge?: (data: T) => React.ReactNode;
|
|
20
|
-
|
|
21
|
-
onSave?: (
|
|
8
|
+
schema: FormSchema<T>;
|
|
9
|
+
onSave?: (data: T) => Promise<void>;
|
|
22
10
|
customFooter?: (data: T) => React.ReactNode;
|
|
23
11
|
defaultEditing?: boolean;
|
|
24
12
|
footerActions?: boolean;
|
|
@@ -26,7 +14,7 @@ interface FormDialogProps<T> {
|
|
|
26
14
|
cancelLabel?: string;
|
|
27
15
|
hideSaveIcon?: boolean;
|
|
28
16
|
maxWidth?: string;
|
|
17
|
+
isLoading?: boolean;
|
|
29
18
|
}
|
|
30
|
-
export default function FormDialog<T>({ open, onOpenChange, data, title, headerBadge,
|
|
31
|
-
export {};
|
|
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;
|
|
32
20
|
//# 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":"AAKA,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,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,SAAyB,EACzB,WAAuB,EACvB,YAAoB,EACpB,QAAyB,EACzB,SAAiB,GAClB,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAwIhD"}
|
|
@@ -3,7 +3,7 @@ export type { ButtonVariantType, DialogAction, AppDialogConfig } from "./AppDial
|
|
|
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";
|
|
6
|
-
export type {
|
|
6
|
+
export type { FormDialogProps } from "./FormDialog";
|
|
7
7
|
export { ConfirmDeleteDialog } from "./ConfirmDeleteDialog";
|
|
8
8
|
export type { ConfirmDialogConfig } from "@/types/ConfirmDialogConfig";
|
|
9
9
|
export { ConfirmationDialog } from "./ConfirmationDialog";
|
|
@@ -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;AACpF,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,
|
|
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;AACpF,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,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as i, C as l, a as s, F as g } from "../../../ConfirmationDialog-
|
|
2
|
-
import { D as e, a as r, b as t, c as n, d as f, e as m, f as p, g as C, h as F, i as P, P as c } from "../../../toggle-group-
|
|
1
|
+
import { A as i, C as l, a as s, F as g } from "../../../ConfirmationDialog-B41OAAmc.js";
|
|
2
|
+
import { D as e, a as r, b as t, c as n, d as f, e as m, f as p, g as C, h as F, i as P, P as c } from "../../../toggle-group-Cnfwf4uy.js";
|
|
3
3
|
export {
|
|
4
4
|
i as AppDialog,
|
|
5
5
|
l as ConfirmDeleteDialog,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { FormSchema } from "@/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Props mapping for the GenericForm component.
|
|
5
|
+
*/
|
|
6
|
+
interface GenericFormProps<T> {
|
|
7
|
+
/**
|
|
8
|
+
* The structural schema definition containing sections and form fields.
|
|
9
|
+
* If null or undefined, the form renders nothing.
|
|
10
|
+
*/
|
|
11
|
+
schema: FormSchema<T> | null | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Indicates if the form submission or data fetching is loading.
|
|
14
|
+
*/
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* An optional external error object (e.g. from an API request) to display.
|
|
18
|
+
*/
|
|
19
|
+
error?: Error | null;
|
|
20
|
+
/**
|
|
21
|
+
* Callback triggered when form values pass validation and are submitted.
|
|
22
|
+
*/
|
|
23
|
+
onSubmit: (data: T) => void | Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Callback triggered when the cancel button is clicked.
|
|
26
|
+
*/
|
|
27
|
+
onCancel?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Default initial values for the form fields.
|
|
30
|
+
*/
|
|
31
|
+
initialData?: T;
|
|
32
|
+
/**
|
|
33
|
+
* Disables all interactive fields within the form.
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* If true, renders the default form footer actions (Cancel and Submit).
|
|
38
|
+
* Set this to false when embedding in modals or external layouts.
|
|
39
|
+
*/
|
|
40
|
+
renderActions?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Callback that exposes the internal submit function to a parent component (like a modal dialog).
|
|
43
|
+
*/
|
|
44
|
+
onRegisterSubmit?: (submit: () => void) => void;
|
|
45
|
+
/**
|
|
46
|
+
* The default column span (1 to 4) for fields that do not explicitly declare a layout.cols property.
|
|
47
|
+
* Defaults to 4 (full width).
|
|
48
|
+
*/
|
|
49
|
+
defaultCols?: 1 | 2 | 3 | 4;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A highly dynamic, Zod-validated generic form generator.
|
|
53
|
+
* Builds responsive input layouts automatically based on a structured FormSchema definition.
|
|
54
|
+
*/
|
|
55
|
+
export declare const GenericForm: <T>({ schema, isLoading, error, onSubmit, onCancel, initialData, disabled, renderActions, onRegisterSubmit, defaultCols, }: GenericFormProps<T>) => React.ReactElement | null;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=GenericForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericForm.d.ts","sourceRoot":"","sources":["../../../../src/components/core/forms/GenericForm.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAa,UAAU,EAAgF,MAAM,SAAS,CAAC;AAE9H,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC;;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;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAChD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAG,wHAW7B,gBAAgB,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,YAAY,GAAG,IAuV7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
@@ -1,69 +1,72 @@
|
|
|
1
|
-
import { C as r, a as
|
|
2
|
-
import { A as b, C as D, a as g, F as
|
|
3
|
-
import { D as
|
|
4
|
-
import { A as u, a as I, F as v, S as E, T as M } from "../../TableFilter-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { T as
|
|
1
|
+
import { C as r, a as o, D as s, K as t, b as i, M as l } from "../../MetricCard-CXDB0msa.js";
|
|
2
|
+
import { A as b, C as D, a as g, F as m } from "../../ConfirmationDialog-B41OAAmc.js";
|
|
3
|
+
import { D as T, a as c, b as d, c as f, d as A, e as S, f as x, g as C, h as F, i as P, P as h } from "../../toggle-group-Cnfwf4uy.js";
|
|
4
|
+
import { A as u, a as I, F as v, S as E, T as M } from "../../TableFilter-CK8NyawM.js";
|
|
5
|
+
import { G as K } from "../../GenericForm-D3Gxh9kf.js";
|
|
6
|
+
import { I as B } from "../../ImageInput-BcGHoduc.js";
|
|
7
|
+
import { D as L, a as N, S as O, b as R } from "../../SearchInput-DFrIqONH.js";
|
|
8
|
+
import { M as j } from "../../MultiSelect-Bc0Re1XN.js";
|
|
9
|
+
import { A as w, a as z } from "../../AppTitle-eazxzYGa.js";
|
|
10
|
+
import { A as Q } from "../../AppSubTitle-Cr3zbmee.js";
|
|
11
|
+
import { S as W, a as X, T as Y } from "../../Topbar-6UWKhkXJ.js";
|
|
12
|
+
import { E as _ } from "../../ErrorAlert-B2LV1J2R.js";
|
|
13
|
+
import { E as aa, L as ea } from "../../LoadingState-DiBl13bH.js";
|
|
14
|
+
import { D as oa, T as sa, a as ta, b as ia, c as la, d as pa, e as ba } from "../../DataTable-jrFyuw67.js";
|
|
15
|
+
import { A as ga, a as ma, b as na, c as Ta } from "../../AppVerticalTabs-ujb4jtNi.js";
|
|
16
|
+
import { T as da } from "../../ThemeSelector-BMvfc21-.js";
|
|
15
17
|
export {
|
|
16
18
|
u as ActiveFilters,
|
|
17
19
|
I as AdvancedFilters,
|
|
18
|
-
|
|
20
|
+
w as AppActions,
|
|
19
21
|
b as AppDialog,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
Q as AppSubTitle,
|
|
23
|
+
ga as AppTabContainer,
|
|
24
|
+
ma as AppTabHeader,
|
|
25
|
+
na as AppTabs,
|
|
26
|
+
z as AppTitle,
|
|
27
|
+
Ta as AppVerticalTabs,
|
|
26
28
|
r as CardSkeleton,
|
|
27
|
-
|
|
29
|
+
o as CardsSkeleton,
|
|
28
30
|
D as ConfirmDeleteDialog,
|
|
29
31
|
g as ConfirmationDialog,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
s as DashboardCard,
|
|
33
|
+
oa as DataTable,
|
|
34
|
+
L as DatePicker,
|
|
35
|
+
N as DateRangePicker,
|
|
36
|
+
T as Dialog,
|
|
35
37
|
c as DialogClose,
|
|
36
38
|
d as DialogContent,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
f as DialogDescription,
|
|
40
|
+
A as DialogFooter,
|
|
39
41
|
S as DialogHeader,
|
|
40
42
|
x as DialogOverlay,
|
|
41
43
|
C as DialogPortal,
|
|
42
44
|
F as DialogTitle,
|
|
43
45
|
P as DialogTrigger,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
_ as ErrorAlert,
|
|
47
|
+
aa as ErrorState,
|
|
46
48
|
v as FilterField,
|
|
47
|
-
|
|
48
|
-
K as
|
|
49
|
+
m as FormDialog,
|
|
50
|
+
K as GenericForm,
|
|
51
|
+
B as ImageInput,
|
|
49
52
|
t as KpiCard,
|
|
50
53
|
i as KpiCards,
|
|
51
|
-
|
|
54
|
+
ea as LoadingState,
|
|
52
55
|
l as MetricCard,
|
|
53
|
-
|
|
56
|
+
j as MultiSelect,
|
|
54
57
|
h as Progress,
|
|
55
58
|
O as SearchInput,
|
|
56
59
|
E as SearchableFilterPill,
|
|
57
60
|
R as SearchableSelect,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
W as Sidebar,
|
|
62
|
+
X as SidebarNavItem,
|
|
63
|
+
sa as TableActions,
|
|
64
|
+
ta as TableBody,
|
|
65
|
+
ia as TableBulkActions,
|
|
63
66
|
M as TableFilter,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
la as TableHeader,
|
|
68
|
+
pa as TablePagination,
|
|
69
|
+
ba as TableSettings,
|
|
70
|
+
da as ThemeSelector,
|
|
71
|
+
Y as Topbar
|
|
69
72
|
};
|
|
@@ -9,7 +9,8 @@ interface MultiSelectProps {
|
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
searchable?: boolean;
|
|
11
11
|
searchPlaceholder?: string;
|
|
12
|
+
disabled?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare const MultiSelect: ({ options, selected, onToggle, onClear, onSelectAll, placeholder, searchable, searchPlaceholder, }: MultiSelectProps) => React.ReactElement;
|
|
14
|
+
export declare const MultiSelect: ({ options, selected, onToggle, onClear, onSelectAll, placeholder, searchable, searchPlaceholder, disabled, }: MultiSelectProps) => React.ReactElement;
|
|
14
15
|
export {};
|
|
15
16
|
//# 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;
|
|
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;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,8GAUzB,gBAAgB,KAAG,KAAK,CAAC,YAoK3B,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { I as
|
|
2
|
-
import { D as c, a as
|
|
1
|
+
import { I as r } from "../../../ImageInput-BcGHoduc.js";
|
|
2
|
+
import { D as c, a as o, S as s, b as p } from "../../../SearchInput-DFrIqONH.js";
|
|
3
|
+
import { M as l } from "../../../MultiSelect-Bc0Re1XN.js";
|
|
3
4
|
export {
|
|
4
5
|
c as DatePicker,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
o as DateRangePicker,
|
|
7
|
+
r as ImageInput,
|
|
8
|
+
l as MultiSelect,
|
|
9
|
+
s as SearchInput,
|
|
10
|
+
p as SearchableSelect
|
|
10
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as o, a as t } from "../../../AppTitle-
|
|
2
|
-
import { A as e } from "../../../AppSubTitle-
|
|
1
|
+
import { A as o, a as t } from "../../../AppTitle-eazxzYGa.js";
|
|
2
|
+
import { A as e } from "../../../AppSubTitle-Cr3zbmee.js";
|
|
3
3
|
export {
|
|
4
4
|
o as AppActions,
|
|
5
5
|
e as AppSubTitle,
|