@sonamu-kit/react-components 0.1.0 → 0.1.2
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/index.d.ts +65 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/async-select.d.ts +36 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/breadcrumb.d.ts +19 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/calendar.d.ts +5 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/carousel.d.ts +18 -0
- package/dist/components/ui/checkbox.d.ts +8 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/combobox.d.ts +20 -0
- package/dist/components/ui/command.d.ts +80 -0
- package/dist/components/ui/common-modal.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts +27 -0
- package/dist/components/ui/date-input.d.ts +7 -0
- package/dist/components/ui/date-picker.d.ts +26 -0
- package/dist/components/ui/date-selector-multiple.d.ts +38 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/drawer.d.ts +22 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/form.d.ts +23 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/image-uploader.d.ts +14 -0
- package/dist/components/ui/input-otp.d.ts +34 -0
- package/dist/components/ui/input.d.ts +7 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/menubar.d.ts +28 -0
- package/dist/components/ui/month-picker-multiple.d.ts +41 -0
- package/dist/components/ui/multi-image-uploader.d.ts +15 -0
- package/dist/components/ui/multi-select.d.ts +229 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/pagination.d.ts +10 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/resizable.d.ts +23 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +20 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/slider.d.ts +8 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/table.d.ts +24 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +7 -0
- package/dist/components/ui/toast.d.ts +15 -0
- package/dist/components/ui/toaster.d.ts +1 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-toast.d.ts +44 -0
- package/dist/index.d.ts +3 -0
- package/dist/lib/caster.d.ts +3 -0
- package/dist/lib/helpers.d.ts +72 -0
- package/dist/lib/index.d.ts +6 -0
- package/{src/lib/lazy-upload.ts → dist/lib/lazy-upload.d.ts} +1 -12
- package/dist/lib/use-mobile.d.ts +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/react-components.es.js +28375 -0
- package/package.json +105 -76
- package/COMPONENTS_LIST.md +0 -106
- package/COMPONENTS_STATUS.md +0 -114
- package/HELPERS_GUIDE.md +0 -489
- package/MIGRATION_PLAN.md +0 -404
- package/SETUP_GUIDE.md +0 -125
- package/components.json +0 -21
- package/postcss.config.js +0 -6
- package/src/components/index.ts +0 -315
- package/src/components/ui/accordion.tsx +0 -54
- package/src/components/ui/alert-dialog.tsx +0 -115
- package/src/components/ui/alert.tsx +0 -49
- package/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/components/ui/async-select.tsx +0 -186
- package/src/components/ui/avatar.tsx +0 -45
- package/src/components/ui/badge.tsx +0 -38
- package/src/components/ui/breadcrumb.tsx +0 -102
- package/src/components/ui/button.tsx +0 -54
- package/src/components/ui/calendar.tsx +0 -193
- package/src/components/ui/card.tsx +0 -65
- package/src/components/ui/carousel.tsx +0 -243
- package/src/components/ui/checkbox.tsx +0 -67
- package/src/components/ui/collapsible.tsx +0 -9
- package/src/components/ui/combobox.tsx +0 -135
- package/src/components/ui/command.tsx +0 -143
- package/src/components/ui/common-modal.tsx +0 -95
- package/src/components/ui/context-menu.tsx +0 -189
- package/src/components/ui/date-picker.tsx +0 -112
- package/src/components/ui/date-selector-multiple.tsx +0 -197
- package/src/components/ui/dialog.tsx +0 -104
- package/src/components/ui/drawer.tsx +0 -100
- package/src/components/ui/dropdown-menu.tsx +0 -189
- package/src/components/ui/form.tsx +0 -171
- package/src/components/ui/hover-card.tsx +0 -27
- package/src/components/ui/image-uploader.tsx +0 -251
- package/src/components/ui/input-otp.tsx +0 -69
- package/src/components/ui/input.tsx +0 -38
- package/src/components/ui/label.tsx +0 -19
- package/src/components/ui/menubar.tsx +0 -231
- package/src/components/ui/month-picker-multiple.tsx +0 -351
- package/src/components/ui/multi-image-uploader.tsx +0 -283
- package/src/components/ui/multi-select.tsx +0 -1143
- package/src/components/ui/navigation-menu.tsx +0 -120
- package/src/components/ui/pagination.tsx +0 -72
- package/src/components/ui/popover.tsx +0 -42
- package/src/components/ui/progress.tsx +0 -25
- package/src/components/ui/radio-group.tsx +0 -38
- package/src/components/ui/resizable.tsx +0 -42
- package/src/components/ui/scroll-area.tsx +0 -46
- package/src/components/ui/select.tsx +0 -235
- package/src/components/ui/separator.tsx +0 -24
- package/src/components/ui/sheet.tsx +0 -119
- package/src/components/ui/sidebar.tsx +0 -683
- package/src/components/ui/skeleton.tsx +0 -7
- package/src/components/ui/slider.tsx +0 -57
- package/src/components/ui/sonner.tsx +0 -39
- package/src/components/ui/switch.tsx +0 -63
- package/src/components/ui/table.tsx +0 -94
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -34
- package/src/components/ui/toast.tsx +0 -122
- package/src/components/ui/toaster.tsx +0 -29
- package/src/components/ui/toggle-group.tsx +0 -55
- package/src/components/ui/toggle.tsx +0 -41
- package/src/components/ui/tooltip.tsx +0 -28
- package/src/hooks/index.ts +0 -2
- package/src/hooks/use-toast.ts +0 -189
- package/src/icons.d.ts +0 -1
- package/src/index.ts +0 -4
- package/src/lib/caster.ts +0 -66
- package/src/lib/helpers.ts +0 -394
- package/src/lib/index.ts +0 -31
- package/src/lib/use-mobile.ts +0 -19
- package/src/lib/utils.ts +0 -6
- package/src/styles/globals.css +0 -658
- package/tailwind.config.ts +0 -8
- package/tsconfig.json +0 -31
- package/tsconfig.node.json +0 -11
package/src/components/index.ts
DELETED
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
// TODO: ButtonProps, BadgeProps, ToggleProps 타입이 없음.
|
|
2
|
-
// UI Components - Form & Input
|
|
3
|
-
export { Button, buttonVariants } from "./ui/button";
|
|
4
|
-
|
|
5
|
-
// export type { ButtonProps } from "./ui/button";
|
|
6
|
-
|
|
7
|
-
export type { DateRange } from "react-day-picker";
|
|
8
|
-
// Hooks
|
|
9
|
-
export { toast, useToast } from "../hooks/use-toast";
|
|
10
|
-
export {
|
|
11
|
-
Accordion,
|
|
12
|
-
AccordionContent,
|
|
13
|
-
AccordionItem,
|
|
14
|
-
AccordionTrigger,
|
|
15
|
-
} from "./ui/accordion";
|
|
16
|
-
export { Alert, AlertDescription, AlertTitle } from "./ui/alert";
|
|
17
|
-
export {
|
|
18
|
-
AlertDialog,
|
|
19
|
-
AlertDialogAction,
|
|
20
|
-
AlertDialogCancel,
|
|
21
|
-
AlertDialogContent,
|
|
22
|
-
AlertDialogDescription,
|
|
23
|
-
AlertDialogFooter,
|
|
24
|
-
AlertDialogHeader,
|
|
25
|
-
AlertDialogOverlay,
|
|
26
|
-
AlertDialogPortal,
|
|
27
|
-
AlertDialogTitle,
|
|
28
|
-
AlertDialogTrigger,
|
|
29
|
-
} from "./ui/alert-dialog";
|
|
30
|
-
export { AspectRatio } from "./ui/aspect-ratio";
|
|
31
|
-
export type { AsyncSelectOption, AsyncSelectProps } from "./ui/async-select";
|
|
32
|
-
export { AsyncSelect } from "./ui/async-select";
|
|
33
|
-
// export type { BadgeProps } from "./ui/badge";
|
|
34
|
-
export { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar";
|
|
35
|
-
export { Badge, badgeVariants } from "./ui/badge";
|
|
36
|
-
export {
|
|
37
|
-
Breadcrumb,
|
|
38
|
-
BreadcrumbEllipsis,
|
|
39
|
-
BreadcrumbItem,
|
|
40
|
-
BreadcrumbLink,
|
|
41
|
-
BreadcrumbList,
|
|
42
|
-
BreadcrumbPage,
|
|
43
|
-
BreadcrumbSeparator,
|
|
44
|
-
} from "./ui/breadcrumb";
|
|
45
|
-
// Date & Time
|
|
46
|
-
export { Calendar } from "./ui/calendar";
|
|
47
|
-
export {
|
|
48
|
-
Card,
|
|
49
|
-
CardAction,
|
|
50
|
-
CardContent,
|
|
51
|
-
CardDescription,
|
|
52
|
-
CardFooter,
|
|
53
|
-
CardHeader,
|
|
54
|
-
CardTitle,
|
|
55
|
-
} from "./ui/card";
|
|
56
|
-
// Other
|
|
57
|
-
export {
|
|
58
|
-
Carousel,
|
|
59
|
-
CarouselContent,
|
|
60
|
-
CarouselItem,
|
|
61
|
-
CarouselNext,
|
|
62
|
-
CarouselPrevious,
|
|
63
|
-
} from "./ui/carousel";
|
|
64
|
-
export { Checkbox } from "./ui/checkbox";
|
|
65
|
-
export {
|
|
66
|
-
Collapsible,
|
|
67
|
-
CollapsibleContent,
|
|
68
|
-
CollapsibleTrigger,
|
|
69
|
-
} from "./ui/collapsible";
|
|
70
|
-
export type { ComboboxOption } from "./ui/combobox";
|
|
71
|
-
export { Combobox } from "./ui/combobox";
|
|
72
|
-
export {
|
|
73
|
-
Command,
|
|
74
|
-
CommandDialog,
|
|
75
|
-
CommandEmpty,
|
|
76
|
-
CommandGroup,
|
|
77
|
-
CommandInput,
|
|
78
|
-
CommandItem,
|
|
79
|
-
CommandList,
|
|
80
|
-
CommandSeparator,
|
|
81
|
-
CommandShortcut,
|
|
82
|
-
} from "./ui/command";
|
|
83
|
-
// Common Modal
|
|
84
|
-
export {
|
|
85
|
-
CommonModal,
|
|
86
|
-
commonModalAtom,
|
|
87
|
-
useCommonModal,
|
|
88
|
-
} from "./ui/common-modal";
|
|
89
|
-
export {
|
|
90
|
-
ContextMenu,
|
|
91
|
-
ContextMenuCheckboxItem,
|
|
92
|
-
ContextMenuContent,
|
|
93
|
-
ContextMenuGroup,
|
|
94
|
-
ContextMenuItem,
|
|
95
|
-
ContextMenuLabel,
|
|
96
|
-
ContextMenuPortal,
|
|
97
|
-
ContextMenuRadioGroup,
|
|
98
|
-
ContextMenuRadioItem,
|
|
99
|
-
ContextMenuSeparator,
|
|
100
|
-
ContextMenuShortcut,
|
|
101
|
-
ContextMenuSub,
|
|
102
|
-
ContextMenuSubContent,
|
|
103
|
-
ContextMenuSubTrigger,
|
|
104
|
-
ContextMenuTrigger,
|
|
105
|
-
} from "./ui/context-menu";
|
|
106
|
-
export { DatePicker, DatePickerWithDropdown } from "./ui/date-picker";
|
|
107
|
-
export type { DateSelectorValue } from "./ui/date-selector-multiple";
|
|
108
|
-
export { DateSelectorMultiple } from "./ui/date-selector-multiple";
|
|
109
|
-
// Feedback & Overlay
|
|
110
|
-
export {
|
|
111
|
-
Dialog,
|
|
112
|
-
DialogClose,
|
|
113
|
-
DialogContent,
|
|
114
|
-
DialogDescription,
|
|
115
|
-
DialogFooter,
|
|
116
|
-
DialogHeader,
|
|
117
|
-
DialogOverlay,
|
|
118
|
-
DialogPortal,
|
|
119
|
-
DialogTitle,
|
|
120
|
-
DialogTrigger,
|
|
121
|
-
} from "./ui/dialog";
|
|
122
|
-
export {
|
|
123
|
-
Drawer,
|
|
124
|
-
DrawerClose,
|
|
125
|
-
DrawerContent,
|
|
126
|
-
DrawerDescription,
|
|
127
|
-
DrawerFooter,
|
|
128
|
-
DrawerHeader,
|
|
129
|
-
DrawerOverlay,
|
|
130
|
-
DrawerPortal,
|
|
131
|
-
DrawerTitle,
|
|
132
|
-
DrawerTrigger,
|
|
133
|
-
} from "./ui/drawer";
|
|
134
|
-
// Menus
|
|
135
|
-
export {
|
|
136
|
-
DropdownMenu,
|
|
137
|
-
DropdownMenuCheckboxItem,
|
|
138
|
-
DropdownMenuContent,
|
|
139
|
-
DropdownMenuGroup,
|
|
140
|
-
DropdownMenuItem,
|
|
141
|
-
DropdownMenuLabel,
|
|
142
|
-
DropdownMenuPortal,
|
|
143
|
-
DropdownMenuRadioGroup,
|
|
144
|
-
DropdownMenuRadioItem,
|
|
145
|
-
DropdownMenuSeparator,
|
|
146
|
-
DropdownMenuShortcut,
|
|
147
|
-
DropdownMenuSub,
|
|
148
|
-
DropdownMenuSubContent,
|
|
149
|
-
DropdownMenuSubTrigger,
|
|
150
|
-
DropdownMenuTrigger,
|
|
151
|
-
} from "./ui/dropdown-menu";
|
|
152
|
-
export {
|
|
153
|
-
Form,
|
|
154
|
-
FormControl,
|
|
155
|
-
FormDescription,
|
|
156
|
-
FormField,
|
|
157
|
-
FormItem,
|
|
158
|
-
FormLabel,
|
|
159
|
-
FormMessage,
|
|
160
|
-
useFormField,
|
|
161
|
-
} from "./ui/form";
|
|
162
|
-
export { HoverCard, HoverCardContent, HoverCardTrigger } from "./ui/hover-card";
|
|
163
|
-
export type { ImageUploaderProps } from "./ui/image-uploader";
|
|
164
|
-
export { ImageUploader } from "./ui/image-uploader";
|
|
165
|
-
export { Input } from "./ui/input";
|
|
166
|
-
export {
|
|
167
|
-
InputOTP,
|
|
168
|
-
InputOTPGroup,
|
|
169
|
-
InputOTPSeparator,
|
|
170
|
-
InputOTPSlot,
|
|
171
|
-
} from "./ui/input-otp";
|
|
172
|
-
export { Label } from "./ui/label";
|
|
173
|
-
export {
|
|
174
|
-
Menubar,
|
|
175
|
-
MenubarCheckboxItem,
|
|
176
|
-
MenubarContent,
|
|
177
|
-
MenubarGroup,
|
|
178
|
-
MenubarItem,
|
|
179
|
-
MenubarLabel,
|
|
180
|
-
MenubarMenu,
|
|
181
|
-
MenubarPortal,
|
|
182
|
-
MenubarRadioGroup,
|
|
183
|
-
MenubarRadioItem,
|
|
184
|
-
MenubarSeparator,
|
|
185
|
-
MenubarShortcut,
|
|
186
|
-
MenubarSub,
|
|
187
|
-
MenubarSubContent,
|
|
188
|
-
MenubarSubTrigger,
|
|
189
|
-
MenubarTrigger,
|
|
190
|
-
} from "./ui/menubar";
|
|
191
|
-
export type { MonthPickerValue } from "./ui/month-picker-multiple";
|
|
192
|
-
export { MonthPickerMultiple } from "./ui/month-picker-multiple";
|
|
193
|
-
export type { MultiImageUploaderProps } from "./ui/multi-image-uploader";
|
|
194
|
-
export { MultiImageUploader } from "./ui/multi-image-uploader";
|
|
195
|
-
export type {
|
|
196
|
-
MultiSelectOption,
|
|
197
|
-
MultiSelectProps,
|
|
198
|
-
MultiSelectRef,
|
|
199
|
-
} from "./ui/multi-select";
|
|
200
|
-
export { MultiSelect } from "./ui/multi-select";
|
|
201
|
-
export {
|
|
202
|
-
NavigationMenu,
|
|
203
|
-
NavigationMenuContent,
|
|
204
|
-
NavigationMenuIndicator,
|
|
205
|
-
NavigationMenuItem,
|
|
206
|
-
NavigationMenuLink,
|
|
207
|
-
NavigationMenuList,
|
|
208
|
-
NavigationMenuTrigger,
|
|
209
|
-
NavigationMenuViewport,
|
|
210
|
-
navigationMenuTriggerStyle,
|
|
211
|
-
} from "./ui/navigation-menu";
|
|
212
|
-
export { Pagination } from "./ui/pagination";
|
|
213
|
-
export {
|
|
214
|
-
Popover,
|
|
215
|
-
PopoverAnchor,
|
|
216
|
-
PopoverContent,
|
|
217
|
-
PopoverTrigger,
|
|
218
|
-
} from "./ui/popover";
|
|
219
|
-
export { Progress } from "./ui/progress";
|
|
220
|
-
export { RadioGroup, RadioGroupItem } from "./ui/radio-group";
|
|
221
|
-
export {
|
|
222
|
-
ResizableHandle,
|
|
223
|
-
ResizablePanel,
|
|
224
|
-
ResizablePanelGroup,
|
|
225
|
-
} from "./ui/resizable";
|
|
226
|
-
// Layout
|
|
227
|
-
export { ScrollArea, ScrollBar } from "./ui/scroll-area";
|
|
228
|
-
export {
|
|
229
|
-
Select,
|
|
230
|
-
SelectContent,
|
|
231
|
-
SelectGroup,
|
|
232
|
-
SelectItem,
|
|
233
|
-
SelectLabel,
|
|
234
|
-
SelectScrollDownButton,
|
|
235
|
-
SelectScrollUpButton,
|
|
236
|
-
SelectSeparator,
|
|
237
|
-
SelectTrigger,
|
|
238
|
-
SelectValue,
|
|
239
|
-
} from "./ui/select";
|
|
240
|
-
export { Separator } from "./ui/separator";
|
|
241
|
-
export {
|
|
242
|
-
Sheet,
|
|
243
|
-
SheetClose,
|
|
244
|
-
SheetContent,
|
|
245
|
-
SheetDescription,
|
|
246
|
-
SheetFooter,
|
|
247
|
-
SheetHeader,
|
|
248
|
-
SheetOverlay,
|
|
249
|
-
SheetPortal,
|
|
250
|
-
SheetTitle,
|
|
251
|
-
SheetTrigger,
|
|
252
|
-
} from "./ui/sheet";
|
|
253
|
-
// Sidebar
|
|
254
|
-
export {
|
|
255
|
-
Sidebar,
|
|
256
|
-
SidebarContent,
|
|
257
|
-
SidebarFooter,
|
|
258
|
-
SidebarGroup,
|
|
259
|
-
SidebarGroupAction,
|
|
260
|
-
SidebarGroupContent,
|
|
261
|
-
SidebarGroupLabel,
|
|
262
|
-
SidebarHeader,
|
|
263
|
-
SidebarInput,
|
|
264
|
-
SidebarInset,
|
|
265
|
-
SidebarMenu,
|
|
266
|
-
SidebarMenuAction,
|
|
267
|
-
SidebarMenuBadge,
|
|
268
|
-
SidebarMenuButton,
|
|
269
|
-
SidebarMenuItem,
|
|
270
|
-
SidebarMenuSkeleton,
|
|
271
|
-
SidebarMenuSub,
|
|
272
|
-
SidebarMenuSubButton,
|
|
273
|
-
SidebarMenuSubItem,
|
|
274
|
-
SidebarProvider,
|
|
275
|
-
SidebarRail,
|
|
276
|
-
SidebarSeparator,
|
|
277
|
-
SidebarTrigger,
|
|
278
|
-
useSidebar,
|
|
279
|
-
} from "./ui/sidebar";
|
|
280
|
-
export { Skeleton } from "./ui/skeleton";
|
|
281
|
-
export { Slider } from "./ui/slider";
|
|
282
|
-
export { Switch } from "./ui/switch";
|
|
283
|
-
// Data Display
|
|
284
|
-
export {
|
|
285
|
-
Table,
|
|
286
|
-
TableBody,
|
|
287
|
-
TableCaption,
|
|
288
|
-
TableCell,
|
|
289
|
-
TableFooter,
|
|
290
|
-
TableHead,
|
|
291
|
-
TableHeader,
|
|
292
|
-
TableRow,
|
|
293
|
-
} from "./ui/table";
|
|
294
|
-
// Navigation
|
|
295
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
|
|
296
|
-
export { Textarea } from "./ui/textarea";
|
|
297
|
-
export {
|
|
298
|
-
Toast,
|
|
299
|
-
ToastAction,
|
|
300
|
-
ToastClose,
|
|
301
|
-
ToastDescription,
|
|
302
|
-
ToastProvider,
|
|
303
|
-
ToastTitle,
|
|
304
|
-
ToastViewport,
|
|
305
|
-
} from "./ui/toast";
|
|
306
|
-
export { Toaster } from "./ui/toaster";
|
|
307
|
-
export { Toggle, toggleVariants } from "./ui/toggle";
|
|
308
|
-
// export type { ToggleProps } from "./ui/toggle";
|
|
309
|
-
export { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group";
|
|
310
|
-
export {
|
|
311
|
-
Tooltip,
|
|
312
|
-
TooltipContent,
|
|
313
|
-
TooltipProvider,
|
|
314
|
-
TooltipTrigger,
|
|
315
|
-
} from "./ui/tooltip";
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import ChevronDownIcon from "~icons/lucide/chevron-down";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils";
|
|
8
|
-
|
|
9
|
-
const Accordion = AccordionPrimitive.Root;
|
|
10
|
-
|
|
11
|
-
const AccordionItem = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
14
|
-
>(({ className, ...props }, ref) => (
|
|
15
|
-
<AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
|
|
16
|
-
));
|
|
17
|
-
AccordionItem.displayName = "AccordionItem";
|
|
18
|
-
|
|
19
|
-
const AccordionTrigger = React.forwardRef<
|
|
20
|
-
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
21
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
22
|
-
>(({ className, children, ...props }, ref) => (
|
|
23
|
-
<AccordionPrimitive.Header className="flex">
|
|
24
|
-
<AccordionPrimitive.Trigger
|
|
25
|
-
ref={ref}
|
|
26
|
-
className={cn(
|
|
27
|
-
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
28
|
-
className,
|
|
29
|
-
)}
|
|
30
|
-
{...props}
|
|
31
|
-
>
|
|
32
|
-
{children}
|
|
33
|
-
<ChevronDownIcon className="h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
34
|
-
</AccordionPrimitive.Trigger>
|
|
35
|
-
</AccordionPrimitive.Header>
|
|
36
|
-
));
|
|
37
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
38
|
-
|
|
39
|
-
const AccordionContent = React.forwardRef<
|
|
40
|
-
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
41
|
-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
42
|
-
>(({ className, children, ...props }, ref) => (
|
|
43
|
-
<AccordionPrimitive.Content
|
|
44
|
-
ref={ref}
|
|
45
|
-
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
<div className={cn("pb-4 pt-0", className)}>{children}</div>
|
|
49
|
-
</AccordionPrimitive.Content>
|
|
50
|
-
));
|
|
51
|
-
|
|
52
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
53
|
-
|
|
54
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { buttonVariants } from "./button";
|
|
6
|
-
|
|
7
|
-
const AlertDialog = AlertDialogPrimitive.Root;
|
|
8
|
-
|
|
9
|
-
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
10
|
-
|
|
11
|
-
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
12
|
-
|
|
13
|
-
const AlertDialogOverlay = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
15
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
16
|
-
>(({ className, ...props }, ref) => (
|
|
17
|
-
<AlertDialogPrimitive.Overlay
|
|
18
|
-
className={cn(
|
|
19
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
ref={ref}
|
|
24
|
-
/>
|
|
25
|
-
));
|
|
26
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
27
|
-
|
|
28
|
-
const AlertDialogContent = React.forwardRef<
|
|
29
|
-
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
30
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
31
|
-
>(({ className, ...props }, ref) => (
|
|
32
|
-
<AlertDialogPortal>
|
|
33
|
-
<AlertDialogOverlay />
|
|
34
|
-
<AlertDialogPrimitive.Content
|
|
35
|
-
ref={ref}
|
|
36
|
-
className={cn(
|
|
37
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
</AlertDialogPortal>
|
|
43
|
-
));
|
|
44
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
45
|
-
|
|
46
|
-
const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
47
|
-
<div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
|
|
48
|
-
);
|
|
49
|
-
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
50
|
-
|
|
51
|
-
const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
52
|
-
<div
|
|
53
|
-
className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
);
|
|
57
|
-
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
58
|
-
|
|
59
|
-
const AlertDialogTitle = React.forwardRef<
|
|
60
|
-
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
62
|
-
>(({ className, ...props }, ref) => (
|
|
63
|
-
<AlertDialogPrimitive.Title
|
|
64
|
-
ref={ref}
|
|
65
|
-
className={cn("text-lg font-semibold", className)}
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
68
|
-
));
|
|
69
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
70
|
-
|
|
71
|
-
const AlertDialogDescription = React.forwardRef<
|
|
72
|
-
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
73
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
74
|
-
>(({ className, ...props }, ref) => (
|
|
75
|
-
<AlertDialogPrimitive.Description
|
|
76
|
-
ref={ref}
|
|
77
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
78
|
-
{...props}
|
|
79
|
-
/>
|
|
80
|
-
));
|
|
81
|
-
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
82
|
-
|
|
83
|
-
const AlertDialogAction = React.forwardRef<
|
|
84
|
-
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
85
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
86
|
-
>(({ className, ...props }, ref) => (
|
|
87
|
-
<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
|
|
88
|
-
));
|
|
89
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
90
|
-
|
|
91
|
-
const AlertDialogCancel = React.forwardRef<
|
|
92
|
-
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
93
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
94
|
-
>(({ className, ...props }, ref) => (
|
|
95
|
-
<AlertDialogPrimitive.Cancel
|
|
96
|
-
ref={ref}
|
|
97
|
-
className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
));
|
|
101
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
102
|
-
|
|
103
|
-
export {
|
|
104
|
-
AlertDialog,
|
|
105
|
-
AlertDialogPortal,
|
|
106
|
-
AlertDialogOverlay,
|
|
107
|
-
AlertDialogTrigger,
|
|
108
|
-
AlertDialogContent,
|
|
109
|
-
AlertDialogHeader,
|
|
110
|
-
AlertDialogFooter,
|
|
111
|
-
AlertDialogTitle,
|
|
112
|
-
AlertDialogDescription,
|
|
113
|
-
AlertDialogAction,
|
|
114
|
-
AlertDialogCancel,
|
|
115
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
const alertVariants = cva(
|
|
7
|
-
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-background text-foreground",
|
|
12
|
-
destructive:
|
|
13
|
-
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: "default",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const Alert = React.forwardRef<
|
|
23
|
-
HTMLDivElement,
|
|
24
|
-
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
25
|
-
>(({ className, variant, ...props }, ref) => (
|
|
26
|
-
<div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
|
|
27
|
-
));
|
|
28
|
-
Alert.displayName = "Alert";
|
|
29
|
-
|
|
30
|
-
const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
|
|
31
|
-
({ className, ...props }, ref) => (
|
|
32
|
-
<h5
|
|
33
|
-
ref={ref}
|
|
34
|
-
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
),
|
|
38
|
-
);
|
|
39
|
-
AlertTitle.displayName = "AlertTitle";
|
|
40
|
-
|
|
41
|
-
const AlertDescription = React.forwardRef<
|
|
42
|
-
HTMLParagraphElement,
|
|
43
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
44
|
-
>(({ className, ...props }, ref) => (
|
|
45
|
-
<div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} />
|
|
46
|
-
));
|
|
47
|
-
AlertDescription.displayName = "AlertDescription";
|
|
48
|
-
|
|
49
|
-
export { Alert, AlertTitle, AlertDescription };
|