ikoncomponents 1.5.7 → 1.5.8

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/bin.js +2 -0
  3. package/dist/commands/init.js +63 -0
  4. package/dist/index.js +14 -116
  5. package/dist/utlis/copyDir.js +7 -0
  6. package/package.json +17 -91
  7. package/templates/default/hooks/use-mobile.ts +19 -0
  8. package/templates/default/ikonS/accordion.tsx +66 -0
  9. package/templates/default/ikonS/alert-dialog.tsx +179 -0
  10. package/templates/default/ikonS/alert.tsx +66 -0
  11. package/templates/default/ikonS/aspect-ratio.tsx +11 -0
  12. package/templates/default/ikonS/avatar.tsx +53 -0
  13. package/templates/default/ikonS/badge.tsx +49 -0
  14. package/templates/default/ikonS/breadcrumb.tsx +109 -0
  15. package/templates/default/ikonS/button.tsx +64 -0
  16. package/templates/default/ikonS/calendar.tsx +227 -0
  17. package/templates/default/ikonS/card.tsx +92 -0
  18. package/templates/default/ikonS/checkbox.tsx +33 -0
  19. package/templates/default/ikonS/collapsible.tsx +33 -0
  20. package/templates/default/ikonS/command.tsx +184 -0
  21. package/templates/default/ikonS/date-input.tsx +259 -0
  22. package/templates/default/ikonS/date-range-picker.tsx +103 -0
  23. package/templates/default/ikonS/dialog.tsx +143 -0
  24. package/templates/default/ikonS/drawer.tsx +134 -0
  25. package/templates/default/ikonS/dropdown-menu.tsx +259 -0
  26. package/templates/default/ikonS/form.tsx +166 -0
  27. package/templates/default/ikonS/hover-card.tsx +44 -0
  28. package/templates/default/ikonS/input-otp.tsx +71 -0
  29. package/templates/default/ikonS/input.tsx +22 -0
  30. package/templates/default/ikonS/label.tsx +24 -0
  31. package/templates/default/ikonS/navigation-menu.tsx +195 -0
  32. package/templates/default/ikonS/popover.tsx +48 -0
  33. package/templates/default/ikonS/progress.tsx +40 -0
  34. package/templates/default/ikonS/radio-group.tsx +45 -0
  35. package/templates/default/ikonS/scroll-area.tsx +58 -0
  36. package/templates/default/ikonS/select.tsx +184 -0
  37. package/templates/default/ikonS/separator.tsx +28 -0
  38. package/templates/default/ikonS/sheet.tsx +139 -0
  39. package/templates/default/ikonS/sidebar.tsx +726 -0
  40. package/templates/default/ikonS/skeleton.tsx +15 -0
  41. package/templates/default/ikonS/slider.tsx +64 -0
  42. package/templates/default/ikonS/sonner.tsx +25 -0
  43. package/templates/default/ikonS/switch.tsx +31 -0
  44. package/templates/default/ikonS/table.tsx +116 -0
  45. package/templates/default/ikonS/tabs.tsx +67 -0
  46. package/templates/default/ikonS/textarea.tsx +18 -0
  47. package/templates/default/ikonS/toggle-group.tsx +83 -0
  48. package/templates/default/ikonS/toggle.tsx +47 -0
  49. package/templates/default/ikonS/tooltip.tsx +65 -0
  50. package/templates/default/ikonS/workflow.tsx +119 -0
  51. package/templates/default/ikoncomponents/action-menu/index.tsx +108 -0
  52. package/templates/default/ikoncomponents/action-menu/type.ts +18 -0
  53. package/templates/default/ikoncomponents/activity-sheet/index.tsx +63 -0
  54. package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +65 -0
  55. package/templates/default/ikoncomponents/alert-dialog/index.tsx +80 -0
  56. package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +68 -0
  57. package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +222 -0
  58. package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +38 -0
  59. package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +81 -0
  60. package/templates/default/ikoncomponents/big-calendar/index.css +879 -0
  61. package/templates/default/ikoncomponents/big-calendar/index.tsx +59 -0
  62. package/templates/default/ikoncomponents/big-calendar/type.ts +37 -0
  63. package/templates/default/ikoncomponents/buttons/index.tsx +127 -0
  64. package/templates/default/ikoncomponents/combobox-input/index.tsx +75 -0
  65. package/templates/default/ikoncomponents/combobox-input/type.ts +14 -0
  66. package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +242 -0
  67. package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +80 -0
  68. package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +149 -0
  69. package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +98 -0
  70. package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +119 -0
  71. package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +45 -0
  72. package/templates/default/ikoncomponents/data-table/function.ts +7 -0
  73. package/templates/default/ikoncomponents/data-table/index.tsx +549 -0
  74. package/templates/default/ikoncomponents/data-table/type.ts +75 -0
  75. package/templates/default/ikoncomponents/e-chart/index.tsx +183 -0
  76. package/templates/default/ikoncomponents/file-input/index.tsx +27 -0
  77. package/templates/default/ikoncomponents/fileUpload/index.tsx +121 -0
  78. package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +111 -0
  79. package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +121 -0
  80. package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +80 -0
  81. package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +9 -0
  82. package/templates/default/ikoncomponents/form-fields/input/index.tsx +27 -0
  83. package/{dist/ikoncomponents/form-fields/multi-combobox-input/index.js → templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx} +574 -381
  84. package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +39 -0
  85. package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +52 -0
  86. package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +7 -0
  87. package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +28 -0
  88. package/templates/default/ikoncomponents/form-fields/types/index.ts +46 -0
  89. package/templates/default/ikoncomponents/glowing-effect/index.tsx +171 -0
  90. package/templates/default/ikoncomponents/icon/index.tsx +22 -0
  91. package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +19 -0
  92. package/{dist/ikoncomponents/image-cropper-upload/components/newCropper.js → templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx} +117 -85
  93. package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +352 -0
  94. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +250 -0
  95. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +32 -0
  96. package/{dist/ikoncomponents/image-cropper-upload/image-cropper/index.js → templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx} +119 -87
  97. package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +95 -0
  98. package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +117 -0
  99. package/templates/default/ikoncomponents/loading-spinner/index.tsx +43 -0
  100. package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +30 -0
  101. package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +103 -0
  102. package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +36 -0
  103. package/templates/default/ikoncomponents/main-layout/footer.tsx +21 -0
  104. package/templates/default/ikoncomponents/main-layout/header.tsx +53 -0
  105. package/templates/default/ikoncomponents/main-layout/index.tsx +38 -0
  106. package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +389 -0
  107. package/templates/default/ikoncomponents/main-layout/nav-main.tsx +103 -0
  108. package/templates/default/ikoncomponents/multi-combobox/index.tsx +345 -0
  109. package/templates/default/ikoncomponents/no-data/index.tsx +11 -0
  110. package/templates/default/ikoncomponents/page-wrapper/index.tsx +30 -0
  111. package/templates/default/ikoncomponents/password-strength-meter/index.tsx +49 -0
  112. package/templates/default/ikoncomponents/phone-input/index.tsx +72 -0
  113. package/templates/default/ikoncomponents/provider-wrapper/index.tsx +32 -0
  114. package/templates/default/ikoncomponents/search-input/index.tsx +18 -0
  115. package/templates/default/ikoncomponents/sheet/index.tsx +34 -0
  116. package/templates/default/ikoncomponents/simple-widget/index.tsx +54 -0
  117. package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +34 -0
  118. package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +13 -0
  119. package/templates/default/ikoncomponents/tabs/index.tsx +139 -0
  120. package/{dist/ikoncomponents/tabs/type.d.ts → templates/default/ikoncomponents/tabs/type.ts} +20 -19
  121. package/{dist/ikoncomponents/theme-toggle-btn/index.js → templates/default/ikoncomponents/theme-toggle-btn/index.tsx} +189 -118
  122. package/templates/default/ikoncomponents/title-progress/index.tsx +41 -0
  123. package/templates/default/ikoncomponents/tooltip/index.tsx +17 -0
  124. package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +33 -0
  125. package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +279 -0
  126. package/templates/default/ikoncomponents/upload-tab/index.tsx +237 -0
  127. package/templates/default/ikoncomponents/widgets/index.tsx +81 -0
  128. package/templates/default/ikoncomponents/widgets/type.ts +11 -0
  129. package/templates/default/ikoncomponents/work-in-progress/index.tsx +16 -0
  130. package/templates/default/styles.css +1159 -0
  131. package/templates/default/utils/actions/account/index.ts +33 -0
  132. package/templates/default/utils/actions/account/type.ts +4 -0
  133. package/{dist/utils/actions/auth/index.js → templates/default/utils/actions/auth/index.ts} +69 -58
  134. package/templates/default/utils/actions/common/revalidate.ts +18 -0
  135. package/templates/default/utils/actions/common/type.ts +4 -0
  136. package/{dist/utils/actions/common/utils.js → templates/default/utils/actions/common/utils.ts} +28 -25
  137. package/templates/default/utils/actions/software/index.ts +106 -0
  138. package/templates/default/utils/api/accountService/index.ts +103 -0
  139. package/templates/default/utils/api/accountService/type.ts +4 -0
  140. package/templates/default/utils/api/file-upload/index.ts +103 -0
  141. package/templates/default/utils/api/file-upload/type.ts +8 -0
  142. package/{dist/utils/api/ikonBaseApi.js → templates/default/utils/api/ikonBaseApi.ts} +132 -104
  143. package/templates/default/utils/api/loginService/index.ts +106 -0
  144. package/{dist/utils/api/loginService/type.d.ts → templates/default/utils/api/loginService/type.ts} +35 -31
  145. package/templates/default/utils/api/softwareService/index.ts +356 -0
  146. package/templates/default/utils/api/softwareService/type.ts +62 -0
  147. package/{dist/utils/border-radius-provider.js → templates/default/utils/border-radius-provider.tsx} +59 -35
  148. package/templates/default/utils/cn.ts +6 -0
  149. package/{dist/utils/font-provider.js → templates/default/utils/font-provider.tsx} +61 -37
  150. package/templates/default/utils/session/cookieSession.ts +49 -0
  151. package/templates/default/utils/theme-provider/index.tsx +11 -0
  152. package/templates/default/utils/token-management/index.ts +115 -0
  153. package/templates/default/utils/token-management/types.ts +6 -0
  154. package/dist/hooks/use-mobile.d.ts +0 -1
  155. package/dist/hooks/use-mobile.js +0 -15
  156. package/dist/ikoncomponents/action-menu/index.d.ts +0 -5
  157. package/dist/ikoncomponents/action-menu/index.js +0 -42
  158. package/dist/ikoncomponents/action-menu/type.d.ts +0 -14
  159. package/dist/ikoncomponents/action-menu/type.js +0 -1
  160. package/dist/ikoncomponents/activity-sheet/index.d.ts +0 -11
  161. package/dist/ikoncomponents/activity-sheet/index.js +0 -23
  162. package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +0 -21
  163. package/dist/ikoncomponents/alert-dialog/dialog-context.js +0 -30
  164. package/dist/ikoncomponents/alert-dialog/index.d.ts +0 -14
  165. package/dist/ikoncomponents/alert-dialog/index.js +0 -20
  166. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +0 -18
  167. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +0 -43
  168. package/dist/ikoncomponents/app-breadcrumb/index.d.ts +0 -5
  169. package/dist/ikoncomponents/app-breadcrumb/index.js +0 -57
  170. package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +0 -5
  171. package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +0 -16
  172. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +0 -2
  173. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +0 -39
  174. package/dist/ikoncomponents/big-calendar/index.d.ts +0 -3
  175. package/dist/ikoncomponents/big-calendar/index.js +0 -35
  176. package/dist/ikoncomponents/big-calendar/type.d.ts +0 -31
  177. package/dist/ikoncomponents/big-calendar/type.js +0 -1
  178. package/dist/ikoncomponents/buttons/index.d.ts +0 -18
  179. package/dist/ikoncomponents/buttons/index.js +0 -38
  180. package/dist/ikoncomponents/combobox-input/index.d.ts +0 -2
  181. package/dist/ikoncomponents/combobox-input/index.js +0 -18
  182. package/dist/ikoncomponents/combobox-input/type.d.ts +0 -13
  183. package/dist/ikoncomponents/combobox-input/type.js +0 -1
  184. package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +0 -21
  185. package/dist/ikoncomponents/custom-combo-dropdown/index.js +0 -85
  186. package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +0 -2
  187. package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +0 -22
  188. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +0 -2
  189. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +0 -35
  190. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +0 -2
  191. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +0 -38
  192. package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +0 -2
  193. package/dist/ikoncomponents/data-table/datatable-pagination/index.js +0 -13
  194. package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +0 -2
  195. package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +0 -18
  196. package/dist/ikoncomponents/data-table/function.d.ts +0 -1
  197. package/dist/ikoncomponents/data-table/function.js +0 -6
  198. package/dist/ikoncomponents/data-table/index.d.ts +0 -2
  199. package/dist/ikoncomponents/data-table/index.js +0 -223
  200. package/dist/ikoncomponents/data-table/type.d.ts +0 -60
  201. package/dist/ikoncomponents/data-table/type.js +0 -1
  202. package/dist/ikoncomponents/e-chart/index.d.ts +0 -15
  203. package/dist/ikoncomponents/e-chart/index.js +0 -115
  204. package/dist/ikoncomponents/file-input/index.d.ts +0 -1
  205. package/dist/ikoncomponents/file-input/index.js +0 -21
  206. package/dist/ikoncomponents/fileUpload/index.d.ts +0 -15
  207. package/dist/ikoncomponents/fileUpload/index.js +0 -69
  208. package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +0 -2
  209. package/dist/ikoncomponents/form-fields/combobox-input/index.js +0 -21
  210. package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +0 -18
  211. package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +0 -26
  212. package/dist/ikoncomponents/form-fields/date-input/index.d.ts +0 -2
  213. package/dist/ikoncomponents/form-fields/date-input/index.js +0 -15
  214. package/dist/ikoncomponents/form-fields/file-input/index.d.ts +0 -1
  215. package/dist/ikoncomponents/form-fields/file-input/index.js +0 -4
  216. package/dist/ikoncomponents/form-fields/input/index.d.ts +0 -2
  217. package/dist/ikoncomponents/form-fields/input/index.js +0 -18
  218. package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +0 -6
  219. package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +0 -2
  220. package/dist/ikoncomponents/form-fields/otp-input/index.js +0 -18
  221. package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +0 -1
  222. package/dist/ikoncomponents/form-fields/phone-input/index.js +0 -4
  223. package/dist/ikoncomponents/form-fields/textarea/index.d.ts +0 -2
  224. package/dist/ikoncomponents/form-fields/textarea/index.js +0 -18
  225. package/dist/ikoncomponents/form-fields/types/index.d.ts +0 -36
  226. package/dist/ikoncomponents/form-fields/types/index.js +0 -1
  227. package/dist/ikoncomponents/glowing-effect/index.d.ts +0 -14
  228. package/dist/ikoncomponents/glowing-effect/index.js +0 -84
  229. package/dist/ikoncomponents/icon/index.d.ts +0 -8
  230. package/dist/ikoncomponents/icon/index.js +0 -23
  231. package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +0 -15
  232. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +0 -7
  233. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +0 -145
  234. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +0 -6
  235. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +0 -92
  236. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +0 -6
  237. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +0 -14
  238. package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +0 -14
  239. package/dist/ikoncomponents/image-cropper-upload/index.d.ts +0 -27
  240. package/dist/ikoncomponents/image-cropper-upload/index.js +0 -49
  241. package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +0 -16
  242. package/dist/ikoncomponents/image-cropper-upload/utils/index.js +0 -73
  243. package/dist/ikoncomponents/loading-spinner/index.d.ts +0 -9
  244. package/dist/ikoncomponents/loading-spinner/index.js +0 -19
  245. package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +0 -10
  246. package/dist/ikoncomponents/main-layout/RefreshContext.js +0 -17
  247. package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +0 -33
  248. package/dist/ikoncomponents/main-layout/SidebarNavContext.js +0 -52
  249. package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +0 -3
  250. package/dist/ikoncomponents/main-layout/app-sidebar.js +0 -24
  251. package/dist/ikoncomponents/main-layout/footer.d.ts +0 -1
  252. package/dist/ikoncomponents/main-layout/footer.js +0 -5
  253. package/dist/ikoncomponents/main-layout/header.d.ts +0 -3
  254. package/dist/ikoncomponents/main-layout/header.js +0 -15
  255. package/dist/ikoncomponents/main-layout/index.d.ts +0 -6
  256. package/dist/ikoncomponents/main-layout/index.js +0 -11
  257. package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +0 -60
  258. package/dist/ikoncomponents/main-layout/main-sidebar.js +0 -119
  259. package/dist/ikoncomponents/main-layout/nav-main.d.ts +0 -11
  260. package/dist/ikoncomponents/main-layout/nav-main.js +0 -33
  261. package/dist/ikoncomponents/multi-combobox/index.d.ts +0 -13
  262. package/dist/ikoncomponents/multi-combobox/index.js +0 -202
  263. package/dist/ikoncomponents/no-data/index.d.ts +0 -3
  264. package/dist/ikoncomponents/no-data/index.js +0 -5
  265. package/dist/ikoncomponents/page-wrapper/index.d.ts +0 -9
  266. package/dist/ikoncomponents/page-wrapper/index.js +0 -7
  267. package/dist/ikoncomponents/password-strength-meter/index.d.ts +0 -3
  268. package/dist/ikoncomponents/password-strength-meter/index.js +0 -40
  269. package/dist/ikoncomponents/phone-input/index.d.ts +0 -1
  270. package/dist/ikoncomponents/phone-input/index.js +0 -41
  271. package/dist/ikoncomponents/provider-wrapper/index.d.ts +0 -6
  272. package/dist/ikoncomponents/provider-wrapper/index.js +0 -11
  273. package/dist/ikoncomponents/search-input/index.d.ts +0 -1
  274. package/dist/ikoncomponents/search-input/index.js +0 -19
  275. package/dist/ikoncomponents/sheet/index.d.ts +0 -10
  276. package/dist/ikoncomponents/sheet/index.js +0 -6
  277. package/dist/ikoncomponents/simple-widget/index.d.ts +0 -14
  278. package/dist/ikoncomponents/simple-widget/index.js +0 -14
  279. package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +0 -5
  280. package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +0 -6
  281. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +0 -3
  282. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +0 -5
  283. package/dist/ikoncomponents/tabs/index.d.ts +0 -2
  284. package/dist/ikoncomponents/tabs/index.js +0 -50
  285. package/dist/ikoncomponents/tabs/type.js +0 -2
  286. package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +0 -1
  287. package/dist/ikoncomponents/title-progress/index.d.ts +0 -12
  288. package/dist/ikoncomponents/title-progress/index.js +0 -10
  289. package/dist/ikoncomponents/tooltip/index.d.ts +0 -5
  290. package/dist/ikoncomponents/tooltip/index.js +0 -5
  291. package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +0 -31
  292. package/dist/ikoncomponents/twolevel-dropdown/index.js +0 -143
  293. package/dist/ikoncomponents/upload-tab/index.d.ts +0 -1
  294. package/dist/ikoncomponents/upload-tab/index.js +0 -92
  295. package/dist/ikoncomponents/widgets/index.d.ts +0 -2
  296. package/dist/ikoncomponents/widgets/index.js +0 -14
  297. package/dist/ikoncomponents/widgets/type.d.ts +0 -10
  298. package/dist/ikoncomponents/widgets/type.js +0 -2
  299. package/dist/ikoncomponents/work-in-progress/index.d.ts +0 -1
  300. package/dist/ikoncomponents/work-in-progress/index.js +0 -4
  301. package/dist/index.d.ts +0 -138
  302. package/dist/shadcn/accordion.d.ts +0 -7
  303. package/dist/shadcn/accordion.js +0 -33
  304. package/dist/shadcn/alert-dialog.d.ts +0 -20
  305. package/dist/shadcn/alert-dialog.js +0 -83
  306. package/dist/shadcn/alert.d.ts +0 -9
  307. package/dist/shadcn/alert.js +0 -38
  308. package/dist/shadcn/aspect-ratio.d.ts +0 -3
  309. package/dist/shadcn/aspect-ratio.js +0 -19
  310. package/dist/shadcn/avatar.d.ts +0 -6
  311. package/dist/shadcn/avatar.js +0 -28
  312. package/dist/shadcn/badge.d.ts +0 -9
  313. package/dist/shadcn/badge.js +0 -35
  314. package/dist/shadcn/breadcrumb.d.ts +0 -11
  315. package/dist/shadcn/breadcrumb.js +0 -45
  316. package/dist/shadcn/button.d.ts +0 -10
  317. package/dist/shadcn/button.js +0 -47
  318. package/dist/shadcn/calendar.d.ts +0 -8
  319. package/dist/shadcn/calendar.js +0 -61
  320. package/dist/shadcn/card.d.ts +0 -9
  321. package/dist/shadcn/card.js +0 -42
  322. package/dist/shadcn/checkbox.d.ts +0 -4
  323. package/dist/shadcn/checkbox.js +0 -21
  324. package/dist/shadcn/collapsible.d.ts +0 -5
  325. package/dist/shadcn/collapsible.js +0 -27
  326. package/dist/shadcn/command.d.ts +0 -18
  327. package/dist/shadcn/command.js +0 -54
  328. package/dist/shadcn/date-input.d.ts +0 -7
  329. package/dist/shadcn/date-input.js +0 -179
  330. package/dist/shadcn/date-range-picker.d.ts +0 -24
  331. package/dist/shadcn/date-range-picker.js +0 -45
  332. package/dist/shadcn/dialog.d.ts +0 -15
  333. package/dist/shadcn/dialog.js +0 -57
  334. package/dist/shadcn/drawer.d.ts +0 -13
  335. package/dist/shadcn/drawer.js +0 -56
  336. package/dist/shadcn/dropdown-menu.d.ts +0 -25
  337. package/dist/shadcn/dropdown-menu.js +0 -77
  338. package/dist/shadcn/form.d.ts +0 -24
  339. package/dist/shadcn/form.js +0 -70
  340. package/dist/shadcn/hover-card.d.ts +0 -6
  341. package/dist/shadcn/hover-card.js +0 -28
  342. package/dist/shadcn/input-otp.d.ts +0 -34
  343. package/dist/shadcn/input-otp.js +0 -40
  344. package/dist/shadcn/input.d.ts +0 -3
  345. package/dist/shadcn/input.js +0 -18
  346. package/dist/shadcn/label.d.ts +0 -4
  347. package/dist/shadcn/label.js +0 -20
  348. package/dist/shadcn/navigation-menu.d.ts +0 -16
  349. package/dist/shadcn/navigation-menu.js +0 -74
  350. package/dist/shadcn/popover.d.ts +0 -7
  351. package/dist/shadcn/popover.js +0 -32
  352. package/dist/shadcn/progress.d.ts +0 -8
  353. package/dist/shadcn/progress.js +0 -23
  354. package/dist/shadcn/radio-group.d.ts +0 -5
  355. package/dist/shadcn/radio-group.js +0 -25
  356. package/dist/shadcn/scroll-area.d.ts +0 -5
  357. package/dist/shadcn/scroll-area.js +0 -26
  358. package/dist/shadcn/select.d.ts +0 -15
  359. package/dist/shadcn/select.js +0 -59
  360. package/dist/shadcn/separator.d.ts +0 -4
  361. package/dist/shadcn/separator.js +0 -20
  362. package/dist/shadcn/sheet.d.ts +0 -13
  363. package/dist/shadcn/sheet.js +0 -61
  364. package/dist/shadcn/sidebar.d.ts +0 -69
  365. package/dist/shadcn/sidebar.js +0 -242
  366. package/dist/shadcn/skeleton.d.ts +0 -3
  367. package/dist/shadcn/skeleton.js +0 -18
  368. package/dist/shadcn/slider.d.ts +0 -4
  369. package/dist/shadcn/slider.js +0 -26
  370. package/dist/shadcn/sonner.d.ts +0 -3
  371. package/dist/shadcn/sonner.js +0 -25
  372. package/dist/shadcn/switch.d.ts +0 -4
  373. package/dist/shadcn/switch.js +0 -20
  374. package/dist/shadcn/table.d.ts +0 -10
  375. package/dist/shadcn/table.js +0 -47
  376. package/dist/shadcn/tabs.d.ts +0 -7
  377. package/dist/shadcn/tabs.js +0 -32
  378. package/dist/shadcn/textarea.d.ts +0 -3
  379. package/dist/shadcn/textarea.js +0 -18
  380. package/dist/shadcn/toggle-group.d.ts +0 -9
  381. package/dist/shadcn/toggle-group.js +0 -35
  382. package/dist/shadcn/toggle.d.ts +0 -9
  383. package/dist/shadcn/toggle.js +0 -38
  384. package/dist/shadcn/tooltip.d.ts +0 -7
  385. package/dist/shadcn/tooltip.js +0 -32
  386. package/dist/shadcn/workflow.d.ts +0 -20
  387. package/dist/shadcn/workflow.js +0 -20
  388. package/dist/styles.css +0 -6163
  389. package/dist/utils/actions/account/index.d.ts +0 -5
  390. package/dist/utils/actions/account/index.js +0 -28
  391. package/dist/utils/actions/account/type.d.ts +0 -4
  392. package/dist/utils/actions/account/type.js +0 -1
  393. package/dist/utils/actions/auth/index.d.ts +0 -7
  394. package/dist/utils/actions/common/utils.d.ts +0 -5
  395. package/dist/utils/actions/software/index.d.ts +0 -11
  396. package/dist/utils/actions/software/index.js +0 -75
  397. package/dist/utils/api/accountService/index.d.ts +0 -23
  398. package/dist/utils/api/accountService/index.js +0 -64
  399. package/dist/utils/api/accountService/type.d.ts +0 -4
  400. package/dist/utils/api/accountService/type.js +0 -1
  401. package/dist/utils/api/file-upload/index.d.ts +0 -5
  402. package/dist/utils/api/file-upload/index.js +0 -80
  403. package/dist/utils/api/file-upload/type.d.ts +0 -6
  404. package/dist/utils/api/file-upload/type.js +0 -1
  405. package/dist/utils/api/ikonBaseApi.d.ts +0 -12
  406. package/dist/utils/api/loginService/index.d.ts +0 -12
  407. package/dist/utils/api/loginService/index.js +0 -72
  408. package/dist/utils/api/loginService/type.js +0 -1
  409. package/dist/utils/api/softwareService/index.d.ts +0 -64
  410. package/dist/utils/api/softwareService/index.js +0 -212
  411. package/dist/utils/api/softwareService/type.d.ts +0 -54
  412. package/dist/utils/api/softwareService/type.js +0 -1
  413. package/dist/utils/border-radius-provider.d.ts +0 -11
  414. package/dist/utils/cn.d.ts +0 -2
  415. package/dist/utils/cn.js +0 -5
  416. package/dist/utils/font-provider.d.ts +0 -11
  417. package/dist/utils/session/cookieSession.d.ts +0 -8
  418. package/dist/utils/session/cookieSession.js +0 -33
  419. package/dist/utils/theme-provider/index.d.ts +0 -3
  420. package/dist/utils/theme-provider/index.js +0 -18
  421. package/dist/utils/token-management/index.d.ts +0 -10
  422. package/dist/utils/token-management/index.js +0 -69
  423. package/dist/utils/token-management/types.d.ts +0 -6
  424. package/dist/utils/token-management/types.js +0 -1
