fina-react-ds 1.0.38 → 1.0.39

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 (27) hide show
  1. package/dist/components/calendar.js +11 -12
  2. package/dist/components/data-loader.js +1 -1
  3. package/dist/components/date-picker.js +28 -28
  4. package/dist/components/file-uploader.js +46 -47
  5. package/dist/components/form.js +14 -14
  6. package/dist/components/html-input.d.ts +1 -0
  7. package/dist/components/image-uploader.js +53 -54
  8. package/dist/components/index.d.ts +45 -0
  9. package/dist/components/index.js +200 -0
  10. package/dist/components/select.js +39 -39
  11. package/dist/components/sidebar.js +49 -49
  12. package/dist/hooks/index.d.ts +1 -0
  13. package/dist/hooks/index.js +4 -0
  14. package/dist/lib/index.d.ts +6 -0
  15. package/dist/lib/index.js +27 -0
  16. package/package.json +49 -36
  17. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -12
  18. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -21
  19. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -36
  20. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -18
  21. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +0 -72
  22. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +0 -33
  23. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +0 -13
  24. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +0 -123
  25. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +0 -112
  26. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +0 -21
  27. package/dist/themes/base.css +0 -3396
@@ -1,11 +1,11 @@
1
1
  var w = Object.defineProperty;
2
2
  var d = (l, s) => w(l, "name", { value: s, configurable: !0 });
3
3
  import { jsx as n } from "react/jsx-runtime";
4
- import * as f from "react";
4
+ import * as g from "react";
5
5
  import { ChevronLeftIcon as h, ChevronRightIcon as y, ChevronDownIcon as _ } from "lucide-react";
6
- import { getDefaultClassNames as x, DayPicker as v } from "react-day-picker";
6
+ import { getDefaultClassNames as p, DayPicker as v } from "react-day-picker";
7
7
  import { cn as e } from "../lib/utils.js";
8
- import { buttonVariants as p, Button as z } from "./button.js";
8
+ import { buttonVariants as f, Button as z } from "./button.js";
9
9
  import { fr as k } from "../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js";
