ikoncomponents 1.5.6 → 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 (424) 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/ikonS/accordion.tsx +0 -66
  291. package/templates/default/ikonS/alert-dialog.tsx +0 -179
  292. package/templates/default/ikonS/alert.tsx +0 -66
  293. package/templates/default/ikonS/aspect-ratio.tsx +0 -11
  294. package/templates/default/ikonS/avatar.tsx +0 -53
  295. package/templates/default/ikonS/badge.tsx +0 -49
  296. package/templates/default/ikonS/breadcrumb.tsx +0 -109
  297. package/templates/default/ikonS/button.tsx +0 -64
  298. package/templates/default/ikonS/calendar.tsx +0 -227
  299. package/templates/default/ikonS/card.tsx +0 -92
  300. package/templates/default/ikonS/checkbox.tsx +0 -33
  301. package/templates/default/ikonS/collapsible.tsx +0 -33
  302. package/templates/default/ikonS/command.tsx +0 -184
  303. package/templates/default/ikonS/date-input.tsx +0 -259
  304. package/templates/default/ikonS/date-range-picker.tsx +0 -103
  305. package/templates/default/ikonS/dialog.tsx +0 -143
  306. package/templates/default/ikonS/drawer.tsx +0 -134
  307. package/templates/default/ikonS/dropdown-menu.tsx +0 -259
  308. package/templates/default/ikonS/form.tsx +0 -166
  309. package/templates/default/ikonS/hover-card.tsx +0 -44
  310. package/templates/default/ikonS/input-otp.tsx +0 -71
  311. package/templates/default/ikonS/input.tsx +0 -22
  312. package/templates/default/ikonS/label.tsx +0 -24
  313. package/templates/default/ikonS/navigation-menu.tsx +0 -195
  314. package/templates/default/ikonS/popover.tsx +0 -48
  315. package/templates/default/ikonS/progress.tsx +0 -40
  316. package/templates/default/ikonS/radio-group.tsx +0 -45
  317. package/templates/default/ikonS/scroll-area.tsx +0 -58
  318. package/templates/default/ikonS/select.tsx +0 -184
  319. package/templates/default/ikonS/separator.tsx +0 -28
  320. package/templates/default/ikonS/sheet.tsx +0 -139
  321. package/templates/default/ikonS/sidebar.tsx +0 -726
  322. package/templates/default/ikonS/skeleton.tsx +0 -15
  323. package/templates/default/ikonS/slider.tsx +0 -64
  324. package/templates/default/ikonS/sonner.tsx +0 -25
  325. package/templates/default/ikonS/switch.tsx +0 -31
  326. package/templates/default/ikonS/table.tsx +0 -116
  327. package/templates/default/ikonS/tabs.tsx +0 -67
  328. package/templates/default/ikonS/textarea.tsx +0 -18
  329. package/templates/default/ikonS/toggle-group.tsx +0 -83
  330. package/templates/default/ikonS/toggle.tsx +0 -47
  331. package/templates/default/ikonS/tooltip.tsx +0 -65
  332. package/templates/default/ikonS/workflow.tsx +0 -119
  333. package/templates/default/ikoncomponents/action-menu/index.tsx +0 -108
  334. package/templates/default/ikoncomponents/action-menu/type.ts +0 -18
  335. package/templates/default/ikoncomponents/activity-sheet/index.tsx +0 -63
  336. package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +0 -65
  337. package/templates/default/ikoncomponents/alert-dialog/index.tsx +0 -80
  338. package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +0 -68
  339. package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +0 -222
  340. package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +0 -38
  341. package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +0 -81
  342. package/templates/default/ikoncomponents/big-calendar/index.css +0 -879
  343. package/templates/default/ikoncomponents/big-calendar/index.tsx +0 -59
  344. package/templates/default/ikoncomponents/big-calendar/type.ts +0 -37
  345. package/templates/default/ikoncomponents/buttons/index.tsx +0 -127
  346. package/templates/default/ikoncomponents/combobox-input/index.tsx +0 -75
  347. package/templates/default/ikoncomponents/combobox-input/type.ts +0 -14
  348. package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +0 -242
  349. package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +0 -80
  350. package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +0 -149
  351. package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +0 -98
  352. package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +0 -119
  353. package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +0 -45
  354. package/templates/default/ikoncomponents/data-table/function.ts +0 -7
  355. package/templates/default/ikoncomponents/data-table/index.tsx +0 -549
  356. package/templates/default/ikoncomponents/data-table/type.ts +0 -75
  357. package/templates/default/ikoncomponents/e-chart/index.tsx +0 -183
  358. package/templates/default/ikoncomponents/file-input/index.tsx +0 -27
  359. package/templates/default/ikoncomponents/fileUpload/index.tsx +0 -121
  360. package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +0 -111
  361. package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +0 -121
  362. package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +0 -80
  363. package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +0 -9
  364. package/templates/default/ikoncomponents/form-fields/input/index.tsx +0 -27
  365. package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +0 -39
  366. package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +0 -52
  367. package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +0 -7
  368. package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +0 -28
  369. package/templates/default/ikoncomponents/form-fields/types/index.ts +0 -46
  370. package/templates/default/ikoncomponents/glowing-effect/index.tsx +0 -171
  371. package/templates/default/ikoncomponents/icon/index.tsx +0 -22
  372. package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +0 -19
  373. package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +0 -352
  374. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +0 -250
  375. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +0 -32
  376. package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +0 -95
  377. package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +0 -117
  378. package/templates/default/ikoncomponents/loading-spinner/index.tsx +0 -43
  379. package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +0 -30
  380. package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +0 -103
  381. package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +0 -36
  382. package/templates/default/ikoncomponents/main-layout/footer.tsx +0 -21
  383. package/templates/default/ikoncomponents/main-layout/header.tsx +0 -53
  384. package/templates/default/ikoncomponents/main-layout/index.tsx +0 -38
  385. package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +0 -389
  386. package/templates/default/ikoncomponents/main-layout/nav-main.tsx +0 -103
  387. package/templates/default/ikoncomponents/multi-combobox/index.tsx +0 -345
  388. package/templates/default/ikoncomponents/no-data/index.tsx +0 -11
  389. package/templates/default/ikoncomponents/page-wrapper/index.tsx +0 -30
  390. package/templates/default/ikoncomponents/password-strength-meter/index.tsx +0 -49
  391. package/templates/default/ikoncomponents/phone-input/index.tsx +0 -72
  392. package/templates/default/ikoncomponents/provider-wrapper/index.tsx +0 -32
  393. package/templates/default/ikoncomponents/search-input/index.tsx +0 -18
  394. package/templates/default/ikoncomponents/sheet/index.tsx +0 -34
  395. package/templates/default/ikoncomponents/simple-widget/index.tsx +0 -54
  396. package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +0 -34
  397. package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +0 -13
  398. package/templates/default/ikoncomponents/tabs/index.tsx +0 -139
  399. package/templates/default/ikoncomponents/title-progress/index.tsx +0 -41
  400. package/templates/default/ikoncomponents/tooltip/index.tsx +0 -17
  401. package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +0 -33
  402. package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +0 -279
  403. package/templates/default/ikoncomponents/upload-tab/index.tsx +0 -237
  404. package/templates/default/ikoncomponents/widgets/index.tsx +0 -81
  405. package/templates/default/ikoncomponents/widgets/type.ts +0 -11
  406. package/templates/default/ikoncomponents/work-in-progress/index.tsx +0 -16
  407. package/templates/default/styles.css +0 -1159
  408. package/templates/default/utils/actions/account/index.ts +0 -33
  409. package/templates/default/utils/actions/account/type.ts +0 -4
  410. package/templates/default/utils/actions/common/revalidate.ts +0 -18
  411. package/templates/default/utils/actions/common/type.ts +0 -4
  412. package/templates/default/utils/actions/software/index.ts +0 -106
  413. package/templates/default/utils/api/accountService/index.ts +0 -103
  414. package/templates/default/utils/api/accountService/type.ts +0 -4
  415. package/templates/default/utils/api/file-upload/index.ts +0 -103
  416. package/templates/default/utils/api/file-upload/type.ts +0 -8
  417. package/templates/default/utils/api/loginService/index.ts +0 -106
  418. package/templates/default/utils/api/softwareService/index.ts +0 -356
  419. package/templates/default/utils/api/softwareService/type.ts +0 -62
  420. package/templates/default/utils/cn.ts +0 -6
  421. package/templates/default/utils/session/cookieSession.ts +0 -49
  422. package/templates/default/utils/theme-provider/index.tsx +0 -11
  423. package/templates/default/utils/token-management/index.ts +0 -115
  424. package/templates/default/utils/token-management/types.ts +0 -6
