@geniusdynamics/ns8-ui-lib 1.0.6 → 1.0.8
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/index.d.ts +23 -0
- package/dist/ns8-ui-lib.css +1 -1
- package/dist/ns8-ui-lib.es.js +222 -222
- package/dist/ns8-ui-lib.es.js.map +1 -1
- package/dist/ns8-ui-lib.umd.js +3 -3
- package/dist/ns8-ui-lib.umd.js.map +1 -1
- package/dist/src/components/NS/cards/NSBackupCard.vue.d.ts +51 -0
- package/dist/src/components/NS/cards/NSSystemInfoCard.vue.d.ts +58 -0
- package/dist/src/components/NS/cards/NSSystemdServiceCard.vue.d.ts +47 -0
- package/dist/src/components/NS/cards/index.d.ts +3 -0
- package/dist/src/components/NS/checkbox/NSCheckbox.vue.d.ts +37 -0
- package/dist/src/components/NS/checkbox/index.d.ts +1 -0
- package/dist/src/components/NS/data-table/NSDataTable.vue.d.ts +98 -0
- package/dist/src/components/NS/data-table/index.d.ts +1 -0
- package/dist/src/components/NS/empty-state/NSEmptyState.vue.d.ts +45 -0
- package/dist/src/components/NS/empty-state/index.d.ts +1 -0
- package/dist/src/components/NS/index.d.ts +35 -0
- package/dist/src/components/NS/inline-notification/NSInlineNotification.vue.d.ts +44 -0
- package/dist/src/components/NS/inline-notification/index.d.ts +1 -0
- package/dist/src/components/NS/lottie-animation/index.d.ts +1 -0
- package/dist/src/components/NS/modal/NSModal.vue.d.ts +56 -0
- package/dist/src/components/NS/modal/NSModalTrigger.vue.d.ts +64 -0
- package/dist/src/components/NS/modal/index.d.ts +2 -0
- package/dist/src/components/NS/pagination/NSPagination.vue.d.ts +36 -0
- package/dist/src/components/NS/pagination/index.d.ts +1 -0
- package/dist/src/components/NS/progress/NSProgress.vue.d.ts +37 -0
- package/dist/src/components/NS/progress/NSProgressBar.vue.d.ts +39 -0
- package/dist/src/components/NS/progress/index.d.ts +2 -0
- package/dist/src/components/NS/slider/NSByteSlider.vue.d.ts +50 -0
- package/dist/src/components/NS/slider/NSSlider.vue.d.ts +49 -0
- package/dist/src/components/NS/slider/index.d.ts +2 -0
- package/dist/src/components/NS/tag/NSTag.vue.d.ts +41 -0
- package/dist/src/components/NS/tag/index.d.ts +1 -0
- package/dist/src/components/NS/text-input/NSTextInput.vue.d.ts +67 -0
- package/dist/src/components/NS/text-input/index.d.ts +1 -0
- package/dist/src/components/NS/toast-notification/NSToastNotification.vue.d.ts +44 -0
- package/dist/src/components/NS/toast-notification/index.d.ts +1 -0
- package/dist/src/components/NS/toggle/NSToggle.vue.d.ts +51 -0
- package/dist/src/components/NS/toggle/index.d.ts +1 -0
- package/dist/src/components/NS/wizard/NSWizard.vue.d.ts +86 -0
- package/dist/src/components/NS/wizard/index.d.ts +1 -0
- package/dist/src/composables/index.d.ts +8 -0
- package/dist/src/composables/useDateTimeService.d.ts +10 -0
- package/dist/src/composables/useFilterService.d.ts +8 -0
- package/dist/src/composables/useIconService.d.ts +153 -0
- package/dist/src/composables/usePageTitleService.d.ts +3 -0
- package/dist/src/composables/useQueryParamService.d.ts +13 -0
- package/dist/src/composables/useStorageService.d.ts +5 -0
- package/dist/src/composables/useTaskService.d.ts +18 -0
- package/dist/src/composables/useUtilService.d.ts +27 -0
- package/package.json +2 -2
- package/src/App.vue +3 -4
- package/src/components/HelloWorld.vue +2 -2
- package/src/components/NS/CompleteDemo.vue +49 -49
- package/src/components/NS/Demo.vue +20 -20
- package/src/components/NS/cards/NSBackupCard.vue +41 -41
- package/src/components/NS/cards/NSSystemInfoCard.vue +37 -37
- package/src/components/NS/cards/NSSystemdServiceCard.vue +27 -27
- package/src/components/NS/checkbox/NSCheckbox.vue +4 -4
- package/src/components/NS/data-table/NSDataTable.vue +29 -29
- package/src/components/NS/empty-state/NSEmptyState.vue +3 -3
- package/src/components/NS/inline-notification/NSInlineNotification.vue +9 -9
- package/src/components/NS/lottie-animation/NSLottieAnimation.vue +5 -5
- package/src/components/NS/modal/NSModal.vue +10 -10
- package/src/components/NS/modal/NSModalTrigger.vue +1 -1
- package/src/components/NS/pagination/NSPagination.vue +10 -10
- package/src/components/NS/progress/NSProgress.vue +3 -3
- package/src/components/NS/progress/NSProgressBar.vue +4 -4
- package/src/components/NS/slider/NSByteSlider.vue +3 -3
- package/src/components/NS/slider/NSSlider.vue +2 -2
- package/src/components/NS/tag/NSTag.vue +5 -5
- package/src/components/NS/text-input/NSTextInput.vue +5 -5
- package/src/components/NS/toast-notification/NSToastNotification.vue +7 -7
- package/src/components/NS/toggle/NSToggle.vue +2 -2
- package/src/components/NS/wizard/NSWizard.vue +21 -21
- package/src/components/ui/accordion/AccordionContent.vue +2 -2
- package/src/components/ui/accordion/AccordionItem.vue +1 -1
- package/src/components/ui/accordion/AccordionTrigger.vue +3 -3
- package/src/components/ui/alert/AlertDescription.vue +1 -1
- package/src/components/ui/alert/AlertTitle.vue +1 -1
- package/src/components/ui/alert-dialog/AlertDialogCancel.vue +1 -1
- package/src/components/ui/alert-dialog/AlertDialogContent.vue +2 -2
- package/src/components/ui/alert-dialog/AlertDialogDescription.vue +1 -1
- package/src/components/ui/alert-dialog/AlertDialogFooter.vue +1 -1
- package/src/components/ui/alert-dialog/AlertDialogHeader.vue +1 -1
- package/src/components/ui/alert-dialog/AlertDialogTitle.vue +1 -1
- package/src/components/ui/avatar/Avatar.vue +1 -1
- package/src/components/ui/avatar/AvatarFallback.vue +1 -1
- package/src/components/ui/avatar/AvatarImage.vue +1 -1
- package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +3 -3
- package/src/components/ui/breadcrumb/BreadcrumbItem.vue +1 -1
- package/src/components/ui/breadcrumb/BreadcrumbLink.vue +1 -1
- package/src/components/ui/breadcrumb/BreadcrumbList.vue +1 -1
- package/src/components/ui/breadcrumb/BreadcrumbPage.vue +1 -1
- package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +1 -1
- package/src/components/ui/button-group/ButtonGroupSeparator.vue +1 -1
- package/src/components/ui/button-group/ButtonGroupText.vue +1 -1
- package/src/components/ui/calendar/Calendar.vue +16 -16
- package/src/components/ui/calendar/CalendarCell.vue +1 -1
- package/src/components/ui/calendar/CalendarCellTrigger.vue +6 -6
- package/src/components/ui/calendar/CalendarGrid.vue +1 -1
- package/src/components/ui/calendar/CalendarGridRow.vue +1 -1
- package/src/components/ui/calendar/CalendarHeadCell.vue +1 -1
- package/src/components/ui/calendar/CalendarHeader.vue +1 -1
- package/src/components/ui/calendar/CalendarHeading.vue +1 -1
- package/src/components/ui/calendar/CalendarNextButton.vue +2 -2
- package/src/components/ui/calendar/CalendarPrevButton.vue +2 -2
- package/src/components/ui/card/Card.vue +1 -1
- package/src/components/ui/card/CardAction.vue +1 -1
- package/src/components/ui/card/CardContent.vue +1 -1
- package/src/components/ui/card/CardDescription.vue +1 -1
- package/src/components/ui/card/CardFooter.vue +1 -1
- package/src/components/ui/card/CardHeader.vue +1 -1
- package/src/components/ui/card/CardTitle.vue +1 -1
- package/src/components/ui/carousel/Carousel.vue +1 -1
- package/src/components/ui/carousel/CarouselContent.vue +3 -3
- package/src/components/ui/carousel/CarouselItem.vue +2 -2
- package/src/components/ui/carousel/CarouselNext.vue +4 -4
- package/src/components/ui/carousel/CarouselPrevious.vue +4 -4
- package/src/components/ui/checkbox/Checkbox.vue +3 -3
- package/src/components/ui/combobox/ComboboxAnchor.vue +1 -1
- package/src/components/ui/combobox/ComboboxEmpty.vue +1 -1
- package/src/components/ui/combobox/ComboboxGroup.vue +2 -2
- package/src/components/ui/combobox/ComboboxInput.vue +3 -3
- package/src/components/ui/combobox/ComboboxItem.vue +1 -1
- package/src/components/ui/combobox/ComboboxItemIndicator.vue +1 -1
- package/src/components/ui/combobox/ComboboxList.vue +1 -1
- package/src/components/ui/combobox/ComboboxSeparator.vue +1 -1
- package/src/components/ui/combobox/ComboboxTrigger.vue +1 -1
- package/src/components/ui/combobox/ComboboxViewport.vue +1 -1
- package/src/components/ui/command/Command.vue +1 -1
- package/src/components/ui/command/CommandDialog.vue +2 -2
- package/src/components/ui/command/CommandEmpty.vue +1 -1
- package/src/components/ui/command/CommandGroup.vue +2 -2
- package/src/components/ui/command/CommandInput.vue +3 -3
- package/src/components/ui/command/CommandItem.vue +1 -1
- package/src/components/ui/command/CommandList.vue +1 -1
- package/src/components/ui/command/CommandSeparator.vue +1 -1
- package/src/components/ui/command/CommandShortcut.vue +1 -1
- package/src/components/ui/context-menu/ContextMenuCheckboxItem.vue +3 -3
- package/src/components/ui/context-menu/ContextMenuContent.vue +1 -1
- package/src/components/ui/context-menu/ContextMenuItem.vue +1 -1
- package/src/components/ui/context-menu/ContextMenuLabel.vue +1 -1
- package/src/components/ui/context-menu/ContextMenuRadioItem.vue +3 -3
- package/src/components/ui/context-menu/ContextMenuSeparator.vue +1 -1
- package/src/components/ui/context-menu/ContextMenuShortcut.vue +1 -1
- package/src/components/ui/context-menu/ContextMenuSubContent.vue +1 -1
- package/src/components/ui/context-menu/ContextMenuSubTrigger.vue +2 -2
- package/src/components/ui/dialog/DialogContent.vue +18 -27
- package/src/components/ui/dialog/DialogDescription.vue +1 -1
- package/src/components/ui/dialog/DialogFooter.vue +1 -1
- package/src/components/ui/dialog/DialogHeader.vue +1 -1
- package/src/components/ui/dialog/DialogOverlay.vue +1 -1
- package/src/components/ui/dialog/DialogScrollContent.vue +5 -5
- package/src/components/ui/dialog/DialogTitle.vue +1 -1
- package/src/components/ui/drawer/DrawerContent.vue +6 -6
- package/src/components/ui/drawer/DrawerDescription.vue +1 -1
- package/src/components/ui/drawer/DrawerFooter.vue +1 -1
- package/src/components/ui/drawer/DrawerHeader.vue +1 -1
- package/src/components/ui/drawer/DrawerOverlay.vue +1 -1
- package/src/components/ui/drawer/DrawerTitle.vue +1 -1
- package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +3 -3
- package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +1 -1
- package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +1 -1
- package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +3 -3
- package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +1 -1
- package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +1 -1
- package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +1 -1
- package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +2 -2
- package/src/components/ui/empty/Empty.vue +1 -1
- package/src/components/ui/empty/EmptyContent.vue +1 -1
- package/src/components/ui/empty/EmptyDescription.vue +2 -2
- package/src/components/ui/empty/EmptyHeader.vue +1 -1
- package/src/components/ui/empty/EmptyTitle.vue +1 -1
- package/src/components/ui/field/FieldContent.vue +1 -1
- package/src/components/ui/field/FieldDescription.vue +3 -3
- package/src/components/ui/field/FieldError.vue +2 -2
- package/src/components/ui/field/FieldGroup.vue +1 -1
- package/src/components/ui/field/FieldLabel.vue +3 -3
- package/src/components/ui/field/FieldLegend.vue +3 -3
- package/src/components/ui/field/FieldSeparator.vue +3 -3
- package/src/components/ui/field/FieldSet.vue +2 -2
- package/src/components/ui/field/FieldTitle.vue +1 -1
- package/src/components/ui/form/FormDescription.vue +1 -1
- package/src/components/ui/form/FormItem.vue +1 -1
- package/src/components/ui/form/FormLabel.vue +1 -1
- package/src/components/ui/form/FormMessage.vue +1 -1
- package/src/components/ui/hover-card/HoverCardContent.vue +1 -1
- package/src/components/ui/input/Input.vue +3 -3
- package/src/components/ui/input-group/InputGroup.vue +8 -8
- package/src/components/ui/input-group/InputGroupInput.vue +1 -1
- package/src/components/ui/input-group/InputGroupText.vue +1 -1
- package/src/components/ui/input-group/InputGroupTextarea.vue +1 -1
- package/src/components/ui/input-otp/InputOTP.vue +1 -1
- package/src/components/ui/input-otp/InputOTPGroup.vue +1 -1
- package/src/components/ui/input-otp/InputOTPSlot.vue +3 -3
- package/src/components/ui/item/ItemActions.vue +1 -1
- package/src/components/ui/item/ItemContent.vue +1 -1
- package/src/components/ui/item/ItemDescription.vue +2 -2
- package/src/components/ui/item/ItemFooter.vue +1 -1
- package/src/components/ui/item/ItemGroup.vue +1 -1
- package/src/components/ui/item/ItemHeader.vue +1 -1
- package/src/components/ui/item/ItemSeparator.vue +1 -1
- package/src/components/ui/item/ItemTitle.vue +1 -1
- package/src/components/ui/kbd/Kbd.vue +3 -3
- package/src/components/ui/kbd/KbdGroup.vue +1 -1
- package/src/components/ui/label/Label.vue +1 -1
- package/src/components/ui/menubar/Menubar.vue +1 -1
- package/src/components/ui/menubar/MenubarCheckboxItem.vue +3 -3
- package/src/components/ui/menubar/MenubarContent.vue +1 -1
- package/src/components/ui/menubar/MenubarItem.vue +1 -1
- package/src/components/ui/menubar/MenubarLabel.vue +1 -1
- package/src/components/ui/menubar/MenubarRadioItem.vue +3 -3
- package/src/components/ui/menubar/MenubarSeparator.vue +1 -1
- package/src/components/ui/menubar/MenubarShortcut.vue +1 -1
- package/src/components/ui/menubar/MenubarSubContent.vue +1 -1
- package/src/components/ui/menubar/MenubarSubTrigger.vue +2 -2
- package/src/components/ui/menubar/MenubarTrigger.vue +1 -1
- package/src/components/ui/native-select/NativeSelect.vue +5 -5
- package/src/components/ui/native-select/NativeSelectOptGroup.vue +1 -1
- package/src/components/ui/native-select/NativeSelectOption.vue +1 -1
- package/src/components/ui/navigation-menu/NavigationMenu.vue +1 -1
- package/src/components/ui/navigation-menu/NavigationMenuContent.vue +2 -2
- package/src/components/ui/navigation-menu/NavigationMenuIndicator.vue +2 -2
- package/src/components/ui/navigation-menu/NavigationMenuItem.vue +1 -1
- package/src/components/ui/navigation-menu/NavigationMenuLink.vue +1 -1
- package/src/components/ui/navigation-menu/NavigationMenuList.vue +1 -1
- package/src/components/ui/navigation-menu/NavigationMenuTrigger.vue +2 -2
- package/src/components/ui/navigation-menu/NavigationMenuViewport.vue +2 -2
- package/src/components/ui/number-field/NumberField.vue +1 -1
- package/src/components/ui/number-field/NumberFieldContent.vue +1 -1
- package/src/components/ui/number-field/NumberFieldDecrement.vue +2 -2
- package/src/components/ui/number-field/NumberFieldIncrement.vue +2 -2
- package/src/components/ui/number-field/NumberFieldInput.vue +1 -1
- package/src/components/ui/pagination/Pagination.vue +1 -1
- package/src/components/ui/pagination/PaginationContent.vue +1 -1
- package/src/components/ui/pagination/PaginationEllipsis.vue +3 -3
- package/src/components/ui/pagination/PaginationFirst.vue +2 -2
- package/src/components/ui/pagination/PaginationLast.vue +2 -2
- package/src/components/ui/pagination/PaginationNext.vue +2 -2
- package/src/components/ui/pagination/PaginationPrevious.vue +2 -2
- package/src/components/ui/pin-input/PinInput.vue +1 -1
- package/src/components/ui/pin-input/PinInputGroup.vue +1 -1
- package/src/components/ui/pin-input/PinInputSlot.vue +1 -1
- package/src/components/ui/popover/PopoverContent.vue +1 -1
- package/src/components/ui/progress/Progress.vue +12 -9
- package/src/components/ui/radio-group/RadioGroup.vue +1 -1
- package/src/components/ui/radio-group/RadioGroupItem.vue +16 -16
- package/src/components/ui/range-calendar/RangeCalendar.vue +4 -4
- package/src/components/ui/range-calendar/RangeCalendarCell.vue +1 -1
- package/src/components/ui/range-calendar/RangeCalendarCellTrigger.vue +7 -7
- package/src/components/ui/range-calendar/RangeCalendarGrid.vue +1 -1
- package/src/components/ui/range-calendar/RangeCalendarGridRow.vue +1 -1
- package/src/components/ui/range-calendar/RangeCalendarHeadCell.vue +1 -1
- package/src/components/ui/range-calendar/RangeCalendarHeader.vue +1 -1
- package/src/components/ui/range-calendar/RangeCalendarHeading.vue +1 -1
- package/src/components/ui/range-calendar/RangeCalendarNextButton.vue +3 -3
- package/src/components/ui/range-calendar/RangeCalendarPrevButton.vue +3 -3
- package/src/components/ui/resizable/ResizableHandle.vue +3 -3
- package/src/components/ui/resizable/ResizablePanelGroup.vue +1 -1
- package/src/components/ui/scroll-area/ScrollArea.vue +2 -2
- package/src/components/ui/scroll-area/ScrollBar.vue +16 -22
- package/src/components/ui/select/SelectContent.vue +18 -27
- package/src/components/ui/select/SelectItem.vue +3 -3
- package/src/components/ui/select/SelectLabel.vue +1 -1
- package/src/components/ui/select/SelectScrollDownButton.vue +2 -2
- package/src/components/ui/select/SelectScrollUpButton.vue +2 -2
- package/src/components/ui/select/SelectSeparator.vue +1 -1
- package/src/components/ui/select/SelectTrigger.vue +2 -2
- package/src/components/ui/separator/Separator.vue +1 -1
- package/src/components/ui/sheet/SheetContent.vue +28 -31
- package/src/components/ui/sheet/SheetDescription.vue +1 -1
- package/src/components/ui/sheet/SheetFooter.vue +1 -1
- package/src/components/ui/sheet/SheetHeader.vue +1 -1
- package/src/components/ui/sheet/SheetOverlay.vue +1 -1
- package/src/components/ui/sheet/SheetTitle.vue +1 -1
- package/src/components/ui/sidebar/Sidebar.vue +16 -16
- package/src/components/ui/sidebar/SidebarContent.vue +1 -1
- package/src/components/ui/sidebar/SidebarFooter.vue +1 -1
- package/src/components/ui/sidebar/SidebarGroup.vue +1 -1
- package/src/components/ui/sidebar/SidebarGroupAction.vue +3 -3
- package/src/components/ui/sidebar/SidebarGroupContent.vue +1 -1
- package/src/components/ui/sidebar/SidebarGroupLabel.vue +2 -2
- package/src/components/ui/sidebar/SidebarHeader.vue +1 -1
- package/src/components/ui/sidebar/SidebarInput.vue +1 -1
- package/src/components/ui/sidebar/SidebarInset.vue +2 -2
- package/src/components/ui/sidebar/SidebarMenu.vue +1 -1
- package/src/components/ui/sidebar/SidebarMenuAction.vue +7 -7
- package/src/components/ui/sidebar/SidebarMenuBadge.vue +6 -6
- package/src/components/ui/sidebar/SidebarMenuItem.vue +1 -1
- package/src/components/ui/sidebar/SidebarMenuSkeleton.vue +3 -3
- package/src/components/ui/sidebar/SidebarMenuSub.vue +2 -2
- package/src/components/ui/sidebar/SidebarMenuSubButton.vue +5 -5
- package/src/components/ui/sidebar/SidebarMenuSubItem.vue +1 -1
- package/src/components/ui/sidebar/SidebarProvider.vue +1 -1
- package/src/components/ui/sidebar/SidebarRail.vue +6 -6
- package/src/components/ui/sidebar/SidebarSeparator.vue +1 -1
- package/src/components/ui/sidebar/SidebarTrigger.vue +2 -2
- package/src/components/ui/skeleton/Skeleton.vue +1 -1
- package/src/components/ui/slider/Slider.vue +4 -4
- package/src/components/ui/sonner/Sonner.vue +7 -7
- package/src/components/ui/spinner/Spinner.vue +1 -1
- package/src/components/ui/stepper/Stepper.vue +1 -1
- package/src/components/ui/stepper/StepperDescription.vue +1 -1
- package/src/components/ui/stepper/StepperIndicator.vue +4 -4
- package/src/components/ui/stepper/StepperItem.vue +1 -1
- package/src/components/ui/stepper/StepperSeparator.vue +3 -3
- package/src/components/ui/stepper/StepperTitle.vue +1 -1
- package/src/components/ui/stepper/StepperTrigger.vue +1 -1
- package/src/components/ui/switch/Switch.vue +2 -2
- package/src/components/ui/table/Table.vue +6 -12
- package/src/components/ui/table/TableBody.vue +1 -1
- package/src/components/ui/table/TableCaption.vue +1 -1
- package/src/components/ui/table/TableCell.vue +1 -1
- package/src/components/ui/table/TableEmpty.vue +14 -17
- package/src/components/ui/table/TableFooter.vue +1 -1
- package/src/components/ui/table/TableHead.vue +1 -1
- package/src/components/ui/table/TableHeader.vue +1 -1
- package/src/components/ui/table/TableRow.vue +1 -1
- package/src/components/ui/tabs/Tabs.vue +1 -1
- package/src/components/ui/tabs/TabsContent.vue +1 -1
- package/src/components/ui/tabs/TabsList.vue +1 -1
- package/src/components/ui/tabs/TabsTrigger.vue +1 -1
- package/src/components/ui/tags-input/TagsInput.vue +3 -3
- package/src/components/ui/tags-input/TagsInputInput.vue +1 -1
- package/src/components/ui/tags-input/TagsInputItem.vue +1 -1
- package/src/components/ui/tags-input/TagsInputItemDelete.vue +2 -2
- package/src/components/ui/tags-input/TagsInputItemText.vue +1 -1
- package/src/components/ui/textarea/Textarea.vue +1 -1
- package/src/components/ui/toggle-group/ToggleGroup.vue +1 -1
- package/src/components/ui/toggle-group/ToggleGroupItem.vue +2 -2
- package/src/components/ui/tooltip/TooltipContent.vue +2 -2
- package/src/components/ui/checkbox/NsCheckbox.vue +0 -123
- package/src/components/ui/empty-state/NsEmptyState.vue +0 -149
- package/src/components/ui/inline-notification/NsInlineNotification.vue +0 -163
- package/src/components/ui/tag/NsTag.vue +0 -114
- package/src/components/ui/text-input/NsTextInput.vue +0 -269
- package/src/components/ui/toggle/NsToggle.vue +0 -126
|
@@ -24,11 +24,11 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
|
24
24
|
<TooltipContent
|
|
25
25
|
data-slot="tooltip-content"
|
|
26
26
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
27
|
-
:class="cn('
|
|
27
|
+
:class="cn('bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance', props.class)"
|
|
28
28
|
>
|
|
29
29
|
<slot />
|
|
30
30
|
|
|
31
|
-
<TooltipArrow class="
|
|
31
|
+
<TooltipArrow class="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
32
32
|
</TooltipContent>
|
|
33
33
|
</TooltipPortal>
|
|
34
34
|
</template>
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, useId } from 'vue'
|
|
3
|
-
import { CheckboxRoot, CheckboxIndicator } from 'reka-ui'
|
|
4
|
-
import { Check } from 'lucide-vue-next'
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
import { checkboxVariants, labelVariants, type CheckboxVariants, type LabelVariants } from '.'
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
modelValue?: boolean
|
|
10
|
-
checked?: boolean
|
|
11
|
-
defaultChecked?: boolean
|
|
12
|
-
disabled?: boolean
|
|
13
|
-
required?: boolean
|
|
14
|
-
name?: string
|
|
15
|
-
value?: string
|
|
16
|
-
id?: string
|
|
17
|
-
label?: string
|
|
18
|
-
hideLabel?: boolean
|
|
19
|
-
description?: string
|
|
20
|
-
errorMessage?: string
|
|
21
|
-
variant?: CheckboxVariants['variant']
|
|
22
|
-
size?: CheckboxVariants['size']
|
|
23
|
-
labelVariant?: LabelVariants['variant']
|
|
24
|
-
class?: string
|
|
25
|
-
labelClass?: string
|
|
26
|
-
indeterminate?: boolean
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
30
|
-
variant: 'default',
|
|
31
|
-
size: 'default',
|
|
32
|
-
labelVariant: 'default',
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
const emit = defineEmits<{
|
|
36
|
-
'update:modelValue': [value: boolean]
|
|
37
|
-
'update:checked': [value: boolean]
|
|
38
|
-
}>()
|
|
39
|
-
|
|
40
|
-
const uniqueId = useId()
|
|
41
|
-
const checkboxId = props.id || uniqueId
|
|
42
|
-
|
|
43
|
-
const isChecked = computed({
|
|
44
|
-
get: () => props.modelValue ?? props.checked ?? false,
|
|
45
|
-
set: (value: boolean) => {
|
|
46
|
-
emit('update:modelValue', value)
|
|
47
|
-
emit('update:checked', value)
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<template>
|
|
53
|
-
<div :class="cn('flex items-start space-x-2', props.class)">
|
|
54
|
-
<CheckboxRoot
|
|
55
|
-
:id="checkboxId"
|
|
56
|
-
v-model:checked="isChecked"
|
|
57
|
-
:default-checked="defaultChecked"
|
|
58
|
-
:disabled="disabled"
|
|
59
|
-
:required="required"
|
|
60
|
-
:name="name"
|
|
61
|
-
:value="value"
|
|
62
|
-
:class="cn(checkboxVariants({ variant, size }))"
|
|
63
|
-
:data-indeterminate="indeterminate"
|
|
64
|
-
>
|
|
65
|
-
<CheckboxIndicator
|
|
66
|
-
:class="cn('flex items-center justify-center text-current', {
|
|
67
|
-
'opacity-50': indeterminate
|
|
68
|
-
})"
|
|
69
|
-
>
|
|
70
|
-
<Check
|
|
71
|
-
v-if="!indeterminate"
|
|
72
|
-
:class="cn('h-4 w-4', {
|
|
73
|
-
'h-3.5 w-3.5': size === 'sm',
|
|
74
|
-
'h-5 w-5': size === 'lg'
|
|
75
|
-
})"
|
|
76
|
-
/>
|
|
77
|
-
<div
|
|
78
|
-
v-else
|
|
79
|
-
:class="cn('h-1 w-2 bg-current rounded-sm', {
|
|
80
|
-
'h-0.5 w-1.5': size === 'sm',
|
|
81
|
-
'h-1.5 w-2.5': size === 'lg'
|
|
82
|
-
})"
|
|
83
|
-
/>
|
|
84
|
-
</CheckboxIndicator>
|
|
85
|
-
</CheckboxRoot>
|
|
86
|
-
|
|
87
|
-
<div class="grid gap-1.5">
|
|
88
|
-
<label
|
|
89
|
-
v-if="label || $slots.label"
|
|
90
|
-
:for="checkboxId"
|
|
91
|
-
:class="cn(
|
|
92
|
-
labelVariants({ variant: labelVariant }),
|
|
93
|
-
'cursor-pointer',
|
|
94
|
-
{
|
|
95
|
-
'sr-only': hideLabel,
|
|
96
|
-
'cursor-not-allowed': disabled
|
|
97
|
-
},
|
|
98
|
-
labelClass
|
|
99
|
-
)"
|
|
100
|
-
>
|
|
101
|
-
<slot name="label">{{ label }}</slot>
|
|
102
|
-
</label>
|
|
103
|
-
|
|
104
|
-
<p
|
|
105
|
-
v-if="description"
|
|
106
|
-
:class="cn('text-sm text-muted-foreground', {
|
|
107
|
-
'text-destructive': errorMessage
|
|
108
|
-
})"
|
|
109
|
-
>
|
|
110
|
-
{{ description }}
|
|
111
|
-
</p>
|
|
112
|
-
|
|
113
|
-
<p
|
|
114
|
-
v-if="errorMessage"
|
|
115
|
-
class="text-sm text-destructive"
|
|
116
|
-
>
|
|
117
|
-
{{ errorMessage }}
|
|
118
|
-
</p>
|
|
119
|
-
|
|
120
|
-
<slot name="extra" />
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</template>
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import { FileX, Search, InBox, AlertCircle, Info } from 'lucide-vue-next'
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
|
-
import { emptyStateVariants, iconVariants, type EmptyStateVariants } from '.'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
title?: string
|
|
9
|
-
description?: string
|
|
10
|
-
icon?: string | object // Lucide icon name or component
|
|
11
|
-
animationData?: any
|
|
12
|
-
animationTitle?: string
|
|
13
|
-
size?: EmptyStateVariants['size']
|
|
14
|
-
variant?: EmptyStateVariants['variant']
|
|
15
|
-
loop?: boolean | number
|
|
16
|
-
animateOnHover?: boolean
|
|
17
|
-
autoPlay?: boolean
|
|
18
|
-
class?: string
|
|
19
|
-
iconClass?: string
|
|
20
|
-
titleClass?: string
|
|
21
|
-
descriptionClass?: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
25
|
-
title: 'No data available',
|
|
26
|
-
size: 'default',
|
|
27
|
-
variant: 'default',
|
|
28
|
-
loop: true,
|
|
29
|
-
animateOnHover: false,
|
|
30
|
-
autoPlay: true,
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const DefaultIcon = computed(() => {
|
|
34
|
-
if (props.icon) {
|
|
35
|
-
return null // Use custom icon
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Choose appropriate default icon based on title content
|
|
39
|
-
const title = props.title?.toLowerCase() || ''
|
|
40
|
-
|
|
41
|
-
if (title.includes('search') || title.includes('find') || title.includes('result')) {
|
|
42
|
-
return Search
|
|
43
|
-
} else if (title.includes('empty') || title.includes('no') || title.includes('data')) {
|
|
44
|
-
return FileX
|
|
45
|
-
} else if (title.includes('message') || title.includes('notification') || title.includes('alert')) {
|
|
46
|
-
return InBox
|
|
47
|
-
} else if (title.includes('error') || title.includes('warning')) {
|
|
48
|
-
return AlertCircle
|
|
49
|
-
} else {
|
|
50
|
-
return Info
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
const iconComponent = computed(() => {
|
|
55
|
-
if (typeof props.icon === 'object') {
|
|
56
|
-
return props.icon // Vue component
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (typeof props.icon === 'string') {
|
|
60
|
-
// Map string to Lucide icons
|
|
61
|
-
const iconMap: Record<string, any> = {
|
|
62
|
-
'file-x': FileX,
|
|
63
|
-
'search': Search,
|
|
64
|
-
'inbox': InBox,
|
|
65
|
-
'alert-circle': AlertCircle,
|
|
66
|
-
'info': Info,
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return iconMap[props.icon] || DefaultIcon.value
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return DefaultIcon.value
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
const hasIconSlot = computed(() => !!$slots.icon)
|
|
76
|
-
const hasDescriptionSlot = computed(() => !!$slots.description)
|
|
77
|
-
const hasActionsSlot = computed(() => !!$slots.actions)
|
|
78
|
-
</script>
|
|
79
|
-
|
|
80
|
-
<template>
|
|
81
|
-
<div :class="cn(emptyStateVariants({ size, variant }), props.class)">
|
|
82
|
-
<!-- Icon section -->
|
|
83
|
-
<div class="mb-4">
|
|
84
|
-
<slot name="icon">
|
|
85
|
-
<!-- Lottie animation if provided -->
|
|
86
|
-
<div
|
|
87
|
-
v-if="animationData"
|
|
88
|
-
:class="cn(iconVariants({ size }))"
|
|
89
|
-
:title="animationTitle || title"
|
|
90
|
-
>
|
|
91
|
-
<!-- You can integrate a Lottie component here -->
|
|
92
|
-
<component
|
|
93
|
-
:is="iconComponent"
|
|
94
|
-
:class="cn(iconVariants({ size }), props.iconClass)"
|
|
95
|
-
/>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<!-- Custom icon or default Lucide icon -->
|
|
99
|
-
<component
|
|
100
|
-
v-else-if="iconComponent && !hasIconSlot"
|
|
101
|
-
:is="iconComponent"
|
|
102
|
-
:class="cn(iconVariants({ size }), props.iconClass)"
|
|
103
|
-
/>
|
|
104
|
-
</slot>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<!-- Title section -->
|
|
108
|
-
<h3
|
|
109
|
-
v-if="title || $slots.title"
|
|
110
|
-
:class="cn(
|
|
111
|
-
'text-lg font-semibold mb-2',
|
|
112
|
-
{
|
|
113
|
-
'text-foreground': variant === 'default',
|
|
114
|
-
'text-muted-foreground': variant === 'muted'
|
|
115
|
-
},
|
|
116
|
-
titleClass
|
|
117
|
-
)"
|
|
118
|
-
>
|
|
119
|
-
<slot name="title">{{ title }}</slot>
|
|
120
|
-
</h3>
|
|
121
|
-
|
|
122
|
-
<!-- Description section -->
|
|
123
|
-
<div
|
|
124
|
-
v-if="hasDescriptionSlot || description"
|
|
125
|
-
:class="cn(
|
|
126
|
-
'text-sm max-w-md mb-6',
|
|
127
|
-
{
|
|
128
|
-
'text-muted-foreground': variant === 'default',
|
|
129
|
-
'text-muted-foreground/70': variant === 'muted'
|
|
130
|
-
},
|
|
131
|
-
descriptionClass
|
|
132
|
-
)"
|
|
133
|
-
>
|
|
134
|
-
<slot name="description">
|
|
135
|
-
<p>{{ description }}</p>
|
|
136
|
-
</slot>
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
<!-- Actions section -->
|
|
140
|
-
<div v-if="hasActionsSlot" class="mt-4">
|
|
141
|
-
<slot name="actions" />
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<!-- Extra content section -->
|
|
145
|
-
<div v-if="$slots.extra" class="mt-6">
|
|
146
|
-
<slot name="extra" />
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</template>
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import { X, AlertCircle, AlertTriangle, CheckCircle, Info, Loader2 } from 'lucide-vue-next'
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
|
-
import { inlineNotificationVariants, type InlineNotificationVariants } from '.'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
title?: string
|
|
9
|
-
description?: string
|
|
10
|
-
variant?: InlineNotificationVariants['variant']
|
|
11
|
-
showCloseButton?: boolean
|
|
12
|
-
actionLabel?: string
|
|
13
|
-
closeAriaLabel?: string
|
|
14
|
-
loading?: boolean
|
|
15
|
-
timer?: number
|
|
16
|
-
lowContrast?: boolean
|
|
17
|
-
class?: string
|
|
18
|
-
icon?: object // Custom icon component
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
22
|
-
variant: 'info',
|
|
23
|
-
showCloseButton: false,
|
|
24
|
-
closeAriaLabel: 'Dismiss notification',
|
|
25
|
-
loading: false,
|
|
26
|
-
lowContrast: false,
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits<{
|
|
30
|
-
close: []
|
|
31
|
-
action: []
|
|
32
|
-
}>()
|
|
33
|
-
|
|
34
|
-
const NotificationIcon = computed(() => {
|
|
35
|
-
if (props.icon) {
|
|
36
|
-
return props.icon
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
switch (props.variant) {
|
|
40
|
-
case 'destructive':
|
|
41
|
-
return AlertCircle
|
|
42
|
-
case 'warning':
|
|
43
|
-
return AlertTriangle
|
|
44
|
-
case 'success':
|
|
45
|
-
return CheckCircle
|
|
46
|
-
case 'info':
|
|
47
|
-
default:
|
|
48
|
-
return Info
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
const variantToKind = {
|
|
53
|
-
destructive: 'error',
|
|
54
|
-
warning: 'warning',
|
|
55
|
-
success: 'success',
|
|
56
|
-
info: 'info',
|
|
57
|
-
default: 'info'
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const kind = computed(() => variantToKind[props.variant])
|
|
61
|
-
|
|
62
|
-
const hasTitle = computed(() => props.title || $slots.title)
|
|
63
|
-
const hasDescription = computed(() => props.description || $slots.description)
|
|
64
|
-
const hasAction = computed(() => props.actionLabel)
|
|
65
|
-
const hasTimer = computed(() => props.timer)
|
|
66
|
-
const hasLoading = computed(() => props.loading)
|
|
67
|
-
|
|
68
|
-
const showCloseButtonVisible = computed(() => props.showCloseButton && !hasLoading.value)
|
|
69
|
-
|
|
70
|
-
const role = computed(() => {
|
|
71
|
-
if (props.variant === 'destructive' || props.variant === 'warning') {
|
|
72
|
-
return 'alert'
|
|
73
|
-
}
|
|
74
|
-
return 'status'
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
const ariaLive = computed(() => {
|
|
78
|
-
if (props.variant === 'destructive') {
|
|
79
|
-
return 'assertive'
|
|
80
|
-
}
|
|
81
|
-
return 'polite'
|
|
82
|
-
})
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<template>
|
|
86
|
-
<div
|
|
87
|
-
:class="cn(
|
|
88
|
-
inlineNotificationVariants({ variant }),
|
|
89
|
-
{
|
|
90
|
-
'opacity-75': lowContrast
|
|
91
|
-
},
|
|
92
|
-
props.class
|
|
93
|
-
)"
|
|
94
|
-
:role="role"
|
|
95
|
-
:aria-live="ariaLive"
|
|
96
|
-
>
|
|
97
|
-
<!-- Icon -->
|
|
98
|
-
<component
|
|
99
|
-
:is="NotificationIcon"
|
|
100
|
-
class="h-4 w-4"
|
|
101
|
-
/>
|
|
102
|
-
|
|
103
|
-
<!-- Loading spinner -->
|
|
104
|
-
<Loader2
|
|
105
|
-
v-if="loading"
|
|
106
|
-
class="h-4 w-4 animate-spin absolute right-12 top-4"
|
|
107
|
-
/>
|
|
108
|
-
|
|
109
|
-
<!-- Timer circle -->
|
|
110
|
-
<div
|
|
111
|
-
v-if="timer"
|
|
112
|
-
class="h-4 w-4 absolute right-12 top-4"
|
|
113
|
-
>
|
|
114
|
-
<!-- You can integrate NsCircleTimer component here -->
|
|
115
|
-
<div class="h-4 w-4 rounded-full border-2 border-current animate-pulse" />
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
<!-- Content -->
|
|
119
|
-
<div class="grid gap-1">
|
|
120
|
-
<!-- Title -->
|
|
121
|
-
<h4
|
|
122
|
-
v-if="hasTitle"
|
|
123
|
-
class="text-sm font-medium leading-none"
|
|
124
|
-
>
|
|
125
|
-
<slot name="title">{{ title }}</slot>
|
|
126
|
-
</h4>
|
|
127
|
-
|
|
128
|
-
<!-- Description -->
|
|
129
|
-
<p
|
|
130
|
-
v-if="hasDescription"
|
|
131
|
-
:class="cn('text-sm opacity-90', {
|
|
132
|
-
'mr-12': hasAction || showCloseButtonVisible || hasTimer || hasLoading
|
|
133
|
-
})"
|
|
134
|
-
>
|
|
135
|
-
<slot name="description">{{ description }}</slot>
|
|
136
|
-
</p>
|
|
137
|
-
|
|
138
|
-
<!-- Action button -->
|
|
139
|
-
<button
|
|
140
|
-
v-if="hasAction"
|
|
141
|
-
type="button"
|
|
142
|
-
class="inline-flex items-center text-sm font-medium underline underline-offset-2 hover:no-underline focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 rounded-sm"
|
|
143
|
-
@click="emit('action')"
|
|
144
|
-
>
|
|
145
|
-
{{ actionLabel }}
|
|
146
|
-
</button>
|
|
147
|
-
</div>
|
|
148
|
-
|
|
149
|
-
<!-- Close button -->
|
|
150
|
-
<button
|
|
151
|
-
v-if="showCloseButtonVisible"
|
|
152
|
-
type="button"
|
|
153
|
-
:aria-label="closeAriaLabel"
|
|
154
|
-
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none"
|
|
155
|
-
@click="emit('close')"
|
|
156
|
-
>
|
|
157
|
-
<X class="h-4 w-4" />
|
|
158
|
-
</button>
|
|
159
|
-
|
|
160
|
-
<!-- Extra content -->
|
|
161
|
-
<slot name="extra" />
|
|
162
|
-
</div>
|
|
163
|
-
</template>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import { X } from 'lucide-vue-next'
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
|
-
import { tagVariants, type TagVariants } from '.'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
label?: string
|
|
9
|
-
variant?: TagVariants['variant']
|
|
10
|
-
size?: TagVariants['size']
|
|
11
|
-
interactive?: boolean
|
|
12
|
-
removable?: boolean
|
|
13
|
-
disabled?: boolean
|
|
14
|
-
icon?: string // SVG icon string or component
|
|
15
|
-
clearAriaLabel?: string
|
|
16
|
-
title?: string
|
|
17
|
-
class?: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
-
variant: 'default',
|
|
22
|
-
size: 'default',
|
|
23
|
-
interactive: false,
|
|
24
|
-
removable: false,
|
|
25
|
-
clearAriaLabel: 'Remove tag',
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const emit = defineEmits<{
|
|
29
|
-
remove: []
|
|
30
|
-
click: [event: Event]
|
|
31
|
-
}>()
|
|
32
|
-
|
|
33
|
-
const isClickable = computed(() => props.interactive && !props.disabled)
|
|
34
|
-
const isFilter = computed(() => props.removable)
|
|
35
|
-
|
|
36
|
-
const handleClick = (event: Event) => {
|
|
37
|
-
if (isClickable.value) {
|
|
38
|
-
emit('click', event)
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const handleRemove = (event: Event) => {
|
|
43
|
-
event.stopPropagation()
|
|
44
|
-
if (!props.disabled) {
|
|
45
|
-
emit('remove')
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const handleKeydown = (event: KeyboardEvent) => {
|
|
50
|
-
if (isFilter.value && (event.key === 'Enter' || event.key === ' ')) {
|
|
51
|
-
event.preventDefault()
|
|
52
|
-
handleRemove(event)
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<template>
|
|
58
|
-
<component
|
|
59
|
-
:is="isClickable ? 'button' : 'div'"
|
|
60
|
-
:class="cn(
|
|
61
|
-
tagVariants({ variant, size, interactive }),
|
|
62
|
-
{
|
|
63
|
-
'opacity-50 cursor-not-allowed': disabled,
|
|
64
|
-
'cursor-default': isFilter && !interactive,
|
|
65
|
-
},
|
|
66
|
-
props.class
|
|
67
|
-
)"
|
|
68
|
-
:disabled="disabled"
|
|
69
|
-
:title="title || label"
|
|
70
|
-
@click="handleClick"
|
|
71
|
-
@keydown="handleKeydown"
|
|
72
|
-
:aria-label="label"
|
|
73
|
-
role="button"
|
|
74
|
-
tabindex="0"
|
|
75
|
-
>
|
|
76
|
-
<!-- Icon slot/component -->
|
|
77
|
-
<div v-if="icon && !isFilter" class="flex items-center justify-center">
|
|
78
|
-
<component
|
|
79
|
-
v-if="typeof icon === 'object'"
|
|
80
|
-
:is="icon"
|
|
81
|
-
class="h-3 w-3"
|
|
82
|
-
/>
|
|
83
|
-
<div
|
|
84
|
-
v-else-if="typeof icon === 'string'"
|
|
85
|
-
v-html="icon"
|
|
86
|
-
class="h-3 w-3"
|
|
87
|
-
/>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<!-- Label content -->
|
|
91
|
-
<span class="truncate max-w-[200px]">
|
|
92
|
-
<slot>{{ label }}</slot>
|
|
93
|
-
</span>
|
|
94
|
-
|
|
95
|
-
<!-- Remove button for filter tags -->
|
|
96
|
-
<button
|
|
97
|
-
v-if="isFilter"
|
|
98
|
-
type="button"
|
|
99
|
-
:class="cn(
|
|
100
|
-
'flex items-center justify-center rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-colors',
|
|
101
|
-
'ml-1 -mr-1 h-4 w-4 p-0',
|
|
102
|
-
{
|
|
103
|
-
'opacity-50 cursor-not-allowed': disabled,
|
|
104
|
-
}
|
|
105
|
-
)"
|
|
106
|
-
:disabled="disabled"
|
|
107
|
-
:aria-label="clearAriaLabel"
|
|
108
|
-
:title="clearAriaLabel"
|
|
109
|
-
@click="handleRemove"
|
|
110
|
-
>
|
|
111
|
-
<X class="h-3 w-3" />
|
|
112
|
-
</button>
|
|
113
|
-
</component>
|
|
114
|
-
</template>
|