@geniusdynamics/ns8-ui-lib 1.0.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.
Files changed (310) hide show
  1. package/README.md +167 -0
  2. package/dist/index.d.ts +14 -0
  3. package/dist/ns8-ui-lib.es.js +4278 -0
  4. package/dist/ns8-ui-lib.es.js.map +1 -0
  5. package/dist/ns8-ui-lib.umd.js +7 -0
  6. package/dist/ns8-ui-lib.umd.js.map +1 -0
  7. package/dist/src/App.vue.d.ts +2 -0
  8. package/dist/src/components/HelloWorld.vue.d.ts +5 -0
  9. package/dist/src/components/NS/cards/NSBackupCard.vue.d.ts +51 -0
  10. package/dist/src/components/NS/cards/NSSystemInfoCard.vue.d.ts +58 -0
  11. package/dist/src/components/NS/cards/NSSystemdServiceCard.vue.d.ts +47 -0
  12. package/dist/src/components/NS/cards/index.d.ts +3 -0
  13. package/dist/src/components/NS/checkbox/NSCheckbox.vue.d.ts +37 -0
  14. package/dist/src/components/NS/checkbox/index.d.ts +1 -0
  15. package/dist/src/components/NS/data-table/NSDataTable.vue.d.ts +98 -0
  16. package/dist/src/components/NS/data-table/index.d.ts +1 -0
  17. package/dist/src/components/NS/empty-state/NSEmptyState.vue.d.ts +45 -0
  18. package/dist/src/components/NS/empty-state/index.d.ts +1 -0
  19. package/dist/src/components/NS/index.d.ts +35 -0
  20. package/dist/src/components/NS/inline-notification/NSInlineNotification.vue.d.ts +44 -0
  21. package/dist/src/components/NS/inline-notification/index.d.ts +1 -0
  22. package/dist/src/components/NS/lottie-animation/NSLottieAnimation.vue.d.ts +75 -0
  23. package/dist/src/components/NS/lottie-animation/index.d.ts +1 -0
  24. package/dist/src/components/NS/modal/NSModal.vue.d.ts +56 -0
  25. package/dist/src/components/NS/modal/NSModalTrigger.vue.d.ts +64 -0
  26. package/dist/src/components/NS/modal/index.d.ts +2 -0
  27. package/dist/src/components/NS/pagination/NSPagination.vue.d.ts +36 -0
  28. package/dist/src/components/NS/pagination/index.d.ts +1 -0
  29. package/dist/src/components/NS/progress/NSProgress.vue.d.ts +37 -0
  30. package/dist/src/components/NS/progress/NSProgressBar.vue.d.ts +39 -0
  31. package/dist/src/components/NS/progress/index.d.ts +2 -0
  32. package/dist/src/components/NS/slider/NSByteSlider.vue.d.ts +50 -0
  33. package/dist/src/components/NS/slider/NSSlider.vue.d.ts +49 -0
  34. package/dist/src/components/NS/slider/index.d.ts +2 -0
  35. package/dist/src/components/NS/tag/NSTag.vue.d.ts +41 -0
  36. package/dist/src/components/NS/tag/index.d.ts +1 -0
  37. package/dist/src/components/NS/text-input/NSTextInput.vue.d.ts +67 -0
  38. package/dist/src/components/NS/text-input/index.d.ts +1 -0
  39. package/dist/src/components/NS/toast-notification/NSToastNotification.vue.d.ts +44 -0
  40. package/dist/src/components/NS/toast-notification/index.d.ts +1 -0
  41. package/dist/src/components/NS/toggle/NSToggle.vue.d.ts +51 -0
  42. package/dist/src/components/NS/toggle/index.d.ts +1 -0
  43. package/dist/src/components/NS/wizard/NSWizard.vue.d.ts +86 -0
  44. package/dist/src/components/NS/wizard/index.d.ts +1 -0
  45. package/dist/src/components/ui/button/Button.vue.d.ts +27 -0
  46. package/dist/src/components/ui/button/index.d.ts +7 -0
  47. package/dist/src/components/ui/card/Card.vue.d.ts +21 -0
  48. package/dist/src/components/ui/card/CardAction.vue.d.ts +21 -0
  49. package/dist/src/components/ui/card/CardContent.vue.d.ts +21 -0
  50. package/dist/src/components/ui/card/CardDescription.vue.d.ts +21 -0
  51. package/dist/src/components/ui/card/CardFooter.vue.d.ts +21 -0
  52. package/dist/src/components/ui/card/CardHeader.vue.d.ts +21 -0
  53. package/dist/src/components/ui/card/CardTitle.vue.d.ts +21 -0
  54. package/dist/src/components/ui/card/index.d.ts +7 -0
  55. package/dist/src/components/ui/checkbox/NsCheckbox.vue.d.ts +49 -0
  56. package/dist/src/components/ui/checkbox/index.d.ts +11 -0
  57. package/dist/src/components/ui/dialog/Dialog.vue.d.ts +28 -0
  58. package/dist/src/components/ui/dialog/index.d.ts +1 -0
  59. package/dist/src/components/ui/empty-state/NsEmptyState.vue.d.ts +45 -0
  60. package/dist/src/components/ui/empty-state/index.d.ts +11 -0
  61. package/dist/src/components/ui/inline-notification/NsInlineNotification.vue.d.ts +45 -0
  62. package/dist/src/components/ui/inline-notification/index.d.ts +6 -0
  63. package/dist/src/components/ui/input/Input.vue.d.ts +12 -0
  64. package/dist/src/components/ui/input/index.d.ts +1 -0
  65. package/dist/src/components/ui/input-group/InputGroup.vue.d.ts +21 -0
  66. package/dist/src/components/ui/input-group/InputGroupAddon.vue.d.ts +25 -0
  67. package/dist/src/components/ui/input-group/InputGroupButton.vue.d.ts +22 -0
  68. package/dist/src/components/ui/input-group/InputGroupInput.vue.d.ts +6 -0
  69. package/dist/src/components/ui/input-group/InputGroupText.vue.d.ts +21 -0
  70. package/dist/src/components/ui/input-group/InputGroupTextarea.vue.d.ts +6 -0
  71. package/dist/src/components/ui/input-group/index.d.ts +22 -0
  72. package/dist/src/components/ui/item/Item.vue.d.ts +27 -0
  73. package/dist/src/components/ui/item/ItemActions.vue.d.ts +21 -0
  74. package/dist/src/components/ui/item/ItemContent.vue.d.ts +21 -0
  75. package/dist/src/components/ui/item/ItemDescription.vue.d.ts +21 -0
  76. package/dist/src/components/ui/item/ItemFooter.vue.d.ts +21 -0
  77. package/dist/src/components/ui/item/ItemGroup.vue.d.ts +21 -0
  78. package/dist/src/components/ui/item/ItemHeader.vue.d.ts +21 -0
  79. package/dist/src/components/ui/item/ItemMedia.vue.d.ts +23 -0
  80. package/dist/src/components/ui/item/ItemSeparator.vue.d.ts +7 -0
  81. package/dist/src/components/ui/item/ItemTitle.vue.d.ts +21 -0
  82. package/dist/src/components/ui/item/index.d.ts +20 -0
  83. package/dist/src/components/ui/label/Label.vue.d.ts +22 -0
  84. package/dist/src/components/ui/label/index.d.ts +1 -0
  85. package/dist/src/components/ui/scroll-area/ScrollArea.vue.d.ts +22 -0
  86. package/dist/src/components/ui/scroll-area/ScrollBar.vue.d.ts +9 -0
  87. package/dist/src/components/ui/scroll-area/index.d.ts +2 -0
  88. package/dist/src/components/ui/select/Select.vue.d.ts +28 -0
  89. package/dist/src/components/ui/select/SelectContent.vue.d.ts +32 -0
  90. package/dist/src/components/ui/select/SelectGroup.vue.d.ts +18 -0
  91. package/dist/src/components/ui/select/SelectItem.vue.d.ts +23 -0
  92. package/dist/src/components/ui/select/SelectItemText.vue.d.ts +18 -0
  93. package/dist/src/components/ui/select/SelectLabel.vue.d.ts +22 -0
  94. package/dist/src/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
  95. package/dist/src/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
  96. package/dist/src/components/ui/select/SelectSeparator.vue.d.ts +7 -0
  97. package/dist/src/components/ui/select/SelectTrigger.vue.d.ts +25 -0
  98. package/dist/src/components/ui/select/SelectValue.vue.d.ts +18 -0
  99. package/dist/src/components/ui/select/index.d.ts +11 -0
  100. package/dist/src/components/ui/separator/Separator.vue.d.ts +10 -0
  101. package/dist/src/components/ui/separator/index.d.ts +1 -0
  102. package/dist/src/components/ui/sheet/Sheet.vue.d.ts +25 -0
  103. package/dist/src/components/ui/sheet/SheetClose.vue.d.ts +18 -0
  104. package/dist/src/components/ui/sheet/SheetContent.vue.d.ts +39 -0
  105. package/dist/src/components/ui/sheet/SheetDescription.vue.d.ts +22 -0
  106. package/dist/src/components/ui/sheet/SheetFooter.vue.d.ts +21 -0
  107. package/dist/src/components/ui/sheet/SheetHeader.vue.d.ts +21 -0
  108. package/dist/src/components/ui/sheet/SheetOverlay.vue.d.ts +22 -0
  109. package/dist/src/components/ui/sheet/SheetTitle.vue.d.ts +22 -0
  110. package/dist/src/components/ui/sheet/SheetTrigger.vue.d.ts +18 -0
  111. package/dist/src/components/ui/sheet/index.d.ts +8 -0
  112. package/dist/src/components/ui/sidebar/Sidebar.vue.d.ts +24 -0
  113. package/dist/src/components/ui/sidebar/SidebarContent.vue.d.ts +21 -0
  114. package/dist/src/components/ui/sidebar/SidebarFooter.vue.d.ts +21 -0
  115. package/dist/src/components/ui/sidebar/SidebarGroup.vue.d.ts +21 -0
  116. package/dist/src/components/ui/sidebar/SidebarGroupAction.vue.d.ts +22 -0
  117. package/dist/src/components/ui/sidebar/SidebarGroupContent.vue.d.ts +21 -0
  118. package/dist/src/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +22 -0
  119. package/dist/src/components/ui/sidebar/SidebarHeader.vue.d.ts +21 -0
  120. package/dist/src/components/ui/sidebar/SidebarInput.vue.d.ts +21 -0
  121. package/dist/src/components/ui/sidebar/SidebarInset.vue.d.ts +21 -0
  122. package/dist/src/components/ui/sidebar/SidebarMenu.vue.d.ts +21 -0
  123. package/dist/src/components/ui/sidebar/SidebarMenuAction.vue.d.ts +25 -0
  124. package/dist/src/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +21 -0
  125. package/dist/src/components/ui/sidebar/SidebarMenuButton.vue.d.ts +27 -0
  126. package/dist/src/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +30 -0
  127. package/dist/src/components/ui/sidebar/SidebarMenuItem.vue.d.ts +21 -0
  128. package/dist/src/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +7 -0
  129. package/dist/src/components/ui/sidebar/SidebarMenuSub.vue.d.ts +21 -0
  130. package/dist/src/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +27 -0
  131. package/dist/src/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +21 -0
  132. package/dist/src/components/ui/sidebar/SidebarProvider.vue.d.ts +30 -0
  133. package/dist/src/components/ui/sidebar/SidebarRail.vue.d.ts +21 -0
  134. package/dist/src/components/ui/sidebar/SidebarSeparator.vue.d.ts +21 -0
  135. package/dist/src/components/ui/sidebar/SidebarTrigger.vue.d.ts +6 -0
  136. package/dist/src/components/ui/sidebar/index.d.ts +37 -0
  137. package/dist/src/components/ui/sidebar/utils.d.ts +56 -0
  138. package/dist/src/components/ui/skeleton/Skeleton.vue.d.ts +6 -0
  139. package/dist/src/components/ui/skeleton/index.d.ts +1 -0
  140. package/dist/src/components/ui/sonner/Sonner.vue.d.ts +3 -0
  141. package/dist/src/components/ui/sonner/index.d.ts +1 -0
  142. package/dist/src/components/ui/switch/Switch.vue.d.ts +28 -0
  143. package/dist/src/components/ui/switch/index.d.ts +1 -0
  144. package/dist/src/components/ui/table/Table.vue.d.ts +21 -0
  145. package/dist/src/components/ui/table/TableBody.vue.d.ts +21 -0
  146. package/dist/src/components/ui/table/TableCaption.vue.d.ts +21 -0
  147. package/dist/src/components/ui/table/TableCell.vue.d.ts +21 -0
  148. package/dist/src/components/ui/table/TableEmpty.vue.d.ts +24 -0
  149. package/dist/src/components/ui/table/TableFooter.vue.d.ts +21 -0
  150. package/dist/src/components/ui/table/TableHead.vue.d.ts +21 -0
  151. package/dist/src/components/ui/table/TableHeader.vue.d.ts +21 -0
  152. package/dist/src/components/ui/table/TableRow.vue.d.ts +21 -0
  153. package/dist/src/components/ui/table/index.d.ts +9 -0
  154. package/dist/src/components/ui/table/utils.d.ts +3 -0
  155. package/dist/src/components/ui/tabs/Tabs.vue.d.ts +28 -0
  156. package/dist/src/components/ui/tabs/TabsContent.vue.d.ts +22 -0
  157. package/dist/src/components/ui/tabs/TabsList.vue.d.ts +22 -0
  158. package/dist/src/components/ui/tabs/TabsTrigger.vue.d.ts +22 -0
  159. package/dist/src/components/ui/tabs/index.d.ts +4 -0
  160. package/dist/src/components/ui/tag/NsTag.vue.d.ts +42 -0
  161. package/dist/src/components/ui/tag/index.d.ts +8 -0
  162. package/dist/src/components/ui/text-input/NsTextInput.vue.d.ts +79 -0
  163. package/dist/src/components/ui/text-input/index.d.ts +15 -0
  164. package/dist/src/components/ui/textarea/Textarea.vue.d.ts +12 -0
  165. package/dist/src/components/ui/textarea/index.d.ts +1 -0
  166. package/dist/src/components/ui/toggle/NsToggle.vue.d.ts +54 -0
  167. package/dist/src/components/ui/toggle/index.d.ts +15 -0
  168. package/dist/src/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
  169. package/dist/src/components/ui/tooltip/TooltipContent.vue.d.ts +30 -0
  170. package/dist/src/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
  171. package/dist/src/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
  172. package/dist/src/components/ui/tooltip/index.d.ts +4 -0
  173. package/dist/src/composables/index.d.ts +8 -0
  174. package/dist/src/composables/useDateTimeService.d.ts +10 -0
  175. package/dist/src/composables/useFilterService.d.ts +8 -0
  176. package/dist/src/composables/useIconService.d.ts +153 -0
  177. package/dist/src/composables/usePageTitleService.d.ts +3 -0
  178. package/dist/src/composables/useQueryParamService.d.ts +13 -0
  179. package/dist/src/composables/useStorageService.d.ts +5 -0
  180. package/dist/src/composables/useTaskService.d.ts +18 -0
  181. package/dist/src/composables/useUtilService.d.ts +27 -0
  182. package/dist/src/lib/utils.d.ts +2 -0
  183. package/dist/src/main.d.ts +0 -0
  184. package/dist/vite.svg +1 -0
  185. package/package.json +80 -0
  186. package/src/App.vue +30 -0
  187. package/src/components/HelloWorld.vue +41 -0
  188. package/src/components/NS/CompleteDemo.vue +475 -0
  189. package/src/components/NS/Demo.vue +191 -0
  190. package/src/components/NS/cards/NSBackupCard.vue +272 -0
  191. package/src/components/NS/cards/NSSystemInfoCard.vue +252 -0
  192. package/src/components/NS/cards/NSSystemdServiceCard.vue +250 -0
  193. package/src/components/NS/checkbox/NSCheckbox.vue +104 -0
  194. package/src/components/NS/data-table/NSDataTable.vue +434 -0
  195. package/src/components/NS/empty-state/NSEmptyState.vue +188 -0
  196. package/src/components/NS/inline-notification/NSInlineNotification.vue +162 -0
  197. package/src/components/NS/lottie-animation/NSLottieAnimation.vue +255 -0
  198. package/src/components/NS/modal/NSModal.vue +193 -0
  199. package/src/components/NS/modal/NSModalTrigger.vue +109 -0
  200. package/src/components/NS/pagination/NSPagination.vue +247 -0
  201. package/src/components/NS/progress/NSProgress.vue +115 -0
  202. package/src/components/NS/progress/NSProgressBar.vue +137 -0
  203. package/src/components/NS/slider/NSByteSlider.vue +144 -0
  204. package/src/components/NS/slider/NSSlider.vue +142 -0
  205. package/src/components/NS/tag/NSTag.vue +139 -0
  206. package/src/components/NS/text-input/NSTextInput.vue +242 -0
  207. package/src/components/NS/toast-notification/NSToastNotification.vue +163 -0
  208. package/src/components/NS/toggle/NSToggle.vue +156 -0
  209. package/src/components/NS/wizard/NSWizard.vue +399 -0
  210. package/src/components/ui/button/Button.vue +29 -0
  211. package/src/components/ui/card/Card.vue +22 -0
  212. package/src/components/ui/card/CardAction.vue +17 -0
  213. package/src/components/ui/card/CardContent.vue +17 -0
  214. package/src/components/ui/card/CardDescription.vue +17 -0
  215. package/src/components/ui/card/CardFooter.vue +17 -0
  216. package/src/components/ui/card/CardHeader.vue +17 -0
  217. package/src/components/ui/card/CardTitle.vue +17 -0
  218. package/src/components/ui/checkbox/NsCheckbox.vue +123 -0
  219. package/src/components/ui/dialog/Dialog.vue +68 -0
  220. package/src/components/ui/empty-state/NsEmptyState.vue +149 -0
  221. package/src/components/ui/inline-notification/NsInlineNotification.vue +163 -0
  222. package/src/components/ui/input/Input.vue +33 -0
  223. package/src/components/ui/input-group/InputGroup.vue +35 -0
  224. package/src/components/ui/input-group/InputGroupAddon.vue +36 -0
  225. package/src/components/ui/input-group/InputGroupButton.vue +21 -0
  226. package/src/components/ui/input-group/InputGroupInput.vue +19 -0
  227. package/src/components/ui/input-group/InputGroupText.vue +19 -0
  228. package/src/components/ui/input-group/InputGroupTextarea.vue +19 -0
  229. package/src/components/ui/item/Item.vue +27 -0
  230. package/src/components/ui/item/ItemActions.vue +17 -0
  231. package/src/components/ui/item/ItemContent.vue +17 -0
  232. package/src/components/ui/item/ItemDescription.vue +21 -0
  233. package/src/components/ui/item/ItemFooter.vue +17 -0
  234. package/src/components/ui/item/ItemGroup.vue +18 -0
  235. package/src/components/ui/item/ItemHeader.vue +17 -0
  236. package/src/components/ui/item/ItemMedia.vue +21 -0
  237. package/src/components/ui/item/ItemSeparator.vue +18 -0
  238. package/src/components/ui/item/ItemTitle.vue +17 -0
  239. package/src/components/ui/label/Label.vue +26 -0
  240. package/src/components/ui/scroll-area/ScrollArea.vue +33 -0
  241. package/src/components/ui/scroll-area/ScrollBar.vue +32 -0
  242. package/src/components/ui/select/Select.vue +19 -0
  243. package/src/components/ui/select/SelectContent.vue +51 -0
  244. package/src/components/ui/select/SelectGroup.vue +15 -0
  245. package/src/components/ui/select/SelectItem.vue +44 -0
  246. package/src/components/ui/select/SelectItemText.vue +15 -0
  247. package/src/components/ui/select/SelectLabel.vue +17 -0
  248. package/src/components/ui/select/SelectScrollDownButton.vue +26 -0
  249. package/src/components/ui/select/SelectScrollUpButton.vue +26 -0
  250. package/src/components/ui/select/SelectSeparator.vue +19 -0
  251. package/src/components/ui/select/SelectTrigger.vue +33 -0
  252. package/src/components/ui/select/SelectValue.vue +15 -0
  253. package/src/components/ui/separator/Separator.vue +29 -0
  254. package/src/components/ui/sheet/Sheet.vue +19 -0
  255. package/src/components/ui/sheet/SheetClose.vue +15 -0
  256. package/src/components/ui/sheet/SheetContent.vue +62 -0
  257. package/src/components/ui/sheet/SheetDescription.vue +21 -0
  258. package/src/components/ui/sheet/SheetFooter.vue +16 -0
  259. package/src/components/ui/sheet/SheetHeader.vue +15 -0
  260. package/src/components/ui/sheet/SheetOverlay.vue +21 -0
  261. package/src/components/ui/sheet/SheetTitle.vue +21 -0
  262. package/src/components/ui/sheet/SheetTrigger.vue +15 -0
  263. package/src/components/ui/sidebar/Sidebar.vue +96 -0
  264. package/src/components/ui/sidebar/SidebarContent.vue +18 -0
  265. package/src/components/ui/sidebar/SidebarFooter.vue +18 -0
  266. package/src/components/ui/sidebar/SidebarGroup.vue +18 -0
  267. package/src/components/ui/sidebar/SidebarGroupAction.vue +27 -0
  268. package/src/components/ui/sidebar/SidebarGroupContent.vue +18 -0
  269. package/src/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
  270. package/src/components/ui/sidebar/SidebarHeader.vue +18 -0
  271. package/src/components/ui/sidebar/SidebarInput.vue +22 -0
  272. package/src/components/ui/sidebar/SidebarInset.vue +21 -0
  273. package/src/components/ui/sidebar/SidebarMenu.vue +18 -0
  274. package/src/components/ui/sidebar/SidebarMenuAction.vue +35 -0
  275. package/src/components/ui/sidebar/SidebarMenuBadge.vue +26 -0
  276. package/src/components/ui/sidebar/SidebarMenuButton.vue +48 -0
  277. package/src/components/ui/sidebar/SidebarMenuButtonChild.vue +36 -0
  278. package/src/components/ui/sidebar/SidebarMenuItem.vue +18 -0
  279. package/src/components/ui/sidebar/SidebarMenuSkeleton.vue +35 -0
  280. package/src/components/ui/sidebar/SidebarMenuSub.vue +22 -0
  281. package/src/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
  282. package/src/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
  283. package/src/components/ui/sidebar/SidebarProvider.vue +82 -0
  284. package/src/components/ui/sidebar/SidebarRail.vue +33 -0
  285. package/src/components/ui/sidebar/SidebarSeparator.vue +19 -0
  286. package/src/components/ui/sidebar/SidebarTrigger.vue +27 -0
  287. package/src/components/ui/skeleton/Skeleton.vue +17 -0
  288. package/src/components/ui/sonner/Sonner.vue +42 -0
  289. package/src/components/ui/switch/Switch.vue +38 -0
  290. package/src/components/ui/table/Table.vue +16 -0
  291. package/src/components/ui/table/TableBody.vue +17 -0
  292. package/src/components/ui/table/TableCaption.vue +17 -0
  293. package/src/components/ui/table/TableCell.vue +22 -0
  294. package/src/components/ui/table/TableEmpty.vue +34 -0
  295. package/src/components/ui/table/TableFooter.vue +17 -0
  296. package/src/components/ui/table/TableHead.vue +17 -0
  297. package/src/components/ui/table/TableHeader.vue +17 -0
  298. package/src/components/ui/table/TableRow.vue +17 -0
  299. package/src/components/ui/tabs/Tabs.vue +24 -0
  300. package/src/components/ui/tabs/TabsContent.vue +21 -0
  301. package/src/components/ui/tabs/TabsList.vue +24 -0
  302. package/src/components/ui/tabs/TabsTrigger.vue +26 -0
  303. package/src/components/ui/tag/NsTag.vue +114 -0
  304. package/src/components/ui/text-input/NsTextInput.vue +269 -0
  305. package/src/components/ui/textarea/Textarea.vue +28 -0
  306. package/src/components/ui/toggle/NsToggle.vue +126 -0
  307. package/src/components/ui/tooltip/Tooltip.vue +19 -0
  308. package/src/components/ui/tooltip/TooltipContent.vue +34 -0
  309. package/src/components/ui/tooltip/TooltipProvider.vue +14 -0
  310. package/src/components/ui/tooltip/TooltipTrigger.vue +15 -0
