ikoncomponents 1.5.5 → 1.5.7

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 (423) hide show
  1. package/README.md +36 -36
  2. package/dist/hooks/use-mobile.d.ts +1 -0
  3. package/dist/hooks/use-mobile.js +15 -0
  4. package/dist/ikoncomponents/action-menu/index.d.ts +5 -0
  5. package/dist/ikoncomponents/action-menu/index.js +42 -0
  6. package/dist/ikoncomponents/action-menu/type.d.ts +14 -0
  7. package/dist/ikoncomponents/action-menu/type.js +1 -0
  8. package/dist/ikoncomponents/activity-sheet/index.d.ts +11 -0
  9. package/dist/ikoncomponents/activity-sheet/index.js +23 -0
  10. package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +21 -0
  11. package/dist/ikoncomponents/alert-dialog/dialog-context.js +30 -0
  12. package/dist/ikoncomponents/alert-dialog/index.d.ts +14 -0
  13. package/dist/ikoncomponents/alert-dialog/index.js +20 -0
  14. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +18 -0
  15. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +43 -0
  16. package/dist/ikoncomponents/app-breadcrumb/index.d.ts +5 -0
  17. package/dist/ikoncomponents/app-breadcrumb/index.js +57 -0
  18. package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +5 -0
  19. package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +16 -0
  20. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +2 -0
  21. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +39 -0
  22. package/dist/ikoncomponents/big-calendar/index.d.ts +3 -0
  23. package/dist/ikoncomponents/big-calendar/index.js +35 -0
  24. package/dist/ikoncomponents/big-calendar/type.d.ts +31 -0
  25. package/dist/ikoncomponents/big-calendar/type.js +1 -0
  26. package/dist/ikoncomponents/buttons/index.d.ts +18 -0
  27. package/dist/ikoncomponents/buttons/index.js +38 -0
  28. package/dist/ikoncomponents/combobox-input/index.d.ts +2 -0
  29. package/dist/ikoncomponents/combobox-input/index.js +18 -0
  30. package/dist/ikoncomponents/combobox-input/type.d.ts +13 -0
  31. package/dist/ikoncomponents/combobox-input/type.js +1 -0
  32. package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +21 -0
  33. package/dist/ikoncomponents/custom-combo-dropdown/index.js +85 -0
  34. package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +2 -0
  35. package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +22 -0
  36. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +2 -0
  37. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +35 -0
  38. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +2 -0
  39. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +38 -0
  40. package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +2 -0
  41. package/dist/ikoncomponents/data-table/datatable-pagination/index.js +13 -0
  42. package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +2 -0
  43. package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +18 -0
  44. package/dist/ikoncomponents/data-table/function.d.ts +1 -0
  45. package/dist/ikoncomponents/data-table/function.js +6 -0
  46. package/dist/ikoncomponents/data-table/index.d.ts +2 -0
  47. package/dist/ikoncomponents/data-table/index.js +223 -0
  48. package/dist/ikoncomponents/data-table/type.d.ts +60 -0
  49. package/dist/ikoncomponents/data-table/type.js +1 -0
  50. package/dist/ikoncomponents/e-chart/index.d.ts +15 -0
  51. package/dist/ikoncomponents/e-chart/index.js +115 -0
  52. package/dist/ikoncomponents/file-input/index.d.ts +1 -0
  53. package/dist/ikoncomponents/file-input/index.js +21 -0
  54. package/dist/ikoncomponents/fileUpload/index.d.ts +15 -0
  55. package/dist/ikoncomponents/fileUpload/index.js +69 -0
  56. package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +2 -0
  57. package/dist/ikoncomponents/form-fields/combobox-input/index.js +21 -0
  58. package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +18 -0
  59. package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +26 -0
  60. package/dist/ikoncomponents/form-fields/date-input/index.d.ts +2 -0
  61. package/dist/ikoncomponents/form-fields/date-input/index.js +15 -0
  62. package/dist/ikoncomponents/form-fields/file-input/index.d.ts +1 -0
  63. package/dist/ikoncomponents/form-fields/file-input/index.js +4 -0
  64. package/dist/ikoncomponents/form-fields/input/index.d.ts +2 -0
  65. package/dist/ikoncomponents/form-fields/input/index.js +18 -0
  66. package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +6 -0
  67. package/{templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx → dist/ikoncomponents/form-fields/multi-combobox-input/index.js} +381 -574
  68. package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +2 -0
  69. package/dist/ikoncomponents/form-fields/otp-input/index.js +18 -0
  70. package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +1 -0
  71. package/dist/ikoncomponents/form-fields/phone-input/index.js +4 -0
  72. package/dist/ikoncomponents/form-fields/textarea/index.d.ts +2 -0
  73. package/dist/ikoncomponents/form-fields/textarea/index.js +18 -0
  74. package/dist/ikoncomponents/form-fields/types/index.d.ts +36 -0
  75. package/dist/ikoncomponents/form-fields/types/index.js +1 -0
  76. package/dist/ikoncomponents/glowing-effect/index.d.ts +14 -0
  77. package/dist/ikoncomponents/glowing-effect/index.js +84 -0
  78. package/dist/ikoncomponents/icon/index.d.ts +8 -0
  79. package/dist/ikoncomponents/icon/index.js +23 -0
  80. package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +15 -0
  81. package/{templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx → dist/ikoncomponents/image-cropper-upload/components/newCropper.js} +85 -117
  82. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +7 -0
  83. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +145 -0
  84. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +6 -0
  85. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +92 -0
  86. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +6 -0
  87. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +14 -0
  88. package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +14 -0
  89. package/{templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx → dist/ikoncomponents/image-cropper-upload/image-cropper/index.js} +87 -119
  90. package/dist/ikoncomponents/image-cropper-upload/index.d.ts +27 -0
  91. package/dist/ikoncomponents/image-cropper-upload/index.js +49 -0
  92. package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +16 -0
  93. package/dist/ikoncomponents/image-cropper-upload/utils/index.js +73 -0
  94. package/dist/ikoncomponents/loading-spinner/index.d.ts +9 -0
  95. package/dist/ikoncomponents/loading-spinner/index.js +19 -0
  96. package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +10 -0
  97. package/dist/ikoncomponents/main-layout/RefreshContext.js +17 -0
  98. package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +33 -0
  99. package/dist/ikoncomponents/main-layout/SidebarNavContext.js +52 -0
  100. package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +3 -0
  101. package/dist/ikoncomponents/main-layout/app-sidebar.js +24 -0
  102. package/dist/ikoncomponents/main-layout/footer.d.ts +1 -0
  103. package/dist/ikoncomponents/main-layout/footer.js +5 -0
  104. package/dist/ikoncomponents/main-layout/header.d.ts +3 -0
  105. package/dist/ikoncomponents/main-layout/header.js +15 -0
  106. package/dist/ikoncomponents/main-layout/index.d.ts +6 -0
  107. package/dist/ikoncomponents/main-layout/index.js +11 -0
  108. package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +60 -0
  109. package/dist/ikoncomponents/main-layout/main-sidebar.js +119 -0
  110. package/dist/ikoncomponents/main-layout/nav-main.d.ts +11 -0
  111. package/dist/ikoncomponents/main-layout/nav-main.js +33 -0
  112. package/dist/ikoncomponents/multi-combobox/index.d.ts +13 -0
  113. package/dist/ikoncomponents/multi-combobox/index.js +202 -0
  114. package/dist/ikoncomponents/no-data/index.d.ts +3 -0
  115. package/dist/ikoncomponents/no-data/index.js +5 -0
  116. package/dist/ikoncomponents/page-wrapper/index.d.ts +9 -0
  117. package/dist/ikoncomponents/page-wrapper/index.js +7 -0
  118. package/dist/ikoncomponents/password-strength-meter/index.d.ts +3 -0
  119. package/dist/ikoncomponents/password-strength-meter/index.js +40 -0
  120. package/dist/ikoncomponents/phone-input/index.d.ts +1 -0
  121. package/dist/ikoncomponents/phone-input/index.js +41 -0
  122. package/dist/ikoncomponents/provider-wrapper/index.d.ts +6 -0
  123. package/dist/ikoncomponents/provider-wrapper/index.js +11 -0
  124. package/dist/ikoncomponents/search-input/index.d.ts +1 -0
  125. package/dist/ikoncomponents/search-input/index.js +19 -0
  126. package/dist/ikoncomponents/sheet/index.d.ts +10 -0
  127. package/dist/ikoncomponents/sheet/index.js +6 -0
  128. package/dist/ikoncomponents/simple-widget/index.d.ts +14 -0
  129. package/dist/ikoncomponents/simple-widget/index.js +14 -0
  130. package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +5 -0
  131. package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +6 -0
  132. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +3 -0
  133. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +5 -0
  134. package/dist/ikoncomponents/tabs/index.d.ts +2 -0
  135. package/dist/ikoncomponents/tabs/index.js +50 -0
  136. package/{templates/default/ikoncomponents/tabs/type.ts → dist/ikoncomponents/tabs/type.d.ts} +19 -20
  137. package/dist/ikoncomponents/tabs/type.js +2 -0
  138. package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +1 -0
  139. package/{templates/default/ikoncomponents/theme-toggle-btn/index.tsx → dist/ikoncomponents/theme-toggle-btn/index.js} +118 -189
  140. package/dist/ikoncomponents/title-progress/index.d.ts +12 -0
  141. package/dist/ikoncomponents/title-progress/index.js +10 -0
  142. package/dist/ikoncomponents/tooltip/index.d.ts +5 -0
  143. package/dist/ikoncomponents/tooltip/index.js +5 -0
  144. package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +31 -0
  145. package/dist/ikoncomponents/twolevel-dropdown/index.js +143 -0
  146. package/dist/ikoncomponents/upload-tab/index.d.ts +1 -0
  147. package/dist/ikoncomponents/upload-tab/index.js +92 -0
  148. package/dist/ikoncomponents/widgets/index.d.ts +2 -0
  149. package/dist/ikoncomponents/widgets/index.js +14 -0
  150. package/dist/ikoncomponents/widgets/type.d.ts +10 -0
  151. package/dist/ikoncomponents/widgets/type.js +2 -0
  152. package/dist/ikoncomponents/work-in-progress/index.d.ts +1 -0
  153. package/dist/ikoncomponents/work-in-progress/index.js +4 -0
  154. package/dist/index.d.ts +138 -0
  155. package/dist/index.js +116 -14
  156. package/dist/shadcn/accordion.d.ts +7 -0
  157. package/dist/shadcn/accordion.js +33 -0
  158. package/dist/shadcn/alert-dialog.d.ts +20 -0
  159. package/dist/shadcn/alert-dialog.js +83 -0
  160. package/dist/shadcn/alert.d.ts +9 -0
  161. package/dist/shadcn/alert.js +38 -0
  162. package/dist/shadcn/aspect-ratio.d.ts +3 -0
  163. package/dist/shadcn/aspect-ratio.js +19 -0
  164. package/dist/shadcn/avatar.d.ts +6 -0
  165. package/dist/shadcn/avatar.js +28 -0
  166. package/dist/shadcn/badge.d.ts +9 -0
  167. package/dist/shadcn/badge.js +35 -0
  168. package/dist/shadcn/breadcrumb.d.ts +11 -0
  169. package/dist/shadcn/breadcrumb.js +45 -0
  170. package/dist/shadcn/button.d.ts +10 -0
  171. package/dist/shadcn/button.js +47 -0
  172. package/dist/shadcn/calendar.d.ts +8 -0
  173. package/dist/shadcn/calendar.js +61 -0
  174. package/dist/shadcn/card.d.ts +9 -0
  175. package/dist/shadcn/card.js +42 -0
  176. package/dist/shadcn/checkbox.d.ts +4 -0
  177. package/dist/shadcn/checkbox.js +21 -0
  178. package/dist/shadcn/collapsible.d.ts +5 -0
  179. package/dist/shadcn/collapsible.js +27 -0
  180. package/dist/shadcn/command.d.ts +18 -0
  181. package/dist/shadcn/command.js +54 -0
  182. package/dist/shadcn/date-input.d.ts +7 -0
  183. package/dist/shadcn/date-input.js +179 -0
  184. package/dist/shadcn/date-range-picker.d.ts +24 -0
  185. package/dist/shadcn/date-range-picker.js +45 -0
  186. package/dist/shadcn/dialog.d.ts +15 -0
  187. package/dist/shadcn/dialog.js +57 -0
  188. package/dist/shadcn/drawer.d.ts +13 -0
  189. package/dist/shadcn/drawer.js +56 -0
  190. package/dist/shadcn/dropdown-menu.d.ts +25 -0
  191. package/dist/shadcn/dropdown-menu.js +77 -0
  192. package/dist/shadcn/form.d.ts +24 -0
  193. package/dist/shadcn/form.js +70 -0
  194. package/dist/shadcn/hover-card.d.ts +6 -0
  195. package/dist/shadcn/hover-card.js +28 -0
  196. package/dist/shadcn/input-otp.d.ts +34 -0
  197. package/dist/shadcn/input-otp.js +40 -0
  198. package/dist/shadcn/input.d.ts +3 -0
  199. package/dist/shadcn/input.js +18 -0
  200. package/dist/shadcn/label.d.ts +4 -0
  201. package/dist/shadcn/label.js +20 -0
  202. package/dist/shadcn/navigation-menu.d.ts +16 -0
  203. package/dist/shadcn/navigation-menu.js +74 -0
  204. package/dist/shadcn/popover.d.ts +7 -0
  205. package/dist/shadcn/popover.js +32 -0
  206. package/dist/shadcn/progress.d.ts +8 -0
  207. package/dist/shadcn/progress.js +23 -0
  208. package/dist/shadcn/radio-group.d.ts +5 -0
  209. package/dist/shadcn/radio-group.js +25 -0
  210. package/dist/shadcn/scroll-area.d.ts +5 -0
  211. package/dist/shadcn/scroll-area.js +26 -0
  212. package/dist/shadcn/select.d.ts +15 -0
  213. package/dist/shadcn/select.js +59 -0
  214. package/dist/shadcn/separator.d.ts +4 -0
  215. package/dist/shadcn/separator.js +20 -0
  216. package/dist/shadcn/sheet.d.ts +13 -0
  217. package/dist/shadcn/sheet.js +61 -0
  218. package/dist/shadcn/sidebar.d.ts +69 -0
  219. package/dist/shadcn/sidebar.js +242 -0
  220. package/dist/shadcn/skeleton.d.ts +3 -0
  221. package/dist/shadcn/skeleton.js +18 -0
  222. package/dist/shadcn/slider.d.ts +4 -0
  223. package/dist/shadcn/slider.js +26 -0
  224. package/dist/shadcn/sonner.d.ts +3 -0
  225. package/dist/shadcn/sonner.js +25 -0
  226. package/dist/shadcn/switch.d.ts +4 -0
  227. package/dist/shadcn/switch.js +20 -0
  228. package/dist/shadcn/table.d.ts +10 -0
  229. package/dist/shadcn/table.js +47 -0
  230. package/dist/shadcn/tabs.d.ts +7 -0
  231. package/dist/shadcn/tabs.js +32 -0
  232. package/dist/shadcn/textarea.d.ts +3 -0
  233. package/dist/shadcn/textarea.js +18 -0
  234. package/dist/shadcn/toggle-group.d.ts +9 -0
  235. package/dist/shadcn/toggle-group.js +35 -0
  236. package/dist/shadcn/toggle.d.ts +9 -0
  237. package/dist/shadcn/toggle.js +38 -0
  238. package/dist/shadcn/tooltip.d.ts +7 -0
  239. package/dist/shadcn/tooltip.js +32 -0
  240. package/dist/shadcn/workflow.d.ts +20 -0
  241. package/dist/shadcn/workflow.js +20 -0
  242. package/dist/styles.css +6163 -0
  243. package/dist/utils/actions/account/index.d.ts +5 -0
  244. package/dist/utils/actions/account/index.js +28 -0
  245. package/dist/utils/actions/account/type.d.ts +4 -0
  246. package/dist/utils/actions/account/type.js +1 -0
  247. package/dist/utils/actions/auth/index.d.ts +7 -0
  248. package/{templates/default/utils/actions/auth/index.ts → dist/utils/actions/auth/index.js} +58 -69
  249. package/dist/utils/actions/common/utils.d.ts +5 -0
  250. package/{templates/default/utils/actions/common/utils.ts → dist/utils/actions/common/utils.js} +25 -28
  251. package/dist/utils/actions/software/index.d.ts +11 -0
  252. package/dist/utils/actions/software/index.js +75 -0
  253. package/dist/utils/api/accountService/index.d.ts +23 -0
  254. package/dist/utils/api/accountService/index.js +64 -0
  255. package/dist/utils/api/accountService/type.d.ts +4 -0
  256. package/dist/utils/api/accountService/type.js +1 -0
  257. package/dist/utils/api/file-upload/index.d.ts +5 -0
  258. package/dist/utils/api/file-upload/index.js +80 -0
  259. package/dist/utils/api/file-upload/type.d.ts +6 -0
  260. package/dist/utils/api/file-upload/type.js +1 -0
  261. package/dist/utils/api/ikonBaseApi.d.ts +12 -0
  262. package/{templates/default/utils/api/ikonBaseApi.ts → dist/utils/api/ikonBaseApi.js} +104 -132
  263. package/dist/utils/api/loginService/index.d.ts +12 -0
  264. package/dist/utils/api/loginService/index.js +72 -0
  265. package/{templates/default/utils/api/loginService/type.ts → dist/utils/api/loginService/type.d.ts} +31 -35
  266. package/dist/utils/api/loginService/type.js +1 -0
  267. package/dist/utils/api/softwareService/index.d.ts +64 -0
  268. package/dist/utils/api/softwareService/index.js +212 -0
  269. package/dist/utils/api/softwareService/type.d.ts +54 -0
  270. package/dist/utils/api/softwareService/type.js +1 -0
  271. package/dist/utils/border-radius-provider.d.ts +11 -0
  272. package/{templates/default/utils/border-radius-provider.tsx → dist/utils/border-radius-provider.js} +35 -59
  273. package/dist/utils/cn.d.ts +2 -0
  274. package/dist/utils/cn.js +5 -0
  275. package/dist/utils/font-provider.d.ts +11 -0
  276. package/{templates/default/utils/font-provider.tsx → dist/utils/font-provider.js} +37 -61
  277. package/dist/utils/session/cookieSession.d.ts +8 -0
  278. package/dist/utils/session/cookieSession.js +33 -0
  279. package/dist/utils/theme-provider/index.d.ts +3 -0
  280. package/dist/utils/theme-provider/index.js +18 -0
  281. package/dist/utils/token-management/index.d.ts +10 -0
  282. package/dist/utils/token-management/index.js +69 -0
  283. package/dist/utils/token-management/types.d.ts +6 -0
  284. package/dist/utils/token-management/types.js +1 -0
  285. package/package.json +91 -17
  286. package/bin.js +0 -2
  287. package/dist/commands/init.js +0 -63
  288. package/dist/utlis/copyDir.js +0 -7
  289. package/templates/default/hooks/use-mobile.ts +0 -19
  290. package/templates/default/ikoncomponents/action-menu/index.tsx +0 -108
  291. package/templates/default/ikoncomponents/action-menu/type.ts +0 -18
  292. package/templates/default/ikoncomponents/activity-sheet/index.tsx +0 -63
  293. package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +0 -65
  294. package/templates/default/ikoncomponents/alert-dialog/index.tsx +0 -80
  295. package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +0 -68
  296. package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +0 -222
  297. package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +0 -38
  298. package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +0 -81
  299. package/templates/default/ikoncomponents/big-calendar/index.css +0 -879
  300. package/templates/default/ikoncomponents/big-calendar/index.tsx +0 -59
  301. package/templates/default/ikoncomponents/big-calendar/type.ts +0 -37
  302. package/templates/default/ikoncomponents/buttons/index.tsx +0 -127
  303. package/templates/default/ikoncomponents/combobox-input/index.tsx +0 -75
  304. package/templates/default/ikoncomponents/combobox-input/type.ts +0 -14
  305. package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +0 -242
  306. package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +0 -80
  307. package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +0 -149
  308. package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +0 -98
  309. package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +0 -119
  310. package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +0 -45
  311. package/templates/default/ikoncomponents/data-table/function.ts +0 -7
  312. package/templates/default/ikoncomponents/data-table/index.tsx +0 -549
  313. package/templates/default/ikoncomponents/data-table/type.ts +0 -75
  314. package/templates/default/ikoncomponents/e-chart/index.tsx +0 -183
  315. package/templates/default/ikoncomponents/file-input/index.tsx +0 -27
  316. package/templates/default/ikoncomponents/fileUpload/index.tsx +0 -121
  317. package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +0 -111
  318. package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +0 -121
  319. package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +0 -80
  320. package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +0 -9
  321. package/templates/default/ikoncomponents/form-fields/input/index.tsx +0 -27
  322. package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +0 -39
  323. package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +0 -52
  324. package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +0 -7
  325. package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +0 -28
  326. package/templates/default/ikoncomponents/form-fields/types/index.ts +0 -46
  327. package/templates/default/ikoncomponents/glowing-effect/index.tsx +0 -171
  328. package/templates/default/ikoncomponents/icon/index.tsx +0 -22
  329. package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +0 -19
  330. package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +0 -352
  331. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +0 -250
  332. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +0 -32
  333. package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +0 -95
  334. package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +0 -117
  335. package/templates/default/ikoncomponents/loading-spinner/index.tsx +0 -43
  336. package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +0 -30
  337. package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +0 -103
  338. package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +0 -36
  339. package/templates/default/ikoncomponents/main-layout/footer.tsx +0 -21
  340. package/templates/default/ikoncomponents/main-layout/header.tsx +0 -53
  341. package/templates/default/ikoncomponents/main-layout/index.tsx +0 -38
  342. package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +0 -389
  343. package/templates/default/ikoncomponents/main-layout/nav-main.tsx +0 -103
  344. package/templates/default/ikoncomponents/multi-combobox/index.tsx +0 -345
  345. package/templates/default/ikoncomponents/no-data/index.tsx +0 -11
  346. package/templates/default/ikoncomponents/page-wrapper/index.tsx +0 -30
  347. package/templates/default/ikoncomponents/password-strength-meter/index.tsx +0 -49
  348. package/templates/default/ikoncomponents/phone-input/index.tsx +0 -72
  349. package/templates/default/ikoncomponents/provider-wrapper/index.tsx +0 -32
  350. package/templates/default/ikoncomponents/search-input/index.tsx +0 -18
  351. package/templates/default/ikoncomponents/sheet/index.tsx +0 -34
  352. package/templates/default/ikoncomponents/simple-widget/index.tsx +0 -54
  353. package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +0 -34
  354. package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +0 -13
  355. package/templates/default/ikoncomponents/tabs/index.tsx +0 -139
  356. package/templates/default/ikoncomponents/title-progress/index.tsx +0 -41
  357. package/templates/default/ikoncomponents/tooltip/index.tsx +0 -17
  358. package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +0 -33
  359. package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +0 -279
  360. package/templates/default/ikoncomponents/upload-tab/index.tsx +0 -237
  361. package/templates/default/ikoncomponents/widgets/index.tsx +0 -81
  362. package/templates/default/ikoncomponents/widgets/type.ts +0 -11
  363. package/templates/default/ikoncomponents/work-in-progress/index.tsx +0 -16
  364. package/templates/default/shadcn/accordion.tsx +0 -66
  365. package/templates/default/shadcn/alert-dialog.tsx +0 -179
  366. package/templates/default/shadcn/alert.tsx +0 -66
  367. package/templates/default/shadcn/aspect-ratio.tsx +0 -11
  368. package/templates/default/shadcn/avatar.tsx +0 -53
  369. package/templates/default/shadcn/badge.tsx +0 -49
  370. package/templates/default/shadcn/breadcrumb.tsx +0 -109
  371. package/templates/default/shadcn/button.tsx +0 -64
  372. package/templates/default/shadcn/calendar.tsx +0 -227
  373. package/templates/default/shadcn/card.tsx +0 -92
  374. package/templates/default/shadcn/checkbox.tsx +0 -33
  375. package/templates/default/shadcn/collapsible.tsx +0 -33
  376. package/templates/default/shadcn/command.tsx +0 -184
  377. package/templates/default/shadcn/date-input.tsx +0 -259
  378. package/templates/default/shadcn/date-range-picker.tsx +0 -103
  379. package/templates/default/shadcn/dialog.tsx +0 -143
  380. package/templates/default/shadcn/drawer.tsx +0 -134
  381. package/templates/default/shadcn/dropdown-menu.tsx +0 -259
  382. package/templates/default/shadcn/form.tsx +0 -166
  383. package/templates/default/shadcn/hover-card.tsx +0 -44
  384. package/templates/default/shadcn/input-otp.tsx +0 -71
  385. package/templates/default/shadcn/input.tsx +0 -22
  386. package/templates/default/shadcn/label.tsx +0 -24
  387. package/templates/default/shadcn/navigation-menu.tsx +0 -195
  388. package/templates/default/shadcn/popover.tsx +0 -48
  389. package/templates/default/shadcn/progress.tsx +0 -40
  390. package/templates/default/shadcn/radio-group.tsx +0 -45
  391. package/templates/default/shadcn/scroll-area.tsx +0 -58
  392. package/templates/default/shadcn/select.tsx +0 -184
  393. package/templates/default/shadcn/separator.tsx +0 -28
  394. package/templates/default/shadcn/sheet.tsx +0 -139
  395. package/templates/default/shadcn/sidebar.tsx +0 -726
  396. package/templates/default/shadcn/skeleton.tsx +0 -15
  397. package/templates/default/shadcn/slider.tsx +0 -64
  398. package/templates/default/shadcn/sonner.tsx +0 -25
  399. package/templates/default/shadcn/switch.tsx +0 -31
  400. package/templates/default/shadcn/table.tsx +0 -116
  401. package/templates/default/shadcn/tabs.tsx +0 -67
  402. package/templates/default/shadcn/textarea.tsx +0 -18
  403. package/templates/default/shadcn/toggle-group.tsx +0 -83
  404. package/templates/default/shadcn/toggle.tsx +0 -47
  405. package/templates/default/shadcn/tooltip.tsx +0 -65
  406. package/templates/default/shadcn/workflow.tsx +0 -119
  407. package/templates/default/utils/actions/account/index.ts +0 -33
  408. package/templates/default/utils/actions/account/type.ts +0 -4
  409. package/templates/default/utils/actions/common/revalidate.ts +0 -18
  410. package/templates/default/utils/actions/common/type.ts +0 -4
  411. package/templates/default/utils/actions/software/index.ts +0 -106
  412. package/templates/default/utils/api/accountService/index.ts +0 -103
  413. package/templates/default/utils/api/accountService/type.ts +0 -4
  414. package/templates/default/utils/api/file-upload/index.ts +0 -103
  415. package/templates/default/utils/api/file-upload/type.ts +0 -8
  416. package/templates/default/utils/api/loginService/index.ts +0 -106
  417. package/templates/default/utils/api/softwareService/index.ts +0 -356
  418. package/templates/default/utils/api/softwareService/type.ts +0 -62
  419. package/templates/default/utils/cn.ts +0 -6
  420. package/templates/default/utils/session/cookieSession.ts +0 -49
  421. package/templates/default/utils/theme-provider/index.tsx +0 -11
  422. package/templates/default/utils/token-management/index.ts +0 -115
  423. package/templates/default/utils/token-management/types.ts +0 -6