@@ -1,179 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useEffect, useRef } from 'react';
3
- const DateInput = ({ value, onChange }) => {
4
- const [date, setDate] = React.useState(() => {
5
- const d = value ? new Date(value) : new Date();
6
- return {
7
- day: d.getDate(),
8
- month: d.getMonth() + 1, // JavaScript months are 0-indexed
9
- year: d.getFullYear()
10
- };
11
- });
12
- const monthRef = useRef(null);
13
- const dayRef = useRef(null);
14
- const yearRef = useRef(null);
15
- useEffect(() => {
16
- const d = value ? new Date(value) : new Date();
17
- setDate({
18
- day: d.getDate(),
19
- month: d.getMonth() + 1,
20
- year: d.getFullYear()
21
- });
22
- }, [value]);
23
- const validateDate = (field, value) => {
24
- if ((field === 'day' && (value < 1 || value > 31)) ||
25
- (field === 'month' && (value < 1 || value > 12)) ||
26
- (field === 'year' && (value < 1000 || value > 9999))) {
27
- return false;
28
- }
29
- // Validate the day of the month
30
- const newDate = Object.assign(Object.assign({}, date), { [field]: value });
31
- const d = new Date(newDate.year, newDate.month - 1, newDate.day);
32
- return d.getFullYear() === newDate.year &&
33
- d.getMonth() + 1 === newDate.month &&
34
- d.getDate() === newDate.day;
35
- };
36
- const handleInputChange = (field) => (e) => {
37
- const newValue = e.target.value ? Number(e.target.value) : '';
38
- const isValid = typeof newValue === 'number' && validateDate(field, newValue);
39
- // If the new value is valid, update the date
40
- const newDate = Object.assign(Object.assign({}, date), { [field]: newValue });
41
- setDate(newDate);
42
- // only call onChange when the entry is valid
43
- if (isValid) {
44
- onChange(new Date(newDate.year, newDate.month - 1, newDate.day));
45
- }
46
- };
47
- const initialDate = useRef(date);
48
- const handleBlur = (field) => (e) => {
49
- if (!e.target.value) {
50
- setDate(initialDate.current);
51
- return;
52
- }
53
- const newValue = Number(e.target.value);
54
- const isValid = validateDate(field, newValue);
55
- if (!isValid) {
56
- setDate(initialDate.current);
57
- }
58
- else {
59
- // If the new value is valid, update the initial value
60
- initialDate.current = Object.assign(Object.assign({}, date), { [field]: newValue });
61
- }
62
- };
63
- const handleKeyDown = (field) => (e) => {
64
- var _a, _b, _c, _d;
65
- // Allow command (or control) combinations
66
- if (e.metaKey || e.ctrlKey) {
67
- return;
68
- }
69
- // Prevent non-numeric characters, excluding allowed keys
70
- if (!/^[0-9]$/.test(e.key) &&
71
- ![
72
- 'ArrowUp',
73
- 'ArrowDown',
74
- 'ArrowLeft',
75
- 'ArrowRight',
76
- 'Delete',
77
- 'Tab',
78
- 'Backspace',
79
- 'Enter'
80
- ].includes(e.key)) {
81
- e.preventDefault();
82
- return;
83
- }
84
- if (e.key === 'ArrowUp') {
85
- e.preventDefault();
86
- let newDate = Object.assign({}, date);
87
- if (field === 'day') {
88
- if (date[field] === new Date(date.year, date.month, 0).getDate()) {
89
- newDate = Object.assign(Object.assign({}, newDate), { day: 1, month: (date.month % 12) + 1 });
90
- if (newDate.month === 1)
91
- newDate.year += 1;
92
- }
93
- else {
94
- newDate.day += 1;
95
- }
96
- }
97
- if (field === 'month') {
98
- if (date[field] === 12) {
99
- newDate = Object.assign(Object.assign({}, newDate), { month: 1, year: date.year + 1 });
100
- }
101
- else {
102
- newDate.month += 1;
103
- }
104
- }
105
- if (field === 'year') {
106
- newDate.year += 1;
107
- }
108
- setDate(newDate);
109
- onChange(new Date(newDate.year, newDate.month - 1, newDate.day));
110
- }
111
- else if (e.key === 'ArrowDown') {
112
- e.preventDefault();
113
- let newDate = Object.assign({}, date);
114
- if (field === 'day') {
115
- if (date[field] === 1) {
116
- newDate.month -= 1;
117
- if (newDate.month === 0) {
118
- newDate.month = 12;
119
- newDate.year -= 1;
120
- }
121
- newDate.day = new Date(newDate.year, newDate.month, 0).getDate();
122
- }
123
- else {
124
- newDate.day -= 1;
125
- }
126
- }
127
- if (field === 'month') {
128
- if (date[field] === 1) {
129
- newDate = Object.assign(Object.assign({}, newDate), { month: 12, year: date.year - 1 });
130
- }
131
- else {
132
- newDate.month -= 1;
133
- }
134
- }
135
- if (field === 'year') {
136
- newDate.year -= 1;
137
- }
138
- setDate(newDate);
139
- onChange(new Date(newDate.year, newDate.month - 1, newDate.day));
140
- }
141
- if (e.key === 'ArrowRight') {
142
- if (e.currentTarget.selectionStart === e.currentTarget.value.length ||
143
- (e.currentTarget.selectionStart === 0 &&
144
- e.currentTarget.selectionEnd === e.currentTarget.value.length)) {
145
- e.preventDefault();
146
- if (field === 'month')
147
- (_a = dayRef.current) === null || _a === void 0 ? void 0 : _a.focus();
148
- if (field === 'day')
149
- (_b = yearRef.current) === null || _b === void 0 ? void 0 : _b.focus();
150
- }
151
- }
152
- else if (e.key === 'ArrowLeft') {
153
- if (e.currentTarget.selectionStart === 0 ||
154
- (e.currentTarget.selectionStart === 0 &&
155
- e.currentTarget.selectionEnd === e.currentTarget.value.length)) {
156
- e.preventDefault();
157
- if (field === 'day')
158
- (_c = monthRef.current) === null || _c === void 0 ? void 0 : _c.focus();
159
- if (field === 'year')
160
- (_d = dayRef.current) === null || _d === void 0 ? void 0 : _d.focus();
161
- }
162
- }
163
- };
164
- return (_jsxs("div", { className: "flex border rounded-lg items-center text-sm px-1", children: [_jsx("input", { type: "text", ref: monthRef, max: 12, maxLength: 2, value: date.month.toString(), onChange: handleInputChange('month'), onKeyDown: handleKeyDown('month'), onFocus: (e) => {
165
- if (window.innerWidth > 1024) {
166
- e.target.select();
167
- }
168
- }, onBlur: handleBlur('month'), className: "p-0 outline-none w-6 border-none text-center", placeholder: "M" }), _jsx("span", { className: "opacity-20 -mx-px", children: "/" }), _jsx("input", { type: "text", ref: dayRef, max: 31, maxLength: 2, value: date.day.toString(), onChange: handleInputChange('day'), onKeyDown: handleKeyDown('day'), onFocus: (e) => {
169
- if (window.innerWidth > 1024) {
170
- e.target.select();
171
- }
172
- }, onBlur: handleBlur('day'), className: "p-0 outline-none w-7 border-none text-center", placeholder: "D" }), _jsx("span", { className: "opacity-20 -mx-px", children: "/" }), _jsx("input", { type: "text", ref: yearRef, max: 9999, maxLength: 4, value: date.year.toString(), onChange: handleInputChange('year'), onKeyDown: handleKeyDown('year'), onFocus: (e) => {
173
- if (window.innerWidth > 1024) {
174
- e.target.select();
175
- }
176
- }, onBlur: handleBlur('year'), className: "p-0 outline-none w-12 border-none text-center", placeholder: "YYYY" })] }));
177
- };
178
- DateInput.displayName = 'DateInput';
179
- export { DateInput };
@@ -1,24 +0,0 @@
1
- import { type FC } from 'react';
2
- export interface DateRangePickerProps {
3
- /** Click handler for applying the updates from DateRangePicker. */
4
- onUpdate?: (values: {
5
- range: DateRange;
6
- }) => void;
7
- /** Initial value for start date */
8
- initialDateFrom?: Date | string;
9
- /** Initial value for end date */
10
- initialDateTo?: Date | string;
11
- /** Alignment of popover */
12
- align?: 'start' | 'center' | 'end';
13
- /** Option for locale */
14
- locale?: string;
15
- }
16
- interface DateRange {
17
- from: Date | undefined;
18
- to: Date | undefined;
19
- }
20
- /** The DateRangePicker component allows a user to select a range of dates */
21
- export declare const DateRangePicker: FC<DateRangePickerProps> & {
22
- filePath: string;
23
- };
24
- export {};
@@ -1,45 +0,0 @@
1
- /* eslint-disable max-lines */
2
- 'use client';
3
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
- import { useState, useEffect } from 'react';
5
- import { Popover, PopoverContent, PopoverTrigger } from './popover';
6
- import { Calendar } from './calendar';
7
- import { ChevronRightIcon, ChevronLeftIcon } from '@radix-ui/react-icons'; // Use these icons for the arrows in the header
8
- import { Button } from './button';
9
- const getDateAdjustedForTimezone = (dateInput) => {
10
- if (typeof dateInput === 'string') {
11
- const parts = dateInput.split('-').map((part) => parseInt(part, 10));
12
- const date = new Date(parts[0], parts[1] - 1, parts[2]);
13
- return date;
14
- }
15
- else {
16
- return dateInput;
17
- }
18
- };
19
- /** The DateRangePicker component allows a user to select a range of dates */
20
- export const DateRangePicker = ({ initialDateFrom = new Date(new Date().setHours(0, 0, 0, 0)), initialDateTo, onUpdate, align = 'center', locale = 'en-US' }) => {
21
- const [isOpen, setIsOpen] = useState(false);
22
- const [range, setRange] = useState({
23
- from: initialDateFrom
24
- ? getDateAdjustedForTimezone(initialDateFrom)
25
- : undefined,
26
- to: initialDateTo
27
- ? getDateAdjustedForTimezone(initialDateTo)
28
- : initialDateFrom
29
- ? getDateAdjustedForTimezone(initialDateFrom)
30
- : undefined
31
- });
32
- useEffect(() => {
33
- // This effect will be triggered when a date is selected.
34
- // We update the state of the component using the new range.
35
- if (onUpdate) {
36
- onUpdate({ range });
37
- }
38
- }, [range, onUpdate]);
39
- return (_jsxs(Popover, { modal: true, open: isOpen, onOpenChange: setIsOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { size: 'lg', variant: "secondary", className: "w-auto px-3 py-2", children: [_jsx("div", { className: "flex-grow text-left font-normal", children: _jsx("span", { children: "Select a date range" }) }), _jsx("div", { className: "pl-1 opacity-60 -mr-2 scale-125", children: isOpen ? _jsx(ChevronLeftIcon, { width: 24 }) : _jsx(ChevronRightIcon, { width: 24 }) })] }) }), _jsx(PopoverContent, { align: align, className: "w-auto p-0", children: _jsx(Calendar, { mode: "range", onSelect: (value) => {
40
- setRange({ from: value === null || value === void 0 ? void 0 : value.from, to: value === null || value === void 0 ? void 0 : value.to });
41
- }, selected: range, numberOfMonths: 2, defaultMonth: new Date(new Date().setMonth(new Date().getMonth() - 1)) }) })] }));
42
- };
43
- DateRangePicker.displayName = 'DateRangePicker';
44
- DateRangePicker.filePath =
45
- 'libs/shared/ui-kit/src/lib/date-range-picker/date-range-picker.tsx';
@@ -1,15 +0,0 @@
1
- import * as React from "react";
2
- import * as DialogPrimitive from "@radix-ui/react-dialog";
3
- declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
- declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
- declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
- declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
- showCloseButton?: boolean;
10
- }): import("react/jsx-runtime").JSX.Element;
11
- declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
- declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
- declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
14
- declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
15
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -1,57 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import * as DialogPrimitive from "@radix-ui/react-dialog";
15
- import { XIcon } from "lucide-react";
16
- import { cn } from "../utils/cn";
17
- function Dialog(_a) {
18
- var props = __rest(_a, []);
19
- return _jsx(DialogPrimitive.Root, Object.assign({ "data-slot": "dialog" }, props));
20
- }
21
- function DialogTrigger(_a) {
22
- var props = __rest(_a, []);
23
- return _jsx(DialogPrimitive.Trigger, Object.assign({ "data-slot": "dialog-trigger" }, props));
24
- }
25
- function DialogPortal(_a) {
26
- var props = __rest(_a, []);
27
- return _jsx(DialogPrimitive.Portal, Object.assign({ "data-slot": "dialog-portal" }, props));
28
- }
29
- function DialogClose(_a) {
30
- var props = __rest(_a, []);
31
- return _jsx(DialogPrimitive.Close, Object.assign({ "data-slot": "dialog-close" }, props));
32
- }
33
- function DialogOverlay(_a) {
34
- var { className } = _a, props = __rest(_a, ["className"]);
35
- return (_jsx(DialogPrimitive.Overlay, Object.assign({ "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className) }, props)));
36
- }
37
- function DialogContent(_a) {
38
- var { className, children, showCloseButton = true } = _a, props = __rest(_a, ["className", "children", "showCloseButton"]);
39
- return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, Object.assign({ "data-slot": "dialog-content", className: cn("bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className) }, props, { children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }))] }));
40
- }
41
- function DialogHeader(_a) {
42
- var { className } = _a, props = __rest(_a, ["className"]);
43
- return (_jsx("div", Object.assign({ "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className) }, props)));
44
- }
45
- function DialogFooter(_a) {
46
- var { className } = _a, props = __rest(_a, ["className"]);
47
- return (_jsx("div", Object.assign({ "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
48
- }
49
- function DialogDescription(_a) {
50
- var { className } = _a, props = __rest(_a, ["className"]);
51
- return (_jsx(DialogPrimitive.Description, Object.assign({ "data-slot": "dialog-description", className: cn("text-lg leading-none font-semibold", className) }, props)));
52
- }
53
- function DialogTitle(_a) {
54
- var { className } = _a, props = __rest(_a, ["className"]);
55
- return (_jsx(DialogPrimitive.Title, Object.assign({ "data-slot": "dialog-title", className: cn("text-muted-foreground text-sm", className) }, props)));
56
- }
57
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import { Drawer as DrawerPrimitive } from "vaul";
3
- declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
- declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
- declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
- declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
9
- declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
- declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
- declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
12
- declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
13
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
@@ -1,56 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { Drawer as DrawerPrimitive } from "vaul";
15
- import { cn } from "../utils/cn";
16
- function Drawer(_a) {
17
- var props = __rest(_a, []);
18
- return _jsx(DrawerPrimitive.Root, Object.assign({ "data-slot": "drawer" }, props));
19
- }
20
- function DrawerTrigger(_a) {
21
- var props = __rest(_a, []);
22
- return _jsx(DrawerPrimitive.Trigger, Object.assign({ "data-slot": "drawer-trigger" }, props));
23
- }
24
- function DrawerPortal(_a) {
25
- var props = __rest(_a, []);
26
- return _jsx(DrawerPrimitive.Portal, Object.assign({ "data-slot": "drawer-portal" }, props));
27
- }
28
- function DrawerClose(_a) {
29
- var props = __rest(_a, []);
30
- return _jsx(DrawerPrimitive.Close, Object.assign({ "data-slot": "drawer-close" }, props));
31
- }
32
- function DrawerOverlay(_a) {
33
- var { className } = _a, props = __rest(_a, ["className"]);
34
- return (_jsx(DrawerPrimitive.Overlay, Object.assign({ "data-slot": "drawer-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className) }, props)));
35
- }
36
- function DrawerContent(_a) {
37
- var { className, children } = _a, props = __rest(_a, ["className", "children"]);
38
- return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, Object.assign({ "data-slot": "drawer-content", className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className) }, props, { children: [_jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] }))] }));
39
- }
40
- function DrawerHeader(_a) {
41
- var { className } = _a, props = __rest(_a, ["className"]);
42
- return (_jsx("div", Object.assign({ "data-slot": "drawer-header", className: cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", className) }, props)));
43
- }
44
- function DrawerFooter(_a) {
45
- var { className } = _a, props = __rest(_a, ["className"]);
46
- return (_jsx("div", Object.assign({ "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className) }, props)));
47
- }
48
- function DrawerTitle(_a) {
49
- var { className } = _a, props = __rest(_a, ["className"]);
50
- return (_jsx(DrawerPrimitive.Title, Object.assign({ "data-slot": "drawer-title", className: cn("text-foreground font-semibold", className) }, props)));
51
- }
52
- function DrawerDescription(_a) {
53
- var { className } = _a, props = __rest(_a, ["className"]);
54
- return (_jsx(DrawerPrimitive.Description, Object.assign({ "data-slot": "drawer-description", className: cn("text-muted-foreground text-sm", className) }, props)));
55
- }
56
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
@@ -1,25 +0,0 @@
1
- import * as React from "react";
2
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
- declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
5
- declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
- declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
- declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
8
- declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
- inset?: boolean;
10
- variant?: "default" | "destructive";
11
- }): import("react/jsx-runtime").JSX.Element;
12
- declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
13
- declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
14
- declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
15
- declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
- inset?: boolean;
17
- }): import("react/jsx-runtime").JSX.Element;
18
- declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
19
- declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
20
- declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
21
- declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
- inset?: boolean;
23
- }): import("react/jsx-runtime").JSX.Element;
24
- declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
25
- export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -1,77 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
15
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
16
- import { cn } from "../utils/cn";
17
- function DropdownMenu(_a) {
18
- var props = __rest(_a, []);
19
- return _jsx(DropdownMenuPrimitive.Root, Object.assign({ "data-slot": "dropdown-menu" }, props));
20
- }
21
- function DropdownMenuPortal(_a) {
22
- var props = __rest(_a, []);
23
- return (_jsx(DropdownMenuPrimitive.Portal, Object.assign({ "data-slot": "dropdown-menu-portal" }, props)));
24
- }
25
- function DropdownMenuTrigger(_a) {
26
- var props = __rest(_a, []);
27
- return (_jsx(DropdownMenuPrimitive.Trigger, Object.assign({ "data-slot": "dropdown-menu-trigger" }, props)));
28
- }
29
- function DropdownMenuContent(_a) {
30
- var { className, sideOffset = 4 } = _a, props = __rest(_a, ["className", "sideOffset"]);
31
- return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, Object.assign({ "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", "bg-[var(--background)]", className) }, props)) }));
32
- }
33
- function DropdownMenuGroup(_a) {
34
- var props = __rest(_a, []);
35
- return (_jsx(DropdownMenuPrimitive.Group, Object.assign({ "data-slot": "dropdown-menu-group" }, props)));
36
- }
37
- function DropdownMenuItem(_a) {
38
- var { className, inset, variant = "default" } = _a, props = __rest(_a, ["className", "inset", "variant"]);
39
- return (_jsx(DropdownMenuPrimitive.Item, Object.assign({ "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-[var(--input)] dark:focus:bg-[var(--card)] blue-dark:focus:bg-[var(--secondary)] focus:text-accent-foreground dark:text-foreground focus:dark:text-foreground blue-dark:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
40
- }
41
- function DropdownMenuCheckboxItem(_a) {
42
- var { className, children, checked } = _a, props = __rest(_a, ["className", "children", "checked"]);
43
- return (_jsxs(DropdownMenuPrimitive.CheckboxItem, Object.assign({ "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-[var(--input)] focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked }, props, { children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] })));
44
- }
45
- function DropdownMenuRadioGroup(_a) {
46
- var props = __rest(_a, []);
47
- return (_jsx(DropdownMenuPrimitive.RadioGroup, Object.assign({ "data-slot": "dropdown-menu-radio-group" }, props)));
48
- }
49
- function DropdownMenuRadioItem(_a) {
50
- var { className, children } = _a, props = __rest(_a, ["className", "children"]);
51
- return (_jsxs(DropdownMenuPrimitive.RadioItem, Object.assign({ "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] })));
52
- }
53
- function DropdownMenuLabel(_a) {
54
- var { className, inset } = _a, props = __rest(_a, ["className", "inset"]);
55
- return (_jsx(DropdownMenuPrimitive.Label, Object.assign({ "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className) }, props)));
56
- }
57
- function DropdownMenuSeparator(_a) {
58
- var { className } = _a, props = __rest(_a, ["className"]);
59
- return (_jsx(DropdownMenuPrimitive.Separator, Object.assign({ "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className) }, props)));
60
- }
61
- function DropdownMenuShortcut(_a) {
62
- var { className } = _a, props = __rest(_a, ["className"]);
63
- return (_jsx("span", Object.assign({ "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className) }, props)));
64
- }
65
- function DropdownMenuSub(_a) {
66
- var props = __rest(_a, []);
67
- return _jsx(DropdownMenuPrimitive.Sub, Object.assign({ "data-slot": "dropdown-menu-sub" }, props));
68
- }
69
- function DropdownMenuSubTrigger(_a) {
70
- var { className, inset, children } = _a, props = __rest(_a, ["className", "inset", "children"]);
71
- return (_jsxs(DropdownMenuPrimitive.SubTrigger, Object.assign({ "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className) }, props, { children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] })));
72
- }
73
- function DropdownMenuSubContent(_a) {
74
- var { className } = _a, props = __rest(_a, ["className"]);
75
- return (_jsx(DropdownMenuPrimitive.SubContent, Object.assign({ "data-slot": "dropdown-menu-sub-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className) }, props)));
76
- }
77
- export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -1,24 +0,0 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
5
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
6
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
7
- declare const useFormField: () => {
8
- invalid: boolean;
9
- isDirty: boolean;
10
- isTouched: boolean;
11
- isValidating: boolean;
12
- error?: import("react-hook-form").FieldError;
13
- id: string;
14
- name: string;
15
- formItemId: string;
16
- formDescriptionId: string;
17
- formMessageId: string;
18
- };
19
- declare function FormItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
20
- declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
21
- declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
22
- declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
23
- declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
24
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
@@ -1,70 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import * as React from "react";
15
- import { Slot } from "@radix-ui/react-slot";
16
- import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
17
- import { cn } from "../utils/cn";
18
- import { Label } from "./label";
19
- const Form = FormProvider;
20
- const FormFieldContext = React.createContext({});
21
- const FormField = (_a) => {
22
- var props = __rest(_a, []);
23
- return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, Object.assign({}, props)) }));
24
- };
25
- const useFormField = () => {
26
- const fieldContext = React.useContext(FormFieldContext);
27
- const itemContext = React.useContext(FormItemContext);
28
- const { getFieldState } = useFormContext();
29
- const formState = useFormState({ name: fieldContext.name });
30
- const fieldState = getFieldState(fieldContext.name, formState);
31
- if (!fieldContext) {
32
- throw new Error("useFormField should be used within <FormField>");
33
- }
34
- const { id } = itemContext;
35
- return Object.assign({ id, name: fieldContext.name, formItemId: `${id}-form-item`, formDescriptionId: `${id}-form-item-description`, formMessageId: `${id}-form-item-message` }, fieldState);
36
- };
37
- const FormItemContext = React.createContext({});
38
- function FormItem(_a) {
39
- var { className } = _a, props = __rest(_a, ["className"]);
40
- const id = React.useId();
41
- return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", Object.assign({ "data-slot": "form-item", className: cn("grid gap-2", className) }, props)) }));
42
- }
43
- function FormLabel(_a) {
44
- var { className } = _a, props = __rest(_a, ["className"]);
45
- const { error, formItemId } = useFormField();
46
- return (_jsx(Label, Object.assign({ "data-slot": "form-label", "data-error": !!error, className: cn("data-[error=true]:text-destructive", className), htmlFor: formItemId }, props)));
47
- }
48
- function FormControl(_a) {
49
- var props = __rest(_a, []);
50
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
51
- return (_jsx(Slot, Object.assign({ "data-slot": "form-control", id: formItemId, "aria-describedby": !error
52
- ? `${formDescriptionId}`
53
- : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error }, props)));
54
- }
55
- function FormDescription(_a) {
56
- var { className } = _a, props = __rest(_a, ["className"]);
57
- const { formDescriptionId } = useFormField();
58
- return (_jsx("p", Object.assign({ "data-slot": "form-description", id: formDescriptionId, className: cn("text-muted-foreground text-sm", className) }, props)));
59
- }
60
- function FormMessage(_a) {
61
- var _b;
62
- var { className } = _a, props = __rest(_a, ["className"]);
63
- const { error, formMessageId } = useFormField();
64
- const body = error ? String((_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : "") : props.children;
65
- if (!body) {
66
- return null;
67
- }
68
- return (_jsx("p", Object.assign({ "data-slot": "form-message", id: formMessageId, className: cn("text-destructive text-sm", className) }, props, { children: body })));
69
- }
70
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
@@ -1,6 +0,0 @@
1
- import * as React from "react";
2
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
3
- declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
6
- export { HoverCard, HoverCardTrigger, HoverCardContent };