10
10
  function q({
11
11
  className: l,
@@ -14,10 +14,10 @@ function q({
14
14
  captionLayout: c = "label",
15
15
  buttonVariant: i = "ghost",
16
16
  formatters: m,
17
- components: g,
17
+ components: x,
18
18
  ...b
19
19
  }) {
20
- const t = x();
20
+ const t = p();
21
21
  return /* @__PURE__ */ n(
22
22
  v,
23
23
  {
@@ -49,7 +49,7 @@ function q({
49
49
  t.nav
50
50
  ),
51
51
  button_previous: e(
52
- p({
52
+ f({
53
53
  variant: i,
54
54
  color: "dark",
55
55
  size: "icon"
@@ -58,7 +58,7 @@ function q({
58
58
  t.button_previous
59
59
  ),
60
60
  button_next: e(
61
- p({
61
+ f({
62
62
  variant: i,
63
63
  color: "dark",
64
64
  size: "icon"
@@ -161,7 +161,7 @@ function q({
161
161
  ), "Chevron"),
162
162
  DayButton: N,
163
163
  WeekNumber: /* @__PURE__ */ d(({ children: a, ...o }) => /* @__PURE__ */ n("td", { ...o, children: /* @__PURE__ */ n("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: a }) }), "WeekNumber"),
164
- ...g
164
+ ...x
165
165
  },
166
166
  ...b
167
167
  }
@@ -174,10 +174,9 @@ function N({
174
174
  modifiers: r,
175
175
  ...c
176
176
  }) {
177
- const i = x(), m = f.useRef(null);
178
- return f.useEffect(() => {
179
- var g;
180
- r.focused && ((g = m.current) == null || g.focus());
177
+ const i = p(), m = g.useRef(null);
178
+ return g.useEffect(() => {
179
+ r.focused && m.current?.focus();
181
180
  }, [r.focused]), /* @__PURE__ */ n(
182
181
  z,
183
182
  {
@@ -10,7 +10,7 @@ function j({
10
10
  children: n
11
11
  }) {
12
12
  const a = /* @__PURE__ */ s((e) => {
13
- c || (c = e.isPending || e.isRefetching), o || (o = e.isError || e.isRefetchError);
13
+ c ||= e.isPending || e.isRefetching, o ||= e.isError || e.isRefetchError;
14
14
  }, "checkQuery");
15
15
  let c = !1, o = !1;
16
16
  return t && Array.isArray(t) && t.forEach((e) => a(e)), c ? /* @__PURE__ */ r("div", { className: "min-h-[90px]", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center text-gray-500", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center flex-col", children: [
@@ -1,39 +1,39 @@
1
1
  var p = Object.defineProperty;
2
- var i = (o, r) => p(o, "name", { value: r, configurable: !0 });
3
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ var o = (i, t) => p(i, "name", { value: t, configurable: !0 });
3
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
4
4
  import * as f from "react";
5
5
  import { Calendar as u } from "lucide-react";
6
- import { Calendar as x } from "./calendar.js";
7
- import { Popover as b, PopoverTrigger as v, PopoverContent as h } from "./popover.js";
8
- import { Button as P } from "./button.js";
9
- import { format as g } from "date-fns";
10
- import { fr as w } from "../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js";
11
- function B({
12
- placeholder: o = "Choisir une date",
13
- onChange: r,
6
+ import { Calendar as h } from "./calendar.js";
7
+ import { Popover as g, PopoverTrigger as x, PopoverContent as b } from "./popover.js";
8
+ import { Button as v } from "./button.js";
9
+ import { format as C } from "date-fns";
10
+ import { fr as P } from "../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js";
11
+ function z({
12
+ placeholder: i = "Choisir une date",
13
+ onChange: t,
14
14
  value: e,
15
- isClearable: d = !1,
16
- ...l
15
+ isClearable: s = !1,
16
+ ...d
17
17
  }) {
18
- const [n, a] = f.useState(!1), c = /* @__PURE__ */ i((m) => {
19
- r == null || r(m || null), a(!1);
18
+ const [l, n] = f.useState(!1), c = /* @__PURE__ */ o((m) => {
19
+ t?.(m || null), n(!1);
20
20
  }, "onSelect");
21
- return /* @__PURE__ */ s(b, { onOpenChange: a, open: n, children: [
22
- /* @__PURE__ */ t(v, { asChild: !0, children: /* @__PURE__ */ s(
21
+ return /* @__PURE__ */ a(g, { onOpenChange: n, open: l, children: [
22
+ /* @__PURE__ */ r(x, { asChild: !0, children: /* @__PURE__ */ a(
23
23
  "button",
24
24
  {
25
25
  "data-empty": !e,
26
- ...l,
26
+ ...d,
27
27
  className: "border-input-border flex items-center h-9 w-full min-w-0 rounded-md border bg-input px-3 py-1 text-base shadow-xs focus-visible:border-ring ring-ring/50 focus-visible:ring-[3px] data-[state=open]:ring-[3px] data-[state=open]:border-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive! outline-none md:text-sm",
28
28
  children: [
29
- /* @__PURE__ */ t(u, { className: "mr-2 size-4" }),
30
- e ? /* @__PURE__ */ t("span", { children: g(e, "PPP", { locale: w }) }) : /* @__PURE__ */ t("span", { className: "text-placeholder", children: o })
29
+ /* @__PURE__ */ r(u, { className: "mr-2 size-4" }),
30
+ e ? /* @__PURE__ */ r("span", { children: C(e, "PPP", { locale: P }) }) : /* @__PURE__ */ r("span", { className: "text-placeholder", children: i })
31
31
  ]
32
32
  }
33
33
  ) }),
34
- /* @__PURE__ */ s(h, { align: "start", className: "w-auto p-0", children: [
35
- /* @__PURE__ */ t(
36
- x,
34
+ /* @__PURE__ */ a(b, { align: "start", className: "w-auto p-0", children: [
35
+ /* @__PURE__ */ r(
36
+ h,
37
37
  {
38
38
  mode: "single",
39
39
  required: !0,
@@ -43,14 +43,14 @@ function B({
43
43
  captionLayout: "dropdown"
44
44
  }
45
45
  ),
46
- e && d && /* @__PURE__ */ t("div", { className: "flex justify-center border-t", children: /* @__PURE__ */ t(
47
- P,
46
+ e && s && /* @__PURE__ */ r("div", { className: "flex justify-center border-t", children: /* @__PURE__ */ r(
47
+ v,
48
48
  {
49
49
  variant: "ghost",
50
50
  color: "dark",
51
51
  className: "flex w-full",
52
- onClick: /* @__PURE__ */ i(() => {
53
- r == null || r(null), a(!1);
52
+ onClick: /* @__PURE__ */ o(() => {
53
+ t?.(null), n(!1);
54
54
  }, "onClick"),
55
55
  children: "Effacer"
56
56
  }
@@ -58,7 +58,7 @@ function B({
58
58
  ] })
59
59
  ] });
60
60
  }
61
- i(B, "DatePicker");
61
+ o(z, "DatePicker");
62
62
  export {
63
- B as DatePicker
63
+ z as DatePicker
64
64
  };
@@ -1,109 +1,108 @@
1
1
  var F = Object.defineProperty;
2
- var l = (r, c) => F(r, "name", { value: c, configurable: !0 });
3
- import { jsxs as s, jsx as i, Fragment as p } from "react/jsx-runtime";
4
- import { useState as j, useImperativeHandle as k, useCallback as f } from "react";
5
- import { FileIcon as D, UploadIcon as I } from "lucide-react";
6
- import { useDropzone as S } from "react-dropzone";
7
- import { cn as o } from "../lib/utils.js";
8
- import { Button as w } from "./button.js";
9
- function T({
10
- onChange: r,
11
- "aria-invalid": c,
2
+ var o = (i, l) => F(i, "name", { value: l, configurable: !0 });
3
+ import { jsxs as r, jsx as e, Fragment as f } from "react/jsx-runtime";
4
+ import { useState as j, useImperativeHandle as k, useCallback as p } from "react";
5
+ import { FileIcon as C, UploadIcon as D } from "lucide-react";
6
+ import { useDropzone as I } from "react-dropzone";
7
+ import { cn as c } from "../lib/utils.js";
8
+ import { Button as S } from "./button.js";
9
+ function M({
10
+ onChange: i,
11
+ "aria-invalid": l,
12
12
  fileTypes: b,
13
13
  ref: x
14
14
  }) {
15
15
  const [a, d] = j([]);
16
16
  k(x, () => ({
17
- focus: /* @__PURE__ */ l(() => {
18
- e != null && e.current && e.current.focus();
17
+ focus: /* @__PURE__ */ o(() => {
18
+ t?.current && t.current.focus();
19
19
  }, "focus")
20
20
  }));
21
- const v = f(
22
- (t) => {
23
- d(t), r == null || r(t.length > 0 ? t[0] : null);
21
+ const v = p(
22
+ (n) => {
23
+ d(n), i?.(n.length > 0 ? n[0] : null);
24
24
  },
25
- [r]
26
- ), g = /* @__PURE__ */ l(() => {
27
- e != null && e.current && e.current.focus();
28
- }, "handleFileDialogCancel"), { getRootProps: h, getInputProps: y, acceptedFiles: u, open: N, rootRef: e } = S({
25
+ [i]
26
+ ), g = /* @__PURE__ */ o(() => {
27
+ t?.current && t.current.focus();
28
+ }, "handleFileDialogCancel"), { getRootProps: h, getInputProps: y, acceptedFiles: u, open: N, rootRef: t } = I({
29
29
  maxFiles: 1,
30
30
  noClick: !0,
31
31
  onDrop: v,
32
32
  onFileDialogCancel: g
33
- }), z = f((t) => {
34
- let n = 0, m = "ko";
35
- return n = t.size / 1e3, n > 1e3 && (n /= 1e3, m = "mo"), n.toFixed(2) + " " + m;
33
+ }), z = p((n) => {
34
+ let s = 0, m = "ko";
35
+ return s = n.size / 1e3, s > 1e3 && (s /= 1e3, m = "mo"), s.toFixed(2) + " " + m;
36
36
  }, []);
37
- return /* @__PURE__ */ s(
37
+ return /* @__PURE__ */ r(
38
38
  "div",
39
39
  {
40
40
  ...h(),
41
- className: o(
41
+ className: c(
42
42
  "bg-input border border-input-border flex flex-col h-50 w-full rounded-md px-3 py-1 text-base shadow-xs items-center justify-center md:text-sm outline-none",
43
43
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
44
44
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
45
45
  ),
46
- "aria-invalid": c,
46
+ "aria-invalid": l,
47
47
  children: [
48
- a.length > 0 && /* @__PURE__ */ s(p, { children: [
49
- /* @__PURE__ */ i(
48
+ a.length > 0 && /* @__PURE__ */ r(f, { children: [
49
+ /* @__PURE__ */ e(
50
50
  "div",
51
51
  {
52
- className: o(
52
+ className: c(
53
53
  "bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
54
54
  ),
55
- children: /* @__PURE__ */ i(D, { className: "size-4" })
55
+ children: /* @__PURE__ */ e(C, { className: "size-4" })
56
56
  }
57
57
  ),
58
- /* @__PURE__ */ s("div", { className: "mb-4 text-center", children: [
58
+ /* @__PURE__ */ r("div", { className: "mb-4 text-center", children: [
59
59
  u[0].name,
60
- /* @__PURE__ */ i("br", {}),
60
+ /* @__PURE__ */ e("br", {}),
61
61
  z(u[0])
62
62
  ] }),
63
- /* @__PURE__ */ i(
64
- w,
63
+ /* @__PURE__ */ e(
64
+ S,
65
65
  {
66
66
  type: "button",
67
67
  color: "destructive",
68
68
  variant: "ghost",
69
- onClick: /* @__PURE__ */ l(() => {
70
- var t;
71
- d([]), r == null || r(null), (t = e == null ? void 0 : e.current) == null || t.focus();
69
+ onClick: /* @__PURE__ */ o(() => {
70
+ d([]), i?.(null), t?.current?.focus();
72
71
  }, "onClick"),
73
72
  children: "Supprimer"
74
73
  }
75
74
  )
76
75
  ] }),
77
- a.length === 0 && /* @__PURE__ */ s(p, { children: [
78
- /* @__PURE__ */ i(
76
+ a.length === 0 && /* @__PURE__ */ r(f, { children: [
77
+ /* @__PURE__ */ e(
79
78
  "div",
80
79
  {
81
- className: o(
80
+ className: c(
82
81
  "bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
83
82
  ),
84
- children: /* @__PURE__ */ i(I, { className: "size-4" })
83
+ children: /* @__PURE__ */ e(D, { className: "size-4" })
85
84
  }
86
85
  ),
87
- /* @__PURE__ */ s("div", { className: "mb-4", children: [
86
+ /* @__PURE__ */ r("div", { className: "mb-4", children: [
88
87
  "Glisser-déposer ou",
89
88
  " ",
90
- /* @__PURE__ */ i("span", { className: "font-bold underline cursor-pointer", onClick: N, children: "Choisir un fichier" }),
89
+ /* @__PURE__ */ e("span", { className: "font-bold underline cursor-pointer", onClick: N, children: "Choisir un fichier" }),
91
90
  " ",
92
91
  "à uploader"
93
92
  ] }),
94
- /* @__PURE__ */ s("div", { className: "text-center text-sm md:text-xs", children: [
93
+ /* @__PURE__ */ r("div", { className: "text-center text-sm md:text-xs", children: [
95
94
  "Formats acceptés : ",
96
95
  Object.keys(b).join(", "),
97
- /* @__PURE__ */ i("br", {}),
96
+ /* @__PURE__ */ e("br", {}),
98
97
  "Taille max : 5Mo"
99
98
  ] })
100
99
  ] }),
101
- /* @__PURE__ */ i("input", { ...y() })
100
+ /* @__PURE__ */ e("input", { ...y() })
102
101
  ]
103
102
  }
104
103
  );
105
104
  }
106
- l(T, "FileUploader");
105
+ o(M, "FileUploader");
107
106
  export {
108
- T as FileUploader
107
+ M as FileUploader
109
108
  };
@@ -11,7 +11,7 @@ const M = x, l = i.createContext(
11
11
  ), N = /* @__PURE__ */ n(({
12
12
  ...t
13
13
  }) => /* @__PURE__ */ s(l.Provider, { value: { name: t.name }, children: /* @__PURE__ */ s(g, { ...t }) }), "FormField"), c = /* @__PURE__ */ n(() => {
14
- const t = i.useContext(l), e = i.useContext(f), { getFieldState: o } = I(), r = p({ name: t.name }), m = o(t.name, r);
14
+ const t = i.useContext(l), e = i.useContext(f), { getFieldState: r } = I(), o = p({ name: t.name }), m = r(t.name, o);
15
15
  if (!t)
16
16
  throw new Error("useFormField should be used within <FormField>");
17
17
  const { id: a } = e;
@@ -27,8 +27,8 @@ const M = x, l = i.createContext(
27
27
  {}
28
28
  );
29
29
  function w({ className: t, ...e }) {
30
- const o = i.useId();
31
- return /* @__PURE__ */ s(f.Provider, { value: { id: o }, children: /* @__PURE__ */ s(
30
+ const r = i.useId();
31
+ return /* @__PURE__ */ s(f.Provider, { value: { id: r }, children: /* @__PURE__ */ s(
32
32
  "div",
33
33
  {
34
34
  "data-slot": "form-item",
@@ -41,30 +41,30 @@ n(w, "FormItem");
41
41
  function P({
42
42
  className: t,
43
43
  required: e = !1,
44
- ...o
44
+ ...r
45
45
  }) {
46
- const { error: r, formItemId: m } = c();
46
+ const { error: o, formItemId: m } = c();
47
47
  return /* @__PURE__ */ s(
48
48
  C,
49
49
  {
50
50
  "data-slot": "form-label",
51
- "data-error": !!r,
51
+ "data-error": !!o,
52
52
  className: d("data-[error=true]:text-destructive", t),
53
53
  htmlFor: m,
54
54
  required: e,
55
- ...o
55
+ ...r
56
56
  }
57
57
  );
58
58
  }
59
59
  n(P, "FormLabel");
60
60
  function y({ ...t }) {
61
- const { error: e, formItemId: o, formDescriptionId: r, formMessageId: m } = c();
61
+ const { error: e, formItemId: r, formDescriptionId: o, formMessageId: m } = c();
62
62
  return /* @__PURE__ */ s(
63
63
  F.Root,
64
64
  {
65
65
  "data-slot": "form-control",
66
- id: o,
67
- "aria-describedby": e ? `${r} ${m}` : `${r}`,
66
+ id: r,
67
+ "aria-describedby": e ? `${o} ${m}` : `${o}`,
68
68
  "aria-invalid": !!e,
69
69
  ...t
70
70
  }
@@ -72,12 +72,12 @@ function y({ ...t }) {
72
72
  }
73
73
  n(y, "FormControl");
74
74
  function L({ className: t, ...e }) {
75
- const { formDescriptionId: o } = c();
75
+ const { formDescriptionId: r } = c();
76
76
  return /* @__PURE__ */ s(
77
77
  "p",
78
78
  {
79
79
  "data-slot": "form-description",
80
- id: o,
80
+ id: r,
81
81
  className: d("text-muted text-sm", t),
82
82
  ...e
83
83
  }
@@ -85,12 +85,12 @@ function L({ className: t, ...e }) {
85
85
  }
86
86
  n(L, "FormDescription");
87
87
  function R({ className: t, ...e }) {
88
- const { error: o, formMessageId: r } = c(), m = o ? String((o == null ? void 0 : o.message) ?? "") : e.children;
88
+ const { error: r, formMessageId: o } = c(), m = r ? String(r?.message ?? "") : e.children;
89
89
  return m ? /* @__PURE__ */ s(
90
90
  "p",
91
91
  {
92
92
  "data-slot": "form-message",
93
- id: r,
93
+ id: o,
94
94
  className: d("text-destructive text-sm", t),
95
95
  ...e,
96
96
  children: m
@@ -0,0 +1 @@
1
+ export declare function HtmlInput(): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,15 @@
1
1
  var k = Object.defineProperty;
2
- var l = (r, n) => k(r, "name", { value: n, configurable: !0 });
3
- import { jsxs as s, jsx as i, Fragment as x } from "react/jsx-runtime";
4
- import { useState as F, useImperativeHandle as D, useCallback as b } from "react";
5
- import { FileIcon as I, UploadIcon as w } from "lucide-react";
6
- import { useDropzone as P } from "react-dropzone";
7
- import { cn as o } from "../lib/utils.js";
8
- import { Button as S } from "./button.js";
9
- function q({
10
- onChange: r,
11
- "aria-invalid": n,
12
- ref: v,
2
+ var s = (i, o) => k(i, "name", { value: o, configurable: !0 });
3
+ import { jsxs as r, jsx as e, Fragment as x } from "react/jsx-runtime";
4
+ import { useState as F, useImperativeHandle as C, useCallback as g } from "react";
5
+ import { FileIcon as D, UploadIcon as I } from "lucide-react";
6
+ import { useDropzone as w } from "react-dropzone";
7
+ import { cn as c } from "../lib/utils.js";
8
+ import { Button as P } from "./button.js";
9
+ function O({
10
+ onChange: i,
11
+ "aria-invalid": o,
12
+ ref: b,
13
13
  actualImageUrl: a = ""
14
14
  }) {
15
15
  const d = {
@@ -17,30 +17,30 @@ function q({
17
17
  "image/png": ["*"],
18
18
  "image/gif": ["*"]
19
19
  }, [m, u] = F([]);
20
- D(v, () => ({
21
- focus: /* @__PURE__ */ l(() => {
22
- e != null && e.current && e.current.focus();
20
+ C(b, () => ({
21
+ focus: /* @__PURE__ */ s(() => {
22
+ t?.current && t.current.focus();
23
23
  }, "focus")
24
24
  }));
25
- const g = b(
26
- (t) => {
27
- u(t), r == null || r(t.length > 0 ? t[0] : null);
25
+ const v = g(
26
+ (n) => {
27
+ u(n), i?.(n.length > 0 ? n[0] : null);
28
28
  },
29
- [r]
30
- ), h = /* @__PURE__ */ l(() => {
31
- e != null && e.current && e.current.focus();
32
- }, "handleFileDialogCancel"), { getRootProps: N, getInputProps: y, acceptedFiles: p, open: j, rootRef: e } = P({
29
+ [i]
30
+ ), h = /* @__PURE__ */ s(() => {
31
+ t?.current && t.current.focus();
32
+ }, "handleFileDialogCancel"), { getRootProps: N, getInputProps: y, acceptedFiles: f, open: j, rootRef: t } = w({
33
33
  maxFiles: 1,
34
34
  noClick: !0,
35
- onDrop: g,
35
+ onDrop: v,
36
36
  onFileDialogCancel: h,
37
37
  accept: d
38
- }), z = b((t) => {
39
- let c = 0, f = "ko";
40
- return c = t.size / 1e3, c > 1e3 && (c /= 1e3, f = "mo"), c.toFixed(2) + " " + f;
38
+ }), z = g((n) => {
39
+ let l = 0, p = "ko";
40
+ return l = n.size / 1e3, l > 1e3 && (l /= 1e3, p = "mo"), l.toFixed(2) + " " + p;
41
41
  }, []);
42
- return /* @__PURE__ */ s("div", { className: "flex space-x-2 items-center h-50", children: [
43
- a && /* @__PURE__ */ i("div", { className: "flex-1 h-full", children: /* @__PURE__ */ i(
42
+ return /* @__PURE__ */ r("div", { className: "flex space-x-2 items-center h-50", children: [
43
+ a && /* @__PURE__ */ e("div", { className: "flex-1 h-full", children: /* @__PURE__ */ e(
44
44
  "img",
45
45
  {
46
46
  src: a,
@@ -48,60 +48,59 @@ function q({
48
48
  className: "w-full h-full object-cover object-center rounded-md"
49
49
  }
50
50
  ) }),
51
- /* @__PURE__ */ s(
51
+ /* @__PURE__ */ r(
52
52
  "div",
53
53
  {
54
54
  ...N(),
55
- className: o(
55
+ className: c(
56
56
  "bg-input border border-input-border flex flex-col h-50 flex-2 rounded-md px-3 py-1 text-base shadow-xs items-center justify-center md:text-sm outline-none",
57
57
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
58
58
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
59
59
  ),
60
- "aria-invalid": n,
60
+ "aria-invalid": o,
61
61
  children: [
62
- m.length > 0 && /* @__PURE__ */ s(x, { children: [
63
- /* @__PURE__ */ i(
62
+ m.length > 0 && /* @__PURE__ */ r(x, { children: [
63
+ /* @__PURE__ */ e(
64
64
  "div",
65
65
  {
66
- className: o(
66
+ className: c(
67
67
  "bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
68
68
  ),
69
- children: /* @__PURE__ */ i(I, { className: "size-4" })
69
+ children: /* @__PURE__ */ e(D, { className: "size-4" })
70
70
  }
71
71
  ),
72
- /* @__PURE__ */ s("div", { className: "mb-4 text-center", children: [
73
- p[0].name,
74
- /* @__PURE__ */ i("br", {}),
75
- z(p[0])
72
+ /* @__PURE__ */ r("div", { className: "mb-4 text-center", children: [
73
+ f[0].name,
74
+ /* @__PURE__ */ e("br", {}),
75
+ z(f[0])
76
76
  ] }),
77
- /* @__PURE__ */ i(
78
- S,
77
+ /* @__PURE__ */ e(
78
+ P,
79
79
  {
80
80
  type: "button",
81
81
  color: "destructive",
82
82
  variant: "ghost",
83
- onClick: /* @__PURE__ */ l(() => {
84
- var t;
85
- u([]), r == null || r(null), (t = e == null ? void 0 : e.current) == null || t.focus();
83
+ onClick: /* @__PURE__ */ s(() => {
84
+ u([]), i?.(null), t?.current?.focus();
86
85
  }, "onClick"),
87
86
  children: "Supprimer"
88
87
  }
89
88
  )
90
89
  ] }),
91
- m.length === 0 && /* @__PURE__ */ s(x, { children: [
92
- /* @__PURE__ */ i(
90
+ m.length === 0 && /* @__PURE__ */ r(x, { children: [
91
+ /* @__PURE__ */ e(
93
92
  "div",
94
93
  {
95
- className: o(
94
+ className: c(
96
95
  "bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
97
96
  ),
98
- children: /* @__PURE__ */ i(w, { className: "size-4" })
97
+ children: /* @__PURE__ */ e(I, { className: "size-4" })
99
98
  }
100
99
  ),
101
- /* @__PURE__ */ s("div", { className: "mb-4", children: [
100
+ /* @__PURE__ */ r("div", { className: "mb-4", children: [
102
101
  "Glisser-déposer ou",
103
102
  " ",
104
- /* @__PURE__ */ i(
103
+ /* @__PURE__ */ e(
105
104
  "span",
106
105
  {
107
106
  className: "font-bold underline cursor-pointer",
@@ -112,20 +111,20 @@ function q({
112
111
  " ",
113
112
  "à uploader"
114
113
  ] }),
115
- /* @__PURE__ */ s("div", { className: "text-center text-sm md:text-xs", children: [
114
+ /* @__PURE__ */ r("div", { className: "text-center text-sm md:text-xs", children: [
116
115
  "Formats acceptés : ",
117
116
  Object.keys(d).join(", "),
118
- /* @__PURE__ */ i("br", {}),
117
+ /* @__PURE__ */ e("br", {}),
119
118
  "Taille max : 5Mo"
120
119
  ] })
121
120
  ] }),
122
- /* @__PURE__ */ i("input", { ...y() })
121
+ /* @__PURE__ */ e("input", { ...y() })
123
122
  ]
124
123
  }
125
124
  )
126
125
  ] });
127
126
  }
128
- l(q, "ImageUploader");
127
+ s(O, "ImageUploader");
129
128
  export {
130
- q as ImageUploader
129
+ O as ImageUploader
131
130
  };
@@ -0,0 +1,45 @@
1
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from "./alert-dialog";
2
+ export { Alert, AlertTitle, AlertDescription } from "./alert";
3
+ export { Badge } from "./badge";
4
+ export { Button, buttonVariants } from "./button";
5
+ export { Avatar, AvatarImage, AvatarFallback } from "./avatar";
6
+ export { Calendar } from "./calendar";
7
+ export { Card, CardHeader, CardAction, CardTitle, CardDescription, CardContent, CardFooter, } from "./card";
8
+ export { Checkbox } from "./checkbox";
9
+ export { DatePicker } from "./date-picker";
10
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./dialog";
11
+ export { DataLoader } from "./data-loader";
12
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from "./dropdown-menu";
13
+ export { FileUploader } from "./file-uploader";
14
+ export { ImageUploader } from "./image-uploader";
15
+ export { HoverCard, HoverCardTrigger, HoverCardContent, } from "./hover-card";
16
+ export { Input } from "./input";
17
+ export { Label } from "./label";
18
+ export { ModeToggle } from "./mode-toggle";
19
+ export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./pagination";
20
+ export { PasswordRulesChecker } from "./password-rules-checker";
21
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, } from "./popover";
22
+ export { Select } from "./select";
23
+ export { Separator } from "./separator";
24
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetBody, SheetFooter, SheetTitle, SheetDescription, } from "./sheet";
25
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from "./sidebar";
26
+ export { SimplePagination } from "./simple-pagination";
27
+ export { SimpleTooltip } from "./simple-tooltip";
28
+ export { Skeleton } from "./skeleton";
29
+ export { Switch } from "./switch";
30
+ export { Toaster } from "./sonner";
31
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from "./table";
32
+ export { Tabs, TabsList, TabsTrigger, TabsContent } from "./tabs";
33
+ export { Textarea } from "./textarea";
34
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, } from "./tooltip";
35
+ export { FormDate } from "./form-date";
36
+ export { FormColorPicker } from "./form-color-picker";
37
+ export { FormFileUploader } from "./form-file-uploader";
38
+ export { FormInput } from "./form-input";
39
+ export { FormSelect } from "./form-select";
40
+ export { FormSwitch } from "./form-switch";
41
+ export { FormTextarea } from "./form-textarea";
42
+ export { FormImageUploader } from "./form-image-uploader";
43
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from "./form";
44
+ export { ThemeProvider, useTheme } from "../providers/theme-provider";
45
+ export { LoaderProvider, useLoader } from "../providers/loader-provider";