@@ -1,15 +0,0 @@
1
- import * as React from "react"
2
- import { cn } from "../utils/cn"
3
-
4
- function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
5
- return (
6
- <div
7
- data-slot="skeleton"
8
- className={cn("animate-pulse rounded-md", className)}
9
- style={{ backgroundColor: "var(--keross-skeleton-bg)" }}
10
- {...props}
11
- />
12
- );
13
- }
14
-
15
- export { Skeleton };
@@ -1,64 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as SliderPrimitive from "@radix-ui/react-slider"
5
-
6
- import { cn } from "../utils/cn"
7
-
8
- function Slider({
9
- className,
10
- defaultValue,
11
- value,
12
- min = 0,
13
- max = 100,
14
- ...props
15
- }: React.ComponentProps<typeof SliderPrimitive.Root>) {
16
- const _values = React.useMemo(
17
- () =>
18
- Array.isArray(value)
19
- ? value
20
- : Array.isArray(defaultValue)
21
- ? defaultValue
22
- : [min, max],
23
- [value, defaultValue, min, max]
24
- )
25
-
26
- return (
27
- <SliderPrimitive.Root
28
- data-slot="slider"
29
- defaultValue={defaultValue}
30
- value={value}
31
- min={min}
32
- max={max}
33
- className={cn(
34
- "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
35
- className
36
- )}
37
- {...props}
38
- >
39
- <SliderPrimitive.Track
40
- data-slot="slider-track"
41
- className={cn(
42
- "relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
43
- )}
44
- style={{ backgroundColor: "var(--keross-skeleton-bg)" }}
45
- >
46
- <SliderPrimitive.Range
47
- data-slot="slider-range"
48
- className={cn(
49
- "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
50
- )}
51
- />
52
- </SliderPrimitive.Track>
53
- {Array.from({ length: _values.length }, (_, index) => (
54
- <SliderPrimitive.Thumb
55
- data-slot="slider-thumb"
56
- key={index}
57
- className="border-primary bg-white ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
58
- />
59
- ))}
60
- </SliderPrimitive.Root>
61
- )
62
- }
63
-
64
- export { Slider }
@@ -1,25 +0,0 @@
1
- "use client"
2
-
3
- import { useTheme } from "next-themes"
4
- import { Toaster as Sonner, ToasterProps } from "sonner"
5
-
6
- const Toaster = ({ ...props }: ToasterProps) => {
7
- const { theme = "system" } = useTheme()
8
-
9
- return (
10
- <Sonner
11
- theme={theme as ToasterProps["theme"]}
12
- className="toaster group"
13
- style={
14
- {
15
- "--normal-bg": "var(--popover)",
16
- "--normal-text": "var(--popover-foreground)",
17
- "--normal-border": "var(--border)",
18
- } as React.CSSProperties
19
- }
20
- {...props}
21
- />
22
- )
23
- }
24
-
25
- export { Toaster }
@@ -1,31 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as SwitchPrimitive from "@radix-ui/react-switch"
5
-
6
- import { cn } from "../utils/cn"
7
-
8
- function Switch({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
12
- return (
13
- <SwitchPrimitive.Root
14
- data-slot="switch"
15
- className={cn(
16
- "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
17
- className
18
- )}
19
- {...props}
20
- >
21
- <SwitchPrimitive.Thumb
22
- data-slot="switch-thumb"
23
- className={cn(
24
- "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
25
- )}
26
- />
27
- </SwitchPrimitive.Root>
28
- )
29
- }
30
-
31
- export { Switch }
@@ -1,116 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
-
5
- import { cn } from "../utils/cn"
6
-
7
- function Table({ className, ...props }: React.ComponentProps<"table">) {
8
- return (
9
- <div
10
- data-slot="table-container"
11
- className="h-full relative w-full overflow-auto"
12
- >
13
- <table
14
- data-slot="table"
15
- className={cn("w-full caption-bottom text-sm", className)}
16
- {...props}
17
- />
18
- </div>
19
- )
20
- }
21
-
22
- function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
23
- return (
24
- <thead
25
- data-slot="table-header"
26
- className={cn("[&_tr]:border-b", className)}
27
- {...props}
28
- />
29
- )
30
- }
31
-
32
- function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
33
- return (
34
- <tbody
35
- data-slot="table-body"
36
- className={cn("[&_tr:last-child]:border-0", className)}
37
- {...props}
38
- />
39
- )
40
- }
41
-
42
- function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
43
- return (
44
- <tfoot
45
- data-slot="table-footer"
46
- className={cn(
47
- "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
48
- className
49
- )}
50
- {...props}
51
- />
52
- )
53
- }
54
-
55
- function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
56
- return (
57
- <tr
58
- data-slot="table-row"
59
- className={cn(
60
- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
61
- className
62
- )}
63
- {...props}
64
- />
65
- )
66
- }
67
-
68
- function TableHead({ className, ...props }: React.ComponentProps<"th">) {
69
- return (
70
- <th
71
- data-slot="table-head"
72
- className={cn(
73
- "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
74
- className
75
- )}
76
- {...props}
77
- />
78
- )
79
- }
80
-
81
- function TableCell({ className, ...props }: React.ComponentProps<"td">) {
82
- return (
83
- <td
84
- data-slot="table-cell"
85
- className={cn(
86
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
87
- className
88
- )}
89
- {...props}
90
- />
91
- )
92
- }
93
-
94
- function TableCaption({
95
- className,
96
- ...props
97
- }: React.ComponentProps<"caption">) {
98
- return (
99
- <caption
100
- data-slot="table-caption"
101
- className={cn("text-muted-foreground mt-4 text-sm", className)}
102
- {...props}
103
- />
104
- )
105
- }
106
-
107
- export {
108
- Table,
109
- TableHeader,
110
- TableBody,
111
- TableFooter,
112
- TableHead,
113
- TableRow,
114
- TableCell,
115
- TableCaption,
116
- }
@@ -1,67 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as TabsPrimitive from "@radix-ui/react-tabs"
5
- import { cn } from "../utils/cn"
6
-
7
-
8
-
9
- function Tabs({
10
- className,
11
- ...props
12
- }: React.ComponentProps<typeof TabsPrimitive.Root>) {
13
- return (
14
- <TabsPrimitive.Root
15
- data-slot="tabs"
16
- className={cn("flex flex-col gap-2", className)}
17
- {...props}
18
- />
19
- )
20
- }
21
-
22
- function TabsList({
23
- className,
24
- ...props
25
- }: React.ComponentProps<typeof TabsPrimitive.List>) {
26
- return (
27
- <TabsPrimitive.List
28
- data-slot="tabs-list"
29
- className={cn(
30
- "bg-background text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
31
- className
32
- )}
33
- {...props}
34
- />
35
- )
36
- }
37
-
38
- function TabsTrigger({
39
- className,
40
- ...props
41
- }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
42
- return (
43
- <TabsPrimitive.Trigger
44
- data-slot="tabs-trigger"
45
- className={cn(
46
- "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",
47
- className
48
- )}
49
- {...props}
50
- />
51
- )
52
- }
53
-
54
- function TabsContent({
55
- className,
56
- ...props
57
- }: React.ComponentProps<typeof TabsPrimitive.Content>) {
58
- return (
59
- <TabsPrimitive.Content
60
- data-slot="tabs-content"
61
- className={cn("flex-1 outline-none", className)}
62
- {...props}
63
- />
64
- )
65
- }
66
-
67
- export { Tabs, TabsList, TabsTrigger, TabsContent }
@@ -1,18 +0,0 @@
1
- import * as React from "react"
2
-
3
- import { cn } from "../utils/cn"
4
-
5
- function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
- return (
7
- <textarea
8
- data-slot="textarea"
9
- className={cn(
10
- "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 flex field-sizing-content min-h-16 w-full rounded-md border 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 bg-[var(--secondary)] dark:bg-[var(--input-background-custom)]",
11
- className
12
- )}
13
- {...props}
14
- />
15
- )
16
- }
17
-
18
- export { Textarea }
@@ -1,83 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
5
- import { type VariantProps } from "class-variance-authority"
6
-
7
- import { cn } from "../utils/cn"
8
- import { toggleVariants } from "./toggle"
9
-
10
- const ToggleGroupContext = React.createContext<
11
- VariantProps<typeof toggleVariants> & {
12
- spacing?: number
13
- }
14
- >({
15
- size: "default",
16
- variant: "default",
17
- spacing: 0,
18
- })
19
-
20
- function ToggleGroup({
21
- className,
22
- variant,
23
- size,
24
- spacing = 0,
25
- children,
26
- ...props
27
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
28
- VariantProps<typeof toggleVariants> & {
29
- spacing?: number
30
- }) {
31
- return (
32
- <ToggleGroupPrimitive.Root
33
- data-slot="toggle-group"
34
- data-variant={variant}
35
- data-size={size}
36
- data-spacing={spacing}
37
- style={{ "--gap": spacing } as React.CSSProperties}
38
- className={cn(
39
- "group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",
40
- className
41
- )}
42
- {...props}
43
- >
44
- <ToggleGroupContext.Provider value={{ variant, size, spacing }}>
45
- {children}
46
- </ToggleGroupContext.Provider>
47
- </ToggleGroupPrimitive.Root>
48
- )
49
- }
50
-
51
- function ToggleGroupItem({
52
- className,
53
- children,
54
- variant,
55
- size,
56
- ...props
57
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
58
- VariantProps<typeof toggleVariants>) {
59
- const context = React.useContext(ToggleGroupContext)
60
-
61
- return (
62
- <ToggleGroupPrimitive.Item
63
- data-slot="toggle-group-item"
64
- data-variant={context.variant || variant}
65
- data-size={context.size || size}
66
- data-spacing={context.spacing}
67
- className={cn(
68
- toggleVariants({
69
- variant: context.variant || variant,
70
- size: context.size || size,
71
- }),
72
- "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10",
73
- "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
74
- className
75
- )}
76
- {...props}
77
- >
78
- {children}
79
- </ToggleGroupPrimitive.Item>
80
- )
81
- }
82
-
83
- export { ToggleGroup, ToggleGroupItem }
@@ -1,47 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as TogglePrimitive from "@radix-ui/react-toggle"
5
- import { cva, type VariantProps } from "class-variance-authority"
6
-
7
- import { cn } from "../utils/cn"
8
-
9
- const toggleVariants = cva(
10
- "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
11
- {
12
- variants: {
13
- variant: {
14
- default: "bg-transparent",
15
- outline:
16
- "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
17
- },
18
- size: {
19
- default: "h-9 px-2 min-w-9",
20
- sm: "h-8 px-1.5 min-w-8",
21
- lg: "h-10 px-2.5 min-w-10",
22
- },
23
- },
24
- defaultVariants: {
25
- variant: "default",
26
- size: "default",
27
- },
28
- }
29
- )
30
-
31
- function Toggle({
32
- className,
33
- variant,
34
- size,
35
- ...props
36
- }: React.ComponentProps<typeof TogglePrimitive.Root> &
37
- VariantProps<typeof toggleVariants>) {
38
- return (
39
- <TogglePrimitive.Root
40
- data-slot="toggle"
41
- className={cn(toggleVariants({ variant, size, className }))}
42
- {...props}
43
- />
44
- )
45
- }
46
-
47
- export { Toggle, toggleVariants }
@@ -1,65 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as TooltipPrimitive from "@radix-ui/react-tooltip"
5
-
6
- import { cn } from "../utils/cn"
7
-
8
- function TooltipProvider({
9
- delayDuration = 0,
10
- ...props
11
- }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
12
- return (
13
- <TooltipPrimitive.Provider
14
- data-slot="tooltip-provider"
15
- delayDuration={delayDuration}
16
- {...props}
17
- />
18
- )
19
- }
20
-
21
- function Tooltip({
22
- ...props
23
- }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
24
- return (
25
- <TooltipProvider>
26
- <TooltipPrimitive.Root data-slot="tooltip" {...props} />
27
- </TooltipProvider>
28
- )
29
- }
30
-
31
- function TooltipTrigger({
32
- ...props
33
- }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
34
- return <TooltipPrimitive.Trigger data-slot="tooltip-trigger"
35
- className={cn(
36
- "inline-flex w-[80px] whitespace-nowrap rounded-md border-0 border-input py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
37
- )}
38
- {...props} />
39
- }
40
-
41
- function TooltipContent({
42
- className,
43
- sideOffset = 0,
44
- children,
45
- ...props
46
- }: React.ComponentProps<typeof TooltipPrimitive.Content>) {
47
- return (
48
- <TooltipPrimitive.Portal>
49
- <TooltipPrimitive.Content
50
- data-slot="tooltip-content"
51
- sideOffset={sideOffset}
52
- className={cn(
53
- "bg-[var(--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 origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
54
- className
55
- )}
56
- {...props}
57
- >
58
- {children}
59
- <TooltipPrimitive.Arrow className="bg-[var(--foreground)] fill-[var(--foreground)] z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
60
- </TooltipPrimitive.Content>
61
- </TooltipPrimitive.Portal>
62
- )
63
- }
64
-
65
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
@@ -1,119 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { ChevronDown } from "lucide-react";
5
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent } from "./dropdown-menu";
6
- import { Badge } from "./badge";
7
-
8
- export type StepStatus = "OUTSTANDING" | "IN PROGRESS" | "COMPLETED";
9
-
10
- export type WorkflowStep = {
11
- id?: string;
12
- title: string;
13
- status: StepStatus;
14
- dropdownOptions?: React.ReactNode[]; // These must be DropdownMenuItem components
15
- selectedOption?: string;
16
- owner?: string;
17
- createdAt?: string;
18
- };
19
-
20
- type WorkflowProps = {
21
- name:string;
22
- title?: string;
23
- steps: WorkflowStep[];
24
- onDropdownSelect?: (stepId: string, value: string) => void;
25
- style?: React.CSSProperties;
26
- };
27
-
28
- const statusColors: Record<StepStatus, string> = {
29
- OUTSTANDING: "bg-[#FFDE721A] text-[#FBB125] border border-[#FBB12533]",
30
- "IN PROGRESS": "bg-[#6A77D91A] text-[#6A77D9]",
31
- COMPLETED: "bg-[#519E591A] text-[#519E59] border border-[#FBB12533]",
32
- };
33
-
34
- export function Workflow({ name, steps, style }: WorkflowProps) {
35
- const completedCount = steps.filter((s) => s.status === "COMPLETED").length;
36
- const progressPercent = (completedCount / steps.length) * 100;
37
-
38
- return (
39
- <div
40
- style={style}
41
- className="p-4 space-y-2 rounded-lg border dark:bg-[#171717] text-primary blue-dark:bg-[#1B2336]"
42
- >
43
- <h2 className="text-sm font-semibold mb-4 m-3">{name}</h2>
44
-
45
- {steps.map((step) => {
46
- const stepId = step.id ?? "";
47
-
48
- return (
49
- <div
50
- key={stepId}
51
- className="flex flex-col sm:flex-row justify-between items-start sm:items-center p-5 border border-neutral-600 rounded-md gap-1 sm:gap-2 m-2"
52
- >
53
- <div className="flex flex-col sm:flex-row items-start sm:items-center gap-2 w-full sm:w-auto">
54
- {/* Icon */}
55
- <div className="w-7 h-7 sm:w-9 sm:h-9 dark:bg-neutral-800 bg-[var(--keross-skeleton-bg)] rounded-sm flex-shrink-0" />
56
-
57
- {/* Title + Dropdown */}
58
- <div className="flex flex-col text-md">
59
- <div className="flex items-center gap-1">
60
- <span className="font-semibold">{step.title}</span>
61
-
62
- {/* Only show dropdown if step is IN PROGRESS */}
63
- {step.status === "IN PROGRESS" && step.dropdownOptions && (
64
- <DropdownMenu>
65
- <DropdownMenuTrigger asChild>
66
- <button className="p-1">
67
- <ChevronDown className="w-4 h-4 cursor-pointer" />
68
- </button>
69
- </DropdownMenuTrigger>
70
-
71
- <DropdownMenuContent className="w-50 ml-40">
72
- {step.dropdownOptions.map((node, index) => (
73
- <React.Fragment key={index}>
74
- {node}
75
- </React.Fragment>
76
- ))}
77
- </DropdownMenuContent>
78
- </DropdownMenu>
79
- )}
80
- </div>
81
-
82
- {step.owner && (
83
- <span className="text-sm text-neutral-400">{step.owner}</span>
84
- )}
85
-
86
- {step.createdAt && (
87
- <span className="text-sm text-neutral-500">
88
- Created on {step.createdAt}
89
- </span>
90
- )}
91
- </div>
92
- </div>
93
-
94
- {/* Badge */}
95
- <div className="mt-1 sm:mt-0 flex-shrink-0">
96
- <Badge className={statusColors[step.status]}>
97
- {step.status}
98
- </Badge>
99
- </div>
100
- </div>
101
- );
102
- })}
103
-
104
- {/* Summary */}
105
- <div className="text-xs flex flex-col sm:flex-row justify-between items-start sm:items-center pt-1">
106
- <span>{steps.length} steps total</span>
107
- <span>{completedCount} completed</span>
108
- </div>
109
-
110
- {/* Progress bar */}
111
- <div className="w-full bg-gray-300 dark:bg-gray-700 h-1 rounded-full overflow-hidden mt-1">
112
- <div
113
- className="h-1 bg-blue-500 dark:bg-blue-400 transition-all"
114
- style={{ width: `${progressPercent}%` }}
115
- />
116
- </div>
117
- </div>
118
- );
119
- }
@@ -1,33 +0,0 @@
1
- "use server"
2
- import { cache } from "react";
3
- import { getAccountTree } from "../../api/accountService";
4
- import { getCookieSession, setCookieSession } from "../../session/cookieSession";
5
- import { AccountTreeProps } from "./type";
6
-
7
- export const getAccount = cache(async (): Promise<AccountTreeProps> => {
8
- return await getAccountTree()
9
- });
10
-
11
- export const getActiveAccountId = async (): Promise<string> => {
12
- const activeAccountId = await getCookieSession("activeAccountId")
13
- return activeAccountId || "";
14
- };
15
-
16
-
17
- export const getOrSetActiveAccountId = async (): Promise<string> => {
18
- let activeAccountId = await getCookieSession("activeAccountId")
19
- if (!activeAccountId) {
20
- try {
21
- const account = await getAccount()
22
- activeAccountId = account.ACCOUNT_ID
23
- await setActiveAccountId(activeAccountId)
24
- } catch (error) {
25
- console.error(error)
26
- }
27
- }
28
- return activeAccountId || "";
29
- };
30
-
31
- export const setActiveAccountId = async (accountId: string) => {
32
- await setCookieSession("activeAccountId", accountId)
33
- };