@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,250 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import { Info, CheckCircle, AlertCircle, Clock, 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 { Badge } from '@/components/ui/badge'
7
+ import { Skeleton } from '@/components/ui/skeleton'
8
+ import { cn } from '@/lib/utils'
9
+
10
+ interface ServiceStatus {
11
+ running: boolean
12
+ enabled: boolean
13
+ status?: string
14
+ uptime?: string
15
+ lastRestart?: string
16
+ memory?: string
17
+ cpu?: string
18
+ }
19
+
20
+ interface Props {
21
+ title?: string
22
+ description?: string
23
+ icon?: any
24
+ loading?: boolean
25
+ status?: ServiceStatus
26
+ serviceName?: string
27
+ light?: boolean
28
+ showUptime?: boolean
29
+ showMetrics?: boolean
30
+ maxHeight?: string
31
+ class?: string
32
+ }
33
+
34
+ const props = withDefaults(defineProps<Props>(), {
35
+ title: 'Service',
36
+ description: '',
37
+ loading: false,
38
+ status: () => ({ running: false, enabled: false }),
39
+ serviceName: '',
40
+ light: false,
41
+ showUptime: true,
42
+ showMetrics: false,
43
+ })
44
+
45
+ const emit = defineEmits<{
46
+ start: [serviceName: string]
47
+ stop: [serviceName: string]
48
+ restart: [serviceName: string]
49
+ enable: [serviceName: string]
50
+ disable: [serviceName: string]
51
+ view: [serviceName: string]
52
+ }>()
53
+
54
+ const statusIcon = computed(() => {
55
+ if (props.loading) return Clock
56
+
57
+ if (!props.status.enabled) {
58
+ return AlertCircle
59
+ }
60
+
61
+ if (props.status.running) {
62
+ return CheckCircle
63
+ }
64
+
65
+ return Info
66
+ })
67
+
68
+ const statusClass = computed(() => {
69
+ if (props.loading) return 'text-muted-foreground'
70
+
71
+ if (!props.status.enabled) {
72
+ return 'text-destructive'
73
+ }
74
+
75
+ if (props.status.running) {
76
+ return 'text-green-600'
77
+ }
78
+
79
+ return 'text-orange-600'
80
+ })
81
+
82
+ const statusBadgeVariant = computed(() => {
83
+ if (props.loading) return 'secondary'
84
+
85
+ if (!props.status.enabled) {
86
+ return 'destructive'
87
+ }
88
+
89
+ if (props.status.running) {
90
+ return 'default'
91
+ }
92
+
93
+ return 'secondary'
94
+ })
95
+
96
+ const statusText = computed(() => {
97
+ if (props.loading) return 'Loading...'
98
+
99
+ if (!props.status.enabled) {
100
+ return 'Disabled'
101
+ }
102
+
103
+ if (props.status.running) {
104
+ return props.status.status || 'Running'
105
+ }
106
+
107
+ return props.status.status || 'Stopped'
108
+ })
109
+
110
+ const containerClasses = computed(() => {
111
+ return cn('w-full', props.class)
112
+ })
113
+
114
+ const cardClasses = computed(() => {
115
+ return cn(
116
+ 'transition-all duration-200 hover:shadow-md',
117
+ props.light ? 'bg-background/95' : 'bg-background'
118
+ )
119
+ })
120
+
121
+ const iconClass = computed(() => {
122
+ return cn('h-8 w-8', statusClass.value)
123
+ })
124
+ </script>
125
+
126
+ <template>
127
+ <Card :class="cardClasses">
128
+ <CardHeader class="pb-3">
129
+ <div class="flex items-center justify-between">
130
+ <CardTitle class="flex items-center gap-3">
131
+ <component
132
+ v-if="icon"
133
+ :is="icon"
134
+ :class="iconClass"
135
+ />
136
+ <div>
137
+ <div class="text-lg font-semibold">{{ title }}</div>
138
+ <CardDescription v-if="description">
139
+ {{ description }}
140
+ </CardDescription>
141
+ </div>
142
+ </CardTitle>
143
+
144
+ <!-- Status badge -->
145
+ <Badge :variant="statusBadgeVariant">
146
+ {{ statusText }}
147
+ </Badge>
148
+ </div>
149
+ </CardHeader>
150
+
151
+ <CardContent class="space-y-4">
152
+ <!-- Loading state -->
153
+ <div v-if="loading" class="space-y-3">
154
+ <Skeleton class="h-4 w-3/4" />
155
+ <Skeleton class="h-4 w-1/2" />
156
+ <Skeleton class="h-4 w-2/3" />
157
+ </div>
158
+
159
+ <!-- Service details -->
160
+ <div v-else class="space-y-3">
161
+ <!-- Service name -->
162
+ <div v-if="serviceName" class="text-sm text-muted-foreground">
163
+ <span class="font-medium">Service:</span> {{ serviceName }}
164
+ </div>
165
+
166
+ <!-- Uptime -->
167
+ <div v-if="showUptime && status?.uptime" class="flex items-center gap-2">
168
+ <Clock class="h-4 w-4 text-muted-foreground" />
169
+ <span class="text-sm">
170
+ <span class="font-medium">Uptime:</span> {{ status.uptime }}
171
+ </span>
172
+ </div>
173
+
174
+ <!-- Last restart -->
175
+ <div v-if="status?.lastRestart" class="text-sm text-muted-foreground">
176
+ <span class="font-medium">Last restart:</span> {{ status.lastRestart }}
177
+ </div>
178
+
179
+ <!-- Metrics -->
180
+ <div v-if="showMetrics" class="grid grid-cols-2 gap-3">
181
+ <div v-if="status?.memory" class="text-sm">
182
+ <span class="font-medium">Memory:</span> {{ status.memory }}
183
+ </div>
184
+ <div v-if="status?.cpu" class="text-sm">
185
+ <span class="font-medium">CPU:</span> {{ status.cpu }}
186
+ </div>
187
+ </div>
188
+
189
+ <!-- Custom status message -->
190
+ <div v-if="status?.status && status?.status !== statusText" class="text-sm">
191
+ {{ status.status }}
192
+ </div>
193
+ </div>
194
+
195
+ <!-- Action buttons -->
196
+ <div class="flex items-center justify-between pt-4 border-t">
197
+ <div class="flex gap-2">
198
+ <Button
199
+ v-if="status?.enabled && !status?.running"
200
+ variant="default"
201
+ size="sm"
202
+ @click="emit('start', serviceName)"
203
+ >
204
+ Start
205
+ </Button>
206
+ <Button
207
+ v-if="status?.enabled && status?.running"
208
+ variant="outline"
209
+ size="sm"
210
+ @click="emit('stop', serviceName)"
211
+ >
212
+ Stop
213
+ </Button>
214
+ <Button
215
+ v-if="status?.enabled"
216
+ variant="outline"
217
+ size="sm"
218
+ @click="emit('restart', serviceName)"
219
+ >
220
+ Restart
221
+ </Button>
222
+ <Button
223
+ v-if="!status?.enabled"
224
+ variant="default"
225
+ size="sm"
226
+ @click="emit('enable', serviceName)"
227
+ >
228
+ Enable
229
+ </Button>
230
+ <Button
231
+ v-if="status?.enabled"
232
+ variant="destructive"
233
+ size="sm"
234
+ @click="emit('disable', serviceName)"
235
+ >
236
+ Disable
237
+ </Button>
238
+ </div>
239
+
240
+ <Button
241
+ variant="ghost"
242
+ size="sm"
243
+ @click="emit('view', serviceName)"
244
+ >
245
+ <MoreHorizontal class="h-4 w-4" />
246
+ </Button>
247
+ </div>
248
+ </CardContent>
249
+ </Card>
250
+ </template>
@@ -0,0 +1,104 @@
1
+ <script setup lang="ts">
2
+ import { computed, useId } from 'vue'
3
+ import { CheckboxIndicator, CheckboxRoot } from 'radix-vue'
4
+ import { Check } from 'lucide-vue-next'
5
+ import { cn } from '@/lib/utils'
6
+
7
+ interface Props {
8
+ id?: string
9
+ checked?: boolean
10
+ defaultChecked?: boolean
11
+ disabled?: boolean
12
+ required?: boolean
13
+ name?: string
14
+ value?: string
15
+ label?: string
16
+ hideLabel?: boolean
17
+ description?: string
18
+ errorMessage?: string
19
+ indeterminate?: boolean
20
+ class?: string
21
+ }
22
+
23
+ const props = withDefaults(defineProps<Props>(), {})
24
+
25
+ const emit = defineEmits<{
26
+ 'update:checked': [value: boolean]
27
+ }>()
28
+
29
+ const uniqueId = useId()
30
+ const checkboxId = props.id || uniqueId
31
+
32
+ const isChecked = computed({
33
+ get: () => props.checked ?? false,
34
+ set: (value: boolean) => {
35
+ emit('update:checked', value)
36
+ }
37
+ })
38
+ </script>
39
+
40
+ <template>
41
+ <div :class="cn('flex items-start space-x-2', props.class)">
42
+ <CheckboxRoot
43
+ :id="checkboxId"
44
+ v-model:checked="isChecked"
45
+ :default-checked="defaultChecked"
46
+ :disabled="disabled"
47
+ :required="required"
48
+ :name="name"
49
+ :value="value"
50
+ :class="cn(
51
+ 'peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
52
+ {
53
+ 'border-destructive': errorMessage,
54
+ 'data-[state=checked]:bg-destructive data-[state=checked]:text-destructive-foreground': errorMessage
55
+ }
56
+ )"
57
+ :data-indeterminate="indeterminate"
58
+ >
59
+ <CheckboxIndicator
60
+ :class="cn('flex items-center justify-center text-current', {
61
+ 'opacity-50': indeterminate
62
+ })"
63
+ >
64
+ <Check v-if="!indeterminate" class="h-4 w-4" />
65
+ <div v-else class="h-1 w-2 bg-current rounded-sm" />
66
+ </CheckboxIndicator>
67
+ </CheckboxRoot>
68
+
69
+ <div class="grid gap-1.5">
70
+ <label
71
+ v-if="label || $slots.label"
72
+ :for="checkboxId"
73
+ :class="cn(
74
+ 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer',
75
+ {
76
+ 'sr-only': hideLabel,
77
+ 'cursor-not-allowed': disabled,
78
+ 'text-destructive': errorMessage
79
+ }
80
+ )"
81
+ >
82
+ <slot name="label">{{ label }}</slot>
83
+ </label>
84
+
85
+ <p
86
+ v-if="description"
87
+ :class="cn('text-sm text-muted-foreground', {
88
+ 'text-destructive': errorMessage
89
+ })"
90
+ >
91
+ {{ description }}
92
+ </p>
93
+
94
+ <p
95
+ v-if="errorMessage"
96
+ class="text-sm text-destructive"
97
+ >
98
+ {{ errorMessage }}
99
+ </p>
100
+
101
+ <slot name="extra" />
102
+ </div>
103
+ </div>
104
+ </template>