@una-ui/nuxt 0.53.0 → 0.54.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.cjs +5 -0
- package/dist/module.d.ts +37 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialog.vue +38 -43
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue +9 -35
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue +13 -39
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +33 -39
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue +13 -15
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue +11 -12
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue +9 -10
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue +11 -15
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue +13 -15
- package/dist/runtime/components/alert-dialog/AlertDialogTrigger.vue +5 -6
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue +16 -18
- package/dist/runtime/components/combobox/Combobox.vue +144 -144
- package/dist/runtime/components/combobox/ComboboxAnchor.vue +18 -20
- package/dist/runtime/components/combobox/ComboboxEmpty.vue +16 -18
- package/dist/runtime/components/combobox/ComboboxGroup.vue +19 -25
- package/dist/runtime/components/combobox/ComboboxInput.vue +24 -38
- package/dist/runtime/components/combobox/ComboboxItem.vue +22 -23
- package/dist/runtime/components/combobox/ComboboxItemIndicator.vue +23 -23
- package/dist/runtime/components/combobox/ComboboxLabel.vue +10 -16
- package/dist/runtime/components/combobox/ComboboxList.vue +25 -43
- package/dist/runtime/components/combobox/ComboboxSeparator.vue +16 -18
- package/dist/runtime/components/combobox/ComboboxTrigger.vue +52 -75
- package/dist/runtime/components/combobox/ComboboxViewport.vue +18 -20
- package/dist/runtime/components/data/table/Table.vue +186 -206
- package/dist/runtime/components/data/table/TableBody.vue +15 -15
- package/dist/runtime/components/data/table/TableCaption.vue +16 -16
- package/dist/runtime/components/data/table/TableCell.vue +19 -20
- package/dist/runtime/components/data/table/TableEmpty.vue +27 -27
- package/dist/runtime/components/data/table/TableFooter.vue +15 -15
- package/dist/runtime/components/data/table/TableHead.vue +17 -18
- package/dist/runtime/components/data/table/TableHeader.vue +15 -15
- package/dist/runtime/components/data/table/TableLoading.vue +28 -31
- package/dist/runtime/components/data/table/TableRow.vue +15 -15
- package/dist/runtime/components/elements/Accordion.vue +92 -99
- package/dist/runtime/components/elements/Alert.vue +50 -37
- package/dist/runtime/components/elements/AvatarGroup.vue +71 -64
- package/dist/runtime/components/elements/Badge.vue +20 -19
- package/dist/runtime/components/elements/Button.vue +62 -75
- package/dist/runtime/components/elements/Icon.vue +4 -4
- package/dist/runtime/components/elements/Indicator.vue +29 -25
- package/dist/runtime/components/elements/Kbd.vue +12 -13
- package/dist/runtime/components/elements/Label.vue +15 -17
- package/dist/runtime/components/elements/Link.vue +2 -2
- package/dist/runtime/components/elements/Link.vue.d.ts +109 -0
- package/dist/runtime/components/elements/Progress.vue +35 -36
- package/dist/runtime/components/elements/Separator.vue +26 -31
- package/dist/runtime/components/elements/Skeleton.vue +11 -15
- package/dist/runtime/components/elements/Toggle.vue +26 -48
- package/dist/runtime/components/elements/avatar/Avatar.vue +22 -31
- package/dist/runtime/components/elements/avatar/AvatarFallback.vue +17 -26
- package/dist/runtime/components/elements/avatar/AvatarImage.vue +11 -20
- package/dist/runtime/components/elements/card/Card.vue +24 -28
- package/dist/runtime/components/elements/card/CardContent.vue +9 -10
- package/dist/runtime/components/elements/card/CardDescription.vue +9 -10
- package/dist/runtime/components/elements/card/CardFooter.vue +9 -10
- package/dist/runtime/components/elements/card/CardHeader.vue +9 -10
- package/dist/runtime/components/elements/card/CardTitle.vue +11 -12
- package/dist/runtime/components/elements/collapsible/Collapsible.vue +11 -15
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue +9 -12
- package/dist/runtime/components/elements/collapsible/CollapsibleTrigger.vue +5 -6
- package/dist/runtime/components/elements/dialog/Dialog.vue +35 -43
- package/dist/runtime/components/elements/dialog/DialogClose.vue +11 -34
- package/dist/runtime/components/elements/dialog/DialogContent.vue +35 -40
- package/dist/runtime/components/elements/dialog/DialogDescription.vue +15 -16
- package/dist/runtime/components/elements/dialog/DialogFooter.vue +9 -10
- package/dist/runtime/components/elements/dialog/DialogHeader.vue +9 -10
- package/dist/runtime/components/elements/dialog/DialogOverlay.vue +11 -13
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue +37 -39
- package/dist/runtime/components/elements/dialog/DialogTitle.vue +17 -19
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue +38 -85
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue +26 -43
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuGroup.vue +10 -14
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue +33 -58
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuLabel.vue +19 -21
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuRoot.vue +9 -13
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSeparator.vue +18 -25
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuShortcut.vue +9 -12
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSub.vue +13 -9
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue +21 -36
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue +27 -52
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuTrigger.vue +17 -44
- package/dist/runtime/components/elements/pagination/Pagination.vue +31 -51
- package/dist/runtime/components/elements/pagination/PaginationEllipsis.vue +25 -27
- package/dist/runtime/components/elements/pagination/PaginationFirst.vue +25 -45
- package/dist/runtime/components/elements/pagination/PaginationLast.vue +25 -45
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue +27 -50
- package/dist/runtime/components/elements/pagination/PaginationNext.vue +25 -45
- package/dist/runtime/components/elements/pagination/PaginationPrev.vue +25 -45
- package/dist/runtime/components/elements/popover/Popover.vue +16 -15
- package/dist/runtime/components/elements/popover/PopoverContent.vue +31 -39
- package/dist/runtime/components/elements/tabs/Tabs.vue +21 -32
- package/dist/runtime/components/elements/tabs/TabsContent.vue +18 -22
- package/dist/runtime/components/elements/tabs/TabsList.vue +14 -19
- package/dist/runtime/components/elements/tabs/TabsRoot.vue +13 -22
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue +19 -47
- package/dist/runtime/components/elements/tooltip/Tooltip.vue +24 -36
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue +27 -37
- package/dist/runtime/components/elements/tooltip/TooltipProvider.vue +7 -10
- package/dist/runtime/components/elements/tooltip/TooltipRoot.vue +9 -13
- package/dist/runtime/components/elements/tooltip/TooltipTrigger.vue +5 -34
- package/dist/runtime/components/forms/Checkbox.vue +42 -49
- package/dist/runtime/components/forms/FormGroup.vue +33 -40
- package/dist/runtime/components/forms/Input.vue +134 -118
- package/dist/runtime/components/forms/Slider.vue +33 -48
- package/dist/runtime/components/forms/Switch.vue +42 -43
- package/dist/runtime/components/forms/form/FormControl.vue +5 -4
- package/dist/runtime/components/forms/form/FormDescription.vue +12 -12
- package/dist/runtime/components/forms/form/FormField.vue +56 -65
- package/dist/runtime/components/forms/form/FormItem.vue +14 -14
- package/dist/runtime/components/forms/form/FormLabel.vue +13 -17
- package/dist/runtime/components/forms/form/FormMessage.vue +14 -14
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue +62 -66
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue +54 -60
- package/dist/runtime/components/forms/select/Select.vue +63 -81
- package/dist/runtime/components/forms/select/SelectContent.vue +38 -55
- package/dist/runtime/components/forms/select/SelectGroup.vue +16 -18
- package/dist/runtime/components/forms/select/SelectItem.vue +25 -31
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue +15 -17
- package/dist/runtime/components/forms/select/SelectItemText.vue +5 -9
- package/dist/runtime/components/forms/select/SelectLabel.vue +10 -15
- package/dist/runtime/components/forms/select/SelectScrollDownButton.vue +19 -20
- package/dist/runtime/components/forms/select/SelectScrollUpButton.vue +19 -20
- package/dist/runtime/components/forms/select/SelectSeparator.vue +16 -18
- package/dist/runtime/components/forms/select/SelectTrigger.vue +53 -78
- package/dist/runtime/components/forms/select/SelectValue.vue +10 -15
- package/dist/runtime/components/misc/ThemeSwitcher.vue +69 -51
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue +22 -35
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbEllipsis.vue +14 -13
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbItem.vue +9 -10
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbLink.vue +26 -46
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbList.vue +9 -10
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbPage.vue +7 -5
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbRoot.vue +8 -9
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbSeparator.vue +13 -13
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue +32 -52
- package/dist/runtime/components/navigation-menu/NavigationMenuContent.vue +19 -22
- package/dist/runtime/components/navigation-menu/NavigationMenuContentItem.vue +24 -53
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue +15 -18
- package/dist/runtime/components/navigation-menu/NavigationMenuItem.vue +5 -40
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue +28 -51
- package/dist/runtime/components/navigation-menu/NavigationMenuList.vue +22 -24
- package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue +34 -54
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue +26 -29
- package/dist/runtime/components/overlays/Toaster.vue +16 -19
- package/dist/runtime/components/overlays/toast/Toast.vue +38 -58
- package/dist/runtime/components/overlays/toast/ToastAction.vue +19 -42
- package/dist/runtime/components/overlays/toast/ToastClose.vue +20 -21
- package/dist/runtime/components/overlays/toast/ToastDescription.vue +16 -17
- package/dist/runtime/components/overlays/toast/ToastInfo.vue +9 -10
- package/dist/runtime/components/overlays/toast/ToastProvider.vue +7 -8
- package/dist/runtime/components/overlays/toast/ToastTitle.vue +16 -17
- package/dist/runtime/components/overlays/toast/ToastViewport.vue +16 -19
- package/dist/runtime/components/resizable/ResizableHandle.vue +36 -36
- package/dist/runtime/components/resizable/ResizablePanel.vue +17 -24
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue +17 -22
- package/dist/runtime/components/scroll-area/ScrollArea.vue +23 -31
- package/dist/runtime/components/scroll-area/ScrollBar.vue +25 -29
- package/dist/runtime/components/sheet/Sheet.vue +29 -40
- package/dist/runtime/components/sheet/SheetClose.vue +12 -34
- package/dist/runtime/components/sheet/SheetContent.vue +29 -35
- package/dist/runtime/components/sheet/SheetDescription.vue +13 -13
- package/dist/runtime/components/sheet/SheetFooter.vue +11 -12
- package/dist/runtime/components/sheet/SheetHeader.vue +7 -8
- package/dist/runtime/components/sheet/SheetTitle.vue +12 -13
- package/dist/runtime/components/sheet/SheetTrigger.vue +7 -6
- package/dist/runtime/components/sidebar/Sidebar.vue +52 -48
- package/dist/runtime/components/sidebar/SidebarContent.vue +10 -11
- package/dist/runtime/components/sidebar/SidebarFooter.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarGroup.vue +10 -12
- package/dist/runtime/components/sidebar/SidebarGroupAction.vue +13 -13
- package/dist/runtime/components/sidebar/SidebarGroupContent.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarGroupLabel.vue +13 -13
- package/dist/runtime/components/sidebar/SidebarHeader.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarInput.vue +10 -26
- package/dist/runtime/components/sidebar/SidebarInset.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarMenu.vue +14 -16
- package/dist/runtime/components/sidebar/SidebarMenuAction.vue +13 -15
- package/dist/runtime/components/sidebar/SidebarMenuBadge.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarMenuButton.vue +28 -27
- package/dist/runtime/components/sidebar/SidebarMenuButtonChild.vue +41 -29
- package/dist/runtime/components/sidebar/SidebarMenuItem.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarMenuSkeleton.vue +14 -15
- package/dist/runtime/components/sidebar/SidebarMenuSub.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarMenuSubButton.vue +17 -19
- package/dist/runtime/components/sidebar/SidebarMenuSubItem.vue +9 -10
- package/dist/runtime/components/sidebar/SidebarProvider.vue +55 -38
- package/dist/runtime/components/sidebar/SidebarRail.vue +12 -12
- package/dist/runtime/components/sidebar/SidebarSeparator.vue +10 -11
- package/dist/runtime/components/sidebar/SidebarTrigger.vue +18 -38
- package/dist/types.d.mts +5 -3
- package/dist/types.d.ts +7 -0
- package/dist/una.config.d.ts +8 -0
- package/dist/una.config.mjs +1 -1
- package/package.json +10 -8
- package/dist/runtime/components/alert-dialog/AlertDialog.vue.d.ts +0 -45
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue.d.ts +0 -16
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue.d.ts +0 -16
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue.d.ts +0 -45
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue.d.ts +0 -13
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue.d.ts +0 -13
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue.d.ts +0 -13
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue.d.ts +0 -13
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue.d.ts +0 -13
- package/dist/runtime/components/alert-dialog/AlertDialogTrigger.vue.d.ts +0 -13
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue.d.ts +0 -18
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +0 -89
- package/dist/runtime/components/combobox/ComboboxAnchor.vue.d.ts +0 -13
- package/dist/runtime/components/combobox/ComboboxEmpty.vue.d.ts +0 -13
- package/dist/runtime/components/combobox/ComboboxGroup.vue.d.ts +0 -17
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +0 -16
- package/dist/runtime/components/combobox/ComboboxItem.vue.d.ts +0 -18
- package/dist/runtime/components/combobox/ComboboxItemIndicator.vue.d.ts +0 -15
- package/dist/runtime/components/combobox/ComboboxLabel.vue.d.ts +0 -13
- package/dist/runtime/components/combobox/ComboboxList.vue.d.ts +0 -43
- package/dist/runtime/components/combobox/ComboboxSeparator.vue.d.ts +0 -13
- package/dist/runtime/components/combobox/ComboboxTrigger.vue.d.ts +0 -17
- package/dist/runtime/components/combobox/ComboboxViewport.vue.d.ts +0 -13
- package/dist/runtime/components/data/table/Table.vue.d.ts +0 -184
- package/dist/runtime/components/data/table/TableBody.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableCaption.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableCell.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableEmpty.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableFooter.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableHead.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableHeader.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableLoading.vue.d.ts +0 -15
- package/dist/runtime/components/data/table/TableRow.vue.d.ts +0 -15
- package/dist/runtime/components/elements/Accordion.vue.d.ts +0 -28
- package/dist/runtime/components/elements/Alert.vue.d.ts +0 -22
- package/dist/runtime/components/elements/AvatarGroup.vue.d.ts +0 -11
- package/dist/runtime/components/elements/Badge.vue.d.ts +0 -26
- package/dist/runtime/components/elements/Button.vue.d.ts +0 -34
- package/dist/runtime/components/elements/Icon.vue.d.ts +0 -3
- package/dist/runtime/components/elements/Indicator.vue.d.ts +0 -19
- package/dist/runtime/components/elements/Kbd.vue.d.ts +0 -13
- package/dist/runtime/components/elements/Label.vue.d.ts +0 -13
- package/dist/runtime/components/elements/Progress.vue.d.ts +0 -18
- package/dist/runtime/components/elements/Separator.vue.d.ts +0 -15
- package/dist/runtime/components/elements/Skeleton.vue.d.ts +0 -13
- package/dist/runtime/components/elements/Toggle.vue.d.ts +0 -22
- package/dist/runtime/components/elements/avatar/Avatar.vue.d.ts +0 -21
- package/dist/runtime/components/elements/avatar/AvatarFallback.vue.d.ts +0 -13
- package/dist/runtime/components/elements/avatar/AvatarImage.vue.d.ts +0 -3
- package/dist/runtime/components/elements/card/Card.vue.d.ts +0 -25
- package/dist/runtime/components/elements/card/CardContent.vue.d.ts +0 -13
- package/dist/runtime/components/elements/card/CardDescription.vue.d.ts +0 -13
- package/dist/runtime/components/elements/card/CardFooter.vue.d.ts +0 -13
- package/dist/runtime/components/elements/card/CardHeader.vue.d.ts +0 -13
- package/dist/runtime/components/elements/card/CardTitle.vue.d.ts +0 -13
- package/dist/runtime/components/elements/collapsible/Collapsible.vue.d.ts +0 -25
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue.d.ts +0 -13
- package/dist/runtime/components/elements/collapsible/CollapsibleTrigger.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dialog/Dialog.vue.d.ts +0 -34
- package/dist/runtime/components/elements/dialog/DialogClose.vue.d.ts +0 -18
- package/dist/runtime/components/elements/dialog/DialogContent.vue.d.ts +0 -46
- package/dist/runtime/components/elements/dialog/DialogDescription.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dialog/DialogFooter.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dialog/DialogHeader.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dialog/DialogOverlay.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue.d.ts +0 -46
- package/dist/runtime/components/elements/dialog/DialogTitle.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue.d.ts +0 -61
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -43
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -14
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuRoot.vue.d.ts +0 -17
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -3
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -13
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -17
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -45
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -16
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -13
- package/dist/runtime/components/elements/pagination/Pagination.vue.d.ts +0 -41
- package/dist/runtime/components/elements/pagination/PaginationEllipsis.vue.d.ts +0 -15
- package/dist/runtime/components/elements/pagination/PaginationFirst.vue.d.ts +0 -18
- package/dist/runtime/components/elements/pagination/PaginationLast.vue.d.ts +0 -18
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue.d.ts +0 -17
- package/dist/runtime/components/elements/pagination/PaginationNext.vue.d.ts +0 -18
- package/dist/runtime/components/elements/pagination/PaginationPrev.vue.d.ts +0 -18
- package/dist/runtime/components/elements/popover/Popover.vue.d.ts +0 -21
- package/dist/runtime/components/elements/popover/PopoverContent.vue.d.ts +0 -46
- package/dist/runtime/components/elements/tabs/Tabs.vue.d.ts +0 -28
- package/dist/runtime/components/elements/tabs/TabsContent.vue.d.ts +0 -13
- package/dist/runtime/components/elements/tabs/TabsList.vue.d.ts +0 -13
- package/dist/runtime/components/elements/tabs/TabsRoot.vue.d.ts +0 -17
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue.d.ts +0 -13
- package/dist/runtime/components/elements/tooltip/Tooltip.vue.d.ts +0 -19
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue.d.ts +0 -22
- package/dist/runtime/components/elements/tooltip/TooltipProvider.vue.d.ts +0 -15
- package/dist/runtime/components/elements/tooltip/TooltipRoot.vue.d.ts +0 -17
- package/dist/runtime/components/elements/tooltip/TooltipTrigger.vue.d.ts +0 -13
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +0 -21
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +0 -27
- package/dist/runtime/components/forms/Input.vue.d.ts +0 -31
- package/dist/runtime/components/forms/Slider.vue.d.ts +0 -25
- package/dist/runtime/components/forms/Switch.vue.d.ts +0 -27
- package/dist/runtime/components/forms/form/FormControl.vue.d.ts +0 -12
- package/dist/runtime/components/forms/form/FormDescription.vue.d.ts +0 -13
- package/dist/runtime/components/forms/form/FormField.vue.d.ts +0 -25
- package/dist/runtime/components/forms/form/FormItem.vue.d.ts +0 -13
- package/dist/runtime/components/forms/form/FormLabel.vue.d.ts +0 -13
- package/dist/runtime/components/forms/form/FormMessage.vue.d.ts +0 -3
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue.d.ts +0 -29
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue.d.ts +0 -22
- package/dist/runtime/components/forms/select/Select.vue.d.ts +0 -72
- package/dist/runtime/components/forms/select/SelectContent.vue.d.ts +0 -27
- package/dist/runtime/components/forms/select/SelectGroup.vue.d.ts +0 -13
- package/dist/runtime/components/forms/select/SelectItem.vue.d.ts +0 -17
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue.d.ts +0 -15
- package/dist/runtime/components/forms/select/SelectItemText.vue.d.ts +0 -13
- package/dist/runtime/components/forms/select/SelectLabel.vue.d.ts +0 -13
- package/dist/runtime/components/forms/select/SelectScrollDownButton.vue.d.ts +0 -13
- package/dist/runtime/components/forms/select/SelectScrollUpButton.vue.d.ts +0 -13
- package/dist/runtime/components/forms/select/SelectSeparator.vue.d.ts +0 -3
- package/dist/runtime/components/forms/select/SelectTrigger.vue.d.ts +0 -15
- package/dist/runtime/components/forms/select/SelectValue.vue.d.ts +0 -13
- package/dist/runtime/components/misc/ThemeSwitcher.vue.d.ts +0 -16
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue.d.ts +0 -45
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbEllipsis.vue.d.ts +0 -16
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbItem.vue.d.ts +0 -13
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbLink.vue.d.ts +0 -18
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbList.vue.d.ts +0 -13
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbPage.vue.d.ts +0 -16
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbRoot.vue.d.ts +0 -13
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbSeparator.vue.d.ts +0 -16
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue.d.ts +0 -46
- package/dist/runtime/components/navigation-menu/NavigationMenuContent.vue.d.ts +0 -39
- package/dist/runtime/components/navigation-menu/NavigationMenuContentItem.vue.d.ts +0 -21
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue.d.ts +0 -13
- package/dist/runtime/components/navigation-menu/NavigationMenuItem.vue.d.ts +0 -13
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue.d.ts +0 -27
- package/dist/runtime/components/navigation-menu/NavigationMenuList.vue.d.ts +0 -13
- package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +0 -18
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue.d.ts +0 -3
- package/dist/runtime/components/overlays/Toaster.vue.d.ts +0 -13
- package/dist/runtime/components/overlays/toast/Toast.vue.d.ts +0 -112
- package/dist/runtime/components/overlays/toast/ToastAction.vue.d.ts +0 -16
- package/dist/runtime/components/overlays/toast/ToastClose.vue.d.ts +0 -3
- package/dist/runtime/components/overlays/toast/ToastDescription.vue.d.ts +0 -13
- package/dist/runtime/components/overlays/toast/ToastInfo.vue.d.ts +0 -13
- package/dist/runtime/components/overlays/toast/ToastProvider.vue.d.ts +0 -15
- package/dist/runtime/components/overlays/toast/ToastTitle.vue.d.ts +0 -13
- package/dist/runtime/components/overlays/toast/ToastViewport.vue.d.ts +0 -3
- package/dist/runtime/components/resizable/ResizableHandle.vue.d.ts +0 -21
- package/dist/runtime/components/resizable/ResizablePanel.vue.d.ts +0 -24
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue.d.ts +0 -19
- package/dist/runtime/components/scroll-area/ScrollArea.vue.d.ts +0 -17
- package/dist/runtime/components/scroll-area/ScrollBar.vue.d.ts +0 -6
- package/dist/runtime/components/sheet/Sheet.vue.d.ts +0 -36
- package/dist/runtime/components/sheet/SheetClose.vue.d.ts +0 -42
- package/dist/runtime/components/sheet/SheetContent.vue.d.ts +0 -68
- package/dist/runtime/components/sheet/SheetDescription.vue.d.ts +0 -12
- package/dist/runtime/components/sheet/SheetFooter.vue.d.ts +0 -12
- package/dist/runtime/components/sheet/SheetHeader.vue.d.ts +0 -12
- package/dist/runtime/components/sheet/SheetTitle.vue.d.ts +0 -12
- package/dist/runtime/components/sheet/SheetTrigger.vue.d.ts +0 -15
- package/dist/runtime/components/sidebar/Sidebar.vue.d.ts +0 -24
- package/dist/runtime/components/sidebar/SidebarContent.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarFooter.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarGroup.vue.d.ts +0 -16
- package/dist/runtime/components/sidebar/SidebarGroupAction.vue.d.ts +0 -36
- package/dist/runtime/components/sidebar/SidebarGroupContent.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarGroupLabel.vue.d.ts +0 -36
- package/dist/runtime/components/sidebar/SidebarHeader.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarInput.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarInset.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarMenu.vue.d.ts +0 -22
- package/dist/runtime/components/sidebar/SidebarMenuAction.vue.d.ts +0 -34
- package/dist/runtime/components/sidebar/SidebarMenuBadge.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarMenuButton.vue.d.ts +0 -19
- package/dist/runtime/components/sidebar/SidebarMenuButtonChild.vue.d.ts +0 -31
- package/dist/runtime/components/sidebar/SidebarMenuItem.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarMenuSkeleton.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarMenuSub.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarMenuSubButton.vue.d.ts +0 -16
- package/dist/runtime/components/sidebar/SidebarMenuSubItem.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarProvider.vue.d.ts +0 -20
- package/dist/runtime/components/sidebar/SidebarRail.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarSeparator.vue.d.ts +0 -12
- package/dist/runtime/components/sidebar/SidebarTrigger.vue.d.ts +0 -30
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NTableEmptyProps } from '../../../types'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { cn, omitProps } from '../../../utils'
|
|
5
|
+
import TableCell from './TableCell.vue'
|
|
6
|
+
import TableRow from './TableRow.vue'
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<NTableEmptyProps>(), {
|
|
9
|
+
colspan: 1,
|
|
10
|
+
})
|
|
11
|
+
|
|
13
12
|
const delegatedProps = computed(() => {
|
|
14
|
-
const { class: _, ...delegated } = props
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const { class: _, ...delegated } = props
|
|
14
|
+
|
|
15
|
+
return delegated
|
|
16
|
+
})
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
20
|
<TableRow
|
|
21
21
|
:class="cn(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
)"
|
|
22
|
+
'table-empty-row',
|
|
23
|
+
props.una?.tableRow,
|
|
24
|
+
)"
|
|
25
25
|
v-bind="delegatedProps._tableRow"
|
|
26
26
|
>
|
|
27
27
|
<TableCell
|
|
28
28
|
:class="
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
29
|
+
cn(
|
|
30
|
+
'table-empty-cell',
|
|
31
|
+
props.una?.tableCell,
|
|
32
|
+
)
|
|
33
|
+
"
|
|
34
34
|
:colspan="props.colspan"
|
|
35
35
|
v-bind="delegatedProps._tableCell"
|
|
36
36
|
>
|
|
37
37
|
<div
|
|
38
38
|
:class="cn(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
)"
|
|
39
|
+
'table-empty',
|
|
40
|
+
props.una?.tableEmpty,
|
|
41
|
+
props.class,
|
|
42
|
+
)"
|
|
43
43
|
v-bind="omitProps(delegatedProps, ['_tableRow', '_tableCell', 'colspan'])"
|
|
44
44
|
>
|
|
45
45
|
<slot>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const rootProps = reactiveOmit(props, [
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NTableFooterProps } from '../../../types'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { Primitive } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../utils'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<NTableFooterProps>(), {
|
|
8
|
+
as: 'tfoot',
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const rootProps = reactiveOmit(props, ['una', 'class'])
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
15
|
<Primitive
|
|
16
16
|
:class="cn(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
)"
|
|
17
|
+
'table-footer',
|
|
18
|
+
props.una?.tableFooter,
|
|
19
|
+
props.class,
|
|
20
|
+
)"
|
|
21
21
|
v-bind="{ ...rootProps, ...$attrs }"
|
|
22
22
|
>
|
|
23
23
|
<slot />
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const rootProps = reactiveOmit(props, ["una", "class"]);
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NTableHeadProps } from '../../../types'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { Primitive } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../utils'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<NTableHeadProps>(), {
|
|
8
|
+
as: 'th',
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const rootProps = reactiveOmit(props, ['una', 'class'])
|
|
13
12
|
</script>
|
|
14
13
|
|
|
15
14
|
<template>
|
|
16
15
|
<Primitive
|
|
17
16
|
:class="cn(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
)"
|
|
17
|
+
'table-head',
|
|
18
|
+
props.una?.tableHead,
|
|
19
|
+
props.class,
|
|
20
|
+
{ 'table-head-pinned': props.dataPinned },
|
|
21
|
+
props.dataPinned === 'left' ? 'table-head-pinned-left' : 'table-head-pinned-right',
|
|
22
|
+
)"
|
|
24
23
|
v-bind="{ ...rootProps, ...$attrs }"
|
|
25
24
|
>
|
|
26
25
|
<slot />
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const rootProps = reactiveOmit(props, [
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NTableHeaderProps } from '../../../types'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { Primitive } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../utils'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<NTableHeaderProps>(), {
|
|
8
|
+
as: 'thead',
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const rootProps = reactiveOmit(props, ['una', 'class'])
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
15
|
<Primitive
|
|
16
16
|
:class="cn(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
)"
|
|
17
|
+
'table-header',
|
|
18
|
+
props?.una?.tableHeader,
|
|
19
|
+
props.class,
|
|
20
|
+
)"
|
|
21
21
|
v-bind="{ ...rootProps, ...$attrs }"
|
|
22
22
|
>
|
|
23
23
|
<slot />
|
|
@@ -1,57 +1,54 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_tableRow: { type: Object, required: false },
|
|
13
|
-
_tableProgress: { type: Object, required: false },
|
|
14
|
-
una: { type: Object, required: false }
|
|
15
|
-
});
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NTableLoadingProps } from '../../../types'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { cn } from '../../../utils'
|
|
5
|
+
import Progress from '../../elements/Progress.vue'
|
|
6
|
+
import TableRow from './TableRow.vue'
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<NTableLoadingProps>(), {
|
|
9
|
+
size: '2.5px',
|
|
10
|
+
})
|
|
11
|
+
|
|
16
12
|
const delegatedProps = computed(() => {
|
|
17
|
-
const { class: _, ...delegated } = props
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const { class: _, ...delegated } = props
|
|
14
|
+
|
|
15
|
+
return delegated
|
|
16
|
+
})
|
|
20
17
|
</script>
|
|
21
18
|
|
|
22
19
|
<template>
|
|
23
20
|
<TableRow
|
|
24
21
|
:class="cn(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)"
|
|
22
|
+
'table-loading-row',
|
|
23
|
+
props.una?.tableLoadingRow,
|
|
24
|
+
)"
|
|
28
25
|
data-loading="true"
|
|
29
26
|
v-bind="delegatedProps._tableRow"
|
|
30
27
|
>
|
|
31
28
|
<td
|
|
32
29
|
:class="
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
30
|
+
cn(
|
|
31
|
+
'table-loading-cell',
|
|
32
|
+
props.una?.tableLoadingCell,
|
|
33
|
+
)
|
|
34
|
+
"
|
|
38
35
|
:colspan="0"
|
|
39
36
|
v-bind="delegatedProps._tableCell"
|
|
40
37
|
>
|
|
41
38
|
<div
|
|
42
39
|
v-if="enabled"
|
|
43
40
|
:class="cn(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
)"
|
|
41
|
+
'table-loading',
|
|
42
|
+
props.una?.tableLoading,
|
|
43
|
+
)"
|
|
47
44
|
>
|
|
48
45
|
<slot>
|
|
49
46
|
<Progress
|
|
50
47
|
:size
|
|
51
48
|
v-bind="props._tableProgress"
|
|
52
49
|
:class="cn(
|
|
53
|
-
|
|
54
|
-
)"
|
|
50
|
+
props._tableProgress?.class,
|
|
51
|
+
)"
|
|
55
52
|
/>
|
|
56
53
|
</slot>
|
|
57
54
|
</div>
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const rootProps = reactiveOmit(props, [
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NTableRowProps } from '../../../types'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { Primitive } from 'reka-ui'
|
|
5
|
+
import { cn } from '../../../utils'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<NTableRowProps>(), {
|
|
8
|
+
as: 'tr',
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const rootProps = reactiveOmit(props, ['una', 'class'])
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
15
|
<Primitive
|
|
16
16
|
role="row"
|
|
17
17
|
:class="cn(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)"
|
|
18
|
+
'table-row',
|
|
19
|
+
props.una?.tableRow,
|
|
20
|
+
props.class,
|
|
21
|
+
)"
|
|
22
22
|
v-bind="{ ...rootProps, ...$attrs }"
|
|
23
23
|
>
|
|
24
24
|
<slot />
|
|
@@ -1,84 +1,75 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NAccordionItemProps, NAccordionProps } from '../../types'
|
|
3
|
+
|
|
2
4
|
import {
|
|
3
5
|
Disclosure,
|
|
4
6
|
DisclosureButton,
|
|
5
|
-
DisclosurePanel
|
|
6
|
-
} from
|
|
7
|
-
import { createReusableTemplate } from
|
|
8
|
-
import { computed, ref } from
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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) {
|
|
7
|
+
DisclosurePanel,
|
|
8
|
+
} from '@headlessui/vue'
|
|
9
|
+
import { createReusableTemplate } from '@vueuse/core'
|
|
10
|
+
import { computed, ref } from 'vue'
|
|
11
|
+
|
|
12
|
+
import { pickProps } from '../../utils'
|
|
13
|
+
import NButton from './Button.vue'
|
|
14
|
+
import NIcon from './Icon.vue'
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<NAccordionProps>(), {
|
|
17
|
+
trailingOpen: 'accordion-trailing-icon',
|
|
18
|
+
loadingPlacement: 'trailing',
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const buttonRefs = ref<(() => void)[]>([])
|
|
22
|
+
|
|
23
|
+
function closeOthers(index: number): void {
|
|
51
24
|
if (props.multiple && props.items[index] && !props.items[index].closeOthers)
|
|
52
|
-
return
|
|
53
|
-
|
|
25
|
+
return
|
|
26
|
+
|
|
27
|
+
buttonRefs.value
|
|
28
|
+
.filter((_, i) => i !== index)
|
|
29
|
+
.forEach(close => close())
|
|
54
30
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
el
|
|
58
|
-
el.style.height =
|
|
59
|
-
el.
|
|
31
|
+
|
|
32
|
+
function onEnter(element: Element, done: () => void): void {
|
|
33
|
+
const el = element as HTMLElement
|
|
34
|
+
el.style.height = '0'
|
|
35
|
+
el.style.height = `${element.scrollHeight}px`
|
|
36
|
+
el.addEventListener('transitionend', done, { once: true })
|
|
60
37
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
el
|
|
38
|
+
|
|
39
|
+
function onAfterEnter(element: Element): void {
|
|
40
|
+
const el = element as HTMLElement
|
|
41
|
+
el.style.height = 'auto'
|
|
64
42
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
el
|
|
43
|
+
|
|
44
|
+
function onBeforeLeave(element: Element): void {
|
|
45
|
+
const el = element as HTMLElement
|
|
46
|
+
el.style.height = `${el.scrollHeight}px`
|
|
68
47
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
el
|
|
72
|
-
el.
|
|
48
|
+
|
|
49
|
+
function onLeave(element: Element, done: () => void): void {
|
|
50
|
+
const el = element as HTMLElement
|
|
51
|
+
el.style.height = '0'
|
|
52
|
+
|
|
53
|
+
el.addEventListener('transitionend', done, { once: true })
|
|
73
54
|
}
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
55
|
+
|
|
56
|
+
const [DefineTemplate, ReuseTemplate] = createReusableTemplate<{
|
|
57
|
+
item: NAccordionItemProps
|
|
58
|
+
index: number
|
|
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)
|
|
78
67
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
68
|
+
|
|
69
|
+
// TODO: refactor this to sync with NButton variants
|
|
70
|
+
const btnVariants = ['solid', 'outline', 'soft', 'ghost', 'link', 'text'] as const
|
|
71
|
+
const hasVariant = computed(() => btnVariants.some(btnVariants => props.btn?.includes(btnVariants)))
|
|
72
|
+
const isBaseVariant = computed(() => props.btn?.includes('~'))
|
|
82
73
|
</script>
|
|
83
74
|
|
|
84
75
|
<template>
|
|
@@ -86,11 +77,11 @@ const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
|
86
77
|
:accordion="accordion"
|
|
87
78
|
class="accordion"
|
|
88
79
|
:class="[
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]"
|
|
80
|
+
unstyle ? 'space-y-3' : 'accordion-(border divider)',
|
|
81
|
+
una?.accordion,
|
|
82
|
+
]"
|
|
92
83
|
>
|
|
93
|
-
<DefineTemplate v-slot="{ item, close, index, open }">
|
|
84
|
+
<DefineTemplate v-slot="{ item, close, index, open }: any">
|
|
94
85
|
<slot
|
|
95
86
|
:name="item.content ? 'content' : index"
|
|
96
87
|
:item="item" :index="index" :open="open" :close="close"
|
|
@@ -98,9 +89,9 @@ const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
|
98
89
|
<div
|
|
99
90
|
accordion="panel"
|
|
100
91
|
:class="[
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
]"
|
|
92
|
+
una?.accordionPanel,
|
|
93
|
+
{ 'border-t-0': unstyle },
|
|
94
|
+
]"
|
|
104
95
|
>
|
|
105
96
|
{{ item.content }}
|
|
106
97
|
</div>
|
|
@@ -117,7 +108,7 @@ const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
|
117
108
|
:class="una?.accordionItem"
|
|
118
109
|
>
|
|
119
110
|
<DisclosureButton
|
|
120
|
-
:ref="() => buttonRefs[i] = close"
|
|
111
|
+
:ref="() => (buttonRefs[i] = close)"
|
|
121
112
|
as="template"
|
|
122
113
|
:disabled="item.disabled || disabled"
|
|
123
114
|
@click="closeOthers(i)"
|
|
@@ -127,14 +118,14 @@ const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
|
127
118
|
v-bind="mergedProps(item)"
|
|
128
119
|
:btn="`~ block ${btn || ''}`"
|
|
129
120
|
:class="[
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
]"
|
|
121
|
+
{ 'accordion-button-default-variant': !hasVariant && !isBaseVariant },
|
|
122
|
+
{ 'accordion-button-padding': !unstyle },
|
|
123
|
+
una?.accordionButton,
|
|
124
|
+
]"
|
|
134
125
|
:una="{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}"
|
|
126
|
+
btn: 'h-auto accordion-button',
|
|
127
|
+
btnLabel: 'accordion-label',
|
|
128
|
+
}"
|
|
138
129
|
>
|
|
139
130
|
<template #leading>
|
|
140
131
|
<!-- TODO: fix conditional statement -->
|
|
@@ -152,9 +143,11 @@ const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
|
152
143
|
v-if="trailingOpen || trailingClose"
|
|
153
144
|
accordion="trailing"
|
|
154
145
|
:class="[
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
146
|
+
trailingClose || (!trailingClose && open)
|
|
147
|
+
? una?.accordionTrailingClose || 'accordion-trailing-close'
|
|
148
|
+
: una?.accordionTrailingOpen || 'accordion-trailing-open',
|
|
149
|
+
una?.accordionTrailing,
|
|
150
|
+
]"
|
|
158
151
|
>
|
|
159
152
|
<NIcon
|
|
160
153
|
v-if="(open || !trailingClose) && trailingOpen"
|
|
@@ -183,11 +176,11 @@ const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
|
183
176
|
<DisclosurePanel v-if="!item.mounted || !mounted">
|
|
184
177
|
<ReuseTemplate
|
|
185
178
|
v-bind="{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}"
|
|
179
|
+
item,
|
|
180
|
+
index: i,
|
|
181
|
+
open,
|
|
182
|
+
close,
|
|
183
|
+
}"
|
|
191
184
|
/>
|
|
192
185
|
</DisclosurePanel>
|
|
193
186
|
<DisclosurePanel
|
|
@@ -197,11 +190,11 @@ const isBaseVariant = computed(() => props.btn?.includes("~"));
|
|
|
197
190
|
>
|
|
198
191
|
<ReuseTemplate
|
|
199
192
|
v-bind="{
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}"
|
|
193
|
+
item,
|
|
194
|
+
index: i,
|
|
195
|
+
open,
|
|
196
|
+
close,
|
|
197
|
+
}"
|
|
205
198
|
/>
|
|
206
199
|
</DisclosurePanel>
|
|
207
200
|
</Transition>
|