fina-react-ds 1.0.40 → 1.0.42
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/components/alert-dialog.js +1 -166
- package/dist/components/alert.js +1 -73
- package/dist/components/avatar.js +1 -58
- package/dist/components/badge.js +1 -44
- package/dist/components/button.js +1 -153
- package/dist/components/calendar.js +1 -205
- package/dist/components/card.js +1 -99
- package/dist/components/checkbox.js +1 -34
- package/dist/components/data-loader.js +1 -24
- package/dist/components/date-picker.js +1 -64
- package/dist/components/dialog.js +1 -145
- package/dist/components/dropdown-menu.js +1 -248
- package/dist/components/file-uploader.js +1 -108
- package/dist/components/form-color-picker.js +1 -29
- package/dist/components/form-date.js +1 -30
- package/dist/components/form-file-uploader.js +1 -32
- package/dist/components/form-image-uploader.js +1 -40
- package/dist/components/form-input.js +1 -35
- package/dist/components/form-select.js +1 -51
- package/dist/components/form-switch.js +1 -35
- package/dist/components/form-textarea.js +1 -35
- package/dist/components/form.js +1 -110
- package/dist/components/hover-card.js +1 -43
- package/dist/components/image-uploader.js +1 -130
- package/dist/components/index.js +1 -200
- package/dist/components/input.js +1 -26
- package/dist/components/label.js +1 -32
- package/dist/components/mode-toggle.js +1 -26
- package/dist/components/pagination.js +1 -128
- package/dist/components/password-rules-checker.js +1 -44
- package/dist/components/popover.js +1 -50
- package/dist/components/select.js +1 -53
- package/dist/components/separator.js +1 -29
- package/dist/components/sheet.js +1 -160
- package/dist/components/sidebar.js +1 -624
- package/dist/components/simple-pagination.js +1 -34
- package/dist/components/simple-tooltip.js +1 -17
- package/dist/components/skeleton.js +1 -18
- package/dist/components/sonner.js +1 -24
- package/dist/components/switch.js +1 -34
- package/dist/components/table.js +1 -124
- package/dist/components/tabs.js +1 -73
- package/dist/components/textarea.js +1 -23
- package/dist/components/tooltip.js +1 -61
- package/dist/hooks/index.js +1 -4
- package/dist/hooks/use-mobile.js +1 -17
- package/dist/index.js +1 -225
- package/dist/lib/arrays.js +1 -7
- package/dist/lib/dates.js +1 -21
- package/dist/lib/http.js +1 -56
- package/dist/lib/index.js +1 -27
- package/dist/lib/strings.js +1 -6
- package/dist/lib/utils.js +2 -31
- package/dist/lib/yup.js +1 -88
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -12
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -21
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -36
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -18
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +1 -72
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +1 -33
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +1 -13
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +1 -123
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +1 -112
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +1 -21
- package/dist/providers/loader-provider.js +1 -34
- package/dist/providers/theme-provider.js +1 -45
- package/package.json +1 -9
|
@@ -1,35 +1 @@
|
|
|
1
|
-
var c
|
|
2
|
-
var m = (o, e) => c(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
|
4
|
-
import { useFormContext as d } from "react-hook-form";
|
|
5
|
-
import { FormField as p, FormItem as u, FormLabel as x, FormControl as h, FormDescription as j, FormMessage as v } from "./form.js";
|
|
6
|
-
import { Textarea as C } from "./textarea.js";
|
|
7
|
-
function L({
|
|
8
|
-
name: o,
|
|
9
|
-
label: e,
|
|
10
|
-
description: t,
|
|
11
|
-
required: n = !1,
|
|
12
|
-
...l
|
|
13
|
-
}) {
|
|
14
|
-
const { control: i } = d();
|
|
15
|
-
return /* @__PURE__ */ r(
|
|
16
|
-
p,
|
|
17
|
-
{
|
|
18
|
-
control: i,
|
|
19
|
-
name: o,
|
|
20
|
-
render: /* @__PURE__ */ m(({ field: s }) => {
|
|
21
|
-
const { value: a, ...F } = s;
|
|
22
|
-
return /* @__PURE__ */ f(u, { children: [
|
|
23
|
-
/* @__PURE__ */ r(x, { required: n, children: e }),
|
|
24
|
-
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(C, { value: a ?? "", ...F, ...l }) }),
|
|
25
|
-
t && /* @__PURE__ */ r(j, { children: t }),
|
|
26
|
-
/* @__PURE__ */ r(v, {})
|
|
27
|
-
] });
|
|
28
|
-
}, "render")
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
m(L, "FormTextarea");
|
|
33
|
-
export {
|
|
34
|
-
L as FormTextarea
|
|
35
|
-
};
|
|
1
|
+
var c=Object.defineProperty;var m=(o,e)=>c(o,"name",{value:e,configurable:!0});import{jsx as r,jsxs as f}from"react/jsx-runtime";import{useFormContext as d}from"react-hook-form";import{FormField as p,FormItem as u,FormLabel as x,FormControl as h,FormDescription as j,FormMessage as v}from"./form.js";import{Textarea as C}from"./textarea.js";function L({name:o,label:e,description:t,required:n=!1,...l}){const{control:i}=d();return r(p,{control:i,name:o,render:m(({field:s})=>{const{value:a,...F}=s;return f(u,{children:[r(x,{required:n,children:e}),r(h,{children:r(C,{value:a??"",...F,...l})}),t&&r(j,{children:t}),r(v,{})]})},"render")})}m(L,"FormTextarea");export{L as FormTextarea};
|
package/dist/components/form.js
CHANGED
|
@@ -1,110 +1 @@
|
|
|
1
|
-
var u
|
|
2
|
-
var n = (t, e) => u(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
-
import * as i from "react";
|
|
5
|
-
import { Slot as F } from "radix-ui";
|
|
6
|
-
import { FormProvider as x, useFormContext as I, useFormState as p, Controller as g } from "react-hook-form";
|
|
7
|
-
import { cn as d } from "../lib/utils.js";
|
|
8
|
-
import { Label as C } from "./label.js";
|
|
9
|
-
const M = x, l = i.createContext(
|
|
10
|
-
{}
|
|
11
|
-
), N = /* @__PURE__ */ n(({
|
|
12
|
-
...t
|
|
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: r } = I(), o = p({ name: t.name }), m = r(t.name, o);
|
|
15
|
-
if (!t)
|
|
16
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
17
|
-
const { id: a } = e;
|
|
18
|
-
return {
|
|
19
|
-
id: a,
|
|
20
|
-
name: t.name,
|
|
21
|
-
formItemId: `${a}-form-item`,
|
|
22
|
-
formDescriptionId: `${a}-form-item-description`,
|
|
23
|
-
formMessageId: `${a}-form-item-message`,
|
|
24
|
-
...m
|
|
25
|
-
};
|
|
26
|
-
}, "useFormField"), f = i.createContext(
|
|
27
|
-
{}
|
|
28
|
-
);
|
|
29
|
-
function w({ className: t, ...e }) {
|
|
30
|
-
const r = i.useId();
|
|
31
|
-
return /* @__PURE__ */ s(f.Provider, { value: { id: r }, children: /* @__PURE__ */ s(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
"data-slot": "form-item",
|
|
35
|
-
className: d("grid gap-2", t),
|
|
36
|
-
...e
|
|
37
|
-
}
|
|
38
|
-
) });
|
|
39
|
-
}
|
|
40
|
-
n(w, "FormItem");
|
|
41
|
-
function P({
|
|
42
|
-
className: t,
|
|
43
|
-
required: e = !1,
|
|
44
|
-
...r
|
|
45
|
-
}) {
|
|
46
|
-
const { error: o, formItemId: m } = c();
|
|
47
|
-
return /* @__PURE__ */ s(
|
|
48
|
-
C,
|
|
49
|
-
{
|
|
50
|
-
"data-slot": "form-label",
|
|
51
|
-
"data-error": !!o,
|
|
52
|
-
className: d("data-[error=true]:text-destructive", t),
|
|
53
|
-
htmlFor: m,
|
|
54
|
-
required: e,
|
|
55
|
-
...r
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
n(P, "FormLabel");
|
|
60
|
-
function y({ ...t }) {
|
|
61
|
-
const { error: e, formItemId: r, formDescriptionId: o, formMessageId: m } = c();
|
|
62
|
-
return /* @__PURE__ */ s(
|
|
63
|
-
F.Root,
|
|
64
|
-
{
|
|
65
|
-
"data-slot": "form-control",
|
|
66
|
-
id: r,
|
|
67
|
-
"aria-describedby": e ? `${o} ${m}` : `${o}`,
|
|
68
|
-
"aria-invalid": !!e,
|
|
69
|
-
...t
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
n(y, "FormControl");
|
|
74
|
-
function L({ className: t, ...e }) {
|
|
75
|
-
const { formDescriptionId: r } = c();
|
|
76
|
-
return /* @__PURE__ */ s(
|
|
77
|
-
"p",
|
|
78
|
-
{
|
|
79
|
-
"data-slot": "form-description",
|
|
80
|
-
id: r,
|
|
81
|
-
className: d("text-muted text-sm", t),
|
|
82
|
-
...e
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
n(L, "FormDescription");
|
|
87
|
-
function R({ className: t, ...e }) {
|
|
88
|
-
const { error: r, formMessageId: o } = c(), m = r ? String(r?.message ?? "") : e.children;
|
|
89
|
-
return m ? /* @__PURE__ */ s(
|
|
90
|
-
"p",
|
|
91
|
-
{
|
|
92
|
-
"data-slot": "form-message",
|
|
93
|
-
id: o,
|
|
94
|
-
className: d("text-destructive text-sm", t),
|
|
95
|
-
...e,
|
|
96
|
-
children: m
|
|
97
|
-
}
|
|
98
|
-
) : null;
|
|
99
|
-
}
|
|
100
|
-
n(R, "FormMessage");
|
|
101
|
-
export {
|
|
102
|
-
M as Form,
|
|
103
|
-
y as FormControl,
|
|
104
|
-
L as FormDescription,
|
|
105
|
-
N as FormField,
|
|
106
|
-
w as FormItem,
|
|
107
|
-
P as FormLabel,
|
|
108
|
-
R as FormMessage,
|
|
109
|
-
c as useFormField
|
|
110
|
-
};
|
|
1
|
+
var u=Object.defineProperty;var n=(t,e)=>u(t,"name",{value:e,configurable:!0});import{jsx as s}from"react/jsx-runtime";import*as i from"react";import{Slot as F}from"radix-ui";import{FormProvider as x,useFormContext as I,useFormState as p,Controller as g}from"react-hook-form";import{cn as d}from"../lib/utils.js";import{Label as C}from"./label.js";const M=x,l=i.createContext({}),N=n(({...t})=>s(l.Provider,{value:{name:t.name},children:s(g,{...t})}),"FormField"),c=n(()=>{const t=i.useContext(l),e=i.useContext(f),{getFieldState:r}=I(),o=p({name:t.name}),m=r(t.name,o);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:a}=e;return{id:a,name:t.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...m}},"useFormField"),f=i.createContext({});function w({className:t,...e}){const r=i.useId();return s(f.Provider,{value:{id:r},children:s("div",{"data-slot":"form-item",className:d("grid gap-2",t),...e})})}n(w,"FormItem");function P({className:t,required:e=!1,...r}){const{error:o,formItemId:m}=c();return s(C,{"data-slot":"form-label","data-error":!!o,className:d("data-[error=true]:text-destructive",t),htmlFor:m,required:e,...r})}n(P,"FormLabel");function y({...t}){const{error:e,formItemId:r,formDescriptionId:o,formMessageId:m}=c();return s(F.Root,{"data-slot":"form-control",id:r,"aria-describedby":e?`${o} ${m}`:`${o}`,"aria-invalid":!!e,...t})}n(y,"FormControl");function L({className:t,...e}){const{formDescriptionId:r}=c();return s("p",{"data-slot":"form-description",id:r,className:d("text-muted text-sm",t),...e})}n(L,"FormDescription");function R({className:t,...e}){const{error:r,formMessageId:o}=c(),m=r?String(r?.message??""):e.children;return m?s("p",{"data-slot":"form-message",id:o,className:d("text-destructive text-sm",t),...e,children:m}):null}n(R,"FormMessage");export{M as Form,y as FormControl,L as FormDescription,N as FormField,w as FormItem,P as FormLabel,R as FormMessage,c as useFormField};
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
var i
|
|
2
|
-
var o = (t, a) => i(t, "name", { value: a, configurable: !0 });
|
|
3
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
import { HoverCard as e } from "radix-ui";
|
|
5
|
-
import { cn as s } from "../lib/utils.js";
|
|
6
|
-
function p({
|
|
7
|
-
...t
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ r(e.Root, { "data-slot": "hover-card", ...t });
|
|
10
|
-
}
|
|
11
|
-
o(p, "HoverCard");
|
|
12
|
-
function g({
|
|
13
|
-
...t
|
|
14
|
-
}) {
|
|
15
|
-
return /* @__PURE__ */ r(e.Trigger, { "data-slot": "hover-card-trigger", ...t });
|
|
16
|
-
}
|
|
17
|
-
o(g, "HoverCardTrigger");
|
|
18
|
-
function u({
|
|
19
|
-
className: t,
|
|
20
|
-
align: a = "center",
|
|
21
|
-
sideOffset: d = 4,
|
|
22
|
-
...n
|
|
23
|
-
}) {
|
|
24
|
-
return /* @__PURE__ */ r(e.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ r(
|
|
25
|
-
e.Content,
|
|
26
|
-
{
|
|
27
|
-
"data-slot": "hover-card-content",
|
|
28
|
-
align: a,
|
|
29
|
-
sideOffset: d,
|
|
30
|
-
className: s(
|
|
31
|
-
"bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
32
|
-
t
|
|
33
|
-
),
|
|
34
|
-
...n
|
|
35
|
-
}
|
|
36
|
-
) });
|
|
37
|
-
}
|
|
38
|
-
o(u, "HoverCardContent");
|
|
39
|
-
export {
|
|
40
|
-
p as HoverCard,
|
|
41
|
-
u as HoverCardContent,
|
|
42
|
-
g as HoverCardTrigger
|
|
43
|
-
};
|
|
1
|
+
var i=Object.defineProperty;var o=(t,a)=>i(t,"name",{value:a,configurable:!0});import{jsx as r}from"react/jsx-runtime";import{HoverCard as e}from"radix-ui";import{cn as s}from"../lib/utils.js";function p({...t}){return r(e.Root,{"data-slot":"hover-card",...t})}o(p,"HoverCard");function g({...t}){return r(e.Trigger,{"data-slot":"hover-card-trigger",...t})}o(g,"HoverCardTrigger");function u({className:t,align:a="center",sideOffset:d=4,...n}){return r(e.Portal,{"data-slot":"hover-card-portal",children:r(e.Content,{"data-slot":"hover-card-content",align:a,sideOffset:d,className:s("bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...n})})}o(u,"HoverCardContent");export{p as HoverCard,u as HoverCardContent,g as HoverCardTrigger};
|
|
@@ -1,130 +1 @@
|
|
|
1
|
-
var k = Object.
|
|
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
|
-
actualImageUrl: a = ""
|
|
14
|
-
}) {
|
|
15
|
-
const d = {
|
|
16
|
-
"image/jpeg": ["*"],
|
|
17
|
-
"image/png": ["*"],
|
|
18
|
-
"image/gif": ["*"]
|
|
19
|
-
}, [m, u] = F([]);
|
|
20
|
-
C(b, () => ({
|
|
21
|
-
focus: /* @__PURE__ */ s(() => {
|
|
22
|
-
t?.current && t.current.focus();
|
|
23
|
-
}, "focus")
|
|
24
|
-
}));
|
|
25
|
-
const v = g(
|
|
26
|
-
(n) => {
|
|
27
|
-
u(n), i?.(n.length > 0 ? n[0] : null);
|
|
28
|
-
},
|
|
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
|
-
maxFiles: 1,
|
|
34
|
-
noClick: !0,
|
|
35
|
-
onDrop: v,
|
|
36
|
-
onFileDialogCancel: h,
|
|
37
|
-
accept: d
|
|
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
|
-
}, []);
|
|
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
|
-
"img",
|
|
45
|
-
{
|
|
46
|
-
src: a,
|
|
47
|
-
alt: "Preview",
|
|
48
|
-
className: "w-full h-full object-cover object-center rounded-md"
|
|
49
|
-
}
|
|
50
|
-
) }),
|
|
51
|
-
/* @__PURE__ */ r(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
...N(),
|
|
55
|
-
className: c(
|
|
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
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
58
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
59
|
-
),
|
|
60
|
-
"aria-invalid": o,
|
|
61
|
-
children: [
|
|
62
|
-
m.length > 0 && /* @__PURE__ */ r(x, { children: [
|
|
63
|
-
/* @__PURE__ */ e(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
66
|
-
className: c(
|
|
67
|
-
"bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
|
|
68
|
-
),
|
|
69
|
-
children: /* @__PURE__ */ e(D, { className: "size-4" })
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ r("div", { className: "mb-4 text-center", children: [
|
|
73
|
-
f[0].name,
|
|
74
|
-
/* @__PURE__ */ e("br", {}),
|
|
75
|
-
z(f[0])
|
|
76
|
-
] }),
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
-
P,
|
|
79
|
-
{
|
|
80
|
-
type: "button",
|
|
81
|
-
color: "destructive",
|
|
82
|
-
variant: "ghost",
|
|
83
|
-
onClick: /* @__PURE__ */ s(() => {
|
|
84
|
-
u([]), i?.(null), t?.current?.focus();
|
|
85
|
-
}, "onClick"),
|
|
86
|
-
children: "Supprimer"
|
|
87
|
-
}
|
|
88
|
-
)
|
|
89
|
-
] }),
|
|
90
|
-
m.length === 0 && /* @__PURE__ */ r(x, { children: [
|
|
91
|
-
/* @__PURE__ */ e(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
className: c(
|
|
95
|
-
"bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
|
|
96
|
-
),
|
|
97
|
-
children: /* @__PURE__ */ e(I, { className: "size-4" })
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
/* @__PURE__ */ r("div", { className: "mb-4", children: [
|
|
101
|
-
"Glisser-déposer ou",
|
|
102
|
-
" ",
|
|
103
|
-
/* @__PURE__ */ e(
|
|
104
|
-
"span",
|
|
105
|
-
{
|
|
106
|
-
className: "font-bold underline cursor-pointer",
|
|
107
|
-
onClick: j,
|
|
108
|
-
children: "Choisir un fichier"
|
|
109
|
-
}
|
|
110
|
-
),
|
|
111
|
-
" ",
|
|
112
|
-
"à uploader"
|
|
113
|
-
] }),
|
|
114
|
-
/* @__PURE__ */ r("div", { className: "text-center text-sm md:text-xs", children: [
|
|
115
|
-
"Formats acceptés : ",
|
|
116
|
-
Object.keys(d).join(", "),
|
|
117
|
-
/* @__PURE__ */ e("br", {}),
|
|
118
|
-
"Taille max : 5Mo"
|
|
119
|
-
] })
|
|
120
|
-
] }),
|
|
121
|
-
/* @__PURE__ */ e("input", { ...y() })
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
] });
|
|
126
|
-
}
|
|
127
|
-
s(O, "ImageUploader");
|
|
128
|
-
export {
|
|
129
|
-
O as ImageUploader
|
|
130
|
-
};
|
|
1
|
+
var k=Object.defineProperty;var s=(i,o)=>k(i,"name",{value:o,configurable:!0});import{jsxs as r,jsx as e,Fragment as x}from"react/jsx-runtime";import{useState as F,useImperativeHandle as C,useCallback as g}from"react";import{FileIcon as D,UploadIcon as I}from"lucide-react";import{useDropzone as w}from"react-dropzone";import{cn as c}from"../lib/utils.js";import{Button as P}from"./button.js";function O({onChange:i,"aria-invalid":o,ref:b,actualImageUrl:a=""}){const d={"image/jpeg":["*"],"image/png":["*"],"image/gif":["*"]},[m,u]=F([]);C(b,()=>({focus:s(()=>{t?.current&&t.current.focus()},"focus")}));const v=g(n=>{u(n),i?.(n.length>0?n[0]:null)},[i]),h=s(()=>{t?.current&&t.current.focus()},"handleFileDialogCancel"),{getRootProps:N,getInputProps:y,acceptedFiles:f,open:j,rootRef:t}=w({maxFiles:1,noClick:!0,onDrop:v,onFileDialogCancel:h,accept:d}),z=g(n=>{let l=0,p="ko";return l=n.size/1e3,l>1e3&&(l/=1e3,p="mo"),l.toFixed(2)+" "+p},[]);return r("div",{className:"flex space-x-2 items-center h-50",children:[a&&e("div",{className:"flex-1 h-full",children:e("img",{src:a,alt:"Preview",className:"w-full h-full object-cover object-center rounded-md"})}),r("div",{...N(),className:c("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","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"),"aria-invalid":o,children:[m.length>0&&r(x,{children:[e("div",{className:c("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(D,{className:"size-4"})}),r("div",{className:"mb-4 text-center",children:[f[0].name,e("br",{}),z(f[0])]}),e(P,{type:"button",color:"destructive",variant:"ghost",onClick:s(()=>{u([]),i?.(null),t?.current?.focus()},"onClick"),children:"Supprimer"})]}),m.length===0&&r(x,{children:[e("div",{className:c("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(I,{className:"size-4"})}),r("div",{className:"mb-4",children:["Glisser-déposer ou"," ",e("span",{className:"font-bold underline cursor-pointer",onClick:j,children:"Choisir un fichier"})," ","à uploader"]}),r("div",{className:"text-center text-sm md:text-xs",children:["Formats acceptés : ",Object.keys(d).join(", "),e("br",{}),"Taille max : 5Mo"]})]}),e("input",{...y()})]})]})}s(O,"ImageUploader");export{O as ImageUploader};
|
package/dist/components/index.js
CHANGED
|
@@ -1,200 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Alert as u, AlertDescription as x, AlertTitle as f } from "./alert.js";
|
|
3
|
-
import { Badge as T } from "./badge.js";
|
|
4
|
-
import { Button as s, buttonVariants as F } from "./button.js";
|
|
5
|
-
import { Avatar as c, AvatarFallback as P, AvatarImage as A } from "./avatar.js";
|
|
6
|
-
import { Calendar as h } from "./calendar.js";
|
|
7
|
-
import { Card as I, CardAction as H, CardContent as k, CardDescription as L, CardFooter as B, CardHeader as G, CardTitle as R } from "./card.js";
|
|
8
|
-
import { Checkbox as U } from "./checkbox.js";
|
|
9
|
-
import { DatePicker as E } from "./date-picker.js";
|
|
10
|
-
import { Dialog as V, DialogClose as j, DialogContent as q, DialogDescription as z, DialogFooter as J, DialogHeader as K, DialogOverlay as Q, DialogPortal as W, DialogTitle as X, DialogTrigger as Y } from "./dialog.js";
|
|
11
|
-
import { DataLoader as _ } from "./data-loader.js";
|
|
12
|
-
import { DropdownMenu as ee, DropdownMenuCheckboxItem as oe, DropdownMenuContent as re, DropdownMenuGroup as te, DropdownMenuItem as ae, DropdownMenuLabel as ie, DropdownMenuPortal as ne, DropdownMenuRadioGroup as pe, DropdownMenuRadioItem as le, DropdownMenuSeparator as de, DropdownMenuShortcut as me, DropdownMenuSub as ge, DropdownMenuSubContent as Se, DropdownMenuSubTrigger as be, DropdownMenuTrigger as ue } from "./dropdown-menu.js";
|
|
13
|
-
import { FileUploader as fe } from "./file-uploader.js";
|
|
14
|
-
import { ImageUploader as Te } from "./image-uploader.js";
|
|
15
|
-
import { HoverCard as se, HoverCardContent as Fe, HoverCardTrigger as Me } from "./hover-card.js";
|
|
16
|
-
import { Input as Pe } from "./input.js";
|
|
17
|
-
import { Label as we } from "./label.js";
|
|
18
|
-
import { ModeToggle as ve } from "./mode-toggle.js";
|
|
19
|
-
import { Pagination as He, PaginationContent as ke, PaginationEllipsis as Le, PaginationItem as Be, PaginationLink as Ge, PaginationNext as Re, PaginationPrevious as ye } from "./pagination.js";
|
|
20
|
-
import { PasswordRulesChecker as Oe } from "./password-rules-checker.js";
|
|
21
|
-
import { Popover as Ne, PopoverAnchor as Ve, PopoverContent as je, PopoverTrigger as qe } from "./popover.js";
|
|
22
|
-
import { Select as Je } from "./select.js";
|
|
23
|
-
import { Separator as Qe } from "./separator.js";
|
|
24
|
-
import { Sheet as Xe, SheetBody as Ye, SheetClose as Ze, SheetContent as _e, SheetDescription as $e, SheetFooter as eo, SheetHeader as oo, SheetTitle as ro, SheetTrigger as to } from "./sheet.js";
|
|
25
|
-
import { Sidebar as io, SidebarContent as no, SidebarFooter as po, SidebarGroup as lo, SidebarGroupAction as mo, SidebarGroupContent as go, SidebarGroupLabel as So, SidebarHeader as bo, SidebarInput as uo, SidebarInset as xo, SidebarMenu as fo, SidebarMenuAction as Do, SidebarMenuBadge as To, SidebarMenuButton as Co, SidebarMenuItem as so, SidebarMenuSkeleton as Fo, SidebarMenuSub as Mo, SidebarMenuSubButton as co, SidebarMenuSubItem as Po, SidebarProvider as Ao, SidebarRail as wo, SidebarSeparator as ho, SidebarTrigger as vo, useSidebar as Io } from "./sidebar.js";
|
|
26
|
-
import { SimplePagination as ko } from "./simple-pagination.js";
|
|
27
|
-
import { SimpleTooltip as Bo } from "./simple-tooltip.js";
|
|
28
|
-
import { Skeleton as Ro } from "./skeleton.js";
|
|
29
|
-
import { Switch as Uo } from "./switch.js";
|
|
30
|
-
import { Toaster as Eo } from "./sonner.js";
|
|
31
|
-
import { Table as Vo, TableBody as jo, TableCaption as qo, TableCell as zo, TableFooter as Jo, TableHead as Ko, TableHeader as Qo, TableRow as Wo } from "./table.js";
|
|
32
|
-
import { Tabs as Yo, TabsContent as Zo, TabsList as _o, TabsTrigger as $o } from "./tabs.js";
|
|
33
|
-
import { Textarea as or } from "./textarea.js";
|
|
34
|
-
import { Tooltip as tr, TooltipContent as ar, TooltipProvider as ir, TooltipTrigger as nr } from "./tooltip.js";
|
|
35
|
-
import { FormDate as lr } from "./form-date.js";
|
|
36
|
-
import { FormColorPicker as mr } from "./form-color-picker.js";
|
|
37
|
-
import { FormFileUploader as Sr } from "./form-file-uploader.js";
|
|
38
|
-
import { FormInput as ur } from "./form-input.js";
|
|
39
|
-
import { FormSelect as fr } from "./form-select.js";
|
|
40
|
-
import { FormSwitch as Tr } from "./form-switch.js";
|
|
41
|
-
import { FormTextarea as sr } from "./form-textarea.js";
|
|
42
|
-
import { FormImageUploader as Mr } from "./form-image-uploader.js";
|
|
43
|
-
import { Form as Pr, FormControl as Ar, FormDescription as wr, FormField as hr, FormItem as vr, FormLabel as Ir, FormMessage as Hr, useFormField as kr } from "./form.js";
|
|
44
|
-
import { ThemeProvider as Br, useTheme as Gr } from "../providers/theme-provider.js";
|
|
45
|
-
import { LoaderProvider as yr, useLoader as Ur } from "../providers/loader-provider.js";
|
|
46
|
-
export {
|
|
47
|
-
u as Alert,
|
|
48
|
-
x as AlertDescription,
|
|
49
|
-
r as AlertDialog,
|
|
50
|
-
t as AlertDialogAction,
|
|
51
|
-
a as AlertDialogCancel,
|
|
52
|
-
i as AlertDialogContent,
|
|
53
|
-
n as AlertDialogDescription,
|
|
54
|
-
p as AlertDialogFooter,
|
|
55
|
-
l as AlertDialogHeader,
|
|
56
|
-
d as AlertDialogOverlay,
|
|
57
|
-
m as AlertDialogPortal,
|
|
58
|
-
g as AlertDialogTitle,
|
|
59
|
-
S as AlertDialogTrigger,
|
|
60
|
-
f as AlertTitle,
|
|
61
|
-
c as Avatar,
|
|
62
|
-
P as AvatarFallback,
|
|
63
|
-
A as AvatarImage,
|
|
64
|
-
T as Badge,
|
|
65
|
-
s as Button,
|
|
66
|
-
h as Calendar,
|
|
67
|
-
I as Card,
|
|
68
|
-
H as CardAction,
|
|
69
|
-
k as CardContent,
|
|
70
|
-
L as CardDescription,
|
|
71
|
-
B as CardFooter,
|
|
72
|
-
G as CardHeader,
|
|
73
|
-
R as CardTitle,
|
|
74
|
-
U as Checkbox,
|
|
75
|
-
_ as DataLoader,
|
|
76
|
-
E as DatePicker,
|
|
77
|
-
V as Dialog,
|
|
78
|
-
j as DialogClose,
|
|
79
|
-
q as DialogContent,
|
|
80
|
-
z as DialogDescription,
|
|
81
|
-
J as DialogFooter,
|
|
82
|
-
K as DialogHeader,
|
|
83
|
-
Q as DialogOverlay,
|
|
84
|
-
W as DialogPortal,
|
|
85
|
-
X as DialogTitle,
|
|
86
|
-
Y as DialogTrigger,
|
|
87
|
-
ee as DropdownMenu,
|
|
88
|
-
oe as DropdownMenuCheckboxItem,
|
|
89
|
-
re as DropdownMenuContent,
|
|
90
|
-
te as DropdownMenuGroup,
|
|
91
|
-
ae as DropdownMenuItem,
|
|
92
|
-
ie as DropdownMenuLabel,
|
|
93
|
-
ne as DropdownMenuPortal,
|
|
94
|
-
pe as DropdownMenuRadioGroup,
|
|
95
|
-
le as DropdownMenuRadioItem,
|
|
96
|
-
de as DropdownMenuSeparator,
|
|
97
|
-
me as DropdownMenuShortcut,
|
|
98
|
-
ge as DropdownMenuSub,
|
|
99
|
-
Se as DropdownMenuSubContent,
|
|
100
|
-
be as DropdownMenuSubTrigger,
|
|
101
|
-
ue as DropdownMenuTrigger,
|
|
102
|
-
fe as FileUploader,
|
|
103
|
-
Pr as Form,
|
|
104
|
-
mr as FormColorPicker,
|
|
105
|
-
Ar as FormControl,
|
|
106
|
-
lr as FormDate,
|
|
107
|
-
wr as FormDescription,
|
|
108
|
-
hr as FormField,
|
|
109
|
-
Sr as FormFileUploader,
|
|
110
|
-
Mr as FormImageUploader,
|
|
111
|
-
ur as FormInput,
|
|
112
|
-
vr as FormItem,
|
|
113
|
-
Ir as FormLabel,
|
|
114
|
-
Hr as FormMessage,
|
|
115
|
-
fr as FormSelect,
|
|
116
|
-
Tr as FormSwitch,
|
|
117
|
-
sr as FormTextarea,
|
|
118
|
-
se as HoverCard,
|
|
119
|
-
Fe as HoverCardContent,
|
|
120
|
-
Me as HoverCardTrigger,
|
|
121
|
-
Te as ImageUploader,
|
|
122
|
-
Pe as Input,
|
|
123
|
-
we as Label,
|
|
124
|
-
yr as LoaderProvider,
|
|
125
|
-
ve as ModeToggle,
|
|
126
|
-
He as Pagination,
|
|
127
|
-
ke as PaginationContent,
|
|
128
|
-
Le as PaginationEllipsis,
|
|
129
|
-
Be as PaginationItem,
|
|
130
|
-
Ge as PaginationLink,
|
|
131
|
-
Re as PaginationNext,
|
|
132
|
-
ye as PaginationPrevious,
|
|
133
|
-
Oe as PasswordRulesChecker,
|
|
134
|
-
Ne as Popover,
|
|
135
|
-
Ve as PopoverAnchor,
|
|
136
|
-
je as PopoverContent,
|
|
137
|
-
qe as PopoverTrigger,
|
|
138
|
-
Je as Select,
|
|
139
|
-
Qe as Separator,
|
|
140
|
-
Xe as Sheet,
|
|
141
|
-
Ye as SheetBody,
|
|
142
|
-
Ze as SheetClose,
|
|
143
|
-
_e as SheetContent,
|
|
144
|
-
$e as SheetDescription,
|
|
145
|
-
eo as SheetFooter,
|
|
146
|
-
oo as SheetHeader,
|
|
147
|
-
ro as SheetTitle,
|
|
148
|
-
to as SheetTrigger,
|
|
149
|
-
io as Sidebar,
|
|
150
|
-
no as SidebarContent,
|
|
151
|
-
po as SidebarFooter,
|
|
152
|
-
lo as SidebarGroup,
|
|
153
|
-
mo as SidebarGroupAction,
|
|
154
|
-
go as SidebarGroupContent,
|
|
155
|
-
So as SidebarGroupLabel,
|
|
156
|
-
bo as SidebarHeader,
|
|
157
|
-
uo as SidebarInput,
|
|
158
|
-
xo as SidebarInset,
|
|
159
|
-
fo as SidebarMenu,
|
|
160
|
-
Do as SidebarMenuAction,
|
|
161
|
-
To as SidebarMenuBadge,
|
|
162
|
-
Co as SidebarMenuButton,
|
|
163
|
-
so as SidebarMenuItem,
|
|
164
|
-
Fo as SidebarMenuSkeleton,
|
|
165
|
-
Mo as SidebarMenuSub,
|
|
166
|
-
co as SidebarMenuSubButton,
|
|
167
|
-
Po as SidebarMenuSubItem,
|
|
168
|
-
Ao as SidebarProvider,
|
|
169
|
-
wo as SidebarRail,
|
|
170
|
-
ho as SidebarSeparator,
|
|
171
|
-
vo as SidebarTrigger,
|
|
172
|
-
ko as SimplePagination,
|
|
173
|
-
Bo as SimpleTooltip,
|
|
174
|
-
Ro as Skeleton,
|
|
175
|
-
Uo as Switch,
|
|
176
|
-
Vo as Table,
|
|
177
|
-
jo as TableBody,
|
|
178
|
-
qo as TableCaption,
|
|
179
|
-
zo as TableCell,
|
|
180
|
-
Jo as TableFooter,
|
|
181
|
-
Ko as TableHead,
|
|
182
|
-
Qo as TableHeader,
|
|
183
|
-
Wo as TableRow,
|
|
184
|
-
Yo as Tabs,
|
|
185
|
-
Zo as TabsContent,
|
|
186
|
-
_o as TabsList,
|
|
187
|
-
$o as TabsTrigger,
|
|
188
|
-
or as Textarea,
|
|
189
|
-
Br as ThemeProvider,
|
|
190
|
-
Eo as Toaster,
|
|
191
|
-
tr as Tooltip,
|
|
192
|
-
ar as TooltipContent,
|
|
193
|
-
ir as TooltipProvider,
|
|
194
|
-
nr as TooltipTrigger,
|
|
195
|
-
F as buttonVariants,
|
|
196
|
-
kr as useFormField,
|
|
197
|
-
Ur as useLoader,
|
|
198
|
-
Io as useSidebar,
|
|
199
|
-
Gr as useTheme
|
|
200
|
-
};
|
|
1
|
+
import{AlertDialog as r,AlertDialogAction as t,AlertDialogCancel as a,AlertDialogContent as i,AlertDialogDescription as n,AlertDialogFooter as p,AlertDialogHeader as l,AlertDialogOverlay as d,AlertDialogPortal as m,AlertDialogTitle as g,AlertDialogTrigger as S}from"./alert-dialog.js";import{Alert as u,AlertDescription as x,AlertTitle as f}from"./alert.js";import{Badge as T}from"./badge.js";import{Button as s,buttonVariants as F}from"./button.js";import{Avatar as c,AvatarFallback as P,AvatarImage as A}from"./avatar.js";import{Calendar as h}from"./calendar.js";import{Card as I,CardAction as H,CardContent as k,CardDescription as L,CardFooter as B,CardHeader as G,CardTitle as R}from"./card.js";import{Checkbox as U}from"./checkbox.js";import{DatePicker as E}from"./date-picker.js";import{Dialog as V,DialogClose as j,DialogContent as q,DialogDescription as z,DialogFooter as J,DialogHeader as K,DialogOverlay as Q,DialogPortal as W,DialogTitle as X,DialogTrigger as Y}from"./dialog.js";import{DataLoader as _}from"./data-loader.js";import{DropdownMenu as ee,DropdownMenuCheckboxItem as oe,DropdownMenuContent as re,DropdownMenuGroup as te,DropdownMenuItem as ae,DropdownMenuLabel as ie,DropdownMenuPortal as ne,DropdownMenuRadioGroup as pe,DropdownMenuRadioItem as le,DropdownMenuSeparator as de,DropdownMenuShortcut as me,DropdownMenuSub as ge,DropdownMenuSubContent as Se,DropdownMenuSubTrigger as be,DropdownMenuTrigger as ue}from"./dropdown-menu.js";import{FileUploader as fe}from"./file-uploader.js";import{ImageUploader as Te}from"./image-uploader.js";import{HoverCard as se,HoverCardContent as Fe,HoverCardTrigger as Me}from"./hover-card.js";import{Input as Pe}from"./input.js";import{Label as we}from"./label.js";import{ModeToggle as ve}from"./mode-toggle.js";import{Pagination as He,PaginationContent as ke,PaginationEllipsis as Le,PaginationItem as Be,PaginationLink as Ge,PaginationNext as Re,PaginationPrevious as ye}from"./pagination.js";import{PasswordRulesChecker as Oe}from"./password-rules-checker.js";import{Popover as Ne,PopoverAnchor as Ve,PopoverContent as je,PopoverTrigger as qe}from"./popover.js";import{Select as Je}from"./select.js";import{Separator as Qe}from"./separator.js";import{Sheet as Xe,SheetBody as Ye,SheetClose as Ze,SheetContent as _e,SheetDescription as $e,SheetFooter as eo,SheetHeader as oo,SheetTitle as ro,SheetTrigger as to}from"./sheet.js";import{Sidebar as io,SidebarContent as no,SidebarFooter as po,SidebarGroup as lo,SidebarGroupAction as mo,SidebarGroupContent as go,SidebarGroupLabel as So,SidebarHeader as bo,SidebarInput as uo,SidebarInset as xo,SidebarMenu as fo,SidebarMenuAction as Do,SidebarMenuBadge as To,SidebarMenuButton as Co,SidebarMenuItem as so,SidebarMenuSkeleton as Fo,SidebarMenuSub as Mo,SidebarMenuSubButton as co,SidebarMenuSubItem as Po,SidebarProvider as Ao,SidebarRail as wo,SidebarSeparator as ho,SidebarTrigger as vo,useSidebar as Io}from"./sidebar.js";import{SimplePagination as ko}from"./simple-pagination.js";import{SimpleTooltip as Bo}from"./simple-tooltip.js";import{Skeleton as Ro}from"./skeleton.js";import{Switch as Uo}from"./switch.js";import{Toaster as Eo}from"./sonner.js";import{Table as Vo,TableBody as jo,TableCaption as qo,TableCell as zo,TableFooter as Jo,TableHead as Ko,TableHeader as Qo,TableRow as Wo}from"./table.js";import{Tabs as Yo,TabsContent as Zo,TabsList as _o,TabsTrigger as $o}from"./tabs.js";import{Textarea as or}from"./textarea.js";import{Tooltip as tr,TooltipContent as ar,TooltipProvider as ir,TooltipTrigger as nr}from"./tooltip.js";import{FormDate as lr}from"./form-date.js";import{FormColorPicker as mr}from"./form-color-picker.js";import{FormFileUploader as Sr}from"./form-file-uploader.js";import{FormInput as ur}from"./form-input.js";import{FormSelect as fr}from"./form-select.js";import{FormSwitch as Tr}from"./form-switch.js";import{FormTextarea as sr}from"./form-textarea.js";import{FormImageUploader as Mr}from"./form-image-uploader.js";import{Form as Pr,FormControl as Ar,FormDescription as wr,FormField as hr,FormItem as vr,FormLabel as Ir,FormMessage as Hr,useFormField as kr}from"./form.js";import{ThemeProvider as Br,useTheme as Gr}from"../providers/theme-provider.js";import{LoaderProvider as yr,useLoader as Ur}from"../providers/loader-provider.js";export{u as Alert,x as AlertDescription,r as AlertDialog,t as AlertDialogAction,a as AlertDialogCancel,i as AlertDialogContent,n as AlertDialogDescription,p as AlertDialogFooter,l as AlertDialogHeader,d as AlertDialogOverlay,m as AlertDialogPortal,g as AlertDialogTitle,S as AlertDialogTrigger,f as AlertTitle,c as Avatar,P as AvatarFallback,A as AvatarImage,T as Badge,s as Button,h as Calendar,I as Card,H as CardAction,k as CardContent,L as CardDescription,B as CardFooter,G as CardHeader,R as CardTitle,U as Checkbox,_ as DataLoader,E as DatePicker,V as Dialog,j as DialogClose,q as DialogContent,z as DialogDescription,J as DialogFooter,K as DialogHeader,Q as DialogOverlay,W as DialogPortal,X as DialogTitle,Y as DialogTrigger,ee as DropdownMenu,oe as DropdownMenuCheckboxItem,re as DropdownMenuContent,te as DropdownMenuGroup,ae as DropdownMenuItem,ie as DropdownMenuLabel,ne as DropdownMenuPortal,pe as DropdownMenuRadioGroup,le as DropdownMenuRadioItem,de as DropdownMenuSeparator,me as DropdownMenuShortcut,ge as DropdownMenuSub,Se as DropdownMenuSubContent,be as DropdownMenuSubTrigger,ue as DropdownMenuTrigger,fe as FileUploader,Pr as Form,mr as FormColorPicker,Ar as FormControl,lr as FormDate,wr as FormDescription,hr as FormField,Sr as FormFileUploader,Mr as FormImageUploader,ur as FormInput,vr as FormItem,Ir as FormLabel,Hr as FormMessage,fr as FormSelect,Tr as FormSwitch,sr as FormTextarea,se as HoverCard,Fe as HoverCardContent,Me as HoverCardTrigger,Te as ImageUploader,Pe as Input,we as Label,yr as LoaderProvider,ve as ModeToggle,He as Pagination,ke as PaginationContent,Le as PaginationEllipsis,Be as PaginationItem,Ge as PaginationLink,Re as PaginationNext,ye as PaginationPrevious,Oe as PasswordRulesChecker,Ne as Popover,Ve as PopoverAnchor,je as PopoverContent,qe as PopoverTrigger,Je as Select,Qe as Separator,Xe as Sheet,Ye as SheetBody,Ze as SheetClose,_e as SheetContent,$e as SheetDescription,eo as SheetFooter,oo as SheetHeader,ro as SheetTitle,to as SheetTrigger,io as Sidebar,no as SidebarContent,po as SidebarFooter,lo as SidebarGroup,mo as SidebarGroupAction,go as SidebarGroupContent,So as SidebarGroupLabel,bo as SidebarHeader,uo as SidebarInput,xo as SidebarInset,fo as SidebarMenu,Do as SidebarMenuAction,To as SidebarMenuBadge,Co as SidebarMenuButton,so as SidebarMenuItem,Fo as SidebarMenuSkeleton,Mo as SidebarMenuSub,co as SidebarMenuSubButton,Po as SidebarMenuSubItem,Ao as SidebarProvider,wo as SidebarRail,ho as SidebarSeparator,vo as SidebarTrigger,ko as SimplePagination,Bo as SimpleTooltip,Ro as Skeleton,Uo as Switch,Vo as Table,jo as TableBody,qo as TableCaption,zo as TableCell,Jo as TableFooter,Ko as TableHead,Qo as TableHeader,Wo as TableRow,Yo as Tabs,Zo as TabsContent,_o as TabsList,$o as TabsTrigger,or as Textarea,Br as ThemeProvider,Eo as Toaster,tr as Tooltip,ar as TooltipContent,ir as TooltipProvider,nr as TooltipTrigger,F as buttonVariants,kr as useFormField,Ur as useLoader,Io as useSidebar,Gr as useTheme};
|
package/dist/components/input.js
CHANGED
|
@@ -1,26 +1 @@
|
|
|
1
|
-
var o
|
|
2
|
-
var r = (e, i) => o(e, "name", { value: i, configurable: !0 });
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
import { cn as l } from "../lib/utils.js";
|
|
5
|
-
function u({ className: e, type: i, ...t }) {
|
|
6
|
-
return /* @__PURE__ */ n(
|
|
7
|
-
"input",
|
|
8
|
-
{
|
|
9
|
-
type: i,
|
|
10
|
-
"data-slot": "input",
|
|
11
|
-
className: l(
|
|
12
|
-
"placeholder:text-placeholder selection:bg-primary selection:text-primary-foreground bg-input border-input-border flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none md:text-sm",
|
|
13
|
-
"file:text-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
14
|
-
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
16
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
17
|
-
e
|
|
18
|
-
),
|
|
19
|
-
...t
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
r(u, "Input");
|
|
24
|
-
export {
|
|
25
|
-
u as Input
|
|
26
|
-
};
|
|
1
|
+
var o=Object.defineProperty;var r=(e,i)=>o(e,"name",{value:i,configurable:!0});import{jsx as n}from"react/jsx-runtime";import{cn as l}from"../lib/utils.js";function u({className:e,type:i,...t}){return n("input",{type:i,"data-slot":"input",className:l("placeholder:text-placeholder selection:bg-primary selection:text-primary-foreground bg-input border-input-border flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none md:text-sm","file:text-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...t})}r(u,"Input");export{u as Input};
|
package/dist/components/label.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
var s
|
|
2
|
-
var a = (e, t) => s(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
4
|
-
import { Label as d } from "radix-ui";
|
|
5
|
-
import { cn as i } from "../lib/utils.js";
|
|
6
|
-
function b({
|
|
7
|
-
className: e,
|
|
8
|
-
required: t = !1,
|
|
9
|
-
children: o,
|
|
10
|
-
...r
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ l(
|
|
13
|
-
d.Root,
|
|
14
|
-
{
|
|
15
|
-
"data-slot": "label",
|
|
16
|
-
className: i(
|
|
17
|
-
"flex items-center text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
18
|
-
e
|
|
19
|
-
),
|
|
20
|
-
...r,
|
|
21
|
-
children: [
|
|
22
|
-
o,
|
|
23
|
-
" ",
|
|
24
|
-
t && /* @__PURE__ */ n("span", { className: "text-destructive", children: "*" })
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
a(b, "Label");
|
|
30
|
-
export {
|
|
31
|
-
b as Label
|
|
32
|
-
};
|
|
1
|
+
var s=Object.defineProperty;var a=(e,t)=>s(e,"name",{value:t,configurable:!0});import{jsxs as l,jsx as n}from"react/jsx-runtime";import{Label as d}from"radix-ui";import{cn as i}from"../lib/utils.js";function b({className:e,required:t=!1,children:o,...r}){return l(d.Root,{"data-slot":"label",className:i("flex items-center text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r,children:[o," ",t&&n("span",{className:"text-destructive",children:"*"})]})}a(b,"Label");export{b as Label};
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
var l
|
|
2
|
-
var o = (r, a) => l(r, "name", { value: a, configurable: !0 });
|
|
3
|
-
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
4
|
-
import { Sun as i, Moon as s } from "lucide-react";
|
|
5
|
-
import { Button as m } from "./button.js";
|
|
6
|
-
import { DropdownMenu as c, DropdownMenuTrigger as d, DropdownMenuContent as h, DropdownMenuItem as t } from "./dropdown-menu.js";
|
|
7
|
-
import { useTheme as p } from "../providers/theme-provider.js";
|
|
8
|
-
function M() {
|
|
9
|
-
const { setTheme: r } = p();
|
|
10
|
-
return /* @__PURE__ */ n(c, { children: [
|
|
11
|
-
/* @__PURE__ */ e(d, { asChild: !0, children: /* @__PURE__ */ n(m, { variant: "ghost", color: "dark", size: "icon", children: [
|
|
12
|
-
/* @__PURE__ */ e(i, { className: "h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90" }),
|
|
13
|
-
/* @__PURE__ */ e(s, { className: "absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0" }),
|
|
14
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
|
|
15
|
-
] }) }),
|
|
16
|
-
/* @__PURE__ */ n(h, { align: "end", children: [
|
|
17
|
-
/* @__PURE__ */ e(t, { onClick: /* @__PURE__ */ o(() => r("light"), "onClick"), children: "Clair" }),
|
|
18
|
-
/* @__PURE__ */ e(t, { onClick: /* @__PURE__ */ o(() => r("dark"), "onClick"), children: "Sombre" }),
|
|
19
|
-
/* @__PURE__ */ e(t, { onClick: /* @__PURE__ */ o(() => r("system"), "onClick"), children: "Système" })
|
|
20
|
-
] })
|
|
21
|
-
] });
|
|
22
|
-
}
|
|
23
|
-
o(M, "ModeToggle");
|
|
24
|
-
export {
|
|
25
|
-
M as ModeToggle
|
|
26
|
-
};
|
|
1
|
+
var l=Object.defineProperty;var o=(r,a)=>l(r,"name",{value:a,configurable:!0});import{jsxs as n,jsx as e}from"react/jsx-runtime";import{Sun as i,Moon as s}from"lucide-react";import{Button as m}from"./button.js";import{DropdownMenu as c,DropdownMenuTrigger as d,DropdownMenuContent as h,DropdownMenuItem as t}from"./dropdown-menu.js";import{useTheme as p}from"../providers/theme-provider.js";function M(){const{setTheme:r}=p();return n(c,{children:[e(d,{asChild:!0,children:n(m,{variant:"ghost",color:"dark",size:"icon",children:[e(i,{className:"h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),e(s,{className:"absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"}),e("span",{className:"sr-only",children:"Toggle theme"})]})}),n(h,{align:"end",children:[e(t,{onClick:o(()=>r("light"),"onClick"),children:"Clair"}),e(t,{onClick:o(()=>r("dark"),"onClick"),children:"Sombre"}),e(t,{onClick:o(()=>r("system"),"onClick"),children:"Système"})]})]})}o(M,"ModeToggle");export{M as ModeToggle};
|