fina-react-ds 1.0.22 → 1.0.23
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.d.ts +1 -1
- package/dist/components/alert-dialog.js +65 -59
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +19 -19
- package/dist/components/badge.js +12 -11
- package/dist/components/button.js +12 -11
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +17 -17
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +60 -60
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +93 -93
- package/dist/components/form.d.ts +2 -3
- package/dist/components/form.js +2 -2
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +23 -23
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js +12 -12
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +28 -28
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +10 -10
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +73 -73
- package/dist/components/sidebar.js +73 -69
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +13 -13
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +22 -22
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +27 -27
- package/dist/index.d.ts +5 -3
- package/dist/index.js +186 -172
- package/dist/lib/http.d.ts +13 -0
- package/dist/lib/http.js +59 -0
- package/dist/lib/yup.d.ts +2 -0
- package/dist/lib/yup.js +88 -0
- package/package.json +6 -3
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -534
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -430
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -215
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -159
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -149
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -130
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +0 -80
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -258
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -51
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -34
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -76
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -265
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -133
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -230
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -21
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -149
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -192
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +0 -22
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -663
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -247
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -224
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -77
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -189
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +0 -27
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -67
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +0 -168
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -348
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -59
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -19
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -11
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -30
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -32
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -54
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -116
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -33
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -18
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -70
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -73
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -27
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -13
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -17
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -35
- package/dist/node_modules/tslib/tslib.es6.js +0 -31
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -9
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -29
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -28
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -72
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -73
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -62
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
package/dist/index.js
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import { AlertDialog as
|
|
2
|
-
import { Alert as u, AlertDescription as
|
|
1
|
+
import { AlertDialog as o, 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 x } from "./components/alert-dialog.js";
|
|
2
|
+
import { Alert as u, AlertDescription as S, AlertTitle as f } from "./components/alert.js";
|
|
3
3
|
import { Badge as T } from "./components/badge.js";
|
|
4
|
-
import { Button as s, buttonVariants as
|
|
5
|
-
import { Avatar as
|
|
6
|
-
import { Calendar as
|
|
7
|
-
import { Card as I, CardAction as H, CardContent as k, CardDescription as
|
|
4
|
+
import { Button as s, buttonVariants as c } from "./components/button.js";
|
|
5
|
+
import { Avatar as M, AvatarFallback as A, AvatarImage as P } from "./components/avatar.js";
|
|
6
|
+
import { Calendar as w } from "./components/calendar.js";
|
|
7
|
+
import { Card as I, CardAction as H, CardContent as k, CardDescription as y, CardFooter as B, CardHeader as L, CardTitle as G } from "./components/card.js";
|
|
8
8
|
import { Checkbox as E } from "./components/checkbox.js";
|
|
9
9
|
import { DatePicker as N } from "./components/date-picker.js";
|
|
10
|
-
import { Dialog as
|
|
10
|
+
import { Dialog as j, DialogClose as q, DialogContent as z, DialogDescription as V, DialogFooter as J, DialogHeader as K, DialogOverlay as Q, DialogPortal as W, DialogTitle as X, DialogTrigger as Y } from "./components/dialog.js";
|
|
11
11
|
import { DataLoader as _ } from "./components/data-loader.js";
|
|
12
|
-
import { DropdownMenu as
|
|
13
|
-
import { FileUploader as
|
|
14
|
-
import { HoverCard as
|
|
15
|
-
import { Input as
|
|
16
|
-
import { Label as
|
|
17
|
-
import { ModeToggle as
|
|
18
|
-
import { Pagination as
|
|
19
|
-
import { PasswordRulesChecker as
|
|
20
|
-
import { Popover as
|
|
21
|
-
import { Select as
|
|
22
|
-
import { Separator as
|
|
23
|
-
import { Sheet as
|
|
24
|
-
import { Sidebar as
|
|
25
|
-
import { SimplePagination as
|
|
26
|
-
import { SimpleTooltip as
|
|
27
|
-
import { Skeleton as
|
|
28
|
-
import { Switch as
|
|
29
|
-
import { Toaster as
|
|
30
|
-
import { Table as
|
|
31
|
-
import { Tabs as
|
|
32
|
-
import { Textarea as
|
|
33
|
-
import { Tooltip as
|
|
34
|
-
import { FormDate as
|
|
35
|
-
import { FormColorPicker as
|
|
36
|
-
import { FormFileUploader as
|
|
37
|
-
import { FormInput as
|
|
38
|
-
import { FormSelect as
|
|
39
|
-
import { FormSwitch as
|
|
40
|
-
import { FormTextarea as
|
|
41
|
-
import { Form as
|
|
42
|
-
import { ThemeProvider as
|
|
43
|
-
import { LoaderProvider as
|
|
44
|
-
import { formatDate as
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
12
|
+
import { DropdownMenu as rr, DropdownMenuCheckboxItem as er, DropdownMenuContent as or, DropdownMenuGroup as tr, DropdownMenuItem as ar, DropdownMenuLabel as ir, DropdownMenuPortal as nr, DropdownMenuRadioGroup as pr, DropdownMenuRadioItem as lr, DropdownMenuSeparator as dr, DropdownMenuShortcut as mr, DropdownMenuSub as gr, DropdownMenuSubContent as xr, DropdownMenuSubTrigger as br, DropdownMenuTrigger as ur } from "./components/dropdown-menu.js";
|
|
13
|
+
import { FileUploader as fr } from "./components/file-uploader.js";
|
|
14
|
+
import { HoverCard as Tr, HoverCardContent as Cr, HoverCardTrigger as sr } from "./components/hover-card.js";
|
|
15
|
+
import { Input as Fr } from "./components/input.js";
|
|
16
|
+
import { Label as Ar } from "./components/label.js";
|
|
17
|
+
import { ModeToggle as hr } from "./components/mode-toggle.js";
|
|
18
|
+
import { Pagination as vr, PaginationContent as Ir, PaginationEllipsis as Hr, PaginationItem as kr, PaginationLink as yr, PaginationNext as Br, PaginationPrevious as Lr } from "./components/pagination.js";
|
|
19
|
+
import { PasswordRulesChecker as Rr } from "./components/password-rules-checker.js";
|
|
20
|
+
import { Popover as Or, PopoverAnchor as Nr, PopoverContent as Ur, PopoverTrigger as jr } from "./components/popover.js";
|
|
21
|
+
import { Select as zr } from "./components/select.js";
|
|
22
|
+
import { Separator as Jr } from "./components/separator.js";
|
|
23
|
+
import { Sheet as Qr, SheetBody as Wr, SheetClose as Xr, SheetContent as Yr, SheetDescription as Zr, SheetFooter as _r, SheetHeader as $r, SheetTitle as re, SheetTrigger as ee } from "./components/sheet.js";
|
|
24
|
+
import { Sidebar as te, SidebarContent as ae, SidebarFooter as ie, SidebarGroup as ne, SidebarGroupAction as pe, SidebarGroupContent as le, SidebarGroupLabel as de, SidebarHeader as me, SidebarInput as ge, SidebarInset as xe, SidebarMenu as be, SidebarMenuAction as ue, SidebarMenuBadge as Se, SidebarMenuButton as fe, SidebarMenuItem as De, SidebarMenuSkeleton as Te, SidebarMenuSub as Ce, SidebarMenuSubButton as se, SidebarMenuSubItem as ce, SidebarProvider as Fe, SidebarRail as Me, SidebarSeparator as Ae, SidebarTrigger as Pe, useSidebar as he } from "./components/sidebar.js";
|
|
25
|
+
import { SimplePagination as ve } from "./components/simple-pagination.js";
|
|
26
|
+
import { SimpleTooltip as He } from "./components/simple-tooltip.js";
|
|
27
|
+
import { Skeleton as ye } from "./components/skeleton.js";
|
|
28
|
+
import { Switch as Le } from "./components/switch.js";
|
|
29
|
+
import { Toaster as Re } from "./components/sonner.js";
|
|
30
|
+
import { Table as Oe, TableBody as Ne, TableCaption as Ue, TableCell as je, TableFooter as qe, TableHead as ze, TableHeader as Ve, TableRow as Je } from "./components/table.js";
|
|
31
|
+
import { Tabs as Qe, TabsContent as We, TabsList as Xe, TabsTrigger as Ye } from "./components/tabs.js";
|
|
32
|
+
import { Textarea as _e } from "./components/textarea.js";
|
|
33
|
+
import { Tooltip as ro, TooltipContent as eo, TooltipProvider as oo, TooltipTrigger as to } from "./components/tooltip.js";
|
|
34
|
+
import { FormDate as io } from "./components/form-date.js";
|
|
35
|
+
import { FormColorPicker as po } from "./components/form-color-picker.js";
|
|
36
|
+
import { FormFileUploader as mo } from "./components/form-file-uploader.js";
|
|
37
|
+
import { FormInput as xo } from "./components/form-input.js";
|
|
38
|
+
import { FormSelect as uo } from "./components/form-select.js";
|
|
39
|
+
import { FormSwitch as fo } from "./components/form-switch.js";
|
|
40
|
+
import { FormTextarea as To } from "./components/form-textarea.js";
|
|
41
|
+
import { Form as so, FormControl as co, FormDescription as Fo, FormField as Mo, FormItem as Ao, FormLabel as Po, FormMessage as ho, useFormField as wo } from "./components/form.js";
|
|
42
|
+
import { ThemeProvider as Io, useTheme as Ho } from "./providers/theme-provider.js";
|
|
43
|
+
import { LoaderProvider as yo, useLoader as Bo } from "./providers/loader-provider.js";
|
|
44
|
+
import { formatDate as Go } from "./lib/dates.js";
|
|
45
|
+
import { requestApi as Eo } from "./lib/http.js";
|
|
46
|
+
import { isNullOrEmptyString as No } from "./lib/strings.js";
|
|
47
|
+
import { orderBy as jo, orderByText as qo } from "./lib/arrays.js";
|
|
48
|
+
import { apiErrorDescription as Vo, cn as Jo, manageApiFormErrors as Ko } from "./lib/utils.js";
|
|
49
|
+
import { addMethod as Wo, array as Xo, boolean as Yo, date as Zo, lazy as _o, mixed as $o, number as rt, object as et, reach as ot, ref as tt, string as at } from "./lib/yup.js";
|
|
48
50
|
export {
|
|
49
51
|
u as Alert,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
S as AlertDescription,
|
|
53
|
+
o as AlertDialog,
|
|
52
54
|
t as AlertDialogAction,
|
|
53
55
|
a as AlertDialogCancel,
|
|
54
56
|
i as AlertDialogContent,
|
|
@@ -60,148 +62,160 @@ export {
|
|
|
60
62
|
g as AlertDialogTitle,
|
|
61
63
|
x as AlertDialogTrigger,
|
|
62
64
|
f as AlertTitle,
|
|
63
|
-
|
|
65
|
+
M as Avatar,
|
|
64
66
|
A as AvatarFallback,
|
|
65
67
|
P as AvatarImage,
|
|
66
68
|
T as Badge,
|
|
67
69
|
s as Button,
|
|
68
|
-
|
|
70
|
+
w as Calendar,
|
|
69
71
|
I as Card,
|
|
70
72
|
H as CardAction,
|
|
71
73
|
k as CardContent,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
y as CardDescription,
|
|
75
|
+
B as CardFooter,
|
|
76
|
+
L as CardHeader,
|
|
75
77
|
G as CardTitle,
|
|
76
78
|
E as Checkbox,
|
|
77
79
|
_ as DataLoader,
|
|
78
80
|
N as DatePicker,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
j as Dialog,
|
|
82
|
+
q as DialogClose,
|
|
83
|
+
z as DialogContent,
|
|
84
|
+
V as DialogDescription,
|
|
83
85
|
J as DialogFooter,
|
|
84
86
|
K as DialogHeader,
|
|
85
87
|
Q as DialogOverlay,
|
|
86
88
|
W as DialogPortal,
|
|
87
89
|
X as DialogTitle,
|
|
88
90
|
Y as DialogTrigger,
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
91
|
+
rr as DropdownMenu,
|
|
92
|
+
er as DropdownMenuCheckboxItem,
|
|
93
|
+
or as DropdownMenuContent,
|
|
94
|
+
tr as DropdownMenuGroup,
|
|
95
|
+
ar as DropdownMenuItem,
|
|
96
|
+
ir as DropdownMenuLabel,
|
|
97
|
+
nr as DropdownMenuPortal,
|
|
98
|
+
pr as DropdownMenuRadioGroup,
|
|
99
|
+
lr as DropdownMenuRadioItem,
|
|
100
|
+
dr as DropdownMenuSeparator,
|
|
101
|
+
mr as DropdownMenuShortcut,
|
|
102
|
+
gr as DropdownMenuSub,
|
|
103
|
+
xr as DropdownMenuSubContent,
|
|
104
|
+
br as DropdownMenuSubTrigger,
|
|
105
|
+
ur as DropdownMenuTrigger,
|
|
106
|
+
fr as FileUploader,
|
|
107
|
+
so as Form,
|
|
108
|
+
po as FormColorPicker,
|
|
109
|
+
co as FormControl,
|
|
110
|
+
io as FormDate,
|
|
111
|
+
Fo as FormDescription,
|
|
112
|
+
Mo as FormField,
|
|
113
|
+
mo as FormFileUploader,
|
|
114
|
+
xo as FormInput,
|
|
115
|
+
Ao as FormItem,
|
|
116
|
+
Po as FormLabel,
|
|
117
|
+
ho as FormMessage,
|
|
118
|
+
uo as FormSelect,
|
|
119
|
+
fo as FormSwitch,
|
|
120
|
+
To as FormTextarea,
|
|
121
|
+
Tr as HoverCard,
|
|
122
|
+
Cr as HoverCardContent,
|
|
123
|
+
sr as HoverCardTrigger,
|
|
124
|
+
Fr as Input,
|
|
125
|
+
Ar as Label,
|
|
126
|
+
yo as LoaderProvider,
|
|
127
|
+
hr as ModeToggle,
|
|
128
|
+
vr as Pagination,
|
|
129
|
+
Ir as PaginationContent,
|
|
130
|
+
Hr as PaginationEllipsis,
|
|
131
|
+
kr as PaginationItem,
|
|
132
|
+
yr as PaginationLink,
|
|
133
|
+
Br as PaginationNext,
|
|
134
|
+
Lr as PaginationPrevious,
|
|
135
|
+
Rr as PasswordRulesChecker,
|
|
136
|
+
Or as Popover,
|
|
137
|
+
Nr as PopoverAnchor,
|
|
138
|
+
Ur as PopoverContent,
|
|
139
|
+
jr as PopoverTrigger,
|
|
140
|
+
zr as Select,
|
|
141
|
+
Jr as Separator,
|
|
142
|
+
Qr as Sheet,
|
|
143
|
+
Wr as SheetBody,
|
|
144
|
+
Xr as SheetClose,
|
|
145
|
+
Yr as SheetContent,
|
|
146
|
+
Zr as SheetDescription,
|
|
147
|
+
_r as SheetFooter,
|
|
148
|
+
$r as SheetHeader,
|
|
149
|
+
re as SheetTitle,
|
|
150
|
+
ee as SheetTrigger,
|
|
151
|
+
te as Sidebar,
|
|
152
|
+
ae as SidebarContent,
|
|
153
|
+
ie as SidebarFooter,
|
|
154
|
+
ne as SidebarGroup,
|
|
155
|
+
pe as SidebarGroupAction,
|
|
156
|
+
le as SidebarGroupContent,
|
|
157
|
+
de as SidebarGroupLabel,
|
|
158
|
+
me as SidebarHeader,
|
|
159
|
+
ge as SidebarInput,
|
|
160
|
+
xe as SidebarInset,
|
|
161
|
+
be as SidebarMenu,
|
|
162
|
+
ue as SidebarMenuAction,
|
|
163
|
+
Se as SidebarMenuBadge,
|
|
164
|
+
fe as SidebarMenuButton,
|
|
165
|
+
De as SidebarMenuItem,
|
|
166
|
+
Te as SidebarMenuSkeleton,
|
|
167
|
+
Ce as SidebarMenuSub,
|
|
168
|
+
se as SidebarMenuSubButton,
|
|
169
|
+
ce as SidebarMenuSubItem,
|
|
170
|
+
Fe as SidebarProvider,
|
|
171
|
+
Me as SidebarRail,
|
|
172
|
+
Ae as SidebarSeparator,
|
|
173
|
+
Pe as SidebarTrigger,
|
|
174
|
+
ve as SimplePagination,
|
|
175
|
+
He as SimpleTooltip,
|
|
176
|
+
ye as Skeleton,
|
|
177
|
+
Le as Switch,
|
|
178
|
+
Oe as Table,
|
|
179
|
+
Ne as TableBody,
|
|
180
|
+
Ue as TableCaption,
|
|
181
|
+
je as TableCell,
|
|
182
|
+
qe as TableFooter,
|
|
183
|
+
ze as TableHead,
|
|
184
|
+
Ve as TableHeader,
|
|
185
|
+
Je as TableRow,
|
|
186
|
+
Qe as Tabs,
|
|
187
|
+
We as TabsContent,
|
|
188
|
+
Xe as TabsList,
|
|
189
|
+
Ye as TabsTrigger,
|
|
190
|
+
_e as Textarea,
|
|
191
|
+
Io as ThemeProvider,
|
|
192
|
+
Re as Toaster,
|
|
193
|
+
ro as Tooltip,
|
|
194
|
+
eo as TooltipContent,
|
|
195
|
+
oo as TooltipProvider,
|
|
196
|
+
to as TooltipTrigger,
|
|
197
|
+
Wo as addMethod,
|
|
198
|
+
Vo as apiErrorDescription,
|
|
199
|
+
Xo as array,
|
|
200
|
+
Yo as boolean,
|
|
201
|
+
c as buttonVariants,
|
|
202
|
+
Jo as cn,
|
|
203
|
+
Zo as date,
|
|
204
|
+
Go as formatDate,
|
|
205
|
+
No as isNullOrEmptyString,
|
|
206
|
+
_o as lazy,
|
|
207
|
+
Ko as manageApiFormErrors,
|
|
208
|
+
$o as mixed,
|
|
209
|
+
rt as number,
|
|
210
|
+
et as object,
|
|
211
|
+
jo as orderBy,
|
|
212
|
+
qo as orderByText,
|
|
213
|
+
ot as reach,
|
|
214
|
+
tt as ref,
|
|
215
|
+
Eo as requestApi,
|
|
216
|
+
at as string,
|
|
217
|
+
wo as useFormField,
|
|
218
|
+
Bo as useLoader,
|
|
219
|
+
he as useSidebar,
|
|
220
|
+
Ho as useTheme
|
|
207
221
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Makes a HTTP request to the API.
|
|
3
|
+
* @param {"GET" | "POST" | "PUT" | "PATCH" | "DELETE"} method - The HTTP method
|
|
4
|
+
* @param {string} route - The route to call (do not include any prefixes, host or port)
|
|
5
|
+
* @param {Object} queryParams - The query params to add to the URL
|
|
6
|
+
* @param {(FormData | Object)} body - The request's body
|
|
7
|
+
* @param {Object} headers - Additional headers to include in the request
|
|
8
|
+
* @param {boolean} isMultipart - Indicates if the request should be multipart/form-data.
|
|
9
|
+
* @returns {Promise<Object>} The response from the API.
|
|
10
|
+
* @throws {ApiClientError} If the request fails, an error object with the status code, raw response, and a message is returned.
|
|
11
|
+
*/
|
|
12
|
+
declare const requestApi: (method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", route: string, queryParams?: object | null, body?: FormData | object | null, headers?: object | null, isMultipart?: boolean) => Promise<any>;
|
|
13
|
+
export { requestApi };
|
package/dist/lib/http.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var s = (t, r) => p(t, "name", { value: r, configurable: !0 });
|
|
3
|
+
import m from "qs";
|
|
4
|
+
import { joinURL as j } from "ufo";
|
|
5
|
+
const h = /* @__PURE__ */ s((t) => t != null, "valueExists"), d = /* @__PURE__ */ s((t, r) => {
|
|
6
|
+
if (t) {
|
|
7
|
+
if (t instanceof FormData)
|
|
8
|
+
return t;
|
|
9
|
+
if (r) {
|
|
10
|
+
const e = new FormData();
|
|
11
|
+
for (const a in t)
|
|
12
|
+
Object.keys(t).forEach((n) => {
|
|
13
|
+
if (Array.isArray(t[n]))
|
|
14
|
+
for (const o of t[n])
|
|
15
|
+
e.append(`${a}[]`, o || "");
|
|
16
|
+
else
|
|
17
|
+
e.append(a, h(t[n]) ? t[n] : "");
|
|
18
|
+
});
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
return JSON.stringify(t);
|
|
22
|
+
}
|
|
23
|
+
}, "formatBodyForRequest"), g = /* @__PURE__ */ s((t, r = null) => {
|
|
24
|
+
let e = j(void 0, t);
|
|
25
|
+
return r && (e += `?${m.stringify(r, { encode: !1 })}`), e;
|
|
26
|
+
}, "formatUrlForRequest"), A = /* @__PURE__ */ s(async (t, r, e = null, a = null, n = null, o = !1) => {
|
|
27
|
+
const u = new Headers({
|
|
28
|
+
Accept: "application/json",
|
|
29
|
+
...n
|
|
30
|
+
});
|
|
31
|
+
!o && !(a instanceof FormData) && u.append("Content-Type", "application/json");
|
|
32
|
+
const c = {
|
|
33
|
+
method: t,
|
|
34
|
+
headers: u,
|
|
35
|
+
body: d(a, o)
|
|
36
|
+
};
|
|
37
|
+
let i = null;
|
|
38
|
+
const l = await fetch(
|
|
39
|
+
g(r, e),
|
|
40
|
+
c
|
|
41
|
+
).catch((f) => (i = f, null));
|
|
42
|
+
return i ? Promise.reject(i) : w(l);
|
|
43
|
+
}, "requestApi"), w = /* @__PURE__ */ s(async (t) => {
|
|
44
|
+
if (t.status === 204)
|
|
45
|
+
return Promise.resolve(null);
|
|
46
|
+
const r = await (t.headers.get("Content-Type") === "application/json" ? t.json() : t.blob()).catch(() => "Response parsing error");
|
|
47
|
+
return t.status >= 200 && t.status < 300 ? Promise.resolve(r) : t.status >= 400 && t.status <= 500 ? Promise.reject({
|
|
48
|
+
status: t.status,
|
|
49
|
+
raw: r,
|
|
50
|
+
message: r
|
|
51
|
+
}) : Promise.reject({
|
|
52
|
+
status: t.status,
|
|
53
|
+
raw: "",
|
|
54
|
+
message: ""
|
|
55
|
+
});
|
|
56
|
+
}, "handleResponse");
|
|
57
|
+
export {
|
|
58
|
+
A as requestApi
|
|
59
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as yup from "yup";
|
|
2
|
+
export declare const string: typeof yup.string, number: typeof yup.number, boolean: typeof yup.bool, date: typeof yup.date, array: typeof yup.array, object: typeof yup.object, mixed: typeof yup.mixed, ref: typeof yup.ref, lazy: typeof yup.lazy, reach: typeof yup.reach, addMethod: typeof yup.addMethod;
|
package/dist/lib/yup.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var t = (e, i) => r(e, "name", { value: i, configurable: !0 });
|
|
3
|
+
import * as a from "yup";
|
|
4
|
+
a.setLocale({
|
|
5
|
+
mixed: {
|
|
6
|
+
default: "Ce champ est invalide",
|
|
7
|
+
required: "Ce champ est obligatoire",
|
|
8
|
+
defined: "Ce champ doit être défini",
|
|
9
|
+
notNull: "Ce champ ne doit pas être nul",
|
|
10
|
+
oneOf: "Ce champ doit être l’un des suivants : ${values}",
|
|
11
|
+
notOneOf: "Ce champ ne doit pas être l’un des suivants : ${values}",
|
|
12
|
+
notType: /* @__PURE__ */ t(({ type: e }) => {
|
|
13
|
+
switch (e) {
|
|
14
|
+
case "array":
|
|
15
|
+
return "Ce champ doit être un tableau";
|
|
16
|
+
case "date":
|
|
17
|
+
return "Ce champ doit être un date";
|
|
18
|
+
case "number":
|
|
19
|
+
return "Ce champ doit être un nombre";
|
|
20
|
+
case "object":
|
|
21
|
+
return "Ce champ doit être un object";
|
|
22
|
+
case "string":
|
|
23
|
+
return "Ce champ doit être une chaîne de caractères";
|
|
24
|
+
case "boolean":
|
|
25
|
+
return "Ce champ doit être un booléen";
|
|
26
|
+
default:
|
|
27
|
+
return "Type invalide";
|
|
28
|
+
}
|
|
29
|
+
}, "notType")
|
|
30
|
+
},
|
|
31
|
+
string: {
|
|
32
|
+
length: "Ce champ doit contenir exactement ${length} caractères",
|
|
33
|
+
min: "Ce champ doit contenir au minimum ${min} caractères",
|
|
34
|
+
max: "Ce champ doit contenir au maximum ${max} caractères",
|
|
35
|
+
matches: "Ce champ doit correspondre au format requis",
|
|
36
|
+
email: "Veuillez saisir une adresse email valide",
|
|
37
|
+
url: "Veuillez saisir une URL valide",
|
|
38
|
+
uuid: "Veuillez saisir un UUID valide",
|
|
39
|
+
datetime: "Veuillez saisir une date et heure valide",
|
|
40
|
+
trim: "Ce champ ne doit pas contenir d’espaces vides",
|
|
41
|
+
lowercase: "Ce champ doit être en minuscules",
|
|
42
|
+
uppercase: "Ce champ doit être en majuscules"
|
|
43
|
+
},
|
|
44
|
+
number: {
|
|
45
|
+
min: "Ce champ doit être supérieur ou égal à ${min}",
|
|
46
|
+
max: "Ce champ doit être inférieur ou égal à ${max}",
|
|
47
|
+
lessThan: "Ce champ doit être inférieur à ${less}",
|
|
48
|
+
moreThan: "Ce champ doit être supérieur à ${more}",
|
|
49
|
+
positive: "Ce champ doit être un nombre positif",
|
|
50
|
+
negative: "Ce champ doit être un nombre négatif",
|
|
51
|
+
integer: "Ce champ doit être un nombre entier"
|
|
52
|
+
},
|
|
53
|
+
date: {
|
|
54
|
+
min: "Cette date doit être postérieure au ${min}",
|
|
55
|
+
max: "Cette date doit être antérieure au ${max}"
|
|
56
|
+
},
|
|
57
|
+
array: {
|
|
58
|
+
min: "Ce champ doit contenir au minimum ${min} éléments",
|
|
59
|
+
max: "Ce champ doit contenir au maximum ${max} éléments",
|
|
60
|
+
length: "Ce champ doit contenir exactement ${length} éléments"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const {
|
|
64
|
+
string: m,
|
|
65
|
+
number: o,
|
|
66
|
+
boolean: u,
|
|
67
|
+
date: c,
|
|
68
|
+
array: s,
|
|
69
|
+
object: d,
|
|
70
|
+
mixed: l,
|
|
71
|
+
ref: p,
|
|
72
|
+
lazy: h,
|
|
73
|
+
reach: C,
|
|
74
|
+
addMethod: b
|
|
75
|
+
} = a;
|
|
76
|
+
export {
|
|
77
|
+
b as addMethod,
|
|
78
|
+
s as array,
|
|
79
|
+
u as boolean,
|
|
80
|
+
c as date,
|
|
81
|
+
h as lazy,
|
|
82
|
+
l as mixed,
|
|
83
|
+
o as number,
|
|
84
|
+
d as object,
|
|
85
|
+
C as reach,
|
|
86
|
+
p as ref,
|
|
87
|
+
m as string
|
|
88
|
+
};
|
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.23",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"date-fns": "^4.0.0",
|
|
28
28
|
"lucide-react": "^0.525.0",
|
|
29
29
|
"next-themes": "^0.4.6",
|
|
30
|
+
"qs": "^6.14.0",
|
|
30
31
|
"radix-ui": "^1.4.2",
|
|
31
32
|
"react-colorful": "^5.6.1",
|
|
32
33
|
"react-day-picker": "9.7.0",
|
|
@@ -35,13 +36,16 @@
|
|
|
35
36
|
"react-spinners": "^0.17.0",
|
|
36
37
|
"sonner": "^2.0.5",
|
|
37
38
|
"tailwind-merge": "^3.3.1",
|
|
38
|
-
"tw-animate-css": "^1.3.5"
|
|
39
|
+
"tw-animate-css": "^1.3.5",
|
|
40
|
+
"ufo": "^1.6.1",
|
|
41
|
+
"yup": "^1.6.1"
|
|
39
42
|
},
|
|
40
43
|
"devDependencies": {
|
|
41
44
|
"@eslint/js": "^9.29.0",
|
|
42
45
|
"@tailwindcss/cli": "^4.1.11",
|
|
43
46
|
"@tailwindcss/vite": "^4.1.11",
|
|
44
47
|
"@types/node": "^22.15.32",
|
|
48
|
+
"@types/qs": "^6.14.0",
|
|
45
49
|
"@types/react": "^19.1.8",
|
|
46
50
|
"@types/react-dom": "^19.1.6",
|
|
47
51
|
"@vitejs/plugin-react-swc": "^3.10.2",
|
|
@@ -70,7 +74,6 @@
|
|
|
70
74
|
"clsx": "^2.1.1",
|
|
71
75
|
"date-fns": "^4.0.0",
|
|
72
76
|
"next-themes": "^0.4.6",
|
|
73
|
-
"radix-ui": "^1.4.2",
|
|
74
77
|
"react": "^19.1.0",
|
|
75
78
|
"react-colorful": "^5.6.1",
|
|
76
79
|
"react-day-picker": "9.7.0",
|
package/dist/_virtual/index.js
DELETED
package/dist/_virtual/index2.js
DELETED