@spavn/ui 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/cli/commands/add.d.ts +5 -0
- package/cli/commands/add.d.ts.map +1 -0
- package/cli/commands/add.js +104 -0
- package/cli/commands/add.js.map +1 -0
- package/cli/commands/init.d.ts +5 -0
- package/cli/commands/init.d.ts.map +1 -0
- package/cli/commands/init.js +129 -0
- package/cli/commands/init.js.map +1 -0
- package/cli/index.d.ts +3 -0
- package/cli/index.d.ts.map +1 -0
- package/cli/index.js +27 -0
- package/cli/index.js.map +1 -0
- package/cli/registry.d.ts +12 -0
- package/cli/registry.d.ts.map +1 -0
- package/cli/registry.js +1112 -0
- package/cli/registry.js.map +1 -0
- package/dist/index.js +7492 -0
- package/dist/index.umd.cjs +122 -0
- package/dist/style.css +1 -0
- package/mcp-server/index.d.ts +3 -0
- package/mcp-server/index.d.ts.map +1 -0
- package/mcp-server/index.js +1266 -0
- package/mcp-server/index.js.map +1 -0
- package/package.json +91 -0
- package/src/index.ts +432 -0
- package/src/lib/accordion/Accordion.test.ts +109 -0
- package/src/lib/accordion/Accordion.vue +11 -0
- package/src/lib/accordion/AccordionContent.vue +23 -0
- package/src/lib/accordion/AccordionItem.vue +16 -0
- package/src/lib/accordion/AccordionTrigger.vue +37 -0
- package/src/lib/accordion/index.ts +4 -0
- package/src/lib/alert/Alert.test.ts +144 -0
- package/src/lib/alert/Alert.vue +17 -0
- package/src/lib/alert/AlertDescription.vue +15 -0
- package/src/lib/alert/AlertTitle.vue +15 -0
- package/src/lib/alert/variants.test.ts +47 -0
- package/src/lib/alert/variants.ts +19 -0
- package/src/lib/alert-dialog/AlertDialog.vue +11 -0
- package/src/lib/alert-dialog/AlertDialogAction.vue +23 -0
- package/src/lib/alert-dialog/AlertDialogCancel.vue +24 -0
- package/src/lib/alert-dialog/AlertDialogContent.vue +33 -0
- package/src/lib/alert-dialog/AlertDialogDescription.vue +16 -0
- package/src/lib/alert-dialog/AlertDialogFooter.vue +17 -0
- package/src/lib/alert-dialog/AlertDialogHeader.vue +17 -0
- package/src/lib/alert-dialog/AlertDialogOverlay.vue +21 -0
- package/src/lib/alert-dialog/AlertDialogPortal.vue +11 -0
- package/src/lib/alert-dialog/AlertDialogTitle.vue +16 -0
- package/src/lib/alert-dialog/AlertDialogTrigger.vue +11 -0
- package/src/lib/alert-dialog/index.ts +11 -0
- package/src/lib/aspect-ratio/AspectRatio.vue +11 -0
- package/src/lib/aspect-ratio/index.ts +1 -0
- package/src/lib/avatar/Avatar.test.ts +58 -0
- package/src/lib/avatar/Avatar.vue +20 -0
- package/src/lib/avatar/AvatarFallback.vue +20 -0
- package/src/lib/avatar/AvatarImage.vue +10 -0
- package/src/lib/avatar/index.ts +3 -0
- package/src/lib/badge/Badge.test.ts +77 -0
- package/src/lib/badge/Badge.vue +20 -0
- package/src/lib/badge/index.ts +2 -0
- package/src/lib/badge/variants.test.ts +73 -0
- package/src/lib/badge/variants.ts +26 -0
- package/src/lib/breadcrumb/Breadcrumb.vue +13 -0
- package/src/lib/breadcrumb/BreadcrumbEllipsis.vue +35 -0
- package/src/lib/breadcrumb/BreadcrumbItem.vue +15 -0
- package/src/lib/breadcrumb/BreadcrumbLink.vue +21 -0
- package/src/lib/breadcrumb/BreadcrumbList.vue +22 -0
- package/src/lib/breadcrumb/BreadcrumbPage.vue +20 -0
- package/src/lib/breadcrumb/BreadcrumbSeparator.vue +34 -0
- package/src/lib/breadcrumb/index.ts +7 -0
- package/src/lib/button/Button.test.ts +84 -0
- package/src/lib/button/Button.vue +63 -0
- package/src/lib/button/index.ts +2 -0
- package/src/lib/button/variants.test.ts +128 -0
- package/src/lib/button/variants.ts +66 -0
- package/src/lib/button-group/ButtonGroup.vue +25 -0
- package/src/lib/button-group/index.ts +1 -0
- package/src/lib/calendar/Calendar.vue +58 -0
- package/src/lib/calendar/CalendarCell.vue +22 -0
- package/src/lib/calendar/CalendarCellTrigger.vue +28 -0
- package/src/lib/calendar/CalendarGrid.vue +16 -0
- package/src/lib/calendar/CalendarGridBody.vue +11 -0
- package/src/lib/calendar/CalendarGridHead.vue +11 -0
- package/src/lib/calendar/CalendarGridRow.vue +16 -0
- package/src/lib/calendar/CalendarHeadCell.vue +16 -0
- package/src/lib/calendar/CalendarHeader.vue +16 -0
- package/src/lib/calendar/CalendarHeading.vue +16 -0
- package/src/lib/calendar/CalendarNext.vue +37 -0
- package/src/lib/calendar/CalendarPrev.vue +37 -0
- package/src/lib/calendar/index.ts +12 -0
- package/src/lib/card/Card.test.ts +202 -0
- package/src/lib/card/Card.vue +36 -0
- package/src/lib/card/CardContent.vue +15 -0
- package/src/lib/card/CardDescription.vue +15 -0
- package/src/lib/card/CardFooter.vue +16 -0
- package/src/lib/card/CardHeader.vue +15 -0
- package/src/lib/card/CardTitle.vue +15 -0
- package/src/lib/card/index.ts +6 -0
- package/src/lib/carousel/Carousel.vue +73 -0
- package/src/lib/carousel/CarouselContent.vue +55 -0
- package/src/lib/carousel/CarouselItem.vue +25 -0
- package/src/lib/carousel/CarouselNext.vue +40 -0
- package/src/lib/carousel/CarouselPrevious.vue +40 -0
- package/src/lib/carousel/index.ts +6 -0
- package/src/lib/carousel/useCarousel.ts +24 -0
- package/src/lib/checkbox/Checkbox.test.ts +45 -0
- package/src/lib/checkbox/Checkbox.vue +39 -0
- package/src/lib/code-preview/CodePreview.vue +95 -0
- package/src/lib/collapsible/Collapsible.test.ts +95 -0
- package/src/lib/collapsible/Collapsible.vue +11 -0
- package/src/lib/collapsible/CollapsibleContent.vue +21 -0
- package/src/lib/collapsible/CollapsibleTrigger.vue +11 -0
- package/src/lib/collapsible/index.ts +3 -0
- package/src/lib/command/Command.vue +21 -0
- package/src/lib/command/CommandDialog.vue +25 -0
- package/src/lib/command/CommandEmpty.vue +16 -0
- package/src/lib/command/CommandGroup.vue +21 -0
- package/src/lib/command/CommandInput.vue +35 -0
- package/src/lib/command/CommandItem.vue +23 -0
- package/src/lib/command/CommandLabel.vue +16 -0
- package/src/lib/command/CommandList.vue +16 -0
- package/src/lib/command/CommandSeparator.vue +14 -0
- package/src/lib/command/index.ts +9 -0
- package/src/lib/context-menu/ContextMenu.vue +11 -0
- package/src/lib/context-menu/ContextMenuCheckboxItem.vue +45 -0
- package/src/lib/context-menu/ContextMenuContent.vue +31 -0
- package/src/lib/context-menu/ContextMenuGroup.vue +11 -0
- package/src/lib/context-menu/ContextMenuItem.vue +24 -0
- package/src/lib/context-menu/ContextMenuLabel.vue +16 -0
- package/src/lib/context-menu/ContextMenuRadioGroup.vue +11 -0
- package/src/lib/context-menu/ContextMenuRadioItem.vue +44 -0
- package/src/lib/context-menu/ContextMenuSeparator.vue +14 -0
- package/src/lib/context-menu/ContextMenuShortcut.vue +11 -0
- package/src/lib/context-menu/ContextMenuSub.vue +11 -0
- package/src/lib/context-menu/ContextMenuSubContent.vue +28 -0
- package/src/lib/context-menu/ContextMenuSubTrigger.vue +36 -0
- package/src/lib/context-menu/ContextMenuTrigger.vue +11 -0
- package/src/lib/context-menu/index.ts +14 -0
- package/src/lib/data-table/DataTable.vue +226 -0
- package/src/lib/date-range-picker/DateRangePicker.vue +201 -0
- package/src/lib/date-time-picker/DateTimePicker.vue +159 -0
- package/src/lib/dialog/Dialog.test.ts +87 -0
- package/src/lib/dialog/Dialog.vue +14 -0
- package/src/lib/dialog/DialogClose.vue +11 -0
- package/src/lib/dialog/DialogContent.vue +56 -0
- package/src/lib/dialog/DialogDescription.vue +15 -0
- package/src/lib/dialog/DialogFooter.vue +17 -0
- package/src/lib/dialog/DialogHeader.vue +17 -0
- package/src/lib/dialog/DialogOverlay.vue +20 -0
- package/src/lib/dialog/DialogPortal.vue +11 -0
- package/src/lib/dialog/DialogTitle.vue +15 -0
- package/src/lib/dialog/DialogTrigger.vue +11 -0
- package/src/lib/dialog/index.ts +10 -0
- package/src/lib/direction/Direction.vue +13 -0
- package/src/lib/drawer/Drawer.vue +11 -0
- package/src/lib/drawer/DrawerClose.vue +11 -0
- package/src/lib/drawer/DrawerContent.vue +31 -0
- package/src/lib/drawer/DrawerDescription.vue +16 -0
- package/src/lib/drawer/DrawerFooter.vue +15 -0
- package/src/lib/drawer/DrawerHeader.vue +15 -0
- package/src/lib/drawer/DrawerOverlay.vue +21 -0
- package/src/lib/drawer/DrawerTitle.vue +16 -0
- package/src/lib/drawer/DrawerTrigger.vue +11 -0
- package/src/lib/drawer/index.ts +9 -0
- package/src/lib/dropdown-menu/DropdownMenu.test.ts +146 -0
- package/src/lib/dropdown-menu/DropdownMenu.vue +11 -0
- package/src/lib/dropdown-menu/DropdownMenuCheckboxItem.vue +45 -0
- package/src/lib/dropdown-menu/DropdownMenuContent.vue +31 -0
- package/src/lib/dropdown-menu/DropdownMenuGroup.vue +11 -0
- package/src/lib/dropdown-menu/DropdownMenuItem.vue +24 -0
- package/src/lib/dropdown-menu/DropdownMenuLabel.vue +16 -0
- package/src/lib/dropdown-menu/DropdownMenuRadioGroup.vue +11 -0
- package/src/lib/dropdown-menu/DropdownMenuRadioItem.vue +44 -0
- package/src/lib/dropdown-menu/DropdownMenuSeparator.vue +14 -0
- package/src/lib/dropdown-menu/DropdownMenuShortcut.vue +11 -0
- package/src/lib/dropdown-menu/DropdownMenuSub.vue +11 -0
- package/src/lib/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/src/lib/dropdown-menu/DropdownMenuSubTrigger.vue +36 -0
- package/src/lib/dropdown-menu/DropdownMenuTrigger.vue +11 -0
- package/src/lib/dropdown-menu/index.ts +14 -0
- package/src/lib/empty/Empty.vue +11 -0
- package/src/lib/empty/EmptyDescription.vue +11 -0
- package/src/lib/empty/EmptyIcon.vue +8 -0
- package/src/lib/empty/EmptyTitle.vue +11 -0
- package/src/lib/empty/index.ts +4 -0
- package/src/lib/feature-card/FeatureCard.vue +177 -0
- package/src/lib/feature-card/README.md +139 -0
- package/src/lib/feature-card/index.ts +1 -0
- package/src/lib/field/Field.vue +15 -0
- package/src/lib/field/FieldDescription.vue +15 -0
- package/src/lib/field/FieldError.vue +15 -0
- package/src/lib/field/FieldLabel.vue +24 -0
- package/src/lib/field/index.ts +4 -0
- package/src/lib/hover-card/HoverCard.vue +11 -0
- package/src/lib/hover-card/HoverCardContent.vue +31 -0
- package/src/lib/hover-card/HoverCardTrigger.vue +11 -0
- package/src/lib/hover-card/index.ts +3 -0
- package/src/lib/icon/Icon.vue +33 -0
- package/src/lib/input/Input.test.ts +71 -0
- package/src/lib/input/Input.vue +85 -0
- package/src/lib/input/index.ts +1 -0
- package/src/lib/input-group/InputGroup.vue +24 -0
- package/src/lib/input-group/InputGroupAddon.vue +25 -0
- package/src/lib/input-group/InputGroupInput.vue +38 -0
- package/src/lib/input-group/index.ts +3 -0
- package/src/lib/input-otp/InputOTP.vue +16 -0
- package/src/lib/input-otp/InputOTPGroup.vue +11 -0
- package/src/lib/input-otp/InputOTPSeparator.vue +8 -0
- package/src/lib/input-otp/InputOTPSlot.vue +20 -0
- package/src/lib/input-otp/index.ts +4 -0
- package/src/lib/kbd/Kbd.vue +11 -0
- package/src/lib/kbd/index.ts +1 -0
- package/src/lib/label/Label.test.ts +38 -0
- package/src/lib/label/Label.vue +20 -0
- package/src/lib/label/index.ts +1 -0
- package/src/lib/layout/AppFooter.vue +18 -0
- package/src/lib/layout/AppHeader.vue +22 -0
- package/src/lib/layout/AppLayout.vue +13 -0
- package/src/lib/layout/AppMain.vue +22 -0
- package/src/lib/layout/AppSidebar.vue +50 -0
- package/src/lib/menubar/Menubar.vue +21 -0
- package/src/lib/menubar/MenubarCheckboxItem.vue +45 -0
- package/src/lib/menubar/MenubarContent.vue +30 -0
- package/src/lib/menubar/MenubarGroup.vue +11 -0
- package/src/lib/menubar/MenubarItem.vue +24 -0
- package/src/lib/menubar/MenubarLabel.vue +16 -0
- package/src/lib/menubar/MenubarMenu.vue +11 -0
- package/src/lib/menubar/MenubarRadioGroup.vue +11 -0
- package/src/lib/menubar/MenubarRadioItem.vue +44 -0
- package/src/lib/menubar/MenubarSeparator.vue +14 -0
- package/src/lib/menubar/MenubarShortcut.vue +11 -0
- package/src/lib/menubar/MenubarSub.vue +11 -0
- package/src/lib/menubar/MenubarSubContent.vue +26 -0
- package/src/lib/menubar/MenubarSubTrigger.vue +36 -0
- package/src/lib/menubar/MenubarTrigger.vue +21 -0
- package/src/lib/menubar/index.ts +15 -0
- package/src/lib/modal/Modal.test.ts +81 -0
- package/src/lib/modal/Modal.vue +12 -0
- package/src/lib/modal/ModalClose.vue +9 -0
- package/src/lib/modal/ModalContent.vue +32 -0
- package/src/lib/modal/ModalTrigger.vue +11 -0
- package/src/lib/multi-select/MultiSelect.vue +186 -0
- package/src/lib/multi-select/MultiSelectItem.vue +47 -0
- package/src/lib/native-select/NativeSelect.vue +41 -0
- package/src/lib/native-select/index.ts +1 -0
- package/src/lib/navigation-menu/NavigationMenu.vue +23 -0
- package/src/lib/navigation-menu/NavigationMenuContent.vue +21 -0
- package/src/lib/navigation-menu/NavigationMenuIndicator.vue +21 -0
- package/src/lib/navigation-menu/NavigationMenuItem.vue +11 -0
- package/src/lib/navigation-menu/NavigationMenuLink.vue +23 -0
- package/src/lib/navigation-menu/NavigationMenuList.vue +21 -0
- package/src/lib/navigation-menu/NavigationMenuTrigger.vue +36 -0
- package/src/lib/navigation-menu/NavigationMenuViewport.vue +24 -0
- package/src/lib/navigation-menu/index.ts +8 -0
- package/src/lib/pagination/Pagination.vue +16 -0
- package/src/lib/pagination/PaginationContent.vue +16 -0
- package/src/lib/pagination/PaginationEllipsis.vue +27 -0
- package/src/lib/pagination/PaginationFirst.vue +25 -0
- package/src/lib/pagination/PaginationItem.vue +11 -0
- package/src/lib/pagination/PaginationLast.vue +25 -0
- package/src/lib/pagination/PaginationLink.vue +31 -0
- package/src/lib/pagination/PaginationNext.vue +24 -0
- package/src/lib/pagination/PaginationPrev.vue +24 -0
- package/src/lib/pagination/index.ts +9 -0
- package/src/lib/popover/Popover.test.ts +97 -0
- package/src/lib/popover/Popover.vue +11 -0
- package/src/lib/popover/PopoverContent.vue +31 -0
- package/src/lib/popover/PopoverTrigger.vue +11 -0
- package/src/lib/popover/index.ts +3 -0
- package/src/lib/progress/Progress.test.ts +59 -0
- package/src/lib/progress/Progress.vue +41 -0
- package/src/lib/progress/index.ts +1 -0
- package/src/lib/radio-group/RadioGroup.test.ts +45 -0
- package/src/lib/radio-group/RadioGroup.vue +16 -0
- package/src/lib/radio-group/RadioGroupItem.vue +35 -0
- package/src/lib/radio-group/index.ts +2 -0
- package/src/lib/resizable/ResizableHandle.vue +38 -0
- package/src/lib/resizable/ResizablePanel.vue +11 -0
- package/src/lib/resizable/ResizablePanelGroup.vue +16 -0
- package/src/lib/resizable/index.ts +3 -0
- package/src/lib/scroll-area/ScrollArea.vue +29 -0
- package/src/lib/scroll-area/ScrollBar.vue +26 -0
- package/src/lib/scroll-area/index.ts +2 -0
- package/src/lib/select/Select.vue +11 -0
- package/src/lib/select/SelectContent.vue +48 -0
- package/src/lib/select/SelectGroup.vue +11 -0
- package/src/lib/select/SelectItem.vue +41 -0
- package/src/lib/select/SelectLabel.vue +16 -0
- package/src/lib/select/SelectScrollDownButton.vue +29 -0
- package/src/lib/select/SelectScrollUpButton.vue +29 -0
- package/src/lib/select/SelectSeparator.vue +14 -0
- package/src/lib/select/SelectTrigger.vue +37 -0
- package/src/lib/select/SelectValue.vue +11 -0
- package/src/lib/select/index.ts +10 -0
- package/src/lib/separator/Separator.test.ts +47 -0
- package/src/lib/separator/Separator.vue +23 -0
- package/src/lib/separator/index.ts +1 -0
- package/src/lib/sheet/Sheet.test.ts +118 -0
- package/src/lib/sheet/Sheet.vue +11 -0
- package/src/lib/sheet/SheetClose.vue +11 -0
- package/src/lib/sheet/SheetContent.vue +68 -0
- package/src/lib/sheet/SheetDescription.vue +16 -0
- package/src/lib/sheet/SheetFooter.vue +15 -0
- package/src/lib/sheet/SheetHeader.vue +15 -0
- package/src/lib/sheet/SheetOverlay.vue +21 -0
- package/src/lib/sheet/SheetTitle.vue +16 -0
- package/src/lib/sheet/SheetTrigger.vue +11 -0
- package/src/lib/sheet/index.ts +9 -0
- package/src/lib/sidebar/Sidebar.vue +19 -0
- package/src/lib/sidebar/SidebarContent.vue +11 -0
- package/src/lib/sidebar/SidebarFooter.vue +11 -0
- package/src/lib/sidebar/SidebarGroup.vue +11 -0
- package/src/lib/sidebar/SidebarGroupLabel.vue +11 -0
- package/src/lib/sidebar/SidebarHeader.vue +11 -0
- package/src/lib/sidebar/SidebarInset.vue +11 -0
- package/src/lib/sidebar/SidebarMenu.vue +11 -0
- package/src/lib/sidebar/SidebarMenuButton.vue +20 -0
- package/src/lib/sidebar/SidebarMenuItem.vue +9 -0
- package/src/lib/sidebar/SidebarProvider.vue +23 -0
- package/src/lib/sidebar/SidebarSeparator.vue +9 -0
- package/src/lib/sidebar/SidebarTrigger.vue +24 -0
- package/src/lib/sidebar/context.ts +8 -0
- package/src/lib/sidebar/useSidebar.ts +10 -0
- package/src/lib/skeleton/Skeleton.test.ts +36 -0
- package/src/lib/skeleton/Skeleton.vue +9 -0
- package/src/lib/skeleton/index.ts +1 -0
- package/src/lib/slider/Slider.test.ts +63 -0
- package/src/lib/slider/Slider.vue +67 -0
- package/src/lib/slider/index.ts +1 -0
- package/src/lib/sonner/Toaster.vue +29 -0
- package/src/lib/spinner/Spinner.vue +34 -0
- package/src/lib/spinner/index.ts +1 -0
- package/src/lib/stats-card/StatsCard.vue +179 -0
- package/src/lib/stats-card/index.ts +2 -0
- package/src/lib/styles.ts +133 -0
- package/src/lib/switch/Switch.test.ts +52 -0
- package/src/lib/switch/Switch.vue +43 -0
- package/src/lib/table/Table.test.ts +150 -0
- package/src/lib/table/Table.vue +13 -0
- package/src/lib/table/TableBody.vue +11 -0
- package/src/lib/table/TableCaption.vue +11 -0
- package/src/lib/table/TableCell.vue +11 -0
- package/src/lib/table/TableFooter.vue +11 -0
- package/src/lib/table/TableHead.vue +11 -0
- package/src/lib/table/TableHeader.vue +11 -0
- package/src/lib/table/TableRow.vue +11 -0
- package/src/lib/table/index.ts +8 -0
- package/src/lib/tabs/Tabs.test.ts +150 -0
- package/src/lib/tabs/Tabs.vue +11 -0
- package/src/lib/tabs/TabsContent.vue +21 -0
- package/src/lib/tabs/TabsList.vue +21 -0
- package/src/lib/tabs/TabsTrigger.vue +21 -0
- package/src/lib/tabs/index.ts +4 -0
- package/src/lib/textarea/Textarea.test.ts +41 -0
- package/src/lib/textarea/Textarea.vue +36 -0
- package/src/lib/theme-selector/README.md +154 -0
- package/src/lib/theme-selector/ThemeSelector.vue +279 -0
- package/src/lib/theme-selector/index.ts +2 -0
- package/src/lib/time-picker/TimePicker.vue +162 -0
- package/src/lib/time-picker/TimePickerSegment.vue +176 -0
- package/src/lib/toast/Toast.test.ts +80 -0
- package/src/lib/toast/Toast.vue +56 -0
- package/src/lib/toast/ToastAction.vue +23 -0
- package/src/lib/toast/ToastClose.vue +38 -0
- package/src/lib/toast/ToastDescription.vue +12 -0
- package/src/lib/toast/ToastProvider.ts +65 -0
- package/src/lib/toast/ToastTitle.vue +12 -0
- package/src/lib/toast/ToastViewport.vue +18 -0
- package/src/lib/toast/Toaster.vue +50 -0
- package/src/lib/toast/index.ts +7 -0
- package/src/lib/toggle/Toggle.vue +21 -0
- package/src/lib/toggle/index.ts +2 -0
- package/src/lib/toggle/variants.test.ts +87 -0
- package/src/lib/toggle/variants.ts +21 -0
- package/src/lib/toggle-group/ToggleGroup.vue +24 -0
- package/src/lib/toggle-group/ToggleGroupItem.vue +33 -0
- package/src/lib/toggle-group/index.ts +2 -0
- package/src/lib/tooltip/Tooltip.test.ts +87 -0
- package/src/lib/tooltip/Tooltip.vue +11 -0
- package/src/lib/tooltip/TooltipContent.vue +30 -0
- package/src/lib/tooltip/TooltipProvider.vue +11 -0
- package/src/lib/tooltip/TooltipTrigger.vue +11 -0
- package/src/lib/tooltip/index.ts +4 -0
- package/src/lib/typography/TypographyBlockquote.vue +11 -0
- package/src/lib/typography/TypographyH1.vue +11 -0
- package/src/lib/typography/TypographyH2.vue +11 -0
- package/src/lib/typography/TypographyH3.vue +11 -0
- package/src/lib/typography/TypographyH4.vue +11 -0
- package/src/lib/typography/TypographyInlineCode.vue +11 -0
- package/src/lib/typography/TypographyLarge.vue +11 -0
- package/src/lib/typography/TypographyLead.vue +11 -0
- package/src/lib/typography/TypographyMuted.vue +11 -0
- package/src/lib/typography/TypographyP.vue +11 -0
- package/src/lib/typography/TypographySmall.vue +11 -0
- package/src/lib/typography/index.ts +11 -0
- package/src/lib/utils.test.ts +45 -0
- package/src/lib/utils.ts +14 -0
- package/src/lib/variants.ts +45 -0
- package/src/theme.css +203 -0
- package/src/vite-env.d.ts +6 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { CalendarDateTime } from '@internationalized/date'
|
|
4
|
+
import type { DateValue } from '@internationalized/date'
|
|
5
|
+
import { CalendarIcon } from 'lucide-vue-next'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
import Calendar from '@/lib/calendar/Calendar.vue'
|
|
8
|
+
import TimePicker from '@/lib/time-picker/TimePicker.vue'
|
|
9
|
+
import Separator from '@/lib/separator/Separator.vue'
|
|
10
|
+
import { PopoverRoot, PopoverTrigger, PopoverContent, PopoverPortal } from 'radix-vue'
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
modelValue?: CalendarDateTime
|
|
14
|
+
hour12?: boolean
|
|
15
|
+
granularity?: 'minute' | 'second'
|
|
16
|
+
class?: string
|
|
17
|
+
disabled?: boolean
|
|
18
|
+
placeholder?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
22
|
+
hour12: false,
|
|
23
|
+
granularity: 'minute',
|
|
24
|
+
placeholder: 'Pick date and time',
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits<{
|
|
28
|
+
(e: 'update:modelValue', value: CalendarDateTime): void
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const formattedValue = computed(() => {
|
|
32
|
+
if (!props.modelValue) return ''
|
|
33
|
+
const dt = props.modelValue
|
|
34
|
+
const date = `${dt.year}-${String(dt.month).padStart(2, '0')}-${String(dt.day).padStart(2, '0')}`
|
|
35
|
+
|
|
36
|
+
let time: string
|
|
37
|
+
if (props.hour12) {
|
|
38
|
+
const h = dt.hour % 12
|
|
39
|
+
const displayH = h === 0 ? 12 : h
|
|
40
|
+
const period = dt.hour >= 12 ? 'PM' : 'AM'
|
|
41
|
+
time = `${displayH}:${String(dt.minute).padStart(2, '0')}`
|
|
42
|
+
if (props.granularity === 'second') {
|
|
43
|
+
time += `:${String(dt.second).padStart(2, '0')}`
|
|
44
|
+
}
|
|
45
|
+
time += ` ${period}`
|
|
46
|
+
} else {
|
|
47
|
+
time = `${String(dt.hour).padStart(2, '0')}:${String(dt.minute).padStart(2, '0')}`
|
|
48
|
+
if (props.granularity === 'second') {
|
|
49
|
+
time += `:${String(dt.second).padStart(2, '0')}`
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return `${date} ${time}`
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const calendarValue = computed(() => props.modelValue as DateValue | undefined)
|
|
57
|
+
|
|
58
|
+
const timeValue = computed(() => {
|
|
59
|
+
if (!props.modelValue) return { hour: 0, minute: 0, second: 0 }
|
|
60
|
+
return {
|
|
61
|
+
hour: props.modelValue.hour,
|
|
62
|
+
minute: props.modelValue.minute,
|
|
63
|
+
second: props.modelValue.second,
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
function onCalendarUpdate(date: DateValue | undefined) {
|
|
68
|
+
if (!date) return
|
|
69
|
+
|
|
70
|
+
const current = props.modelValue
|
|
71
|
+
const hour = current?.hour ?? 0
|
|
72
|
+
const minute = current?.minute ?? 0
|
|
73
|
+
const second = current?.second ?? 0
|
|
74
|
+
|
|
75
|
+
const updated = new CalendarDateTime(
|
|
76
|
+
date.year,
|
|
77
|
+
date.month,
|
|
78
|
+
date.day,
|
|
79
|
+
hour,
|
|
80
|
+
minute,
|
|
81
|
+
second,
|
|
82
|
+
)
|
|
83
|
+
emit('update:modelValue', updated)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function onTimeUpdate(time: { hour: number; minute: number; second?: number }) {
|
|
87
|
+
const current = props.modelValue
|
|
88
|
+
const year = current?.year ?? new Date().getFullYear()
|
|
89
|
+
const month = current?.month ?? (new Date().getMonth() + 1)
|
|
90
|
+
const day = current?.day ?? new Date().getDate()
|
|
91
|
+
|
|
92
|
+
const updated = new CalendarDateTime(
|
|
93
|
+
year,
|
|
94
|
+
month,
|
|
95
|
+
day,
|
|
96
|
+
time.hour,
|
|
97
|
+
time.minute,
|
|
98
|
+
time.second ?? 0,
|
|
99
|
+
)
|
|
100
|
+
emit('update:modelValue', updated)
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<template>
|
|
105
|
+
<PopoverRoot>
|
|
106
|
+
<PopoverTrigger as-child>
|
|
107
|
+
<button
|
|
108
|
+
type="button"
|
|
109
|
+
:disabled="disabled"
|
|
110
|
+
:class="
|
|
111
|
+
cn(
|
|
112
|
+
'h-10 w-full rounded-lg border border-input bg-background px-3 text-sm shadow-depth-1 text-left flex items-center gap-2',
|
|
113
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/20 focus-visible:border-primary',
|
|
114
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
115
|
+
'transition-all duration-150 ease-out',
|
|
116
|
+
!modelValue && 'text-muted-foreground',
|
|
117
|
+
props.class,
|
|
118
|
+
)
|
|
119
|
+
"
|
|
120
|
+
>
|
|
121
|
+
<CalendarIcon class="h-4 w-4 shrink-0 text-muted-foreground" />
|
|
122
|
+
<span>{{ formattedValue || placeholder }}</span>
|
|
123
|
+
</button>
|
|
124
|
+
</PopoverTrigger>
|
|
125
|
+
|
|
126
|
+
<PopoverPortal>
|
|
127
|
+
<PopoverContent
|
|
128
|
+
:side-offset="4"
|
|
129
|
+
align="start"
|
|
130
|
+
:class="
|
|
131
|
+
cn(
|
|
132
|
+
'z-depth-3 w-auto rounded-md border bg-popover p-4 text-popover-foreground shadow-depth-3 outline-none',
|
|
133
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
134
|
+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
135
|
+
'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
|
136
|
+
'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
137
|
+
)
|
|
138
|
+
"
|
|
139
|
+
>
|
|
140
|
+
<Calendar
|
|
141
|
+
:model-value="calendarValue"
|
|
142
|
+
@update:model-value="onCalendarUpdate"
|
|
143
|
+
/>
|
|
144
|
+
|
|
145
|
+
<Separator class="my-3" />
|
|
146
|
+
|
|
147
|
+
<div class="flex items-center justify-center">
|
|
148
|
+
<TimePicker
|
|
149
|
+
:model-value="timeValue"
|
|
150
|
+
:hour12="hour12"
|
|
151
|
+
:granularity="granularity"
|
|
152
|
+
:disabled="disabled"
|
|
153
|
+
@update:model-value="onTimeUpdate"
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
156
|
+
</PopoverContent>
|
|
157
|
+
</PopoverPortal>
|
|
158
|
+
</PopoverRoot>
|
|
159
|
+
</template>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { describe, it, expect, afterEach } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import { h, nextTick } from 'vue'
|
|
4
|
+
import Dialog from './Dialog.vue'
|
|
5
|
+
import DialogTrigger from './DialogTrigger.vue'
|
|
6
|
+
import DialogContent from './DialogContent.vue'
|
|
7
|
+
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
document.body.innerHTML = ''
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
describe('Dialog', () => {
|
|
13
|
+
it('renders without errors', () => {
|
|
14
|
+
const wrapper = mount(Dialog, {
|
|
15
|
+
slots: { default: 'Dialog content' },
|
|
16
|
+
})
|
|
17
|
+
expect(wrapper.exists()).toBe(true)
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
it('accepts open prop', () => {
|
|
21
|
+
const wrapper = mount(Dialog, {
|
|
22
|
+
props: { open: true },
|
|
23
|
+
slots: { default: 'Dialog content' },
|
|
24
|
+
})
|
|
25
|
+
expect(wrapper.exists()).toBe(true)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('emits update:open event', () => {
|
|
29
|
+
const wrapper = mount(Dialog, {
|
|
30
|
+
props: { open: false },
|
|
31
|
+
slots: { default: 'Dialog content' },
|
|
32
|
+
})
|
|
33
|
+
expect(wrapper.exists()).toBe(true)
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
describe('DialogTrigger', () => {
|
|
38
|
+
it('renders slot content', () => {
|
|
39
|
+
const wrapper = mount(Dialog, {
|
|
40
|
+
props: { open: false },
|
|
41
|
+
slots: {
|
|
42
|
+
default: () => h(DialogTrigger, null, { default: () => 'Open Dialog' }),
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
expect(wrapper.text()).toContain('Open Dialog')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('renders as a button by default', () => {
|
|
49
|
+
const wrapper = mount(Dialog, {
|
|
50
|
+
props: { open: false },
|
|
51
|
+
slots: {
|
|
52
|
+
default: () => h(DialogTrigger, null, { default: () => 'Click me' }),
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
expect(wrapper.find('button').exists()).toBe(true)
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
describe('DialogContent', () => {
|
|
60
|
+
it('mounts without errors when dialog is open', () => {
|
|
61
|
+
// DialogContent uses DialogPortal (teleport to body). In jsdom with
|
|
62
|
+
// useForwardPropsEmits, the portal may not fully render the dialog content.
|
|
63
|
+
// We verify the component tree mounts without throwing.
|
|
64
|
+
const wrapper = mount(Dialog, {
|
|
65
|
+
props: { open: true },
|
|
66
|
+
slots: {
|
|
67
|
+
default: () => h(DialogContent, null, { default: () => 'Content here' }),
|
|
68
|
+
},
|
|
69
|
+
attachTo: document.body,
|
|
70
|
+
})
|
|
71
|
+
expect(wrapper.exists()).toBe(true)
|
|
72
|
+
wrapper.unmount()
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it('accepts custom class prop', () => {
|
|
76
|
+
// Verify DialogContent accepts class prop without error
|
|
77
|
+
const wrapper = mount(Dialog, {
|
|
78
|
+
props: { open: true },
|
|
79
|
+
slots: {
|
|
80
|
+
default: () => h(DialogContent, { class: 'custom-dialog' }, { default: () => 'Content' }),
|
|
81
|
+
},
|
|
82
|
+
attachTo: document.body,
|
|
83
|
+
})
|
|
84
|
+
expect(wrapper.exists()).toBe(true)
|
|
85
|
+
wrapper.unmount()
|
|
86
|
+
})
|
|
87
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { DialogRoot, type DialogRootEmits, type DialogRootProps, useForwardPropsEmits } from 'radix-vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<DialogRootProps>()
|
|
5
|
+
const emits = defineEmits<DialogRootEmits>()
|
|
6
|
+
|
|
7
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<DialogRoot v-bind="forwarded">
|
|
12
|
+
<slot />
|
|
13
|
+
</DialogRoot>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { DialogContent, DialogPortal, DialogOverlay, DialogClose, type DialogContentProps, useForwardPropsEmits } from 'radix-vue'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DialogContentProps & { class?: string }>()
|
|
6
|
+
const emits = defineEmits()
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<DialogPortal>
|
|
13
|
+
<DialogOverlay
|
|
14
|
+
class="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"
|
|
15
|
+
/>
|
|
16
|
+
<DialogContent
|
|
17
|
+
v-bind="forwarded"
|
|
18
|
+
:class="
|
|
19
|
+
cn(
|
|
20
|
+
'fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4',
|
|
21
|
+
'border bg-background p-6 shadow-depth-5 duration-200',
|
|
22
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
23
|
+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
24
|
+
'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
|
25
|
+
'data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]',
|
|
26
|
+
'data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]',
|
|
27
|
+
'sm:rounded-lg',
|
|
28
|
+
props.class
|
|
29
|
+
)
|
|
30
|
+
"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
<DialogClose
|
|
34
|
+
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
|
35
|
+
>
|
|
36
|
+
<svg
|
|
37
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
38
|
+
width="24"
|
|
39
|
+
height="24"
|
|
40
|
+
viewBox="0 0 24 24"
|
|
41
|
+
fill="none"
|
|
42
|
+
stroke="currentColor"
|
|
43
|
+
stroke-width="2"
|
|
44
|
+
stroke-linecap="round"
|
|
45
|
+
stroke-linejoin="round"
|
|
46
|
+
class="h-4 w-4"
|
|
47
|
+
aria-hidden="true"
|
|
48
|
+
>
|
|
49
|
+
<path d="M18 6 6 18" />
|
|
50
|
+
<path d="m6 6 12 12" />
|
|
51
|
+
</svg>
|
|
52
|
+
<span class="sr-only">Close</span>
|
|
53
|
+
</DialogClose>
|
|
54
|
+
</DialogContent>
|
|
55
|
+
</DialogPortal>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { DialogDescription, type DialogDescriptionProps } from 'radix-vue'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DialogDescriptionProps & { class?: string }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<DialogDescription
|
|
10
|
+
v-bind="props"
|
|
11
|
+
:class="cn('text-sm text-muted-foreground', props.class)"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</DialogDescription>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const props = defineProps<Props>()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div
|
|
13
|
+
:class="cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const props = defineProps<Props>()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div
|
|
13
|
+
:class="cn('flex flex-col gap-2 text-center sm:text-left', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { DialogOverlay, type DialogOverlayProps } from 'radix-vue'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DialogOverlayProps & { class?: string }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<DialogOverlay
|
|
10
|
+
v-bind="props"
|
|
11
|
+
:class="
|
|
12
|
+
cn(
|
|
13
|
+
'fixed inset-0 z-50 bg-black/80',
|
|
14
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
15
|
+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { DialogTitle, type DialogTitleProps } from 'radix-vue'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DialogTitleProps & { class?: string }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<DialogTitle
|
|
10
|
+
v-bind="props"
|
|
11
|
+
:class="cn('text-lg font-semibold leading-none tracking-tight', props.class)"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</DialogTitle>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as Dialog } from './Dialog.vue'
|
|
2
|
+
export { default as DialogTrigger } from './DialogTrigger.vue'
|
|
3
|
+
export { default as DialogPortal } from './DialogPortal.vue'
|
|
4
|
+
export { default as DialogOverlay } from './DialogOverlay.vue'
|
|
5
|
+
export { default as DialogContent } from './DialogContent.vue'
|
|
6
|
+
export { default as DialogHeader } from './DialogHeader.vue'
|
|
7
|
+
export { default as DialogFooter } from './DialogFooter.vue'
|
|
8
|
+
export { default as DialogTitle } from './DialogTitle.vue'
|
|
9
|
+
export { default as DialogDescription } from './DialogDescription.vue'
|
|
10
|
+
export { default as DialogClose } from './DialogClose.vue'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provide } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(defineProps<{ dir?: 'ltr' | 'rtl' }>(), { dir: 'ltr' })
|
|
5
|
+
|
|
6
|
+
provide('direction', props.dir)
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div :dir="props.dir">
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import {
|
|
4
|
+
DialogContent,
|
|
5
|
+
DialogPortal,
|
|
6
|
+
} from 'radix-vue'
|
|
7
|
+
import { cn } from '@/lib/utils'
|
|
8
|
+
import DrawerOverlay from './DrawerOverlay.vue'
|
|
9
|
+
|
|
10
|
+
const props = defineProps<{ class?: string }>()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<DialogPortal>
|
|
15
|
+
<DrawerOverlay />
|
|
16
|
+
<DialogContent
|
|
17
|
+
v-bind="$attrs"
|
|
18
|
+
:class="
|
|
19
|
+
cn(
|
|
20
|
+
'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background shadow-depth-5',
|
|
21
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
22
|
+
'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
|
|
23
|
+
props.class
|
|
24
|
+
)
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<div class="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
|
|
28
|
+
<slot />
|
|
29
|
+
</DialogContent>
|
|
30
|
+
</DialogPortal>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { DialogDescription } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<DialogDescription
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="cn('text-sm text-muted-foreground', props.class)"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</DialogDescription>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const props = defineProps<Props>()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div :class="cn('mt-auto flex flex-col gap-2 p-4', props.class)">
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const props = defineProps<Props>()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div :class="cn('grid gap-1.5 p-4 text-center sm:text-left', props.class)">
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { DialogOverlay } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<DialogOverlay
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="
|
|
13
|
+
cn(
|
|
14
|
+
'fixed inset-0 z-50 bg-black/80',
|
|
15
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out',
|
|
16
|
+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
|
17
|
+
props.class
|
|
18
|
+
)
|
|
19
|
+
"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { DialogTitle } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<DialogTitle
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="cn('text-lg font-semibold leading-none tracking-tight', props.class)"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</DialogTitle>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Drawer } from './Drawer.vue'
|
|
2
|
+
export { default as DrawerClose } from './DrawerClose.vue'
|
|
3
|
+
export { default as DrawerContent } from './DrawerContent.vue'
|
|
4
|
+
export { default as DrawerDescription } from './DrawerDescription.vue'
|
|
5
|
+
export { default as DrawerFooter } from './DrawerFooter.vue'
|
|
6
|
+
export { default as DrawerHeader } from './DrawerHeader.vue'
|
|
7
|
+
export { default as DrawerOverlay } from './DrawerOverlay.vue'
|
|
8
|
+
export { default as DrawerTitle } from './DrawerTitle.vue'
|
|
9
|
+
export { default as DrawerTrigger } from './DrawerTrigger.vue'
|