@@ -0,0 +1,272 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import { Save, AlertCircle, CheckCircle, Loader2, MoreHorizontal } from 'lucide-vue-next'
4
+ import { Button } from '@/components/ui/button'
5
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
6
+ import { Skeleton } from '@/components/ui/skeleton'
7
+ import { cn } from '@/lib/utils'
8
+
9
+ interface Backup {
10
+ id: string
11
+ name: string
12
+ date: string
13
+ size: string
14
+ enabled: boolean
15
+ status?: 'success' | 'error' | 'running' | 'pending'
16
+ }
17
+
18
+ interface Status {
19
+ [key: string]: {
20
+ success?: boolean
21
+ message?: string
22
+ }
23
+ }
24
+
25
+ interface Props {
26
+ title?: string
27
+ loading?: boolean
28
+ backups?: Backup[]
29
+ status?: Status
30
+ noBackupMessage?: string
31
+ statusLabel?: string
32
+ statusSuccessLabel?: string
33
+ backupDisabledLabel?: string
34
+ light?: boolean
35
+ maxHeight?: string
36
+ class?: string
37
+ }
38
+
39
+ const props = withDefaults(defineProps<Props>(), {
40
+ title: 'Backup',
41
+ loading: false,
42
+ backups: () => [],
43
+ status: () => ({}),
44
+ noBackupMessage: 'No backups available',
45
+ statusLabel: 'Status',
46
+ statusSuccessLabel: 'Enabled',
47
+ backupDisabledLabel: 'Disabled',
48
+ light: false,
49
+ })
50
+
51
+ const emit = defineEmits<{
52
+ backup: [backupId: string]
53
+ restore: [backupId: string]
54
+ delete: [backupId: string]
55
+ enable: [backupId: string]
56
+ disable: [backupId: string]
57
+ }>()
58
+
59
+ const hasBackups = computed(() => props.backups.length > 0)
60
+ const backupsContainingInstance = computed(() => props.backups.filter(backup => backup.enabled))
61
+ const singleBackup = computed(() => backupsContainingInstance.value.length === 1 ? backupsContainingInstance.value[0] : null)
62
+
63
+ const getStatusIcon = (backup: Backup) => {
64
+ switch (backup.status) {
65
+ case 'success':
66
+ return CheckCircle
67
+ case 'error':
68
+ return AlertCircle
69
+ case 'running':
70
+ return Loader2
71
+ default:
72
+ return null
73
+ }
74
+ }
75
+
76
+ const getStatusClass = (backup: Backup) => {
77
+ switch (backup.status) {
78
+ case 'success':
79
+ return 'text-green-600'
80
+ case 'error':
81
+ return 'text-destructive'
82
+ case 'running':
83
+ return 'text-blue-600'
84
+ default:
85
+ return 'text-muted-foreground'
86
+ }
87
+ }
88
+
89
+ const containerClasses = computed(() => {
90
+ return cn('w-full', props.class)
91
+ })
92
+
93
+ const cardClasses = computed(() => {
94
+ return cn(
95
+ 'transition-all duration-200 hover:shadow-md',
96
+ props.light ? 'bg-background/95' : 'bg-background'
97
+ )
98
+ })
99
+
100
+ const tableWrapperClasses = computed(() => {
101
+ return cn('w-full overflow-auto', {
102
+ 'max-h-64': props.maxHeight
103
+ })
104
+ })
105
+
106
+ const tableClasses = computed(() => {
107
+ return 'w-full min-w-[300px]'
108
+ })
109
+ </script>
110
+
111
+ <template>
112
+ <Card :class="cardClasses">
113
+ <CardHeader class="pb-3">
114
+ <CardTitle class="flex items-center gap-2">
115
+ <Save class="h-5 w-5 text-primary" />
116
+ {{ title }}
117
+ </CardTitle>
118
+ </CardHeader>
119
+
120
+ <CardContent class="space-y-4">
121
+ <!-- Loading state -->
122
+ <div v-if="loading" class="space-y-2">
123
+ <Skeleton class="h-4 w-3/4" />
124
+ <Skeleton class="h-4 w-1/2" />
125
+ </div>
126
+
127
+ <!-- No backups state -->
128
+ <div v-else-if="!hasBackups" class="flex items-center gap-3 text-muted-foreground">
129
+ <AlertCircle class="h-5 w-5" />
130
+ <span>{{ noBackupMessage }}</span>
131
+ </div>
132
+
133
+ <!-- Single backup state -->
134
+ <div v-else-if="singleBackup" class="space-y-4">
135
+ <div :class="tableWrapperClasses">
136
+ <div :class="tableClasses">
137
+ <!-- Status row -->
138
+ <div class="flex items-center justify-between py-2 border-b">
139
+ <span class="text-sm font-medium">{{ statusLabel }}</span>
140
+ <div class="flex items-center gap-2">
141
+ <span
142
+ v-if="!singleBackup.enabled"
143
+ class="text-destructive"
144
+ >
145
+ {{ backupDisabledLabel }}
146
+ </span>
147
+ <span
148
+ v-else-if="status[singleBackup.id]?.success"
149
+ class="text-green-600"
150
+ >
151
+ {{ statusSuccessLabel }}
152
+ </span>
153
+ <span
154
+ v-else-if="status[singleBackup.id]?.message"
155
+ class="text-destructive"
156
+ >
157
+ {{ status[singleBackup.id].message }}
158
+ </span>
159
+ </div>
160
+ </div>
161
+
162
+ <!-- Backup details -->
163
+ <div class="space-y-2 py-2">
164
+ <div class="flex justify-between">
165
+ <span class="text-sm text-muted-foreground">Name:</span>
166
+ <span class="text-sm font-medium">{{ singleBackup.name }}</span>
167
+ </div>
168
+ <div class="flex justify-between">
169
+ <span class="text-sm text-muted-foreground">Date:</span>
170
+ <span class="text-sm">{{ singleBackup.date }}</span>
171
+ </div>
172
+ <div class="flex justify-between">
173
+ <span class="text-sm text-muted-foreground">Size:</span>
174
+ <span class="text-sm">{{ singleBackup.size }}</span>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <!-- Action buttons -->
181
+ <div class="flex gap-2 pt-2">
182
+ <Button
183
+ v-if="singleBackup.enabled"
184
+ variant="outline"
185
+ size="sm"
186
+ @click="emit('backup', singleBackup.id)"
187
+ >
188
+ Create Backup
189
+ </Button>
190
+ <Button
191
+ v-if="singleBackup.enabled"
192
+ variant="outline"
193
+ size="sm"
194
+ @click="emit('restore', singleBackup.id)"
195
+ >
196
+ Restore
197
+ </Button>
198
+ <Button
199
+ variant="destructive"
200
+ size="sm"
201
+ @click="emit('delete', singleBackup.id)"
202
+ >
203
+ Delete
204
+ </Button>
205
+ </div>
206
+ </div>
207
+
208
+ <!-- Multiple backups state -->
209
+ <div v-else>
210
+ <div :class="tableWrapperClasses">
211
+ <table :class="tableClasses">
212
+ <thead>
213
+ <tr class="border-b">
214
+ <th class="text-left p-2 text-sm font-medium">Name</th>
215
+ <th class="text-left p-2 text-sm font-medium">Date</th>
216
+ <th class="text-left p-2 text-sm font-medium">Size</th>
217
+ <th class="text-left p-2 text-sm font-medium">Status</th>
218
+ <th class="text-right p-2 text-sm font-medium">Actions</th>
219
+ </tr>
220
+ </thead>
221
+ <tbody>
222
+ <tr v-for="backup in backups" :key="backup.id" class="border-b">
223
+ <td class="p-2 text-sm">{{ backup.name }}</td>
224
+ <td class="p-2 text-sm">{{ backup.date }}</td>
225
+ <td class="p-2 text-sm">{{ backup.size }}</td>
226
+ <td class="p-2 text-sm">
227
+ <div class="flex items-center gap-2">
228
+ <component
229
+ v-if="getStatusIcon(backup)"
230
+ :is="getStatusIcon(backup)"
231
+ :class="cn('h-4 w-4', getStatusClass(backup))"
232
+ />
233
+ <span :class="getStatusClass(backup)">
234
+ {{ backup.status || 'Unknown' }}
235
+ </span>
236
+ </div>
237
+ </td>
238
+ <td class="p-2 text-sm">
239
+ <div class="flex items-center justify-end gap-1">
240
+ <Button
241
+ variant="ghost"
242
+ size="sm"
243
+ @click="emit('enable', backup.id)"
244
+ :disabled="backup.enabled"
245
+ >
246
+ Enable
247
+ </Button>
248
+ <Button
249
+ variant="ghost"
250
+ size="sm"
251
+ @click="emit('disable', backup.id)"
252
+ :disabled="!backup.enabled"
253
+ >
254
+ Disable
255
+ </Button>
256
+ <Button
257
+ variant="ghost"
258
+ size="sm"
259
+ @click="emit('restore', backup.id)"
260
+ >
261
+ Restore
262
+ </Button>
263
+ </div>
264
+ </td>
265
+ </tr>
266
+ </tbody>
267
+ </table>
268
+ </div>
269
+ </div>
270
+ </CardContent>
271
+ </Card>
272
+ </template>
@@ -0,0 +1,252 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import { HardDrive, Activity, CheckCircle, AlertCircle, Clock } from 'lucide-vue-next'
4
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
5
+ import { Progress } from '@/components/ui/progress'
6
+ import { Badge } from '@/components/ui/badge'
7
+ import { Button } from '@/components/ui/button'
8
+ import { cn } from '@/lib/utils'
9
+
10
+ interface SystemMetrics {
11
+ totalSpace: string
12
+ usedSpace: string
13
+ freeSpace: string
14
+ usagePercentage: number
15
+ temperature?: string
16
+ loadAverage?: string[]
17
+ uptime?: string
18
+ processes?: number
19
+ memory?: {
20
+ total: string
21
+ used: string
22
+ free: string
23
+ percentage: number
24
+ }
25
+ cpu?: {
26
+ cores: number
27
+ usage: number
28
+ frequency: string
29
+ }
30
+ }
31
+
32
+ interface Props {
33
+ title?: string
34
+ description?: string
35
+ metrics?: SystemMetrics
36
+ loading?: boolean
37
+ refreshInterval?: number
38
+ showTemperature?: boolean
39
+ showLoadAverage?: boolean
40
+ showUptime?: boolean
41
+ showProcesses?: boolean
42
+ showMemory?: boolean
43
+ showCpu?: boolean
44
+ showStorage?: boolean
45
+ refreshable?: boolean
46
+ light?: boolean
47
+ maxHeight?: string
48
+ class?: string
49
+ }
50
+
51
+ const props = withDefaults(defineProps<Props>(), {
52
+ title: 'System Information',
53
+ description: 'Current system status and metrics',
54
+ loading: false,
55
+ showTemperature: false,
56
+ showLoadAverage: true,
57
+ showUptime: true,
58
+ showProcesses: true,
59
+ showMemory: true,
60
+ showCpu: true,
61
+ showStorage: true,
62
+ refreshable: true,
63
+ light: false,
64
+ })
65
+
66
+ const emit = defineEmits<{
67
+ refresh: []
68
+ }>()
69
+
70
+ const hasMetrics = computed(() => !!props.metrics)
71
+
72
+ const storageVariant = computed(() => {
73
+ if (!props.metrics?.usagePercentage) return 'default'
74
+
75
+ const percentage = props.metrics.usagePercentage
76
+ if (percentage >= 90) return 'destructive'
77
+ if (percentage >= 80) return 'warning'
78
+ if (percentage >= 60) return 'default'
79
+ return 'success'
80
+ })
81
+
82
+ const memoryVariant = computed(() => {
83
+ if (!props.metrics?.memory?.percentage) return 'default'
84
+
85
+ const percentage = props.metrics.memory.percentage
86
+ if (percentage >= 90) return 'destructive'
87
+ if (percentage >= 80) return 'warning'
88
+ if (percentage >= 60) return 'default'
89
+ return 'success'
90
+ })
91
+
92
+ const cpuVariant = computed(() => {
93
+ if (!props.metrics?.cpu?.usage) return 'default'
94
+
95
+ const usage = props.metrics.cpu.usage
96
+ if (usage >= 90) return 'destructive'
97
+ if (usage >= 80) return 'warning'
98
+ if (usage >= 60) return 'default'
99
+ return 'success'
100
+ })
101
+
102
+ const containerClasses = computed(() => {
103
+ return cn('w-full', props.class)
104
+ })
105
+
106
+ const cardClasses = computed(() => {
107
+ return cn(
108
+ 'transition-all duration-200 hover:shadow-md',
109
+ props.light ? 'bg-background/95' : 'bg-background'
110
+ )
111
+ })
112
+
113
+ const metricsGridClasses = computed(() => {
114
+ return cn('grid gap-4', {
115
+ 'grid-cols-1': !props.showMemory && !props.showCpu && !props.showStorage,
116
+ 'grid-cols-2': (props.showMemory && !props.showCpu && !props.showStorage) ||
117
+ (!props.showMemory && props.showCpu && !props.showStorage) ||
118
+ (!props.showMemory && !props.showCpu && props.showStorage),
119
+ 'grid-cols-3': (props.showMemory && props.showCpu && !props.showStorage) ||
120
+ (props.showMemory && !props.showCpu && props.showStorage) ||
121
+ (!props.showMemory && props.showCpu && props.showStorage),
122
+ 'lg:grid-cols-4': props.showMemory && props.showCpu && props.showStorage
123
+ })
124
+ })
125
+ </script>
126
+
127
+ <template>
128
+ <Card :class="cardClasses">
129
+ <CardHeader class="pb-3">
130
+ <div class="flex items-center justify-between">
131
+ <div>
132
+ <CardTitle class="flex items-center gap-2">
133
+ <Activity class="h-5 w-5 text-primary" />
134
+ {{ title }}
135
+ </CardTitle>
136
+ <CardDescription>
137
+ {{ description }}
138
+ </CardDescription>
139
+ </div>
140
+
141
+ <!-- Refresh button -->
142
+ <Button
143
+ v-if="refreshable && !loading"
144
+ variant="ghost"
145
+ size="sm"
146
+ @click="emit('refresh')"
147
+ >
148
+ <Clock class="h-4 w-4" />
149
+ </Button>
150
+ </div>
151
+ </CardHeader>
152
+
153
+ <CardContent class="space-y-4">
154
+ <!-- Loading state -->
155
+ <div v-if="loading" class="space-y-3">
156
+ <div class="space-y-2">
157
+ <div class="h-2 bg-secondary rounded-full" />
158
+ <div class="h-2 bg-secondary rounded-full" />
159
+ <div class="h-2 bg-secondary rounded-full" />
160
+ </div>
161
+ </div>
162
+
163
+ <!-- System metrics -->
164
+ <div v-else-if="hasMetrics" :class="metricsGridClasses">
165
+ <!-- Storage metrics -->
166
+ <div v-if="showStorage" class="space-y-2">
167
+ <div class="flex items-center gap-2 text-sm font-medium">
168
+ <HardDrive class="h-4 w-4" />
169
+ Storage
170
+ </div>
171
+ <Progress
172
+ :value="metrics.usagePercentage"
173
+ :variant="storageVariant"
174
+ class="mb-2"
175
+ />
176
+ <div class="text-xs text-muted-foreground space-y-1">
177
+ <div>Used: {{ metrics.usedSpace }} / {{ metrics.totalSpace }}</div>
178
+ <div>Free: {{ metrics.freeSpace }}</div>
179
+ </div>
180
+ </div>
181
+
182
+ <!-- Memory metrics -->
183
+ <div v-if="showMemory && metrics?.memory" class="space-y-2">
184
+ <div class="flex items-center gap-2 text-sm font-medium">
185
+ <Activity class="h-4 w-4" />
186
+ Memory
187
+ </div>
188
+ <Progress
189
+ :value="metrics.memory.percentage"
190
+ :variant="memoryVariant"
191
+ class="mb-2"
192
+ />
193
+ <div class="text-xs text-muted-foreground space-y-1">
194
+ <div>Used: {{ metrics.memory.used }} / {{ metrics.memory.total }}</div>
195
+ <div>Free: {{ metrics.memory.free }}</div>
196
+ </div>
197
+ </div>
198
+
199
+ <!-- CPU metrics -->
200
+ <div v-if="showCpu && metrics?.cpu" class="space-y-2">
201
+ <div class="flex items-center gap-2 text-sm font-medium">
202
+ <Activity class="h-4 w-4" />
203
+ CPU
204
+ </div>
205
+ <Progress
206
+ :value="metrics.cpu.usage"
207
+ :variant="cpuVariant"
208
+ class="mb-2"
209
+ />
210
+ <div class="text-xs text-muted-foreground space-y-1">
211
+ <div>Usage: {{ metrics.cpu.usage }}%</div>
212
+ <div>Cores: {{ metrics.cpu.cores }}</div>
213
+ <div v-if="metrics.cpu.frequency">Frequency: {{ metrics.cpu.frequency }}</div>
214
+ </div>
215
+ </div>
216
+ </div>
217
+
218
+ <!-- Additional system info -->
219
+ <div v-if="hasMetrics" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 pt-4 border-t">
220
+ <!-- Temperature -->
221
+ <div v-if="showTemperature && metrics?.temperature">
222
+ <div class="text-xs text-muted-foreground">Temperature</div>
223
+ <div class="text-sm font-medium">{{ metrics.temperature }}</div>
224
+ </div>
225
+
226
+ <!-- Load average -->
227
+ <div v-if="showLoadAverage && metrics?.loadAverage">
228
+ <div class="text-xs text-muted-foreground">Load Average</div>
229
+ <div class="text-sm font-medium">{{ metrics.loadAverage.join(', ') }}</div>
230
+ </div>
231
+
232
+ <!-- Uptime -->
233
+ <div v-if="showUptime && metrics?.uptime">
234
+ <div class="text-xs text-muted-foreground">Uptime</div>
235
+ <div class="text-sm font-medium">{{ metrics.uptime }}</div>
236
+ </div>
237
+
238
+ <!-- Processes -->
239
+ <div v-if="showProcesses && metrics?.processes">
240
+ <div class="text-xs text-muted-foreground">Processes</div>
241
+ <div class="text-sm font-medium">{{ metrics.processes }}</div>
242
+ </div>
243
+ </div>
244
+
245
+ <!-- No data state -->
246
+ <div v-if="!hasMetrics && !loading" class="flex items-center gap-3 text-muted-foreground">
247
+ <AlertCircle class="h-5 w-5" />
248
+ <span>No system metrics available</span>
249
+ </div>
250
+ </CardContent>
251
+ </Card>
252
+ </template>