@una-ui/nuxt 0.52.1 → 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 +149 -134
- 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 +81 -63
- 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
|
@@ -1,54 +1,60 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import { reactivePick } from '@vueuse/core'
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactivePick } from "@vueuse/core";
|
|
4
3
|
import {
|
|
5
4
|
RadioGroupIndicator,
|
|
6
5
|
RadioGroupItem,
|
|
7
|
-
useForwardProps
|
|
8
|
-
} from
|
|
9
|
-
import { cn, randomId } from
|
|
10
|
-
import Icon from
|
|
11
|
-
import Label from
|
|
12
|
-
|
|
6
|
+
useForwardProps
|
|
7
|
+
} from "reka-ui";
|
|
8
|
+
import { cn, randomId } from "../../../utils";
|
|
9
|
+
import Icon from "../../elements/Icon.vue";
|
|
10
|
+
import Label from "../../elements/Label.vue";
|
|
13
11
|
defineOptions({
|
|
14
|
-
inheritAttrs: false
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
inheritAttrs: false
|
|
13
|
+
});
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
label: { type: String, required: false },
|
|
16
|
+
radioGroup: { type: null, required: false, default: "primary" },
|
|
17
|
+
description: { type: String, required: false },
|
|
18
|
+
una: { type: Object, required: false },
|
|
19
|
+
class: { type: null, required: false },
|
|
20
|
+
size: { type: null, required: false, default: "md" },
|
|
21
|
+
square: { type: null, required: false, default: "1em" },
|
|
22
|
+
rounded: { type: null, required: false },
|
|
23
|
+
icon: { type: null, required: false, default: "radio-group-indicator-icon" },
|
|
24
|
+
id: { type: String, required: false },
|
|
25
|
+
value: { type: [String, Number, Object, null], required: false },
|
|
26
|
+
disabled: { type: Boolean, required: false },
|
|
27
|
+
asChild: { type: Boolean, required: false },
|
|
28
|
+
as: { type: null, required: false },
|
|
29
|
+
name: { type: String, required: false },
|
|
30
|
+
required: { type: Boolean, required: false }
|
|
31
|
+
});
|
|
32
|
+
const id = props.id || randomId("radio-group");
|
|
26
33
|
const delegatedProps = reactivePick(props, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
])
|
|
34
|
-
|
|
35
|
-
const forwardedProps = useForwardProps(delegatedProps)
|
|
34
|
+
"as",
|
|
35
|
+
"disabled",
|
|
36
|
+
"id",
|
|
37
|
+
"name",
|
|
38
|
+
"required",
|
|
39
|
+
"value"
|
|
40
|
+
]);
|
|
41
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
36
42
|
</script>
|
|
37
43
|
|
|
38
44
|
<template>
|
|
39
45
|
<div
|
|
40
46
|
:class="cn(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
'radio-group-item-root',
|
|
48
|
+
una?.radioGroupItemRoot
|
|
49
|
+
)"
|
|
44
50
|
:size
|
|
45
51
|
:radio-group="radioGroup"
|
|
46
52
|
>
|
|
47
53
|
<div
|
|
48
54
|
:class="cn(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
'radio-group-item-wrapper',
|
|
56
|
+
una?.radioGroupItemWrapper
|
|
57
|
+
)"
|
|
52
58
|
>
|
|
53
59
|
<RadioGroupItem
|
|
54
60
|
as-child
|
|
@@ -57,28 +63,28 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
57
63
|
<button
|
|
58
64
|
:id
|
|
59
65
|
:class="
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
cn(
|
|
67
|
+
'radio-group-item',
|
|
68
|
+
una?.radioGroupItem,
|
|
69
|
+
props.class
|
|
70
|
+
)
|
|
71
|
+
"
|
|
66
72
|
:square
|
|
67
73
|
:rounded
|
|
68
74
|
>
|
|
69
75
|
<RadioGroupIndicator
|
|
70
76
|
:class="cn(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
'radio-group-indicator',
|
|
78
|
+
una?.radioGroupIndicator
|
|
79
|
+
)"
|
|
74
80
|
>
|
|
75
81
|
<slot name="icon">
|
|
76
82
|
<Icon
|
|
77
83
|
:name="icon"
|
|
78
84
|
:class="cn(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
'radio-group-indicator-icon-base',
|
|
86
|
+
una?.radioGroupIndicatorIcon
|
|
87
|
+
)"
|
|
82
88
|
/>
|
|
83
89
|
</slot>
|
|
84
90
|
</RadioGroupIndicator>
|
|
@@ -89,9 +95,9 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
89
95
|
v-if="props.label || $slots.default"
|
|
90
96
|
:for="props.id ?? id"
|
|
91
97
|
:class="cn(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
'radio-group-item-label',
|
|
99
|
+
una?.radioGroupItemLabel
|
|
100
|
+
)"
|
|
95
101
|
>
|
|
96
102
|
<slot>
|
|
97
103
|
{{ label }}
|
|
@@ -102,9 +108,9 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
102
108
|
<p
|
|
103
109
|
v-if="description || $slots.description"
|
|
104
110
|
:class="cn(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
'radio-group-item-description',
|
|
112
|
+
una?.radioGroupItemDescription
|
|
113
|
+
)"
|
|
108
114
|
>
|
|
109
115
|
<slot name="description">
|
|
110
116
|
{{ description }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NRadioGroupItemProps } from '../../../types/index.js';
|
|
2
|
+
declare var __VLS_9: {}, __VLS_17: {}, __VLS_19: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
icon?: (props: typeof __VLS_9) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: typeof __VLS_17) => any;
|
|
7
|
+
} & {
|
|
8
|
+
description?: (props: typeof __VLS_19) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<NRadioGroupItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NRadioGroupItemProps> & Readonly<{}>, {
|
|
11
|
+
size: import("vue").HTMLAttributes["class"];
|
|
12
|
+
icon: import("vue").HTMLAttributes["class"];
|
|
13
|
+
square: import("vue").HTMLAttributes["class"];
|
|
14
|
+
radioGroup: import("vue").HTMLAttributes["class"];
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,69 +1,87 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import type { NSelectProps, SelectGroup as SelectGroupType } from '../../../types'
|
|
4
|
-
import { computed } from 'vue'
|
|
1
|
+
<script>
|
|
2
|
+
import { computed } from "vue";
|
|
5
3
|
</script>
|
|
6
4
|
|
|
7
|
-
<script setup
|
|
8
|
-
import { SelectRoot, useForwardPropsEmits } from
|
|
9
|
-
import { cn, isEqualObject } from
|
|
10
|
-
import SelectContent from
|
|
11
|
-
import SelectGroup from
|
|
12
|
-
import SelectItem from
|
|
13
|
-
import SelectLabel from
|
|
14
|
-
import SelectSeparator from
|
|
15
|
-
import SelectTrigger from
|
|
16
|
-
import SelectValue from
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
<script setup>
|
|
6
|
+
import { SelectRoot, useForwardPropsEmits } from "reka-ui";
|
|
7
|
+
import { cn, isEqualObject } from "../../../utils";
|
|
8
|
+
import SelectContent from "./SelectContent.vue";
|
|
9
|
+
import SelectGroup from "./SelectGroup.vue";
|
|
10
|
+
import SelectItem from "./SelectItem.vue";
|
|
11
|
+
import SelectLabel from "./SelectLabel.vue";
|
|
12
|
+
import SelectSeparator from "./SelectSeparator.vue";
|
|
13
|
+
import SelectTrigger from "./SelectTrigger.vue";
|
|
14
|
+
import SelectValue from "./SelectValue.vue";
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
items: { type: Array, required: true },
|
|
17
|
+
itemKey: { type: null, required: false },
|
|
18
|
+
valueKey: { type: null, required: false },
|
|
19
|
+
label: { type: String, required: false },
|
|
20
|
+
groupSeparator: { type: Boolean, required: false },
|
|
21
|
+
_selectScrollUpButton: { type: Object, required: false },
|
|
22
|
+
_selectItemText: { type: Object, required: false },
|
|
23
|
+
_selectScrollDownButton: { type: Object, required: false },
|
|
24
|
+
_selectGroup: { type: Object, required: false },
|
|
25
|
+
_selectSeparator: { type: Object, required: false },
|
|
26
|
+
_selectContent: { type: Object, required: false },
|
|
27
|
+
_selectValue: { type: Object, required: false },
|
|
28
|
+
_selectTrigger: { type: Object, required: false },
|
|
29
|
+
_selectItem: { type: Object, required: false },
|
|
30
|
+
_selectLabel: { type: Object, required: false },
|
|
31
|
+
una: { type: Object, required: false },
|
|
32
|
+
open: { type: Boolean, required: false },
|
|
33
|
+
defaultOpen: { type: Boolean, required: false },
|
|
34
|
+
defaultValue: { type: null, required: false },
|
|
35
|
+
modelValue: { type: null, required: false },
|
|
36
|
+
by: { type: [String, Function], required: false },
|
|
37
|
+
dir: { type: String, required: false },
|
|
38
|
+
multiple: { type: Boolean, required: false },
|
|
39
|
+
autocomplete: { type: String, required: false },
|
|
40
|
+
disabled: { type: Boolean, required: false },
|
|
41
|
+
name: { type: String, required: false },
|
|
42
|
+
required: { type: Boolean, required: false },
|
|
43
|
+
class: { type: null, required: false },
|
|
44
|
+
size: { type: null, required: false, default: "sm" },
|
|
45
|
+
placeholder: { type: String, required: false },
|
|
46
|
+
selectItem: { type: null, required: false },
|
|
47
|
+
status: { type: String, required: false },
|
|
48
|
+
select: { type: String, required: false },
|
|
49
|
+
id: { type: String, required: false }
|
|
50
|
+
});
|
|
51
|
+
const emits = defineEmits(["update:modelValue", "update:open"]);
|
|
25
52
|
const hasGroups = computed(() => {
|
|
26
|
-
return Array.isArray(props.items) && props.items.length > 0
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
function formatSelectedValue(value: unknown) {
|
|
33
|
-
if (!value || (Array.isArray(value) && value.length === 0))
|
|
34
|
-
return null
|
|
35
|
-
|
|
53
|
+
return Array.isArray(props.items) && props.items.length > 0 && typeof props.items[0] === "object" && "items" in props.items[0];
|
|
54
|
+
});
|
|
55
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
56
|
+
function formatSelectedValue(value) {
|
|
57
|
+
if (!value || Array.isArray(value) && value.length === 0)
|
|
58
|
+
return null;
|
|
36
59
|
if (props.multiple && Array.isArray(value)) {
|
|
37
60
|
return value.map((val) => {
|
|
38
|
-
if (props.valueKey && typeof val ===
|
|
39
|
-
return
|
|
61
|
+
if (props.valueKey && typeof val === "object") {
|
|
62
|
+
return val[props.valueKey];
|
|
40
63
|
}
|
|
41
|
-
return val
|
|
42
|
-
}).join(
|
|
64
|
+
return val;
|
|
65
|
+
}).join(", ");
|
|
43
66
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return (value as Record<string, any>)[props.valueKey as string]
|
|
67
|
+
if (props.valueKey && typeof value === "object") {
|
|
68
|
+
return value[props.valueKey];
|
|
47
69
|
}
|
|
48
|
-
|
|
49
|
-
return value
|
|
70
|
+
return value;
|
|
50
71
|
}
|
|
51
|
-
|
|
52
|
-
function isItemSelected(item: unknown, modelValue: unknown) {
|
|
72
|
+
function isItemSelected(item, modelValue) {
|
|
53
73
|
if (!modelValue)
|
|
54
|
-
return false
|
|
55
|
-
|
|
74
|
+
return false;
|
|
56
75
|
if (props.multiple && Array.isArray(modelValue)) {
|
|
57
76
|
return modelValue.some((val) => {
|
|
58
|
-
const valObj = typeof val ===
|
|
59
|
-
const
|
|
60
|
-
return isEqualObject(valObj,
|
|
61
|
-
})
|
|
77
|
+
const valObj = typeof val === "object" && val ? val : { value: val };
|
|
78
|
+
const itemObj2 = typeof item === "object" && item ? item : { value: item };
|
|
79
|
+
return isEqualObject(valObj, itemObj2);
|
|
80
|
+
});
|
|
62
81
|
}
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
return isEqualObject(modelObj, itemObj)
|
|
82
|
+
const modelObj = typeof modelValue === "object" && modelValue ? modelValue : { value: modelValue };
|
|
83
|
+
const itemObj = typeof item === "object" && item ? item : { value: item };
|
|
84
|
+
return isEqualObject(modelObj, itemObj);
|
|
67
85
|
}
|
|
68
86
|
</script>
|
|
69
87
|
|
|
@@ -71,9 +89,9 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
71
89
|
<SelectRoot
|
|
72
90
|
v-slot="{ modelValue, open }"
|
|
73
91
|
:class="cn(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
92
|
+
props.una?.select,
|
|
93
|
+
props.class
|
|
94
|
+
)"
|
|
77
95
|
v-bind="forwarded"
|
|
78
96
|
>
|
|
79
97
|
<slot :model-value :open>
|
|
@@ -105,10 +123,10 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
105
123
|
<SelectContent
|
|
106
124
|
:size
|
|
107
125
|
v-bind="{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
126
|
+
..._selectContent,
|
|
127
|
+
_selectScrollDownButton,
|
|
128
|
+
_selectScrollUpButton
|
|
129
|
+
}"
|
|
112
130
|
:una
|
|
113
131
|
>
|
|
114
132
|
<slot name="content" :items="items">
|
|
@@ -136,7 +154,7 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
136
154
|
:una
|
|
137
155
|
>
|
|
138
156
|
<slot name="item" :item="item">
|
|
139
|
-
{{ props.itemKey && item ?
|
|
157
|
+
{{ props.itemKey && item ? item[props.itemKey] : item }}
|
|
140
158
|
</slot>
|
|
141
159
|
<template #indicator>
|
|
142
160
|
<slot name="indicator" :item="item" />
|
|
@@ -147,7 +165,7 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
147
165
|
|
|
148
166
|
<template v-if="hasGroups">
|
|
149
167
|
<SelectGroup
|
|
150
|
-
v-for="(group, i) in items
|
|
168
|
+
v-for="(group, i) in items"
|
|
151
169
|
:key="i"
|
|
152
170
|
v-bind="props._selectGroup"
|
|
153
171
|
:una
|
|
@@ -183,7 +201,7 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
183
201
|
:una
|
|
184
202
|
>
|
|
185
203
|
<slot name="item" :item="item">
|
|
186
|
-
{{ props.itemKey ?
|
|
204
|
+
{{ props.itemKey ? item[props.itemKey] : item }}
|
|
187
205
|
</slot>
|
|
188
206
|
<template #indicator>
|
|
189
207
|
<slot name="indicator" :item="item" />
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { AcceptableValue } from 'reka-ui';
|
|
2
|
+
import type { NSelectProps, SelectGroup as SelectGroupType } 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: T) => any) | undefined;
|
|
6
|
+
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
7
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:open"> & NSelectProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
8
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {
|
|
11
|
+
default?: (props: {
|
|
12
|
+
modelValue: AcceptableValue | AcceptableValue[] | undefined;
|
|
13
|
+
open: boolean;
|
|
14
|
+
}) => any;
|
|
15
|
+
} & {
|
|
16
|
+
'trigger-wrapper'?: (props: {
|
|
17
|
+
modelValue: AcceptableValue | AcceptableValue[] | undefined;
|
|
18
|
+
open: boolean;
|
|
19
|
+
}) => any;
|
|
20
|
+
} & {
|
|
21
|
+
trigger?: (props: {
|
|
22
|
+
modelValue: AcceptableValue | AcceptableValue[] | undefined;
|
|
23
|
+
open: boolean;
|
|
24
|
+
}) => any;
|
|
25
|
+
} & {
|
|
26
|
+
value?: (props: {
|
|
27
|
+
modelValue: AcceptableValue | AcceptableValue[] | undefined;
|
|
28
|
+
open: boolean;
|
|
29
|
+
}) => any;
|
|
30
|
+
} & {
|
|
31
|
+
content?: (props: {
|
|
32
|
+
items: T[] | SelectGroupType<T>[];
|
|
33
|
+
}) => any;
|
|
34
|
+
} & {
|
|
35
|
+
label?: (props: {
|
|
36
|
+
label: string;
|
|
37
|
+
}) => any;
|
|
38
|
+
} & {
|
|
39
|
+
item?: (props: {
|
|
40
|
+
item: T | SelectGroupType<T>;
|
|
41
|
+
}) => any;
|
|
42
|
+
} & {
|
|
43
|
+
indicator?: (props: {
|
|
44
|
+
item: T | SelectGroupType<T>;
|
|
45
|
+
}) => any;
|
|
46
|
+
} & {
|
|
47
|
+
group?: (props: {
|
|
48
|
+
items: SelectGroupType<T>;
|
|
49
|
+
}) => any;
|
|
50
|
+
} & {
|
|
51
|
+
label?: (props: {
|
|
52
|
+
label: string;
|
|
53
|
+
}) => any;
|
|
54
|
+
} & {
|
|
55
|
+
item?: (props: {
|
|
56
|
+
item: T;
|
|
57
|
+
}) => any;
|
|
58
|
+
} & {
|
|
59
|
+
indicator?: (props: {
|
|
60
|
+
item: T;
|
|
61
|
+
}) => any;
|
|
62
|
+
} & {
|
|
63
|
+
default?: (props: {}) => any;
|
|
64
|
+
};
|
|
65
|
+
emit: ((evt: "update:modelValue", value: T) => void) & ((evt: "update:open", value: boolean) => void);
|
|
66
|
+
}>) => import("vue").VNode & {
|
|
67
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
68
|
+
};
|
|
69
|
+
export default _default;
|
|
70
|
+
type __VLS_PrettifyLocal<T> = {
|
|
71
|
+
[K in keyof T]: T[K];
|
|
72
|
+
} & {};
|
|
@@ -1,58 +1,75 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import type { SelectContentEmits } from 'reka-ui'
|
|
3
|
-
import type { NSelectContentProps } from '../../../types'
|
|
1
|
+
<script setup>
|
|
4
2
|
import {
|
|
5
3
|
SelectContent,
|
|
6
4
|
SelectPortal,
|
|
7
5
|
SelectViewport,
|
|
8
|
-
useForwardPropsEmits
|
|
9
|
-
} from
|
|
10
|
-
import { computed } from
|
|
11
|
-
import { cn } from
|
|
12
|
-
import SelectScrollDownButton from
|
|
13
|
-
import SelectScrollUpButton from
|
|
14
|
-
|
|
6
|
+
useForwardPropsEmits
|
|
7
|
+
} from "reka-ui";
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { cn } from "../../../utils";
|
|
10
|
+
import SelectScrollDownButton from "./SelectScrollDownButton.vue";
|
|
11
|
+
import SelectScrollUpButton from "./SelectScrollUpButton.vue";
|
|
15
12
|
defineOptions({
|
|
16
|
-
inheritAttrs: false
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
inheritAttrs: false
|
|
14
|
+
});
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
_selectScrollDownButton: { type: Object, required: false },
|
|
17
|
+
_selectScrollUpButton: { type: Object, required: false },
|
|
18
|
+
_selectSeparator: { type: Object, required: false },
|
|
19
|
+
una: { type: Object, required: false },
|
|
20
|
+
forceMount: { type: Boolean, required: false },
|
|
21
|
+
position: { type: String, required: false, default: "popper" },
|
|
22
|
+
bodyLock: { type: Boolean, required: false },
|
|
23
|
+
side: { type: null, required: false },
|
|
24
|
+
sideOffset: { type: Number, required: false },
|
|
25
|
+
align: { type: null, required: false },
|
|
26
|
+
alignOffset: { type: Number, required: false },
|
|
27
|
+
avoidCollisions: { type: Boolean, required: false },
|
|
28
|
+
collisionBoundary: { type: null, required: false },
|
|
29
|
+
collisionPadding: { type: [Number, Object], required: false },
|
|
30
|
+
arrowPadding: { type: Number, required: false },
|
|
31
|
+
sticky: { type: String, required: false },
|
|
32
|
+
hideWhenDetached: { type: Boolean, required: false },
|
|
33
|
+
positionStrategy: { type: String, required: false },
|
|
34
|
+
updatePositionStrategy: { type: String, required: false },
|
|
35
|
+
disableUpdateOnLayoutShift: { type: Boolean, required: false },
|
|
36
|
+
prioritizePosition: { type: Boolean, required: false },
|
|
37
|
+
reference: { type: null, required: false },
|
|
38
|
+
asChild: { type: Boolean, required: false },
|
|
39
|
+
as: { type: null, required: false },
|
|
40
|
+
class: { type: null, required: false },
|
|
41
|
+
size: { type: null, required: false }
|
|
42
|
+
});
|
|
43
|
+
const emits = defineEmits(["closeAutoFocus", "escapeKeyDown", "pointerDownOutside"]);
|
|
27
44
|
const delegatedProps = computed(() => {
|
|
28
|
-
const { class: _, ...delegated } = props
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
45
|
+
const { class: _, ...delegated } = props;
|
|
46
|
+
return delegated;
|
|
47
|
+
});
|
|
48
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
34
49
|
</script>
|
|
35
50
|
|
|
36
51
|
<template>
|
|
37
52
|
<SelectPortal>
|
|
38
53
|
<SelectContent
|
|
39
54
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
40
|
-
:class="
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
:class="
|
|
56
|
+
cn(
|
|
57
|
+
'select-content',
|
|
58
|
+
position === 'popper' && 'select-content-popper',
|
|
59
|
+
props.class
|
|
60
|
+
)
|
|
61
|
+
"
|
|
47
62
|
>
|
|
48
63
|
<SelectScrollUpButton
|
|
49
64
|
v-bind="_selectScrollUpButton"
|
|
50
65
|
/>
|
|
51
66
|
<SelectViewport
|
|
52
|
-
:class="
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
67
|
+
:class="
|
|
68
|
+
cn(
|
|
69
|
+
'select-viewport',
|
|
70
|
+
position === 'popper' && 'select-viewport-popper'
|
|
71
|
+
)
|
|
72
|
+
"
|
|
56
73
|
>
|
|
57
74
|
<slot />
|
|
58
75
|
</SelectViewport>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NSelectContentProps } from '../../../types/index.js';
|
|
2
|
+
declare var __VLS_17: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_17) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NSelectContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
8
|
+
pointerDownOutside: (event: CustomEvent<{
|
|
9
|
+
originalEvent: PointerEvent;
|
|
10
|
+
}>) => any;
|
|
11
|
+
closeAutoFocus: (event: Event) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<NSelectContentProps> & Readonly<{
|
|
13
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
14
|
+
onPointerDownOutside?: ((event: CustomEvent<{
|
|
15
|
+
originalEvent: PointerEvent;
|
|
16
|
+
}>) => any) | undefined;
|
|
17
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
position: "item-aligned" | "popper";
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { SelectGroup } from "reka-ui";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
una: { type: Object, required: false },
|
|
7
|
+
asChild: { type: Boolean, required: false },
|
|
8
|
+
as: { type: null, required: false },
|
|
9
|
+
class: { type: null, required: false },
|
|
10
|
+
size: { type: null, required: false }
|
|
11
|
+
});
|
|
9
12
|
const delegatedProps = computed(() => {
|
|
10
|
-
const { class: _, ...delegated } = props
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
13
|
+
const { class: _, ...delegated } = props;
|
|
14
|
+
return delegated;
|
|
15
|
+
});
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
18
|
<template>
|
|
17
19
|
<SelectGroup
|
|
18
20
|
:class="cn(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
'select-group',
|
|
22
|
+
props.una?.selectGroup,
|
|
23
|
+
props.class
|
|
24
|
+
)"
|
|
23
25
|
v-bind="delegatedProps"
|
|
24
26
|
>
|
|
25
27
|
<slot />
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NSelectGroupProps } 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<NSelectGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NSelectGroupProps> & 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
|
+
};
|