react-shadcn-kit 0.0.1
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/LICENSE +7 -0
- package/README.md +113 -0
- package/dist/assets/global.css +1 -0
- package/dist/atoms/accordion.d.ts +7 -0
- package/dist/atoms/accordion.js +62 -0
- package/dist/atoms/alert-dialog.d.ts +14 -0
- package/dist/atoms/alert-dialog.js +127 -0
- package/dist/atoms/alert.d.ts +9 -0
- package/dist/atoms/alert.js +60 -0
- package/dist/atoms/aspect-ratio.d.ts +3 -0
- package/dist/atoms/aspect-ratio.js +8 -0
- package/dist/atoms/avatar.d.ts +6 -0
- package/dist/atoms/avatar.js +41 -0
- package/dist/atoms/badge.d.ts +9 -0
- package/dist/atoms/badge.js +32 -0
- package/dist/atoms/breadcrumb.d.ts +11 -0
- package/dist/atoms/breadcrumb.js +95 -0
- package/dist/atoms/button-group.d.ts +11 -0
- package/dist/atoms/button-group.js +75 -0
- package/dist/atoms/button.d.ts +10 -0
- package/dist/atoms/button.js +51 -0
- package/dist/atoms/calendar.d.ts +8 -0
- package/dist/atoms/calendar.js +144 -0
- package/dist/atoms/card.d.ts +9 -0
- package/dist/atoms/card.js +80 -0
- package/dist/atoms/carousel.d.ts +19 -0
- package/dist/atoms/carousel.js +165 -0
- package/dist/atoms/chart.d.ts +43 -0
- package/dist/atoms/chart.js +203 -0
- package/dist/atoms/checkbox.d.ts +4 -0
- package/dist/atoms/checkbox.js +28 -0
- package/dist/atoms/collapsible.d.ts +5 -0
- package/dist/atoms/collapsible.js +20 -0
- package/dist/atoms/command.d.ts +18 -0
- package/dist/atoms/command.js +143 -0
- package/dist/atoms/context-menu.d.ts +25 -0
- package/dist/atoms/context-menu.js +200 -0
- package/dist/atoms/dialog.d.ts +15 -0
- package/dist/atoms/dialog.js +122 -0
- package/dist/atoms/drawer.d.ts +13 -0
- package/dist/atoms/drawer.js +117 -0
- package/dist/atoms/dropdown-menu.d.ts +25 -0
- package/dist/atoms/dropdown-menu.js +204 -0
- package/dist/atoms/empty.d.ts +11 -0
- package/dist/atoms/empty.js +99 -0
- package/dist/atoms/field.d.ts +24 -0
- package/dist/atoms/field.js +208 -0
- package/dist/atoms/form.d.ts +24 -0
- package/dist/atoms/form.js +87 -0
- package/dist/atoms/hover-card.d.ts +6 -0
- package/dist/atoms/hover-card.js +34 -0
- package/dist/atoms/input-group.d.ts +16 -0
- package/dist/atoms/input-group.js +142 -0
- package/dist/atoms/input-otp.d.ts +11 -0
- package/dist/atoms/input-otp.js +55 -0
- package/dist/atoms/input.d.ts +3 -0
- package/dist/atoms/input.js +21 -0
- package/dist/atoms/item.d.ts +23 -0
- package/dist/atoms/item.js +164 -0
- package/dist/atoms/kbd.d.ts +3 -0
- package/dist/atoms/kbd.js +31 -0
- package/dist/atoms/label.d.ts +4 -0
- package/dist/atoms/label.js +19 -0
- package/dist/atoms/menubar.d.ts +26 -0
- package/dist/atoms/menubar.js +229 -0
- package/dist/atoms/navigation-menu.d.ts +14 -0
- package/dist/atoms/navigation-menu.js +159 -0
- package/dist/atoms/pagination.d.ts +13 -0
- package/dist/atoms/pagination.js +100 -0
- package/dist/atoms/popover.d.ts +7 -0
- package/dist/atoms/popover.js +38 -0
- package/dist/atoms/progress.d.ts +4 -0
- package/dist/atoms/progress.js +28 -0
- package/dist/atoms/radio-group.d.ts +5 -0
- package/dist/atoms/radio-group.js +45 -0
- package/dist/atoms/resizable.d.ts +8 -0
- package/dist/atoms/resizable.js +43 -0
- package/dist/atoms/scroll-area.d.ts +5 -0
- package/dist/atoms/scroll-area.js +60 -0
- package/dist/atoms/select.d.ts +15 -0
- package/dist/atoms/select.js +156 -0
- package/dist/atoms/separator.d.ts +4 -0
- package/dist/atoms/separator.js +26 -0
- package/dist/atoms/sheet.d.ts +13 -0
- package/dist/atoms/sheet.js +117 -0
- package/dist/atoms/sidebar.d.ts +69 -0
- package/dist/atoms/sidebar.js +570 -0
- package/dist/atoms/skeleton.d.ts +2 -0
- package/dist/atoms/skeleton.js +15 -0
- package/dist/atoms/slider.d.ts +4 -0
- package/dist/atoms/slider.js +63 -0
- package/dist/atoms/sonner.d.ts +3 -0
- package/dist/atoms/sonner.js +31 -0
- package/dist/atoms/spinner.d.ts +2 -0
- package/dist/atoms/spinner.js +17 -0
- package/dist/atoms/switch.d.ts +4 -0
- package/dist/atoms/switch.js +28 -0
- package/dist/atoms/table.d.ts +10 -0
- package/dist/atoms/table.js +94 -0
- package/dist/atoms/tabs.d.ts +7 -0
- package/dist/atoms/tabs.js +55 -0
- package/dist/atoms/textarea.d.ts +3 -0
- package/dist/atoms/textarea.js +18 -0
- package/dist/atoms/toggle-group.d.ts +9 -0
- package/dist/atoms/toggle-group.js +68 -0
- package/dist/atoms/toggle.d.ts +9 -0
- package/dist/atoms/toggle.js +43 -0
- package/dist/atoms/tooltip.d.ts +7 -0
- package/dist/atoms/tooltip.js +51 -0
- package/dist/config/default-navigation.js +136 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +347 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/molecules/app-navbar.d.ts +11 -0
- package/dist/molecules/app-navbar.js +117 -0
- package/dist/molecules/app-sidebar.d.ts +9 -0
- package/dist/molecules/app-sidebar.js +121 -0
- package/dist/organisms/layout.d.ts +3 -0
- package/dist/organisms/layout.js +16 -0
- package/package.json +120 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import './assets/global.css';/* empty css */
|
|
2
|
+
import { AppSidebar as t } from "./molecules/app-sidebar.js";
|
|
3
|
+
import { AppNavbar as n } from "./molecules/app-navbar.js";
|
|
4
|
+
import { defaultNavbarConfig as p, defaultSidebarConfig as u } from "./config/default-navigation.js";
|
|
5
|
+
import { Accordion as m, AccordionContent as d, AccordionItem as b, AccordionTrigger as g } from "./atoms/accordion.js";
|
|
6
|
+
import { AlertDialog as S, AlertDialogAction as x, AlertDialogCancel as M, AlertDialogContent as f, AlertDialogDescription as D, AlertDialogFooter as T, AlertDialogHeader as c, AlertDialogOverlay as s, AlertDialogPortal as I, AlertDialogTitle as A, AlertDialogTrigger as G } from "./atoms/alert-dialog.js";
|
|
7
|
+
import { Alert as F, AlertDescription as P, AlertTitle as v } from "./atoms/alert.js";
|
|
8
|
+
import { AspectRatio as B } from "./atoms/aspect-ratio.js";
|
|
9
|
+
import { Avatar as y, AvatarFallback as H, AvatarImage as R } from "./atoms/avatar.js";
|
|
10
|
+
import { Badge as k, badgeVariants as E } from "./atoms/badge.js";
|
|
11
|
+
import { Breadcrumb as V, BreadcrumbEllipsis as z, BreadcrumbItem as K, BreadcrumbLink as U, BreadcrumbList as j, BreadcrumbPage as q, BreadcrumbSeparator as J } from "./atoms/breadcrumb.js";
|
|
12
|
+
import { ButtonGroup as W, ButtonGroupSeparator as X, ButtonGroupText as Y, buttonGroupVariants as Z } from "./atoms/button-group.js";
|
|
13
|
+
import { Button as $, buttonVariants as ee } from "./atoms/button.js";
|
|
14
|
+
import { Calendar as oe, CalendarDayButton as te } from "./atoms/calendar.js";
|
|
15
|
+
import { Card as ne, CardAction as ie, CardContent as pe, CardDescription as ue, CardFooter as le, CardHeader as me, CardTitle as de } from "./atoms/card.js";
|
|
16
|
+
import { Carousel as ge, CarouselContent as Ce, CarouselItem as Se, CarouselNext as xe, CarouselPrevious as Me } from "./atoms/carousel.js";
|
|
17
|
+
import { ChartContainer as De, ChartLegend as Te, ChartLegendContent as ce, ChartStyle as se, ChartTooltip as Ie, ChartTooltipContent as Ae } from "./atoms/chart.js";
|
|
18
|
+
import { Checkbox as we } from "./atoms/checkbox.js";
|
|
19
|
+
import { Collapsible as Pe, CollapsibleContent as ve, CollapsibleTrigger as he } from "./atoms/collapsible.js";
|
|
20
|
+
import { Command as Le, CommandDialog as ye, CommandEmpty as He, CommandGroup as Re, CommandInput as Ne, CommandItem as ke, CommandList as Ee, CommandSeparator as Oe, CommandShortcut as Ve } from "./atoms/command.js";
|
|
21
|
+
import { ContextMenu as Ke, ContextMenuCheckboxItem as Ue, ContextMenuContent as je, ContextMenuGroup as qe, ContextMenuItem as Je, ContextMenuLabel as Qe, ContextMenuPortal as We, ContextMenuRadioGroup as Xe, ContextMenuRadioItem as Ye, ContextMenuSeparator as Ze, ContextMenuShortcut as _e, ContextMenuSub as $e, ContextMenuSubContent as er, ContextMenuSubTrigger as rr, ContextMenuTrigger as or } from "./atoms/context-menu.js";
|
|
22
|
+
import { Dialog as ar, DialogClose as nr, DialogContent as ir, DialogDescription as pr, DialogFooter as ur, DialogHeader as lr, DialogOverlay as mr, DialogPortal as dr, DialogTitle as br, DialogTrigger as gr } from "./atoms/dialog.js";
|
|
23
|
+
import { Drawer as Sr, DrawerClose as xr, DrawerContent as Mr, DrawerDescription as fr, DrawerFooter as Dr, DrawerHeader as Tr, DrawerOverlay as cr, DrawerPortal as sr, DrawerTitle as Ir, DrawerTrigger as Ar } from "./atoms/drawer.js";
|
|
24
|
+
import { DropdownMenu as wr, DropdownMenuCheckboxItem as Fr, DropdownMenuContent as Pr, DropdownMenuGroup as vr, DropdownMenuItem as hr, DropdownMenuLabel as Br, DropdownMenuPortal as Lr, DropdownMenuRadioGroup as yr, DropdownMenuRadioItem as Hr, DropdownMenuSeparator as Rr, DropdownMenuShortcut as Nr, DropdownMenuSub as kr, DropdownMenuSubContent as Er, DropdownMenuSubTrigger as Or, DropdownMenuTrigger as Vr } from "./atoms/dropdown-menu.js";
|
|
25
|
+
import { Empty as Kr, EmptyContent as Ur, EmptyDescription as jr, EmptyHeader as qr, EmptyMedia as Jr, EmptyTitle as Qr } from "./atoms/empty.js";
|
|
26
|
+
import { Field as Xr, FieldContent as Yr, FieldDescription as Zr, FieldError as _r, FieldGroup as $r, FieldLabel as eo, FieldLegend as ro, FieldSeparator as oo, FieldSet as to, FieldTitle as ao } from "./atoms/field.js";
|
|
27
|
+
import { Form as io, FormControl as po, FormDescription as uo, FormField as lo, FormItem as mo, FormLabel as bo, FormMessage as go, useFormField as Co } from "./atoms/form.js";
|
|
28
|
+
import { HoverCard as xo, HoverCardContent as Mo, HoverCardTrigger as fo } from "./atoms/hover-card.js";
|
|
29
|
+
import { InputGroup as To, InputGroupAddon as co, InputGroupButton as so, InputGroupInput as Io, InputGroupText as Ao, InputGroupTextarea as Go } from "./atoms/input-group.js";
|
|
30
|
+
import { InputOTP as Fo, InputOTPGroup as Po, InputOTPSeparator as vo, InputOTPSlot as ho } from "./atoms/input-otp.js";
|
|
31
|
+
import { Input as Lo } from "./atoms/input.js";
|
|
32
|
+
import { Item as Ho, ItemActions as Ro, ItemContent as No, ItemDescription as ko, ItemFooter as Eo, ItemGroup as Oo, ItemHeader as Vo, ItemMedia as zo, ItemSeparator as Ko, ItemTitle as Uo } from "./atoms/item.js";
|
|
33
|
+
import { Kbd as qo, KbdGroup as Jo } from "./atoms/kbd.js";
|
|
34
|
+
import { Label as Wo } from "./atoms/label.js";
|
|
35
|
+
import { Menubar as Yo, MenubarCheckboxItem as Zo, MenubarContent as _o, MenubarGroup as $o, MenubarItem as et, MenubarLabel as rt, MenubarMenu as ot, MenubarPortal as tt, MenubarRadioGroup as at, MenubarRadioItem as nt, MenubarSeparator as it, MenubarShortcut as pt, MenubarSub as ut, MenubarSubContent as lt, MenubarSubTrigger as mt, MenubarTrigger as dt } from "./atoms/menubar.js";
|
|
36
|
+
import { NavigationMenu as gt, NavigationMenuContent as Ct, NavigationMenuIndicator as St, NavigationMenuItem as xt, NavigationMenuLink as Mt, NavigationMenuList as ft, NavigationMenuTrigger as Dt, NavigationMenuViewport as Tt, navigationMenuTriggerStyle as ct } from "./atoms/navigation-menu.js";
|
|
37
|
+
import { Pagination as It, PaginationContent as At, PaginationEllipsis as Gt, PaginationItem as wt, PaginationLink as Ft, PaginationNext as Pt, PaginationPrevious as vt } from "./atoms/pagination.js";
|
|
38
|
+
import { Popover as Bt, PopoverAnchor as Lt, PopoverContent as yt, PopoverTrigger as Ht } from "./atoms/popover.js";
|
|
39
|
+
import { Progress as Nt } from "./atoms/progress.js";
|
|
40
|
+
import { RadioGroup as Et, RadioGroupItem as Ot } from "./atoms/radio-group.js";
|
|
41
|
+
import { ResizableHandle as zt, ResizablePanel as Kt, ResizablePanelGroup as Ut } from "./atoms/resizable.js";
|
|
42
|
+
import { ScrollArea as qt, ScrollBar as Jt } from "./atoms/scroll-area.js";
|
|
43
|
+
import { Select as Wt, SelectContent as Xt, SelectGroup as Yt, SelectItem as Zt, SelectLabel as _t, SelectScrollDownButton as $t, SelectScrollUpButton as ea, SelectSeparator as ra, SelectTrigger as oa, SelectValue as ta } from "./atoms/select.js";
|
|
44
|
+
import { Separator as na } from "./atoms/separator.js";
|
|
45
|
+
import { Sheet as pa, SheetClose as ua, SheetContent as la, SheetDescription as ma, SheetFooter as da, SheetHeader as ba, SheetTitle as ga, SheetTrigger as Ca } from "./atoms/sheet.js";
|
|
46
|
+
import { Sidebar as xa, SidebarContent as Ma, SidebarFooter as fa, SidebarGroup as Da, SidebarGroupAction as Ta, SidebarGroupContent as ca, SidebarGroupLabel as sa, SidebarHeader as Ia, SidebarInput as Aa, SidebarInset as Ga, SidebarMenu as wa, SidebarMenuAction as Fa, SidebarMenuBadge as Pa, SidebarMenuButton as va, SidebarMenuItem as ha, SidebarMenuSkeleton as Ba, SidebarMenuSub as La, SidebarMenuSubButton as ya, SidebarMenuSubItem as Ha, SidebarProvider as Ra, SidebarRail as Na, SidebarSeparator as ka, SidebarTrigger as Ea, useSidebar as Oa } from "./atoms/sidebar.js";
|
|
47
|
+
import { Skeleton as za } from "./atoms/skeleton.js";
|
|
48
|
+
import { Slider as Ua } from "./atoms/slider.js";
|
|
49
|
+
import { Toaster as qa } from "./atoms/sonner.js";
|
|
50
|
+
import { Spinner as Qa } from "./atoms/spinner.js";
|
|
51
|
+
import { Switch as Xa } from "./atoms/switch.js";
|
|
52
|
+
import { Table as Za, TableBody as _a, TableCaption as $a, TableCell as en, TableFooter as rn, TableHead as on, TableHeader as tn, TableRow as an } from "./atoms/table.js";
|
|
53
|
+
import { Tabs as pn, TabsContent as un, TabsList as ln, TabsTrigger as mn } from "./atoms/tabs.js";
|
|
54
|
+
import { Textarea as bn } from "./atoms/textarea.js";
|
|
55
|
+
import { ToggleGroup as Cn, ToggleGroupItem as Sn } from "./atoms/toggle-group.js";
|
|
56
|
+
import { Toggle as Mn, toggleVariants as fn } from "./atoms/toggle.js";
|
|
57
|
+
import { Tooltip as Tn, TooltipContent as cn, TooltipProvider as sn, TooltipTrigger as In } from "./atoms/tooltip.js";
|
|
58
|
+
export {
|
|
59
|
+
m as Accordion,
|
|
60
|
+
d as AccordionContent,
|
|
61
|
+
b as AccordionItem,
|
|
62
|
+
g as AccordionTrigger,
|
|
63
|
+
F as Alert,
|
|
64
|
+
P as AlertDescription,
|
|
65
|
+
S as AlertDialog,
|
|
66
|
+
x as AlertDialogAction,
|
|
67
|
+
M as AlertDialogCancel,
|
|
68
|
+
f as AlertDialogContent,
|
|
69
|
+
D as AlertDialogDescription,
|
|
70
|
+
T as AlertDialogFooter,
|
|
71
|
+
c as AlertDialogHeader,
|
|
72
|
+
s as AlertDialogOverlay,
|
|
73
|
+
I as AlertDialogPortal,
|
|
74
|
+
A as AlertDialogTitle,
|
|
75
|
+
G as AlertDialogTrigger,
|
|
76
|
+
v as AlertTitle,
|
|
77
|
+
n as AppNavbar,
|
|
78
|
+
t as AppSidebar,
|
|
79
|
+
B as AspectRatio,
|
|
80
|
+
y as Avatar,
|
|
81
|
+
H as AvatarFallback,
|
|
82
|
+
R as AvatarImage,
|
|
83
|
+
k as Badge,
|
|
84
|
+
V as Breadcrumb,
|
|
85
|
+
z as BreadcrumbEllipsis,
|
|
86
|
+
K as BreadcrumbItem,
|
|
87
|
+
U as BreadcrumbLink,
|
|
88
|
+
j as BreadcrumbList,
|
|
89
|
+
q as BreadcrumbPage,
|
|
90
|
+
J as BreadcrumbSeparator,
|
|
91
|
+
$ as Button,
|
|
92
|
+
W as ButtonGroup,
|
|
93
|
+
X as ButtonGroupSeparator,
|
|
94
|
+
Y as ButtonGroupText,
|
|
95
|
+
oe as Calendar,
|
|
96
|
+
te as CalendarDayButton,
|
|
97
|
+
ne as Card,
|
|
98
|
+
ie as CardAction,
|
|
99
|
+
pe as CardContent,
|
|
100
|
+
ue as CardDescription,
|
|
101
|
+
le as CardFooter,
|
|
102
|
+
me as CardHeader,
|
|
103
|
+
de as CardTitle,
|
|
104
|
+
ge as Carousel,
|
|
105
|
+
Ce as CarouselContent,
|
|
106
|
+
Se as CarouselItem,
|
|
107
|
+
xe as CarouselNext,
|
|
108
|
+
Me as CarouselPrevious,
|
|
109
|
+
De as ChartContainer,
|
|
110
|
+
Te as ChartLegend,
|
|
111
|
+
ce as ChartLegendContent,
|
|
112
|
+
se as ChartStyle,
|
|
113
|
+
Ie as ChartTooltip,
|
|
114
|
+
Ae as ChartTooltipContent,
|
|
115
|
+
we as Checkbox,
|
|
116
|
+
Pe as Collapsible,
|
|
117
|
+
ve as CollapsibleContent,
|
|
118
|
+
he as CollapsibleTrigger,
|
|
119
|
+
Le as Command,
|
|
120
|
+
ye as CommandDialog,
|
|
121
|
+
He as CommandEmpty,
|
|
122
|
+
Re as CommandGroup,
|
|
123
|
+
Ne as CommandInput,
|
|
124
|
+
ke as CommandItem,
|
|
125
|
+
Ee as CommandList,
|
|
126
|
+
Oe as CommandSeparator,
|
|
127
|
+
Ve as CommandShortcut,
|
|
128
|
+
Ke as ContextMenu,
|
|
129
|
+
Ue as ContextMenuCheckboxItem,
|
|
130
|
+
je as ContextMenuContent,
|
|
131
|
+
qe as ContextMenuGroup,
|
|
132
|
+
Je as ContextMenuItem,
|
|
133
|
+
Qe as ContextMenuLabel,
|
|
134
|
+
We as ContextMenuPortal,
|
|
135
|
+
Xe as ContextMenuRadioGroup,
|
|
136
|
+
Ye as ContextMenuRadioItem,
|
|
137
|
+
Ze as ContextMenuSeparator,
|
|
138
|
+
_e as ContextMenuShortcut,
|
|
139
|
+
$e as ContextMenuSub,
|
|
140
|
+
er as ContextMenuSubContent,
|
|
141
|
+
rr as ContextMenuSubTrigger,
|
|
142
|
+
or as ContextMenuTrigger,
|
|
143
|
+
ar as Dialog,
|
|
144
|
+
nr as DialogClose,
|
|
145
|
+
ir as DialogContent,
|
|
146
|
+
pr as DialogDescription,
|
|
147
|
+
ur as DialogFooter,
|
|
148
|
+
lr as DialogHeader,
|
|
149
|
+
mr as DialogOverlay,
|
|
150
|
+
dr as DialogPortal,
|
|
151
|
+
br as DialogTitle,
|
|
152
|
+
gr as DialogTrigger,
|
|
153
|
+
Sr as Drawer,
|
|
154
|
+
xr as DrawerClose,
|
|
155
|
+
Mr as DrawerContent,
|
|
156
|
+
fr as DrawerDescription,
|
|
157
|
+
Dr as DrawerFooter,
|
|
158
|
+
Tr as DrawerHeader,
|
|
159
|
+
cr as DrawerOverlay,
|
|
160
|
+
sr as DrawerPortal,
|
|
161
|
+
Ir as DrawerTitle,
|
|
162
|
+
Ar as DrawerTrigger,
|
|
163
|
+
wr as DropdownMenu,
|
|
164
|
+
Fr as DropdownMenuCheckboxItem,
|
|
165
|
+
Pr as DropdownMenuContent,
|
|
166
|
+
vr as DropdownMenuGroup,
|
|
167
|
+
hr as DropdownMenuItem,
|
|
168
|
+
Br as DropdownMenuLabel,
|
|
169
|
+
Lr as DropdownMenuPortal,
|
|
170
|
+
yr as DropdownMenuRadioGroup,
|
|
171
|
+
Hr as DropdownMenuRadioItem,
|
|
172
|
+
Rr as DropdownMenuSeparator,
|
|
173
|
+
Nr as DropdownMenuShortcut,
|
|
174
|
+
kr as DropdownMenuSub,
|
|
175
|
+
Er as DropdownMenuSubContent,
|
|
176
|
+
Or as DropdownMenuSubTrigger,
|
|
177
|
+
Vr as DropdownMenuTrigger,
|
|
178
|
+
Kr as Empty,
|
|
179
|
+
Ur as EmptyContent,
|
|
180
|
+
jr as EmptyDescription,
|
|
181
|
+
qr as EmptyHeader,
|
|
182
|
+
Jr as EmptyMedia,
|
|
183
|
+
Qr as EmptyTitle,
|
|
184
|
+
Xr as Field,
|
|
185
|
+
Yr as FieldContent,
|
|
186
|
+
Zr as FieldDescription,
|
|
187
|
+
_r as FieldError,
|
|
188
|
+
$r as FieldGroup,
|
|
189
|
+
eo as FieldLabel,
|
|
190
|
+
ro as FieldLegend,
|
|
191
|
+
oo as FieldSeparator,
|
|
192
|
+
to as FieldSet,
|
|
193
|
+
ao as FieldTitle,
|
|
194
|
+
io as Form,
|
|
195
|
+
po as FormControl,
|
|
196
|
+
uo as FormDescription,
|
|
197
|
+
lo as FormField,
|
|
198
|
+
mo as FormItem,
|
|
199
|
+
bo as FormLabel,
|
|
200
|
+
go as FormMessage,
|
|
201
|
+
xo as HoverCard,
|
|
202
|
+
Mo as HoverCardContent,
|
|
203
|
+
fo as HoverCardTrigger,
|
|
204
|
+
Lo as Input,
|
|
205
|
+
To as InputGroup,
|
|
206
|
+
co as InputGroupAddon,
|
|
207
|
+
so as InputGroupButton,
|
|
208
|
+
Io as InputGroupInput,
|
|
209
|
+
Ao as InputGroupText,
|
|
210
|
+
Go as InputGroupTextarea,
|
|
211
|
+
Fo as InputOTP,
|
|
212
|
+
Po as InputOTPGroup,
|
|
213
|
+
vo as InputOTPSeparator,
|
|
214
|
+
ho as InputOTPSlot,
|
|
215
|
+
Ho as Item,
|
|
216
|
+
Ro as ItemActions,
|
|
217
|
+
No as ItemContent,
|
|
218
|
+
ko as ItemDescription,
|
|
219
|
+
Eo as ItemFooter,
|
|
220
|
+
Oo as ItemGroup,
|
|
221
|
+
Vo as ItemHeader,
|
|
222
|
+
zo as ItemMedia,
|
|
223
|
+
Ko as ItemSeparator,
|
|
224
|
+
Uo as ItemTitle,
|
|
225
|
+
qo as Kbd,
|
|
226
|
+
Jo as KbdGroup,
|
|
227
|
+
Wo as Label,
|
|
228
|
+
Yo as Menubar,
|
|
229
|
+
Zo as MenubarCheckboxItem,
|
|
230
|
+
_o as MenubarContent,
|
|
231
|
+
$o as MenubarGroup,
|
|
232
|
+
et as MenubarItem,
|
|
233
|
+
rt as MenubarLabel,
|
|
234
|
+
ot as MenubarMenu,
|
|
235
|
+
tt as MenubarPortal,
|
|
236
|
+
at as MenubarRadioGroup,
|
|
237
|
+
nt as MenubarRadioItem,
|
|
238
|
+
it as MenubarSeparator,
|
|
239
|
+
pt as MenubarShortcut,
|
|
240
|
+
ut as MenubarSub,
|
|
241
|
+
lt as MenubarSubContent,
|
|
242
|
+
mt as MenubarSubTrigger,
|
|
243
|
+
dt as MenubarTrigger,
|
|
244
|
+
gt as NavigationMenu,
|
|
245
|
+
Ct as NavigationMenuContent,
|
|
246
|
+
St as NavigationMenuIndicator,
|
|
247
|
+
xt as NavigationMenuItem,
|
|
248
|
+
Mt as NavigationMenuLink,
|
|
249
|
+
ft as NavigationMenuList,
|
|
250
|
+
Dt as NavigationMenuTrigger,
|
|
251
|
+
Tt as NavigationMenuViewport,
|
|
252
|
+
It as Pagination,
|
|
253
|
+
At as PaginationContent,
|
|
254
|
+
Gt as PaginationEllipsis,
|
|
255
|
+
wt as PaginationItem,
|
|
256
|
+
Ft as PaginationLink,
|
|
257
|
+
Pt as PaginationNext,
|
|
258
|
+
vt as PaginationPrevious,
|
|
259
|
+
Bt as Popover,
|
|
260
|
+
Lt as PopoverAnchor,
|
|
261
|
+
yt as PopoverContent,
|
|
262
|
+
Ht as PopoverTrigger,
|
|
263
|
+
Nt as Progress,
|
|
264
|
+
Et as RadioGroup,
|
|
265
|
+
Ot as RadioGroupItem,
|
|
266
|
+
zt as ResizableHandle,
|
|
267
|
+
Kt as ResizablePanel,
|
|
268
|
+
Ut as ResizablePanelGroup,
|
|
269
|
+
qt as ScrollArea,
|
|
270
|
+
Jt as ScrollBar,
|
|
271
|
+
Wt as Select,
|
|
272
|
+
Xt as SelectContent,
|
|
273
|
+
Yt as SelectGroup,
|
|
274
|
+
Zt as SelectItem,
|
|
275
|
+
_t as SelectLabel,
|
|
276
|
+
$t as SelectScrollDownButton,
|
|
277
|
+
ea as SelectScrollUpButton,
|
|
278
|
+
ra as SelectSeparator,
|
|
279
|
+
oa as SelectTrigger,
|
|
280
|
+
ta as SelectValue,
|
|
281
|
+
na as Separator,
|
|
282
|
+
pa as Sheet,
|
|
283
|
+
ua as SheetClose,
|
|
284
|
+
la as SheetContent,
|
|
285
|
+
ma as SheetDescription,
|
|
286
|
+
da as SheetFooter,
|
|
287
|
+
ba as SheetHeader,
|
|
288
|
+
ga as SheetTitle,
|
|
289
|
+
Ca as SheetTrigger,
|
|
290
|
+
xa as Sidebar,
|
|
291
|
+
Ma as SidebarContent,
|
|
292
|
+
fa as SidebarFooter,
|
|
293
|
+
Da as SidebarGroup,
|
|
294
|
+
Ta as SidebarGroupAction,
|
|
295
|
+
ca as SidebarGroupContent,
|
|
296
|
+
sa as SidebarGroupLabel,
|
|
297
|
+
Ia as SidebarHeader,
|
|
298
|
+
Aa as SidebarInput,
|
|
299
|
+
Ga as SidebarInset,
|
|
300
|
+
wa as SidebarMenu,
|
|
301
|
+
Fa as SidebarMenuAction,
|
|
302
|
+
Pa as SidebarMenuBadge,
|
|
303
|
+
va as SidebarMenuButton,
|
|
304
|
+
ha as SidebarMenuItem,
|
|
305
|
+
Ba as SidebarMenuSkeleton,
|
|
306
|
+
La as SidebarMenuSub,
|
|
307
|
+
ya as SidebarMenuSubButton,
|
|
308
|
+
Ha as SidebarMenuSubItem,
|
|
309
|
+
Ra as SidebarProvider,
|
|
310
|
+
Na as SidebarRail,
|
|
311
|
+
ka as SidebarSeparator,
|
|
312
|
+
Ea as SidebarTrigger,
|
|
313
|
+
za as Skeleton,
|
|
314
|
+
Ua as Slider,
|
|
315
|
+
Qa as Spinner,
|
|
316
|
+
Xa as Switch,
|
|
317
|
+
Za as Table,
|
|
318
|
+
_a as TableBody,
|
|
319
|
+
$a as TableCaption,
|
|
320
|
+
en as TableCell,
|
|
321
|
+
rn as TableFooter,
|
|
322
|
+
on as TableHead,
|
|
323
|
+
tn as TableHeader,
|
|
324
|
+
an as TableRow,
|
|
325
|
+
pn as Tabs,
|
|
326
|
+
un as TabsContent,
|
|
327
|
+
ln as TabsList,
|
|
328
|
+
mn as TabsTrigger,
|
|
329
|
+
bn as Textarea,
|
|
330
|
+
qa as Toaster,
|
|
331
|
+
Mn as Toggle,
|
|
332
|
+
Cn as ToggleGroup,
|
|
333
|
+
Sn as ToggleGroupItem,
|
|
334
|
+
Tn as Tooltip,
|
|
335
|
+
cn as TooltipContent,
|
|
336
|
+
sn as TooltipProvider,
|
|
337
|
+
In as TooltipTrigger,
|
|
338
|
+
E as badgeVariants,
|
|
339
|
+
Z as buttonGroupVariants,
|
|
340
|
+
ee as buttonVariants,
|
|
341
|
+
p as defaultNavbarConfig,
|
|
342
|
+
u as defaultSidebarConfig,
|
|
343
|
+
ct as navigationMenuTriggerStyle,
|
|
344
|
+
fn as toggleVariants,
|
|
345
|
+
Co as useFormField,
|
|
346
|
+
Oa as useSidebar
|
|
347
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NavbarConfig } from '../types/navigation';
|
|
2
|
+
interface AppNavbarProps {
|
|
3
|
+
config?: Partial<NavbarConfig>;
|
|
4
|
+
showSearch?: boolean;
|
|
5
|
+
showSidebarTrigger?: boolean;
|
|
6
|
+
showThemeToggle?: boolean;
|
|
7
|
+
showUserMenu?: boolean;
|
|
8
|
+
showNotifications?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function AppNavbar({ config, showSearch, showSidebarTrigger, showThemeToggle, showUserMenu, showNotifications, }: AppNavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsxs as r, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Search as b, Bell as k, Sun as C, Moon as M, User as I, Settings as S, LogOut as y } from "lucide-react";
|
|
3
|
+
import { Input as D } from "../atoms/input.js";
|
|
4
|
+
import { SidebarTrigger as P } from "../atoms/sidebar.js";
|
|
5
|
+
import { Separator as T } from "../atoms/separator.js";
|
|
6
|
+
import { defaultNavbarConfig as t } from "../config/default-navigation.js";
|
|
7
|
+
import { Button as c } from "../atoms/button.js";
|
|
8
|
+
import { useTheme as z } from "next-themes";
|
|
9
|
+
import { DropdownMenu as d, DropdownMenuTrigger as m, DropdownMenuContent as h, DropdownMenuLabel as f, DropdownMenuSeparator as u, DropdownMenuItem as n } from "../atoms/dropdown-menu.js";
|
|
10
|
+
import { Avatar as A, AvatarImage as L, AvatarFallback as j } from "../atoms/avatar.js";
|
|
11
|
+
function Q({
|
|
12
|
+
config: l,
|
|
13
|
+
showSearch: N = !0,
|
|
14
|
+
showSidebarTrigger: g = !0,
|
|
15
|
+
showThemeToggle: x = !0,
|
|
16
|
+
showUserMenu: w = !0,
|
|
17
|
+
showNotifications: v = !0
|
|
18
|
+
}) {
|
|
19
|
+
const { setTheme: i } = z(), a = {
|
|
20
|
+
items: l?.items || t.items,
|
|
21
|
+
searchPlaceholder: l?.searchPlaceholder || t.searchPlaceholder,
|
|
22
|
+
user: l?.user || t.user,
|
|
23
|
+
userMenuItems: l?.userMenuItems || t.userMenuItems,
|
|
24
|
+
notifications: l?.notifications || t.notifications
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ r("header", { className: "flex h-16 shrink-0 items-center gap-2 border-b px-4 bg-background sticky top-0 z-50", children: [
|
|
27
|
+
g && /* @__PURE__ */ r(p, { children: [
|
|
28
|
+
/* @__PURE__ */ e(P, { className: "-ml-1" }),
|
|
29
|
+
/* @__PURE__ */ e(T, { orientation: "vertical", className: "mr-2 h-4" })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ r("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
32
|
+
N && /* @__PURE__ */ r("div", { className: "relative", children: [
|
|
33
|
+
/* @__PURE__ */ e(b, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
D,
|
|
36
|
+
{
|
|
37
|
+
placeholder: a.searchPlaceholder,
|
|
38
|
+
className: "pl-8 w-[200px] lg:w-[300px]"
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] }),
|
|
42
|
+
v && a.notifications && /* @__PURE__ */ r(d, { children: [
|
|
43
|
+
/* @__PURE__ */ e(m, { asChild: !0, children: /* @__PURE__ */ r(c, { variant: "ghost", size: "icon", className: "relative", children: [
|
|
44
|
+
/* @__PURE__ */ e(k, { className: "h-5 w-5" }),
|
|
45
|
+
a.notifications.some((s) => !s.read) && /* @__PURE__ */ e("span", { className: "absolute right-2 top-2 h-2 w-2 rounded-full bg-red-600" }),
|
|
46
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Notifications" })
|
|
47
|
+
] }) }),
|
|
48
|
+
/* @__PURE__ */ r(h, { align: "end", className: "w-80", children: [
|
|
49
|
+
/* @__PURE__ */ e(f, { children: "Notifications" }),
|
|
50
|
+
/* @__PURE__ */ e(u, {}),
|
|
51
|
+
a.notifications.map((s, o) => /* @__PURE__ */ r(
|
|
52
|
+
n,
|
|
53
|
+
{
|
|
54
|
+
className: "flex flex-col items-start gap-1 p-3 cursor-pointer",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between", children: [
|
|
57
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: s.title }),
|
|
58
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: s.date })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground line-clamp-2", children: s.description })
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
o
|
|
64
|
+
)),
|
|
65
|
+
a.notifications.length === 0 && /* @__PURE__ */ e("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "No new notifications" })
|
|
66
|
+
] })
|
|
67
|
+
] }),
|
|
68
|
+
x && /* @__PURE__ */ r(d, { children: [
|
|
69
|
+
/* @__PURE__ */ e(m, { asChild: !0, children: /* @__PURE__ */ r(c, { variant: "ghost", size: "icon", children: [
|
|
70
|
+
/* @__PURE__ */ e(C, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
71
|
+
/* @__PURE__ */ e(M, { className: "absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
72
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
|
|
73
|
+
] }) }),
|
|
74
|
+
/* @__PURE__ */ r(h, { align: "end", children: [
|
|
75
|
+
/* @__PURE__ */ e(n, { onClick: () => i("light"), children: "Light" }),
|
|
76
|
+
/* @__PURE__ */ e(n, { onClick: () => i("dark"), children: "Dark" }),
|
|
77
|
+
/* @__PURE__ */ e(n, { onClick: () => i("system"), children: "System" })
|
|
78
|
+
] })
|
|
79
|
+
] }),
|
|
80
|
+
w && a.user && /* @__PURE__ */ r(d, { children: [
|
|
81
|
+
/* @__PURE__ */ e(m, { asChild: !0, children: /* @__PURE__ */ e(c, { variant: "ghost", size: "icon", className: "rounded-full", children: /* @__PURE__ */ r(A, { className: "h-8 w-8", children: [
|
|
82
|
+
/* @__PURE__ */ e(L, { src: a.user.avatar, alt: a.user.name }),
|
|
83
|
+
/* @__PURE__ */ e(j, { children: "CN" })
|
|
84
|
+
] }) }) }),
|
|
85
|
+
/* @__PURE__ */ r(h, { align: "end", children: [
|
|
86
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ r("div", { className: "flex flex-col space-y-1", children: [
|
|
87
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium leading-none", children: a.user.name }),
|
|
88
|
+
/* @__PURE__ */ e("p", { className: "text-xs leading-none text-muted-foreground", children: a.user.email })
|
|
89
|
+
] }) }),
|
|
90
|
+
/* @__PURE__ */ e(u, {}),
|
|
91
|
+
a.userMenuItems?.map((s, o) => /* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ r("a", { href: s.href || "#", onClick: s.onClick, children: [
|
|
92
|
+
s.icon && /* @__PURE__ */ e(s.icon, { className: "mr-2 h-4 w-4" }),
|
|
93
|
+
/* @__PURE__ */ e("span", { children: s.label })
|
|
94
|
+
] }) }, o)),
|
|
95
|
+
!a.userMenuItems && /* @__PURE__ */ r(p, { children: [
|
|
96
|
+
/* @__PURE__ */ r(n, { children: [
|
|
97
|
+
/* @__PURE__ */ e(I, { className: "mr-2 h-4 w-4" }),
|
|
98
|
+
/* @__PURE__ */ e("span", { children: "Profile" })
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ r(n, { children: [
|
|
101
|
+
/* @__PURE__ */ e(S, { className: "mr-2 h-4 w-4" }),
|
|
102
|
+
/* @__PURE__ */ e("span", { children: "Settings" })
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ e(u, {}),
|
|
105
|
+
/* @__PURE__ */ r(n, { children: [
|
|
106
|
+
/* @__PURE__ */ e(y, { className: "mr-2 h-4 w-4" }),
|
|
107
|
+
/* @__PURE__ */ e("span", { children: "Log out" })
|
|
108
|
+
] })
|
|
109
|
+
] })
|
|
110
|
+
] })
|
|
111
|
+
] })
|
|
112
|
+
] })
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
Q as AppNavbar
|
|
117
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SidebarConfig } from '../types/navigation';
|
|
2
|
+
interface AppSidebarProps {
|
|
3
|
+
config?: Partial<SidebarConfig>;
|
|
4
|
+
side?: "left" | "right";
|
|
5
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
6
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
7
|
+
}
|
|
8
|
+
export declare function AppSidebar({ config, side, variant, collapsible, }: AppSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as u, LogOut as D } from "lucide-react";
|
|
3
|
+
import { Sidebar as I, SidebarHeader as m, SidebarMenu as c, SidebarMenuItem as o, SidebarMenuButton as d, SidebarContent as z, SidebarGroup as y, SidebarGroupLabel as p, SidebarGroupContent as b, SidebarMenuSub as L, SidebarMenuSubItem as j, SidebarMenuSubButton as k, SidebarFooter as G } from "../atoms/sidebar.js";
|
|
4
|
+
import { Collapsible as f, CollapsibleTrigger as g, CollapsibleContent as x } from "../atoms/collapsible.js";
|
|
5
|
+
import { defaultSidebarConfig as s } from "../config/default-navigation.js";
|
|
6
|
+
import { Avatar as N, AvatarImage as C, AvatarFallback as v } from "../atoms/avatar.js";
|
|
7
|
+
import { DropdownMenu as O, DropdownMenuTrigger as B, DropdownMenuContent as F, DropdownMenuLabel as T, DropdownMenuSeparator as q, DropdownMenuItem as S } from "../atoms/dropdown-menu.js";
|
|
8
|
+
function U({
|
|
9
|
+
config: i,
|
|
10
|
+
side: M = "left",
|
|
11
|
+
variant: w = "sidebar",
|
|
12
|
+
collapsible: A = "icon"
|
|
13
|
+
}) {
|
|
14
|
+
const r = {
|
|
15
|
+
groups: i?.groups || s.groups,
|
|
16
|
+
header: i?.header || s.header,
|
|
17
|
+
footer: i?.footer || s.footer,
|
|
18
|
+
user: i?.user || s.user,
|
|
19
|
+
userMenuItems: i?.userMenuItems || s.userMenuItems,
|
|
20
|
+
branding: i?.branding || s.branding,
|
|
21
|
+
fixed: i?.fixed ?? s.fixed
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ a(
|
|
24
|
+
I,
|
|
25
|
+
{
|
|
26
|
+
side: M,
|
|
27
|
+
variant: w,
|
|
28
|
+
collapsible: A,
|
|
29
|
+
className: r.fixed ? void 0 : "absolute h-full",
|
|
30
|
+
children: [
|
|
31
|
+
r.header && /* @__PURE__ */ e(m, { children: r.header }),
|
|
32
|
+
r.branding && !r.header && /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(d, { size: "lg", asChild: !0, children: /* @__PURE__ */ a("a", { href: r.branding.href || "#", children: [
|
|
33
|
+
/* @__PURE__ */ e("div", { className: "bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg", children: r.branding.logo && /* @__PURE__ */ e(r.branding.logo, { className: "size-4" }) }),
|
|
34
|
+
/* @__PURE__ */ a("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
35
|
+
/* @__PURE__ */ e("span", { className: "truncate font-semibold", children: r.branding.name }),
|
|
36
|
+
/* @__PURE__ */ e("span", { className: "truncate text-xs", children: "Enterprise" })
|
|
37
|
+
] })
|
|
38
|
+
] }) }) }) }) }),
|
|
39
|
+
/* @__PURE__ */ e(z, { children: r.groups.map((n, h) => /* @__PURE__ */ a(y, { children: [
|
|
40
|
+
n.label && (n.collapsible ? /* @__PURE__ */ a(f, { defaultOpen: !0, className: "group/collapsible", children: [
|
|
41
|
+
/* @__PURE__ */ e(p, { asChild: !0, children: /* @__PURE__ */ a(g, { children: [
|
|
42
|
+
n.label,
|
|
43
|
+
/* @__PURE__ */ e(u, { className: "ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180" })
|
|
44
|
+
] }) }),
|
|
45
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(c, { children: n.items.map((l) => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(d, { asChild: !0, isActive: l.isActive, children: /* @__PURE__ */ a("a", { href: l.href, children: [
|
|
46
|
+
l.icon && /* @__PURE__ */ e(l.icon, {}),
|
|
47
|
+
/* @__PURE__ */ e("span", { children: l.label })
|
|
48
|
+
] }) }) }, l.href)) }) }) })
|
|
49
|
+
] }) : /* @__PURE__ */ e(p, { children: n.label })),
|
|
50
|
+
!n.collapsible && /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(c, { children: n.items.map((l) => /* @__PURE__ */ e(o, { children: l.items && l.items.length > 0 ? /* @__PURE__ */ a(f, { className: "group/collapsible", children: [
|
|
51
|
+
/* @__PURE__ */ e(d, { asChild: !0, isActive: l.isActive, children: /* @__PURE__ */ a(g, { children: [
|
|
52
|
+
l.icon && /* @__PURE__ */ e(l.icon, {}),
|
|
53
|
+
/* @__PURE__ */ e("span", { children: l.label }),
|
|
54
|
+
/* @__PURE__ */ e(u, { className: "ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180" })
|
|
55
|
+
] }) }),
|
|
56
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(L, { children: l.items.map((t) => /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(k, { asChild: !0, isActive: t.isActive, children: /* @__PURE__ */ e("a", { href: t.href, children: /* @__PURE__ */ e("span", { children: t.label }) }) }) }, t.href)) }) })
|
|
57
|
+
] }) : /* @__PURE__ */ e(d, { asChild: !0, isActive: l.isActive, children: /* @__PURE__ */ a("a", { href: l.href, children: [
|
|
58
|
+
l.icon && /* @__PURE__ */ e(l.icon, {}),
|
|
59
|
+
/* @__PURE__ */ e("span", { children: l.label })
|
|
60
|
+
] }) }) }, l.href)) }) })
|
|
61
|
+
] }, n.label || h)) }),
|
|
62
|
+
/* @__PURE__ */ a(G, { children: [
|
|
63
|
+
r.user && /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(o, { children: /* @__PURE__ */ a(O, { children: [
|
|
64
|
+
/* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ a(
|
|
65
|
+
d,
|
|
66
|
+
{
|
|
67
|
+
size: "lg",
|
|
68
|
+
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ a(N, { className: "h-8 w-8 rounded-lg", children: [
|
|
71
|
+
/* @__PURE__ */ e(C, { src: r.user.avatar, alt: r.user.name }),
|
|
72
|
+
/* @__PURE__ */ e(v, { className: "rounded-lg", children: "CN" })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ a("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
75
|
+
/* @__PURE__ */ e("span", { className: "truncate font-semibold", children: r.user.name }),
|
|
76
|
+
/* @__PURE__ */ e("span", { className: "truncate text-xs", children: r.user.email })
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ e(u, { className: "ml-auto size-4" })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) }),
|
|
82
|
+
/* @__PURE__ */ a(
|
|
83
|
+
F,
|
|
84
|
+
{
|
|
85
|
+
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
86
|
+
side: "bottom",
|
|
87
|
+
align: "end",
|
|
88
|
+
sideOffset: 4,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ e(T, { className: "p-0 font-normal", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm", children: [
|
|
91
|
+
/* @__PURE__ */ a(N, { className: "h-8 w-8 rounded-lg", children: [
|
|
92
|
+
/* @__PURE__ */ e(C, { src: r.user.avatar, alt: r.user.name }),
|
|
93
|
+
/* @__PURE__ */ e(v, { className: "rounded-lg", children: "CN" })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ a("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
96
|
+
/* @__PURE__ */ e("span", { className: "truncate font-semibold", children: r.user.name }),
|
|
97
|
+
/* @__PURE__ */ e("span", { className: "truncate text-xs", children: r.user.email })
|
|
98
|
+
] })
|
|
99
|
+
] }) }),
|
|
100
|
+
/* @__PURE__ */ e(q, {}),
|
|
101
|
+
r.userMenuItems?.map((n, h) => /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ a("a", { href: n.href || "#", onClick: n.onClick, children: [
|
|
102
|
+
n.icon && /* @__PURE__ */ e(n.icon, { className: "mr-2 h-4 w-4" }),
|
|
103
|
+
/* @__PURE__ */ e("span", { children: n.label })
|
|
104
|
+
] }) }, h)),
|
|
105
|
+
!r.userMenuItems && /* @__PURE__ */ a(S, { children: [
|
|
106
|
+
/* @__PURE__ */ e(D, { className: "mr-2 h-4 w-4" }),
|
|
107
|
+
/* @__PURE__ */ e("span", { children: "Log out" })
|
|
108
|
+
] })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }) }) }),
|
|
113
|
+
r.footer
|
|
114
|
+
] })
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
U as AppSidebar
|
|
121
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { SidebarProvider as i, SidebarInset as a } from "../atoms/sidebar.js";
|
|
3
|
+
import { AppSidebar as p } from "../molecules/app-sidebar.js";
|
|
4
|
+
import { AppNavbar as t } from "../molecules/app-navbar.js";
|
|
5
|
+
function s({ children: o }) {
|
|
6
|
+
return /* @__PURE__ */ e(i, { children: [
|
|
7
|
+
/* @__PURE__ */ r(p, {}),
|
|
8
|
+
/* @__PURE__ */ e(a, { children: [
|
|
9
|
+
/* @__PURE__ */ r(t, {}),
|
|
10
|
+
/* @__PURE__ */ r("div", { className: "flex flex-1 flex-col gap-4 p-4", children: o })
|
|
11
|
+
] })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
s as default
|
|
16
|
+
};
|