@una-ui/nuxt 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +2 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialog.vue +136 -0
- package/dist/runtime/components/alert-dialog/AlertDialog.vue.d.ts +45 -0
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue +50 -0
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue.d.ts +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue +55 -0
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue.d.ts +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +68 -0
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue.d.ts +45 -0
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue +26 -0
- package/dist/runtime/components/alert-dialog/AlertDialogDescription.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue +22 -0
- package/dist/runtime/components/alert-dialog/AlertDialogFooter.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue +20 -0
- package/dist/runtime/components/alert-dialog/AlertDialogHeader.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue +25 -0
- package/dist/runtime/components/alert-dialog/AlertDialogOverlay.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue +26 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTitle.vue.d.ts +13 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTrigger.vue +16 -0
- package/dist/runtime/components/alert-dialog/AlertDialogTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue +18 -16
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue.d.ts +18 -0
- package/dist/runtime/components/combobox/Combobox.vue +150 -135
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +89 -0
- package/dist/runtime/components/combobox/ComboboxAnchor.vue +20 -18
- package/dist/runtime/components/combobox/ComboboxAnchor.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxEmpty.vue +18 -16
- package/dist/runtime/components/combobox/ComboboxEmpty.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxGroup.vue +25 -19
- package/dist/runtime/components/combobox/ComboboxGroup.vue.d.ts +17 -0
- package/dist/runtime/components/combobox/ComboboxInput.vue +38 -26
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +16 -0
- package/dist/runtime/components/combobox/ComboboxItem.vue +23 -20
- package/dist/runtime/components/combobox/ComboboxItem.vue.d.ts +18 -0
- package/dist/runtime/components/combobox/ComboboxItemIndicator.vue +23 -23
- package/dist/runtime/components/combobox/ComboboxItemIndicator.vue.d.ts +15 -0
- package/dist/runtime/components/combobox/ComboboxLabel.vue +16 -10
- package/dist/runtime/components/combobox/ComboboxLabel.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxList.vue +43 -25
- package/dist/runtime/components/combobox/ComboboxList.vue.d.ts +43 -0
- package/dist/runtime/components/combobox/ComboboxSeparator.vue +18 -16
- package/dist/runtime/components/combobox/ComboboxSeparator.vue.d.ts +13 -0
- package/dist/runtime/components/combobox/ComboboxTrigger.vue +77 -53
- package/dist/runtime/components/combobox/ComboboxTrigger.vue.d.ts +17 -0
- package/dist/runtime/components/combobox/ComboboxViewport.vue +20 -18
- package/dist/runtime/components/combobox/ComboboxViewport.vue.d.ts +13 -0
- package/dist/runtime/components/data/table/Table.vue +206 -186
- package/dist/runtime/components/data/table/Table.vue.d.ts +184 -0
- package/dist/runtime/components/data/table/TableBody.vue +15 -15
- package/dist/runtime/components/data/table/TableBody.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableCaption.vue +16 -16
- package/dist/runtime/components/data/table/TableCaption.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableCell.vue +20 -19
- package/dist/runtime/components/data/table/TableCell.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableEmpty.vue +27 -27
- package/dist/runtime/components/data/table/TableEmpty.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableFooter.vue +15 -15
- package/dist/runtime/components/data/table/TableFooter.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableHead.vue +18 -17
- package/dist/runtime/components/data/table/TableHead.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableHeader.vue +15 -15
- package/dist/runtime/components/data/table/TableHeader.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableLoading.vue +31 -28
- package/dist/runtime/components/data/table/TableLoading.vue.d.ts +15 -0
- package/dist/runtime/components/data/table/TableRow.vue +15 -15
- package/dist/runtime/components/data/table/TableRow.vue.d.ts +15 -0
- package/dist/runtime/components/elements/Accordion.vue +99 -92
- package/dist/runtime/components/elements/Accordion.vue.d.ts +28 -0
- package/dist/runtime/components/elements/Alert.vue +37 -50
- package/dist/runtime/components/elements/Alert.vue.d.ts +22 -0
- package/dist/runtime/components/elements/AvatarGroup.vue +64 -71
- package/dist/runtime/components/elements/AvatarGroup.vue.d.ts +11 -0
- package/dist/runtime/components/elements/Badge.vue +19 -20
- package/dist/runtime/components/elements/Badge.vue.d.ts +26 -0
- package/dist/runtime/components/elements/Button.vue +75 -62
- package/dist/runtime/components/elements/Button.vue.d.ts +34 -0
- package/dist/runtime/components/elements/Icon.vue +4 -4
- package/dist/runtime/components/elements/Icon.vue.d.ts +3 -0
- package/dist/runtime/components/elements/Indicator.vue +25 -29
- package/dist/runtime/components/elements/Indicator.vue.d.ts +19 -0
- package/dist/runtime/components/elements/Kbd.vue +13 -12
- package/dist/runtime/components/elements/Kbd.vue.d.ts +13 -0
- package/dist/runtime/components/elements/Label.vue +17 -14
- package/dist/runtime/components/elements/Label.vue.d.ts +13 -0
- package/dist/runtime/components/elements/Link.vue +2 -2
- package/dist/runtime/components/elements/Link.vue.d.ts +0 -109
- package/dist/runtime/components/elements/Progress.vue +39 -37
- package/dist/runtime/components/elements/Progress.vue.d.ts +18 -0
- package/dist/runtime/components/elements/Separator.vue +31 -26
- package/dist/runtime/components/elements/Separator.vue.d.ts +15 -0
- package/dist/runtime/components/elements/Skeleton.vue +15 -11
- package/dist/runtime/components/elements/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/components/elements/Toggle.vue +48 -26
- package/dist/runtime/components/elements/Toggle.vue.d.ts +22 -0
- package/dist/runtime/components/elements/avatar/Avatar.vue +31 -22
- package/dist/runtime/components/elements/avatar/Avatar.vue.d.ts +21 -0
- package/dist/runtime/components/elements/avatar/AvatarFallback.vue +26 -17
- package/dist/runtime/components/elements/avatar/AvatarFallback.vue.d.ts +13 -0
- package/dist/runtime/components/elements/avatar/AvatarImage.vue +20 -11
- package/dist/runtime/components/elements/avatar/AvatarImage.vue.d.ts +3 -0
- package/dist/runtime/components/elements/card/Card.vue +28 -24
- package/dist/runtime/components/elements/card/Card.vue.d.ts +25 -0
- package/dist/runtime/components/elements/card/CardContent.vue +10 -9
- package/dist/runtime/components/elements/card/CardContent.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardDescription.vue +10 -9
- package/dist/runtime/components/elements/card/CardDescription.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardFooter.vue +10 -9
- package/dist/runtime/components/elements/card/CardFooter.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardHeader.vue +10 -9
- package/dist/runtime/components/elements/card/CardHeader.vue.d.ts +13 -0
- package/dist/runtime/components/elements/card/CardTitle.vue +12 -11
- package/dist/runtime/components/elements/card/CardTitle.vue.d.ts +13 -0
- package/dist/runtime/components/elements/collapsible/Collapsible.vue +15 -11
- package/dist/runtime/components/elements/collapsible/Collapsible.vue.d.ts +25 -0
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue +12 -9
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue.d.ts +13 -0
- package/dist/runtime/components/elements/collapsible/CollapsibleTrigger.vue +6 -5
- package/dist/runtime/components/elements/collapsible/CollapsibleTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/Dialog.vue +43 -35
- package/dist/runtime/components/elements/dialog/Dialog.vue.d.ts +34 -0
- package/dist/runtime/components/elements/dialog/DialogClose.vue +34 -11
- package/dist/runtime/components/elements/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/runtime/components/elements/dialog/DialogContent.vue +40 -35
- package/dist/runtime/components/elements/dialog/DialogContent.vue.d.ts +46 -0
- package/dist/runtime/components/elements/dialog/DialogDescription.vue +16 -15
- package/dist/runtime/components/elements/dialog/DialogDescription.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogFooter.vue +10 -9
- package/dist/runtime/components/elements/dialog/DialogFooter.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogHeader.vue +10 -9
- package/dist/runtime/components/elements/dialog/DialogHeader.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogOverlay.vue +13 -11
- package/dist/runtime/components/elements/dialog/DialogOverlay.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue +39 -37
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue.d.ts +46 -0
- package/dist/runtime/components/elements/dialog/DialogTitle.vue +19 -17
- package/dist/runtime/components/elements/dialog/DialogTitle.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue +85 -38
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue.d.ts +61 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue +43 -26
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue.d.ts +43 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuGroup.vue +14 -10
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuGroup.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue +58 -33
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue.d.ts +14 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuLabel.vue +21 -19
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuLabel.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuRoot.vue +13 -9
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuRoot.vue.d.ts +17 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSeparator.vue +25 -18
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSeparator.vue.d.ts +3 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuShortcut.vue +12 -9
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuShortcut.vue.d.ts +13 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSub.vue +9 -13
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSub.vue.d.ts +17 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue +36 -21
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue.d.ts +45 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue +52 -27
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +16 -0
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuTrigger.vue +44 -17
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/elements/pagination/Pagination.vue +51 -31
- package/dist/runtime/components/elements/pagination/Pagination.vue.d.ts +41 -0
- package/dist/runtime/components/elements/pagination/PaginationEllipsis.vue +27 -25
- package/dist/runtime/components/elements/pagination/PaginationEllipsis.vue.d.ts +15 -0
- package/dist/runtime/components/elements/pagination/PaginationFirst.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationFirst.vue.d.ts +18 -0
- package/dist/runtime/components/elements/pagination/PaginationLast.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationLast.vue.d.ts +18 -0
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue +50 -27
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue.d.ts +17 -0
- package/dist/runtime/components/elements/pagination/PaginationNext.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationNext.vue.d.ts +18 -0
- package/dist/runtime/components/elements/pagination/PaginationPrev.vue +45 -25
- package/dist/runtime/components/elements/pagination/PaginationPrev.vue.d.ts +18 -0
- package/dist/runtime/components/elements/popover/Popover.vue +15 -16
- package/dist/runtime/components/elements/popover/Popover.vue.d.ts +21 -0
- package/dist/runtime/components/elements/popover/PopoverContent.vue +39 -31
- package/dist/runtime/components/elements/popover/PopoverContent.vue.d.ts +46 -0
- package/dist/runtime/components/elements/tabs/Tabs.vue +32 -21
- package/dist/runtime/components/elements/tabs/Tabs.vue.d.ts +28 -0
- package/dist/runtime/components/elements/tabs/TabsContent.vue +22 -18
- package/dist/runtime/components/elements/tabs/TabsContent.vue.d.ts +13 -0
- package/dist/runtime/components/elements/tabs/TabsList.vue +19 -14
- package/dist/runtime/components/elements/tabs/TabsList.vue.d.ts +13 -0
- package/dist/runtime/components/elements/tabs/TabsRoot.vue +22 -13
- package/dist/runtime/components/elements/tabs/TabsRoot.vue.d.ts +17 -0
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue +47 -19
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/elements/tooltip/Tooltip.vue +36 -24
- package/dist/runtime/components/elements/tooltip/Tooltip.vue.d.ts +19 -0
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue +37 -27
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue.d.ts +22 -0
- package/dist/runtime/components/elements/tooltip/TooltipProvider.vue +10 -7
- package/dist/runtime/components/elements/tooltip/TooltipProvider.vue.d.ts +15 -0
- package/dist/runtime/components/elements/tooltip/TooltipRoot.vue +13 -9
- package/dist/runtime/components/elements/tooltip/TooltipRoot.vue.d.ts +17 -0
- package/dist/runtime/components/elements/tooltip/TooltipTrigger.vue +34 -5
- package/dist/runtime/components/elements/tooltip/TooltipTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/forms/Checkbox.vue +50 -42
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +21 -0
- package/dist/runtime/components/forms/FormGroup.vue +40 -33
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +27 -0
- package/dist/runtime/components/forms/Input.vue +119 -134
- package/dist/runtime/components/forms/Input.vue.d.ts +31 -0
- package/dist/runtime/components/forms/Slider.vue +49 -36
- package/dist/runtime/components/forms/Slider.vue.d.ts +25 -0
- package/dist/runtime/components/forms/Switch.vue +43 -42
- package/dist/runtime/components/forms/Switch.vue.d.ts +27 -0
- package/dist/runtime/components/forms/form/FormControl.vue +4 -5
- package/dist/runtime/components/forms/form/FormControl.vue.d.ts +12 -0
- package/dist/runtime/components/forms/form/FormDescription.vue +12 -12
- package/dist/runtime/components/forms/form/FormDescription.vue.d.ts +13 -0
- package/dist/runtime/components/forms/form/FormField.vue +65 -56
- package/dist/runtime/components/forms/form/FormField.vue.d.ts +25 -0
- package/dist/runtime/components/forms/form/FormItem.vue +14 -14
- package/dist/runtime/components/forms/form/FormItem.vue.d.ts +13 -0
- package/dist/runtime/components/forms/form/FormLabel.vue +17 -13
- package/dist/runtime/components/forms/form/FormLabel.vue.d.ts +13 -0
- package/dist/runtime/components/forms/form/FormMessage.vue +14 -14
- package/dist/runtime/components/forms/form/FormMessage.vue.d.ts +3 -0
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue +68 -63
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue.d.ts +29 -0
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue +60 -54
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue.d.ts +22 -0
- package/dist/runtime/components/forms/select/Select.vue +82 -64
- package/dist/runtime/components/forms/select/Select.vue.d.ts +72 -0
- package/dist/runtime/components/forms/select/SelectContent.vue +55 -38
- package/dist/runtime/components/forms/select/SelectContent.vue.d.ts +27 -0
- package/dist/runtime/components/forms/select/SelectGroup.vue +18 -16
- package/dist/runtime/components/forms/select/SelectGroup.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectItem.vue +31 -25
- package/dist/runtime/components/forms/select/SelectItem.vue.d.ts +17 -0
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue +17 -15
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue.d.ts +15 -0
- package/dist/runtime/components/forms/select/SelectItemText.vue +9 -5
- package/dist/runtime/components/forms/select/SelectItemText.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectLabel.vue +15 -10
- package/dist/runtime/components/forms/select/SelectLabel.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectScrollDownButton.vue +20 -19
- package/dist/runtime/components/forms/select/SelectScrollDownButton.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectScrollUpButton.vue +20 -19
- package/dist/runtime/components/forms/select/SelectScrollUpButton.vue.d.ts +13 -0
- package/dist/runtime/components/forms/select/SelectSeparator.vue +18 -16
- package/dist/runtime/components/forms/select/SelectSeparator.vue.d.ts +3 -0
- package/dist/runtime/components/forms/select/SelectTrigger.vue +78 -53
- package/dist/runtime/components/forms/select/SelectTrigger.vue.d.ts +15 -0
- package/dist/runtime/components/forms/select/SelectValue.vue +15 -10
- package/dist/runtime/components/forms/select/SelectValue.vue.d.ts +13 -0
- package/dist/runtime/components/misc/ThemeSwitcher.vue +51 -69
- package/dist/runtime/components/misc/ThemeSwitcher.vue.d.ts +16 -0
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue +35 -22
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue.d.ts +45 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbEllipsis.vue +13 -14
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbEllipsis.vue.d.ts +16 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbItem.vue +10 -9
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbItem.vue.d.ts +13 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbLink.vue +46 -26
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbLink.vue.d.ts +18 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbList.vue +10 -9
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbList.vue.d.ts +13 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbPage.vue +5 -7
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbPage.vue.d.ts +16 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbRoot.vue +9 -8
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbRoot.vue.d.ts +13 -0
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbSeparator.vue +13 -13
- package/dist/runtime/components/navigation/breadcrumb/BreadcrumbSeparator.vue.d.ts +16 -0
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue +52 -32
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue.d.ts +46 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuContent.vue +22 -19
- package/dist/runtime/components/navigation-menu/NavigationMenuContent.vue.d.ts +39 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuContentItem.vue +53 -24
- package/dist/runtime/components/navigation-menu/NavigationMenuContentItem.vue.d.ts +21 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue +18 -15
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue.d.ts +13 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuItem.vue +40 -5
- package/dist/runtime/components/navigation-menu/NavigationMenuItem.vue.d.ts +13 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue +51 -28
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue.d.ts +27 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuList.vue +24 -22
- package/dist/runtime/components/navigation-menu/NavigationMenuList.vue.d.ts +13 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue +54 -34
- package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +18 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue +29 -26
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue.d.ts +3 -0
- package/dist/runtime/components/overlays/Toaster.vue +19 -16
- package/dist/runtime/components/overlays/Toaster.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/Toast.vue +58 -38
- package/dist/runtime/components/overlays/toast/Toast.vue.d.ts +112 -0
- package/dist/runtime/components/overlays/toast/ToastAction.vue +42 -19
- package/dist/runtime/components/overlays/toast/ToastAction.vue.d.ts +16 -0
- package/dist/runtime/components/overlays/toast/ToastClose.vue +21 -20
- package/dist/runtime/components/overlays/toast/ToastClose.vue.d.ts +3 -0
- package/dist/runtime/components/overlays/toast/ToastDescription.vue +17 -16
- package/dist/runtime/components/overlays/toast/ToastDescription.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/ToastInfo.vue +10 -9
- package/dist/runtime/components/overlays/toast/ToastInfo.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/ToastProvider.vue +8 -7
- package/dist/runtime/components/overlays/toast/ToastProvider.vue.d.ts +15 -0
- package/dist/runtime/components/overlays/toast/ToastTitle.vue +17 -16
- package/dist/runtime/components/overlays/toast/ToastTitle.vue.d.ts +13 -0
- package/dist/runtime/components/overlays/toast/ToastViewport.vue +19 -16
- package/dist/runtime/components/overlays/toast/ToastViewport.vue.d.ts +3 -0
- package/dist/runtime/components/resizable/ResizableHandle.vue +61 -0
- package/dist/runtime/components/resizable/ResizableHandle.vue.d.ts +21 -0
- package/dist/runtime/components/resizable/ResizablePanel.vue +36 -0
- package/dist/runtime/components/resizable/ResizablePanel.vue.d.ts +24 -0
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue +34 -0
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue.d.ts +19 -0
- package/dist/runtime/components/scroll-area/ScrollArea.vue +31 -23
- package/dist/runtime/components/scroll-area/ScrollArea.vue.d.ts +17 -0
- package/dist/runtime/components/scroll-area/ScrollBar.vue +29 -25
- package/dist/runtime/components/scroll-area/ScrollBar.vue.d.ts +6 -0
- package/dist/runtime/components/sheet/Sheet.vue +40 -29
- package/dist/runtime/components/sheet/Sheet.vue.d.ts +36 -0
- package/dist/runtime/components/sheet/SheetClose.vue +34 -12
- package/dist/runtime/components/sheet/SheetClose.vue.d.ts +42 -0
- package/dist/runtime/components/sheet/SheetContent.vue +35 -29
- package/dist/runtime/components/sheet/SheetContent.vue.d.ts +68 -0
- package/dist/runtime/components/sheet/SheetDescription.vue +13 -13
- package/dist/runtime/components/sheet/SheetDescription.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetFooter.vue +12 -11
- package/dist/runtime/components/sheet/SheetFooter.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetHeader.vue +8 -7
- package/dist/runtime/components/sheet/SheetHeader.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetTitle.vue +13 -12
- package/dist/runtime/components/sheet/SheetTitle.vue.d.ts +12 -0
- package/dist/runtime/components/sheet/SheetTrigger.vue +6 -7
- package/dist/runtime/components/sheet/SheetTrigger.vue.d.ts +15 -0
- package/dist/runtime/components/sidebar/Sidebar.vue +48 -52
- package/dist/runtime/components/sidebar/Sidebar.vue.d.ts +24 -0
- package/dist/runtime/components/sidebar/SidebarContent.vue +11 -10
- package/dist/runtime/components/sidebar/SidebarContent.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarFooter.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarFooter.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarGroup.vue +12 -10
- package/dist/runtime/components/sidebar/SidebarGroup.vue.d.ts +16 -0
- package/dist/runtime/components/sidebar/SidebarGroupAction.vue +13 -13
- package/dist/runtime/components/sidebar/SidebarGroupAction.vue.d.ts +36 -0
- package/dist/runtime/components/sidebar/SidebarGroupContent.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarGroupContent.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarGroupLabel.vue +13 -13
- package/dist/runtime/components/sidebar/SidebarGroupLabel.vue.d.ts +36 -0
- package/dist/runtime/components/sidebar/SidebarHeader.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarHeader.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarInput.vue +26 -10
- package/dist/runtime/components/sidebar/SidebarInput.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarInset.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarInset.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenu.vue +16 -14
- package/dist/runtime/components/sidebar/SidebarMenu.vue.d.ts +22 -0
- package/dist/runtime/components/sidebar/SidebarMenuAction.vue +15 -13
- package/dist/runtime/components/sidebar/SidebarMenuAction.vue.d.ts +34 -0
- package/dist/runtime/components/sidebar/SidebarMenuBadge.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuBadge.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuButton.vue +27 -28
- package/dist/runtime/components/sidebar/SidebarMenuButton.vue.d.ts +19 -0
- package/dist/runtime/components/sidebar/SidebarMenuButtonChild.vue +29 -41
- package/dist/runtime/components/sidebar/SidebarMenuButtonChild.vue.d.ts +31 -0
- package/dist/runtime/components/sidebar/SidebarMenuItem.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuItem.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuSkeleton.vue +15 -14
- package/dist/runtime/components/sidebar/SidebarMenuSkeleton.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuSub.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuSub.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarMenuSubButton.vue +19 -17
- package/dist/runtime/components/sidebar/SidebarMenuSubButton.vue.d.ts +16 -0
- package/dist/runtime/components/sidebar/SidebarMenuSubItem.vue +10 -9
- package/dist/runtime/components/sidebar/SidebarMenuSubItem.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarProvider.vue +38 -55
- package/dist/runtime/components/sidebar/SidebarProvider.vue.d.ts +20 -0
- package/dist/runtime/components/sidebar/SidebarRail.vue +12 -12
- package/dist/runtime/components/sidebar/SidebarRail.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarSeparator.vue +11 -10
- package/dist/runtime/components/sidebar/SidebarSeparator.vue.d.ts +12 -0
- package/dist/runtime/components/sidebar/SidebarTrigger.vue +38 -18
- package/dist/runtime/components/sidebar/SidebarTrigger.vue.d.ts +30 -0
- package/dist/runtime/types/alert-dialog.d.ts +98 -0
- package/dist/runtime/types/alert-dialog.js +0 -0
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/input.d.ts +1 -0
- package/dist/runtime/types/resizable.d.ts +46 -0
- package/dist/runtime/types/resizable.js +0 -0
- package/dist/types.d.mts +5 -1
- package/dist/una.config.mjs +1 -1
- package/package.json +8 -10
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -36
- package/dist/types.d.ts +0 -1
- package/dist/una.config.d.ts +0 -8
|
@@ -1,149 +1,133 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import NIcon from '../elements/Icon.vue'
|
|
6
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
import { cn, randomId } from "../../utils";
|
|
4
|
+
import NIcon from "../elements/Icon.vue";
|
|
7
5
|
defineOptions({
|
|
8
|
-
inheritAttrs: false
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
6
|
+
inheritAttrs: false
|
|
7
|
+
});
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
type: { type: null, required: false, default: "text" },
|
|
10
|
+
status: { type: String, required: false },
|
|
11
|
+
loading: { type: Boolean, required: false },
|
|
12
|
+
reverse: { type: Boolean, required: false },
|
|
13
|
+
modelValue: { type: [String, Number], required: false },
|
|
14
|
+
leading: { type: String, required: false },
|
|
15
|
+
trailing: { type: String, required: false },
|
|
16
|
+
input: { type: String, required: false },
|
|
17
|
+
size: { type: String, required: false, default: "md" },
|
|
18
|
+
id: { type: String, required: false },
|
|
19
|
+
autoresize: { type: [Boolean, Number], required: false },
|
|
20
|
+
resize: { type: [String, null], required: false, default: "none" },
|
|
21
|
+
rows: { type: Number, required: false, default: 0 },
|
|
22
|
+
cols: { type: Number, required: false },
|
|
23
|
+
una: { type: Object, required: false },
|
|
24
|
+
_inputWrapper: { type: Object, required: false }
|
|
25
|
+
});
|
|
26
|
+
const emit = defineEmits(["leading", "trailing", "update:modelValue"]);
|
|
27
|
+
const slots = defineSlots();
|
|
28
|
+
const id = props.id ?? randomId("input");
|
|
29
|
+
const isLeading = computed(() => props.leading || slots.leading);
|
|
30
|
+
const isTrailing = computed(() => props.trailing || slots.trailing || props.status || props.loading);
|
|
31
|
+
const inputVariants = ["outline", "solid"];
|
|
32
|
+
const hasVariant = computed(() => inputVariants.some((inputVariants2) => props.input?.includes(inputVariants2)));
|
|
33
|
+
const isBaseVariant = computed(() => props.input?.includes("~"));
|
|
34
34
|
const statusClassVariants = computed(() => {
|
|
35
35
|
const input = {
|
|
36
|
-
info:
|
|
37
|
-
success:
|
|
38
|
-
warning:
|
|
39
|
-
error:
|
|
40
|
-
default: !hasVariant.value && !isBaseVariant.value ?
|
|
41
|
-
}
|
|
42
|
-
|
|
36
|
+
info: "input-status-info input-solid-info input-status-ring",
|
|
37
|
+
success: "input-status-success input-solid-success input-status-ring",
|
|
38
|
+
warning: "input-status-warning input-solid-warning input-status-ring",
|
|
39
|
+
error: "input-status-error input-solid-error input-status-ring",
|
|
40
|
+
default: !hasVariant.value && !isBaseVariant.value ? "input-default-variant" : ""
|
|
41
|
+
};
|
|
43
42
|
const text = {
|
|
44
|
-
info:
|
|
45
|
-
success:
|
|
46
|
-
warning:
|
|
47
|
-
error:
|
|
48
|
-
default:
|
|
49
|
-
}
|
|
50
|
-
|
|
43
|
+
info: "text-info",
|
|
44
|
+
success: "text-success",
|
|
45
|
+
warning: "text-warning",
|
|
46
|
+
error: "text-error",
|
|
47
|
+
default: ""
|
|
48
|
+
};
|
|
51
49
|
const icon = {
|
|
52
|
-
info: props.una?.inputWarningIcon ??
|
|
53
|
-
success: props.una?.inputSuccessIcon ??
|
|
54
|
-
warning: props.una?.inputWarningIcon ??
|
|
55
|
-
error: props.una?.inputErrorIcon ??
|
|
56
|
-
default:
|
|
57
|
-
}
|
|
58
|
-
|
|
50
|
+
info: props.una?.inputWarningIcon ?? "input-info-icon",
|
|
51
|
+
success: props.una?.inputSuccessIcon ?? "input-success-icon",
|
|
52
|
+
warning: props.una?.inputWarningIcon ?? "input-warning-icon",
|
|
53
|
+
error: props.una?.inputErrorIcon ?? "input-error-icon",
|
|
54
|
+
default: ""
|
|
55
|
+
};
|
|
59
56
|
return {
|
|
60
|
-
input: input[props.status ??
|
|
61
|
-
text: text[props.status ??
|
|
62
|
-
icon: icon[props.status ??
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
|
|
57
|
+
input: input[props.status ?? "default"],
|
|
58
|
+
text: text[props.status ?? "default"],
|
|
59
|
+
icon: icon[props.status ?? "default"]
|
|
60
|
+
};
|
|
61
|
+
});
|
|
66
62
|
const reverseClassVariants = computed(() => {
|
|
67
63
|
const input = {
|
|
68
|
-
false: [{
|
|
69
|
-
true: [{
|
|
70
|
-
}
|
|
71
|
-
|
|
64
|
+
false: [{ "input-leading-padding": isLeading.value }, { "input-trailing-padding": isTrailing.value }],
|
|
65
|
+
true: [{ "input-trailing-padding": isLeading.value }, { "input-leading-padding": isTrailing.value }]
|
|
66
|
+
};
|
|
72
67
|
return {
|
|
73
|
-
input: input[props.reverse ?
|
|
74
|
-
leadingWrapper: props.reverse ?
|
|
75
|
-
trailingWrapper: props.reverse ?
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
const paddingBottom = Number.parseInt(styles.paddingBottom)
|
|
91
|
-
const padding = paddingTop + paddingBottom
|
|
92
|
-
const lineHeight = Number.parseInt(styles.lineHeight)
|
|
93
|
-
const { scrollHeight } = inputRef.value
|
|
94
|
-
const newRows = (scrollHeight - padding) / lineHeight
|
|
95
|
-
|
|
68
|
+
input: input[props.reverse ? "true" : "false"],
|
|
69
|
+
leadingWrapper: props.reverse ? "input-trailing-wrapper" : "input-leading-wrapper",
|
|
70
|
+
trailingWrapper: props.reverse ? "input-leading-wrapper" : "input-trailing-wrapper"
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
const inputRef = ref();
|
|
74
|
+
function resizeTextarea() {
|
|
75
|
+
if (!(props.type === "textarea" && props.autoresize) || !inputRef.value)
|
|
76
|
+
return;
|
|
77
|
+
inputRef.value.rows = props.rows;
|
|
78
|
+
const styles = window.getComputedStyle(inputRef.value);
|
|
79
|
+
const paddingTop = Number.parseInt(styles.paddingTop);
|
|
80
|
+
const paddingBottom = Number.parseInt(styles.paddingBottom);
|
|
81
|
+
const padding = paddingTop + paddingBottom;
|
|
82
|
+
const lineHeight = Number.parseInt(styles.lineHeight);
|
|
83
|
+
const { scrollHeight } = inputRef.value;
|
|
84
|
+
const newRows = (scrollHeight - padding) / lineHeight;
|
|
96
85
|
if (newRows > props.rows)
|
|
97
|
-
inputRef.value.rows = newRows
|
|
98
|
-
|
|
99
|
-
const maxAutoresizeRows = typeof props.autoresize === 'number' ? props.autoresize : Number.POSITIVE_INFINITY
|
|
86
|
+
inputRef.value.rows = newRows;
|
|
87
|
+
const maxAutoresizeRows = typeof props.autoresize === "number" ? props.autoresize : Number.POSITIVE_INFINITY;
|
|
100
88
|
if (inputRef.value.rows > maxAutoresizeRows)
|
|
101
|
-
inputRef.value.rows = maxAutoresizeRows
|
|
89
|
+
inputRef.value.rows = maxAutoresizeRows;
|
|
102
90
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
resizeTextarea()
|
|
91
|
+
function onInput(event) {
|
|
92
|
+
emit("update:modelValue", event.target.value);
|
|
93
|
+
resizeTextarea();
|
|
108
94
|
}
|
|
109
|
-
|
|
110
95
|
onMounted(() => {
|
|
111
|
-
resizeTextarea()
|
|
112
|
-
})
|
|
113
|
-
|
|
96
|
+
resizeTextarea();
|
|
97
|
+
});
|
|
114
98
|
defineExpose({
|
|
115
99
|
focus: () => inputRef.value?.focus(),
|
|
116
100
|
blur: () => inputRef.value?.blur(),
|
|
117
101
|
select: () => inputRef.value?.select(),
|
|
118
|
-
inputRef
|
|
119
|
-
})
|
|
102
|
+
inputRef
|
|
103
|
+
});
|
|
120
104
|
</script>
|
|
121
105
|
|
|
122
106
|
<template>
|
|
123
107
|
<div
|
|
124
108
|
:size
|
|
125
109
|
:class="cn(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
110
|
+
'input-wrapper',
|
|
111
|
+
una?.inputWrapper
|
|
112
|
+
)"
|
|
129
113
|
v-bind="_inputWrapper"
|
|
130
114
|
>
|
|
131
115
|
<div
|
|
132
116
|
v-if="isLeading"
|
|
133
|
-
:class="
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
117
|
+
:class="cn(
|
|
118
|
+
una?.inputLeadingWrapper,
|
|
119
|
+
reverseClassVariants.leadingWrapper,
|
|
120
|
+
statusClassVariants.text
|
|
121
|
+
)"
|
|
138
122
|
>
|
|
139
123
|
<slot name="leading">
|
|
140
124
|
<NIcon
|
|
141
125
|
v-if="leading"
|
|
142
126
|
:name="leading"
|
|
143
127
|
:class="cn(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
128
|
+
'input-leading',
|
|
129
|
+
una?.inputLeading
|
|
130
|
+
)"
|
|
147
131
|
@click="emit('leading')"
|
|
148
132
|
/>
|
|
149
133
|
</slot>
|
|
@@ -154,18 +138,18 @@ defineExpose({
|
|
|
154
138
|
:id
|
|
155
139
|
ref="inputRef"
|
|
156
140
|
:value="modelValue"
|
|
157
|
-
:type="props.type !== 'textarea' ? props.type :
|
|
141
|
+
:type="props.type !== 'textarea' ? props.type : void 0"
|
|
158
142
|
:class="cn(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
143
|
+
'input',
|
|
144
|
+
type === 'textarea' ? 'input-textarea' : 'input-input',
|
|
145
|
+
statusClassVariants.input,
|
|
146
|
+
reverseClassVariants.input,
|
|
147
|
+
una?.input
|
|
148
|
+
)"
|
|
165
149
|
:input
|
|
166
|
-
:resize="type === 'textarea' ? resize :
|
|
167
|
-
:rows="type === 'textarea' ? rows :
|
|
168
|
-
:cols="type === 'textarea' ? cols :
|
|
150
|
+
:resize="type === 'textarea' ? resize : void 0"
|
|
151
|
+
:rows="type === 'textarea' ? rows : void 0"
|
|
152
|
+
:cols="type === 'textarea' ? cols : void 0"
|
|
169
153
|
v-bind="$attrs"
|
|
170
154
|
@input="onInput"
|
|
171
155
|
/>
|
|
@@ -173,35 +157,36 @@ defineExpose({
|
|
|
173
157
|
<div
|
|
174
158
|
v-if="isTrailing"
|
|
175
159
|
:class="cn(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
160
|
+
una?.inputTrailingWrapper,
|
|
161
|
+
reverseClassVariants.trailingWrapper,
|
|
162
|
+
statusClassVariants.text
|
|
163
|
+
)"
|
|
180
164
|
>
|
|
181
165
|
<NIcon
|
|
182
166
|
v-if="loading"
|
|
183
167
|
:name="una?.inputLoadingIcon ?? 'input-loading-icon'"
|
|
184
168
|
:class="cn(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
169
|
+
'input-loading',
|
|
170
|
+
una?.inputLoading
|
|
171
|
+
)"
|
|
188
172
|
/>
|
|
189
173
|
|
|
190
174
|
<NIcon
|
|
191
175
|
v-else-if="status"
|
|
192
176
|
:name="statusClassVariants.icon"
|
|
193
177
|
:class="cn(
|
|
194
|
-
|
|
195
|
-
|
|
178
|
+
'input-status-icon-base',
|
|
179
|
+
una?.inputStatusIconBase
|
|
180
|
+
)"
|
|
196
181
|
/>
|
|
197
182
|
|
|
198
183
|
<slot v-else name="trailing">
|
|
199
184
|
<NIcon
|
|
200
185
|
v-if="trailing"
|
|
201
186
|
:class="cn(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
187
|
+
'input-trailing',
|
|
188
|
+
una?.inputTrailing
|
|
189
|
+
)"
|
|
205
190
|
:name="trailing"
|
|
206
191
|
@click="emit('trailing')"
|
|
207
192
|
/>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { NInputProps } from '../../types/index.js';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
leading?: any;
|
|
4
|
+
trailing?: any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NInputProps, {
|
|
7
|
+
focus: () => void | undefined;
|
|
8
|
+
blur: () => void | undefined;
|
|
9
|
+
select: () => void | undefined;
|
|
10
|
+
inputRef: import("vue").Ref<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
leading: (...args: any[]) => void;
|
|
13
|
+
trailing: (...args: any[]) => void;
|
|
14
|
+
"update:modelValue": (...args: any[]) => void;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<NInputProps> & Readonly<{
|
|
16
|
+
onLeading?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
onTrailing?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
size: string;
|
|
21
|
+
resize: string | null;
|
|
22
|
+
type: HTMLInputElement["type"] | "textarea";
|
|
23
|
+
rows: number;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -1,50 +1,63 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { SliderRange, SliderRoot, SliderThumb, SliderTrack, useForwardPropsEmits } from "reka-ui";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { cn } from "../../utils";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
slider: { type: String, required: false, default: "primary" },
|
|
8
|
+
size: { type: String, required: false },
|
|
9
|
+
una: { type: Object, required: false },
|
|
10
|
+
defaultValue: { type: Array, required: false },
|
|
11
|
+
modelValue: { type: [Array, null], required: false },
|
|
12
|
+
disabled: { type: Boolean, required: false },
|
|
13
|
+
orientation: { type: String, required: false },
|
|
14
|
+
dir: { type: String, required: false },
|
|
15
|
+
inverted: { type: Boolean, required: false },
|
|
16
|
+
min: { type: Number, required: false },
|
|
17
|
+
max: { type: Number, required: false },
|
|
18
|
+
step: { type: Number, required: false },
|
|
19
|
+
minStepsBetweenThumbs: { type: Number, required: false },
|
|
20
|
+
thumbAlignment: { type: String, required: false },
|
|
21
|
+
asChild: { type: Boolean, required: false },
|
|
22
|
+
as: { type: null, required: false },
|
|
23
|
+
name: { type: String, required: false },
|
|
24
|
+
required: { type: Boolean, required: false },
|
|
25
|
+
class: { type: null, required: false }
|
|
26
|
+
});
|
|
27
|
+
const emits = defineEmits(["update:modelValue", "valueCommit"]);
|
|
28
|
+
const rootProps = reactiveOmit(props, ["class", "una", "slider", "una"]);
|
|
29
|
+
const forwarded = useForwardPropsEmits(rootProps, emits);
|
|
30
|
+
const isVertical = computed(() => props.orientation === "vertical");
|
|
19
31
|
</script>
|
|
20
32
|
|
|
21
33
|
<template>
|
|
22
34
|
<SliderRoot
|
|
35
|
+
v-slot="{ modelValue }"
|
|
23
36
|
:class="cn(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
'slider-root',
|
|
38
|
+
isVertical && 'slider-root-vertical',
|
|
39
|
+
props.class,
|
|
40
|
+
props.una?.sliderRoot,
|
|
41
|
+
disabled && 'slider-disabled'
|
|
42
|
+
)"
|
|
30
43
|
v-bind="forwarded"
|
|
31
44
|
:slider="slider"
|
|
32
45
|
>
|
|
33
46
|
<slot name="slider-track">
|
|
34
47
|
<SliderTrack
|
|
35
48
|
:class="cn(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
'slider-track',
|
|
50
|
+
isVertical && 'slider-track-vertical',
|
|
51
|
+
props.una?.sliderTrack
|
|
52
|
+
)"
|
|
40
53
|
>
|
|
41
54
|
<slot name="slider-range">
|
|
42
55
|
<SliderRange
|
|
43
56
|
:class="cn(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
'slider-range',
|
|
58
|
+
isVertical && 'slider-range-vertical',
|
|
59
|
+
props.una?.sliderRange
|
|
60
|
+
)"
|
|
48
61
|
/>
|
|
49
62
|
</slot>
|
|
50
63
|
</SliderTrack>
|
|
@@ -55,10 +68,10 @@ const isVertical = computed(() => props.orientation === 'vertical')
|
|
|
55
68
|
v-for="(_, key) in modelValue"
|
|
56
69
|
:key="key"
|
|
57
70
|
:class="cn(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
'slider-thumb',
|
|
72
|
+
isVertical && 'slider-thumb-vertical',
|
|
73
|
+
props.una?.sliderThumb
|
|
74
|
+
)"
|
|
62
75
|
/>
|
|
63
76
|
</slot>
|
|
64
77
|
</SliderRoot>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NSliderProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_6: {}, __VLS_12: {}, __VLS_18: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
'slider-track'?: (props: typeof __VLS_6) => any;
|
|
5
|
+
} & {
|
|
6
|
+
'slider-range'?: (props: typeof __VLS_12) => any;
|
|
7
|
+
} & {
|
|
8
|
+
'slider-thumb'?: (props: typeof __VLS_18) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<NSliderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (payload: number[] | undefined) => any;
|
|
12
|
+
valueCommit: (payload: number[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<NSliderProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((payload: number[] | undefined) => any) | undefined;
|
|
15
|
+
onValueCommit?: ((payload: number[]) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
slider: string;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
import type { NSwitchProps } from '../../types'
|
|
4
|
-
import { reactivePick } from '@vueuse/core'
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactivePick } from "@vueuse/core";
|
|
5
3
|
import {
|
|
6
4
|
SwitchRoot,
|
|
7
5
|
SwitchThumb,
|
|
8
|
-
useForwardPropsEmits
|
|
9
|
-
} from
|
|
10
|
-
import { cn } from
|
|
11
|
-
import NIcon from
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
useForwardPropsEmits
|
|
7
|
+
} from "reka-ui";
|
|
8
|
+
import { cn } from "../../utils";
|
|
9
|
+
import NIcon from "../elements/Icon.vue";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
loading: { type: Boolean, required: false },
|
|
12
|
+
icon: { type: null, required: false },
|
|
13
|
+
checkedIcon: { type: null, required: false },
|
|
14
|
+
uncheckedIcon: { type: null, required: false },
|
|
15
|
+
size: { type: null, required: false, default: "md" },
|
|
16
|
+
switchChecked: { type: null, required: false, default: "~" },
|
|
17
|
+
switchUnchecked: { type: null, required: false, default: "~" },
|
|
18
|
+
una: { type: Object, required: false },
|
|
19
|
+
defaultValue: { type: Boolean, required: false },
|
|
20
|
+
modelValue: { type: [Boolean, null], required: false },
|
|
21
|
+
disabled: { type: Boolean, required: false },
|
|
22
|
+
id: { type: String, required: false },
|
|
23
|
+
value: { type: String, required: false },
|
|
24
|
+
asChild: { type: Boolean, required: false },
|
|
25
|
+
as: { type: null, required: false },
|
|
26
|
+
name: { type: String, required: false },
|
|
27
|
+
required: { type: Boolean, required: false }
|
|
28
|
+
});
|
|
29
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
30
|
+
const rootPropsEmits = useForwardPropsEmits(reactivePick(props, "as", "asChild", "modelValue", "defaultValue", "disabled", "id", "name", "required", "value"), emit);
|
|
22
31
|
</script>
|
|
23
32
|
|
|
24
33
|
<template>
|
|
@@ -26,12 +35,10 @@ const rootPropsEmits = useForwardPropsEmits(reactivePick(props, 'as', 'asChild',
|
|
|
26
35
|
v-slot="{ modelValue }"
|
|
27
36
|
v-bind="rootPropsEmits"
|
|
28
37
|
:class="cn(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
: una?.switchUnchecked,
|
|
34
|
-
)"
|
|
38
|
+
'peer switch',
|
|
39
|
+
una?.switch,
|
|
40
|
+
modelValue ? una?.switchChecked : una?.switchUnchecked
|
|
41
|
+
)"
|
|
35
42
|
:disabled="disabled || loading"
|
|
36
43
|
:switch-checked
|
|
37
44
|
:switch-unchecked
|
|
@@ -39,34 +46,28 @@ const rootPropsEmits = useForwardPropsEmits(reactivePick(props, 'as', 'asChild',
|
|
|
39
46
|
>
|
|
40
47
|
<SwitchThumb
|
|
41
48
|
:class="cn(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
modelValue
|
|
48
|
-
? una?.switchThumbChecked
|
|
49
|
-
: una?.switchThumbUnchecked,
|
|
50
|
-
)"
|
|
49
|
+
'switch-thumb',
|
|
50
|
+
una?.switchThumb,
|
|
51
|
+
modelValue ? 'switch-thumb-checked' : 'switch-thumb-unchecked',
|
|
52
|
+
modelValue ? una?.switchThumbChecked : una?.switchThumbUnchecked
|
|
53
|
+
)"
|
|
51
54
|
>
|
|
52
55
|
<slot v-if="!loading" name="icon" :model-value>
|
|
53
56
|
<NIcon
|
|
54
57
|
:name="(modelValue ? checkedIcon : uncheckedIcon) || icon"
|
|
55
58
|
:class="cn(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
: ['switch-icon-unchecked', una?.switchIconUnchecked],
|
|
61
|
-
)"
|
|
59
|
+
'switch-icon',
|
|
60
|
+
una?.switchIcon,
|
|
61
|
+
modelValue ? ['switch-icon-checked', una?.switchIconChecked] : ['switch-icon-unchecked', una?.switchIconUnchecked]
|
|
62
|
+
)"
|
|
62
63
|
/>
|
|
63
64
|
</slot>
|
|
64
65
|
<slot v-else name="loading-icon" :model-value>
|
|
65
66
|
<NIcon
|
|
66
67
|
:class="cn(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
'switch-icon switch-loading-icon',
|
|
69
|
+
una?.switchLoading
|
|
70
|
+
)"
|
|
70
71
|
:name="una?.switchLoadingIconName || 'switch-loading-icon-name'"
|
|
71
72
|
/>
|
|
72
73
|
</slot>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NSwitchProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_10: {
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
}, __VLS_15: {
|
|
5
|
+
modelValue: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
icon?: (props: typeof __VLS_10) => any;
|
|
9
|
+
} & {
|
|
10
|
+
'loading-icon'?: (props: typeof __VLS_15) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<NSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (payload: boolean) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<NSwitchProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((payload: boolean) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
size: import("vue").HTMLAttributes["class"];
|
|
18
|
+
switchChecked: import("vue").HTMLAttributes["class"];
|
|
19
|
+
switchUnchecked: import("vue").HTMLAttributes["class"];
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import { Slot } from
|
|
3
|
-
import { useFormField } from
|
|
4
|
-
|
|
5
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Slot } from "reka-ui";
|
|
3
|
+
import { useFormField } from "../../../composables/useFormField";
|
|
4
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
7
|
<template>
|