@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
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref, useId, nextTick } from 'vue'
|
|
3
|
-
import { Eye, EyeOff, AlertCircle, AlertTriangle, CheckCircle } from 'lucide-vue-next'
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
|
-
import { textInputVariants, labelVariants, helperTextVariants, type TextInputVariants, type LabelVariants, type HelperTextVariants } from '.'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
modelValue?: string
|
|
9
|
-
value?: string
|
|
10
|
-
defaultValue?: string
|
|
11
|
-
type?: string
|
|
12
|
-
placeholder?: string
|
|
13
|
-
disabled?: boolean
|
|
14
|
-
readonly?: boolean
|
|
15
|
-
required?: boolean
|
|
16
|
-
name?: string
|
|
17
|
-
id?: string
|
|
18
|
-
label?: string
|
|
19
|
-
description?: string
|
|
20
|
-
errorMessage?: string
|
|
21
|
-
warningMessage?: string
|
|
22
|
-
successMessage?: string
|
|
23
|
-
helperText?: string
|
|
24
|
-
placeholder?: string
|
|
25
|
-
prefix?: string
|
|
26
|
-
suffix?: string
|
|
27
|
-
variant?: TextInputVariants['variant']
|
|
28
|
-
size?: TextInputVariants['size']
|
|
29
|
-
labelVariant?: LabelVariants['variant']
|
|
30
|
-
class?: string
|
|
31
|
-
labelClass?: string
|
|
32
|
-
inputClass?: string
|
|
33
|
-
containerClass?: string
|
|
34
|
-
showPasswordToggle?: boolean
|
|
35
|
-
validateOnChange?: boolean
|
|
36
|
-
validator?: (value: string) => string | null
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
40
|
-
type: 'text',
|
|
41
|
-
variant: 'default',
|
|
42
|
-
size: 'default',
|
|
43
|
-
labelVariant: 'default',
|
|
44
|
-
showPasswordToggle: false,
|
|
45
|
-
validateOnChange: false,
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
const emit = defineEmits<{
|
|
49
|
-
'update:modelValue': [value: string]
|
|
50
|
-
'update:value': [value: string]
|
|
51
|
-
'focus': [event: FocusEvent]
|
|
52
|
-
'blur': [event: FocusEvent]
|
|
53
|
-
'input': [event: Event]
|
|
54
|
-
'change': [event: Event]
|
|
55
|
-
}>()
|
|
56
|
-
|
|
57
|
-
const uniqueId = useId()
|
|
58
|
-
const inputId = props.id || uniqueId
|
|
59
|
-
|
|
60
|
-
const isPasswordVisible = ref(false)
|
|
61
|
-
const isFocused = ref(false)
|
|
62
|
-
const inputRef = ref<HTMLInputElement>()
|
|
63
|
-
|
|
64
|
-
const isPassword = computed(() => props.type === 'password')
|
|
65
|
-
const actualType = computed(() => {
|
|
66
|
-
if (isPassword.value) {
|
|
67
|
-
return isPasswordVisible.value ? 'text' : 'password'
|
|
68
|
-
}
|
|
69
|
-
return props.type
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
const inputVariant = computed((): TextInputVariants['variant'] => {
|
|
73
|
-
if (props.errorMessage) return 'destructive'
|
|
74
|
-
if (props.warningMessage) return 'warning'
|
|
75
|
-
if (props.successMessage) return 'success'
|
|
76
|
-
return props.variant
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
const labelVariant = computed((): LabelVariants['variant'] => {
|
|
80
|
-
if (props.errorMessage) return 'destructive'
|
|
81
|
-
if (props.warningMessage) return 'warning'
|
|
82
|
-
if (props.successMessage) return 'success'
|
|
83
|
-
return props.labelVariant
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
const helperTextVariant = computed((): HelperTextVariants['variant'] => {
|
|
87
|
-
if (props.errorMessage) return 'destructive'
|
|
88
|
-
if (props.warningMessage) return 'warning'
|
|
89
|
-
if (props.successMessage) return 'success'
|
|
90
|
-
return 'default'
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
const displayMessage = computed(() => {
|
|
94
|
-
if (props.errorMessage) return props.errorMessage
|
|
95
|
-
if (props.warningMessage) return props.warningMessage
|
|
96
|
-
if (props.successMessage) return props.successMessage
|
|
97
|
-
if (props.helperText) return props.helperText
|
|
98
|
-
return ''
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
const StatusIcon = computed(() => {
|
|
102
|
-
if (props.errorMessage) return AlertCircle
|
|
103
|
-
if (props.warningMessage) return AlertTriangle
|
|
104
|
-
if (props.successMessage) return CheckCircle
|
|
105
|
-
return null
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
const PasswordIcon = computed(() => isPasswordVisible.value ? EyeOff : Eye)
|
|
109
|
-
|
|
110
|
-
const internalValue = computed({
|
|
111
|
-
get: () => props.modelValue ?? props.value ?? '',
|
|
112
|
-
set: (value: string) => {
|
|
113
|
-
emit('update:modelValue', value)
|
|
114
|
-
emit('update:value', value)
|
|
115
|
-
}
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
const togglePasswordVisibility = () => {
|
|
119
|
-
isPasswordVisible.value = !isPasswordVisible.value
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const handleInput = (event: Event) => {
|
|
123
|
-
const target = event.target as HTMLInputElement
|
|
124
|
-
internalValue.value = target.value
|
|
125
|
-
emit('input', event)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const handleChange = (event: Event) => {
|
|
129
|
-
emit('change', event)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const handleFocus = (event: FocusEvent) => {
|
|
133
|
-
isFocused.value = true
|
|
134
|
-
emit('focus', event)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const handleBlur = (event: FocusEvent) => {
|
|
138
|
-
isFocused.value = false
|
|
139
|
-
if (props.validateOnChange && props.validator) {
|
|
140
|
-
const error = props.validator(internalValue.value)
|
|
141
|
-
// You might want to emit validation errors or handle them differently
|
|
142
|
-
}
|
|
143
|
-
emit('blur', event)
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
const focus = () => {
|
|
147
|
-
nextTick(() => {
|
|
148
|
-
inputRef.value?.focus()
|
|
149
|
-
})
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
defineExpose({
|
|
153
|
-
focus,
|
|
154
|
-
inputRef,
|
|
155
|
-
})
|
|
156
|
-
</script>
|
|
157
|
-
|
|
158
|
-
<template>
|
|
159
|
-
<div :class="cn('grid w-full max-w-sm gap-1.5', containerClass)">
|
|
160
|
-
<label
|
|
161
|
-
v-if="label || $slots.label"
|
|
162
|
-
:for="inputId"
|
|
163
|
-
:class="cn(
|
|
164
|
-
labelVariants({ variant: labelVariant }),
|
|
165
|
-
'flex items-center gap-1',
|
|
166
|
-
{
|
|
167
|
-
'cursor-not-allowed': disabled
|
|
168
|
-
},
|
|
169
|
-
labelClass
|
|
170
|
-
)"
|
|
171
|
-
>
|
|
172
|
-
<slot name="label">{{ label }}</slot>
|
|
173
|
-
<slot name="label-addon" />
|
|
174
|
-
</label>
|
|
175
|
-
|
|
176
|
-
<div class="relative">
|
|
177
|
-
<span
|
|
178
|
-
v-if="prefix"
|
|
179
|
-
:class="cn(
|
|
180
|
-
'absolute left-3 top-1/2 transform -translate-y-1/2 text-sm text-muted-foreground',
|
|
181
|
-
{
|
|
182
|
-
'text-destructive': variant === 'destructive',
|
|
183
|
-
'text-orange-600': variant === 'warning',
|
|
184
|
-
'text-green-600': variant === 'success'
|
|
185
|
-
}
|
|
186
|
-
)"
|
|
187
|
-
>
|
|
188
|
-
{{ prefix }}
|
|
189
|
-
</span>
|
|
190
|
-
|
|
191
|
-
<input
|
|
192
|
-
:id="inputId"
|
|
193
|
-
ref="inputRef"
|
|
194
|
-
:type="actualType"
|
|
195
|
-
:class="cn(
|
|
196
|
-
textInputVariants({ variant: inputVariant, size }),
|
|
197
|
-
{
|
|
198
|
-
'pl-8': prefix,
|
|
199
|
-
'pr-16': (isPassword && showPasswordToggle) || StatusIcon,
|
|
200
|
-
'pr-12': StatusIcon && !(isPassword && showPasswordToggle),
|
|
201
|
-
'ring-2 ring-ring ring-offset-2': isFocused,
|
|
202
|
-
},
|
|
203
|
-
inputClass
|
|
204
|
-
)"
|
|
205
|
-
:placeholder="placeholder"
|
|
206
|
-
:disabled="disabled"
|
|
207
|
-
:readonly="readonly"
|
|
208
|
-
:required="required"
|
|
209
|
-
:name="name"
|
|
210
|
-
:value="internalValue"
|
|
211
|
-
@input="handleInput"
|
|
212
|
-
@change="handleChange"
|
|
213
|
-
@focus="handleFocus"
|
|
214
|
-
@blur="handleBlur"
|
|
215
|
-
v-bind="$attrs"
|
|
216
|
-
/>
|
|
217
|
-
|
|
218
|
-
<div
|
|
219
|
-
v-if="StatusIcon || (isPassword && showPasswordToggle)"
|
|
220
|
-
:class="cn(
|
|
221
|
-
'absolute right-0 top-1/2 transform -translate-y-1/2 flex items-center gap-1 pr-3',
|
|
222
|
-
{
|
|
223
|
-
'pointer-events-none': StatusIcon && !(isPassword && showPasswordToggle)
|
|
224
|
-
}
|
|
225
|
-
)"
|
|
226
|
-
>
|
|
227
|
-
<component
|
|
228
|
-
v-if="StatusIcon"
|
|
229
|
-
:is="StatusIcon"
|
|
230
|
-
:class="cn('h-4 w-4', {
|
|
231
|
-
'text-destructive': variant === 'destructive',
|
|
232
|
-
'text-orange-600': variant === 'warning',
|
|
233
|
-
'text-green-600': variant === 'success'
|
|
234
|
-
})"
|
|
235
|
-
/>
|
|
236
|
-
|
|
237
|
-
<button
|
|
238
|
-
v-if="isPassword && showPasswordToggle"
|
|
239
|
-
type="button"
|
|
240
|
-
:class="cn(
|
|
241
|
-
'text-muted-foreground hover:text-foreground transition-colors',
|
|
242
|
-
{
|
|
243
|
-
'pointer-events-none': disabled
|
|
244
|
-
}
|
|
245
|
-
)"
|
|
246
|
-
:disabled="disabled"
|
|
247
|
-
@click="togglePasswordVisibility"
|
|
248
|
-
:title="isPasswordVisible ? 'Hide password' : 'Show password'"
|
|
249
|
-
>
|
|
250
|
-
<component :is="PasswordIcon" class="h-4 w-4" />
|
|
251
|
-
</button>
|
|
252
|
-
</div>
|
|
253
|
-
</div>
|
|
254
|
-
|
|
255
|
-
<p
|
|
256
|
-
v-if="displayMessage"
|
|
257
|
-
:class="cn(helperTextVariants({ variant: helperTextVariant }), 'flex items-start gap-1')"
|
|
258
|
-
>
|
|
259
|
-
<component
|
|
260
|
-
v-if="StatusIcon"
|
|
261
|
-
:is="StatusIcon"
|
|
262
|
-
class="h-4 w-4 mt-0.5 flex-shrink-0"
|
|
263
|
-
/>
|
|
264
|
-
<span>{{ displayMessage }}</span>
|
|
265
|
-
</p>
|
|
266
|
-
|
|
267
|
-
<slot name="extra" />
|
|
268
|
-
</div>
|
|
269
|
-
</template>
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, useId } from 'vue'
|
|
3
|
-
import { SwitchRoot, SwitchThumb } from 'reka-ui'
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
|
-
import { toggleVariants, toggleThumbVariants, labelVariants, type ToggleVariants, type LabelVariants } from '.'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
modelValue?: boolean
|
|
9
|
-
checked?: boolean
|
|
10
|
-
defaultChecked?: boolean
|
|
11
|
-
disabled?: boolean
|
|
12
|
-
required?: boolean
|
|
13
|
-
name?: string
|
|
14
|
-
value?: string
|
|
15
|
-
id?: string
|
|
16
|
-
label?: string
|
|
17
|
-
hideLabel?: boolean
|
|
18
|
-
description?: string
|
|
19
|
-
leftText?: string
|
|
20
|
-
rightText?: string
|
|
21
|
-
variant?: ToggleVariants['variant']
|
|
22
|
-
size?: ToggleVariants['size']
|
|
23
|
-
labelVariant?: LabelVariants['variant']
|
|
24
|
-
class?: string
|
|
25
|
-
labelClass?: string
|
|
26
|
-
containerClass?: string
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
30
|
-
variant: 'default',
|
|
31
|
-
size: 'default',
|
|
32
|
-
labelVariant: 'default',
|
|
33
|
-
leftText: 'Off',
|
|
34
|
-
rightText: 'On',
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
const emit = defineEmits<{
|
|
38
|
-
'update:modelValue': [value: boolean]
|
|
39
|
-
'update:checked': [value: boolean]
|
|
40
|
-
}>()
|
|
41
|
-
|
|
42
|
-
const uniqueId = useId()
|
|
43
|
-
const toggleId = props.id || uniqueId
|
|
44
|
-
|
|
45
|
-
const isChecked = computed({
|
|
46
|
-
get: () => props.modelValue ?? props.checked ?? false,
|
|
47
|
-
set: (value: boolean) => {
|
|
48
|
-
emit('update:modelValue', value)
|
|
49
|
-
emit('update:checked', value)
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<template>
|
|
55
|
-
<div :class="cn('flex items-center gap-3', containerClass)">
|
|
56
|
-
<SwitchRoot
|
|
57
|
-
:id="toggleId"
|
|
58
|
-
v-model:checked="isChecked"
|
|
59
|
-
:default-checked="defaultChecked"
|
|
60
|
-
:disabled="disabled"
|
|
61
|
-
:required="required"
|
|
62
|
-
:name="name"
|
|
63
|
-
:value="value"
|
|
64
|
-
:class="cn(toggleVariants({ variant, size }), props.class)"
|
|
65
|
-
>
|
|
66
|
-
<SwitchThumb :class="toggleThumbVariants({ size })" />
|
|
67
|
-
</SwitchRoot>
|
|
68
|
-
|
|
69
|
-
<div class="grid gap-1.5">
|
|
70
|
-
<label
|
|
71
|
-
v-if="label || $slots.label"
|
|
72
|
-
:for="toggleId"
|
|
73
|
-
:class="cn(
|
|
74
|
-
labelVariants({ variant: labelVariant }),
|
|
75
|
-
'cursor-pointer',
|
|
76
|
-
{
|
|
77
|
-
'sr-only': hideLabel,
|
|
78
|
-
'cursor-not-allowed': disabled
|
|
79
|
-
},
|
|
80
|
-
labelClass
|
|
81
|
-
)"
|
|
82
|
-
>
|
|
83
|
-
<slot name="label">{{ label }}</slot>
|
|
84
|
-
</label>
|
|
85
|
-
|
|
86
|
-
<div
|
|
87
|
-
v-if="!hideLabel && (leftText || rightText || $slots['left-text'] || $slots['right-text'])"
|
|
88
|
-
:class="cn(
|
|
89
|
-
'flex items-center gap-2 text-xs font-medium',
|
|
90
|
-
{
|
|
91
|
-
'text-muted-foreground': !isChecked,
|
|
92
|
-
'text-primary': isChecked,
|
|
93
|
-
'text-destructive': variant === 'destructive' && isChecked,
|
|
94
|
-
'text-green-600': variant === 'success' && isChecked,
|
|
95
|
-
'text-orange-600': variant === 'warning' && isChecked,
|
|
96
|
-
}
|
|
97
|
-
)"
|
|
98
|
-
>
|
|
99
|
-
<span :class="{ 'opacity-50': isChecked }">
|
|
100
|
-
<slot name="left-text">{{ leftText }}</slot>
|
|
101
|
-
</span>
|
|
102
|
-
|
|
103
|
-
<div :class="cn(
|
|
104
|
-
'w-8 h-px bg-current',
|
|
105
|
-
{
|
|
106
|
-
'opacity-20': !isChecked,
|
|
107
|
-
'opacity-100': isChecked
|
|
108
|
-
}
|
|
109
|
-
)" />
|
|
110
|
-
|
|
111
|
-
<span :class="{ 'opacity-50': !isChecked }">
|
|
112
|
-
<slot name="right-text">{{ rightText }}</slot>
|
|
113
|
-
</span>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<p
|
|
117
|
-
v-if="description"
|
|
118
|
-
class="text-sm text-muted-foreground"
|
|
119
|
-
>
|
|
120
|
-
{{ description }}
|
|
121
|
-
</p>
|
|
122
|
-
|
|
123
|
-
<slot name="extra" />
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</template>
|