@matta-trade/ui 0.0.0-stage → 0.2.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/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,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import { Check } from "lucide-vue-next";
|
|
5
|
+
import type { CheckboxRootEmits, CheckboxRootProps } from "reka-ui";
|
|
6
|
+
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from "reka-ui";
|
|
7
|
+
import { cn } from "../lib/utils";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes["class"] }>();
|
|
10
|
+
const emits = defineEmits<CheckboxRootEmits>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
13
|
+
|
|
14
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<CheckboxRoot
|
|
19
|
+
v-bind="forwarded"
|
|
20
|
+
:class="
|
|
21
|
+
cn(
|
|
22
|
+
'peer h-4 w-4 grid shrink-0 place-content-center rounded-sm border border-primary transition-colors focus-visible:ring-2 focus-visible:ring-brand-500/20 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-transparent data-[state=checked]:bg-brand-solid data-[state=checked]:text-white',
|
|
23
|
+
props.class,
|
|
24
|
+
)
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<CheckboxIndicator class="grid place-content-center text-current">
|
|
28
|
+
<slot>
|
|
29
|
+
<Check class="h-4 w-4" />
|
|
30
|
+
</slot>
|
|
31
|
+
</CheckboxIndicator>
|
|
32
|
+
</CheckboxRoot>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from "./Checkbox.vue";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxRootEmits, ComboboxRootProps } from "reka-ui";
|
|
3
|
+
import { ComboboxRoot, useForwardPropsEmits } from "reka-ui";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<ComboboxRootProps>();
|
|
6
|
+
const emits = defineEmits<ComboboxRootEmits>();
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<ComboboxRoot v-bind="forwarded">
|
|
13
|
+
<slot />
|
|
14
|
+
</ComboboxRoot>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxAnchorProps } from "reka-ui";
|
|
5
|
+
import { ComboboxAnchor, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxAnchorProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ComboboxAnchor v-bind="forwarded" :class="cn('w-[200px]', props.class)">
|
|
17
|
+
<slot />
|
|
18
|
+
</ComboboxAnchor>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxEmptyProps } from "reka-ui";
|
|
5
|
+
import { ComboboxEmpty } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxEmptyProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<ComboboxEmpty v-bind="delegatedProps" :class="cn('py-6 text-center text-sm', props.class)">
|
|
15
|
+
<slot />
|
|
16
|
+
</ComboboxEmpty>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxGroupProps } from "reka-ui";
|
|
5
|
+
import { ComboboxGroup, ComboboxLabel } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
ComboboxGroupProps & {
|
|
10
|
+
class?: HTMLAttributes["class"];
|
|
11
|
+
heading?: string;
|
|
12
|
+
}
|
|
13
|
+
>();
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ComboboxGroup
|
|
20
|
+
v-bind="delegatedProps"
|
|
21
|
+
:class="
|
|
22
|
+
cn(
|
|
23
|
+
'p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden [&_[cmdk-group-heading]]:text-xs',
|
|
24
|
+
props.class,
|
|
25
|
+
)
|
|
26
|
+
"
|
|
27
|
+
>
|
|
28
|
+
<ComboboxLabel v-if="heading" class="px-2 py-1.5 font-medium text-muted-foreground text-xs">
|
|
29
|
+
{{ heading }}
|
|
30
|
+
</ComboboxLabel>
|
|
31
|
+
<slot />
|
|
32
|
+
</ComboboxGroup>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxInputEmits, ComboboxInputProps } from "reka-ui";
|
|
5
|
+
import { ComboboxInput, useForwardPropsEmits } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
ComboboxInputProps & {
|
|
10
|
+
class?: HTMLAttributes["class"];
|
|
11
|
+
}
|
|
12
|
+
>();
|
|
13
|
+
|
|
14
|
+
const emits = defineEmits<ComboboxInputEmits>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
17
|
+
|
|
18
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<ComboboxInput
|
|
23
|
+
v-bind="forwarded"
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'h-9 px-3 py-1 file:font-medium flex w-full rounded-md border border-border-primary bg-primary text-sm text-primary shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm placeholder:text-placeholder focus-visible:border-border-brand focus-visible:ring-2 focus-visible:ring-brand-500/20 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
27
|
+
props.class,
|
|
28
|
+
)
|
|
29
|
+
"
|
|
30
|
+
>
|
|
31
|
+
<slot />
|
|
32
|
+
</ComboboxInput>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxItemEmits, ComboboxItemProps } from "reka-ui";
|
|
5
|
+
import { ComboboxItem, useForwardPropsEmits } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxItemProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
const emits = defineEmits<ComboboxItemEmits>();
|
|
10
|
+
|
|
11
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
12
|
+
|
|
13
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ComboboxItem
|
|
18
|
+
v-bind="forwarded"
|
|
19
|
+
:class="
|
|
20
|
+
cn(
|
|
21
|
+
'gap-2 px-2 py-1.5 [&_svg]:size-4 relative flex cursor-default items-center justify-between rounded-sm text-sm text-primary outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-active [&_svg]:shrink-0',
|
|
22
|
+
props.class,
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
>
|
|
26
|
+
<slot />
|
|
27
|
+
</ComboboxItem>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxContentEmits, ComboboxContentProps } from "reka-ui";
|
|
5
|
+
import { ComboboxContent, ComboboxPortal, ComboboxViewport, useForwardPropsEmits } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes["class"] }>(), {
|
|
9
|
+
position: "popper",
|
|
10
|
+
align: "center",
|
|
11
|
+
sideOffset: 4,
|
|
12
|
+
});
|
|
13
|
+
const emits = defineEmits<ComboboxContentEmits>();
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
16
|
+
|
|
17
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<ComboboxPortal>
|
|
22
|
+
<ComboboxContent
|
|
23
|
+
v-bind="forwarded"
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'z-50 w-[200px] rounded-md border border-border-secondary bg-primary text-primary shadow-lg outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
|
|
27
|
+
props.class,
|
|
28
|
+
)
|
|
29
|
+
"
|
|
30
|
+
>
|
|
31
|
+
<ComboboxViewport>
|
|
32
|
+
<slot />
|
|
33
|
+
</ComboboxViewport>
|
|
34
|
+
</ComboboxContent>
|
|
35
|
+
</ComboboxPortal>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxSeparatorProps } from "reka-ui";
|
|
5
|
+
import { ComboboxSeparator } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxSeparatorProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<ComboboxSeparator v-bind="delegatedProps" :class="cn('-mx-1 bg-border h-px', props.class)">
|
|
15
|
+
<slot />
|
|
16
|
+
</ComboboxSeparator>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ComboboxTriggerProps } from "reka-ui";
|
|
5
|
+
import { ComboboxTrigger, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxTriggerProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ComboboxTrigger
|
|
17
|
+
v-bind="forwarded"
|
|
18
|
+
:class="cn('rounded-md focus-visible:ring-2 focus-visible:ring-brand-500/20 focus-visible:outline-none', props.class)"
|
|
19
|
+
tabindex="0"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</ComboboxTrigger>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as Combobox } from "./Combobox.vue";
|
|
2
|
+
export { default as ComboboxAnchor } from "./ComboboxAnchor.vue";
|
|
3
|
+
export { default as ComboboxEmpty } from "./ComboboxEmpty.vue";
|
|
4
|
+
export { default as ComboboxGroup } from "./ComboboxGroup.vue";
|
|
5
|
+
export { default as ComboboxInput } from "./ComboboxInput.vue";
|
|
6
|
+
export { default as ComboboxItem } from "./ComboboxItem.vue";
|
|
7
|
+
export { default as ComboboxList } from "./ComboboxList.vue";
|
|
8
|
+
export { default as ComboboxSeparator } from "./ComboboxSeparator.vue";
|
|
9
|
+
export { default as ComboboxTrigger } from "./ComboboxTrigger.vue";
|
|
10
|
+
|
|
11
|
+
export { ComboboxCancel, ComboboxItemIndicator } from "reka-ui";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provideCommandContext } from ".";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { reactive, ref, watch } from "vue";
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
6
|
+
import type { ListboxRootEmits, ListboxRootProps } from "reka-ui";
|
|
7
|
+
import { ListboxRoot, useFilter, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<ListboxRootProps & { class?: HTMLAttributes["class"] }>(), {
|
|
11
|
+
modelValue: "",
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const emits = defineEmits<ListboxRootEmits>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
17
|
+
|
|
18
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
19
|
+
|
|
20
|
+
const allItems = ref<Map<string, string>>(new Map());
|
|
21
|
+
const allGroups = ref<Map<string, Set<string>>>(new Map());
|
|
22
|
+
|
|
23
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
|
24
|
+
const filterState = reactive({
|
|
25
|
+
search: "",
|
|
26
|
+
filtered: {
|
|
27
|
+
/** The count of all visible items. */
|
|
28
|
+
count: 0,
|
|
29
|
+
/** Map from visible item id to its search score. */
|
|
30
|
+
items: new Map() as Map<string, number>,
|
|
31
|
+
/** Set of groups with at least one visible item. */
|
|
32
|
+
groups: new Set() as Set<string>,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
function filterItems() {
|
|
37
|
+
if (!filterState.search) {
|
|
38
|
+
filterState.filtered.count = allItems.value.size;
|
|
39
|
+
// Do nothing, each item will know to show itself because search is empty
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Reset the groups
|
|
44
|
+
filterState.filtered.groups = new Set();
|
|
45
|
+
let itemCount = 0;
|
|
46
|
+
|
|
47
|
+
// Check which items should be included
|
|
48
|
+
for (const [id, value] of allItems.value) {
|
|
49
|
+
const score = contains(value, filterState.search);
|
|
50
|
+
filterState.filtered.items.set(id, score ? 1 : 0);
|
|
51
|
+
if (score) itemCount++;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Check which groups have at least 1 item shown
|
|
55
|
+
for (const [groupId, group] of allGroups.value) {
|
|
56
|
+
for (const itemId of group) {
|
|
57
|
+
if (filterState.filtered.items.get(itemId)! > 0) {
|
|
58
|
+
filterState.filtered.groups.add(groupId);
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
filterState.filtered.count = itemCount;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
watch(
|
|
68
|
+
() => filterState.search,
|
|
69
|
+
() => {
|
|
70
|
+
filterItems();
|
|
71
|
+
},
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
provideCommandContext({
|
|
75
|
+
allItems,
|
|
76
|
+
allGroups,
|
|
77
|
+
filterState,
|
|
78
|
+
});
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<ListboxRoot v-bind="forwarded" :class="cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-primary text-primary', props.class)">
|
|
83
|
+
<slot />
|
|
84
|
+
</ListboxRoot>
|
|
85
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Command from "./Command.vue";
|
|
3
|
+
import type { DialogRootEmits, DialogRootProps } from "reka-ui";
|
|
4
|
+
import { useForwardPropsEmits } from "reka-ui";
|
|
5
|
+
import { Dialog, DialogContent } from "../dialog";
|
|
6
|
+
|
|
7
|
+
const props = defineProps<DialogRootProps>();
|
|
8
|
+
const emits = defineEmits<DialogRootEmits>();
|
|
9
|
+
|
|
10
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Dialog v-bind="forwarded">
|
|
15
|
+
<DialogContent class="p-0 overflow-hidden shadow-lg">
|
|
16
|
+
<Command
|
|
17
|
+
class="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5 [&_[cmdk-group-heading]]:text-tertiary"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</Command>
|
|
21
|
+
</DialogContent>
|
|
22
|
+
</Dialog>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useCommand } from ".";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
6
|
+
import type { PrimitiveProps } from "reka-ui";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<PrimitiveProps & { class?: HTMLAttributes["class"] }>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
13
|
+
|
|
14
|
+
const { filterState } = useCommand();
|
|
15
|
+
const isRender = computed(() => !!filterState.search && filterState.filtered.count === 0);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<Primitive v-if="isRender" v-bind="delegatedProps" :class="cn('py-6 text-center text-sm', props.class)">
|
|
20
|
+
<slot />
|
|
21
|
+
</Primitive>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { provideCommandGroupContext, useCommand } from ".";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { computed, onMounted, onUnmounted } from "vue";
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
6
|
+
import type { ListboxGroupProps } from "reka-ui";
|
|
7
|
+
import { ListboxGroup, ListboxGroupLabel, useId } from "reka-ui";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<
|
|
11
|
+
ListboxGroupProps & {
|
|
12
|
+
class?: HTMLAttributes["class"];
|
|
13
|
+
heading?: string;
|
|
14
|
+
}
|
|
15
|
+
>();
|
|
16
|
+
|
|
17
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
18
|
+
|
|
19
|
+
const { allGroups, filterState } = useCommand();
|
|
20
|
+
const id = useId();
|
|
21
|
+
|
|
22
|
+
const isRender = computed(() => (!filterState.search ? true : filterState.filtered.groups.has(id)));
|
|
23
|
+
|
|
24
|
+
provideCommandGroupContext({ id });
|
|
25
|
+
onMounted(() => {
|
|
26
|
+
if (!allGroups.value.has(id)) allGroups.value.set(id, new Set());
|
|
27
|
+
});
|
|
28
|
+
onUnmounted(() => {
|
|
29
|
+
allGroups.value.delete(id);
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<ListboxGroup
|
|
35
|
+
v-bind="delegatedProps"
|
|
36
|
+
:id="id"
|
|
37
|
+
:class="
|
|
38
|
+
cn(
|
|
39
|
+
'p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium overflow-hidden text-primary [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:text-tertiary',
|
|
40
|
+
props.class,
|
|
41
|
+
)
|
|
42
|
+
"
|
|
43
|
+
:hidden="isRender ? undefined : true"
|
|
44
|
+
>
|
|
45
|
+
<ListboxGroupLabel v-if="heading" class="px-2 py-1.5 font-medium text-xs text-tertiary">
|
|
46
|
+
{{ heading }}
|
|
47
|
+
</ListboxGroupLabel>
|
|
48
|
+
<slot />
|
|
49
|
+
</ListboxGroup>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useCommand } from ".";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5
|
+
import { Search } from "lucide-vue-next";
|
|
6
|
+
import type { ListboxFilterProps } from "reka-ui";
|
|
7
|
+
import { ListboxFilter, useForwardProps } from "reka-ui";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
|
|
10
|
+
defineOptions({
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const props = defineProps<
|
|
15
|
+
ListboxFilterProps & {
|
|
16
|
+
class?: HTMLAttributes["class"];
|
|
17
|
+
}
|
|
18
|
+
>();
|
|
19
|
+
|
|
20
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
21
|
+
|
|
22
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
23
|
+
|
|
24
|
+
const { filterState } = useCommand();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div class="px-3 flex items-center border-b border-border-secondary" cmdk-input-wrapper>
|
|
29
|
+
<Search class="mr-2 h-4 w-4 shrink-0 text-tertiary" />
|
|
30
|
+
<ListboxFilter
|
|
31
|
+
v-bind="{ ...forwardedProps, ...$attrs }"
|
|
32
|
+
v-model="filterState.search"
|
|
33
|
+
auto-focus
|
|
34
|
+
:class="
|
|
35
|
+
cn(
|
|
36
|
+
'h-10 py-3 flex w-full rounded-md bg-transparent text-sm text-primary outline-none placeholder:text-placeholder disabled:cursor-not-allowed disabled:opacity-50',
|
|
37
|
+
props.class,
|
|
38
|
+
)
|
|
39
|
+
"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useCommand, useCommandGroup } from ".";
|
|
3
|
+
import type { HTMLAttributes } from "vue";
|
|
4
|
+
import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
5
|
+
import { reactiveOmit, useCurrentElement } from "@vueuse/core";
|
|
6
|
+
import type { ListboxItemEmits, ListboxItemProps } from "reka-ui";
|
|
7
|
+
import { ListboxItem, useForwardPropsEmits, useId } from "reka-ui";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<ListboxItemProps & { class?: HTMLAttributes["class"] }>();
|
|
11
|
+
const emits = defineEmits<ListboxItemEmits>();
|
|
12
|
+
|
|
13
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
14
|
+
|
|
15
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
16
|
+
|
|
17
|
+
const id = useId();
|
|
18
|
+
const { filterState, allItems, allGroups } = useCommand();
|
|
19
|
+
const groupContext = useCommandGroup();
|
|
20
|
+
|
|
21
|
+
const isRender = computed(() => {
|
|
22
|
+
if (!filterState.search) {
|
|
23
|
+
return true;
|
|
24
|
+
} else {
|
|
25
|
+
const filteredCurrentItem = filterState.filtered.items.get(id);
|
|
26
|
+
// If the filtered items is undefined means not in the all times map yet
|
|
27
|
+
// Do the first render to add into the map
|
|
28
|
+
if (filteredCurrentItem === undefined) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Check with filter
|
|
33
|
+
return filteredCurrentItem > 0;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const itemRef = ref();
|
|
38
|
+
const currentElement = useCurrentElement(itemRef);
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
if (!(currentElement.value instanceof HTMLElement)) return;
|
|
41
|
+
|
|
42
|
+
// textValue to perform filter
|
|
43
|
+
allItems.value.set(id, currentElement.value.textContent ?? props?.value!.toString());
|
|
44
|
+
|
|
45
|
+
const groupId = groupContext?.id;
|
|
46
|
+
if (groupId) {
|
|
47
|
+
if (!allGroups.value.has(groupId)) {
|
|
48
|
+
allGroups.value.set(groupId, new Set([id]));
|
|
49
|
+
} else {
|
|
50
|
+
allGroups.value.get(groupId)?.add(id);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
onUnmounted(() => {
|
|
55
|
+
allItems.value.delete(id);
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<ListboxItem
|
|
61
|
+
v-if="isRender"
|
|
62
|
+
v-bind="forwarded"
|
|
63
|
+
:id="id"
|
|
64
|
+
ref="itemRef"
|
|
65
|
+
:class="
|
|
66
|
+
cn(
|
|
67
|
+
'gap-2 px-2 py-1.5 [&_svg]:size-4 relative flex cursor-default items-center rounded-sm text-sm text-primary outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-active [&_svg]:shrink-0',
|
|
68
|
+
props.class,
|
|
69
|
+
)
|
|
70
|
+
"
|
|
71
|
+
@select="
|
|
72
|
+
() => {
|
|
73
|
+
filterState.search = '';
|
|
74
|
+
}
|
|
75
|
+
"
|
|
76
|
+
>
|
|
77
|
+
<slot />
|
|
78
|
+
</ListboxItem>
|
|
79
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { ListboxContentProps } from "reka-ui";
|
|
5
|
+
import { ListboxContent, useForwardProps } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
import { ScrollArea } from "../scroll-area";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<ListboxContentProps & { class?: HTMLAttributes["class"] }>();
|
|
10
|
+
|
|
11
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
12
|
+
|
|
13
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ListboxContent v-bind="forwarded">
|
|
18
|
+
<!-- [&>div]:!block stops the viewport's table wrapper growing past the popover, so long options still truncate. -->
|
|
19
|
+
<ScrollArea :class="cn('max-h-[300px]', props.class)" viewport-class="[&>div]:!block">
|
|
20
|
+
<div role="presentation">
|
|
21
|
+
<slot />
|
|
22
|
+
</div>
|
|
23
|
+
</ScrollArea>
|
|
24
|
+
</ListboxContent>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
4
|
+
import type { SeparatorProps } from "reka-ui";
|
|
5
|
+
import { Separator } from "reka-ui";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
const props = defineProps<SeparatorProps & { class?: HTMLAttributes["class"] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Separator v-bind="delegatedProps" :class="cn('-mx-1 bg-gray-200 dark:bg-gray-800 h-px', props.class)">
|
|
15
|
+
<slot />
|
|
16
|
+
</Separator>
|
|
17
|
+
</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
|
+
<span :class="cn('tracking-widest ml-auto text-xs text-tertiary', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</span>
|
|
14
|
+
</template>
|