package/README.md CHANGED
@@ -1,36 +1,36 @@
1
- This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2
-
3
- ## Getting Started
4
-
5
- First, run the development server:
6
-
7
- ```bash
8
- npm run dev
9
- # or
10
- yarn dev
11
- # or
12
- pnpm dev
13
- # or
14
- bun dev
15
- ```
16
-
17
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
-
19
- You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
-
21
- This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22
-
23
- ## Learn More
24
-
25
- To learn more about Next.js, take a look at the following resources:
26
-
27
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
- - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
-
30
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31
-
32
- ## Deploy on Vercel
33
-
34
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
-
36
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
1
+ This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
+
21
+ This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22
+
23
+ ## Learn More
24
+
25
+ To learn more about Next.js, take a look at the following resources:
26
+
27
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
+
30
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31
+
32
+ ## Deploy on Vercel
33
+
34
+ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
+
36
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ const MOBILE_BREAKPOINT = 768;
3
+ export function useIsMobile() {
4
+ const [isMobile, setIsMobile] = React.useState(undefined);
5
+ React.useEffect(() => {
6
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
7
+ const onChange = () => {
8
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
9
+ };
10
+ mql.addEventListener("change", onChange);
11
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
12
+ return () => mql.removeEventListener("change", onChange);
13
+ }, []);
14
+ return !!isMobile;
15
+ }
@@ -0,0 +1,5 @@
1
+ import type { ActionMenuProps, ExtraActionParams } from "./type";
2
+ export declare function ActionMenu({ actionMenus, extraActionParams, }: {
3
+ actionMenus: ActionMenuProps[];
4
+ extraActionParams?: ExtraActionParams;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "../../shadcn/dropdown-menu";
4
+ import { MoreHorizontal } from "lucide-react";
5
+ import { IconButtonWithTooltip } from "../buttons";
6
+ export function ActionMenu({ actionMenus, extraActionParams, }) {
7
+ const renderMenuItems = (items) => {
8
+ items = items.filter((item) => {
9
+ // biome-ignore lint/complexity/useOptionalChain: <explanation>
10
+ return ((item === null || item === void 0 ? void 0 : item.visibility) === undefined || item.visibility === true || (item.visibility && item.visibility(...((extraActionParams === null || extraActionParams === void 0 ? void 0 : extraActionParams.arguments) || []))));
11
+ });
12
+ if (items.length === 0) {
13
+ return _jsx(DropdownMenuItem, { className: "text-center", children: "No action available." });
14
+ }
15
+ return items.map((item, index) => {
16
+ if (item.type === "label") {
17
+ return _jsx(DropdownMenuLabel, { children: String(item.label) }, index);
18
+ }
19
+ if (item.type === "separator") {
20
+ return _jsx(DropdownMenuSeparator, {}, index);
21
+ }
22
+ if (item.type === "group" && item.items) {
23
+ return (_jsx(DropdownMenuGroup, { children: renderMenuItems(item.items) }, index));
24
+ }
25
+ if (item.items) {
26
+ return (_jsxs(DropdownMenuSub, { children: [_jsx(DropdownMenuSubTrigger, { children: String(item.label) }), _jsx(DropdownMenuPortal, { children: _jsx(DropdownMenuSubContent, { children: renderMenuItems(item.items) }) })] }, index));
27
+ }
28
+ let labelContent = "";
29
+ if (typeof item.label === "function") {
30
+ labelContent = item.label(...((extraActionParams === null || extraActionParams === void 0 ? void 0 : extraActionParams.arguments) || []));
31
+ }
32
+ else {
33
+ labelContent = item.label;
34
+ }
35
+ return (_jsxs(DropdownMenuItem, { disabled: item.disabled, onClick: () =>
36
+ // biome-ignore lint/complexity/useOptionalChain: <explanation>
37
+ item.onClick &&
38
+ item.onClick(...((extraActionParams === null || extraActionParams === void 0 ? void 0 : extraActionParams.arguments) || [])), children: [item.icon && _jsx(item.icon, {}), labelContent] }, index));
39
+ });
40
+ };
41
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(IconButtonWithTooltip, { variant: "ghost", tooltipContent: "Actions", className: "h-8 w-8 p-0 border-0 bg-transparent text-foreground keross:text-white elevation-0 shadow-none hover:bg-transparent", children: _jsx(MoreHorizontal, {}) }) }), _jsx(DropdownMenuContent, { className: "w-56", align: "end", children: renderMenuItems(actionMenus) })] }));
42
+ }
@@ -0,0 +1,14 @@
1
+ import type { LucideProps } from "lucide-react";
2
+ import type { ForwardRefExoticComponent, RefAttributes } from "react";
3
+ export interface ActionMenuProps {
4
+ items?: ActionMenuProps[];
5
+ type?: "sub" | "group" | "separator" | "label" | null;
6
+ label: ((...args: any) => string) | string;
7
+ icon?: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
8
+ disabled?: boolean;
9
+ visibility?: ((...args: any) => boolean) | boolean;
10
+ onClick?: (...args: any) => void;
11
+ }
12
+ export interface ExtraActionParams {
13
+ arguments?: any[];
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ export type ActivityLogProps = {
2
+ id: string;
3
+ activity: string;
4
+ updatedBy: string;
5
+ updatedOn: string;
6
+ source: string;
7
+ parentId: string;
8
+ };
9
+ export declare function ActivitySheet({ activityLogs }: {
10
+ activityLogs?: ActivityLogProps[];
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { AlignJustify } from "lucide-react";
4
+ import { CustomTabs } from "../tabs";
5
+ import { NoDataComponent } from "../no-data";
6
+ import { UploadTab } from "../upload-tab";
7
+ import { SheetComponent } from "../sheet";
8
+ export function ActivitySheet({ activityLogs = [] }) {
9
+ const tabArray = [
10
+ {
11
+ tabName: "Activity",
12
+ tabId: "tab-activity",
13
+ default: true,
14
+ tabContent: _jsx("div", { className: "overflow-auto flex flex-col gap-2 h-full", children: activityLogs.length > 0 ? (activityLogs.map((log) => (_jsxs("div", { className: "border-b text-sm pb-2", children: [_jsx("p", { className: "font-medium pb-1", children: log.activity }), _jsxs("p", { className: "text-gray-500 pb-1", children: ["Updated On:", " ", _jsx("span", { className: "text-gray-700", children: new Date(log.updatedOn).toLocaleString() })] }), _jsxs("p", { className: "text-gray-500 pb-1", children: ["Updated By: ", _jsx("span", { className: "text-gray-700", children: log.updatedBy })] })] }, log.id)))) : (_jsx(NoDataComponent, { text: "No Activity Logs Available" })) })
15
+ }, {
16
+ tabName: "File Upload",
17
+ tabId: "tab-upload",
18
+ default: false,
19
+ tabContent: _jsx(UploadTab, {})
20
+ }
21
+ ];
22
+ return (_jsx(SheetComponent, { buttonText: "", buttonIcon: _jsx(AlignJustify, {}), sheetTitle: "", sheetContent: _jsx(CustomTabs, { tabArray: tabArray, tabListClass: '' }), closeButton: true }));
23
+ }
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from "react";
2
+ interface DialogContextProps {
3
+ openDialog: (options: DialogOptions) => void;
4
+ closeDialog: () => void;
5
+ }
6
+ interface DialogOptions {
7
+ title: string;
8
+ description: string;
9
+ onConfirm?: () => void;
10
+ onCancel?: () => void;
11
+ onThird?: () => void;
12
+ confirmText?: string;
13
+ cancelText?: string;
14
+ thirdOptionText?: string;
15
+ fontSize?: string;
16
+ }
17
+ export declare const useDialog: () => DialogContextProps;
18
+ export declare const DialogProvider: React.FC<{
19
+ children: ReactNode;
20
+ }>;
21
+ export {};
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { createContext, useContext, useState } from "react";
4
+ import { CustomAlertDialog } from "../alert-dialog";
5
+ const DialogContext = createContext(undefined);
6
+ export const useDialog = () => {
7
+ const context = useContext(DialogContext);
8
+ if (!context) {
9
+ throw new Error("useDialog must be used within a DialogProvider");
10
+ }
11
+ return context;
12
+ };
13
+ export const DialogProvider = ({ children }) => {
14
+ const [dialogOptions, setDialogOptions] = useState(null);
15
+ const openDialog = (options) => setDialogOptions(options);
16
+ const closeDialog = () => setDialogOptions(null);
17
+ return (_jsxs(DialogContext.Provider, { value: { openDialog, closeDialog }, children: [children, dialogOptions && (_jsx(CustomAlertDialog, { title: dialogOptions.title, description: dialogOptions.description, fontSize: dialogOptions.fontSize || "text-base", cancelText: dialogOptions.cancelText || "", confirmText: dialogOptions.confirmText || "", thirdOptionText: dialogOptions.thirdOptionText || "", onConfirm: () => {
18
+ if (dialogOptions.onConfirm)
19
+ dialogOptions.onConfirm();
20
+ closeDialog();
21
+ }, onCancel: () => {
22
+ if (dialogOptions.onCancel)
23
+ dialogOptions.onCancel();
24
+ closeDialog();
25
+ }, onThird: () => {
26
+ if (dialogOptions.onThird)
27
+ dialogOptions.onThird();
28
+ closeDialog();
29
+ } }))] }));
30
+ };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ interface CustomAlertDialogProps {
3
+ title: string;
4
+ description?: string;
5
+ fontSize?: string;
6
+ cancelText?: string;
7
+ confirmText?: string;
8
+ thirdOptionText?: string;
9
+ onCancel?: () => void;
10
+ onConfirm?: () => void;
11
+ onThird?: () => void;
12
+ }
13
+ export declare const CustomAlertDialog: React.FC<CustomAlertDialogProps>;
14
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "../../shadcn/alert-dialog";
3
+ export const CustomAlertDialog = ({ title, description, fontSize = "text-base", cancelText = "", // Default cancel button text
4
+ confirmText = "", // Default confirm button text
5
+ thirdOptionText = "", // Default third button text
6
+ onCancel, // Optional callback for cancel action
7
+ onConfirm, // Optional callback for confirm action
8
+ onThird, // Optional callback for third action
9
+ }) => {
10
+ return (_jsx(AlertDialog, { open: true, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { className: fontSize, children: title }), _jsx(AlertDialogDescription, { className: fontSize, children: description })] }), _jsxs(AlertDialogFooter, { children: [cancelText != "" && (_jsx(AlertDialogCancel, { onClick: () => {
11
+ if (onCancel)
12
+ onCancel(); // Execute cancel callback if provided
13
+ }, children: cancelText })), thirdOptionText != "" && (_jsx(AlertDialogAction, { className: "bg-blue-500", color: "black", onClick: () => {
14
+ if (onThird)
15
+ onThird(); // Execute confirm callback if provided
16
+ }, children: thirdOptionText })), confirmText != "" && (_jsx(AlertDialogAction, { onClick: () => {
17
+ if (onConfirm)
18
+ onConfirm(); // Execute confirm callback if provided
19
+ }, children: confirmText }))] })] }) }));
20
+ };
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ export interface BreadcrumbItemProps {
3
+ title: string;
4
+ href?: string;
5
+ level: number;
6
+ }
7
+ interface BreadcrumbContextType {
8
+ breadcrumbItems: BreadcrumbItemProps[];
9
+ addBreadcrumb: (item: BreadcrumbItemProps) => void;
10
+ backBreadcrumb: (item: BreadcrumbItemProps) => void;
11
+ addBreadcrumbItems: (items: BreadcrumbItemProps[], isReplace?: boolean) => void;
12
+ clearBreadcrumb: () => void;
13
+ }
14
+ export declare function BreadcrumbProvider({ children }: {
15
+ children: ReactNode;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ export declare function useBreadcrumb(): BreadcrumbContextType;
18
+ export {};
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext, useState } from 'react';
4
+ // Create the context with a default value
5
+ const BreadcrumbContext = createContext(undefined);
6
+ // Create a provider component
7
+ export function BreadcrumbProvider({ children }) {
8
+ const [breadcrumbItems, setBreadcrumbItems] = useState([]);
9
+ // Function to add a breadcrumb item
10
+ const addBreadcrumb = (item) => {
11
+ setBreadcrumbItems((prevItems) => {
12
+ const filterState = prevItems.filter((e) => e.level < item.level);
13
+ return [...filterState, item];
14
+ });
15
+ };
16
+ const addBreadcrumbItems = (items, isReplace) => {
17
+ if (isReplace) {
18
+ setBreadcrumbItems(items);
19
+ }
20
+ else {
21
+ setBreadcrumbItems((prevItems) => [...prevItems, ...items]);
22
+ }
23
+ };
24
+ // Function to go back in the breadcrumb
25
+ const backBreadcrumb = (item) => {
26
+ setBreadcrumbItems((prevItems) => {
27
+ const filterState = prevItems.filter((e) => e.level <= item.level);
28
+ return [...filterState];
29
+ });
30
+ };
31
+ const clearBreadcrumb = () => {
32
+ setBreadcrumbItems([]);
33
+ };
34
+ return (_jsx(BreadcrumbContext.Provider, { value: { breadcrumbItems, addBreadcrumb, backBreadcrumb, addBreadcrumbItems, clearBreadcrumb }, children: children }));
35
+ }
36
+ // Custom hook to use the BreadcrumbContext
37
+ export function useBreadcrumb() {
38
+ const context = useContext(BreadcrumbContext);
39
+ if (!context) {
40
+ throw new Error('useBreadcrumb must be used within a BreadcrumbProvider');
41
+ }
42
+ return context;
43
+ }
@@ -0,0 +1,5 @@
1
+ import { BreadcrumbItemProps } from "./BreadcrumbProvider";
2
+ export declare function AppBreadcrumb(): import("react/jsx-runtime").JSX.Element | null;
3
+ export declare function RenderAppBreadcrumb({ breadcrumb, }: {
4
+ breadcrumb: BreadcrumbItemProps;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import Link from "next/link";
4
+ import { Fragment, useEffect, useMemo, useState } from "react";
5
+ import { redirect } from "next/navigation";
6
+ import { useBreadcrumb } from "./BreadcrumbProvider";
7
+ import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from "../../shadcn/breadcrumb";
8
+ import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from "../../shadcn/drawer";
9
+ import { Button } from "../../shadcn/button";
10
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../../shadcn/dropdown-menu";
11
+ import { useIsMobile } from "../../hooks/use-mobile";
12
+ export function AppBreadcrumb() {
13
+ const { breadcrumbItems, backBreadcrumb } = useBreadcrumb();
14
+ const [open, setOpen] = useState(false);
15
+ const [itemToDisplay, setItemToDisplay] = useState(2);
16
+ const isMobile = useIsMobile();
17
+ useEffect(() => {
18
+ if (isMobile) {
19
+ setItemToDisplay(2);
20
+ }
21
+ else {
22
+ setItemToDisplay(4);
23
+ }
24
+ }, [isMobile]);
25
+ const breadcrumbObj = useMemo(() => {
26
+ return {
27
+ firstVisibleBreadcrumbList: breadcrumbItems.slice(0, 2),
28
+ hiddenBreadcrumbList: isMobile
29
+ ? breadcrumbItems.slice(2)
30
+ : breadcrumbItems.slice(2, itemToDisplay),
31
+ lastVisibleBreadcrumbList: breadcrumbItems.length > 2
32
+ ? breadcrumbItems.slice(2 -
33
+ (breadcrumbItems.length < itemToDisplay
34
+ ? breadcrumbItems.length
35
+ : itemToDisplay))
36
+ : [],
37
+ };
38
+ }, [breadcrumbItems, itemToDisplay, isMobile]);
39
+ if (!breadcrumbObj || isMobile == undefined || itemToDisplay == null) {
40
+ return null;
41
+ }
42
+ return (_jsx(Breadcrumb, { children: _jsxs(BreadcrumbList, { children: [breadcrumbObj.firstVisibleBreadcrumbList.map((item, index) => index < breadcrumbItems.length - 1 ? (_jsxs(Fragment, { children: [_jsx(BreadcrumbItem, { children: !item.href ? (_jsx(BreadcrumbPage, { className: "max-w-20 truncate md:max-w-none", children: item.title })) : (_jsx(BreadcrumbLink, { className: "max-w-20 truncate md:max-w-none cursor-pointer", onClick: () => {
43
+ backBreadcrumb(item);
44
+ redirect(item.href);
45
+ }, children: item.title })) }), _jsx(BreadcrumbSeparator, {}, "firstsep" + index)] }, "first" + index)) : (_jsx(BreadcrumbItem, { children: _jsx(BreadcrumbPage, { className: "max-w-20 truncate md:max-w-none", children: item.title }) }, "first" + index))), breadcrumbItems.length > itemToDisplay ? (_jsxs(_Fragment, { children: [_jsx(BreadcrumbItem, { children: !isMobile ? (_jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [_jsx(DropdownMenuTrigger, { className: "flex items-center gap-1", "aria-label": "Toggle menu", children: _jsx(BreadcrumbEllipsis, { className: "h-4 w-4" }) }), _jsx(DropdownMenuContent, { align: "start", children: breadcrumbObj.hiddenBreadcrumbList.map((item, index) => (_jsx(DropdownMenuItem, { children: !item.href ? (_jsx("span", { children: item.title })) : (_jsx(Link, { href: item.href ? item.href : "#", children: item.title })) }, index))) })] })) : (_jsxs(Drawer, { open: open, onOpenChange: setOpen, children: [_jsx(DrawerTrigger, { "aria-label": "Toggle Menu", children: _jsx(BreadcrumbEllipsis, { className: "h-4 w-4" }) }), _jsxs(DrawerContent, { children: [_jsxs(DrawerHeader, { className: "text-left", children: [_jsx(DrawerTitle, { children: "Navigate to" }), _jsx(DrawerDescription, { children: "Select a page to navigate to." })] }), _jsx("div", { className: "grid gap-1 px-2 lg:px-4", children: breadcrumbObj.hiddenBreadcrumbList.map((item, index) => (_jsx("div", { children: item.clickable == false ? (_jsx("span", { className: "py-1 text-sm", children: item.title })) : (_jsx(Link, { href: item.href ? item.href : "#", className: "py-1 text-sm", children: item.title })) }, index))) }), _jsx(DrawerFooter, { className: "pt-4", children: _jsx(DrawerClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Close" }) }) })] })] })) }), !isMobile && _jsx(BreadcrumbSeparator, {})] })) : null, !isMobile &&
46
+ breadcrumbObj.lastVisibleBreadcrumbList.map((item, index) => index == breadcrumbObj.lastVisibleBreadcrumbList.length - 1 ? (_jsx(BreadcrumbItem, { children: _jsx(BreadcrumbPage, { className: "max-w-20 truncate md:max-w-none cursor-pointer", children: item.title }) }, "last" + index)) : (_jsxs(Fragment, { children: [_jsx(BreadcrumbItem, { children: !item.href ? (_jsx(BreadcrumbPage, { className: "max-w-20 truncate md:max-w-none", children: item.title })) : (_jsx(BreadcrumbLink, { className: "max-w-20 truncate md:max-w-none cursor-pointer", onClick: () => {
47
+ backBreadcrumb(item);
48
+ redirect(item.href);
49
+ }, children: item.title })) }), _jsx(BreadcrumbSeparator, {}, "lastsep" + index)] }, "last" + index)))] }, "BreadcrumbList1") }, "Breadcrumb1"));
50
+ }
51
+ export function RenderAppBreadcrumb({ breadcrumb, }) {
52
+ const { addBreadcrumb } = useBreadcrumb();
53
+ useEffect(() => {
54
+ addBreadcrumb(breadcrumb);
55
+ }, [breadcrumb]);
56
+ return _jsx(_Fragment, {});
57
+ }
@@ -0,0 +1,5 @@
1
+ import { BigCalendarEventProps, ExtraParamsEvent } from "../type";
2
+ export default function BigCalenderEvent({ event, extraParamsEvent }: {
3
+ event: BigCalendarEventProps;
4
+ extraParamsEvent?: ExtraParamsEvent;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Eye, SquarePen } from "lucide-react";
3
+ import { TooltipComponent as Tooltip } from "../../tooltip";
4
+ // Custom event component
5
+ export default function BigCalenderEvent({ event, extraParamsEvent }) {
6
+ return (_jsxs("div", { className: "custom-event flex flex-row justify-between", children: [_jsx("span", { className: "truncate w-auto", children: event.title }), _jsxs("span", { className: "flex flex-row gap-1", children: [((extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.isEditableAll) || event.isEditable) &&
7
+ _jsx(Tooltip, { tooltipContent: "Edit", children: _jsx("button", { className: "event-edit-button w-fit px-1", onClick: (e) => {
8
+ var _a;
9
+ e.stopPropagation(); // Prevent triggering other event handlers
10
+ (_a = extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.onEditEventClick) === null || _a === void 0 ? void 0 : _a.call(extraParamsEvent, event);
11
+ }, children: _jsx(SquarePen, { size: 16 }) }) }), _jsx(Tooltip, { tooltipContent: "View", children: _jsx("button", { className: "event-view-button w-fit px-1", onClick: (e) => {
12
+ var _a;
13
+ e.stopPropagation(); // Prevent triggering other event handlers
14
+ (_a = extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.onViewEventClick) === null || _a === void 0 ? void 0 : _a.call(extraParamsEvent, event);
15
+ }, children: _jsx(Eye, { size: 16 }) }) })] })] }));
16
+ }
@@ -0,0 +1,2 @@
1
+ import { BigCalenderToolbarProps } from "../type";
2
+ export default function BigCalenderToolbar({ onNavigate, onView, label, extraTools, view }: BigCalenderToolbarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Views } from "react-big-calendar";
3
+ import { Fragment, useState } from "react";
4
+ import { ChevronLeft, ChevronRight } from "lucide-react";
5
+ import { ToggleGroup, ToggleGroupItem } from "../../../shadcn/toggle-group";
6
+ // Custom toolbar component
7
+ export default function BigCalenderToolbar({ onNavigate, onView, label, extraTools, view }) {
8
+ const [calViewsValue, setValue] = useState(view === Views.DAY ? "DAY" : view === Views.WEEK ? "WEEK" : "MONTH");
9
+ return (_jsx(_Fragment, { children: _jsxs("div", { className: "flex flex-col md:flex-row justify-between items-start md:items-center mb-3", children: [_jsxs(ToggleGroup, { type: "single", variant: 'outline', onValueChange: (value) => {
10
+ switch (value) {
11
+ case "PREV":
12
+ onNavigate("PREV");
13
+ break;
14
+ case "NEXT":
15
+ onNavigate("NEXT");
16
+ break;
17
+ case "TODAY":
18
+ onNavigate("TODAY");
19
+ break;
20
+ default:
21
+ break;
22
+ }
23
+ }, children: [_jsx(ToggleGroupItem, { className: "rounded-e-none", value: "PREV", children: _jsx(ChevronLeft, { size: 16 }) }), _jsx(ToggleGroupItem, { className: "rounded-none border-x", value: "NEXT", children: _jsx(ChevronRight, { size: 16 }) }), _jsx(ToggleGroupItem, { className: "rounded-s-none", value: "TODAY", children: "Today" })] }), _jsx("span", { className: "rbc-toolbar-label", children: label }), _jsxs("div", { className: "flex flex-row gap-2", children: [_jsxs(ToggleGroup, { type: "single", variant: 'outline', value: calViewsValue, onValueChange: (value) => {
24
+ setValue(value);
25
+ switch (value) {
26
+ case "DAY":
27
+ onView(Views.DAY);
28
+ break;
29
+ case "WEEK":
30
+ onView(Views.WEEK);
31
+ break;
32
+ case "MONTH":
33
+ onView(Views.MONTH);
34
+ break;
35
+ default:
36
+ break;
37
+ }
38
+ }, children: [_jsx(ToggleGroupItem, { className: 'rounded-e-none', value: "MONTH", children: "Month" }), _jsx(ToggleGroupItem, { className: 'rounded-none border-x-0', value: "WEEK", children: "Week" }), _jsx(ToggleGroupItem, { className: "rounded-s-none", value: "DAY", children: "Day" })] }), extraTools === null || extraTools === void 0 ? void 0 : extraTools.map((tool, index) => _jsx(Fragment, { children: tool }, index))] })] }) }));
39
+ }
@@ -0,0 +1,3 @@
1
+ import "react-big-calendar/lib/css/react-big-calendar.css";
2
+ import { BigCalendarProps } from "./type";
3
+ export declare function BigCalendar({ events, extraParamsEvent, extraTools }: BigCalendarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,35 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { format, getDay, parse, startOfWeek } from "date-fns";
4
+ import { Calendar, dateFnsLocalizer, Views } from "react-big-calendar";
5
+ import "react-big-calendar/lib/css/react-big-calendar.css";
6
+ import { useState } from "react";
7
+ import BigCalenderToolbar from "./big-calender-toolbar";
8
+ import BigCalenderEvent from "./big-calender-event";
9
+ import { enUS } from 'date-fns/locale';
10
+ // Localization settings
11
+ const locales = {
12
+ "en-US": enUS,
13
+ };
14
+ const localizer = dateFnsLocalizer({
15
+ format,
16
+ parse,
17
+ startOfWeek,
18
+ getDay,
19
+ locales,
20
+ });
21
+ export function BigCalendar({ events, extraParamsEvent, extraTools }) {
22
+ const [view, setView] = useState((extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.defaultView) === "day" ? Views.DAY :
23
+ (extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.defaultView) === "week" ? Views.WEEK :
24
+ (extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.defaultView) === "month" ? Views.MONTH :
25
+ (extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.defaultView) === "work week" ? Views.WORK_WEEK :
26
+ (extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.defaultView) === "agenda" ? Views.AGENDA : Views.MONTH);
27
+ const [date, setDate] = useState(new Date());
28
+ return (_jsx(Calendar, { localizer: localizer, events: events || [], startAccessor: "start", endAccessor: "end", views: [Views.DAY, Views.WEEK, Views.MONTH], view: view, onView: (view) => setView(view), date: date, onNavigate: (date) => setDate(date), components: {
29
+ event: (props) => _jsx(BigCalenderEvent, { event: props.event, extraParamsEvent: extraParamsEvent }),
30
+ toolbar: (props) => _jsx(BigCalenderToolbar, Object.assign({}, props, { extraTools: extraTools, view: view })),
31
+ }, style: {
32
+ height: (extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.height) || "100%",
33
+ margin: (extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.margin) || "0px",
34
+ } }));
35
+ }
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from "react";
2
+ export interface BigCalendarProps {
3
+ events: BigCalendarEventProps[];
4
+ extraParamsEvent?: ExtraParamsEvent;
5
+ extraTools?: ReactNode[];
6
+ onDateClick?: (date: Date) => void;
7
+ }
8
+ export interface ExtraParamsEvent {
9
+ defaultView?: string;
10
+ isEditableAll?: boolean;
11
+ isViewable?: boolean;
12
+ onEditEventClick?: (event: BigCalendarEventProps) => void;
13
+ onViewEventClick?: (event: BigCalendarEventProps) => void;
14
+ height?: string;
15
+ margin?: string;
16
+ }
17
+ export interface BigCalendarEventProps extends Event {
18
+ title?: string;
19
+ isEditable?: boolean;
20
+ isViewable?: boolean;
21
+ start: Date;
22
+ end: Date;
23
+ onEventClick?: (event: any) => void;
24
+ }
25
+ export interface BigCalenderToolbarProps {
26
+ onNavigate: (view: any) => void;
27
+ onView: (view: any) => void;
28
+ label: string;
29
+ extraTools?: ReactNode[];
30
+ view: "month" | "week" | "work_week" | "day" | "agenda";
31
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { buttonVariants } from "../../shadcn/button";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
5
+ children: React.ReactNode;
6
+ asChild?: boolean;
7
+ }
8
+ export interface ButtonWithTooltipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
9
+ children: React.ReactNode;
10
+ asChild?: boolean;
11
+ tooltipContent: string | React.ReactNode;
12
+ }
13
+ export declare function TextButton({ children, variant, asChild, size, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function TextButtonWithTooltip({ children, variant, asChild, size, tooltipContent, ...props }: ButtonWithTooltipProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function IconTextButton({ children, variant, asChild, size, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function IconTextButtonWithTooltip({ children, variant, size, asChild, tooltipContent, ...props }: ButtonWithTooltipProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function IconButton({ children, variant, size, asChild, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function IconButtonWithTooltip({ children, tooltipContent, asChild, variant, size, ...props }: ButtonWithTooltipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { TooltipComponent as Tooltip } from "../tooltip";
14
+ import { Button } from "../../shadcn/button";
15
+ export function TextButton(_a) {
16
+ var { children, variant, asChild = false, size } = _a, props = __rest(_a, ["children", "variant", "asChild", "size"]);
17
+ return (_jsx(Button, Object.assign({ variant: variant, size: size }, props, { asChild: asChild, children: children })));
18
+ }
19
+ export function TextButtonWithTooltip(_a) {
20
+ var { children, variant, asChild = false, size, tooltipContent } = _a, props = __rest(_a, ["children", "variant", "asChild", "size", "tooltipContent"]);
21
+ return (_jsx(Tooltip, { tooltipContent: tooltipContent, children: _jsx(TextButton, Object.assign({ variant: variant, size: size }, props, { asChild: asChild, children: children })) }));
22
+ }
23
+ export function IconTextButton(_a) {
24
+ var { children, variant, asChild = false, size } = _a, props = __rest(_a, ["children", "variant", "asChild", "size"]);
25
+ return (_jsx(Button, Object.assign({ variant: variant || "outline", size: size || "sm" }, props, { asChild: asChild, children: children })));
26
+ }
27
+ export function IconTextButtonWithTooltip(_a) {
28
+ var { children, variant, size, asChild = false, tooltipContent } = _a, props = __rest(_a, ["children", "variant", "size", "asChild", "tooltipContent"]);
29
+ return (_jsx(Tooltip, { tooltipContent: tooltipContent, children: _jsx(IconTextButton, Object.assign({ variant: variant, size: size }, props, { asChild: asChild, children: children })) }));
30
+ }
31
+ export function IconButton(_a) {
32
+ var { children, variant, size, asChild = false } = _a, props = __rest(_a, ["children", "variant", "size", "asChild"]);
33
+ return (_jsx(Button, Object.assign({ variant: variant || "outline", size: size || "icon" }, props, { asChild: asChild, children: children })));
34
+ }
35
+ export function IconButtonWithTooltip(_a) {
36
+ var { children, tooltipContent, asChild = false, variant, size } = _a, props = __rest(_a, ["children", "tooltipContent", "asChild", "variant", "size"]);
37
+ return (_jsx(Tooltip, { tooltipContent: tooltipContent, children: _jsx(IconButton, Object.assign({ variant: variant, size: size }, props, { asChild: asChild, children: children })) }));
38
+ }