@krosoft/react 0.0.110 → 0.0.112

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.
Files changed (74) hide show
  1. package/dist/{AppActions-BiBYy79y.js → AppActions-po4LjUcM.js} +5 -5
  2. package/dist/{AppSubTitle-Cotab0k5.js → AppSubTitle-CWrsJYFJ.js} +1 -1
  3. package/dist/{AppVerticalTabs-CtZx3n-i.js → AppVerticalTabs-CdqoObXx.js} +4 -4
  4. package/dist/ConfirmationDialog-CkMyyh_3.js +221 -0
  5. package/dist/{DataTable-DVtbFX-O.js → DataTable-CUU_sTQd.js} +8 -8
  6. package/dist/{ErrorAlert-DYuVgrm3.js → ErrorAlert-C6BbHHRZ.js} +2 -2
  7. package/dist/{GenericForm-CbgkBEAm.js → GenericForm-CmwqEXiQ.js} +7 -7
  8. package/dist/{ImageInput-BOnsST3X.js → ImageInput-C8HcxE8t.js} +5 -5
  9. package/dist/{LoadingState-B4M2grXs.js → LoadingState-_mcS4fs9.js} +1 -1
  10. package/dist/{MultiSelect-C_rUb130.js → MultiSelect-BoisW4Kn.js} +4 -4
  11. package/dist/{SearchInput-DJiMuyA5.js → SearchInput-DJ_F3emq.js} +5 -5
  12. package/dist/{MetricCard-BUeI3lGg.js → SkeletonCards-CTUG28vD.js} +27 -27
  13. package/dist/{TableFilter-BnWrOAr7.js → TableFilter-DqDmlzhk.js} +8 -8
  14. package/dist/{ThemeSelector-C4W3_5jq.js → ThemeSelector--w3R6Ff3.js} +2 -2
  15. package/dist/{Topbar-CZ3OCeK_.js → Topbar-DFu_OdSs.js} +2 -2
  16. package/dist/{alert-BUwDmcbB.js → alert-B34E_4uH.js} +1 -1
  17. package/dist/{badge-AFnM0R9E.js → badge-CfWlt79h.js} +3 -3
  18. package/dist/components/core/cards/SkeletonCard.d.ts +3 -0
  19. package/dist/components/core/cards/SkeletonCard.d.ts.map +1 -0
  20. package/dist/components/core/cards/SkeletonCards.d.ts +7 -0
  21. package/dist/components/core/cards/SkeletonCards.d.ts.map +1 -0
  22. package/dist/components/core/cards/index.d.ts +2 -2
  23. package/dist/components/core/cards/index.d.ts.map +1 -1
  24. package/dist/components/core/cards/index.js +7 -7
  25. package/dist/components/core/dialogs/ConfirmationDialog.d.ts +6 -8
  26. package/dist/components/core/dialogs/ConfirmationDialog.d.ts.map +1 -1
  27. package/dist/components/core/dialogs/index.d.ts +0 -1
  28. package/dist/components/core/dialogs/index.d.ts.map +1 -1
  29. package/dist/components/core/dialogs/index.js +13 -14
  30. package/dist/components/core/filters/index.js +1 -1
  31. package/dist/components/core/forms/index.js +1 -1
  32. package/dist/components/core/index.js +61 -62
  33. package/dist/components/core/inputs/index.js +3 -3
  34. package/dist/components/core/layouts/index.js +2 -2
  35. package/dist/components/core/navbar/index.js +1 -1
  36. package/dist/components/core/states/index.js +2 -2
  37. package/dist/components/core/table/index.js +1 -1
  38. package/dist/components/core/tabs/index.js +1 -1
  39. package/dist/components/core/theme/index.js +1 -1
  40. package/dist/components/index.js +290 -291
  41. package/dist/components/ui/chart.d.ts +1 -1
  42. package/dist/components/ui/chart.d.ts.map +1 -1
  43. package/dist/components/ui/index.js +6 -6
  44. package/dist/createLucideIcon-MP_wDWjs.js +116 -0
  45. package/dist/{ellipsis-vertical-CgqKXU8e.js → ellipsis-vertical-kB5yFb-i.js} +1 -1
  46. package/dist/{grip-vertical-J6s3ddpf.js → grip-vertical-DGywJXzS.js} +1 -1
  47. package/dist/hooks/behavior/useConfirmDeleteDialog.d.ts.map +1 -1
  48. package/dist/hooks/behavior/useConfirmationDialog.d.ts +11 -0
  49. package/dist/hooks/behavior/useConfirmationDialog.d.ts.map +1 -0
  50. package/dist/hooks/behavior/useDialog.d.ts +13 -0
  51. package/dist/hooks/behavior/useDialog.d.ts.map +1 -0
  52. package/dist/hooks/index.d.ts +8 -4
  53. package/dist/hooks/index.d.ts.map +1 -1
  54. package/dist/hooks/index.js +109 -68
  55. package/dist/index-Be16PP7H.js +34 -0
  56. package/dist/{loader-circle-Cfo0gDyD.js → loader-circle-CKy7u7JW.js} +1 -1
  57. package/dist/{select-pm9O5uLm.js → select-DlQvLtI3.js} +2 -2
  58. package/dist/{toaster-BTTmMS-Z.js → toaster-CKoOjjKr.js} +3 -3
  59. package/dist/toggle-group-wIgXZYDq.js +29086 -0
  60. package/dist/{tooltip-6vdhKg8V.js → tooltip-YhBPXbcJ.js} +20 -19
  61. package/dist/types/ConfirmDialogConfig.d.ts +5 -0
  62. package/dist/types/ConfirmDialogConfig.d.ts.map +1 -1
  63. package/dist/types/index.d.ts +1 -0
  64. package/dist/types/index.d.ts.map +1 -1
  65. package/package.json +2 -2
  66. package/dist/ConfirmationDialog-Be0Vj7qe.js +0 -257
  67. package/dist/components/core/cards/CardSkeleton.d.ts +0 -3
  68. package/dist/components/core/cards/CardSkeleton.d.ts.map +0 -1
  69. package/dist/components/core/cards/CardsSkeleton.d.ts +0 -7
  70. package/dist/components/core/cards/CardsSkeleton.d.ts.map +0 -1
  71. package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts +0 -10
  72. package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts.map +0 -1
  73. package/dist/index-71PtBtHf.js +0 -147
  74. package/dist/toggle-group-DKORC9Wq.js +0 -21815
