@una-ui/nuxt 0.54.2 → 0.54.4
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.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialog.vue +43 -38
- package/dist/runtime/components/alert-dialog/AlertDialog.vue.d.ts +45 -0
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue +35 -9
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue.d.ts +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue +39 -13
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue.d.ts +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +39 -33
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue.d.ts +45 -0
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue +15 -13
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue +12 -11
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue +10 -9
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue +15 -11
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue +15 -13
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTrigger.vue +6 -5
- 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 +145 -144
- 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 +15 -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 -24
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +16 -0
- package/dist/runtime/components/combobox/ComboboxItem.vue +23 -22
- 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 +75 -52
- 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 +14 -5
- package/dist/runtime/components/elements/Link.vue.d.ts +1 -109
- package/dist/runtime/components/elements/Progress.vue +36 -35
- 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 +49 -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 +118 -134
- package/dist/runtime/components/forms/Input.vue.d.ts +31 -0
- package/dist/runtime/components/forms/Slider.vue +48 -33
- 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 +66 -62
- 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 +79 -54
- 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 +36 -36
- package/dist/runtime/components/resizable/ResizableHandle.vue.d.ts +21 -0
- package/dist/runtime/components/resizable/ResizablePanel.vue +24 -17
- package/dist/runtime/components/resizable/ResizablePanel.vue.d.ts +24 -0
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue +22 -17
- 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/link.d.ts +6 -0
- package/dist/types.d.mts +3 -5
- package/dist/una.config.mjs +1 -1
- package/package.json +7 -7
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -37
- package/dist/types.d.ts +0 -7
- package/dist/una.config.d.ts +0 -8
|
@@ -1,75 +1,84 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import type { NAccordionItemProps, NAccordionProps } from '../../types'
|
|
3
|
-
|
|
1
|
+
<script setup>
|
|
4
2
|
import {
|
|
5
3
|
Disclosure,
|
|
6
4
|
DisclosureButton,
|
|
7
|
-
DisclosurePanel
|
|
8
|
-
} from
|
|
9
|
-
import { createReusableTemplate } from
|
|
10
|
-
import { computed, ref } from
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
DisclosurePanel
|
|
6
|
+
} from "@headlessui/vue";
|
|
7
|
+
import { createReusableTemplate } from "@vueuse/core";
|
|
8
|
+
import { computed, ref } from "vue";
|
|
9
|
+
import { pickProps } from "../../utils";
|
|
10
|
+
import NButton from "./Button.vue";
|
|
11
|
+
import NIcon from "./Icon.vue";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
accordion: { type: String, required: false },
|
|
14
|
+
trailingOpen: { type: String, required: false, default: "accordion-trailing-icon" },
|
|
15
|
+
trailingClose: { type: String, required: false },
|
|
16
|
+
multiple: { type: Boolean, required: false },
|
|
17
|
+
defaultOpen: { type: Boolean, required: false },
|
|
18
|
+
unstyle: { type: Boolean, required: false },
|
|
19
|
+
mounted: { type: Boolean, required: false },
|
|
20
|
+
items: { type: Array, required: true },
|
|
21
|
+
una: { type: Object, required: false },
|
|
22
|
+
type: { type: String, required: false },
|
|
23
|
+
loadingPlacement: { type: String, required: false, default: "trailing" },
|
|
24
|
+
icon: { type: Boolean, required: false },
|
|
25
|
+
disabled: { type: Boolean, required: false },
|
|
26
|
+
reverse: { type: Boolean, required: false },
|
|
27
|
+
loading: { type: Boolean, required: false },
|
|
28
|
+
block: { type: Boolean, required: false },
|
|
29
|
+
to: { type: null, required: false },
|
|
30
|
+
label: { type: String, required: false },
|
|
31
|
+
btn: { type: String, required: false },
|
|
32
|
+
leading: { type: String, required: false },
|
|
33
|
+
trailing: { type: String, required: false },
|
|
34
|
+
size: { type: String, required: false },
|
|
35
|
+
square: { type: null, required: false },
|
|
36
|
+
rounded: { type: null, required: false },
|
|
37
|
+
class: { type: null, required: false },
|
|
38
|
+
breadcrumbActive: { type: String, required: false },
|
|
39
|
+
breadcrumbInactive: { type: String, required: false },
|
|
40
|
+
paginationSelected: { type: String, required: false },
|
|
41
|
+
paginationUnselected: { type: String, required: false },
|
|
42
|
+
dropdownMenu: { type: String, required: false },
|
|
43
|
+
toggleOn: { type: String, required: false },
|
|
44
|
+
toggleOff: { type: String, required: false },
|
|
45
|
+
navigationMenu: { type: String, required: false },
|
|
46
|
+
navigationMenuLink: { type: String, required: false },
|
|
47
|
+
ariaLabel: { type: String, required: false }
|
|
48
|
+
});
|
|
49
|
+
const buttonRefs = ref([]);
|
|
50
|
+
function closeOthers(index) {
|
|
24
51
|
if (props.multiple && props.items[index] && !props.items[index].closeOthers)
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
buttonRefs.value
|
|
28
|
-
.filter((_, i) => i !== index)
|
|
29
|
-
.forEach(close => close())
|
|
52
|
+
return;
|
|
53
|
+
buttonRefs.value.filter((_, i) => i !== index).forEach((close) => close());
|
|
30
54
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
el.style.height =
|
|
35
|
-
el.
|
|
36
|
-
el.addEventListener('transitionend', done, { once: true })
|
|
55
|
+
function onEnter(element, done) {
|
|
56
|
+
const el = element;
|
|
57
|
+
el.style.height = "0";
|
|
58
|
+
el.style.height = `${element.scrollHeight}px`;
|
|
59
|
+
el.addEventListener("transitionend", done, { once: true });
|
|
37
60
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
el.style.height = 'auto'
|
|
61
|
+
function onAfterEnter(element) {
|
|
62
|
+
const el = element;
|
|
63
|
+
el.style.height = "auto";
|
|
42
64
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
el.style.height = `${el.scrollHeight}px`
|
|
65
|
+
function onBeforeLeave(element) {
|
|
66
|
+
const el = element;
|
|
67
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
47
68
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
el.
|
|
52
|
-
|
|
53
|
-
el.addEventListener('transitionend', done, { once: true })
|
|
69
|
+
function onLeave(element, done) {
|
|
70
|
+
const el = element;
|
|
71
|
+
el.style.height = "0";
|
|
72
|
+
el.addEventListener("transitionend", done, { once: true });
|
|
54
73
|
}
|
|
55
|
-
|
|
56
|
-
const [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
open: boolean
|
|
60
|
-
close: () => void
|
|
61
|
-
}>()
|
|
62
|
-
|
|
63
|
-
const pickedProps = pickProps(props, ['reverse', 'icon', 'btn', 'label', 'leading', 'loading', 'loadingPlacement', 'una', 'trailing', 'leading', 'to', 'type', 'disabled'])
|
|
64
|
-
|
|
65
|
-
function mergedProps(itemProps: NAccordionItemProps): NAccordionItemProps {
|
|
66
|
-
return Object.assign(pickedProps, itemProps)
|
|
74
|
+
const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
|
|
75
|
+
const pickedProps = pickProps(props, ["reverse", "icon", "btn", "label", "leading", "loading", "loadingPlacement", "una", "trailing", "leading", "to", "type", "disabled"]);
|
|
76
|
+
function mergedProps(itemProps) {
|
|
77
|
+
return Object.assign(pickedProps, itemProps);
|
|
67
78
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
const hasVariant = computed(() => btnVariants.some(btnVariants => props.btn?.includes(btnVariants)))
|
|
72
|
-
const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
79
|
+
const btnVariants = ["solid", "outline", "soft", "ghost", "link", "text"];
|
|
80
|
+
const hasVariant = computed(() => btnVariants.some((btnVariants2) => props.btn?.includes(btnVariants2)));
|
|
81
|
+
const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
73
82
|
</script>
|
|
74
83
|
|
|
75
84
|
<template>
|
|
@@ -77,11 +86,11 @@ const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
|
77
86
|
:accordion="accordion"
|
|
78
87
|
class="accordion"
|
|
79
88
|
:class="[
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
unstyle ? 'space-y-3' : 'accordion-(border divider)',
|
|
90
|
+
una?.accordion
|
|
91
|
+
]"
|
|
83
92
|
>
|
|
84
|
-
<DefineTemplate v-slot="{ item, close, index, open }
|
|
93
|
+
<DefineTemplate v-slot="{ item, close, index, open }">
|
|
85
94
|
<slot
|
|
86
95
|
:name="item.content ? 'content' : index"
|
|
87
96
|
:item="item" :index="index" :open="open" :close="close"
|
|
@@ -89,9 +98,9 @@ const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
|
89
98
|
<div
|
|
90
99
|
accordion="panel"
|
|
91
100
|
:class="[
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
una?.accordionPanel,
|
|
102
|
+
{ 'border-t-0': unstyle }
|
|
103
|
+
]"
|
|
95
104
|
>
|
|
96
105
|
{{ item.content }}
|
|
97
106
|
</div>
|
|
@@ -108,7 +117,7 @@ const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
|
108
117
|
:class="una?.accordionItem"
|
|
109
118
|
>
|
|
110
119
|
<DisclosureButton
|
|
111
|
-
:ref="() =>
|
|
120
|
+
:ref="() => buttonRefs[i] = close"
|
|
112
121
|
as="template"
|
|
113
122
|
:disabled="item.disabled || disabled"
|
|
114
123
|
@click="closeOthers(i)"
|
|
@@ -118,14 +127,14 @@ const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
|
118
127
|
v-bind="mergedProps(item)"
|
|
119
128
|
:btn="`~ block ${btn || ''}`"
|
|
120
129
|
:class="[
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
{ 'accordion-button-default-variant': !hasVariant && !isBaseVariant },
|
|
131
|
+
{ 'accordion-button-padding': !unstyle },
|
|
132
|
+
una?.accordionButton
|
|
133
|
+
]"
|
|
125
134
|
:una="{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
135
|
+
btn: 'h-auto accordion-button',
|
|
136
|
+
btnLabel: 'accordion-label'
|
|
137
|
+
}"
|
|
129
138
|
>
|
|
130
139
|
<template #leading>
|
|
131
140
|
<!-- TODO: fix conditional statement -->
|
|
@@ -143,11 +152,9 @@ const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
|
143
152
|
v-if="trailingOpen || trailingClose"
|
|
144
153
|
accordion="trailing"
|
|
145
154
|
:class="[
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
una?.accordionTrailing,
|
|
150
|
-
]"
|
|
155
|
+
trailingClose || !trailingClose && open ? una?.accordionTrailingClose || 'accordion-trailing-close' : una?.accordionTrailingOpen || 'accordion-trailing-open',
|
|
156
|
+
una?.accordionTrailing
|
|
157
|
+
]"
|
|
151
158
|
>
|
|
152
159
|
<NIcon
|
|
153
160
|
v-if="(open || !trailingClose) && trailingOpen"
|
|
@@ -176,11 +183,11 @@ const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
|
176
183
|
<DisclosurePanel v-if="!item.mounted || !mounted">
|
|
177
184
|
<ReuseTemplate
|
|
178
185
|
v-bind="{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
186
|
+
item,
|
|
187
|
+
index: i,
|
|
188
|
+
open,
|
|
189
|
+
close
|
|
190
|
+
}"
|
|
184
191
|
/>
|
|
185
192
|
</DisclosurePanel>
|
|
186
193
|
<DisclosurePanel
|
|
@@ -190,11 +197,11 @@ const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
|
190
197
|
>
|
|
191
198
|
<ReuseTemplate
|
|
192
199
|
v-bind="{
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
200
|
+
item,
|
|
201
|
+
index: i,
|
|
202
|
+
open,
|
|
203
|
+
close
|
|
204
|
+
}"
|
|
198
205
|
/>
|
|
199
206
|
</DisclosurePanel>
|
|
200
207
|
</Transition>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NAccordionItemProps, NAccordionProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_6: any, __VLS_7: {
|
|
3
|
+
item: any;
|
|
4
|
+
index: any;
|
|
5
|
+
open: any;
|
|
6
|
+
close: any;
|
|
7
|
+
}, __VLS_21: {
|
|
8
|
+
item: NAccordionItemProps;
|
|
9
|
+
index: number;
|
|
10
|
+
open: any;
|
|
11
|
+
close: any;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
[K in NonNullable<typeof __VLS_6>]?: (props: typeof __VLS_7) => any;
|
|
15
|
+
} & {
|
|
16
|
+
label?: (props: typeof __VLS_21) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<NAccordionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NAccordionProps> & Readonly<{}>, {
|
|
19
|
+
loadingPlacement: "leading" | "trailing" | "label";
|
|
20
|
+
trailingOpen: string;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -1,54 +1,41 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import NIcon from '../elements/Icon.vue'
|
|
6
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import NButton from "../elements/Button.vue";
|
|
4
|
+
import NIcon from "../elements/Icon.vue";
|
|
7
5
|
defineOptions({
|
|
8
|
-
inheritAttrs: false
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
icon: false,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}>()
|
|
24
|
-
|
|
25
|
-
const alertVariants = ['soft', 'outline', 'border'] as const
|
|
26
|
-
const hasVariant = computed(() => alertVariants.some(alertVariants => props.alert?.includes(alertVariants)))
|
|
27
|
-
const isBaseVariant = computed(() => props.alert?.includes('~'))
|
|
28
|
-
|
|
6
|
+
inheritAttrs: false
|
|
7
|
+
});
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
alert: { type: String, required: false },
|
|
10
|
+
icon: { type: [String, Boolean], required: false, default: false },
|
|
11
|
+
closable: { type: Boolean, required: false },
|
|
12
|
+
title: { type: String, required: false },
|
|
13
|
+
description: { type: String, required: false },
|
|
14
|
+
una: { type: Object, required: false }
|
|
15
|
+
});
|
|
16
|
+
const emit = defineEmits(["close"]);
|
|
17
|
+
const slots = defineSlots();
|
|
18
|
+
const alertVariants = ["soft", "outline", "border"];
|
|
19
|
+
const hasVariant = computed(() => alertVariants.some((alertVariants2) => props.alert?.includes(alertVariants2)));
|
|
20
|
+
const isBaseVariant = computed(() => props.alert?.includes("~"));
|
|
29
21
|
const alertClassVariants = computed(() => {
|
|
30
|
-
const
|
|
31
|
-
info:
|
|
32
|
-
success:
|
|
33
|
-
warning:
|
|
34
|
-
error:
|
|
35
|
-
default:
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// TODO: simplify and optimize this
|
|
39
|
-
const alertType = props.alert ? (props.alert.includes('info') ? 'info' : (props.alert.includes('success') ? 'success' : (props.alert.includes('warning') ? 'warning' : (props.alert.includes('error') ? 'error' : 'default')))) : 'default'
|
|
40
|
-
|
|
22
|
+
const icon2 = {
|
|
23
|
+
info: "alert-info-icon",
|
|
24
|
+
success: "alert-success-icon",
|
|
25
|
+
warning: "alert-warning-icon",
|
|
26
|
+
error: "alert-error-icon",
|
|
27
|
+
default: ""
|
|
28
|
+
};
|
|
29
|
+
const alertType = props.alert ? props.alert.includes("info") ? "info" : props.alert.includes("success") ? "success" : props.alert.includes("warning") ? "warning" : props.alert.includes("error") ? "error" : "default" : "default";
|
|
41
30
|
return {
|
|
42
|
-
icon:
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
|
|
31
|
+
icon: icon2[alertType]
|
|
32
|
+
};
|
|
33
|
+
});
|
|
46
34
|
const icon = computed(() => {
|
|
47
|
-
if (props.icon ===
|
|
48
|
-
return alertClassVariants.value.icon
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
})
|
|
35
|
+
if (props.icon === "" || props.icon === void 0 || props.icon === true)
|
|
36
|
+
return alertClassVariants.value.icon;
|
|
37
|
+
return props.icon.toString();
|
|
38
|
+
});
|
|
52
39
|
</script>
|
|
53
40
|
|
|
54
41
|
<template>
|
|
@@ -57,9 +44,9 @@ const icon = computed(() => {
|
|
|
57
44
|
:alert="alert"
|
|
58
45
|
class="alert"
|
|
59
46
|
:class="[
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
{ 'alert-default-variant': !hasVariant && !isBaseVariant },
|
|
48
|
+
una?.alert
|
|
49
|
+
]"
|
|
63
50
|
>
|
|
64
51
|
<div
|
|
65
52
|
alert="inner-wrapper"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NAlertProps } from '../../types/index.js';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default?: any;
|
|
4
|
+
title?: any;
|
|
5
|
+
description?: any;
|
|
6
|
+
icon?: any;
|
|
7
|
+
closeIcon?: any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<NAlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
close: (...args: any[]) => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<NAlertProps> & Readonly<{
|
|
12
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
icon: string | boolean;
|
|
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,94 +1,87 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { Primitive } from "reka-ui";
|
|
4
|
+
import { computed, h } from "vue";
|
|
5
|
+
import { cn, omitProps } from "../../utils";
|
|
6
|
+
import Avatar from "./avatar/Avatar.vue";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
max: { type: Number, required: false },
|
|
9
|
+
overflowLabel: { type: String, required: false },
|
|
10
|
+
una: { type: Object, required: false },
|
|
11
|
+
_avatarRoot: { type: Object, required: false },
|
|
12
|
+
_avatarImage: { type: Object, required: false },
|
|
13
|
+
_avatarFallback: { type: Object, required: false },
|
|
14
|
+
class: { type: null, required: false },
|
|
15
|
+
size: { type: null, required: false },
|
|
16
|
+
square: { type: null, required: false },
|
|
17
|
+
rounded: { type: null, required: false },
|
|
18
|
+
avatar: { type: null, required: false },
|
|
19
|
+
asChild: { type: Boolean, required: false },
|
|
20
|
+
as: { type: null, required: false, default: "div" },
|
|
21
|
+
icon: { type: Boolean, required: false },
|
|
22
|
+
delayMs: { type: Number, required: false },
|
|
23
|
+
referrerPolicy: { type: null, required: false }
|
|
24
|
+
});
|
|
25
|
+
const slots = defineSlots();
|
|
26
|
+
const max = computed(() => typeof props.max === "string" ? Number.parseInt(props.max, 10) : props.max);
|
|
17
27
|
const children = computed(() => {
|
|
18
|
-
let
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
if (typeof child.type ===
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return null
|
|
28
|
+
let children2 = slots.default?.();
|
|
29
|
+
if (children2?.length) {
|
|
30
|
+
children2 = children2.flatMap((child) => {
|
|
31
|
+
if (typeof child.type === "symbol") {
|
|
32
|
+
if (typeof child.children === "string") {
|
|
33
|
+
return null;
|
|
25
34
|
}
|
|
26
|
-
|
|
27
|
-
return child.children
|
|
35
|
+
return child.children;
|
|
28
36
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}).filter(Boolean)
|
|
37
|
+
return child;
|
|
38
|
+
}).filter(Boolean);
|
|
32
39
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// Calculate visible and hidden avatars without circular dependencies
|
|
40
|
+
return children2 || [];
|
|
41
|
+
});
|
|
38
42
|
const maxVisibleCount = computed(() => {
|
|
39
43
|
if (!max.value || max.value <= 0) {
|
|
40
|
-
return children.value.length
|
|
44
|
+
return children.value.length;
|
|
41
45
|
}
|
|
42
|
-
return Math.min(max.value, children.value.length)
|
|
43
|
-
})
|
|
44
|
-
|
|
46
|
+
return Math.min(max.value, children.value.length);
|
|
47
|
+
});
|
|
45
48
|
const hiddenCount = computed(() => {
|
|
46
49
|
if (!children.value.length) {
|
|
47
|
-
return 0
|
|
50
|
+
return 0;
|
|
48
51
|
}
|
|
49
|
-
return Math.max(0, children.value.length - maxVisibleCount.value)
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
+
return Math.max(0, children.value.length - maxVisibleCount.value);
|
|
53
|
+
});
|
|
52
54
|
const visibleAvatars = computed(() => {
|
|
53
55
|
if (!children.value.length) {
|
|
54
|
-
return []
|
|
56
|
+
return [];
|
|
55
57
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return [...children.value].slice(0, maxVisibleCount.value).reverse()
|
|
59
|
-
})
|
|
60
|
-
|
|
58
|
+
return [...children.value].slice(0, maxVisibleCount.value).reverse();
|
|
59
|
+
});
|
|
61
60
|
const displayAvatars = computed(() => {
|
|
62
|
-
const result = [...visibleAvatars.value]
|
|
63
|
-
|
|
61
|
+
const result = [...visibleAvatars.value];
|
|
64
62
|
if (hiddenCount.value > 0 || props.overflowLabel) {
|
|
65
|
-
const avatarProps = children.value.length > 0
|
|
66
|
-
? omitProps(children.value[0].props || {}, ['src', 'alt', 'label', 'icon'])
|
|
67
|
-
: {}
|
|
68
|
-
|
|
63
|
+
const avatarProps = children.value.length > 0 ? omitProps(children.value[0].props || {}, ["src", "alt", "label", "icon"]) : {};
|
|
69
64
|
result.unshift(
|
|
70
65
|
h(Avatar, {
|
|
71
66
|
label: props.overflowLabel || `+${hiddenCount.value}`,
|
|
72
67
|
class: cn(
|
|
73
|
-
props.una?.avatarGroupCount
|
|
68
|
+
props.una?.avatarGroupCount
|
|
74
69
|
),
|
|
75
70
|
una: {
|
|
76
71
|
avatarFallback: cn(
|
|
77
|
-
|
|
72
|
+
"avatar-group-count",
|
|
78
73
|
props.una?.avatarGroupCount,
|
|
79
|
-
avatarProps.una?.avatarFallback
|
|
74
|
+
avatarProps.una?.avatarFallback
|
|
80
75
|
),
|
|
81
|
-
...avatarProps.una
|
|
76
|
+
...avatarProps.una
|
|
82
77
|
},
|
|
83
|
-
...avatarProps
|
|
84
|
-
})
|
|
85
|
-
)
|
|
78
|
+
...avatarProps
|
|
79
|
+
})
|
|
80
|
+
);
|
|
86
81
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const rootProps = reactiveOmit(props, ['max', 'as', 'asChild', 'overflowLabel'])
|
|
82
|
+
return result;
|
|
83
|
+
});
|
|
84
|
+
const rootProps = reactiveOmit(props, ["max", "as", "asChild", "overflowLabel"]);
|
|
92
85
|
</script>
|
|
93
86
|
|
|
94
87
|
<template>
|
|
@@ -96,9 +89,9 @@ const rootProps = reactiveOmit(props, ['max', 'as', 'asChild', 'overflowLabel'])
|
|
|
96
89
|
:as
|
|
97
90
|
:size
|
|
98
91
|
:class="cn(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
92
|
+
'avatar-group',
|
|
93
|
+
una?.avatarGroup
|
|
94
|
+
)"
|
|
102
95
|
:as-child
|
|
103
96
|
>
|
|
104
97
|
<component
|
|
@@ -107,9 +100,9 @@ const rootProps = reactiveOmit(props, ['max', 'as', 'asChild', 'overflowLabel'])
|
|
|
107
100
|
v-bind="{ ...rootProps, ...avatar.props }"
|
|
108
101
|
:key="count"
|
|
109
102
|
:class="cn(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
'avatar-group-item',
|
|
104
|
+
props.class
|
|
105
|
+
)"
|
|
113
106
|
/>
|
|
114
107
|
</Primitive>
|
|
115
108
|
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NAvatarGroupProps } from '../../types/index.js';
|
|
2
|
+
declare const __VLS_component: import("vue").DefineComponent<NAvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NAvatarGroupProps> & Readonly<{}>, {
|
|
3
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
4
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
const emit = defineEmits([
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const isBaseVariant = computed(() => props.badge?.includes('~'))
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import NIcon from "./Icon.vue";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
badge: { type: String, required: false },
|
|
6
|
+
label: { type: String, required: false },
|
|
7
|
+
icon: { type: String, required: false },
|
|
8
|
+
closable: { type: Boolean, required: false },
|
|
9
|
+
una: { type: Object, required: false, default: () => ({
|
|
10
|
+
badgeDefaultVariant: "badge-default-variant"
|
|
11
|
+
}) }
|
|
12
|
+
});
|
|
13
|
+
const emit = defineEmits(["close"]);
|
|
14
|
+
const badgeVariants = ["solid", "soft", "outline"];
|
|
15
|
+
const hasVariant = computed(() => badgeVariants.some((badgeVariants2) => props.badge?.includes(badgeVariants2)));
|
|
16
|
+
const isBaseVariant = computed(() => props.badge?.includes("~"));
|
|
18
17
|
</script>
|
|
19
18
|
|
|
20
19
|
<template>
|
|
@@ -22,9 +21,9 @@ const isBaseVariant = computed(() => props.badge?.includes('~'))
|
|
|
22
21
|
:badge="badge"
|
|
23
22
|
class="badge"
|
|
24
23
|
:class="[
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
!hasVariant && !isBaseVariant ? una?.badgeDefaultVariant : '',
|
|
25
|
+
una?.badge
|
|
26
|
+
]"
|
|
28
27
|
>
|
|
29
28
|
<NIcon
|
|
30
29
|
v-if="icon"
|