@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,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
import { buttonVariants, type ButtonVariants } from './variants'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
variant?: ButtonVariants['variant']
|
|
7
|
+
size?: ButtonVariants['size']
|
|
8
|
+
elevation?: ButtonVariants['elevation']
|
|
9
|
+
class?: string
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
type?: 'button' | 'submit' | 'reset'
|
|
12
|
+
loading?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
type: 'button',
|
|
17
|
+
loading: false,
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<button
|
|
23
|
+
:type="type"
|
|
24
|
+
:class="cn(buttonVariants({ variant, size, elevation }), props.class)"
|
|
25
|
+
:disabled="disabled || loading"
|
|
26
|
+
>
|
|
27
|
+
<!-- Loading Spinner -->
|
|
28
|
+
<span
|
|
29
|
+
v-if="loading"
|
|
30
|
+
class="absolute inset-0 flex items-center justify-center"
|
|
31
|
+
>
|
|
32
|
+
<svg
|
|
33
|
+
class="animate-spin h-4 w-4"
|
|
34
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
+
fill="none"
|
|
36
|
+
viewBox="0 0 24 24"
|
|
37
|
+
>
|
|
38
|
+
<circle
|
|
39
|
+
class="opacity-25"
|
|
40
|
+
cx="12"
|
|
41
|
+
cy="12"
|
|
42
|
+
r="10"
|
|
43
|
+
stroke="currentColor"
|
|
44
|
+
stroke-width="4"
|
|
45
|
+
/>
|
|
46
|
+
<path
|
|
47
|
+
class="opacity-75"
|
|
48
|
+
fill="currentColor"
|
|
49
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
50
|
+
/>
|
|
51
|
+
</svg>
|
|
52
|
+
</span>
|
|
53
|
+
|
|
54
|
+
<span
|
|
55
|
+
:class="{ 'opacity-0': loading }"
|
|
56
|
+
class="inline-flex items-center justify-center gap-2"
|
|
57
|
+
>
|
|
58
|
+
<slot />
|
|
59
|
+
</span>
|
|
60
|
+
</button>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
export { buttonVariants }
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { buttonVariants } from './variants'
|
|
3
|
+
|
|
4
|
+
describe('buttonVariants', () => {
|
|
5
|
+
describe('defaults', () => {
|
|
6
|
+
it('returns expected classes with no arguments (default variant, size, elevation)', () => {
|
|
7
|
+
const result = buttonVariants()
|
|
8
|
+
expect(result).toContain('inline-flex')
|
|
9
|
+
expect(result).toContain('items-center')
|
|
10
|
+
expect(result).toContain('bg-primary')
|
|
11
|
+
expect(result).toContain('text-primary-foreground')
|
|
12
|
+
expect(result).toContain('h-10')
|
|
13
|
+
expect(result).toContain('px-4')
|
|
14
|
+
expect(result).toContain('shadow-depth-1')
|
|
15
|
+
})
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
describe('variant', () => {
|
|
19
|
+
it('default variant includes primary background', () => {
|
|
20
|
+
const result = buttonVariants({ variant: 'default' })
|
|
21
|
+
expect(result).toContain('bg-primary')
|
|
22
|
+
expect(result).toContain('text-primary-foreground')
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('destructive variant includes destructive background', () => {
|
|
26
|
+
const result = buttonVariants({ variant: 'destructive' })
|
|
27
|
+
expect(result).toContain('bg-destructive')
|
|
28
|
+
expect(result).toContain('text-destructive-foreground')
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('outline variant includes border and background', () => {
|
|
32
|
+
const result = buttonVariants({ variant: 'outline' })
|
|
33
|
+
expect(result).toContain('border')
|
|
34
|
+
expect(result).toContain('border-input')
|
|
35
|
+
expect(result).toContain('bg-background')
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it('secondary variant includes secondary background', () => {
|
|
39
|
+
const result = buttonVariants({ variant: 'secondary' })
|
|
40
|
+
expect(result).toContain('bg-secondary')
|
|
41
|
+
expect(result).toContain('text-secondary-foreground')
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
it('ghost variant includes hover accent styles', () => {
|
|
45
|
+
const result = buttonVariants({ variant: 'ghost' })
|
|
46
|
+
expect(result).toContain('hover:bg-accent')
|
|
47
|
+
expect(result).toContain('hover:text-accent-foreground')
|
|
48
|
+
expect(result).not.toContain('bg-primary')
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
it('link variant includes underline offset and primary text', () => {
|
|
52
|
+
const result = buttonVariants({ variant: 'link' })
|
|
53
|
+
expect(result).toContain('text-primary')
|
|
54
|
+
expect(result).toContain('underline-offset-4')
|
|
55
|
+
expect(result).toContain('hover:underline')
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
describe('size', () => {
|
|
60
|
+
it('default size applies h-10 and px-4', () => {
|
|
61
|
+
const result = buttonVariants({ size: 'default' })
|
|
62
|
+
expect(result).toContain('h-10')
|
|
63
|
+
expect(result).toContain('px-4')
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
it('sm size applies h-9 and smaller padding', () => {
|
|
67
|
+
const result = buttonVariants({ size: 'sm' })
|
|
68
|
+
expect(result).toContain('h-9')
|
|
69
|
+
expect(result).toContain('px-3')
|
|
70
|
+
expect(result).toContain('text-xs')
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
it('lg size applies h-11 and larger padding', () => {
|
|
74
|
+
const result = buttonVariants({ size: 'lg' })
|
|
75
|
+
expect(result).toContain('h-11')
|
|
76
|
+
expect(result).toContain('px-8')
|
|
77
|
+
expect(result).toContain('text-base')
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it('icon size applies equal width and height', () => {
|
|
81
|
+
const result = buttonVariants({ size: 'icon' })
|
|
82
|
+
expect(result).toContain('h-10')
|
|
83
|
+
expect(result).toContain('w-10')
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
describe('elevation', () => {
|
|
88
|
+
it('flat elevation removes shadows and hover lift', () => {
|
|
89
|
+
const result = buttonVariants({ elevation: 'flat' })
|
|
90
|
+
expect(result).toContain('shadow-none')
|
|
91
|
+
expect(result).toContain('hover:shadow-none')
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
it('raised elevation applies depth-1 shadow', () => {
|
|
95
|
+
const result = buttonVariants({ elevation: 'raised' })
|
|
96
|
+
expect(result).toContain('shadow-depth-1')
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
it('elevated elevation applies depth-2 shadow', () => {
|
|
100
|
+
const result = buttonVariants({ elevation: 'elevated' })
|
|
101
|
+
expect(result).toContain('shadow-depth-2')
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
describe('combining variant + size', () => {
|
|
106
|
+
it('destructive + lg combines both variant and size classes', () => {
|
|
107
|
+
const result = buttonVariants({ variant: 'destructive', size: 'lg' })
|
|
108
|
+
expect(result).toContain('bg-destructive')
|
|
109
|
+
expect(result).toContain('h-11')
|
|
110
|
+
expect(result).toContain('px-8')
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
it('outline + sm combines both variant and size classes', () => {
|
|
114
|
+
const result = buttonVariants({ variant: 'outline', size: 'sm' })
|
|
115
|
+
expect(result).toContain('border')
|
|
116
|
+
expect(result).toContain('border-input')
|
|
117
|
+
expect(result).toContain('h-9')
|
|
118
|
+
expect(result).toContain('px-3')
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
it('ghost + icon combines both variant and size classes', () => {
|
|
122
|
+
const result = buttonVariants({ variant: 'ghost', size: 'icon' })
|
|
123
|
+
expect(result).toContain('hover:bg-accent')
|
|
124
|
+
expect(result).toContain('h-10')
|
|
125
|
+
expect(result).toContain('w-10')
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
})
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
+
|
|
3
|
+
export const buttonVariants = cva(
|
|
4
|
+
[
|
|
5
|
+
'inline-flex items-center justify-center gap-2 whitespace-nowrap',
|
|
6
|
+
'rounded-xl text-sm font-medium',
|
|
7
|
+
'transition-all duration-150 ease-out',
|
|
8
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
9
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
10
|
+
'relative overflow-hidden',
|
|
11
|
+
// Subtle lift on hover for interactive feel
|
|
12
|
+
'hover:-translate-y-0.5 active:translate-y-0',
|
|
13
|
+
].join(' '),
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: [
|
|
18
|
+
'bg-primary text-primary-foreground',
|
|
19
|
+
'hover:bg-primary/90 hover:shadow-depth-2',
|
|
20
|
+
'active:bg-primary/95',
|
|
21
|
+
].join(' '),
|
|
22
|
+
destructive: [
|
|
23
|
+
'bg-destructive text-destructive-foreground',
|
|
24
|
+
'hover:bg-destructive/90 hover:shadow-depth-2',
|
|
25
|
+
'active:bg-destructive/95',
|
|
26
|
+
].join(' '),
|
|
27
|
+
outline: [
|
|
28
|
+
'border border-input bg-background',
|
|
29
|
+
'hover:bg-accent hover:text-accent-foreground hover:border-accent',
|
|
30
|
+
'active:bg-accent/80',
|
|
31
|
+
].join(' '),
|
|
32
|
+
secondary: [
|
|
33
|
+
'bg-secondary text-secondary-foreground',
|
|
34
|
+
'hover:bg-secondary/80 hover:shadow-depth-2',
|
|
35
|
+
'active:bg-secondary/70',
|
|
36
|
+
].join(' '),
|
|
37
|
+
ghost: [
|
|
38
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
39
|
+
'active:bg-accent/80',
|
|
40
|
+
].join(' '),
|
|
41
|
+
link: [
|
|
42
|
+
'text-primary underline-offset-4 hover:underline',
|
|
43
|
+
'hover:translate-y-0',
|
|
44
|
+
].join(' '),
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
default: 'h-10 px-4 py-2.5',
|
|
48
|
+
sm: 'h-9 rounded-lg px-3 py-2 text-xs',
|
|
49
|
+
lg: 'h-11 rounded-xl px-8 py-3 text-base',
|
|
50
|
+
icon: 'h-10 w-10 p-2',
|
|
51
|
+
},
|
|
52
|
+
elevation: {
|
|
53
|
+
flat: 'shadow-none hover:shadow-none hover:translate-y-0',
|
|
54
|
+
raised: 'shadow-depth-1 hover:shadow-depth-2',
|
|
55
|
+
elevated: 'shadow-depth-2 hover:shadow-depth-3',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: 'default',
|
|
60
|
+
size: 'default',
|
|
61
|
+
elevation: 'raised',
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>
|
|
@@ -0,0 +1,25 @@
|
|
|
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="
|
|
14
|
+
cn(
|
|
15
|
+
'inline-flex -space-x-px rounded-md shadow-depth-1',
|
|
16
|
+
'[&>button]:rounded-none [&>button]:shadow-none',
|
|
17
|
+
'[&>button:first-child]:rounded-l-md [&>button:last-child]:rounded-r-md',
|
|
18
|
+
'[&>button]:border-r-0 [&>button:last-child]:border-r',
|
|
19
|
+
props.class
|
|
20
|
+
)
|
|
21
|
+
"
|
|
22
|
+
>
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ButtonGroup } from './ButtonGroup.vue'
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarRoot } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
import CalendarHeader from './CalendarHeader.vue'
|
|
6
|
+
import CalendarHeading from './CalendarHeading.vue'
|
|
7
|
+
import CalendarPrev from './CalendarPrev.vue'
|
|
8
|
+
import CalendarNext from './CalendarNext.vue'
|
|
9
|
+
import CalendarGrid from './CalendarGrid.vue'
|
|
10
|
+
import CalendarGridHead from './CalendarGridHead.vue'
|
|
11
|
+
import CalendarGridBody from './CalendarGridBody.vue'
|
|
12
|
+
import CalendarGridRow from './CalendarGridRow.vue'
|
|
13
|
+
import CalendarHeadCell from './CalendarHeadCell.vue'
|
|
14
|
+
import CalendarCell from './CalendarCell.vue'
|
|
15
|
+
import CalendarCellTrigger from './CalendarCellTrigger.vue'
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{ class?: string }>()
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<CalendarRoot
|
|
22
|
+
v-slot="{ grid, weekDays }"
|
|
23
|
+
v-bind="$attrs"
|
|
24
|
+
:class="cn('p-3', props.class)"
|
|
25
|
+
>
|
|
26
|
+
<CalendarHeader>
|
|
27
|
+
<CalendarPrev />
|
|
28
|
+
<CalendarHeading />
|
|
29
|
+
<CalendarNext />
|
|
30
|
+
</CalendarHeader>
|
|
31
|
+
|
|
32
|
+
<div class="mt-4 flex flex-col gap-y-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
|
|
33
|
+
<CalendarGrid v-for="month in grid" :key="month.value.toString()">
|
|
34
|
+
<CalendarGridHead>
|
|
35
|
+
<CalendarGridRow>
|
|
36
|
+
<CalendarHeadCell v-for="day in weekDays" :key="day">
|
|
37
|
+
{{ day }}
|
|
38
|
+
</CalendarHeadCell>
|
|
39
|
+
</CalendarGridRow>
|
|
40
|
+
</CalendarGridHead>
|
|
41
|
+
<CalendarGridBody>
|
|
42
|
+
<CalendarGridRow
|
|
43
|
+
v-for="(weekDates, index) in month.rows"
|
|
44
|
+
:key="`weekDate-${index}`"
|
|
45
|
+
>
|
|
46
|
+
<CalendarCell
|
|
47
|
+
v-for="weekDate in weekDates"
|
|
48
|
+
:key="weekDate.toString()"
|
|
49
|
+
:date="weekDate"
|
|
50
|
+
>
|
|
51
|
+
<CalendarCellTrigger :day="weekDate" :month="month.value" />
|
|
52
|
+
</CalendarCell>
|
|
53
|
+
</CalendarGridRow>
|
|
54
|
+
</CalendarGridBody>
|
|
55
|
+
</CalendarGrid>
|
|
56
|
+
</div>
|
|
57
|
+
</CalendarRoot>
|
|
58
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarCell } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarCell
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="
|
|
13
|
+
cn(
|
|
14
|
+
'h-8 w-8 text-center text-sm p-0 relative',
|
|
15
|
+
'focus-within:relative focus-within:z-20',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</CalendarCell>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarCellTrigger } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarCellTrigger
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="
|
|
13
|
+
cn(
|
|
14
|
+
'inline-flex h-8 w-8 items-center justify-center whitespace-nowrap rounded-full text-sm font-normal',
|
|
15
|
+
'ring-offset-background transition-colors',
|
|
16
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
17
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
18
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
19
|
+
'aria-selected:bg-primary aria-selected:text-primary-foreground aria-selected:font-medium',
|
|
20
|
+
'aria-selected:hover:bg-primary aria-selected:hover:text-primary-foreground',
|
|
21
|
+
'aria-selected:focus:bg-primary aria-selected:focus:text-primary-foreground',
|
|
22
|
+
props.class
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
>
|
|
26
|
+
<slot />
|
|
27
|
+
</CalendarCellTrigger>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarGrid } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarGrid
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="cn('w-full border-collapse space-y-1', props.class)"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CalendarGrid>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarGridRow } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarGridRow
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="cn('flex', props.class)"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CalendarGridRow>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarHeadCell } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarHeadCell
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="cn('text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]', props.class)"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CalendarHeadCell>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarHeader } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarHeader
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="cn('flex justify-between items-center pt-1 relative', props.class)"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CalendarHeader>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarHeading } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarHeading
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="cn('text-sm font-medium', props.class)"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CalendarHeading>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarNext } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarNext
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="
|
|
13
|
+
cn(
|
|
14
|
+
'inline-flex h-7 w-7 items-center justify-center rounded-md border-0 bg-transparent',
|
|
15
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot>
|
|
21
|
+
<svg
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
width="24"
|
|
24
|
+
height="24"
|
|
25
|
+
viewBox="0 0 24 24"
|
|
26
|
+
fill="none"
|
|
27
|
+
stroke="currentColor"
|
|
28
|
+
stroke-width="2"
|
|
29
|
+
stroke-linecap="round"
|
|
30
|
+
stroke-linejoin="round"
|
|
31
|
+
class="h-4 w-4"
|
|
32
|
+
>
|
|
33
|
+
<path d="m9 18 6-6-6-6" />
|
|
34
|
+
</svg>
|
|
35
|
+
</slot>
|
|
36
|
+
</CalendarNext>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineOptions({ inheritAttrs: false })
|
|
3
|
+
import { CalendarPrev } from 'radix-vue'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: string }>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<CalendarPrev
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
:class="
|
|
13
|
+
cn(
|
|
14
|
+
'inline-flex h-7 w-7 items-center justify-center rounded-md border-0 bg-transparent',
|
|
15
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot>
|
|
21
|
+
<svg
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
width="24"
|
|
24
|
+
height="24"
|
|
25
|
+
viewBox="0 0 24 24"
|
|
26
|
+
fill="none"
|
|
27
|
+
stroke="currentColor"
|
|
28
|
+
stroke-width="2"
|
|
29
|
+
stroke-linecap="round"
|
|
30
|
+
stroke-linejoin="round"
|
|
31
|
+
class="h-4 w-4"
|
|
32
|
+
>
|
|
33
|
+
<path d="m15 18-6-6 6-6" />
|
|
34
|
+
</svg>
|
|
35
|
+
</slot>
|
|
36
|
+
</CalendarPrev>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as Calendar } from './Calendar.vue'
|
|
2
|
+
export { default as CalendarCell } from './CalendarCell.vue'
|
|
3
|
+
export { default as CalendarCellTrigger } from './CalendarCellTrigger.vue'
|
|
4
|
+
export { default as CalendarGrid } from './CalendarGrid.vue'
|
|
5
|
+
export { default as CalendarGridBody } from './CalendarGridBody.vue'
|
|
6
|
+
export { default as CalendarGridHead } from './CalendarGridHead.vue'
|
|
7
|
+
export { default as CalendarGridRow } from './CalendarGridRow.vue'
|
|
8
|
+
export { default as CalendarHeadCell } from './CalendarHeadCell.vue'
|
|
9
|
+
export { default as CalendarHeader } from './CalendarHeader.vue'
|
|
10
|
+
export { default as CalendarHeading } from './CalendarHeading.vue'
|
|
11
|
+
export { default as CalendarNext } from './CalendarNext.vue'
|
|
12
|
+
export { default as CalendarPrev } from './CalendarPrev.vue'
|