@krosoft/react 0.0.199 → 0.0.201

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 (47) hide show
  1. package/dist/{AppActions-DeBcK3cv.js → AppActions-ViFjSupi.js} +6 -6
  2. package/dist/{AppSubTitle-CdIM6aXB.js → AppSubTitle-ClHzadQW.js} +1 -1
  3. package/dist/{AppVerticalTabs-BlgIZ0mf.js → AppVerticalTabs-Cj66X8_R.js} +7 -7
  4. package/dist/{ConfirmationDialog-DZ6tvSwP.js → ConfirmationDialog-BoajNW2s.js} +15 -15
  5. package/dist/{DataTable-BDW0AEsH.js → DataTable-BUcnJCi6.js} +22 -22
  6. package/dist/{GenericForm-DFTUIw-X.js → GenericForm-BPY5O-B6.js} +43 -43
  7. package/dist/{ImageInput-MzY2W495.js → ImageInput-DOIglcpv.js} +2 -2
  8. package/dist/{KpiCardsLayout-fcfJK4ts.js → KpiCardsLayout-D9NSC5Fb.js} +4 -4
  9. package/dist/{MultiSelect-V-RantiK.js → MultiSelect-B60y82TF.js} +16 -16
  10. package/dist/{SearchInput-tz8UERbu.js → SearchInput-C-jCOSoi.js} +49 -49
  11. package/dist/{SkeletonCards-CyP7ZysR.js → SkeletonCards-63vDljXy.js} +2 -2
  12. package/dist/{TableFilter-BXf-oSjf.js → TableFilter-DP7cq0PU.js} +26 -26
  13. package/dist/Topbar-0EBMHLwG.js +301 -0
  14. package/dist/components/core/cards/index.js +1 -1
  15. package/dist/components/core/dialogs/index.js +8 -7
  16. package/dist/components/core/filters/index.js +1 -1
  17. package/dist/components/core/forms/index.js +1 -1
  18. package/dist/components/core/index.js +66 -64
  19. package/dist/components/core/inputs/index.js +3 -3
  20. package/dist/components/core/layouts/index.js +3 -3
  21. package/dist/components/core/navbar/GlobalSearch.d.ts +52 -0
  22. package/dist/components/core/navbar/GlobalSearch.d.ts.map +1 -0
  23. package/dist/components/core/navbar/index.d.ts +2 -0
  24. package/dist/components/core/navbar/index.d.ts.map +1 -1
  25. package/dist/components/core/navbar/index.js +6 -5
  26. package/dist/components/core/table/index.js +1 -1
  27. package/dist/components/core/tabs/index.js +1 -1
  28. package/dist/components/index.js +293 -292
  29. package/dist/components/ui/command.d.ts +20 -2
  30. package/dist/components/ui/command.d.ts.map +1 -1
  31. package/dist/components/ui/index.d.ts +1 -0
  32. package/dist/components/ui/index.d.ts.map +1 -1
  33. package/dist/components/ui/index.js +187 -187
  34. package/dist/hooks/behavior/index.d.ts +1 -0
  35. package/dist/hooks/behavior/index.d.ts.map +1 -1
  36. package/dist/hooks/behavior/index.js +6 -5
  37. package/dist/hooks/behavior/useDebouncedValue.d.ts +6 -0
  38. package/dist/hooks/behavior/useDebouncedValue.d.ts.map +1 -0
  39. package/dist/hooks/index.js +20 -19
  40. package/dist/sheet-C-QvdRNi.js +245 -0
  41. package/dist/{toaster-DG7IvN3o.js → toaster-D6OHn49K.js} +9 -9
  42. package/dist/{toggle-group-CKCJXGta.js → toggle-group-DLLrEwv2.js} +576 -714
  43. package/dist/usePage-BFE9lxI1.js +84 -0
  44. package/package.json +2 -2
  45. package/dist/Topbar-CFmKB_S2.js +0 -217
  46. package/dist/sheet-B_uq6-K_.js +0 -87
  47. package/dist/usePage-u2gRhvQ0.js +0 -72
