@una-ui/nuxt 0.52.0 → 0.53.0
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/dist/module.d.mts +2 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialog.vue +136 -0
- package/dist/runtime/components/alert-dialog/AlertDialog.vue.d.ts +45 -0
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue +50 -0
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue.d.ts +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue +55 -0
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue.d.ts +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +68 -0
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue.d.ts +45 -0
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue +26 -0
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue +22 -0
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue +20 -0
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue +25 -0
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue +26 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTrigger.vue +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue +18 -16
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue.d.ts +18 -0
- package/dist/runtime/components/combobox/Combobox.vue +150 -135
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +89 -0
- package/dist/runtime/components/combobox/ComboboxAnchor.vue +20 -18
- package/dist/runtime/components/combobox/ComboboxAnchor.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxEmpty.vue +18 -16
- package/dist/runtime/components/combobox/ComboboxEmpty.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxGroup.vue +25 -19
- package/dist/runtime/components/combobox/ComboboxGroup.vue.d.ts +17 -0
- package/dist/runtime/components/combobox/ComboboxInput.vue +38 -26
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +16 -0
- package/dist/runtime/components/combobox/ComboboxItem.vue +23 -20
- package/dist/runtime/components/combobox/ComboboxItem.vue.d.ts +18 -0
- package/dist/runtime/components/combobox/ComboboxItemIndicator.vue +23 -23
- package/dist/runtime/components/combobox/ComboboxItemIndicator.vue.d.ts +15 -0
- package/dist/runtime/components/combobox/ComboboxLabel.vue +16 -10
- package/dist/runtime/components/combobox/ComboboxLabel.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxList.vue +43 -25
- package/dist/runtime/components/combobox/ComboboxList.vue.d.ts +43 -0
- package/dist/runtime/components/combobox/ComboboxSeparator.vue +18 -16
- package/dist/runtime/components/combobox/ComboboxSeparator.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxTrigger.vue +77 -53
- package/dist/runtime/components/combobox/ComboboxTrigger.vue.d.ts +17 -0
- package/dist/runtime/components/combobox/ComboboxViewport.vue +20 -18
- package/dist/runtime/components/combobox/ComboboxViewport.vue.d.ts +13 -0
- package/dist/runtime/components/data/table/Table.vue +206 -186
- package/dist/runtime/components/data/table/Table.vue.d.ts +184 -0
- package/dist/runtime/components/data/table/TableBody.vue +15 -15
- package/dist/runtime/components/data/table/TableBody.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableCaption.vue +16 -16
- package/dist/runtime/components/data/table/TableCaption.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableCell.vue +20 -19
- package/dist/runtime/components/data/table/TableCell.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableEmpty.vue +27 -27
- package/dist/runtime/components/data/table/TableEmpty.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableFooter.vue +15 -15
- package/dist/runtime/components/data/table/TableFooter.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableHead.vue +18 -17
- package/dist/runtime/components/data/table/TableHead.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableHeader.vue +15 -15
- package/dist/runtime/components/data/table/TableHeader.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableLoading.vue +31 -28
- package/dist/runtime/components/data/table/TableLoading.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableRow.vue +15 -15
- package/dist/runtime/components/data/table/TableRow.vue.d.ts +15 -0
- package/dist/runtime/components/elements/Accordion.vue +99 -92
- package/dist/runtime/components/elements/Accordion.vue.d.ts +28 -0
- package/dist/runtime/components/elements/Alert.vue +37 -50
- package/dist/runtime/components/elements/Alert.vue.d.ts +22 -0
- package/dist/runtime/components/elements/AvatarGroup.vue +64 -71
- package/dist/runtime/components/elements/AvatarGroup.vue.d.ts +11 -0
- package/dist/runtime/components/elements/Badge.vue +19 -20
- package/dist/runtime/components/elements/Badge.vue.d.ts +26 -0
- package/dist/runtime/components/elements/Button.vue +75 -62
- package/dist/runtime/components/elements/Button.vue.d.ts +34 -0
- package/dist/runtime/components/elements/Icon.vue +4 -4
- package/dist/runtime/components/elements/Icon.vue.d.ts +3 -0
- package/dist/runtime/components/elements/Indicator.vue +25 -29
- package/dist/runtime/components/elements/Indicator.vue.d.ts +19 -0
- package/dist/runtime/components/elements/Kbd.vue +13 -12
- package/dist/runtime/components/elements/Kbd.vue.d.ts +13 -0
- package/dist/runtime/components/elements/Label.vue +17 -14
- package/dist/runtime/components/elements/Label.vue.d.ts +13 -0
- package/dist/runtime/components/elements/Link.vue +2 -2
- package/dist/runtime/components/elements/Link.vue.d.ts +0 -109
- package/dist/runtime/components/elements/Progress.vue +39 -37
- package/dist/runtime/components/elements/Progress.vue.d.ts +18 -0
- package/dist/runtime/components/elements/Separator.vue +31 -26
- package/dist/runtime/components/elements/Separator.vue.d.ts +15 -0
- package/dist/runtime/components/elements/Skeleton.vue +15 -11
- package/dist/runtime/components/elements/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/components/elements/Toggle.vue +48 -26
- package/dist/runtime/components/elements/Toggle.vue.d.ts +22 -0
- package/dist/runtime/components/elements/avatar/Avatar.vue +31 -22
- package/dist/runtime/components/elements/avatar/Avatar.vue.d.ts +21 -0
- package/dist/runtime/components/elements/avatar/AvatarFallback.vue +26 -17
- package/dist/runtime/components/elements/avatar/AvatarFallback.vue.d.ts +13 -0
- package/dist/runtime/components/elements/avatar/AvatarImage.vue +20 -11
- package/dist/runtime/components/elements/avatar/AvatarImage.vue.d.ts +3 -0
- package/dist/runtime/components/elements/card/Card.vue +28 -24
- package/dist/runtime/components/elements/card/Card.vue.d.ts +25 -0
- package/dist/runtime/components/elements/card/CardContent.vue +10 -9
- package/dist/runtime/components/elements/card/CardContent.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardDescription.vue +10 -9
- package/dist/runtime/components/elements/card/CardDescription.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardFooter.vue +10 -9
- package/dist/runtime/components/elements/card/CardFooter.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardHeader.vue +10 -9
- package/dist/runtime/components/elements/card/CardHeader.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardTitle.vue +12 -11
- package/dist/runtime/components/elements/card/CardTitle.vue.d.ts +13 -0
- package/dist/runtime/components/elements/collapsible/Collapsible.vue +15 -11
- package/dist/runtime/components/elements/collapsible/Collapsible.vue.d.ts +25 -0
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue +12 -9
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue.d.ts +13 -0
- package/dist/runtime/components/elements/collapsible/CollapsibleTrigger.vue +6 -5
- package/dist/runtime/components/elements/collapsible/CollapsibleTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/Dialog.vue +43 -35
- package/dist/runtime/components/elements/dialog/Dialog.vue.d.ts +34 -0
- package/dist/runtime/components/elements/dialog/DialogClose.vue +34 -11
- package/dist/runtime/components/elements/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/runtime/components/elements/dialog/DialogContent.vue +40 -35
- package/dist/runtime/components/elements/dialog/DialogContent.vue.d.ts +46 -0
- package/dist/runtime/components/elements/dialog/DialogDescription.vue +16 -15
- package/dist/runtime/components/elements/dialog/DialogDescription.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogFooter.vue +10 -9
- package/dist/runtime/components/elements/dialog/DialogFooter.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogHeader.vue +10 -9
- package/dist/runtime/components/elements/dialog/DialogHeader.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogOverlay.vue +13 -11
- package/dist/runtime/components/elements/dialog/DialogOverlay.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue +39 -37
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue.d.ts +46 -0
- package/dist/runtime/components/elements/dialog/DialogTitle.vue +19 -17
- package/dist/runtime/components/elements/dialog/DialogTitle.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue +85 -38
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue.d.ts +61 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue +43 -26
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue.d.ts +43 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuGroup.vue +14 -10
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuGroup.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue +58 -33
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue.d.ts +14 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuLabel.vue +21 -19
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuLabel.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuRoot.vue +13 -9
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuRoot.vue.d.ts +17 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSeparator.vue +25 -18
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSeparator.vue.d.ts +3 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuShortcut.vue +12 -9
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuShortcut.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSub.vue +9 -13
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSub.vue.d.ts +17 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue +36 -21
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue.d.ts +45 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue +52 -27
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +16 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuTrigger.vue +44 -17
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/elements/pagination/Pagination.vue +51 -31
- package/dist/runtime/components/elements/pagination/Pagination.vue.d.ts +41 -0
- package/dist/runtime/components/elements/pagination/PaginationEllipsis.vue +27 -25
- package/dist/runtime/components/elements/pagination/PaginationEllipsis.vue.d.ts +15 -0
- package/dist/runtime/components/elements/pagination/PaginationFirst.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationFirst.vue.d.ts +18 -0
- package/dist/runtime/components/elements/pagination/PaginationLast.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationLast.vue.d.ts +18 -0
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue +50 -27
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue.d.ts +17 -0
- package/dist/runtime/components/elements/pagination/PaginationNext.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationNext.vue.d.ts +18 -0
- package/dist/runtime/components/elements/pagination/PaginationPrev.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationPrev.vue.d.ts +18 -0
- package/dist/runtime/components/elements/popover/Popover.vue +15 -16
- package/dist/runtime/components/elements/popover/Popover.vue.d.ts +21 -0
- package/dist/runtime/components/elements/popover/PopoverContent.vue +39 -31
- package/dist/runtime/components/elements/popover/PopoverContent.vue.d.ts +46 -0
- package/dist/runtime/components/elements/tabs/Tabs.vue +32 -21
- package/dist/runtime/components/elements/tabs/Tabs.vue.d.ts +28 -0
- package/dist/runtime/components/elements/tabs/TabsContent.vue +22 -18
- package/dist/runtime/components/elements/tabs/TabsContent.vue.d.ts +13 -0
- package/dist/runtime/components/elements/tabs/TabsList.vue +19 -14
- package/dist/runtime/components/elements/tabs/TabsList.vue.d.ts +13 -0
- package/dist/runtime/components/elements/tabs/TabsRoot.vue +22 -13
- package/dist/runtime/components/elements/tabs/TabsRoot.vue.d.ts +17 -0
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue +47 -19
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/elements/tooltip/Tooltip.vue +36 -24
- package/dist/runtime/components/elements/tooltip/Tooltip.vue.d.ts +19 -0
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue +37 -27
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue.d.ts +22 -0
- package/dist/runtime/components/elements/tooltip/TooltipProvider.vue +10 -7
- package/dist/runtime/components/elements/tooltip/TooltipProvider.vue.d.ts +15 -0
- package/dist/runtime/components/elements/tooltip/TooltipRoot.vue +13 -9
- package/dist/runtime/components/elements/tooltip/TooltipRoot.vue.d.ts +17 -0
- package/dist/runtime/components/elements/tooltip/TooltipTrigger.vue +34 -5
- package/dist/runtime/components/elements/tooltip/TooltipTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/forms/Checkbox.vue +50 -42
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +21 -0
- package/dist/runtime/components/forms/FormGroup.vue +40 -33
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +27 -0
- package/dist/runtime/components/forms/Input.vue +119 -134
- package/dist/runtime/components/forms/Input.vue.d.ts +31 -0
- package/dist/runtime/components/forms/Slider.vue +49 -36
- package/dist/runtime/components/forms/Slider.vue.d.ts +25 -0
- package/dist/runtime/components/forms/Switch.vue +43 -42
- package/dist/runtime/components/forms/Switch.vue.d.ts +27 -0
- package/dist/runtime/components/forms/form/FormControl.vue +4 -5
- package/dist/runtime/components/forms/form/FormControl.vue.d.ts +12 -0
- package/dist/runtime/components/forms/form/FormDescription.vue +12 -12
- package/dist/runtime/components/forms/form/FormDescription.vue.d.ts +13 -0
- package/dist/runtime/components/forms/form/FormField.vue +65 -56
- package/dist/runtime/components/forms/form/FormField.vue.d.ts +25 -0
- package/dist/runtime/components/forms/form/FormItem.vue +14 -14
- package/dist/runtime/components/forms/form/FormItem.vue.d.ts +13 -0
- package/dist/runtime/components/forms/form/FormLabel.vue +17 -13
- package/dist/runtime/components/forms/form/FormLabel.vue.d.ts +13 -0
- package/dist/runtime/components/forms/form/FormMessage.vue +14 -14
- package/dist/runtime/components/forms/form/FormMessage.vue.d.ts +3 -0
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue +68 -63
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue.d.ts +29 -0
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue +60 -54
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue.d.ts +22 -0
- package/dist/runtime/components/forms/select/Select.vue +82 -64
- package/dist/runtime/components/forms/select/Select.vue.d.ts +72 -0
- package/dist/runtime/components/forms/select/SelectContent.vue +55 -38
- package/dist/runtime/components/forms/select/SelectContent.vue.d.ts +27 -0
- package/dist/runtime/components/forms/select/SelectGroup.vue +18 -16
- package/dist/runtime/components/forms/select/SelectGroup.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectItem.vue +31 -25
- package/dist/runtime/components/forms/select/SelectItem.vue.d.ts +17 -0
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue +17 -15
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue.d.ts +15 -0
- package/dist/runtime/components/forms/select/SelectItemText.vue +9 -5
- package/dist/runtime/components/forms/select/SelectItemText.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectLabel.vue +15 -10
- package/dist/runtime/components/forms/select/SelectLabel.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectScrollDownButton.vue +20 -19
- package/dist/runtime/components/forms/select/SelectScrollDownButton.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectScrollUpButton.vue +20 -19
- package/dist/runtime/components/forms/select/SelectScrollUpButton.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectSeparator.vue +18 -16
- package/dist/runtime/components/forms/select/SelectSeparator.vue.d.ts +3 -0
- package/dist/runtime/components/forms/select/SelectTrigger.vue +78 -53
- package/dist/runtime/components/forms/select/SelectTrigger.vue.d.ts +15 -0
- package/dist/runtime/components/forms/select/SelectValue.vue +15 -10
- package/dist/runtime/components/forms/select/SelectValue.vue.d.ts +13 -0
- package/dist/runtime/components/misc/ThemeSwitcher.vue +51 -69
- package/dist/runtime/components/misc/ThemeSwitcher.vue.d.ts +16 -0
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue +35 -22
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue.d.ts +45 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbEllipsis.vue +13 -14
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbEllipsis.vue.d.ts +16 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbItem.vue +10 -9
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbItem.vue.d.ts +13 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbLink.vue +46 -26
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbLink.vue.d.ts +18 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbList.vue +10 -9
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbList.vue.d.ts +13 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbPage.vue +5 -7
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbPage.vue.d.ts +16 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbRoot.vue +9 -8
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbRoot.vue.d.ts +13 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbSeparator.vue +13 -13
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbSeparator.vue.d.ts +16 -0
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue +52 -32
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue.d.ts +46 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuContent.vue +22 -19
- package/dist/runtime/components/navigation-menu/NavigationMenuContent.vue.d.ts +39 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuContentItem.vue +53 -24
- package/dist/runtime/components/navigation-menu/NavigationMenuContentItem.vue.d.ts +21 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue +18 -15
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue.d.ts +13 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuItem.vue +40 -5
- package/dist/runtime/components/navigation-menu/NavigationMenuItem.vue.d.ts +13 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue +51 -28
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue.d.ts +27 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuList.vue +24 -22
- package/dist/runtime/components/navigation-menu/NavigationMenuList.vue.d.ts +13 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue +54 -34
- package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +18 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue +29 -26
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue.d.ts +3 -0
- package/dist/runtime/components/overlays/Toaster.vue +19 -16
- package/dist/runtime/components/overlays/Toaster.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/Toast.vue +58 -38
- package/dist/runtime/components/overlays/toast/Toast.vue.d.ts +112 -0
- package/dist/runtime/components/overlays/toast/ToastAction.vue +42 -19
- package/dist/runtime/components/overlays/toast/ToastAction.vue.d.ts +16 -0
- package/dist/runtime/components/overlays/toast/ToastClose.vue +21 -20
- package/dist/runtime/components/overlays/toast/ToastClose.vue.d.ts +3 -0
- package/dist/runtime/components/overlays/toast/ToastDescription.vue +17 -16
- package/dist/runtime/components/overlays/toast/ToastDescription.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/ToastInfo.vue +10 -9
- package/dist/runtime/components/overlays/toast/ToastInfo.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/ToastProvider.vue +8 -7
- package/dist/runtime/components/overlays/toast/ToastProvider.vue.d.ts +15 -0
- package/dist/runtime/components/overlays/toast/ToastTitle.vue +17 -16
- package/dist/runtime/components/overlays/toast/ToastTitle.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/ToastViewport.vue +19 -16
- package/dist/runtime/components/overlays/toast/ToastViewport.vue.d.ts +3 -0
- package/dist/runtime/components/resizable/ResizableHandle.vue +61 -0
- package/dist/runtime/components/resizable/ResizableHandle.vue.d.ts +21 -0
- package/dist/runtime/components/resizable/ResizablePanel.vue +36 -0
- package/dist/runtime/components/resizable/ResizablePanel.vue.d.ts +24 -0
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue +34 -0
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue.d.ts +19 -0
- package/dist/runtime/components/scroll-area/ScrollArea.vue +31 -23
- package/dist/runtime/components/scroll-area/ScrollArea.vue.d.ts +17 -0
- package/dist/runtime/components/scroll-area/ScrollBar.vue +29 -25
- package/dist/runtime/components/scroll-area/ScrollBar.vue.d.ts +6 -0
- package/dist/runtime/components/sheet/Sheet.vue +40 -29
- package/dist/runtime/components/sheet/Sheet.vue.d.ts +36 -0
- package/dist/runtime/components/sheet/SheetClose.vue +34 -12
- package/dist/runtime/components/sheet/SheetClose.vue.d.ts +42 -0
- package/dist/runtime/components/sheet/SheetContent.vue +35 -29
- package/dist/runtime/components/sheet/SheetContent.vue.d.ts +68 -0
- package/dist/runtime/components/sheet/SheetDescription.vue +13 -13
- package/dist/runtime/components/sheet/SheetDescription.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetFooter.vue +12 -11
- package/dist/runtime/components/sheet/SheetFooter.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetHeader.vue +8 -7
- package/dist/runtime/components/sheet/SheetHeader.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetTitle.vue +13 -12
- package/dist/runtime/components/sheet/SheetTitle.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetTrigger.vue +6 -7
- package/dist/runtime/components/sheet/SheetTrigger.vue.d.ts +15 -0
- package/dist/runtime/components/sidebar/Sidebar.vue +48 -52
- package/dist/runtime/components/sidebar/Sidebar.vue.d.ts +24 -0
- package/dist/runtime/components/sidebar/SidebarContent.vue +11 -10
- package/dist/runtime/components/sidebar/SidebarContent.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarFooter.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarFooter.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarGroup.vue +12 -10
- package/dist/runtime/components/sidebar/SidebarGroup.vue.d.ts +16 -0
- package/dist/runtime/components/sidebar/SidebarGroupAction.vue +13 -13
- package/dist/runtime/components/sidebar/SidebarGroupAction.vue.d.ts +36 -0
- package/dist/runtime/components/sidebar/SidebarGroupContent.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarGroupContent.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarGroupLabel.vue +13 -13
- package/dist/runtime/components/sidebar/SidebarGroupLabel.vue.d.ts +36 -0
- package/dist/runtime/components/sidebar/SidebarHeader.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarHeader.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarInput.vue +26 -10
- package/dist/runtime/components/sidebar/SidebarInput.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarInset.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarInset.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenu.vue +16 -14
- package/dist/runtime/components/sidebar/SidebarMenu.vue.d.ts +22 -0
- package/dist/runtime/components/sidebar/SidebarMenuAction.vue +15 -13
- package/dist/runtime/components/sidebar/SidebarMenuAction.vue.d.ts +34 -0
- package/dist/runtime/components/sidebar/SidebarMenuBadge.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuBadge.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuButton.vue +27 -28
- package/dist/runtime/components/sidebar/SidebarMenuButton.vue.d.ts +19 -0
- package/dist/runtime/components/sidebar/SidebarMenuButtonChild.vue +29 -41
- package/dist/runtime/components/sidebar/SidebarMenuButtonChild.vue.d.ts +31 -0
- package/dist/runtime/components/sidebar/SidebarMenuItem.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuItem.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuSkeleton.vue +15 -14
- package/dist/runtime/components/sidebar/SidebarMenuSkeleton.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuSub.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuSub.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuSubButton.vue +19 -17
- package/dist/runtime/components/sidebar/SidebarMenuSubButton.vue.d.ts +16 -0
- package/dist/runtime/components/sidebar/SidebarMenuSubItem.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuSubItem.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarProvider.vue +38 -55
- package/dist/runtime/components/sidebar/SidebarProvider.vue.d.ts +20 -0
- package/dist/runtime/components/sidebar/SidebarRail.vue +12 -12
- package/dist/runtime/components/sidebar/SidebarRail.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarSeparator.vue +11 -10
- package/dist/runtime/components/sidebar/SidebarSeparator.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarTrigger.vue +38 -18
- package/dist/runtime/components/sidebar/SidebarTrigger.vue.d.ts +30 -0
- package/dist/runtime/types/alert-dialog.d.ts +98 -0
- package/dist/runtime/types/alert-dialog.js +0 -0
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/input.d.ts +1 -0
- package/dist/runtime/types/resizable.d.ts +46 -0
- package/dist/runtime/types/resizable.js +0 -0
- package/dist/types.d.mts +5 -1
- package/dist/una.config.mjs +1 -1
- package/package.json +8 -10
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -36
- package/dist/types.d.ts +0 -1
- package/dist/una.config.d.ts +0 -8
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { AlertDialogTrigger } from "reka-ui";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
asChild: { type: Boolean, required: false },
|
|
5
|
+
as: { type: null, required: false }
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<AlertDialogTrigger
|
|
11
|
+
data-slot="alert-dialog-trigger"
|
|
12
|
+
v-bind="props"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</AlertDialogTrigger>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NAlertDialogTriggerProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_6: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NAlertDialogTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NAlertDialogTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { AspectRatio } from "reka-ui";
|
|
4
|
+
import { cn } from "../../utils";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
aspectRatio: { type: String, required: false, default: "soft" },
|
|
7
|
+
una: { type: Object, required: false },
|
|
8
|
+
ratio: { type: Number, required: false },
|
|
9
|
+
asChild: { type: Boolean, required: false },
|
|
10
|
+
as: { type: null, required: false },
|
|
11
|
+
class: { type: null, required: false },
|
|
12
|
+
rounded: { type: null, required: false, default: "md" }
|
|
13
|
+
});
|
|
14
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
13
15
|
</script>
|
|
14
16
|
|
|
15
17
|
<template>
|
|
@@ -17,10 +19,10 @@ const delegatedProps = reactiveOmit(props, 'class')
|
|
|
17
19
|
v-slot="{ aspect }"
|
|
18
20
|
v-bind="delegatedProps"
|
|
19
21
|
:class="cn(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
'aspect-ratio',
|
|
23
|
+
props.una?.aspectRatio,
|
|
24
|
+
props.class
|
|
25
|
+
)"
|
|
24
26
|
:aspect-ratio
|
|
25
27
|
:rounded
|
|
26
28
|
>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NAspectRatioProps } from '../../types/aspect-ratio.js';
|
|
2
|
+
declare var __VLS_6: {
|
|
3
|
+
aspect: number;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<NAspectRatioProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NAspectRatioProps> & Readonly<{}>, {
|
|
9
|
+
aspectRatio: string;
|
|
10
|
+
rounded: import("vue").HTMLAttributes["class"];
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -1,138 +1,139 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { cn } from '../../utils'
|
|
1
|
+
<script>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { defu } from "defu";
|
|
4
|
+
import { ComboboxRoot, useForwardPropsEmits } from "reka-ui";
|
|
5
|
+
import { cn } from "../../utils";
|
|
7
6
|
</script>
|
|
8
7
|
|
|
9
|
-
<script setup
|
|
10
|
-
import { computed } from
|
|
11
|
-
import ComboboxAnchor from
|
|
12
|
-
import ComboboxEmpty from
|
|
13
|
-
import ComboboxGroup from
|
|
14
|
-
import ComboboxInput from
|
|
15
|
-
import ComboboxItem from
|
|
16
|
-
import ComboboxItemIndicator from
|
|
17
|
-
import ComboboxList from
|
|
18
|
-
import ComboboxSeparator from
|
|
19
|
-
import ComboboxTrigger from
|
|
20
|
-
import ComboboxViewport from
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
<script setup>
|
|
9
|
+
import { computed } from "vue";
|
|
10
|
+
import ComboboxAnchor from "./ComboboxAnchor.vue";
|
|
11
|
+
import ComboboxEmpty from "./ComboboxEmpty.vue";
|
|
12
|
+
import ComboboxGroup from "./ComboboxGroup.vue";
|
|
13
|
+
import ComboboxInput from "./ComboboxInput.vue";
|
|
14
|
+
import ComboboxItem from "./ComboboxItem.vue";
|
|
15
|
+
import ComboboxItemIndicator from "./ComboboxItemIndicator.vue";
|
|
16
|
+
import ComboboxList from "./ComboboxList.vue";
|
|
17
|
+
import ComboboxSeparator from "./ComboboxSeparator.vue";
|
|
18
|
+
import ComboboxTrigger from "./ComboboxTrigger.vue";
|
|
19
|
+
import ComboboxViewport from "./ComboboxViewport.vue";
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
modelValue: { type: null, required: false },
|
|
22
|
+
items: { type: Array, required: false },
|
|
23
|
+
labelKey: { type: null, required: false },
|
|
24
|
+
valueKey: { type: null, required: false },
|
|
25
|
+
groupSeparator: { type: Boolean, required: false },
|
|
26
|
+
textEmpty: { type: String, required: false, default: "No items found." },
|
|
27
|
+
label: { type: String, required: false },
|
|
28
|
+
_comboboxAnchor: { type: Object, required: false },
|
|
29
|
+
_comboboxEmpty: { type: Object, required: false },
|
|
30
|
+
_comboboxGroup: { type: Object, required: false },
|
|
31
|
+
_comboboxInput: { type: Object, required: false },
|
|
32
|
+
_comboboxItem: { type: Object, required: false },
|
|
33
|
+
_comboboxItemIndicator: { type: Object, required: false },
|
|
34
|
+
_comboboxLabel: { type: Object, required: false },
|
|
35
|
+
_comboboxList: { type: Object, required: false },
|
|
36
|
+
_comboboxSeparator: { type: Object, required: false },
|
|
37
|
+
_comboboxTrigger: { type: Object, required: false },
|
|
38
|
+
_comboboxViewport: { type: Object, required: false },
|
|
39
|
+
_comboboxCheckbox: { type: Object, required: false },
|
|
40
|
+
_comboboxContent: { type: Object, required: false },
|
|
41
|
+
_comboboxPortal: { type: Object, required: false },
|
|
42
|
+
una: { type: Object, required: false },
|
|
43
|
+
open: { type: Boolean, required: false },
|
|
44
|
+
defaultOpen: { type: Boolean, required: false },
|
|
45
|
+
resetSearchTermOnBlur: { type: Boolean, required: false },
|
|
46
|
+
resetSearchTermOnSelect: { type: Boolean, required: false },
|
|
47
|
+
ignoreFilter: { type: Boolean, required: false },
|
|
48
|
+
defaultValue: { type: null, required: false },
|
|
49
|
+
multiple: { type: Boolean, required: false },
|
|
50
|
+
dir: { type: String, required: false },
|
|
51
|
+
disabled: { type: Boolean, required: false },
|
|
52
|
+
highlightOnHover: { type: Boolean, required: false },
|
|
53
|
+
by: { type: [String, Function], required: false },
|
|
54
|
+
asChild: { type: Boolean, required: false },
|
|
55
|
+
as: { type: null, required: false },
|
|
56
|
+
name: { type: String, required: false },
|
|
57
|
+
required: { type: Boolean, required: false },
|
|
58
|
+
status: { type: String, required: false },
|
|
59
|
+
id: { type: String, required: false },
|
|
60
|
+
class: { type: null, required: false },
|
|
61
|
+
size: { type: null, required: false, default: "sm" }
|
|
62
|
+
});
|
|
63
|
+
const emits = defineEmits(["update:modelValue", "highlight", "update:open"]);
|
|
28
64
|
const rootProps = reactiveOmit(props, [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
])
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const labelKey = computed(() => props.labelKey?.toString() ?? 'label')
|
|
54
|
-
const valueKey = computed(() => props.valueKey?.toString() ?? 'value')
|
|
55
|
-
|
|
56
|
-
// Check if items are grouped
|
|
65
|
+
"items",
|
|
66
|
+
"una",
|
|
67
|
+
"size",
|
|
68
|
+
"label",
|
|
69
|
+
"labelKey",
|
|
70
|
+
"valueKey",
|
|
71
|
+
"groupSeparator",
|
|
72
|
+
"textEmpty",
|
|
73
|
+
"_comboboxAnchor",
|
|
74
|
+
"_comboboxEmpty",
|
|
75
|
+
"_comboboxGroup",
|
|
76
|
+
"_comboboxInput",
|
|
77
|
+
"_comboboxItem",
|
|
78
|
+
"_comboboxItemIndicator",
|
|
79
|
+
"_comboboxLabel",
|
|
80
|
+
"_comboboxList",
|
|
81
|
+
"_comboboxSeparator",
|
|
82
|
+
"_comboboxTrigger",
|
|
83
|
+
"_comboboxViewport",
|
|
84
|
+
"_comboboxCheckbox"
|
|
85
|
+
]);
|
|
86
|
+
const forwarded = useForwardPropsEmits(rootProps, emits);
|
|
87
|
+
const labelKey = computed(() => props.labelKey?.toString() ?? "label");
|
|
88
|
+
const valueKey = computed(() => props.valueKey?.toString() ?? "value");
|
|
57
89
|
const hasGroups = computed(() => {
|
|
58
|
-
return Array.isArray(props.items) && props.items.length > 0
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// Helper function to safely get a property from an item
|
|
63
|
-
function getItemProperty<K extends string>(item: ExtractItemType<T> | null | undefined, key: K): any {
|
|
90
|
+
return Array.isArray(props.items) && props.items.length > 0 && typeof props.items[0] === "object" && "items" in props.items[0];
|
|
91
|
+
});
|
|
92
|
+
function getItemProperty(item, key) {
|
|
64
93
|
if (item == null)
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
return typeof item !== 'object' ? item : (item as Record<K, unknown>)[key]
|
|
94
|
+
return "";
|
|
95
|
+
return typeof item !== "object" ? item : item[key];
|
|
68
96
|
}
|
|
69
|
-
|
|
70
|
-
// Find a matching item from the items list by its value
|
|
71
|
-
function findItemByValue(value: unknown): ExtractItemType<T> | undefined {
|
|
97
|
+
function findItemByValue(value) {
|
|
72
98
|
if (!props.items)
|
|
73
|
-
return
|
|
74
|
-
|
|
99
|
+
return void 0;
|
|
75
100
|
if (hasGroups.value) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const found = group.items?.find(item => getItemProperty(item, valueKey.value) === value)
|
|
101
|
+
for (const group of props.items) {
|
|
102
|
+
const found = group.items?.find((item) => getItemProperty(item, valueKey.value) === value);
|
|
79
103
|
if (found)
|
|
80
|
-
return found
|
|
104
|
+
return found;
|
|
81
105
|
}
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Search in flat items list
|
|
86
|
-
return (props.items as ExtractItemType<T>[]).find(item => getItemProperty(item, valueKey.value) === value)
|
|
106
|
+
return void 0;
|
|
107
|
+
} else {
|
|
108
|
+
return props.items.find((item) => getItemProperty(item, valueKey.value) === value);
|
|
87
109
|
}
|
|
88
110
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
// Handle empty values
|
|
93
|
-
if (!val || (Array.isArray(val) && val.length === 0))
|
|
94
|
-
return ''
|
|
95
|
-
|
|
96
|
-
// Handle multiple selection (array values)
|
|
111
|
+
function getDisplayValue(val) {
|
|
112
|
+
if (!val || Array.isArray(val) && val.length === 0)
|
|
113
|
+
return "";
|
|
97
114
|
if (props.multiple && Array.isArray(val)) {
|
|
98
115
|
return val.map((v) => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return item ? getItemProperty(item, labelKey.value) : v
|
|
116
|
+
if (typeof v !== "object" || v === null) {
|
|
117
|
+
const item = findItemByValue(v);
|
|
118
|
+
return item ? getItemProperty(item, labelKey.value) : v;
|
|
103
119
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return getItemProperty(v, labelKey.value) || getItemProperty(v, valueKey.value) || ''
|
|
107
|
-
}).filter(Boolean).join(', ')
|
|
120
|
+
return getItemProperty(v, labelKey.value) || getItemProperty(v, valueKey.value) || "";
|
|
121
|
+
}).filter(Boolean).join(", ");
|
|
108
122
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const item = findItemByValue(val)
|
|
113
|
-
return item ? getItemProperty(item, labelKey.value) : String(val || '')
|
|
123
|
+
if (typeof val !== "object" || val === null) {
|
|
124
|
+
const item = findItemByValue(val);
|
|
125
|
+
return item ? getItemProperty(item, labelKey.value) : String(val || "");
|
|
114
126
|
}
|
|
115
|
-
|
|
116
|
-
// For single object, get its label
|
|
117
|
-
return getItemProperty(val as any, labelKey.value) || getItemProperty(val as any, valueKey.value) || ''
|
|
127
|
+
return getItemProperty(val, labelKey.value) || getItemProperty(val, valueKey.value) || "";
|
|
118
128
|
}
|
|
119
|
-
|
|
120
|
-
// Check if an item is selected in the current modelValue
|
|
121
|
-
function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
129
|
+
function isItemSelected(item) {
|
|
122
130
|
if (item == null)
|
|
123
|
-
return false
|
|
124
|
-
|
|
125
|
-
const itemValue = getItemProperty(item, valueKey.value)
|
|
126
|
-
|
|
127
|
-
// For multiple selection
|
|
131
|
+
return false;
|
|
132
|
+
const itemValue = getItemProperty(item, valueKey.value);
|
|
128
133
|
if (props.multiple && Array.isArray(props.modelValue)) {
|
|
129
|
-
return props.modelValue.includes(itemValue)
|
|
134
|
+
return props.modelValue.includes(itemValue);
|
|
130
135
|
}
|
|
131
|
-
|
|
132
|
-
// For single selection
|
|
133
|
-
return typeof props.modelValue === 'object' && props.modelValue !== null
|
|
134
|
-
? getItemProperty(props.modelValue as ExtractItemType<T>, valueKey.value) === itemValue
|
|
135
|
-
: props.modelValue === itemValue
|
|
136
|
+
return typeof props.modelValue === "object" && props.modelValue !== null ? getItemProperty(props.modelValue, valueKey.value) === itemValue : props.modelValue === itemValue;
|
|
136
137
|
}
|
|
137
138
|
</script>
|
|
138
139
|
|
|
@@ -141,10 +142,10 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
141
142
|
v-slot="{ modelValue, open }"
|
|
142
143
|
data-slot="combobox"
|
|
143
144
|
:class="cn(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
'combobox',
|
|
146
|
+
props.una?.combobox,
|
|
147
|
+
props.class
|
|
148
|
+
)"
|
|
148
149
|
v-bind="forwarded"
|
|
149
150
|
>
|
|
150
151
|
<slot>
|
|
@@ -162,9 +163,8 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
162
163
|
:id
|
|
163
164
|
:status
|
|
164
165
|
:class="cn(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
)"
|
|
166
|
+
props._comboboxTrigger?.class
|
|
167
|
+
)"
|
|
168
168
|
:size
|
|
169
169
|
>
|
|
170
170
|
<slot name="trigger" :model-value :open />
|
|
@@ -176,9 +176,18 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
176
176
|
<slot name="input-wrapper" :model-value :open>
|
|
177
177
|
<ComboboxInput
|
|
178
178
|
:id
|
|
179
|
-
:display-value="(val
|
|
179
|
+
:display-value="(val) => getDisplayValue(val)"
|
|
180
180
|
name="frameworks"
|
|
181
181
|
:status
|
|
182
|
+
:class="cn(
|
|
183
|
+
'text-1em',
|
|
184
|
+
props._comboboxInput?.class
|
|
185
|
+
)"
|
|
186
|
+
:una="defu(props._comboboxInput?.una, {
|
|
187
|
+
inputLeading: 'text-1.1428571428571428em',
|
|
188
|
+
inputTrailing: 'text-1.1428571428571428em',
|
|
189
|
+
inputStatusIconBase: 'text-1.1428571428571428em'
|
|
190
|
+
})"
|
|
182
191
|
:size
|
|
183
192
|
v-bind="props._comboboxInput"
|
|
184
193
|
/>
|
|
@@ -189,7 +198,7 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
189
198
|
|
|
190
199
|
<ComboboxList
|
|
191
200
|
v-bind="{ ...props._comboboxList, ...props._comboboxContent }"
|
|
192
|
-
:
|
|
201
|
+
:_combobox-portal
|
|
193
202
|
:size
|
|
194
203
|
:una
|
|
195
204
|
>
|
|
@@ -197,11 +206,16 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
197
206
|
<slot name="input-wrapper" :model-value :open>
|
|
198
207
|
<ComboboxInput
|
|
199
208
|
v-if="$slots.trigger || $slots.triggerRoot"
|
|
200
|
-
:size
|
|
201
209
|
:class="cn(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
210
|
+
'border-0 border-b-1 rounded-none text-1em focus-visible:ring-0',
|
|
211
|
+
props._comboboxInput?.class
|
|
212
|
+
)"
|
|
213
|
+
:una="defu(props._comboboxInput?.una, {
|
|
214
|
+
inputLeading: 'text-1.1428571428571428em',
|
|
215
|
+
inputTrailing: 'text-1.1428571428571428em',
|
|
216
|
+
inputStatusIconBase: 'text-1.1428571428571428em'
|
|
217
|
+
})"
|
|
218
|
+
:size
|
|
205
219
|
v-bind="props._comboboxInput"
|
|
206
220
|
/>
|
|
207
221
|
</slot>
|
|
@@ -215,6 +229,9 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
215
229
|
>
|
|
216
230
|
<ComboboxEmpty
|
|
217
231
|
v-bind="props._comboboxEmpty"
|
|
232
|
+
:class="cn(
|
|
233
|
+
props._comboboxEmpty?.class
|
|
234
|
+
)"
|
|
218
235
|
:una
|
|
219
236
|
>
|
|
220
237
|
<slot name="empty">
|
|
@@ -231,15 +248,14 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
231
248
|
>
|
|
232
249
|
<slot name="group">
|
|
233
250
|
<ComboboxItem
|
|
234
|
-
v-for="item in items
|
|
251
|
+
v-for="item in items"
|
|
235
252
|
:key="getItemProperty(item, valueKey)"
|
|
236
253
|
:value="props.multiple ? getItemProperty(item, valueKey) : item"
|
|
237
254
|
:size
|
|
238
255
|
v-bind="props._comboboxItem"
|
|
239
256
|
:class="cn(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
)"
|
|
257
|
+
props._comboboxItem?.class
|
|
258
|
+
)"
|
|
243
259
|
:una
|
|
244
260
|
>
|
|
245
261
|
<slot name="item" :item="item" :selected="isItemSelected(item)">
|
|
@@ -264,7 +280,7 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
264
280
|
<!-- Grouped items -->
|
|
265
281
|
<template v-else>
|
|
266
282
|
<ComboboxGroup
|
|
267
|
-
v-for="(group, i) in items
|
|
283
|
+
v-for="(group, i) in items"
|
|
268
284
|
:key="i"
|
|
269
285
|
v-bind="props._comboboxGroup"
|
|
270
286
|
:label="group.label"
|
|
@@ -284,9 +300,8 @@ function isItemSelected(item: ExtractItemType<T> | null | undefined): boolean {
|
|
|
284
300
|
:size
|
|
285
301
|
v-bind="{ ...props._comboboxItem, ...group._comboboxItem }"
|
|
286
302
|
:class="cn(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
)"
|
|
303
|
+
props._comboboxItem?.class
|
|
304
|
+
)"
|
|
290
305
|
:una
|
|
291
306
|
>
|
|
292
307
|
<slot name="item" :item="item" :group="group" :selected="isItemSelected(item)">
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { AcceptableValue } from 'reka-ui';
|
|
2
|
+
import type { ExtractItemType, NComboboxGroupProps, NComboboxProps } from '../../types/index.js';
|
|
3
|
+
declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly "onUpdate:modelValue"?: ((value: ExtractItemType<T>) => any) | undefined;
|
|
6
|
+
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
7
|
+
readonly onHighlight?: ((payload: {
|
|
8
|
+
ref: HTMLElement;
|
|
9
|
+
value: ExtractItemType<T>;
|
|
10
|
+
} | undefined) => any) | undefined;
|
|
11
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:open" | "onHighlight"> & NComboboxProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
12
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {
|
|
15
|
+
default?: (props: {}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
anchor?: (props: {}) => any;
|
|
18
|
+
} & {
|
|
19
|
+
'trigger-wrapper'?: (props: {}) => any;
|
|
20
|
+
} & {
|
|
21
|
+
trigger?: (props: {
|
|
22
|
+
modelValue: ExtractItemType<T> | ExtractItemType<T>[];
|
|
23
|
+
open: boolean;
|
|
24
|
+
}) => any;
|
|
25
|
+
} & {
|
|
26
|
+
'input-wrapper'?: (props: {
|
|
27
|
+
modelValue: ExtractItemType<T> | ExtractItemType<T>[];
|
|
28
|
+
open: boolean;
|
|
29
|
+
}) => any;
|
|
30
|
+
} & {
|
|
31
|
+
list?: (props: {}) => any;
|
|
32
|
+
} & {
|
|
33
|
+
'input-wrapper'?: (props: {
|
|
34
|
+
modelValue: ExtractItemType<T> | ExtractItemType<T>[];
|
|
35
|
+
open: boolean;
|
|
36
|
+
}) => any;
|
|
37
|
+
} & {
|
|
38
|
+
header?: (props: {}) => any;
|
|
39
|
+
} & {
|
|
40
|
+
body?: (props: {}) => any;
|
|
41
|
+
} & {
|
|
42
|
+
empty?: (props: {}) => any;
|
|
43
|
+
} & {
|
|
44
|
+
group?: (props: {}) => any;
|
|
45
|
+
} & {
|
|
46
|
+
item?: (props: {
|
|
47
|
+
item: ExtractItemType<T>;
|
|
48
|
+
selected: boolean;
|
|
49
|
+
}) => any;
|
|
50
|
+
} & {
|
|
51
|
+
label?: (props: {
|
|
52
|
+
item: ExtractItemType<T>;
|
|
53
|
+
}) => any;
|
|
54
|
+
} & {
|
|
55
|
+
'item-indicator'?: (props: {
|
|
56
|
+
item: ExtractItemType<T>;
|
|
57
|
+
}) => any;
|
|
58
|
+
} & {
|
|
59
|
+
group?: (props: {
|
|
60
|
+
group: NComboboxGroupProps<ExtractItemType<T>>;
|
|
61
|
+
}) => any;
|
|
62
|
+
} & {
|
|
63
|
+
item?: (props: {
|
|
64
|
+
item: ExtractItemType<T>;
|
|
65
|
+
group: NComboboxGroupProps<ExtractItemType<T>>;
|
|
66
|
+
selected: boolean;
|
|
67
|
+
}) => any;
|
|
68
|
+
} & {
|
|
69
|
+
label?: (props: {
|
|
70
|
+
item: ExtractItemType<T>;
|
|
71
|
+
}) => any;
|
|
72
|
+
} & {
|
|
73
|
+
indicator?: (props: {
|
|
74
|
+
item: ExtractItemType<T>;
|
|
75
|
+
}) => any;
|
|
76
|
+
} & {
|
|
77
|
+
footer?: (props: {}) => any;
|
|
78
|
+
};
|
|
79
|
+
emit: ((evt: "update:modelValue", value: ExtractItemType<T>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "highlight", payload: {
|
|
80
|
+
ref: HTMLElement;
|
|
81
|
+
value: ExtractItemType<T>;
|
|
82
|
+
} | undefined) => void);
|
|
83
|
+
}>) => import("vue").VNode & {
|
|
84
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
85
|
+
};
|
|
86
|
+
export default _default;
|
|
87
|
+
type __VLS_PrettifyLocal<T> = {
|
|
88
|
+
[K in keyof T]: T[K];
|
|
89
|
+
} & {};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ComboboxAnchor, useForwardProps } from "reka-ui";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { cn } from "../../utils";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
una: { type: Object, required: false },
|
|
7
|
+
reference: { type: null, required: false },
|
|
8
|
+
asChild: { type: Boolean, required: false },
|
|
9
|
+
as: { type: null, required: false },
|
|
10
|
+
class: { type: null, required: false },
|
|
11
|
+
size: { type: null, required: false }
|
|
12
|
+
});
|
|
9
13
|
const delegatedProps = computed(() => {
|
|
10
|
-
const { class: _, ...delegated } = props
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const forwarded = useForwardProps(delegatedProps)
|
|
14
|
+
const { class: _, ...delegated } = props;
|
|
15
|
+
return delegated;
|
|
16
|
+
});
|
|
17
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
16
18
|
</script>
|
|
17
19
|
|
|
18
20
|
<template>
|
|
@@ -20,10 +22,10 @@ const forwarded = useForwardProps(delegatedProps)
|
|
|
20
22
|
data-slot="combobox-anchor"
|
|
21
23
|
v-bind="forwarded"
|
|
22
24
|
:class="cn(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
'combobox-anchor',
|
|
26
|
+
props.una?.comboboxAnchor,
|
|
27
|
+
props.class
|
|
28
|
+
)"
|
|
27
29
|
>
|
|
28
30
|
<slot />
|
|
29
31
|
</ComboboxAnchor>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NComboboxAnchorProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_6: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NComboboxAnchorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NComboboxAnchorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|