@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,11 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{ class?: string }>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<h1 :class="cn('scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl', props.class)">
|
|
9
|
+
<slot />
|
|
10
|
+
</h1>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{ class?: string }>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<h2 :class="cn('scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0', props.class)">
|
|
9
|
+
<slot />
|
|
10
|
+
</h2>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{ class?: string }>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<code :class="cn('relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold', props.class)">
|
|
9
|
+
<slot />
|
|
10
|
+
</code>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as TypographyH1 } from './TypographyH1.vue'
|
|
2
|
+
export { default as TypographyH2 } from './TypographyH2.vue'
|
|
3
|
+
export { default as TypographyH3 } from './TypographyH3.vue'
|
|
4
|
+
export { default as TypographyH4 } from './TypographyH4.vue'
|
|
5
|
+
export { default as TypographyP } from './TypographyP.vue'
|
|
6
|
+
export { default as TypographyBlockquote } from './TypographyBlockquote.vue'
|
|
7
|
+
export { default as TypographyInlineCode } from './TypographyInlineCode.vue'
|
|
8
|
+
export { default as TypographyLead } from './TypographyLead.vue'
|
|
9
|
+
export { default as TypographyLarge } from './TypographyLarge.vue'
|
|
10
|
+
export { default as TypographySmall } from './TypographySmall.vue'
|
|
11
|
+
export { default as TypographyMuted } from './TypographyMuted.vue'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { cn } from './utils'
|
|
3
|
+
|
|
4
|
+
describe('cn', () => {
|
|
5
|
+
it('merges multiple class strings', () => {
|
|
6
|
+
const result = cn('px-2', 'py-1', 'bg-red-500')
|
|
7
|
+
expect(result).toBe('px-2 py-1 bg-red-500')
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('handles falsy values (undefined, null, false, empty string)', () => {
|
|
11
|
+
const result = cn('px-2', undefined, null, false, '', 'py-1')
|
|
12
|
+
expect(result).toBe('px-2 py-1')
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
it('resolves Tailwind conflicts by keeping the last class', () => {
|
|
16
|
+
expect(cn('p-4', 'p-2')).toBe('p-2')
|
|
17
|
+
expect(cn('bg-red-500', 'bg-blue-500')).toBe('bg-blue-500')
|
|
18
|
+
expect(cn('text-sm', 'text-lg')).toBe('text-lg')
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
it('handles conditional classes', () => {
|
|
22
|
+
const isActive = true
|
|
23
|
+
const isDisabled = false
|
|
24
|
+
const result = cn(
|
|
25
|
+
'base-class',
|
|
26
|
+
isActive && 'active-class',
|
|
27
|
+
isDisabled && 'disabled-class'
|
|
28
|
+
)
|
|
29
|
+
expect(result).toBe('base-class active-class')
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
it('returns empty string for no arguments', () => {
|
|
33
|
+
expect(cn()).toBe('')
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it('handles array inputs', () => {
|
|
37
|
+
const result = cn(['px-2', 'py-1'])
|
|
38
|
+
expect(result).toBe('px-2 py-1')
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
it('handles object inputs for conditional classes', () => {
|
|
42
|
+
const result = cn({ 'px-2': true, 'py-1': false, 'bg-red-500': true })
|
|
43
|
+
expect(result).toBe('px-2 bg-red-500')
|
|
44
|
+
})
|
|
45
|
+
})
|
package/src/lib/utils.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ClassValue, clsx } from 'clsx'
|
|
2
|
+
import { twMerge } from 'tailwind-merge'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Utility function to merge Tailwind CSS classes
|
|
6
|
+
* Combines clsx for conditional classes with tailwind-merge for conflict resolution
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* cn('px-2 py-1', 'bg-red-500', isActive && 'bg-blue-500')
|
|
10
|
+
* // → 'px-2 py-1 bg-blue-500' (when isActive is true)
|
|
11
|
+
*/
|
|
12
|
+
export function cn(...inputs: ClassValue[]) {
|
|
13
|
+
return twMerge(clsx(inputs))
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Elevation variants for depth design
|
|
5
|
+
* Use these to apply consistent elevation levels to components
|
|
6
|
+
*/
|
|
7
|
+
export const elevationVariants = cva(
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
elevation: {
|
|
11
|
+
0: 'shadow-none z-depth-0',
|
|
12
|
+
1: 'shadow-depth-1 z-depth-1',
|
|
13
|
+
2: 'shadow-depth-2 z-depth-2',
|
|
14
|
+
3: 'shadow-depth-3 z-depth-3',
|
|
15
|
+
4: 'shadow-depth-4 z-depth-4',
|
|
16
|
+
5: 'shadow-depth-5 z-depth-5',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
elevation: 0,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Interactive elevation variants with hover/focus states
|
|
27
|
+
* Components automatically elevate on interaction
|
|
28
|
+
*/
|
|
29
|
+
export const interactiveElevationVariants = cva(
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
elevation: {
|
|
33
|
+
1: 'shadow-depth-1 hover:shadow-depth-2 focus:shadow-depth-2 transition-elevation',
|
|
34
|
+
2: 'shadow-depth-2 hover:shadow-depth-3 focus:shadow-depth-3 transition-elevation',
|
|
35
|
+
3: 'shadow-depth-3 hover:shadow-depth-4 focus:shadow-depth-4 transition-elevation',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
elevation: 1,
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
export type ElevationVariant = VariantProps<typeof elevationVariants>['elevation']
|
|
45
|
+
export type InteractiveElevationVariant = VariantProps<typeof interactiveElevationVariants>['elevation']
|
package/src/theme.css
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
@custom-variant dark (&.dark);
|
|
2
|
+
|
|
3
|
+
@theme {
|
|
4
|
+
/* Colors — semantic tokens mapped to CSS custom properties */
|
|
5
|
+
--color-border: hsl(var(--border));
|
|
6
|
+
--color-input: hsl(var(--input));
|
|
7
|
+
--color-ring: hsl(var(--ring));
|
|
8
|
+
--color-background: hsl(var(--background));
|
|
9
|
+
--color-foreground: hsl(var(--foreground));
|
|
10
|
+
|
|
11
|
+
--color-primary: hsl(var(--primary));
|
|
12
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
13
|
+
|
|
14
|
+
--color-secondary: hsl(var(--secondary));
|
|
15
|
+
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
16
|
+
|
|
17
|
+
--color-destructive: hsl(var(--destructive));
|
|
18
|
+
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
19
|
+
|
|
20
|
+
--color-success: hsl(var(--success));
|
|
21
|
+
--color-success-foreground: hsl(var(--success-foreground));
|
|
22
|
+
|
|
23
|
+
--color-muted: hsl(var(--muted));
|
|
24
|
+
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
25
|
+
|
|
26
|
+
--color-accent: hsl(var(--accent));
|
|
27
|
+
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
28
|
+
|
|
29
|
+
--color-popover: hsl(var(--popover));
|
|
30
|
+
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
31
|
+
|
|
32
|
+
--color-card: hsl(var(--card));
|
|
33
|
+
--color-card-foreground: hsl(var(--card-foreground));
|
|
34
|
+
--color-card-elevated-1: hsl(var(--card-elevated-1));
|
|
35
|
+
--color-card-elevated-2: hsl(var(--card-elevated-2));
|
|
36
|
+
|
|
37
|
+
/* Depth/Elevation Shadow System (Material Design 3 inspired) */
|
|
38
|
+
--shadow-depth-1: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
39
|
+
--shadow-depth-2: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
40
|
+
--shadow-depth-3: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
41
|
+
--shadow-depth-4: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
42
|
+
--shadow-depth-5: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
43
|
+
|
|
44
|
+
/* Border Radius */
|
|
45
|
+
--radius-lg: var(--radius);
|
|
46
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
47
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
48
|
+
|
|
49
|
+
/* Transition Properties */
|
|
50
|
+
--transition-property-elevation: box-shadow, transform;
|
|
51
|
+
|
|
52
|
+
/* Z-index scale aligned with elevation levels */
|
|
53
|
+
--z-depth-0: 0;
|
|
54
|
+
--z-depth-1: 10;
|
|
55
|
+
--z-depth-2: 20;
|
|
56
|
+
--z-depth-3: 30;
|
|
57
|
+
--z-depth-4: 40;
|
|
58
|
+
--z-depth-5: 50;
|
|
59
|
+
--z-depth-max: 9999;
|
|
60
|
+
|
|
61
|
+
/* Animations */
|
|
62
|
+
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
63
|
+
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
64
|
+
--animate-collapsible-down: collapsible-down 0.2s ease-out;
|
|
65
|
+
--animate-collapsible-up: collapsible-up 0.2s ease-out;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes accordion-down {
|
|
69
|
+
from { height: 0; }
|
|
70
|
+
to { height: var(--radix-accordion-content-height); }
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@keyframes accordion-up {
|
|
74
|
+
from { height: var(--radix-accordion-content-height); }
|
|
75
|
+
to { height: 0; }
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes collapsible-down {
|
|
79
|
+
from { height: 0; }
|
|
80
|
+
to { height: var(--radix-collapsible-content-height); }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes collapsible-up {
|
|
84
|
+
from { height: var(--radix-collapsible-content-height); }
|
|
85
|
+
to { height: 0; }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ── tailwindcss-animate replacement ── */
|
|
89
|
+
/* These utilities are used by 22+ components (dialog, popover, dropdown, toast, etc.) */
|
|
90
|
+
|
|
91
|
+
@utility animate-in {
|
|
92
|
+
animation-name: enter;
|
|
93
|
+
animation-duration: 150ms;
|
|
94
|
+
--tw-enter-opacity: initial;
|
|
95
|
+
--tw-enter-scale: initial;
|
|
96
|
+
--tw-enter-rotate: initial;
|
|
97
|
+
--tw-enter-translate-x: initial;
|
|
98
|
+
--tw-enter-translate-y: initial;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@utility animate-out {
|
|
102
|
+
animation-name: exit;
|
|
103
|
+
animation-duration: 150ms;
|
|
104
|
+
--tw-exit-opacity: initial;
|
|
105
|
+
--tw-exit-scale: initial;
|
|
106
|
+
--tw-exit-rotate: initial;
|
|
107
|
+
--tw-exit-translate-x: initial;
|
|
108
|
+
--tw-exit-translate-y: initial;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@keyframes enter {
|
|
112
|
+
from {
|
|
113
|
+
opacity: var(--tw-enter-opacity, 1);
|
|
114
|
+
transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0)
|
|
115
|
+
scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1))
|
|
116
|
+
rotate(var(--tw-enter-rotate, 0));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@keyframes exit {
|
|
121
|
+
to {
|
|
122
|
+
opacity: var(--tw-exit-opacity, 1);
|
|
123
|
+
transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0)
|
|
124
|
+
scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1))
|
|
125
|
+
rotate(var(--tw-exit-rotate, 0));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Fade */
|
|
130
|
+
@utility fade-in-* {
|
|
131
|
+
--tw-enter-opacity: calc(--value(integer) * 1%);
|
|
132
|
+
}
|
|
133
|
+
@utility fade-in {
|
|
134
|
+
--tw-enter-opacity: 0;
|
|
135
|
+
}
|
|
136
|
+
@utility fade-out-* {
|
|
137
|
+
--tw-exit-opacity: calc(--value(integer) * 1%);
|
|
138
|
+
}
|
|
139
|
+
@utility fade-out {
|
|
140
|
+
--tw-exit-opacity: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Zoom */
|
|
144
|
+
@utility zoom-in-* {
|
|
145
|
+
--tw-enter-scale: calc(--value(integer) * 1%);
|
|
146
|
+
}
|
|
147
|
+
@utility zoom-out-* {
|
|
148
|
+
--tw-exit-scale: calc(--value(integer) * 1%);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Slide in */
|
|
152
|
+
@utility slide-in-from-top-* {
|
|
153
|
+
--tw-enter-translate-y: calc(--value([*], integer) * -0.25rem);
|
|
154
|
+
}
|
|
155
|
+
@utility slide-in-from-bottom-* {
|
|
156
|
+
--tw-enter-translate-y: calc(--value([*], integer) * 0.25rem);
|
|
157
|
+
}
|
|
158
|
+
@utility slide-in-from-left-* {
|
|
159
|
+
--tw-enter-translate-x: calc(--value([*], integer) * -0.25rem);
|
|
160
|
+
}
|
|
161
|
+
@utility slide-in-from-right-* {
|
|
162
|
+
--tw-enter-translate-x: calc(--value([*], integer) * 0.25rem);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Slide out */
|
|
166
|
+
@utility slide-out-to-top-* {
|
|
167
|
+
--tw-exit-translate-y: calc(--value([*], integer) * -0.25rem);
|
|
168
|
+
}
|
|
169
|
+
@utility slide-out-to-bottom-* {
|
|
170
|
+
--tw-exit-translate-y: calc(--value([*], integer) * 0.25rem);
|
|
171
|
+
}
|
|
172
|
+
@utility slide-out-to-left-* {
|
|
173
|
+
--tw-exit-translate-x: calc(--value([*], integer) * -0.25rem);
|
|
174
|
+
}
|
|
175
|
+
@utility slide-out-to-right-* {
|
|
176
|
+
--tw-exit-translate-x: calc(--value([*], integer) * 0.25rem);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Named direction shortcuts (no numeric value) */
|
|
180
|
+
@utility slide-in-from-top {
|
|
181
|
+
--tw-enter-translate-y: -100%;
|
|
182
|
+
}
|
|
183
|
+
@utility slide-in-from-bottom {
|
|
184
|
+
--tw-enter-translate-y: 100%;
|
|
185
|
+
}
|
|
186
|
+
@utility slide-in-from-left {
|
|
187
|
+
--tw-enter-translate-x: -100%;
|
|
188
|
+
}
|
|
189
|
+
@utility slide-in-from-right {
|
|
190
|
+
--tw-enter-translate-x: 100%;
|
|
191
|
+
}
|
|
192
|
+
@utility slide-out-to-top {
|
|
193
|
+
--tw-exit-translate-y: -100%;
|
|
194
|
+
}
|
|
195
|
+
@utility slide-out-to-bottom {
|
|
196
|
+
--tw-exit-translate-y: 100%;
|
|
197
|
+
}
|
|
198
|
+
@utility slide-out-to-left {
|
|
199
|
+
--tw-exit-translate-x: -100%;
|
|
200
|
+
}
|
|
201
|
+
@utility slide-out-to-right {
|
|
202
|
+
--tw-exit-translate-x: 100%;
|
|
203
|
+
}
|