fina-react-ds 1.0.38 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/calendar.js +11 -12
- package/dist/components/data-loader.js +1 -1
- package/dist/components/date-picker.js +28 -28
- package/dist/components/file-uploader.js +46 -47
- package/dist/components/form.js +14 -14
- package/dist/components/html-input.d.ts +1 -0
- package/dist/components/image-uploader.js +53 -54
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.js +200 -0
- package/dist/components/select.js +39 -39
- package/dist/components/sidebar.js +49 -49
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +4 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/index.js +27 -0
- package/package.json +49 -36
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -12
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -21
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -36
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -18
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +0 -72
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +0 -33
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +0 -13
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +0 -123
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +0 -112
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +0 -21
- package/dist/themes/base.css +0 -3396
|
@@ -0,0 +1,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";
|
|
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,53 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
options:
|
|
8
|
-
placeholder:
|
|
9
|
-
onChange:
|
|
10
|
-
value:
|
|
11
|
-
...
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var e = (n, o) => c(n, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
4
|
+
import m from "clsx";
|
|
5
|
+
import g from "react-select";
|
|
6
|
+
function h({
|
|
7
|
+
options: n,
|
|
8
|
+
placeholder: o = "Sélectionner",
|
|
9
|
+
onChange: i,
|
|
10
|
+
value: a,
|
|
11
|
+
...d
|
|
12
12
|
}) {
|
|
13
|
-
const
|
|
14
|
-
Array.isArray(
|
|
15
|
-
|
|
16
|
-
) :
|
|
17
|
-
}, "handleChange"),
|
|
18
|
-
const
|
|
19
|
-
|
|
13
|
+
const l = /* @__PURE__ */ e((r) => {
|
|
14
|
+
Array.isArray(r) ? i?.(
|
|
15
|
+
r.map((t) => t.value)
|
|
16
|
+
) : i?.(r === null ? null : r.value);
|
|
17
|
+
}, "handleChange"), u = /* @__PURE__ */ e(() => d.isMulti ? Array.isArray(a) ? n?.filter((r) => a.includes(r.value)) ?? [] : [] : n.find((r) => r.value === a) ?? null, "getSelectedOptions"), s = /* @__PURE__ */ e((r) => {
|
|
18
|
+
const t = r.relatedTarget;
|
|
19
|
+
t && (t.tagName === "A" || t.tagName === "BUTTON" || t.tagName === "TEXTAREA" || t.tagName === "INPUT") && t.focus();
|
|
20
20
|
}, "onBlurWorkaround");
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
21
|
+
return /* @__PURE__ */ p(
|
|
22
|
+
g,
|
|
23
23
|
{
|
|
24
|
-
...
|
|
25
|
-
options:
|
|
26
|
-
onChange:
|
|
27
|
-
value:
|
|
24
|
+
...d,
|
|
25
|
+
options: n,
|
|
26
|
+
onChange: l,
|
|
27
|
+
value: u(),
|
|
28
28
|
classNames: {
|
|
29
|
-
control: /* @__PURE__ */
|
|
30
|
-
menu: /* @__PURE__ */
|
|
31
|
-
menuList: /* @__PURE__ */
|
|
32
|
-
option: /* @__PURE__ */
|
|
29
|
+
control: /* @__PURE__ */ e(() => "px-3 py-1 border bg-input rounded-md text-base md:text-sm min-h-9! shadow-none border-input-border has-[:focus]:border-ring has-[:focus]:ring-[3px] ring-ring/50 has-aria-invalid:border-destructive! has-aria-invalid:ring-destructive/20! has-aria-invalid:dark:ring-destructive/40!", "control"),
|
|
30
|
+
menu: /* @__PURE__ */ e(() => "bg-popover border rounded-md py-0 overflow-hidden shadow-md mt-2", "menu"),
|
|
31
|
+
menuList: /* @__PURE__ */ e(() => "py-0 bg-popover", "menuList"),
|
|
32
|
+
option: /* @__PURE__ */ e((r) => m(
|
|
33
33
|
"py-1 px-2 text-popover-foreground text-base md:text-sm!",
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
r.isSelected && "bg-input-accent!",
|
|
35
|
+
r.isFocused && "bg-input-accent/50"
|
|
36
36
|
), "option"),
|
|
37
|
-
placeholder: /* @__PURE__ */
|
|
38
|
-
multiValue: /* @__PURE__ */
|
|
39
|
-
multiValueRemove: /* @__PURE__ */
|
|
40
|
-
dropdownIndicator: /* @__PURE__ */
|
|
41
|
-
clearIndicator: /* @__PURE__ */
|
|
42
|
-
noOptionsMessage: /* @__PURE__ */
|
|
37
|
+
placeholder: /* @__PURE__ */ e(() => "text-placeholder", "placeholder"),
|
|
38
|
+
multiValue: /* @__PURE__ */ e(() => "bg-input-accent text-input-accent-foreground mr-1 px-1 py-0.5 rounded-md flex items-center", "multiValue"),
|
|
39
|
+
multiValueRemove: /* @__PURE__ */ e(() => "cursor-pointer", "multiValueRemove"),
|
|
40
|
+
dropdownIndicator: /* @__PURE__ */ e(() => "text-placeholder cursor-pointer", "dropdownIndicator"),
|
|
41
|
+
clearIndicator: /* @__PURE__ */ e(() => "text-placeholder cursor-pointer", "clearIndicator"),
|
|
42
|
+
noOptionsMessage: /* @__PURE__ */ e(() => "py-2", "noOptionsMessage")
|
|
43
43
|
},
|
|
44
44
|
onBlur: s,
|
|
45
|
-
placeholder:
|
|
45
|
+
placeholder: o,
|
|
46
46
|
unstyled: !0
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
e(h, "Select");
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
h as Select
|
|
53
53
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var r = (a, e) =>
|
|
1
|
+
var z = Object.defineProperty;
|
|
2
|
+
var r = (a, e) => z(a, "name", { value: e, configurable: !0 });
|
|
3
3
|
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
4
|
-
import * as
|
|
5
|
-
import { cva as
|
|
4
|
+
import * as u from "react";
|
|
5
|
+
import { cva as I } from "class-variance-authority";
|
|
6
6
|
import { PanelLeftIcon as E } from "lucide-react";
|
|
7
7
|
import { Slot as v } from "radix-ui";
|
|
8
8
|
import { useIsMobile as D } from "../hooks/use-mobile.js";
|
|
@@ -11,17 +11,17 @@ import { Button as R } from "./button.js";
|
|
|
11
11
|
import { Input as T } from "./input.js";
|
|
12
12
|
import { Separator as B } from "./separator.js";
|
|
13
13
|
import { Sheet as A, SheetContent as O, SheetHeader as H, SheetTitle as K, SheetDescription as j } from "./sheet.js";
|
|
14
|
-
import { Skeleton as
|
|
14
|
+
import { Skeleton as k } from "./skeleton.js";
|
|
15
15
|
import { Tooltip as G, TooltipTrigger as L, TooltipContent as $, TooltipProvider as P } from "./tooltip.js";
|
|
16
|
-
const V = "sidebar_state", W =
|
|
16
|
+
const V = "sidebar_state", W = 3600 * 24 * 7, q = "16rem", F = "18rem", U = "3rem", X = "b", _ = u.createContext(null);
|
|
17
17
|
function N() {
|
|
18
|
-
const a =
|
|
18
|
+
const a = u.useContext(_);
|
|
19
19
|
if (!a)
|
|
20
20
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
21
21
|
return a;
|
|
22
22
|
}
|
|
23
23
|
r(N, "useSidebar");
|
|
24
|
-
function
|
|
24
|
+
function ce({
|
|
25
25
|
defaultOpen: a = !0,
|
|
26
26
|
open: e,
|
|
27
27
|
onOpenChange: n,
|
|
@@ -30,32 +30,32 @@ function ue({
|
|
|
30
30
|
children: l,
|
|
31
31
|
...m
|
|
32
32
|
}) {
|
|
33
|
-
const
|
|
33
|
+
const c = D(), [p, b] = u.useState(!1), [x, M] = u.useState(a), h = e ?? x, w = u.useCallback(
|
|
34
34
|
(s) => {
|
|
35
35
|
const f = typeof s == "function" ? s(h) : s;
|
|
36
|
-
n ? n(f) :
|
|
36
|
+
n ? n(f) : M(f), document.cookie = `${V}=${f}; path=/; max-age=${W}`;
|
|
37
37
|
},
|
|
38
38
|
[n, h]
|
|
39
|
-
), S =
|
|
40
|
-
|
|
39
|
+
), S = u.useCallback(() => c ? b((s) => !s) : w((s) => !s), [c, w, b]);
|
|
40
|
+
u.useEffect(() => {
|
|
41
41
|
const s = /* @__PURE__ */ r((f) => {
|
|
42
42
|
f.key === X && (f.metaKey || f.ctrlKey) && (f.preventDefault(), S());
|
|
43
43
|
}, "handleKeyDown");
|
|
44
44
|
return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
|
|
45
45
|
}, [S]);
|
|
46
|
-
const y = h ? "expanded" : "collapsed",
|
|
46
|
+
const y = h ? "expanded" : "collapsed", C = u.useMemo(
|
|
47
47
|
() => ({
|
|
48
48
|
state: y,
|
|
49
49
|
open: h,
|
|
50
50
|
setOpen: w,
|
|
51
|
-
isMobile:
|
|
51
|
+
isMobile: c,
|
|
52
52
|
openMobile: p,
|
|
53
53
|
setOpenMobile: b,
|
|
54
54
|
toggleSidebar: S
|
|
55
55
|
}),
|
|
56
|
-
[y, h, w,
|
|
56
|
+
[y, h, w, c, p, b, S]
|
|
57
57
|
);
|
|
58
|
-
return /* @__PURE__ */ t(
|
|
58
|
+
return /* @__PURE__ */ t(_.Provider, { value: C, children: /* @__PURE__ */ t(P, { delayDuration: 0, children: /* @__PURE__ */ t(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
61
|
"data-slot": "sidebar-wrapper",
|
|
@@ -73,8 +73,8 @@ function ue({
|
|
|
73
73
|
}
|
|
74
74
|
) }) });
|
|
75
75
|
}
|
|
76
|
-
r(
|
|
77
|
-
function
|
|
76
|
+
r(ce, "SidebarProvider");
|
|
77
|
+
function ue({
|
|
78
78
|
side: a = "left",
|
|
79
79
|
variant: e = "sidebar",
|
|
80
80
|
collapsible: n = "offcanvas",
|
|
@@ -82,7 +82,7 @@ function ce({
|
|
|
82
82
|
children: d,
|
|
83
83
|
...l
|
|
84
84
|
}) {
|
|
85
|
-
const { isMobile: m, state:
|
|
85
|
+
const { isMobile: m, state: c, openMobile: p, setOpenMobile: b } = N();
|
|
86
86
|
return n === "none" ? /* @__PURE__ */ t(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
@@ -117,8 +117,8 @@ function ce({
|
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
119
119
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
120
|
-
"data-state":
|
|
121
|
-
"data-collapsible":
|
|
120
|
+
"data-state": c,
|
|
121
|
+
"data-collapsible": c === "collapsed" ? n : "",
|
|
122
122
|
"data-variant": e,
|
|
123
123
|
"data-side": a,
|
|
124
124
|
"data-slot": "sidebar",
|
|
@@ -162,7 +162,7 @@ function ce({
|
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
|
-
r(
|
|
165
|
+
r(ue, "Sidebar");
|
|
166
166
|
function be({
|
|
167
167
|
className: a,
|
|
168
168
|
onClick: e,
|
|
@@ -179,7 +179,7 @@ function be({
|
|
|
179
179
|
size: "icon",
|
|
180
180
|
className: i("size-7", a),
|
|
181
181
|
onClick: /* @__PURE__ */ r((d) => {
|
|
182
|
-
e
|
|
182
|
+
e?.(d), o();
|
|
183
183
|
}, "onClick"),
|
|
184
184
|
...n,
|
|
185
185
|
children: [
|
|
@@ -370,7 +370,7 @@ function ye({
|
|
|
370
370
|
);
|
|
371
371
|
}
|
|
372
372
|
r(ye, "SidebarGroupContent");
|
|
373
|
-
function
|
|
373
|
+
function ke({ className: a, ...e }) {
|
|
374
374
|
return /* @__PURE__ */ t(
|
|
375
375
|
"ul",
|
|
376
376
|
{
|
|
@@ -381,8 +381,8 @@ function _e({ className: a, ...e }) {
|
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
|
-
r(
|
|
385
|
-
function
|
|
384
|
+
r(ke, "SidebarMenu");
|
|
385
|
+
function _e({ className: a, ...e }) {
|
|
386
386
|
return /* @__PURE__ */ t(
|
|
387
387
|
"li",
|
|
388
388
|
{
|
|
@@ -393,8 +393,8 @@ function Me({ className: a, ...e }) {
|
|
|
393
393
|
}
|
|
394
394
|
);
|
|
395
395
|
}
|
|
396
|
-
r(
|
|
397
|
-
const Y =
|
|
396
|
+
r(_e, "SidebarMenuItem");
|
|
397
|
+
const Y = I(
|
|
398
398
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
399
399
|
{
|
|
400
400
|
variants: {
|
|
@@ -414,7 +414,7 @@ const Y = C(
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
);
|
|
417
|
-
function
|
|
417
|
+
function Me({
|
|
418
418
|
asChild: a = !1,
|
|
419
419
|
isActive: e = !1,
|
|
420
420
|
variant: n = "default",
|
|
@@ -423,8 +423,8 @@ function ke({
|
|
|
423
423
|
className: l,
|
|
424
424
|
...m
|
|
425
425
|
}) {
|
|
426
|
-
const
|
|
427
|
-
|
|
426
|
+
const c = a ? v.Root : "button", { isMobile: p, state: b } = N(), x = /* @__PURE__ */ t(
|
|
427
|
+
c,
|
|
428
428
|
{
|
|
429
429
|
"data-slot": "sidebar-menu-button",
|
|
430
430
|
"data-sidebar": "menu-button",
|
|
@@ -449,8 +449,8 @@ function ke({
|
|
|
449
449
|
)
|
|
450
450
|
] })) : x;
|
|
451
451
|
}
|
|
452
|
-
r(
|
|
453
|
-
function
|
|
452
|
+
r(Me, "SidebarMenuButton");
|
|
453
|
+
function Ce({
|
|
454
454
|
className: a,
|
|
455
455
|
asChild: e = !1,
|
|
456
456
|
showOnHover: n = !1,
|
|
@@ -477,8 +477,8 @@ function ze({
|
|
|
477
477
|
}
|
|
478
478
|
);
|
|
479
479
|
}
|
|
480
|
-
r(
|
|
481
|
-
function
|
|
480
|
+
r(Ce, "SidebarMenuAction");
|
|
481
|
+
function ze({
|
|
482
482
|
className: a,
|
|
483
483
|
...e
|
|
484
484
|
}) {
|
|
@@ -500,13 +500,13 @@ function Ie({
|
|
|
500
500
|
}
|
|
501
501
|
);
|
|
502
502
|
}
|
|
503
|
-
r(
|
|
504
|
-
function
|
|
503
|
+
r(ze, "SidebarMenuBadge");
|
|
504
|
+
function Ie({
|
|
505
505
|
className: a,
|
|
506
506
|
showIcon: e = !1,
|
|
507
507
|
...n
|
|
508
508
|
}) {
|
|
509
|
-
const o =
|
|
509
|
+
const o = u.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
510
510
|
return /* @__PURE__ */ g(
|
|
511
511
|
"div",
|
|
512
512
|
{
|
|
@@ -516,14 +516,14 @@ function Ce({
|
|
|
516
516
|
...n,
|
|
517
517
|
children: [
|
|
518
518
|
e && /* @__PURE__ */ t(
|
|
519
|
-
|
|
519
|
+
k,
|
|
520
520
|
{
|
|
521
521
|
className: "size-4 rounded-md",
|
|
522
522
|
"data-sidebar": "menu-skeleton-icon"
|
|
523
523
|
}
|
|
524
524
|
),
|
|
525
525
|
/* @__PURE__ */ t(
|
|
526
|
-
|
|
526
|
+
k,
|
|
527
527
|
{
|
|
528
528
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
529
529
|
"data-sidebar": "menu-skeleton-text",
|
|
@@ -536,7 +536,7 @@ function Ce({
|
|
|
536
536
|
}
|
|
537
537
|
);
|
|
538
538
|
}
|
|
539
|
-
r(
|
|
539
|
+
r(Ie, "SidebarMenuSkeleton");
|
|
540
540
|
function Ee({ className: a, ...e }) {
|
|
541
541
|
return /* @__PURE__ */ t(
|
|
542
542
|
"ul",
|
|
@@ -597,7 +597,7 @@ function Re({
|
|
|
597
597
|
}
|
|
598
598
|
r(Re, "SidebarMenuSubButton");
|
|
599
599
|
export {
|
|
600
|
-
|
|
600
|
+
ue as Sidebar,
|
|
601
601
|
xe as SidebarContent,
|
|
602
602
|
he as SidebarFooter,
|
|
603
603
|
we as SidebarGroup,
|
|
@@ -607,16 +607,16 @@ export {
|
|
|
607
607
|
me as SidebarHeader,
|
|
608
608
|
ge as SidebarInput,
|
|
609
609
|
pe as SidebarInset,
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
610
|
+
ke as SidebarMenu,
|
|
611
|
+
Ce as SidebarMenuAction,
|
|
612
|
+
ze as SidebarMenuBadge,
|
|
613
|
+
Me as SidebarMenuButton,
|
|
614
|
+
_e as SidebarMenuItem,
|
|
615
|
+
Ie as SidebarMenuSkeleton,
|
|
616
616
|
Ee as SidebarMenuSub,
|
|
617
617
|
Re as SidebarMenuSubButton,
|
|
618
618
|
De as SidebarMenuSubItem,
|
|
619
|
-
|
|
619
|
+
ce as SidebarProvider,
|
|
620
620
|
fe as SidebarRail,
|
|
621
621
|
ve as SidebarSeparator,
|
|
622
622
|
be as SidebarTrigger,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIsMobile } from "./use-mobile";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { formatDate } from "./dates";
|
|
2
|
+
export { requestApi } from "./http";
|
|
3
|
+
export { isNullOrEmptyString } from "./strings";
|
|
4
|
+
export { orderByText, orderBy } from "./arrays";
|
|
5
|
+
export { cn, apiErrorDescription, manageApiFormErrors } from "./utils";
|
|
6
|
+
export { string, number, boolean, date, array, object, mixed, ref, lazy, reach, addMethod, } from "./yup";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { formatDate as e } from "./dates.js";
|
|
2
|
+
import { requestApi as a } from "./http.js";
|
|
3
|
+
import { isNullOrEmptyString as p } from "./strings.js";
|
|
4
|
+
import { orderBy as f, orderByText as x } from "./arrays.js";
|
|
5
|
+
import { apiErrorDescription as n, cn as s, manageApiFormErrors as y } from "./utils.js";
|
|
6
|
+
import { addMethod as l, array as b, boolean as g, date as u, lazy as E, mixed as h, number as A, object as B, reach as D, ref as j, string as q } from "./yup.js";
|
|
7
|
+
export {
|
|
8
|
+
l as addMethod,
|
|
9
|
+
n as apiErrorDescription,
|
|
10
|
+
b as array,
|
|
11
|
+
g as boolean,
|
|
12
|
+
s as cn,
|
|
13
|
+
u as date,
|
|
14
|
+
e as formatDate,
|
|
15
|
+
p as isNullOrEmptyString,
|
|
16
|
+
E as lazy,
|
|
17
|
+
y as manageApiFormErrors,
|
|
18
|
+
h as mixed,
|
|
19
|
+
A as number,
|
|
20
|
+
B as object,
|
|
21
|
+
f as orderBy,
|
|
22
|
+
x as orderByText,
|
|
23
|
+
D as reach,
|
|
24
|
+
j as ref,
|
|
25
|
+
a as requestApi,
|
|
26
|
+
q as string
|
|
27
|
+
};
|