fina-react-ds 1.0.3 → 1.0.5
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.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type QueryType = {
|
|
2
|
+
isPending: boolean;
|
|
3
|
+
isRefetching: boolean;
|
|
4
|
+
isError: boolean;
|
|
5
|
+
isRefetchError: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function DataLoader({ errorPlaceholder, queries, loadingText, children, }: {
|
|
8
|
+
errorPlaceholder?: React.ReactNode;
|
|
9
|
+
queries?: Array<QueryType>;
|
|
10
|
+
loadingText?: string;
|
|
11
|
+
children: React.ReactNode | (() => React.ReactNode);
|
|
12
|
+
}): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null | undefined;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var s = (i, t) => f(i, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
4
|
+
import { ScaleLoader as m } from "react-spinners";
|
|
5
|
+
import { Alert as h, AlertTitle as u } from "./alert.js";
|
|
6
|
+
function j({
|
|
7
|
+
errorPlaceholder: i,
|
|
8
|
+
queries: t,
|
|
9
|
+
loadingText: l = "Chargement",
|
|
10
|
+
children: n
|
|
11
|
+
}) {
|
|
12
|
+
const a = /* @__PURE__ */ s((e) => {
|
|
13
|
+
c || (c = e.isPending || e.isRefetching), o || (o = e.isError || e.isRefetchError);
|
|
14
|
+
}, "checkQuery");
|
|
15
|
+
let c = !1, o = !1;
|
|
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: [
|
|
17
|
+
/* @__PURE__ */ r(m, { color: "#405189" }),
|
|
18
|
+
/* @__PURE__ */ r("div", { children: l })
|
|
19
|
+
] }) }) }) : o ? i ?? /* @__PURE__ */ r(h, { color: "destructive", children: /* @__PURE__ */ r(u, { children: "Une erreur est survenue lors du chargement des données." }) }) : typeof n == "function" ? n() : n;
|
|
20
|
+
}
|
|
21
|
+
s(j, "DataLoader");
|
|
22
|
+
export {
|
|
23
|
+
j as DataLoader
|
|
24
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var t = (c, i) => m(c, "name", { value: i, configurable: !0 });
|
|
3
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { CheckIcon as h, XIcon as a } from "lucide-react";
|
|
5
|
+
const l = /* @__PURE__ */ t(({
|
|
6
|
+
password: c,
|
|
7
|
+
children: i,
|
|
8
|
+
test: n
|
|
9
|
+
}) => {
|
|
10
|
+
const r = c && n && n(c);
|
|
11
|
+
return /* @__PURE__ */ s(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: `flex flex-row items-center gap-x-2 gap-4 ${r ? "text-success" : ""}`,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "flex-none text-lg", children: r ? /* @__PURE__ */ e(h, { className: "size-4" }) : /* @__PURE__ */ e(a, { className: "size-4" }) }),
|
|
17
|
+
/* @__PURE__ */ e("div", { children: i })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}, "RuleItem");
|
|
22
|
+
function x({ password: c }) {
|
|
23
|
+
return /* @__PURE__ */ s("div", { className: "text-sm", children: [
|
|
24
|
+
/* @__PURE__ */ e("p", { className: "mb-2", children: "Votre mot de passe doit contenir :" }),
|
|
25
|
+
/* @__PURE__ */ s("ul", { children: [
|
|
26
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => i.length >= 8, "test"), children: "Au moins 8 caractères" }) }),
|
|
27
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => /[a-z]+/.test(i), "test"), children: "Au moins 1 minuscule" }) }),
|
|
28
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => /[A-Z]+/.test(i), "test"), children: "Au moins 1 majuscule" }) }),
|
|
29
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { password: c, test: /* @__PURE__ */ t((i) => /[0-9]+/.test(i), "test"), children: "Au moins 1 chiffre" }) }),
|
|
30
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
31
|
+
l,
|
|
32
|
+
{
|
|
33
|
+
password: c,
|
|
34
|
+
test: /* @__PURE__ */ t((i) => /[@_=\-$£*?./!:>%&#]+/.test(i), "test"),
|
|
35
|
+
children: "Au moins un caractère spécial : @ _ = - $ £ * ? . / ! : > % & #"
|
|
36
|
+
}
|
|
37
|
+
) })
|
|
38
|
+
] })
|
|
39
|
+
] });
|
|
40
|
+
}
|
|
41
|
+
t(x, "PasswordRulesChecker");
|
|
42
|
+
export {
|
|
43
|
+
x as PasswordRulesChecker
|
|
44
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,12 @@ export { Card, CardHeader, CardAction, CardTitle, CardDescription, CardContent,
|
|
|
8
8
|
export { Checkbox } from "./components/checkbox";
|
|
9
9
|
export { DatePicker } from "./components/date-picker";
|
|
10
10
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./components/dialog";
|
|
11
|
+
export { DataLoader } from "./components/data-loader";
|
|
11
12
|
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from "./components/dropdown-menu";
|
|
12
13
|
export { Input } from "./components/input";
|
|
13
14
|
export { Label } from "./components/label";
|
|
14
15
|
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./components/pagination";
|
|
16
|
+
export { PasswordRulesChecker } from "./components/password-rules-checker";
|
|
15
17
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, } from "./components/popover";
|
|
16
18
|
export { Select } from "./components/select";
|
|
17
19
|
export { Separator } from "./components/separator";
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { AlertDialog as r, AlertDialogAction as t, AlertDialogCancel as a, AlertDialogContent as i, AlertDialogDescription as n, AlertDialogFooter as l, AlertDialogHeader as p, AlertDialogOverlay as d, AlertDialogPortal as g, AlertDialogTitle as b, AlertDialogTrigger as S } from "./components/alert-dialog.js";
|
|
2
|
-
import { Alert as D, AlertDescription as m, AlertTitle as
|
|
2
|
+
import { Alert as D, AlertDescription as m, AlertTitle as x } from "./components/alert.js";
|
|
3
3
|
import { Badge as f } from "./components/badge.js";
|
|
4
|
-
import { Button as M, buttonVariants as
|
|
4
|
+
import { Button as M, buttonVariants as s } from "./components/button.js";
|
|
5
5
|
import { Avatar as P, AvatarFallback as c, AvatarImage as w } from "./components/avatar.js";
|
|
6
6
|
import { Calendar as v } from "./components/calendar.js";
|
|
7
|
-
import { Card as k, CardAction as B, CardContent as F, CardDescription as H, CardFooter as G, CardHeader as L, CardTitle as
|
|
7
|
+
import { Card as k, CardAction as B, CardContent as F, CardDescription as H, CardFooter as G, CardHeader as L, CardTitle as R } from "./components/card.js";
|
|
8
8
|
import { Checkbox as O } from "./components/checkbox.js";
|
|
9
9
|
import { DatePicker as N } from "./components/date-picker.js";
|
|
10
10
|
import { Dialog as j, DialogClose as q, DialogContent as z, DialogDescription as J, DialogFooter as K, DialogHeader as Q, DialogOverlay as U, DialogPortal as W, DialogTitle as X, DialogTrigger as Y } from "./components/dialog.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
11
|
+
import { DataLoader as _ } from "./components/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 le, DropdownMenuRadioItem as pe, DropdownMenuSeparator as de, DropdownMenuShortcut as ge, DropdownMenuSub as be, DropdownMenuSubContent as Se, DropdownMenuSubTrigger as ue, DropdownMenuTrigger as De } from "./components/dropdown-menu.js";
|
|
13
|
+
import { Input as xe } from "./components/input.js";
|
|
14
|
+
import { Label as fe } from "./components/label.js";
|
|
15
|
+
import { Pagination as Me, PaginationContent as se, PaginationEllipsis as Ae, PaginationItem as Pe, PaginationLink as ce, PaginationNext as we, PaginationPrevious as he } from "./components/pagination.js";
|
|
16
|
+
import { PasswordRulesChecker as Ie } from "./components/password-rules-checker.js";
|
|
17
|
+
import { Popover as Be, PopoverAnchor as Fe, PopoverContent as He, PopoverTrigger as Ge } from "./components/popover.js";
|
|
18
|
+
import { Select as Re } from "./components/select.js";
|
|
19
|
+
import { Separator as Oe } from "./components/separator.js";
|
|
20
|
+
import { Sheet as Ne, SheetBody as Ve, SheetClose as je, SheetContent as qe, SheetDescription as ze, SheetFooter as Je, SheetHeader as Ke, SheetTitle as Qe, SheetTrigger as Ue } from "./components/sheet.js";
|
|
21
|
+
import { Sidebar as Xe, SidebarContent as Ye, SidebarFooter as Ze, SidebarGroup as _e, SidebarGroupAction as $e, SidebarGroupContent as eo, SidebarGroupLabel as oo, SidebarHeader as ro, SidebarInput as to, SidebarInset as ao, SidebarMenu as io, SidebarMenuAction as no, SidebarMenuBadge as lo, SidebarMenuButton as po, SidebarMenuItem as go, SidebarMenuSkeleton as bo, SidebarMenuSub as So, SidebarMenuSubButton as uo, SidebarMenuSubItem as Do, SidebarProvider as mo, SidebarRail as xo, SidebarSeparator as To, SidebarTrigger as fo, useSidebar as Co } from "./components/sidebar.js";
|
|
22
|
+
import { SimplePagination as so } from "./components/simple-pagination.js";
|
|
23
|
+
import { SimpleTooltip as Po } from "./components/simple-tooltip.js";
|
|
24
|
+
import { Skeleton as wo } from "./components/skeleton.js";
|
|
25
|
+
import { Switch as vo } from "./components/switch.js";
|
|
26
|
+
import { Toaster as ko } from "./components/sonner.js";
|
|
27
|
+
import { Table as Fo, TableBody as Ho, TableCaption as Go, TableCell as Lo, TableFooter as Ro, TableHead as yo, TableHeader as Oo, TableRow as Eo } from "./components/table.js";
|
|
28
|
+
import { Tabs as Vo, TabsContent as jo, TabsList as qo, TabsTrigger as zo } from "./components/tabs.js";
|
|
29
|
+
import { Textarea as Ko } from "./components/textarea.js";
|
|
30
|
+
import { Tooltip as Uo, TooltipContent as Wo, TooltipProvider as Xo, TooltipTrigger as Yo } from "./components/tooltip.js";
|
|
29
31
|
export {
|
|
30
32
|
D as Alert,
|
|
31
33
|
m as AlertDescription,
|
|
@@ -40,7 +42,7 @@ export {
|
|
|
40
42
|
g as AlertDialogPortal,
|
|
41
43
|
b as AlertDialogTitle,
|
|
42
44
|
S as AlertDialogTrigger,
|
|
43
|
-
|
|
45
|
+
x as AlertTitle,
|
|
44
46
|
P as Avatar,
|
|
45
47
|
c as AvatarFallback,
|
|
46
48
|
w as AvatarImage,
|
|
@@ -53,8 +55,9 @@ export {
|
|
|
53
55
|
H as CardDescription,
|
|
54
56
|
G as CardFooter,
|
|
55
57
|
L as CardHeader,
|
|
56
|
-
|
|
58
|
+
R as CardTitle,
|
|
57
59
|
O as Checkbox,
|
|
60
|
+
_ as DataLoader,
|
|
58
61
|
N as DatePicker,
|
|
59
62
|
j as Dialog,
|
|
60
63
|
q as DialogClose,
|
|
@@ -66,90 +69,91 @@ export {
|
|
|
66
69
|
W as DialogPortal,
|
|
67
70
|
X as DialogTitle,
|
|
68
71
|
Y as DialogTrigger,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
vo as
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
72
|
+
ee as DropdownMenu,
|
|
73
|
+
oe as DropdownMenuCheckboxItem,
|
|
74
|
+
re as DropdownMenuContent,
|
|
75
|
+
te as DropdownMenuGroup,
|
|
76
|
+
ae as DropdownMenuItem,
|
|
77
|
+
ie as DropdownMenuLabel,
|
|
78
|
+
ne as DropdownMenuPortal,
|
|
79
|
+
le as DropdownMenuRadioGroup,
|
|
80
|
+
pe as DropdownMenuRadioItem,
|
|
81
|
+
de as DropdownMenuSeparator,
|
|
82
|
+
ge as DropdownMenuShortcut,
|
|
83
|
+
be as DropdownMenuSub,
|
|
84
|
+
Se as DropdownMenuSubContent,
|
|
85
|
+
ue as DropdownMenuSubTrigger,
|
|
86
|
+
De as DropdownMenuTrigger,
|
|
87
|
+
xe as Input,
|
|
88
|
+
fe as Label,
|
|
89
|
+
Me as Pagination,
|
|
90
|
+
se as PaginationContent,
|
|
91
|
+
Ae as PaginationEllipsis,
|
|
92
|
+
Pe as PaginationItem,
|
|
93
|
+
ce as PaginationLink,
|
|
94
|
+
we as PaginationNext,
|
|
95
|
+
he as PaginationPrevious,
|
|
96
|
+
Ie as PasswordRulesChecker,
|
|
97
|
+
Be as Popover,
|
|
98
|
+
Fe as PopoverAnchor,
|
|
99
|
+
He as PopoverContent,
|
|
100
|
+
Ge as PopoverTrigger,
|
|
101
|
+
Re as Select,
|
|
102
|
+
Oe as Separator,
|
|
103
|
+
Ne as Sheet,
|
|
104
|
+
Ve as SheetBody,
|
|
105
|
+
je as SheetClose,
|
|
106
|
+
qe as SheetContent,
|
|
107
|
+
ze as SheetDescription,
|
|
108
|
+
Je as SheetFooter,
|
|
109
|
+
Ke as SheetHeader,
|
|
110
|
+
Qe as SheetTitle,
|
|
111
|
+
Ue as SheetTrigger,
|
|
112
|
+
Xe as Sidebar,
|
|
113
|
+
Ye as SidebarContent,
|
|
114
|
+
Ze as SidebarFooter,
|
|
115
|
+
_e as SidebarGroup,
|
|
116
|
+
$e as SidebarGroupAction,
|
|
117
|
+
eo as SidebarGroupContent,
|
|
118
|
+
oo as SidebarGroupLabel,
|
|
119
|
+
ro as SidebarHeader,
|
|
120
|
+
to as SidebarInput,
|
|
121
|
+
ao as SidebarInset,
|
|
122
|
+
io as SidebarMenu,
|
|
123
|
+
no as SidebarMenuAction,
|
|
124
|
+
lo as SidebarMenuBadge,
|
|
125
|
+
po as SidebarMenuButton,
|
|
126
|
+
go as SidebarMenuItem,
|
|
127
|
+
bo as SidebarMenuSkeleton,
|
|
128
|
+
So as SidebarMenuSub,
|
|
129
|
+
uo as SidebarMenuSubButton,
|
|
130
|
+
Do as SidebarMenuSubItem,
|
|
131
|
+
mo as SidebarProvider,
|
|
132
|
+
xo as SidebarRail,
|
|
133
|
+
To as SidebarSeparator,
|
|
134
|
+
fo as SidebarTrigger,
|
|
135
|
+
so as SimplePagination,
|
|
136
|
+
Po as SimpleTooltip,
|
|
137
|
+
wo as Skeleton,
|
|
138
|
+
vo as Switch,
|
|
139
|
+
Fo as Table,
|
|
140
|
+
Ho as TableBody,
|
|
141
|
+
Go as TableCaption,
|
|
142
|
+
Lo as TableCell,
|
|
143
|
+
Ro as TableFooter,
|
|
144
|
+
yo as TableHead,
|
|
145
|
+
Oo as TableHeader,
|
|
146
|
+
Eo as TableRow,
|
|
147
|
+
Vo as Tabs,
|
|
148
|
+
jo as TabsContent,
|
|
149
|
+
qo as TabsList,
|
|
150
|
+
zo as TabsTrigger,
|
|
151
|
+
Ko as Textarea,
|
|
152
|
+
ko as Toaster,
|
|
153
|
+
Uo as Tooltip,
|
|
154
|
+
Wo as TooltipContent,
|
|
155
|
+
Xo as TooltipProvider,
|
|
156
|
+
Yo as TooltipTrigger,
|
|
157
|
+
s as buttonVariants,
|
|
158
|
+
Co as useSidebar
|
|
155
159
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/F1na/fina-react-ds"
|
|
6
6
|
},
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.5",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"react-day-picker": "9.7.0",
|
|
36
36
|
"react-dom": "^19.0.0",
|
|
37
37
|
"react-select": "^5.10.1",
|
|
38
|
+
"react-spinners": "^0.17.0",
|
|
38
39
|
"sonner": "^2.0.5",
|
|
39
40
|
"tailwind-merge": "^3.3.1",
|
|
40
41
|
"tailwindcss": "^4.0.0",
|