@@ -1,9 +1,9 @@
1
- import { A as s, j as o, k as r, l as t, m as n, n as i, o as l, p as b, q as u, r as g, s as p, t as C, u as d, v as c, w as m, x as S, B as T, y as M, z as D, C as w, E as x, F as P, G as I, H as h, I as v, J as A, K as F, L as B, M as L, N as G, O as R, Q as H, R as N, S as k, T as f, U as y, V as O, W as V, X as z, Y as E, Z as U, _ as j, $ as q, a0 as J, a1 as K, a2 as Q, a3 as W, a4 as X, a5 as Y, a6 as Z, a7 as _, a8 as $, a9 as aa, aa as ea, ab as sa, ac as oa, ad as ra, ae as ta, af as na, ag as ia, ah as la, ai as ba, aj as ua, ak as ga, al as pa, am as Ca, D as da, a as ca, b as ma, c as Sa, d as Ta, e as Ma, f as Da, g as wa, h as xa, i as Pa, an as Ia, ao as ha, ap as va, aq as Aa, ar as Fa, as as Ba, at as La, au as Ga, av as Ra, aw as Ha, ax as Na, ay as ka, az as fa, aA as ya, aB as Oa, aC as Va, aD as za, aE as Ea, aF as Ua, aG as ja, aH as qa, aI as Ja, aJ as Ka, aK as Qa, aL as Wa, aM as Xa, aN as Ya, aO as Za, aP as _a, aQ as $a, aR as ae, aS as ee, aT as se, aU as oe, aV as re, aW as te, aX as ne, aY as ie, aZ as le, a_ as be, a$ as ue, b0 as ge, b1 as pe, b2 as Ce, b3 as de, b4 as ce, b5 as me, b6 as Se, b7 as Te, b8 as Me, b9 as De, ba as we, bb as xe, bc as Pe, bd as Ie, be as he, bf as ve, bg as Ae, bh as Fe, bi as Be, bj as Le, bk as Ge, bl as Re, bm as He, bn as Ne, bo as ke, bp as fe, bq as ye, br as Oe, bs as Ve, bt as ze, bu as Ee, bv as Ue, bw as je, bx as qe, P as Je, by as Ke, bz as Qe, bA as We, bB as Xe, bC as Ye, bD as Ze, bE as _e, bF as $e, bG as as, bH as es, bI as ss, bJ as os, bK as rs, bL as ts, bM as ns, bN as is, bO as ls, bP as bs, bQ as us, bR as gs, bS as ps, bT as Cs, bU as ds, bV as cs, bW as ms, bX as Ss, bY as Ts, bZ as Ms, b_ as Ds, b$ as ws, c0 as xs, c1 as Ps, c2 as Is, c3 as hs, c4 as vs, c5 as As, c6 as Fs, c7 as Bs, c8 as Ls, c9 as Gs, ca as Rs, cb as Hs, cc as Ns, cd as ks } from "../../toggle-group-DKORC9Wq.js";
2
- import { A as ys, a as Os, b as Vs } from "../../alert-BUwDmcbB.js";
3
- import { A as Es, C as Us, a as js, b as qs, R as Js, c as Ks, d as Qs, S as Ws, T as Xs, e as Ys } from "../../toaster-BTTmMS-Z.js";
4
- import { B as _s, b as $s } from "../../badge-AFnM0R9E.js";
5
- import { B as eo, T as so, a as oo, b as ro, c as to, d as no } from "../../tooltip-6vdhKg8V.js";
6
- import { S as lo, a as bo, b as uo, c as go, d as po, e as Co, f as co, g as mo, h as So, i as To } from "../../select-pm9O5uLm.js";
1
+ import { A as s, j as o, k as r, l as t, m as n, n as i, o as l, p as b, q as u, r as g, s as p, t as C, u as d, v as c, w as m, x as S, B as T, y as M, z as D, C as w, E as x, F as P, G as I, H as h, I as v, J as A, K as F, L as B, M as L, N as G, O as R, Q as H, R as N, S as k, T as f, U as y, V as O, W as V, X as z, Y as E, Z as U, _ as j, $ as q, a0 as J, a1 as K, a2 as Q, a3 as W, a4 as X, a5 as Y, a6 as Z, a7 as _, a8 as $, a9 as aa, aa as ea, ab as sa, ac as oa, ad as ra, ae as ta, af as na, ag as ia, ah as la, ai as ba, aj as ua, ak as ga, al as pa, am as Ca, D as da, a as ca, b as ma, c as Sa, d as Ta, e as Ma, f as Da, g as wa, h as xa, i as Pa, an as Ia, ao as ha, ap as va, aq as Aa, ar as Fa, as as Ba, at as La, au as Ga, av as Ra, aw as Ha, ax as Na, ay as ka, az as fa, aA as ya, aB as Oa, aC as Va, aD as za, aE as Ea, aF as Ua, aG as ja, aH as qa, aI as Ja, aJ as Ka, aK as Qa, aL as Wa, aM as Xa, aN as Ya, aO as Za, aP as _a, aQ as $a, aR as ae, aS as ee, aT as se, aU as oe, aV as re, aW as te, aX as ne, aY as ie, aZ as le, a_ as be, a$ as ue, b0 as ge, b1 as pe, b2 as Ce, b3 as de, b4 as ce, b5 as me, b6 as Se, b7 as Te, b8 as Me, b9 as De, ba as we, bb as xe, bc as Pe, bd as Ie, be as he, bf as ve, bg as Ae, bh as Fe, bi as Be, bj as Le, bk as Ge, bl as Re, bm as He, bn as Ne, bo as ke, bp as fe, bq as ye, br as Oe, bs as Ve, bt as ze, bu as Ee, bv as Ue, bw as je, bx as qe, P as Je, by as Ke, bz as Qe, bA as We, bB as Xe, bC as Ye, bD as Ze, bE as _e, bF as $e, bG as as, bH as es, bI as ss, bJ as os, bK as rs, bL as ts, bM as ns, bN as is, bO as ls, bP as bs, bQ as us, bR as gs, bS as ps, bT as Cs, bU as ds, bV as cs, bW as ms, bX as Ss, bY as Ts, bZ as Ms, b_ as Ds, b$ as ws, c0 as xs, c1 as Ps, c2 as Is, c3 as hs, c4 as vs, c5 as As, c6 as Fs, c7 as Bs, c8 as Ls, c9 as Gs, ca as Rs, cb as Hs, cc as Ns, cd as ks } from "../../toggle-group-wIgXZYDq.js";
2
+ import { A as ys, a as Os, b as Vs } from "../../alert-B34E_4uH.js";
3
+ import { A as Es, C as Us, a as js, b as qs, R as Js, c as Ks, d as Qs, S as Ws, T as Xs, e as Ys } from "../../toaster-CKoOjjKr.js";
4
+ import { B as _s, b as $s } from "../../badge-CfWlt79h.js";
5
+ import { B as eo, T as so, a as oo, b as ro, c as to, d as no } from "../../tooltip-YhBPXbcJ.js";
6
+ import { S as lo, a as bo, b as uo, c as go, d as po, e as Co, f as co, g as mo, h as So, i as To } from "../../select-DlQvLtI3.js";
7
7
  export {
8
8
  s as Accordion,
9
9
  o as AccordionContent,
@@ -0,0 +1,116 @@
1
+ import { useContext as b, createContext as L, forwardRef as C, createElement as i } from "react";
2
+ /**
3
+ * @license lucide-react v1.17.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const h = (...e) => e.filter((t, o, r) => !!t && t.trim() !== "" && r.indexOf(t) === o).join(" ").trim();
9
+ /**
10
+ * @license lucide-react v1.17.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ const W = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
16
+ /**
17
+ * @license lucide-react v1.17.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */
22
+ const S = (e) => e.replace(
23
+ /^([A-Z])|[\s-_]+(\w)/g,
24
+ (t, o, r) => r ? r.toUpperCase() : o.toLowerCase()
25
+ );
26
+ /**
27
+ * @license lucide-react v1.17.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */
32
+ const d = (e) => {
33
+ const t = S(e);
34
+ return t.charAt(0).toUpperCase() + t.slice(1);
35
+ };
36
+ /**
37
+ * @license lucide-react v1.17.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */
42
+ var c = {
43
+ xmlns: "http://www.w3.org/2000/svg",
44
+ width: 24,
45
+ height: 24,
46
+ viewBox: "0 0 24 24",
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ strokeWidth: 2,
50
+ strokeLinecap: "round",
51
+ strokeLinejoin: "round"
52
+ };
53
+ /**
54
+ * @license lucide-react v1.17.0 - ISC
55
+ *
56
+ * This source code is licensed under the ISC license.
57
+ * See the LICENSE file in the root directory of this source tree.
58
+ */
59
+ const v = (e) => {
60
+ for (const t in e)
61
+ if (t.startsWith("aria-") || t === "role" || t === "title")
62
+ return !0;
63
+ return !1;
64
+ }, y = L({}), $ = () => b(y), j = C(
65
+ ({ color: e, size: t, strokeWidth: o, absoluteStrokeWidth: r, className: a = "", children: s, iconNode: p, ...l }, m) => {
66
+ const {
67
+ size: n = 24,
68
+ strokeWidth: u = 2,
69
+ absoluteStrokeWidth: x = !1,
70
+ color: w = "currentColor",
71
+ className: f = ""
72
+ } = $() ?? {}, k = r ?? x ? Number(o ?? u) * 24 / Number(t ?? n) : o ?? u;
73
+ return i(
74
+ "svg",
75
+ {
76
+ ref: m,
77
+ ...c,
78
+ width: t ?? n ?? c.width,
79
+ height: t ?? n ?? c.height,
80
+ stroke: e ?? w,
81
+ strokeWidth: k,
82
+ className: h("lucide", f, a),
83
+ ...!s && !v(l) && { "aria-hidden": "true" },
84
+ ...l
85
+ },
86
+ [
87
+ ...p.map(([g, A]) => i(g, A)),
88
+ ...Array.isArray(s) ? s : [s]
89
+ ]
90
+ );
91
+ }
92
+ );
93
+ /**
94
+ * @license lucide-react v1.17.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */
99
+ const I = (e, t) => {
100
+ const o = C(
101
+ ({ className: r, ...a }, s) => i(j, {
102
+ ref: s,
103
+ iconNode: t,
104
+ className: h(
105
+ `lucide-${W(d(e))}`,
106
+ `lucide-${e}`,
107
+ r
108
+ ),
109
+ ...a
110
+ })
111
+ );
112
+ return o.displayName = d(e), o;
113
+ };
114
+ export {
115
+ I as c
116
+ };
@@ -1,4 +1,4 @@
1
- import { c } from "./index-71PtBtHf.js";
1
+ import { c } from "./createLucideIcon-MP_wDWjs.js";
2
2
  /**
3
3
  * @license lucide-react v1.17.0 - ISC
4
4
  *
@@ -1,4 +1,4 @@
1
- import { c } from "./index-71PtBtHf.js";
1
+ import { c } from "./createLucideIcon-MP_wDWjs.js";
2
2
  /**
3
3
  * @license lucide-react v1.17.0 - ISC
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"useConfirmDeleteDialog.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/useConfirmDeleteDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE,UAAU,2BAA2B;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,GAAI,+DAMpC,2BAA2B,KAAG,mBAsChC,CAAC"}
1
+ {"version":3,"file":"useConfirmDeleteDialog.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/useConfirmDeleteDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIlE,UAAU,2BAA2B;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,GAAI,+DAMpC,2BAA2B,KAAG,mBAgBhC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ConfirmDialogConfig } from "@/types/ConfirmDialogConfig";
2
+ interface UseConfirmationDialogProps {
3
+ titleKey: string;
4
+ descriptionKey: string;
5
+ confirmKey?: string;
6
+ onConfirm: (id: string) => Promise<any>;
7
+ onReset?: () => void;
8
+ }
9
+ export declare const useConfirmationDialog: ({ titleKey, descriptionKey, confirmKey, onConfirm, onReset, }: UseConfirmationDialogProps) => ConfirmDialogConfig;
10
+ export {};
11
+ //# sourceMappingURL=useConfirmationDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/useConfirmationDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE,UAAU,0BAA0B;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,GAAI,+DAMnC,0BAA0B,KAAG,mBA0B/B,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface DialogState {
2
+ id: string | null;
3
+ name: string | null;
4
+ isOpen: boolean;
5
+ openDialog: (id: string, name: string) => void;
6
+ onClose: () => void;
7
+ }
8
+ interface UseDialogProps {
9
+ onReset?: () => void;
10
+ }
11
+ export declare const useDialog: (props?: UseDialogProps) => DialogState;
12
+ export {};
13
+ //# sourceMappingURL=useDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialog.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/useDialog.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,GAAI,QAAQ,cAAc,KAAG,WAsBlD,CAAC"}
@@ -1,10 +1,14 @@
1
+ export { useConfirmationDialog } from "./behavior/useConfirmationDialog";
2
+ export { useConfirmDeleteDialog } from "./behavior/useConfirmDeleteDialog";
3
+ export { useDataTable } from "./ui/useDataTable";
4
+ export { useDialog } from "./behavior/useDialog";
5
+ export type { DialogState } from "./behavior/useDialog";
1
6
  export { useMobile } from "./ui/useMobile";
2
7
  export { useNotifications } from "./ui/useNotifications";
3
8
  export type { UseNotificationsResult } from "./ui/useNotifications";
4
- export { useToast, toast } from "./ui/useToast";
9
+ export { useServerTable } from "./ui/useServerTable";
10
+ export type { UseServerTableResult } from "./ui/useServerTable";
5
11
  export { useTheme } from "./ui/useTheme";
6
12
  export type { ThemeOption } from "./ui/useTheme";
7
- export { useDataTable } from "./ui/useDataTable";
8
- export { useServerTable } from "./ui/useServerTable";
9
- export { useConfirmDeleteDialog } from "./behavior/useConfirmDeleteDialog";
13
+ export { toast, useToast } from "./ui/useToast";
10
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -1,80 +1,121 @@
1
- import { u as v } from "../useMobile-DN1_OMDB.js";
2
- import { u as A } from "../useNotifications-zbUhCvF_.js";
3
- import { t as j, u as q } from "../useToast-BFTk4lWz.js";
4
- import { u as G } from "../useTheme-B0Bxda3I.js";
5
- import { u as I } from "../useDataTable-CxcA5S-s.js";
6
- import { useState as a, useEffect as F, useCallback as l } from "react";
7
- function y(u, h = "nom", e = {}) {
8
- const [g, n] = a(e.initialPage ?? 1), [r, s] = a(e.initialPageSize ?? 10), [m, c] = a(h), [S, o] = a(e.initialSortDirection ?? "asc"), [i, C] = a(e.initialSearchText ?? ""), [d, f] = a(e.initialSearchText ?? ""), [x, T] = a(u);
9
- F(() => {
10
- const t = setTimeout(() => {
11
- f(i);
12
- }, e.debounceMs ?? 300);
13
- return () => {
14
- clearTimeout(t);
15
- };
16
- }, [i, e.debounceMs]);
17
- const p = l((t) => {
18
- C(t), n(1);
19
- }, []), D = l((t) => {
20
- T(t), n(1);
21
- }, []), b = l((t, z) => {
22
- c(t), o(z);
23
- }, []), P = l((t) => {
24
- s(t), n(1);
25
- }, []);
1
+ import { useState as i, useEffect as M, useCallback as u } from "react";
2
+ import { c as k } from "../createLucideIcon-MP_wDWjs.js";
3
+ import { u as A } from "../useDataTable-CxcA5S-s.js";
4
+ import { u as K } from "../useMobile-DN1_OMDB.js";
5
+ import { u as R } from "../useNotifications-zbUhCvF_.js";
6
+ import { u as B } from "../useTheme-B0Bxda3I.js";
7
+ import { t as J, u as Q } from "../useToast-BFTk4lWz.js";
8
+ /**
9
+ * @license lucide-react v1.17.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const z = [
15
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
16
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
17
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
18
+ ], N = k("trash", z), v = (o) => {
19
+ const [t, e] = i(null), s = (n, l) => {
20
+ var c;
21
+ (c = o == null ? void 0 : o.onReset) == null || c.call(o), e({ id: n, name: l });
22
+ }, a = () => {
23
+ e(null);
24
+ };
26
25
  return {
27
- currentPage: g,
28
- onPageChange: n,
29
- pageSize: r,
30
- onPageSizeChange: P,
31
- sortColumn: m,
32
- sortDirection: S,
33
- onSortChange: b,
34
- searchText: i,
35
- debouncedSearchText: d,
36
- onSearchChange: p,
37
- appliedFilters: x,
38
- onFiltersChange: D
26
+ id: (t == null ? void 0 : t.id) ?? null,
27
+ name: (t == null ? void 0 : t.name) ?? null,
28
+ isOpen: !!t,
29
+ openDialog: s,
30
+ onClose: a
39
31
  };
40
- }
41
- const E = ({
42
- titleKey: u,
43
- descriptionKey: h,
32
+ }, F = ({
33
+ titleKey: o,
34
+ descriptionKey: t,
44
35
  confirmKey: e = "Confirmer",
45
- onConfirm: g,
46
- onReset: n
36
+ onConfirm: s,
37
+ onReset: a
47
38
  }) => {
48
- const [r, s] = a(null), m = (o, i) => {
49
- n == null || n(), s({ id: o, name: i });
50
- }, c = () => {
51
- s(null);
52
- }, S = async () => {
53
- if (r)
39
+ const n = v({ onReset: a }), l = async () => {
40
+ if (n.id)
54
41
  try {
55
- await g(r.id), c();
56
- } catch (o) {
57
- console.error("Error deleting item:", o);
42
+ await s(n.id), n.onClose();
43
+ } catch (c) {
44
+ console.error("Error confirming action:", c);
58
45
  }
59
46
  };
60
47
  return {
61
- isOpen: !!r,
62
- itemName: (r == null ? void 0 : r.name) ?? null,
63
- title: u,
64
- description: h,
48
+ isOpen: n.isOpen,
49
+ itemName: n.name,
50
+ title: o,
51
+ description: t,
65
52
  confirmKey: e,
66
- openDialog: m,
67
- onClose: c,
68
- onConfirm: S
53
+ openDialog: n.openDialog,
54
+ onClose: n.onClose,
55
+ onConfirm: l
69
56
  };
70
- };
57
+ }, w = ({
58
+ titleKey: o,
59
+ descriptionKey: t,
60
+ confirmKey: e = "Supprimer",
61
+ onConfirm: s,
62
+ onReset: a
63
+ }) => ({
64
+ ...F({
65
+ titleKey: o,
66
+ descriptionKey: t,
67
+ confirmKey: e,
68
+ onConfirm: s,
69
+ onReset: a
70
+ }),
71
+ loadingKey: "Suppression...",
72
+ icon: N,
73
+ titleClassName: "flex items-center gap-2 text-destructive",
74
+ headerClassName: "bg-gradient-to-r from-slate-900 to-purple-700 rounded-t-lg shrink-0"
75
+ });
76
+ function E(o, t = "nom", e = {}) {
77
+ const [s, a] = i(e.initialPage ?? 1), [n, l] = i(e.initialPageSize ?? 10), [c, h] = i(t), [m, d] = i(e.initialSortDirection ?? "asc"), [g, C] = i(e.initialSearchText ?? ""), [f, S] = i(e.initialSearchText ?? ""), [x, D] = i(o);
78
+ M(() => {
79
+ const r = setTimeout(() => {
80
+ S(g);
81
+ }, e.debounceMs ?? 300);
82
+ return () => {
83
+ clearTimeout(r);
84
+ };
85
+ }, [g, e.debounceMs]);
86
+ const T = u((r) => {
87
+ C(r), a(1);
88
+ }, []), b = u((r) => {
89
+ D(r), a(1);
90
+ }, []), p = u((r, y) => {
91
+ h(r), d(y);
92
+ }, []), P = u((r) => {
93
+ l(r), a(1);
94
+ }, []);
95
+ return {
96
+ currentPage: s,
97
+ onPageChange: a,
98
+ pageSize: n,
99
+ onPageSizeChange: P,
100
+ sortColumn: c,
101
+ sortDirection: m,
102
+ onSortChange: p,
103
+ searchText: g,
104
+ debouncedSearchText: f,
105
+ onSearchChange: T,
106
+ appliedFilters: x,
107
+ onFiltersChange: b
108
+ };
109
+ }
71
110
  export {
72
- j as toast,
73
- E as useConfirmDeleteDialog,
74
- I as useDataTable,
75
- v as useMobile,
76
- A as useNotifications,
77
- y as useServerTable,
78
- G as useTheme,
79
- q as useToast
111
+ J as toast,
112
+ w as useConfirmDeleteDialog,
113
+ F as useConfirmationDialog,
114
+ A as useDataTable,
115
+ v as useDialog,
116
+ K as useMobile,
117
+ R as useNotifications,
118
+ E as useServerTable,
119
+ B as useTheme,
120
+ Q as useToast
80
121
  };
@@ -0,0 +1,34 @@
1
+ import { a as O } from "./tailwind.helper-gWiv5-6R.js";
2
+ const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
+ var u;
4
+ if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
5
+ const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
+ const a = n == null ? void 0 : n[t], s = d == null ? void 0 : d[t];
7
+ if (a === null) return null;
8
+ const i = m(a) || m(s);
9
+ return r[t][i];
10
+ }), v = n && Object.entries(n).reduce((t, a) => {
11
+ let [s, i] = a;
12
+ return i === void 0 || (t[s] = i), t;
13
+ }, {}), N = l == null || (u = l.compoundVariants) === null || u === void 0 ? void 0 : u.reduce((t, a) => {
14
+ let { class: s, className: i, ...f } = a;
15
+ return Object.entries(f).every((C) => {
16
+ let [c, o] = C;
17
+ return Array.isArray(o) ? o.includes({
18
+ ...d,
19
+ ...v
20
+ }[c]) : {
21
+ ...d,
22
+ ...v
23
+ }[c] === o;
24
+ }) ? [
25
+ ...t,
26
+ s,
27
+ i
28
+ ] : t;
29
+ }, []);
30
+ return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
31
+ };
32
+ export {
33
+ j as c
34
+ };
@@ -1,4 +1,4 @@
1
- import { c } from "./index-71PtBtHf.js";
1
+ import { c } from "./createLucideIcon-MP_wDWjs.js";
2
2
  /**
3
3
  * @license lucide-react v1.17.0 - ISC
4
4
  *
@@ -4,8 +4,8 @@ import * as a from "react";
4
4
  import re, { useState as fn } from "react";
5
5
  import * as ut from "react-dom";
6
6
  import pn from "react-dom";
7
- import { f as dt, g as ft, u as B, h as We, P as A, i as G, A as mn, j as M, k as Ye, l as pt, D as vn, m as hn, n as qe, R as gn, V as Sn, o as yn, C as mt } from "./tooltip-6vdhKg8V.js";
8
- import { c as Xe } from "./index-71PtBtHf.js";
7
+ import { f as dt, g as ft, u as B, h as We, P as A, i as G, A as mn, j as M, k as Ye, l as pt, D as vn, m as hn, n as qe, R as gn, V as Sn, o as yn, C as mt } from "./tooltip-YhBPXbcJ.js";
8
+ import { c as Xe } from "./createLucideIcon-MP_wDWjs.js";
9
9
  // @__NO_SIDE_EFFECTS__
10
10
  function Qe(e) {
11
11
  const t = /* @__PURE__ */ wn(e), n = a.forwardRef((r, o) => {
@@ -1,10 +1,10 @@
1
1
  import * as c from "react";
2
2
  import "react-dom";
3
- import { e as m } from "./tooltip-6vdhKg8V.js";
3
+ import { e as m } from "./tooltip-YhBPXbcJ.js";
4
4
  import { jsx as a, jsxs as l } from "react/jsx-runtime";
5
- import { cf as g, cg as v, ch as b, ci as h, cj as w, ck as x, cl as T, c4 as y, c0 as N, c5 as R, c3 as C, c2 as $, c6 as P } from "./toggle-group-DKORC9Wq.js";
5
+ import { cf as g, cg as v, ch as b, ci as h, cj as w, ck as x, cl as T, c4 as y, c0 as N, c5 as R, c3 as C, c2 as $, c6 as P } from "./toggle-group-wIgXZYDq.js";
6
6
  import { c as n } from "./tailwind.helper-gWiv5-6R.js";
7
- import { G as S } from "./grip-vertical-J6s3ddpf.js";
7
+ import { G as S } from "./grip-vertical-DGywJXzS.js";
8
8
  import { useTheme as j } from "next-themes";
9
9
  import { u as A } from "./useToast-BFTk4lWz.js";
10
10
  var z = [