@matta-trade/ui 0.0.0-stage → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +217 -0
- package/README.md +91 -2
- package/dist/alert/Alert.vue.d.ts +19 -0
- package/dist/alert/AlertDescription.vue.d.ts +17 -0
- package/dist/alert/AlertTitle.vue.d.ts +17 -0
- package/dist/alert/index.d.ts +8 -0
- package/dist/alert/index.js +62 -0
- package/dist/alert-dialog/AlertDialog.vue.d.ts +18 -0
- package/dist/alert-dialog/AlertDialogAction.vue.d.ts +18 -0
- package/dist/alert-dialog/AlertDialogCancel.vue.d.ts +18 -0
- package/dist/alert-dialog/AlertDialogContent.vue.d.ts +32 -0
- package/dist/alert-dialog/AlertDialogDescription.vue.d.ts +18 -0
- package/dist/alert-dialog/AlertDialogFooter.vue.d.ts +17 -0
- package/dist/alert-dialog/AlertDialogHeader.vue.d.ts +17 -0
- package/dist/alert-dialog/AlertDialogTitle.vue.d.ts +18 -0
- package/dist/alert-dialog/AlertDialogTrigger.vue.d.ts +14 -0
- package/dist/alert-dialog/index.d.ts +9 -0
- package/dist/alert-dialog/index.js +177 -0
- package/dist/avatar/Avatar.vue.d.ts +27 -0
- package/dist/avatar/AvatarFallback.vue.d.ts +18 -0
- package/dist/avatar/AvatarImage.vue.d.ts +14 -0
- package/dist/avatar/index.d.ts +9 -0
- package/dist/avatar/index.js +120 -0
- package/dist/avatar-colors.d.ts +51 -0
- package/dist/badge/Badge.vue.d.ts +20 -0
- package/dist/badge/index.d.ts +6 -0
- package/dist/badge/index.js +58 -0
- package/dist/breadcrumb/Breadcrumb.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbEllipsis.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbItem.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbLink.vue.d.ts +20 -0
- package/dist/breadcrumb/BreadcrumbList.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbPage.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbSeparator.vue.d.ts +17 -0
- package/dist/breadcrumb/index.d.ts +7 -0
- package/dist/breadcrumb/index.js +131 -0
- package/dist/button/Button.vue.d.ts +36 -0
- package/dist/button/index.d.ts +7 -0
- package/dist/button/index.js +2 -0
- package/dist/button-group/ButtonGroup.vue.d.ts +19 -0
- package/dist/button-group/ButtonGroupSeparator.vue.d.ts +10 -0
- package/dist/button-group/ButtonGroupText.vue.d.ts +22 -0
- package/dist/button-group/index.d.ts +8 -0
- package/dist/button-group/index.js +92 -0
- package/dist/calendar/Calendar.vue.d.ts +14 -0
- package/dist/calendar/CalendarCell.vue.d.ts +18 -0
- package/dist/calendar/CalendarCellTrigger.vue.d.ts +18 -0
- package/dist/calendar/CalendarGrid.vue.d.ts +18 -0
- package/dist/calendar/CalendarGridBody.vue.d.ts +14 -0
- package/dist/calendar/CalendarGridHead.vue.d.ts +14 -0
- package/dist/calendar/CalendarGridRow.vue.d.ts +18 -0
- package/dist/calendar/CalendarHeadCell.vue.d.ts +18 -0
- package/dist/calendar/CalendarHeader.vue.d.ts +18 -0
- package/dist/calendar/CalendarHeading.vue.d.ts +19 -0
- package/dist/calendar/CalendarNextButton.vue.d.ts +18 -0
- package/dist/calendar/CalendarPrevButton.vue.d.ts +18 -0
- package/dist/calendar/index.d.ts +12 -0
- package/dist/calendar/index.js +303 -0
- package/dist/card/Card.vue.d.ts +17 -0
- package/dist/card/CardContent.vue.d.ts +17 -0
- package/dist/card/CardDescription.vue.d.ts +17 -0
- package/dist/card/CardFooter.vue.d.ts +17 -0
- package/dist/card/CardHeader.vue.d.ts +17 -0
- package/dist/card/CardTitle.vue.d.ts +17 -0
- package/dist/card/index.d.ts +6 -0
- package/dist/card/index.js +2 -0
- package/dist/chart/ChartCrosshair.vue.d.ts +13 -0
- package/dist/chart/ChartLegend.vue.d.ts +15 -0
- package/dist/chart/ChartSingleTooltip.vue.d.ts +12 -0
- package/dist/chart/ChartTooltip.vue.d.ts +11 -0
- package/dist/chart/index.d.ts +6 -0
- package/dist/chart/index.js +177 -0
- package/dist/chart/interface.d.ts +63 -0
- package/dist/checkbox/Checkbox.vue.d.ts +22 -0
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +43 -0
- package/dist/chunks/avatar-colors-CCGh54Ve.js +37 -0
- package/dist/chunks/button-DcaKfSRM.js +100 -0
- package/dist/chunks/card-B9Fm3-hL.js +85 -0
- package/dist/chunks/dialog-Df5vNbNz.js +196 -0
- package/dist/chunks/input-BgkMak31.js +44 -0
- package/dist/chunks/scroll-area-COtrGbKj.js +68 -0
- package/dist/chunks/separator-DAL7ppX1.js +31 -0
- package/dist/chunks/sheet-tX6r4wAA.js +150 -0
- package/dist/chunks/tooltip-C80qPEs9.js +102 -0
- package/dist/chunks/utils-CX-Pz5p6.js +8 -0
- package/dist/combobox/Combobox.vue.d.ts +29 -0
- package/dist/combobox/ComboboxAnchor.vue.d.ts +18 -0
- package/dist/combobox/ComboboxEmpty.vue.d.ts +18 -0
- package/dist/combobox/ComboboxGroup.vue.d.ts +19 -0
- package/dist/combobox/ComboboxInput.vue.d.ts +22 -0
- package/dist/combobox/ComboboxItem.vue.d.ts +22 -0
- package/dist/combobox/ComboboxList.vue.d.ts +32 -0
- package/dist/combobox/ComboboxSeparator.vue.d.ts +18 -0
- package/dist/combobox/ComboboxTrigger.vue.d.ts +18 -0
- package/dist/combobox/index.d.ts +10 -0
- package/dist/combobox/index.js +262 -0
- package/dist/command/Command.vue.d.ts +36 -0
- package/dist/command/CommandDialog.vue.d.ts +18 -0
- package/dist/command/CommandEmpty.vue.d.ts +18 -0
- package/dist/command/CommandGroup.vue.d.ts +19 -0
- package/dist/command/CommandInput.vue.d.ts +8 -0
- package/dist/command/CommandItem.vue.d.ts +22 -0
- package/dist/command/CommandList.vue.d.ts +18 -0
- package/dist/command/CommandSeparator.vue.d.ts +18 -0
- package/dist/command/CommandShortcut.vue.d.ts +17 -0
- package/dist/command/index.d.ts +90 -0
- package/dist/command/index.js +297 -0
- package/dist/dialog/Dialog.vue.d.ts +18 -0
- package/dist/dialog/DialogClose.vue.d.ts +14 -0
- package/dist/dialog/DialogContent.vue.d.ts +32 -0
- package/dist/dialog/DialogDescription.vue.d.ts +18 -0
- package/dist/dialog/DialogFooter.vue.d.ts +17 -0
- package/dist/dialog/DialogHeader.vue.d.ts +17 -0
- package/dist/dialog/DialogScrollContent.vue.d.ts +32 -0
- package/dist/dialog/DialogTitle.vue.d.ts +18 -0
- package/dist/dialog/DialogTrigger.vue.d.ts +14 -0
- package/dist/dialog/index.d.ts +9 -0
- package/dist/dialog/index.js +2 -0
- package/dist/drawer/Drawer.vue.d.ts +30 -0
- package/dist/drawer/DrawerContent.vue.d.ts +32 -0
- package/dist/drawer/DrawerDescription.vue.d.ts +18 -0
- package/dist/drawer/DrawerFooter.vue.d.ts +17 -0
- package/dist/drawer/DrawerHeader.vue.d.ts +17 -0
- package/dist/drawer/DrawerOverlay.vue.d.ts +8 -0
- package/dist/drawer/DrawerTitle.vue.d.ts +18 -0
- package/dist/drawer/index.d.ts +8 -0
- package/dist/drawer/index.js +166 -0
- package/dist/dropdown-menu/DropdownMenu.vue.d.ts +18 -0
- package/dist/dropdown-menu/DropdownMenuContent.vue.d.ts +32 -0
- package/dist/dropdown-menu/DropdownMenuItem.vue.d.ts +22 -0
- package/dist/dropdown-menu/DropdownMenuLabel.vue.d.ts +18 -0
- package/dist/dropdown-menu/DropdownMenuSeparator.vue.d.ts +8 -0
- package/dist/dropdown-menu/DropdownMenuTrigger.vue.d.ts +14 -0
- package/dist/dropdown-menu/index.d.ts +6 -0
- package/dist/dropdown-menu/index.js +149 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/input/Input.vue.d.ts +19 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.js +2 -0
- package/dist/label/Label.vue.d.ts +18 -0
- package/dist/label/index.d.ts +1 -0
- package/dist/label/index.js +29 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/popover/Popover.vue.d.ts +18 -0
- package/dist/popover/PopoverContent.vue.d.ts +35 -0
- package/dist/popover/PopoverTrigger.vue.d.ts +14 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +96 -0
- package/dist/range-calendar/RangeCalendar.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarCell.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarCellTrigger.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarGrid.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarGridBody.vue.d.ts +14 -0
- package/dist/range-calendar/RangeCalendarGridHead.vue.d.ts +14 -0
- package/dist/range-calendar/RangeCalendarGridRow.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarHeadCell.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarHeader.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarHeading.vue.d.ts +19 -0
- package/dist/range-calendar/RangeCalendarNextButton.vue.d.ts +18 -0
- package/dist/range-calendar/RangeCalendarPrevButton.vue.d.ts +18 -0
- package/dist/range-calendar/index.d.ts +12 -0
- package/dist/range-calendar/index.js +311 -0
- package/dist/scroll-area/ScrollArea.vue.d.ts +19 -0
- package/dist/scroll-area/ScrollBar.vue.d.ts +10 -0
- package/dist/scroll-area/index.d.ts +2 -0
- package/dist/scroll-area/index.js +2 -0
- package/dist/select/Select.vue.d.ts +21 -0
- package/dist/select/SelectContent.vue.d.ts +28 -0
- package/dist/select/SelectGroup.vue.d.ts +18 -0
- package/dist/select/SelectItem.vue.d.ts +18 -0
- package/dist/select/SelectItemText.vue.d.ts +14 -0
- package/dist/select/SelectLabel.vue.d.ts +18 -0
- package/dist/select/SelectScrollDownButton.vue.d.ts +18 -0
- package/dist/select/SelectScrollUpButton.vue.d.ts +18 -0
- package/dist/select/SelectSeparator.vue.d.ts +8 -0
- package/dist/select/SelectTrigger.vue.d.ts +18 -0
- package/dist/select/SelectValue.vue.d.ts +14 -0
- package/dist/select/index.d.ts +11 -0
- package/dist/select/index.js +276 -0
- package/dist/separator/Separator.vue.d.ts +11 -0
- package/dist/separator/index.d.ts +1 -0
- package/dist/separator/index.js +2 -0
- package/dist/sheet/Sheet.vue.d.ts +18 -0
- package/dist/sheet/SheetClose.vue.d.ts +14 -0
- package/dist/sheet/SheetContent.vue.d.ts +39 -0
- package/dist/sheet/SheetDescription.vue.d.ts +18 -0
- package/dist/sheet/SheetHeader.vue.d.ts +17 -0
- package/dist/sheet/SheetTitle.vue.d.ts +18 -0
- package/dist/sheet/SheetTrigger.vue.d.ts +14 -0
- package/dist/sheet/index.d.ts +7 -0
- package/dist/sheet/index.js +2 -0
- package/dist/sidebar/Sidebar.vue.d.ts +28 -0
- package/dist/sidebar/SidebarContent.vue.d.ts +17 -0
- package/dist/sidebar/SidebarFooter.vue.d.ts +17 -0
- package/dist/sidebar/SidebarGroup.vue.d.ts +17 -0
- package/dist/sidebar/SidebarGroupAction.vue.d.ts +20 -0
- package/dist/sidebar/SidebarGroupContent.vue.d.ts +17 -0
- package/dist/sidebar/SidebarGroupLabel.vue.d.ts +20 -0
- package/dist/sidebar/SidebarHeader.vue.d.ts +17 -0
- package/dist/sidebar/SidebarInput.vue.d.ts +17 -0
- package/dist/sidebar/SidebarInset.vue.d.ts +17 -0
- package/dist/sidebar/SidebarMenu.vue.d.ts +17 -0
- package/dist/sidebar/SidebarMenuAction.vue.d.ts +21 -0
- package/dist/sidebar/SidebarMenuBadge.vue.d.ts +17 -0
- package/dist/sidebar/SidebarMenuButton.vue.d.ts +29 -0
- package/dist/sidebar/SidebarMenuItem.vue.d.ts +17 -0
- package/dist/sidebar/SidebarMenuSub.vue.d.ts +17 -0
- package/dist/sidebar/SidebarMenuSubButton.vue.d.ts +23 -0
- package/dist/sidebar/SidebarMenuSubItem.vue.d.ts +17 -0
- package/dist/sidebar/SidebarProvider.vue.d.ts +26 -0
- package/dist/sidebar/SidebarRail.vue.d.ts +7 -0
- package/dist/sidebar/SidebarSeparator.vue.d.ts +7 -0
- package/dist/sidebar/SidebarTrigger.vue.d.ts +7 -0
- package/dist/sidebar/index.d.ts +45 -0
- package/dist/sidebar/index.js +595 -0
- package/dist/sonner/Sonner.vue.d.ts +4 -0
- package/dist/sonner/index.d.ts +1 -0
- package/dist/sonner/index.js +59 -0
- package/dist/stepper/Stepper.vue.d.ts +17 -0
- package/dist/stepper/index.d.ts +1 -0
- package/dist/stepper/index.js +57 -0
- package/dist/switch/Switch.vue.d.ts +12 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +46 -0
- package/dist/table/Table.vue.d.ts +17 -0
- package/dist/table/TableBody.vue.d.ts +17 -0
- package/dist/table/TableCell.vue.d.ts +17 -0
- package/dist/table/TableHead.vue.d.ts +17 -0
- package/dist/table/TableHeader.vue.d.ts +17 -0
- package/dist/table/TableRow.vue.d.ts +17 -0
- package/dist/table/index.d.ts +6 -0
- package/dist/table/index.js +84 -0
- package/dist/tabs/Tabs.vue.d.ts +19 -0
- package/dist/tabs/TabsContent.vue.d.ts +18 -0
- package/dist/tabs/TabsList.vue.d.ts +18 -0
- package/dist/tabs/TabsTrigger.vue.d.ts +18 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +93 -0
- package/dist/tags-input/TagsInput.vue.d.ts +28 -0
- package/dist/tags-input/TagsInputInput.vue.d.ts +8 -0
- package/dist/tags-input/TagsInputItem.vue.d.ts +18 -0
- package/dist/tags-input/TagsInputItemDelete.vue.d.ts +18 -0
- package/dist/tags-input/TagsInputItemText.vue.d.ts +8 -0
- package/dist/tags-input/index.d.ts +5 -0
- package/dist/tags-input/index.js +130 -0
- package/dist/textarea/Textarea.vue.d.ts +19 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +43 -0
- package/dist/tooltip/Tooltip.vue.d.ts +18 -0
- package/dist/tooltip/TooltipContent.vue.d.ts +26 -0
- package/dist/tooltip/TooltipProvider.vue.d.ts +14 -0
- package/dist/tooltip/TooltipRoot.vue.d.ts +18 -0
- package/dist/tooltip/TooltipTrigger.vue.d.ts +14 -0
- package/dist/tooltip/index.d.ts +4 -0
- package/dist/tooltip/index.js +2 -0
- package/package.json +89 -5
- package/src/alert/Alert.vue +17 -0
- package/src/alert/AlertDescription.vue +14 -0
- package/src/alert/AlertTitle.vue +14 -0
- package/src/alert/index.ts +29 -0
- package/src/alert-dialog/AlertDialog.vue +15 -0
- package/src/alert-dialog/AlertDialogAction.vue +18 -0
- package/src/alert-dialog/AlertDialogCancel.vue +18 -0
- package/src/alert-dialog/AlertDialogContent.vue +33 -0
- package/src/alert-dialog/AlertDialogDescription.vue +17 -0
- package/src/alert-dialog/AlertDialogFooter.vue +14 -0
- package/src/alert-dialog/AlertDialogHeader.vue +14 -0
- package/src/alert-dialog/AlertDialogTitle.vue +17 -0
- package/src/alert-dialog/AlertDialogTrigger.vue +12 -0
- package/src/alert-dialog/index.ts +9 -0
- package/src/avatar/Avatar.vue +76 -0
- package/src/avatar/AvatarFallback.vue +18 -0
- package/src/avatar/AvatarImage.vue +12 -0
- package/src/avatar/index.ts +30 -0
- package/src/avatar-colors.ts +24 -0
- package/src/badge/Badge.vue +44 -0
- package/src/badge/index.ts +33 -0
- package/src/breadcrumb/Breadcrumb.vue +13 -0
- package/src/breadcrumb/BreadcrumbEllipsis.vue +18 -0
- package/src/breadcrumb/BreadcrumbItem.vue +14 -0
- package/src/breadcrumb/BreadcrumbLink.vue +16 -0
- package/src/breadcrumb/BreadcrumbList.vue +14 -0
- package/src/breadcrumb/BreadcrumbPage.vue +14 -0
- package/src/breadcrumb/BreadcrumbSeparator.vue +17 -0
- package/src/breadcrumb/index.ts +7 -0
- package/src/button/Button.vue +64 -0
- package/src/button/index.ts +40 -0
- package/src/button-group/ButtonGroup.vue +22 -0
- package/src/button-group/ButtonGroupSeparator.vue +21 -0
- package/src/button-group/ButtonGroupText.vue +34 -0
- package/src/button-group/index.ts +23 -0
- package/src/calendar/Calendar.vue +57 -0
- package/src/calendar/CalendarCell.vue +27 -0
- package/src/calendar/CalendarCellTrigger.vue +38 -0
- package/src/calendar/CalendarGrid.vue +19 -0
- package/src/calendar/CalendarGridBody.vue +12 -0
- package/src/calendar/CalendarGridHead.vue +12 -0
- package/src/calendar/CalendarGridRow.vue +19 -0
- package/src/calendar/CalendarHeadCell.vue +19 -0
- package/src/calendar/CalendarHeader.vue +19 -0
- package/src/calendar/CalendarHeading.vue +25 -0
- package/src/calendar/CalendarNextButton.vue +26 -0
- package/src/calendar/CalendarPrevButton.vue +26 -0
- package/src/calendar/index.ts +12 -0
- package/src/card/Card.vue +14 -0
- package/src/card/CardContent.vue +14 -0
- package/src/card/CardDescription.vue +14 -0
- package/src/card/CardFooter.vue +14 -0
- package/src/card/CardHeader.vue +14 -0
- package/src/card/CardTitle.vue +14 -0
- package/src/card/index.ts +6 -0
- package/src/chart/ChartCrosshair.vue +47 -0
- package/src/chart/ChartLegend.vue +63 -0
- package/src/chart/ChartSingleTooltip.vue +61 -0
- package/src/chart/ChartTooltip.vue +35 -0
- package/src/chart/index.ts +18 -0
- package/src/chart/interface.ts +64 -0
- package/src/checkbox/Checkbox.vue +33 -0
- package/src/checkbox/index.ts +1 -0
- package/src/combobox/Combobox.vue +15 -0
- package/src/combobox/ComboboxAnchor.vue +19 -0
- package/src/combobox/ComboboxEmpty.vue +17 -0
- package/src/combobox/ComboboxGroup.vue +33 -0
- package/src/combobox/ComboboxInput.vue +33 -0
- package/src/combobox/ComboboxItem.vue +28 -0
- package/src/combobox/ComboboxList.vue +36 -0
- package/src/combobox/ComboboxSeparator.vue +17 -0
- package/src/combobox/ComboboxTrigger.vue +23 -0
- package/src/combobox/index.ts +11 -0
- package/src/command/Command.vue +85 -0
- package/src/command/CommandDialog.vue +23 -0
- package/src/command/CommandEmpty.vue +22 -0
- package/src/command/CommandGroup.vue +50 -0
- package/src/command/CommandInput.vue +42 -0
- package/src/command/CommandItem.vue +79 -0
- package/src/command/CommandList.vue +25 -0
- package/src/command/CommandSeparator.vue +17 -0
- package/src/command/CommandShortcut.vue +14 -0
- package/src/command/index.ts +25 -0
- package/src/dialog/Dialog.vue +15 -0
- package/src/dialog/DialogClose.vue +12 -0
- package/src/dialog/DialogContent.vue +41 -0
- package/src/dialog/DialogDescription.vue +19 -0
- package/src/dialog/DialogFooter.vue +12 -0
- package/src/dialog/DialogHeader.vue +14 -0
- package/src/dialog/DialogScrollContent.vue +49 -0
- package/src/dialog/DialogTitle.vue +19 -0
- package/src/dialog/DialogTrigger.vue +12 -0
- package/src/dialog/index.ts +9 -0
- package/src/drawer/Drawer.vue +20 -0
- package/src/drawer/DrawerContent.vue +31 -0
- package/src/drawer/DrawerDescription.vue +17 -0
- package/src/drawer/DrawerFooter.vue +14 -0
- package/src/drawer/DrawerHeader.vue +14 -0
- package/src/drawer/DrawerOverlay.vue +15 -0
- package/src/drawer/DrawerTitle.vue +17 -0
- package/src/drawer/index.ts +8 -0
- package/src/dropdown-menu/DropdownMenu.vue +26 -0
- package/src/dropdown-menu/DropdownMenuContent.vue +28 -0
- package/src/dropdown-menu/DropdownMenuItem.vue +23 -0
- package/src/dropdown-menu/DropdownMenuLabel.vue +13 -0
- package/src/dropdown-menu/DropdownMenuSeparator.vue +11 -0
- package/src/dropdown-menu/DropdownMenuTrigger.vue +11 -0
- package/src/dropdown-menu/index.ts +6 -0
- package/src/index.ts +2 -0
- package/src/input/Input.vue +43 -0
- package/src/input/index.ts +1 -0
- package/src/label/Label.vue +16 -0
- package/src/label/index.ts +1 -0
- package/src/lib/utils.ts +6 -0
- package/src/popover/Popover.vue +15 -0
- package/src/popover/PopoverContent.vue +39 -0
- package/src/popover/PopoverTrigger.vue +11 -0
- package/src/popover/index.ts +3 -0
- package/src/range-calendar/RangeCalendar.vue +57 -0
- package/src/range-calendar/RangeCalendarCell.vue +27 -0
- package/src/range-calendar/RangeCalendarCellTrigger.vue +40 -0
- package/src/range-calendar/RangeCalendarGrid.vue +19 -0
- package/src/range-calendar/RangeCalendarGridBody.vue +12 -0
- package/src/range-calendar/RangeCalendarGridHead.vue +12 -0
- package/src/range-calendar/RangeCalendarGridRow.vue +19 -0
- package/src/range-calendar/RangeCalendarHeadCell.vue +19 -0
- package/src/range-calendar/RangeCalendarHeader.vue +19 -0
- package/src/range-calendar/RangeCalendarHeading.vue +25 -0
- package/src/range-calendar/RangeCalendarNextButton.vue +26 -0
- package/src/range-calendar/RangeCalendarPrevButton.vue +26 -0
- package/src/range-calendar/index.ts +12 -0
- package/src/scroll-area/ScrollArea.vue +22 -0
- package/src/scroll-area/ScrollBar.vue +29 -0
- package/src/scroll-area/index.ts +2 -0
- package/src/select/Select.vue +15 -0
- package/src/select/SelectContent.vue +43 -0
- package/src/select/SelectGroup.vue +17 -0
- package/src/select/SelectItem.vue +36 -0
- package/src/select/SelectItemText.vue +12 -0
- package/src/select/SelectLabel.vue +14 -0
- package/src/select/SelectScrollDownButton.vue +22 -0
- package/src/select/SelectScrollUpButton.vue +22 -0
- package/src/select/SelectSeparator.vue +15 -0
- package/src/select/SelectTrigger.vue +31 -0
- package/src/select/SelectValue.vue +12 -0
- package/src/select/index.ts +11 -0
- package/src/separator/Separator.vue +21 -0
- package/src/separator/index.ts +1 -0
- package/src/sheet/Sheet.vue +15 -0
- package/src/sheet/SheetClose.vue +11 -0
- package/src/sheet/SheetContent.vue +54 -0
- package/src/sheet/SheetDescription.vue +13 -0
- package/src/sheet/SheetHeader.vue +14 -0
- package/src/sheet/SheetTitle.vue +13 -0
- package/src/sheet/SheetTrigger.vue +11 -0
- package/src/sheet/index.ts +7 -0
- package/src/sidebar/Sidebar.vue +101 -0
- package/src/sidebar/SidebarContent.vue +21 -0
- package/src/sidebar/SidebarFooter.vue +16 -0
- package/src/sidebar/SidebarGroup.vue +16 -0
- package/src/sidebar/SidebarGroupAction.vue +31 -0
- package/src/sidebar/SidebarGroupContent.vue +16 -0
- package/src/sidebar/SidebarGroupLabel.vue +31 -0
- package/src/sidebar/SidebarHeader.vue +16 -0
- package/src/sidebar/SidebarInput.vue +20 -0
- package/src/sidebar/SidebarInset.vue +25 -0
- package/src/sidebar/SidebarMenu.vue +16 -0
- package/src/sidebar/SidebarMenuAction.vue +37 -0
- package/src/sidebar/SidebarMenuBadge.vue +29 -0
- package/src/sidebar/SidebarMenuButton.vue +64 -0
- package/src/sidebar/SidebarMenuItem.vue +16 -0
- package/src/sidebar/SidebarMenuSub.vue +25 -0
- package/src/sidebar/SidebarMenuSubButton.vue +39 -0
- package/src/sidebar/SidebarMenuSubItem.vue +16 -0
- package/src/sidebar/SidebarProvider.vue +74 -0
- package/src/sidebar/SidebarRail.vue +34 -0
- package/src/sidebar/SidebarSeparator.vue +15 -0
- package/src/sidebar/SidebarTrigger.vue +28 -0
- package/src/sidebar/index.ts +70 -0
- package/src/sonner/Sonner.vue +54 -0
- package/src/sonner/index.ts +1 -0
- package/src/stepper/Stepper.vue +58 -0
- package/src/stepper/index.ts +1 -0
- package/src/switch/Switch.vue +41 -0
- package/src/switch/index.ts +1 -0
- package/src/table/Table.vue +16 -0
- package/src/table/TableBody.vue +14 -0
- package/src/table/TableCell.vue +14 -0
- package/src/table/TableHead.vue +14 -0
- package/src/table/TableHeader.vue +14 -0
- package/src/table/TableRow.vue +14 -0
- package/src/table/index.ts +6 -0
- package/src/tabs/Tabs.vue +15 -0
- package/src/tabs/TabsContent.vue +16 -0
- package/src/tabs/TabsList.vue +16 -0
- package/src/tabs/TabsTrigger.vue +21 -0
- package/src/tabs/index.ts +4 -0
- package/src/tags-input/TagsInput.vue +23 -0
- package/src/tags-input/TagsInputInput.vue +17 -0
- package/src/tags-input/TagsInputItem.vue +27 -0
- package/src/tags-input/TagsInputItemDelete.vue +22 -0
- package/src/tags-input/TagsInputItemText.vue +17 -0
- package/src/tags-input/index.ts +5 -0
- package/src/textarea/Textarea.vue +41 -0
- package/src/textarea/index.ts +1 -0
- package/src/tooltip/Tooltip.vue +15 -0
- package/src/tooltip/TooltipContent.vue +37 -0
- package/src/tooltip/TooltipProvider.vue +12 -0
- package/src/tooltip/TooltipRoot.vue +14 -0
- package/src/tooltip/TooltipTrigger.vue +12 -0
- package/src/tooltip/index.ts +4 -0
- package/styles/kit.css +100 -0
- package/styles/theme.css +950 -0
- package/styles/typography.css +430 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { CalendarCellProps } from "reka-ui";
|
|
5
|
+
import { CalendarCell, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarCellProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<CalendarCell
|
|
17
|
+
:class="
|
|
18
|
+
cn(
|
|
19
|
+
'h-9 w-9 p-0 [&:has([data-selected])]:bg-accent [&:has([data-selected][data-outside-view])]:bg-accent/50 relative text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md',
|
|
20
|
+
props.class,
|
|
21
|
+
)
|
|
22
|
+
"
|
|
23
|
+
v-bind="forwardedProps"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</CalendarCell>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { CalendarCellTriggerProps } from "reka-ui";
|
|
5
|
+
import { CalendarCellTrigger, useForwardProps } from "reka-ui";
|
|
6
|
+
import { buttonVariants } from "../button";
|
|
7
|
+
import { cn } from "../lib/utils";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<CalendarCellTriggerProps & { class?: HTMLAttributes["class"] }>();
|
|
10
|
+
|
|
11
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
12
|
+
|
|
13
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<CalendarCellTrigger
|
|
18
|
+
:class="
|
|
19
|
+
cn(
|
|
20
|
+
buttonVariants({ variant: 'ghost' }),
|
|
21
|
+
'h-9 w-9 p-0 font-normal',
|
|
22
|
+
'[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground',
|
|
23
|
+
// Selected
|
|
24
|
+
'data-[selected]:text-primary-foreground data-[selected]:hover:text-primary-foreground data-[selected]:focus:text-primary-foreground data-[selected]:bg-primary data-[selected]:opacity-100 data-[selected]:hover:bg-primary data-[selected]:focus:bg-primary',
|
|
25
|
+
// Disabled
|
|
26
|
+
'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50',
|
|
27
|
+
// Unavailable
|
|
28
|
+
'data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through',
|
|
29
|
+
// Outside months
|
|
30
|
+
'data-[outside-view]:text-muted-foreground [&[data-outside-view][data-selected]]:bg-accent/50 [&[data-outside-view][data-selected]]:text-muted-foreground data-[outside-view]:opacity-50 [&[data-outside-view][data-selected]]:opacity-30',
|
|
31
|
+
props.class,
|
|
32
|
+
)
|
|
33
|
+
"
|
|
34
|
+
v-bind="forwardedProps"
|
|
35
|
+
>
|
|
36
|
+
<slot />
|
|
37
|
+
</CalendarCellTrigger>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { CalendarGridProps } from "reka-ui";
|
|
5
|
+
import { CalendarGrid, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarGridProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<CalendarGrid :class="cn('space-y-1 w-full border-collapse', props.class)" v-bind="forwardedProps">
|
|
17
|
+
<slot />
|
|
18
|
+
</CalendarGrid>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { CalendarGridBodyProps } from "reka-ui";
|
|
3
|
+
import { CalendarGridBody } from "reka-ui";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<CalendarGridBodyProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<CalendarGridBody v-bind="props">
|
|
10
|
+
<slot />
|
|
11
|
+
</CalendarGridBody>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { CalendarGridHeadProps } from "reka-ui";
|
|
3
|
+
import { CalendarGridHead } from "reka-ui";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<CalendarGridHeadProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<CalendarGridHead v-bind="props">
|
|
10
|
+
<slot />
|
|
11
|
+
</CalendarGridHead>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { CalendarGridRowProps } from "reka-ui";
|
|
5
|
+
import { CalendarGridRow, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarGridRowProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<CalendarGridRow :class="cn('flex', props.class)" v-bind="forwardedProps">
|
|
17
|
+
<slot />
|
|
18
|
+
</CalendarGridRow>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { CalendarHeadCellProps } from "reka-ui";
|
|
5
|
+
import { CalendarHeadCell, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarHeadCellProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<CalendarHeadCell :class="cn('w-9 font-normal text-muted-foreground rounded-md text-[0.8rem]', props.class)" v-bind="forwardedProps">
|
|
17
|
+
<slot />
|
|
18
|
+
</CalendarHeadCell>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { CalendarHeaderProps } from "reka-ui";
|
|
5
|
+
import { CalendarHeader, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarHeaderProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<CalendarHeader :class="cn('pt-1 relative flex w-full items-center justify-between', props.class)" v-bind="forwardedProps">
|
|
17
|
+
<slot />
|
|
18
|
+
</CalendarHeader>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { CalendarHeadingProps } from "reka-ui";
|
|
5
|
+
import { CalendarHeading, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<CalendarHeadingProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
defineSlots<{
|
|
11
|
+
default: (props: { headingValue: string }) => any;
|
|
12
|
+
}>();
|
|
13
|
+
|
|
14
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
15
|
+
|
|
16
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<CalendarHeading v-slot="{ headingValue }" :class="cn('font-medium text-sm', props.class)" v-bind="forwardedProps">
|
|
21
|
+
<slot :heading-value>
|
|
22
|
+
{{ headingValue }}
|
|
23
|
+
</slot>
|
|
24
|
+
</CalendarHeading>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import { ChevronRight } from "lucide-vue-next";
|
|
5
|
+
import type { CalendarNextProps } from "reka-ui";
|
|
6
|
+
import { CalendarNext, useForwardProps } from "reka-ui";
|
|
7
|
+
import { buttonVariants } from "../button";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<CalendarNextProps & { class?: HTMLAttributes["class"] }>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
13
|
+
|
|
14
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<CalendarNext
|
|
19
|
+
:class="cn(buttonVariants({ variant: 'outline' }), 'h-7 w-7 p-0 bg-transparent opacity-50 hover:opacity-100', props.class)"
|
|
20
|
+
v-bind="forwardedProps"
|
|
21
|
+
>
|
|
22
|
+
<slot>
|
|
23
|
+
<ChevronRight class="h-4 w-4" />
|
|
24
|
+
</slot>
|
|
25
|
+
</CalendarNext>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import { ChevronLeft } from "lucide-vue-next";
|
|
5
|
+
import type { CalendarPrevProps } from "reka-ui";
|
|
6
|
+
import { CalendarPrev, useForwardProps } from "reka-ui";
|
|
7
|
+
import { buttonVariants } from "../button";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<CalendarPrevProps & { class?: HTMLAttributes["class"] }>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
13
|
+
|
|
14
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<CalendarPrev
|
|
19
|
+
:class="cn(buttonVariants({ variant: 'outline' }), 'h-7 w-7 p-0 bg-transparent opacity-50 hover:opacity-100', props.class)"
|
|
20
|
+
v-bind="forwardedProps"
|
|
21
|
+
>
|
|
22
|
+
<slot>
|
|
23
|
+
<ChevronLeft class="h-4 w-4" />
|
|
24
|
+
</slot>
|
|
25
|
+
</CalendarPrev>
|
|
26
|
+
</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 CalendarNextButton } from "./CalendarNextButton.vue";
|
|
12
|
+
export { default as CalendarPrevButton } from "./CalendarPrevButton.vue";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div :class="cn('bg-card text-card-foreground rounded-lg border shadow-sm', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div :class="cn('p-6 pt-0', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<p :class="cn('text-muted-foreground text-sm', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</p>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div :class="cn('p-6 pt-0 flex items-center', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div :class="cn('gap-y-1.5 p-6 flex flex-col', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<h3 :class="cn('text-2xl font-semibold tracking-tight leading-none', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</h3>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Card } from "./Card.vue";
|
|
2
|
+
export { default as CardContent } from "./CardContent.vue";
|
|
3
|
+
export { default as CardDescription } from "./CardDescription.vue";
|
|
4
|
+
export { default as CardFooter } from "./CardFooter.vue";
|
|
5
|
+
export { default as CardHeader } from "./CardHeader.vue";
|
|
6
|
+
export { default as CardTitle } from "./CardTitle.vue";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ChartTooltip } from ".";
|
|
3
|
+
import type { Component } from "vue";
|
|
4
|
+
import { createApp } from "vue";
|
|
5
|
+
import type { BulletLegendItemInterface } from "@unovis/ts";
|
|
6
|
+
import { omit } from "@unovis/ts";
|
|
7
|
+
import { VisCrosshair, VisTooltip } from "@unovis/vue";
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(
|
|
10
|
+
defineProps<{
|
|
11
|
+
colors: string[];
|
|
12
|
+
index: string;
|
|
13
|
+
items: BulletLegendItemInterface[];
|
|
14
|
+
customTooltip?: Component;
|
|
15
|
+
}>(),
|
|
16
|
+
{
|
|
17
|
+
colors: () => [],
|
|
18
|
+
},
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
// Use weakmap to store reference to each datapoint for Tooltip
|
|
22
|
+
const wm = new WeakMap();
|
|
23
|
+
function template(d: any) {
|
|
24
|
+
if (wm.has(d)) {
|
|
25
|
+
return wm.get(d);
|
|
26
|
+
} else {
|
|
27
|
+
const componentDiv = document.createElement("div");
|
|
28
|
+
const omittedData = Object.entries(omit(d, [props.index])).map(([key, value]) => {
|
|
29
|
+
const legendReference = props.items.find((i) => i.name === key);
|
|
30
|
+
return { ...legendReference, value };
|
|
31
|
+
});
|
|
32
|
+
const TooltipComponent = props.customTooltip ?? ChartTooltip;
|
|
33
|
+
createApp(TooltipComponent, { title: d[props.index].toString(), data: omittedData }).mount(componentDiv);
|
|
34
|
+
wm.set(d, componentDiv.innerHTML);
|
|
35
|
+
return componentDiv.innerHTML;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function color(d: unknown, i: number) {
|
|
40
|
+
return props.colors[i] ?? "transparent";
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<VisTooltip :horizontal-shift="20" :vertical-shift="20" />
|
|
46
|
+
<VisCrosshair :template="template" :color="color" />
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { nextTick, onMounted, ref } from "vue";
|
|
3
|
+
import type { BulletLegendItemInterface } from "@unovis/ts";
|
|
4
|
+
import { BulletLegend } from "@unovis/ts";
|
|
5
|
+
import { VisBulletLegend } from "@unovis/vue";
|
|
6
|
+
import { buttonVariants } from "../button";
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<{ items: BulletLegendItemInterface[] }>(), {
|
|
9
|
+
items: () => [],
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const emits = defineEmits<{
|
|
13
|
+
legendItemClick: [d: BulletLegendItemInterface, i: number];
|
|
14
|
+
"update:items": [payload: BulletLegendItemInterface[]];
|
|
15
|
+
}>();
|
|
16
|
+
|
|
17
|
+
const elRef = ref<HTMLElement>();
|
|
18
|
+
|
|
19
|
+
function keepStyling() {
|
|
20
|
+
const selector = `.${BulletLegend.selectors.item}`;
|
|
21
|
+
nextTick(() => {
|
|
22
|
+
const elements = elRef.value?.querySelectorAll(selector);
|
|
23
|
+
const classes = buttonVariants({ variant: "ghost", size: "sm" }).split(" ");
|
|
24
|
+
elements?.forEach((el) => el.classList.add(...classes, "!inline-flex", "!mr-2"));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
onMounted(() => {
|
|
29
|
+
keepStyling();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
function onLegendItemClick(d: BulletLegendItemInterface, i: number) {
|
|
33
|
+
emits("legendItemClick", d, i);
|
|
34
|
+
const isBulletActive = !props.items[i].inactive;
|
|
35
|
+
const isFilterApplied = props.items.some((i) => i.inactive);
|
|
36
|
+
if (isFilterApplied && isBulletActive) {
|
|
37
|
+
// reset filter
|
|
38
|
+
emits(
|
|
39
|
+
"update:items",
|
|
40
|
+
props.items.map((item) => ({ ...item, inactive: false })),
|
|
41
|
+
);
|
|
42
|
+
} else {
|
|
43
|
+
// apply selection, set other item as inactive
|
|
44
|
+
emits(
|
|
45
|
+
"update:items",
|
|
46
|
+
props.items.map((item) => (item.name === d.name ? { ...d, inactive: false } : { ...item, inactive: true })),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
keepStyling();
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<div
|
|
55
|
+
ref="elRef"
|
|
56
|
+
class="w-max"
|
|
57
|
+
:style="{
|
|
58
|
+
'--vis-legend-bullet-size': '16px',
|
|
59
|
+
}"
|
|
60
|
+
>
|
|
61
|
+
<VisBulletLegend :items="items" :on-legend-item-click="onLegendItemClick" />
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ChartTooltip } from ".";
|
|
3
|
+
import type { Component } from "vue";
|
|
4
|
+
import { createApp } from "vue";
|
|
5
|
+
import type { BulletLegendItemInterface } from "@unovis/ts";
|
|
6
|
+
import { omit } from "@unovis/ts";
|
|
7
|
+
import { VisTooltip } from "@unovis/vue";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
selector: string;
|
|
11
|
+
index: string;
|
|
12
|
+
items?: BulletLegendItemInterface[];
|
|
13
|
+
valueFormatter?: (tick: number, i?: number, ticks?: number[]) => string;
|
|
14
|
+
customTooltip?: Component;
|
|
15
|
+
}>();
|
|
16
|
+
|
|
17
|
+
// Use weakmap to store reference to each datapoint for Tooltip
|
|
18
|
+
const wm = new WeakMap();
|
|
19
|
+
function template(d: any, i: number, elements: (HTMLElement | SVGElement)[]) {
|
|
20
|
+
const valueFormatter = props.valueFormatter ?? ((tick: number) => `${tick}`);
|
|
21
|
+
if (props.index in d) {
|
|
22
|
+
if (wm.has(d)) {
|
|
23
|
+
return wm.get(d);
|
|
24
|
+
} else {
|
|
25
|
+
const componentDiv = document.createElement("div");
|
|
26
|
+
const omittedData = Object.entries(omit(d, [props.index])).map(([key, value]) => {
|
|
27
|
+
const legendReference = props.items?.find((i) => i.name === key);
|
|
28
|
+
return { ...legendReference, value: valueFormatter(value) };
|
|
29
|
+
});
|
|
30
|
+
const TooltipComponent = props.customTooltip ?? ChartTooltip;
|
|
31
|
+
createApp(TooltipComponent, { title: d[props.index], data: omittedData }).mount(componentDiv);
|
|
32
|
+
wm.set(d, componentDiv.innerHTML);
|
|
33
|
+
return componentDiv.innerHTML;
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
const data = d.data;
|
|
37
|
+
|
|
38
|
+
if (wm.has(data)) {
|
|
39
|
+
return wm.get(data);
|
|
40
|
+
} else {
|
|
41
|
+
const style = getComputedStyle(elements[i]);
|
|
42
|
+
const omittedData = [{ name: data.name, value: valueFormatter(data[props.index]), color: style.fill }];
|
|
43
|
+
const componentDiv = document.createElement("div");
|
|
44
|
+
const TooltipComponent = props.customTooltip ?? ChartTooltip;
|
|
45
|
+
createApp(TooltipComponent, { title: d[props.index], data: omittedData }).mount(componentDiv);
|
|
46
|
+
wm.set(d, componentDiv.innerHTML);
|
|
47
|
+
return componentDiv.innerHTML;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<VisTooltip
|
|
55
|
+
:horizontal-shift="20"
|
|
56
|
+
:vertical-shift="20"
|
|
57
|
+
:triggers="{
|
|
58
|
+
[selector]: template,
|
|
59
|
+
}"
|
|
60
|
+
/>
|
|
61
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../card";
|
|
3
|
+
|
|
4
|
+
defineProps<{
|
|
5
|
+
title?: string;
|
|
6
|
+
data: {
|
|
7
|
+
name: string;
|
|
8
|
+
color: string;
|
|
9
|
+
value: any;
|
|
10
|
+
}[];
|
|
11
|
+
}>();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<Card class="text-sm">
|
|
16
|
+
<CardHeader v-if="title" class="p-3 border-b">
|
|
17
|
+
<CardTitle>
|
|
18
|
+
{{ title }}
|
|
19
|
+
</CardTitle>
|
|
20
|
+
</CardHeader>
|
|
21
|
+
<CardContent class="p-3 gap-1 flex min-w-[180px] flex-col">
|
|
22
|
+
<div v-for="(item, key) in data" :key="key" class="flex justify-between">
|
|
23
|
+
<div class="flex items-center">
|
|
24
|
+
<span class="w-2.5 h-2.5 mr-2">
|
|
25
|
+
<svg width="100%" height="100%" viewBox="0 0 30 30">
|
|
26
|
+
<path d=" M 15 15 m -14, 0 a 14,14 0 1,1 28,0 a 14,14 0 1,1 -28,0" :stroke="item.color" :fill="item.color" stroke-width="1" />
|
|
27
|
+
</svg>
|
|
28
|
+
</span>
|
|
29
|
+
<span>{{ item.name }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
<span class="font-semibold ml-4">{{ item.value }}</span>
|
|
32
|
+
</div>
|
|
33
|
+
</CardContent>
|
|
34
|
+
</Card>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { default as ChartCrosshair } from "./ChartCrosshair.vue";
|
|
2
|
+
export { default as ChartLegend } from "./ChartLegend.vue";
|
|
3
|
+
export { default as ChartSingleTooltip } from "./ChartSingleTooltip.vue";
|
|
4
|
+
export { default as ChartTooltip } from "./ChartTooltip.vue";
|
|
5
|
+
|
|
6
|
+
export function defaultColors(count: number = 3) {
|
|
7
|
+
const quotient = Math.floor(count / 2);
|
|
8
|
+
const remainder = count % 2;
|
|
9
|
+
|
|
10
|
+
const primaryCount = quotient + remainder;
|
|
11
|
+
const secondaryCount = quotient;
|
|
12
|
+
return [
|
|
13
|
+
...Array.from(new Array(primaryCount).keys()).map((i) => `hsl(var(--vis-primary-color) / ${1 - (1 / primaryCount) * i})`),
|
|
14
|
+
...Array.from(new Array(secondaryCount).keys()).map((i) => `hsl(var(--vis-secondary-color) / ${1 - (1 / secondaryCount) * i})`),
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export * from "./interface";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Spacing } from "@unovis/ts";
|
|
2
|
+
|
|
3
|
+
type KeyOf<T extends Record<string, any>> = Extract<keyof T, string>;
|
|
4
|
+
|
|
5
|
+
export interface BaseChartProps<T extends Record<string, any>> {
|
|
6
|
+
/**
|
|
7
|
+
* The source data, in which each entry is a dictionary.
|
|
8
|
+
*/
|
|
9
|
+
data: T[];
|
|
10
|
+
/**
|
|
11
|
+
* Select the categories from your data. Used to populate the legend and tooltip.
|
|
12
|
+
*/
|
|
13
|
+
categories: KeyOf<T>[];
|
|
14
|
+
/**
|
|
15
|
+
* Sets the key to map the data to the axis.
|
|
16
|
+
*/
|
|
17
|
+
index: KeyOf<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Change the default colors.
|
|
20
|
+
*/
|
|
21
|
+
colors?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Margin of each the container
|
|
24
|
+
*/
|
|
25
|
+
margin?: Spacing;
|
|
26
|
+
/**
|
|
27
|
+
* Change the opacity of the non-selected field
|
|
28
|
+
* @default 0.2
|
|
29
|
+
*/
|
|
30
|
+
filterOpacity?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Function to format X label
|
|
33
|
+
*/
|
|
34
|
+
xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;
|
|
35
|
+
/**
|
|
36
|
+
* Function to format Y label
|
|
37
|
+
*/
|
|
38
|
+
yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Controls the visibility of the X axis.
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
showXAxis?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Controls the visibility of the Y axis.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
showYAxis?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Controls the visibility of tooltip.
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
showTooltip?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Controls the visibility of legend.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
showLegend?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Controls the visibility of gridline.
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
showGridLine?: boolean;
|
|
64
|
+
}
|