@@ -0,0 +1,245 @@
1
+ import { jsx as o, jsxs as i } from "react/jsx-runtime";
2
+ import { c as d } from "./tailwind.helper-B6yFEsav.js";
3
+ import { Command as r } from "cmdk";
4
+ import { X as c, SearchIcon as N } from "lucide-react";
5
+ import * as n from "react";
6
+ import * as s from "@radix-ui/react-dialog";
7
+ import { e as b } from "./tooltip-DVeqVwqV.js";
8
+ import { cva as w } from "class-variance-authority";
9
+ const v = s.Root, M = s.Trigger, C = s.Portal, Q = s.Close, p = n.forwardRef(
10
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(
11
+ s.Overlay,
12
+ {
13
+ ref: t,
14
+ className: d(
15
+ "fixed inset-0 z-[70] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
16
+ e
17
+ ),
18
+ ...a
19
+ }
20
+ )
21
+ );
22
+ p.displayName = s.Overlay.displayName;
23
+ const k = "w-full max-w-none h-[100dvh] max-h-[100dvh] content-start rounded-none sm:h-auto sm:max-h-[95vh] sm:max-w-lg sm:rounded-surface", f = n.forwardRef(
24
+ ({ className: e, children: a, ...t }, l) => /* @__PURE__ */ i(C, { children: [
25
+ /* @__PURE__ */ o(p, {}),
26
+ /* @__PURE__ */ i(
27
+ s.Content,
28
+ {
29
+ ref: l,
30
+ className: d(
31
+ "fixed left-[50%] top-[50%] z-[70] grid overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
32
+ k,
33
+ e
34
+ ),
35
+ ...t,
36
+ children: [
37
+ a,
38
+ /* @__PURE__ */ i(s.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
39
+ /* @__PURE__ */ o(c, { className: "size-4" }),
40
+ /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
41
+ ] })
42
+ ]
43
+ }
44
+ )
45
+ ] })
46
+ );
47
+ f.displayName = s.Content.displayName;
48
+ const D = ({ className: e, ...a }) => /* @__PURE__ */ o("div", { className: d("flex flex-col space-y-1.5 text-center sm:text-left", e), ...a });
49
+ D.displayName = "DialogHeader";
50
+ const R = ({ className: e, ...a }) => /* @__PURE__ */ o("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...a });
51
+ R.displayName = "DialogFooter";
52
+ const u = n.forwardRef(
53
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(s.Title, { ref: t, className: d("text-lg font-semibold leading-none tracking-tight", e), ...a })
54
+ );
55
+ u.displayName = s.Title.displayName;
56
+ const g = n.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(s.Description, { ref: t, className: d("text-sm text-muted-foreground", e), ...a }));
57
+ g.displayName = s.Description.displayName;
58
+ const x = n.forwardRef(
59
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(
60
+ r,
61
+ {
62
+ ref: t,
63
+ className: d("flex h-full w-full flex-col overflow-hidden rounded-surface bg-popover text-popover-foreground", e),
64
+ ...a
65
+ }
66
+ )
67
+ );
68
+ x.displayName = r.displayName;
69
+ const U = ({
70
+ title: e = "Palette de commandes",
71
+ description: a = "Rechercher une commande à exécuter.",
72
+ shouldFilter: t,
73
+ className: l,
74
+ children: m,
75
+ ...y
76
+ }) => /* @__PURE__ */ o(v, { ...y, children: /* @__PURE__ */ i(f, { className: "overflow-hidden p-0 shadow-lg", children: [
77
+ /* @__PURE__ */ o(u, { className: "sr-only", children: e }),
78
+ /* @__PURE__ */ o(g, { className: "sr-only", children: a }),
79
+ /* @__PURE__ */ o(
80
+ x,
81
+ {
82
+ shouldFilter: t,
83
+ className: d(
84
+ "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3",
85
+ l
86
+ ),
87
+ children: m
88
+ }
89
+ )
90
+ ] }) }), S = n.forwardRef(
91
+ ({ className: e, ...a }, t) => /* @__PURE__ */ i("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
92
+ /* @__PURE__ */ o(N, { className: "mr-2 size-4 shrink-0 opacity-50" }),
93
+ /* @__PURE__ */ o(
94
+ r.Input,
95
+ {
96
+ ref: t,
97
+ className: d(
98
+ "flex h-11 w-full rounded-control bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
99
+ e
100
+ ),
101
+ ...a
102
+ }
103
+ )
104
+ ] })
105
+ );
106
+ S.displayName = r.Input.displayName;
107
+ const _ = n.forwardRef(
108
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(r.List, { ref: t, className: d("max-h-[300px] overflow-y-auto overflow-x-hidden", e), ...a })
109
+ );
110
+ _.displayName = r.List.displayName;
111
+ const z = n.forwardRef(
112
+ (e, a) => /* @__PURE__ */ o(r.Empty, { ref: a, className: "py-6 text-center text-sm", ...e })
113
+ );
114
+ z.displayName = r.Empty.displayName;
115
+ const I = n.forwardRef(
116
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(
117
+ r.Group,
118
+ {
119
+ ref: t,
120
+ className: d(
121
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
122
+ e
123
+ ),
124
+ ...a
125
+ }
126
+ )
127
+ );
128
+ I.displayName = r.Group.displayName;
129
+ const T = n.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(r.Separator, { ref: t, className: d("-mx-1 h-px bg-border", e), ...a }));
130
+ T.displayName = r.Separator.displayName;
131
+ const O = n.forwardRef(
132
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(
133
+ r.Item,
134
+ {
135
+ ref: t,
136
+ className: d(
137
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
138
+ e
139
+ ),
140
+ ...a
141
+ }
142
+ )
143
+ );
144
+ O.displayName = r.Item.displayName;
145
+ const P = ({ className: e, ...a }) => /* @__PURE__ */ o("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...a });
146
+ P.displayName = "CommandShortcut";
147
+ const j = n.forwardRef(({ className: e, type: a, ...t }, l) => /* @__PURE__ */ o(
148
+ "input",
149
+ {
150
+ type: a,
151
+ className: d(
152
+ b,
153
+ // text-base sur mobile : évite le zoom automatique d'iOS à la prise de focus.
154
+ "flex w-full text-base file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:text-sm",
155
+ e
156
+ ),
157
+ ref: l,
158
+ ...t
159
+ }
160
+ ));
161
+ j.displayName = "Input";
162
+ const W = s.Root, Y = s.Trigger, Z = s.Close, F = s.Portal, h = n.forwardRef(
163
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(
164
+ s.Overlay,
165
+ {
166
+ className: d(
167
+ "fixed inset-0 z-[70] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
168
+ e
169
+ ),
170
+ ...a,
171
+ ref: t
172
+ }
173
+ )
174
+ );
175
+ h.displayName = s.Overlay.displayName;
176
+ const H = w(
177
+ "fixed z-[70] gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
178
+ {
179
+ variants: {
180
+ side: {
181
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
182
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
183
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
184
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
185
+ }
186
+ },
187
+ defaultVariants: {
188
+ side: "right"
189
+ }
190
+ }
191
+ ), E = n.forwardRef(
192
+ ({ side: e = "right", className: a, children: t, ...l }, m) => /* @__PURE__ */ i(F, { children: [
193
+ /* @__PURE__ */ o(h, {}),
194
+ /* @__PURE__ */ i(s.Content, { ref: m, className: d(H({ side: e }), a), ...l, children: [
195
+ t,
196
+ /* @__PURE__ */ i(s.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
197
+ /* @__PURE__ */ o(c, { className: "size-4" }),
198
+ /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
199
+ ] })
200
+ ] })
201
+ ] })
202
+ );
203
+ E.displayName = s.Content.displayName;
204
+ const G = ({ className: e, ...a }) => /* @__PURE__ */ o("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...a });
205
+ G.displayName = "SheetHeader";
206
+ const L = ({ className: e, ...a }) => /* @__PURE__ */ o("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...a });
207
+ L.displayName = "SheetFooter";
208
+ const V = n.forwardRef(
209
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(s.Title, { ref: t, className: d("text-lg font-semibold text-foreground", e), ...a })
210
+ );
211
+ V.displayName = s.Title.displayName;
212
+ const q = n.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(s.Description, { ref: t, className: d("text-sm text-muted-foreground", e), ...a }));
213
+ q.displayName = s.Description.displayName;
214
+ export {
215
+ x as C,
216
+ v as D,
217
+ j as I,
218
+ W as S,
219
+ Q as a,
220
+ f as b,
221
+ g as c,
222
+ R as d,
223
+ D as e,
224
+ p as f,
225
+ C as g,
226
+ u as h,
227
+ M as i,
228
+ U as j,
229
+ z as k,
230
+ I as l,
231
+ S as m,
232
+ O as n,
233
+ _ as o,
234
+ T as p,
235
+ P as q,
236
+ Z as r,
237
+ E as s,
238
+ q as t,
239
+ L as u,
240
+ G as v,
241
+ h as w,
242
+ F as x,
243
+ V as y,
244
+ Y as z
245
+ };
@@ -7,8 +7,8 @@ import { c as n } from "./tailwind.helper-B6yFEsav.js";
7
7
  import { useTheme as f } from "next-themes";
8
8
  import { Toaster as m } from "sonner";
9
9
  import { u as g } from "./useToast-BFTk4lWz.js";
10
- import { bK as b, bG as v, bL as T, bJ as h, bI as x, bM as C } from "./toggle-group-CKCJXGta.js";
11
- const G = u.Root, A = s.Root, B = s.CollapsibleTrigger, V = s.CollapsibleContent, $ = ({ className: e, ...r }) => /* @__PURE__ */ t(i.Group, { className: n("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e), ...r }), k = i.Panel, D = ({
10
+ import { br as b, bn as v, bs as T, bq as h, bp as x, bt as C } from "./toggle-group-DLLrEwv2.js";
11
+ const A = u.Root, G = s.Root, B = s.CollapsibleTrigger, V = s.CollapsibleContent, $ = ({ className: e, ...r }) => /* @__PURE__ */ t(i.Group, { className: n("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e), ...r }), k = i.Panel, q = ({
12
12
  withHandle: e,
13
13
  className: r,
14
14
  ...a
@@ -22,7 +22,7 @@ const G = u.Root, A = s.Root, B = s.CollapsibleTrigger, V = s.CollapsibleContent
22
22
  ...a,
23
23
  children: e && /* @__PURE__ */ t("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ t(d, { className: "h-2.5 w-2.5" }) })
24
24
  }
25
- ), H = ({ ...e }) => {
25
+ ), D = ({ ...e }) => {
26
26
  const { theme: r = "system" } = f();
27
27
  return /* @__PURE__ */ t(
28
28
  m,
@@ -41,7 +41,7 @@ const G = u.Root, A = s.Root, B = s.CollapsibleTrigger, V = s.CollapsibleContent
41
41
  }
42
42
  );
43
43
  };
44
- function I() {
44
+ function H() {
45
45
  const { toasts: e } = g();
46
46
  return /* @__PURE__ */ o(b, { children: [
47
47
  e.map(function({ id: r, title: a, description: l, action: c, ...p }) {
@@ -58,13 +58,13 @@ function I() {
58
58
  ] });
59
59
  }
60
60
  export {
61
- G as A,
62
- A as C,
63
- D as R,
64
- H as T,
61
+ A,
62
+ G as C,
63
+ q as R,
64
+ D as T,
65
65
  V as a,
66
66
  B as b,
67
67
  k as c,
68
68
  $ as d,
69
- I as e
69
+ H as e
70
70
  };