@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,26 @@
1
+ <script setup lang="ts">
2
+ import type { TabsTriggerProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import { TabsTrigger, useForwardProps } from "reka-ui"
6
+ import { cn } from "@/lib/utils"
7
+
8
+ const props = defineProps<TabsTriggerProps & { class?: HTMLAttributes["class"] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, "class")
11
+
12
+ const forwardedProps = useForwardProps(delegatedProps)
13
+ </script>
14
+
15
+ <template>
16
+ <TabsTrigger
17
+ data-slot="tabs-trigger"
18
+ :class="cn(
19
+ 'data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
20
+ props.class,
21
+ )"
22
+ v-bind="forwardedProps"
23
+ >
24
+ <slot />
25
+ </TabsTrigger>
26
+ </template>
@@ -0,0 +1,114 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import { X } from 'lucide-vue-next'
4
+ import { cn } from '@/lib/utils'
5
+ import { tagVariants, type TagVariants } from '.'
6
+
7
+ interface Props {
8
+ label?: string
9
+ variant?: TagVariants['variant']
10
+ size?: TagVariants['size']
11
+ interactive?: boolean
12
+ removable?: boolean
13
+ disabled?: boolean
14
+ icon?: string // SVG icon string or component
15
+ clearAriaLabel?: string
16
+ title?: string
17
+ class?: string
18
+ }
19
+
20
+ const props = withDefaults(defineProps<Props>(), {
21
+ variant: 'default',
22
+ size: 'default',
23
+ interactive: false,
24
+ removable: false,
25
+ clearAriaLabel: 'Remove tag',
26
+ })
27
+
28
+ const emit = defineEmits<{
29
+ remove: []
30
+ click: [event: Event]
31
+ }>()
32
+
33
+ const isClickable = computed(() => props.interactive && !props.disabled)
34
+ const isFilter = computed(() => props.removable)
35
+
36
+ const handleClick = (event: Event) => {
37
+ if (isClickable.value) {
38
+ emit('click', event)
39
+ }
40
+ }
41
+
42
+ const handleRemove = (event: Event) => {
43
+ event.stopPropagation()
44
+ if (!props.disabled) {
45
+ emit('remove')
46
+ }
47
+ }
48
+
49
+ const handleKeydown = (event: KeyboardEvent) => {
50
+ if (isFilter.value && (event.key === 'Enter' || event.key === ' ')) {
51
+ event.preventDefault()
52
+ handleRemove(event)
53
+ }
54
+ }
55
+ </script>
56
+
57
+ <template>
58
+ <component
59
+ :is="isClickable ? 'button' : 'div'"
60
+ :class="cn(
61
+ tagVariants({ variant, size, interactive }),
62
+ {
63
+ 'opacity-50 cursor-not-allowed': disabled,
64
+ 'cursor-default': isFilter && !interactive,
65
+ },
66
+ props.class
67
+ )"
68
+ :disabled="disabled"
69
+ :title="title || label"
70
+ @click="handleClick"
71
+ @keydown="handleKeydown"
72
+ :aria-label="label"
73
+ role="button"
74
+ tabindex="0"
75
+ >
76
+ <!-- Icon slot/component -->
77
+ <div v-if="icon && !isFilter" class="flex items-center justify-center">
78
+ <component
79
+ v-if="typeof icon === 'object'"
80
+ :is="icon"
81
+ class="h-3 w-3"
82
+ />
83
+ <div
84
+ v-else-if="typeof icon === 'string'"
85
+ v-html="icon"
86
+ class="h-3 w-3"
87
+ />
88
+ </div>
89
+
90
+ <!-- Label content -->
91
+ <span class="truncate max-w-[200px]">
92
+ <slot>{{ label }}</slot>
93
+ </span>
94
+
95
+ <!-- Remove button for filter tags -->
96
+ <button
97
+ v-if="isFilter"
98
+ type="button"
99
+ :class="cn(
100
+ 'flex items-center justify-center rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-colors',
101
+ 'ml-1 -mr-1 h-4 w-4 p-0',
102
+ {
103
+ 'opacity-50 cursor-not-allowed': disabled,
104
+ }
105
+ )"
106
+ :disabled="disabled"
107
+ :aria-label="clearAriaLabel"
108
+ :title="clearAriaLabel"
109
+ @click="handleRemove"
110
+ >
111
+ <X class="h-3 w-3" />
112
+ </button>
113
+ </component>
114
+ </template>
@@ -0,0 +1,269 @@
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>
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { useVModel } from "@vueuse/core"
4
+ import { cn } from "@/lib/utils"
5
+
6
+ const props = defineProps<{
7
+ class?: HTMLAttributes["class"]
8
+ defaultValue?: string | number
9
+ modelValue?: string | number
10
+ }>()
11
+
12
+ const emits = defineEmits<{
13
+ (e: "update:modelValue", payload: string | number): void
14
+ }>()
15
+
16
+ const modelValue = useVModel(props, "modelValue", emits, {
17
+ passive: true,
18
+ defaultValue: props.defaultValue,
19
+ })
20
+ </script>
21
+
22
+ <template>
23
+ <textarea
24
+ v-model="modelValue"
25
+ data-slot="textarea"
26
+ :class="cn('border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', props.class)"
27
+ />
28
+ </template>
@@ -0,0 +1,126 @@
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>
@@ -0,0 +1,19 @@
1
+ <script setup lang="ts">
2
+ import type { TooltipRootEmits, TooltipRootProps } from "reka-ui"
3
+ import { TooltipRoot, useForwardPropsEmits } from "reka-ui"
4
+
5
+ const props = defineProps<TooltipRootProps>()
6
+ const emits = defineEmits<TooltipRootEmits>()
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits)
9
+ </script>
10
+
11
+ <template>
12
+ <TooltipRoot
13
+ v-slot="slotProps"
14
+ data-slot="tooltip"
15
+ v-bind="forwarded"
16
+ >
17
+ <slot v-bind="slotProps" />
18
+ </TooltipRoot>
19
+ </template>
@@ -0,0 +1,34 @@
1
+ <script setup lang="ts">
2
+ import type { TooltipContentEmits, TooltipContentProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import { TooltipArrow, TooltipContent, TooltipPortal, useForwardPropsEmits } from "reka-ui"
6
+ import { cn } from "@/lib/utils"
7
+
8
+ defineOptions({
9
+ inheritAttrs: false,
10
+ })
11
+
12
+ const props = withDefaults(defineProps<TooltipContentProps & { class?: HTMLAttributes["class"] }>(), {
13
+ sideOffset: 4,
14
+ })
15
+
16
+ const emits = defineEmits<TooltipContentEmits>()
17
+
18
+ const delegatedProps = reactiveOmit(props, "class")
19
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
20
+ </script>
21
+
22
+ <template>
23
+ <TooltipPortal>
24
+ <TooltipContent
25
+ data-slot="tooltip-content"
26
+ v-bind="{ ...forwarded, ...$attrs }"
27
+ :class="cn('bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance', props.class)"
28
+ >
29
+ <slot />
30
+
31
+ <TooltipArrow class="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
32
+ </TooltipContent>
33
+ </TooltipPortal>
34
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import type { TooltipProviderProps } from "reka-ui"
3
+ import { TooltipProvider } from "reka-ui"
4
+
5
+ const props = withDefaults(defineProps<TooltipProviderProps>(), {
6
+ delayDuration: 0,
7
+ })
8
+ </script>
9
+
10
+ <template>
11
+ <TooltipProvider v-bind="props">
12
+ <slot />
13
+ </TooltipProvider>
14
+ </template>
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { TooltipTriggerProps } from "reka-ui"
3
+ import { TooltipTrigger } from "reka-ui"
4
+
5
+ const props = defineProps<TooltipTriggerProps>()
6
+ </script>
7
+
8
+ <template>
9
+ <TooltipTrigger
10
+ data-slot="tooltip-trigger"
11
+ v-bind="props"
12
+ >
13
+ <slot />
14
+ </TooltipTrigger>
15
+ </template>