ikoncomponents 1.5.5 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/README.md +36 -36
  2. package/dist/hooks/use-mobile.d.ts +1 -0
  3. package/dist/hooks/use-mobile.js +15 -0
  4. package/dist/ikoncomponents/action-menu/index.d.ts +5 -0
  5. package/dist/ikoncomponents/action-menu/index.js +42 -0
  6. package/dist/ikoncomponents/action-menu/type.d.ts +14 -0
  7. package/dist/ikoncomponents/action-menu/type.js +1 -0
  8. package/dist/ikoncomponents/activity-sheet/index.d.ts +11 -0
  9. package/dist/ikoncomponents/activity-sheet/index.js +23 -0
  10. package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +21 -0
  11. package/dist/ikoncomponents/alert-dialog/dialog-context.js +30 -0
  12. package/dist/ikoncomponents/alert-dialog/index.d.ts +14 -0
  13. package/dist/ikoncomponents/alert-dialog/index.js +20 -0
  14. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +18 -0
  15. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +43 -0
  16. package/dist/ikoncomponents/app-breadcrumb/index.d.ts +5 -0
  17. package/dist/ikoncomponents/app-breadcrumb/index.js +57 -0
  18. package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +5 -0
  19. package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +16 -0
  20. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +2 -0
  21. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +39 -0
  22. package/dist/ikoncomponents/big-calendar/index.d.ts +3 -0
  23. package/dist/ikoncomponents/big-calendar/index.js +35 -0
  24. package/dist/ikoncomponents/big-calendar/type.d.ts +31 -0
  25. package/dist/ikoncomponents/big-calendar/type.js +1 -0
  26. package/dist/ikoncomponents/buttons/index.d.ts +18 -0
  27. package/dist/ikoncomponents/buttons/index.js +38 -0
  28. package/dist/ikoncomponents/combobox-input/index.d.ts +2 -0
  29. package/dist/ikoncomponents/combobox-input/index.js +18 -0
  30. package/dist/ikoncomponents/combobox-input/type.d.ts +13 -0
  31. package/dist/ikoncomponents/combobox-input/type.js +1 -0
  32. package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +21 -0
  33. package/dist/ikoncomponents/custom-combo-dropdown/index.js +85 -0
  34. package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +2 -0
  35. package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +22 -0
  36. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +2 -0
  37. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +35 -0
  38. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +2 -0
  39. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +38 -0
  40. package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +2 -0
  41. package/dist/ikoncomponents/data-table/datatable-pagination/index.js +13 -0
  42. package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +2 -0
  43. package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +18 -0
  44. package/dist/ikoncomponents/data-table/function.d.ts +1 -0
  45. package/dist/ikoncomponents/data-table/function.js +6 -0
  46. package/dist/ikoncomponents/data-table/index.d.ts +2 -0
  47. package/dist/ikoncomponents/data-table/index.js +223 -0
  48. package/dist/ikoncomponents/data-table/type.d.ts +60 -0
  49. package/dist/ikoncomponents/data-table/type.js +1 -0
  50. package/dist/ikoncomponents/e-chart/index.d.ts +15 -0
  51. package/dist/ikoncomponents/e-chart/index.js +115 -0
  52. package/dist/ikoncomponents/file-input/index.d.ts +1 -0
  53. package/dist/ikoncomponents/file-input/index.js +21 -0
  54. package/dist/ikoncomponents/fileUpload/index.d.ts +15 -0
  55. package/dist/ikoncomponents/fileUpload/index.js +69 -0
  56. package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +2 -0
  57. package/dist/ikoncomponents/form-fields/combobox-input/index.js +21 -0
  58. package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +18 -0
  59. package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +26 -0
  60. package/dist/ikoncomponents/form-fields/date-input/index.d.ts +2 -0
  61. package/dist/ikoncomponents/form-fields/date-input/index.js +15 -0
  62. package/dist/ikoncomponents/form-fields/file-input/index.d.ts +1 -0
  63. package/dist/ikoncomponents/form-fields/file-input/index.js +4 -0
  64. package/dist/ikoncomponents/form-fields/input/index.d.ts +2 -0
  65. package/dist/ikoncomponents/form-fields/input/index.js +18 -0
  66. package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +6 -0
  67. package/{templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx → dist/ikoncomponents/form-fields/multi-combobox-input/index.js} +381 -574
  68. package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +2 -0
  69. package/dist/ikoncomponents/form-fields/otp-input/index.js +18 -0
  70. package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +1 -0
  71. package/dist/ikoncomponents/form-fields/phone-input/index.js +4 -0
  72. package/dist/ikoncomponents/form-fields/textarea/index.d.ts +2 -0
  73. package/dist/ikoncomponents/form-fields/textarea/index.js +18 -0
  74. package/dist/ikoncomponents/form-fields/types/index.d.ts +36 -0
  75. package/dist/ikoncomponents/form-fields/types/index.js +1 -0
  76. package/dist/ikoncomponents/glowing-effect/index.d.ts +14 -0
  77. package/dist/ikoncomponents/glowing-effect/index.js +84 -0
  78. package/dist/ikoncomponents/icon/index.d.ts +8 -0
  79. package/dist/ikoncomponents/icon/index.js +23 -0
  80. package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +15 -0
  81. package/{templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx → dist/ikoncomponents/image-cropper-upload/components/newCropper.js} +85 -117
  82. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +7 -0
  83. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +145 -0
  84. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +6 -0
  85. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +92 -0
  86. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +6 -0
  87. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +14 -0
  88. package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +14 -0
  89. package/{templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx → dist/ikoncomponents/image-cropper-upload/image-cropper/index.js} +87 -119
  90. package/dist/ikoncomponents/image-cropper-upload/index.d.ts +27 -0
  91. package/dist/ikoncomponents/image-cropper-upload/index.js +49 -0
  92. package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +16 -0
  93. package/dist/ikoncomponents/image-cropper-upload/utils/index.js +73 -0
  94. package/dist/ikoncomponents/loading-spinner/index.d.ts +9 -0
  95. package/dist/ikoncomponents/loading-spinner/index.js +19 -0
  96. package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +10 -0
  97. package/dist/ikoncomponents/main-layout/RefreshContext.js +17 -0
  98. package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +33 -0
  99. package/dist/ikoncomponents/main-layout/SidebarNavContext.js +52 -0
  100. package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +3 -0
  101. package/dist/ikoncomponents/main-layout/app-sidebar.js +24 -0
  102. package/dist/ikoncomponents/main-layout/footer.d.ts +1 -0
  103. package/dist/ikoncomponents/main-layout/footer.js +5 -0
  104. package/dist/ikoncomponents/main-layout/header.d.ts +3 -0
  105. package/dist/ikoncomponents/main-layout/header.js +15 -0
  106. package/dist/ikoncomponents/main-layout/index.d.ts +6 -0
  107. package/dist/ikoncomponents/main-layout/index.js +11 -0
  108. package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +60 -0
  109. package/dist/ikoncomponents/main-layout/main-sidebar.js +119 -0
  110. package/dist/ikoncomponents/main-layout/nav-main.d.ts +11 -0
  111. package/dist/ikoncomponents/main-layout/nav-main.js +33 -0
  112. package/dist/ikoncomponents/multi-combobox/index.d.ts +13 -0
  113. package/dist/ikoncomponents/multi-combobox/index.js +202 -0
  114. package/dist/ikoncomponents/no-data/index.d.ts +3 -0
  115. package/dist/ikoncomponents/no-data/index.js +5 -0
  116. package/dist/ikoncomponents/page-wrapper/index.d.ts +9 -0
  117. package/dist/ikoncomponents/page-wrapper/index.js +7 -0
  118. package/dist/ikoncomponents/password-strength-meter/index.d.ts +3 -0
  119. package/dist/ikoncomponents/password-strength-meter/index.js +40 -0
  120. package/dist/ikoncomponents/phone-input/index.d.ts +1 -0
  121. package/dist/ikoncomponents/phone-input/index.js +41 -0
  122. package/dist/ikoncomponents/provider-wrapper/index.d.ts +6 -0
  123. package/dist/ikoncomponents/provider-wrapper/index.js +11 -0
  124. package/dist/ikoncomponents/search-input/index.d.ts +1 -0
  125. package/dist/ikoncomponents/search-input/index.js +19 -0
  126. package/dist/ikoncomponents/sheet/index.d.ts +10 -0
  127. package/dist/ikoncomponents/sheet/index.js +6 -0
  128. package/dist/ikoncomponents/simple-widget/index.d.ts +14 -0
  129. package/dist/ikoncomponents/simple-widget/index.js +14 -0
  130. package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +5 -0
  131. package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +6 -0
  132. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +3 -0
  133. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +5 -0
  134. package/dist/ikoncomponents/tabs/index.d.ts +2 -0
  135. package/dist/ikoncomponents/tabs/index.js +50 -0
  136. package/{templates/default/ikoncomponents/tabs/type.ts → dist/ikoncomponents/tabs/type.d.ts} +19 -20
  137. package/dist/ikoncomponents/tabs/type.js +2 -0
  138. package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +1 -0
  139. package/{templates/default/ikoncomponents/theme-toggle-btn/index.tsx → dist/ikoncomponents/theme-toggle-btn/index.js} +118 -189
  140. package/dist/ikoncomponents/title-progress/index.d.ts +12 -0
  141. package/dist/ikoncomponents/title-progress/index.js +10 -0
  142. package/dist/ikoncomponents/tooltip/index.d.ts +5 -0
  143. package/dist/ikoncomponents/tooltip/index.js +5 -0
  144. package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +31 -0
  145. package/dist/ikoncomponents/twolevel-dropdown/index.js +143 -0
  146. package/dist/ikoncomponents/upload-tab/index.d.ts +1 -0
  147. package/dist/ikoncomponents/upload-tab/index.js +92 -0
  148. package/dist/ikoncomponents/widgets/index.d.ts +2 -0
  149. package/dist/ikoncomponents/widgets/index.js +14 -0
  150. package/dist/ikoncomponents/widgets/type.d.ts +10 -0
  151. package/dist/ikoncomponents/widgets/type.js +2 -0
  152. package/dist/ikoncomponents/work-in-progress/index.d.ts +1 -0
  153. package/dist/ikoncomponents/work-in-progress/index.js +4 -0
  154. package/dist/index.d.ts +138 -0
  155. package/dist/index.js +116 -14
  156. package/dist/shadcn/accordion.d.ts +7 -0
  157. package/dist/shadcn/accordion.js +33 -0
  158. package/dist/shadcn/alert-dialog.d.ts +20 -0
  159. package/dist/shadcn/alert-dialog.js +83 -0
  160. package/dist/shadcn/alert.d.ts +9 -0
  161. package/dist/shadcn/alert.js +38 -0
  162. package/dist/shadcn/aspect-ratio.d.ts +3 -0
  163. package/dist/shadcn/aspect-ratio.js +19 -0
  164. package/dist/shadcn/avatar.d.ts +6 -0
  165. package/dist/shadcn/avatar.js +28 -0
  166. package/dist/shadcn/badge.d.ts +9 -0
  167. package/dist/shadcn/badge.js +35 -0
  168. package/dist/shadcn/breadcrumb.d.ts +11 -0
  169. package/dist/shadcn/breadcrumb.js +45 -0
  170. package/dist/shadcn/button.d.ts +10 -0
  171. package/dist/shadcn/button.js +47 -0
  172. package/dist/shadcn/calendar.d.ts +8 -0
  173. package/dist/shadcn/calendar.js +61 -0
  174. package/dist/shadcn/card.d.ts +9 -0
  175. package/dist/shadcn/card.js +42 -0
  176. package/dist/shadcn/checkbox.d.ts +4 -0
  177. package/dist/shadcn/checkbox.js +21 -0
  178. package/dist/shadcn/collapsible.d.ts +5 -0
  179. package/dist/shadcn/collapsible.js +27 -0
  180. package/dist/shadcn/command.d.ts +18 -0
  181. package/dist/shadcn/command.js +54 -0
  182. package/dist/shadcn/date-input.d.ts +7 -0
  183. package/dist/shadcn/date-input.js +179 -0
  184. package/dist/shadcn/date-range-picker.d.ts +24 -0
  185. package/dist/shadcn/date-range-picker.js +45 -0
  186. package/dist/shadcn/dialog.d.ts +15 -0
  187. package/dist/shadcn/dialog.js +57 -0
  188. package/dist/shadcn/drawer.d.ts +13 -0
  189. package/dist/shadcn/drawer.js +56 -0
  190. package/dist/shadcn/dropdown-menu.d.ts +25 -0
  191. package/dist/shadcn/dropdown-menu.js +77 -0
  192. package/dist/shadcn/form.d.ts +24 -0
  193. package/dist/shadcn/form.js +70 -0
  194. package/dist/shadcn/hover-card.d.ts +6 -0
  195. package/dist/shadcn/hover-card.js +28 -0
  196. package/dist/shadcn/input-otp.d.ts +34 -0
  197. package/dist/shadcn/input-otp.js +40 -0
  198. package/dist/shadcn/input.d.ts +3 -0
  199. package/dist/shadcn/input.js +18 -0
  200. package/dist/shadcn/label.d.ts +4 -0
  201. package/dist/shadcn/label.js +20 -0
  202. package/dist/shadcn/navigation-menu.d.ts +16 -0
  203. package/dist/shadcn/navigation-menu.js +74 -0
  204. package/dist/shadcn/popover.d.ts +7 -0
  205. package/dist/shadcn/popover.js +32 -0
  206. package/dist/shadcn/progress.d.ts +8 -0
  207. package/dist/shadcn/progress.js +23 -0
  208. package/dist/shadcn/radio-group.d.ts +5 -0
  209. package/dist/shadcn/radio-group.js +25 -0
  210. package/dist/shadcn/scroll-area.d.ts +5 -0
  211. package/dist/shadcn/scroll-area.js +26 -0
  212. package/dist/shadcn/select.d.ts +15 -0
  213. package/dist/shadcn/select.js +59 -0
  214. package/dist/shadcn/separator.d.ts +4 -0
  215. package/dist/shadcn/separator.js +20 -0
  216. package/dist/shadcn/sheet.d.ts +13 -0
  217. package/dist/shadcn/sheet.js +61 -0
  218. package/dist/shadcn/sidebar.d.ts +69 -0
  219. package/dist/shadcn/sidebar.js +242 -0
  220. package/dist/shadcn/skeleton.d.ts +3 -0
  221. package/dist/shadcn/skeleton.js +18 -0
  222. package/dist/shadcn/slider.d.ts +4 -0
  223. package/dist/shadcn/slider.js +26 -0
  224. package/dist/shadcn/sonner.d.ts +3 -0
  225. package/dist/shadcn/sonner.js +25 -0
  226. package/dist/shadcn/switch.d.ts +4 -0
  227. package/dist/shadcn/switch.js +20 -0
  228. package/dist/shadcn/table.d.ts +10 -0
  229. package/dist/shadcn/table.js +47 -0
  230. package/dist/shadcn/tabs.d.ts +7 -0
  231. package/dist/shadcn/tabs.js +32 -0
  232. package/dist/shadcn/textarea.d.ts +3 -0
  233. package/dist/shadcn/textarea.js +18 -0
  234. package/dist/shadcn/toggle-group.d.ts +9 -0
  235. package/dist/shadcn/toggle-group.js +35 -0
  236. package/dist/shadcn/toggle.d.ts +9 -0
  237. package/dist/shadcn/toggle.js +38 -0
  238. package/dist/shadcn/tooltip.d.ts +7 -0
  239. package/dist/shadcn/tooltip.js +32 -0
  240. package/dist/shadcn/workflow.d.ts +20 -0
  241. package/dist/shadcn/workflow.js +20 -0
  242. package/dist/styles.css +6163 -0
  243. package/dist/utils/actions/account/index.d.ts +5 -0
  244. package/dist/utils/actions/account/index.js +28 -0
  245. package/dist/utils/actions/account/type.d.ts +4 -0
  246. package/dist/utils/actions/account/type.js +1 -0
  247. package/dist/utils/actions/auth/index.d.ts +7 -0
  248. package/{templates/default/utils/actions/auth/index.ts → dist/utils/actions/auth/index.js} +58 -69
  249. package/dist/utils/actions/common/utils.d.ts +5 -0
  250. package/{templates/default/utils/actions/common/utils.ts → dist/utils/actions/common/utils.js} +25 -28
  251. package/dist/utils/actions/software/index.d.ts +11 -0
  252. package/dist/utils/actions/software/index.js +75 -0
  253. package/dist/utils/api/accountService/index.d.ts +23 -0
  254. package/dist/utils/api/accountService/index.js +64 -0
  255. package/dist/utils/api/accountService/type.d.ts +4 -0
  256. package/dist/utils/api/accountService/type.js +1 -0
  257. package/dist/utils/api/file-upload/index.d.ts +5 -0
  258. package/dist/utils/api/file-upload/index.js +80 -0
  259. package/dist/utils/api/file-upload/type.d.ts +6 -0
  260. package/dist/utils/api/file-upload/type.js +1 -0
  261. package/dist/utils/api/ikonBaseApi.d.ts +12 -0
  262. package/{templates/default/utils/api/ikonBaseApi.ts → dist/utils/api/ikonBaseApi.js} +104 -132
  263. package/dist/utils/api/loginService/index.d.ts +12 -0
  264. package/dist/utils/api/loginService/index.js +72 -0
  265. package/{templates/default/utils/api/loginService/type.ts → dist/utils/api/loginService/type.d.ts} +31 -35
  266. package/dist/utils/api/loginService/type.js +1 -0
  267. package/dist/utils/api/softwareService/index.d.ts +64 -0
  268. package/dist/utils/api/softwareService/index.js +212 -0
  269. package/dist/utils/api/softwareService/type.d.ts +54 -0
  270. package/dist/utils/api/softwareService/type.js +1 -0
  271. package/dist/utils/border-radius-provider.d.ts +11 -0
  272. package/{templates/default/utils/border-radius-provider.tsx → dist/utils/border-radius-provider.js} +35 -59
  273. package/dist/utils/cn.d.ts +2 -0
  274. package/dist/utils/cn.js +5 -0
  275. package/dist/utils/font-provider.d.ts +11 -0
  276. package/{templates/default/utils/font-provider.tsx → dist/utils/font-provider.js} +37 -61
  277. package/dist/utils/session/cookieSession.d.ts +8 -0
  278. package/dist/utils/session/cookieSession.js +33 -0
  279. package/dist/utils/theme-provider/index.d.ts +3 -0
  280. package/dist/utils/theme-provider/index.js +18 -0
  281. package/dist/utils/token-management/index.d.ts +10 -0
  282. package/dist/utils/token-management/index.js +69 -0
  283. package/dist/utils/token-management/types.d.ts +6 -0
  284. package/dist/utils/token-management/types.js +1 -0
  285. package/package.json +91 -17
  286. package/bin.js +0 -2
  287. package/dist/commands/init.js +0 -63
  288. package/dist/utlis/copyDir.js +0 -7
  289. package/templates/default/hooks/use-mobile.ts +0 -19
  290. package/templates/default/ikoncomponents/action-menu/index.tsx +0 -108
  291. package/templates/default/ikoncomponents/action-menu/type.ts +0 -18
  292. package/templates/default/ikoncomponents/activity-sheet/index.tsx +0 -63
  293. package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +0 -65
  294. package/templates/default/ikoncomponents/alert-dialog/index.tsx +0 -80
  295. package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +0 -68
  296. package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +0 -222
  297. package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +0 -38
  298. package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +0 -81
  299. package/templates/default/ikoncomponents/big-calendar/index.css +0 -879
  300. package/templates/default/ikoncomponents/big-calendar/index.tsx +0 -59
  301. package/templates/default/ikoncomponents/big-calendar/type.ts +0 -37
  302. package/templates/default/ikoncomponents/buttons/index.tsx +0 -127
  303. package/templates/default/ikoncomponents/combobox-input/index.tsx +0 -75
  304. package/templates/default/ikoncomponents/combobox-input/type.ts +0 -14
  305. package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +0 -242
  306. package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +0 -80
  307. package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +0 -149
  308. package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +0 -98
  309. package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +0 -119
  310. package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +0 -45
  311. package/templates/default/ikoncomponents/data-table/function.ts +0 -7
  312. package/templates/default/ikoncomponents/data-table/index.tsx +0 -549
  313. package/templates/default/ikoncomponents/data-table/type.ts +0 -75
  314. package/templates/default/ikoncomponents/e-chart/index.tsx +0 -183
  315. package/templates/default/ikoncomponents/file-input/index.tsx +0 -27
  316. package/templates/default/ikoncomponents/fileUpload/index.tsx +0 -121
  317. package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +0 -111
  318. package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +0 -121
  319. package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +0 -80
  320. package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +0 -9
  321. package/templates/default/ikoncomponents/form-fields/input/index.tsx +0 -27
  322. package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +0 -39
  323. package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +0 -52
  324. package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +0 -7
  325. package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +0 -28
  326. package/templates/default/ikoncomponents/form-fields/types/index.ts +0 -46
  327. package/templates/default/ikoncomponents/glowing-effect/index.tsx +0 -171
  328. package/templates/default/ikoncomponents/icon/index.tsx +0 -22
  329. package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +0 -19
  330. package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +0 -352
  331. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +0 -250
  332. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +0 -32
  333. package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +0 -95
  334. package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +0 -117
  335. package/templates/default/ikoncomponents/loading-spinner/index.tsx +0 -43
  336. package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +0 -30
  337. package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +0 -103
  338. package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +0 -36
  339. package/templates/default/ikoncomponents/main-layout/footer.tsx +0 -21
  340. package/templates/default/ikoncomponents/main-layout/header.tsx +0 -53
  341. package/templates/default/ikoncomponents/main-layout/index.tsx +0 -38
  342. package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +0 -389
  343. package/templates/default/ikoncomponents/main-layout/nav-main.tsx +0 -103
  344. package/templates/default/ikoncomponents/multi-combobox/index.tsx +0 -345
  345. package/templates/default/ikoncomponents/no-data/index.tsx +0 -11
  346. package/templates/default/ikoncomponents/page-wrapper/index.tsx +0 -30
  347. package/templates/default/ikoncomponents/password-strength-meter/index.tsx +0 -49
  348. package/templates/default/ikoncomponents/phone-input/index.tsx +0 -72
  349. package/templates/default/ikoncomponents/provider-wrapper/index.tsx +0 -32
  350. package/templates/default/ikoncomponents/search-input/index.tsx +0 -18
  351. package/templates/default/ikoncomponents/sheet/index.tsx +0 -34
  352. package/templates/default/ikoncomponents/simple-widget/index.tsx +0 -54
  353. package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +0 -34
  354. package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +0 -13
  355. package/templates/default/ikoncomponents/tabs/index.tsx +0 -139
  356. package/templates/default/ikoncomponents/title-progress/index.tsx +0 -41
  357. package/templates/default/ikoncomponents/tooltip/index.tsx +0 -17
  358. package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +0 -33
  359. package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +0 -279
  360. package/templates/default/ikoncomponents/upload-tab/index.tsx +0 -237
  361. package/templates/default/ikoncomponents/widgets/index.tsx +0 -81
  362. package/templates/default/ikoncomponents/widgets/type.ts +0 -11
  363. package/templates/default/ikoncomponents/work-in-progress/index.tsx +0 -16
  364. package/templates/default/shadcn/accordion.tsx +0 -66
  365. package/templates/default/shadcn/alert-dialog.tsx +0 -179
  366. package/templates/default/shadcn/alert.tsx +0 -66
  367. package/templates/default/shadcn/aspect-ratio.tsx +0 -11
  368. package/templates/default/shadcn/avatar.tsx +0 -53
  369. package/templates/default/shadcn/badge.tsx +0 -49
  370. package/templates/default/shadcn/breadcrumb.tsx +0 -109
  371. package/templates/default/shadcn/button.tsx +0 -64
  372. package/templates/default/shadcn/calendar.tsx +0 -227
  373. package/templates/default/shadcn/card.tsx +0 -92
  374. package/templates/default/shadcn/checkbox.tsx +0 -33
  375. package/templates/default/shadcn/collapsible.tsx +0 -33
  376. package/templates/default/shadcn/command.tsx +0 -184
  377. package/templates/default/shadcn/date-input.tsx +0 -259
  378. package/templates/default/shadcn/date-range-picker.tsx +0 -103
  379. package/templates/default/shadcn/dialog.tsx +0 -143
  380. package/templates/default/shadcn/drawer.tsx +0 -134
  381. package/templates/default/shadcn/dropdown-menu.tsx +0 -259
  382. package/templates/default/shadcn/form.tsx +0 -166
  383. package/templates/default/shadcn/hover-card.tsx +0 -44
  384. package/templates/default/shadcn/input-otp.tsx +0 -71
  385. package/templates/default/shadcn/input.tsx +0 -22
  386. package/templates/default/shadcn/label.tsx +0 -24
  387. package/templates/default/shadcn/navigation-menu.tsx +0 -195
  388. package/templates/default/shadcn/popover.tsx +0 -48
  389. package/templates/default/shadcn/progress.tsx +0 -40
  390. package/templates/default/shadcn/radio-group.tsx +0 -45
  391. package/templates/default/shadcn/scroll-area.tsx +0 -58
  392. package/templates/default/shadcn/select.tsx +0 -184
  393. package/templates/default/shadcn/separator.tsx +0 -28
  394. package/templates/default/shadcn/sheet.tsx +0 -139
  395. package/templates/default/shadcn/sidebar.tsx +0 -726
  396. package/templates/default/shadcn/skeleton.tsx +0 -15
  397. package/templates/default/shadcn/slider.tsx +0 -64
  398. package/templates/default/shadcn/sonner.tsx +0 -25
  399. package/templates/default/shadcn/switch.tsx +0 -31
  400. package/templates/default/shadcn/table.tsx +0 -116
  401. package/templates/default/shadcn/tabs.tsx +0 -67
  402. package/templates/default/shadcn/textarea.tsx +0 -18
  403. package/templates/default/shadcn/toggle-group.tsx +0 -83
  404. package/templates/default/shadcn/toggle.tsx +0 -47
  405. package/templates/default/shadcn/tooltip.tsx +0 -65
  406. package/templates/default/shadcn/workflow.tsx +0 -119
  407. package/templates/default/utils/actions/account/index.ts +0 -33
  408. package/templates/default/utils/actions/account/type.ts +0 -4
  409. package/templates/default/utils/actions/common/revalidate.ts +0 -18
  410. package/templates/default/utils/actions/common/type.ts +0 -4
  411. package/templates/default/utils/actions/software/index.ts +0 -106
  412. package/templates/default/utils/api/accountService/index.ts +0 -103
  413. package/templates/default/utils/api/accountService/type.ts +0 -4
  414. package/templates/default/utils/api/file-upload/index.ts +0 -103
  415. package/templates/default/utils/api/file-upload/type.ts +0 -8
  416. package/templates/default/utils/api/loginService/index.ts +0 -106
  417. package/templates/default/utils/api/softwareService/index.ts +0 -356
  418. package/templates/default/utils/api/softwareService/type.ts +0 -62
  419. package/templates/default/utils/cn.ts +0 -6
  420. package/templates/default/utils/session/cookieSession.ts +0 -49
  421. package/templates/default/utils/theme-provider/index.tsx +0 -11
  422. package/templates/default/utils/token-management/index.ts +0 -115
  423. package/templates/default/utils/token-management/types.ts +0 -6
@@ -0,0 +1,35 @@
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 { Slot } from "@radix-ui/react-slot";
14
+ import { cva } from "class-variance-authority";
15
+ import { cn } from "../utils/cn";
16
+ const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
17
+ variants: {
18
+ variant: {
19
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
20
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
21
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive",
22
+ outline: "text-foreground bg-[var(--background)] [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
23
+ verified: "border-transparent bg-[#15803D] text-white [a&]:hover:bg-[#1F9145] focus-visible:ring-[#15803D]/20 dark:focus-visible:ring-[#15803D]/40",
24
+ },
25
+ },
26
+ defaultVariants: {
27
+ variant: "default",
28
+ },
29
+ });
30
+ function Badge(_a) {
31
+ var { className, variant, asChild = false } = _a, props = __rest(_a, ["className", "variant", "asChild"]);
32
+ const Comp = asChild ? Slot : "span";
33
+ return (_jsx(Comp, Object.assign({ "data-slot": "badge", className: cn(badgeVariants({ variant }), className) }, props)));
34
+ }
35
+ export { Badge, badgeVariants };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
3
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): import("react/jsx-runtime").JSX.Element;
4
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
5
+ declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
6
+ asChild?: boolean;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
9
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
10
+ declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
11
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,45 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { Slot } from "@radix-ui/react-slot";
14
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
15
+ import { cn } from "../utils/cn";
16
+ function Breadcrumb(_a) {
17
+ var props = __rest(_a, []);
18
+ return _jsx("nav", Object.assign({ "aria-label": "breadcrumb", "data-slot": "breadcrumb" }, props));
19
+ }
20
+ function BreadcrumbList(_a) {
21
+ var { className } = _a, props = __rest(_a, ["className"]);
22
+ return (_jsx("ol", Object.assign({ "data-slot": "breadcrumb-list", className: cn("text-muted-foreground blue-dark:text-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5", className) }, props)));
23
+ }
24
+ function BreadcrumbItem(_a) {
25
+ var { className } = _a, props = __rest(_a, ["className"]);
26
+ return (_jsx("li", Object.assign({ "data-slot": "breadcrumb-item", className: cn("inline-flex items-center gap-1.5", className) }, props)));
27
+ }
28
+ function BreadcrumbLink(_a) {
29
+ var { asChild, className } = _a, props = __rest(_a, ["asChild", "className"]);
30
+ const Comp = asChild ? Slot : "a";
31
+ return (_jsx(Comp, Object.assign({ "data-slot": "breadcrumb-link", className: cn("hover:text-foreground transition-colors", className) }, props)));
32
+ }
33
+ function BreadcrumbPage(_a) {
34
+ var { className } = _a, props = __rest(_a, ["className"]);
35
+ return (_jsx("span", Object.assign({ "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("text-foreground font-normal", className) }, props)));
36
+ }
37
+ function BreadcrumbSeparator(_a) {
38
+ var { children, className } = _a, props = __rest(_a, ["children", "className"]);
39
+ return (_jsx("li", Object.assign({ "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className) }, props, { children: children !== null && children !== void 0 ? children : _jsx(ChevronRight, {}) })));
40
+ }
41
+ function BreadcrumbEllipsis(_a) {
42
+ var { className } = _a, props = __rest(_a, ["className"]);
43
+ return (_jsxs("span", Object.assign({ "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn("flex size-9 items-center justify-center", className) }, props, { children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] })));
44
+ }
45
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "dashed" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "smIcon" | "circular" | "lgIcon" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,47 @@
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 { Slot } from "@radix-ui/react-slot";
14
+ import { cva } from "class-variance-authority";
15
+ import { cn } from "../utils/cn";
16
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
17
+ variants: {
18
+ variant: {
19
+ default: "bg-[var(--accent)] text-[var(--accent-foreground)] shadow-xs hover:bg-[var(--accent)]/60",
20
+ destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
21
+ outline: "border! border-2! bg-background shadow-xs hover:bg-accent hover:text-accent-foreground ",
22
+ secondary: "bg-[var(--btn-secondary)] text-secondary-foreground shadow-xs hover:bg-[var(--btn-secondary)]/20 border border-input",
23
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
24
+ dashed: "border border-dashed bg-background shadow-sm hover:bg-accent hover:text-accent-foreground ",
25
+ link: "text-primary underline-offset-4 hover:underline",
26
+ },
27
+ size: {
28
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
29
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
30
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
31
+ icon: "size-9",
32
+ smIcon: "h-8 w-8",
33
+ circular: "size-10 rounded-full p-0",
34
+ lgIcon: "size-10",
35
+ },
36
+ },
37
+ defaultVariants: {
38
+ variant: "default",
39
+ size: "default",
40
+ },
41
+ });
42
+ function Button(_a) {
43
+ var { className, variant, size, asChild = false } = _a, props = __rest(_a, ["className", "variant", "size", "asChild"]);
44
+ const Comp = asChild ? Slot : "button";
45
+ return (_jsx(Comp, Object.assign({ "data-slot": "button", className: cn(buttonVariants({ variant, size, className })) }, props)));
46
+ }
47
+ export { Button, buttonVariants };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { DayButton, DayPicker } from "react-day-picker";
3
+ import { Button } from "./button";
4
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
8
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,61 @@
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 { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react";
16
+ import { DayPicker, getDefaultClassNames } from "react-day-picker";
17
+ import { cn } from "../utils/cn";
18
+ import { Button, buttonVariants } from "./button";
19
+ function Calendar(_a) {
20
+ var { className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components } = _a, props = __rest(_a, ["className", "classNames", "showOutsideDays", "captionLayout", "buttonVariant", "formatters", "components"]);
21
+ const defaultClassNames = getDefaultClassNames();
22
+ return (_jsx(DayPicker, Object.assign({ showOutsideDays: showOutsideDays, className: cn("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]&]:bg-transparent [[data-slot=popover-content]&]:bg-transparent", "dark:bg-[#202020]", String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: Object.assign({ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }) }, formatters), classNames: Object.assign({ root: cn("w-fit", defaultClassNames.root), months: cn("flex gap-4 flex-col md:flex-row relative", defaultClassNames.months), month: cn("flex flex-col w-full gap-4", defaultClassNames.month), nav: cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", defaultClassNames.nav), button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_previous), button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_next), month_caption: cn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", defaultClassNames.month_caption), dropdowns: cn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", defaultClassNames.dropdowns), dropdown_root: cn("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md", "bg-[rgba(0,0,0,0.17)]", defaultClassNames.dropdown_root), dropdown: cn("absolute bg-popover inset-0 opacity-0", defaultClassNames.dropdown), caption_label: cn("select-none font-medium", captionLayout === "label"
23
+ ? "text-sm"
24
+ : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5", defaultClassNames.caption_label), table: "w-full border-collapse", weekdays: cn("flex", defaultClassNames.weekdays), weekday: cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none", defaultClassNames.weekday), week: cn("flex w-full mt-2", defaultClassNames.week), week_number_header: cn("select-none w-(--cell-size)", defaultClassNames.week_number_header), week_number: cn("text-[0.8rem] select-none text-muted-foreground", defaultClassNames.week_number), day: cn("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", defaultClassNames.day), range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start), range_middle: cn("rounded-none", defaultClassNames.range_middle), range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end), today: cn("bg-[var(--hover-back)] text-primary rounded-md data-[selected=true]:rounded-none", defaultClassNames.today), outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside), disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled), hidden: cn("invisible", defaultClassNames.hidden) }, classNames), components: Object.assign({ Root: (_a) => {
25
+ var { className, rootRef } = _a, props = __rest(_a, ["className", "rootRef"]);
26
+ return (_jsx("div", Object.assign({ "data-slot": "calendar", ref: rootRef, className: cn(className) }, props)));
27
+ }, Chevron: (_a) => {
28
+ var { className, orientation } = _a, props = __rest(_a, ["className", "orientation"]);
29
+ if (orientation === "left") {
30
+ return (_jsx(ChevronLeftIcon, Object.assign({ className: cn("size-4", className) }, props)));
31
+ }
32
+ if (orientation === "right") {
33
+ return (_jsx(ChevronRightIcon, Object.assign({ className: cn("size-4", className) }, props)));
34
+ }
35
+ return (_jsx(ChevronDownIcon, Object.assign({ className: cn("size-4", className) }, props)));
36
+ }, DayButton: CalendarDayButton, WeekNumber: (_a) => {
37
+ var { children } = _a, props = __rest(_a, ["children"]);
38
+ return (_jsx("td", Object.assign({}, props, { children: _jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: children }) })));
39
+ } }, components) }, props)));
40
+ }
41
+ function CalendarDayButton(_a) {
42
+ var { className, day, modifiers } = _a, props = __rest(_a, ["className", "day", "modifiers"]);
43
+ const defaultClassNames = getDefaultClassNames();
44
+ const ref = React.useRef(null);
45
+ React.useEffect(() => {
46
+ var _a;
47
+ if (modifiers.focused)
48
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
49
+ }, [modifiers.focused]);
50
+ return (_jsx(Button, Object.assign({ ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
51
+ !modifiers.range_start &&
52
+ !modifiers.range_end &&
53
+ !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("data-[selected-single=true]:bg-[var(--calender-foreground)] data-[selected-single=true]:text-white dark:data-[selected-single=true]:text-black",
54
+ // Make sure the background is transparent for dates in the middle of the range
55
+ "data-[range-middle=true]:bg-[var(--ring)] data-[range-middle=true]:text-white root:text-black",
56
+ // Set background color for the start of the range
57
+ "data-[range-start=true]:bg-[var(--calender-foreground)] dark:data-[range-start=true]:text-black data-[range-start=true]:text-white",
58
+ // Set background color for the end of the range
59
+ "hover:bg-[var(--keross-skeleton-bg)] hover:text-white", "data-[range-end=true]:bg-[var(--calender-foreground)] data-[range-end=true]:text-white dark:data-[range-end=true]:text-black", "group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70 root:text-black", defaultClassNames.day, className) }, props)));
60
+ }
61
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,42 @@
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 { cn } from "../utils/cn";
14
+ function Card(_a) {
15
+ var { className } = _a, props = __rest(_a, ["className"]);
16
+ return (_jsx("div", Object.assign({ "data-slot": "card", className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className) }, props)));
17
+ }
18
+ function CardHeader(_a) {
19
+ var { className } = _a, props = __rest(_a, ["className"]);
20
+ return (_jsx("div", Object.assign({ "data-slot": "card-header", className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className) }, props)));
21
+ }
22
+ function CardTitle(_a) {
23
+ var { className } = _a, props = __rest(_a, ["className"]);
24
+ return (_jsx("div", Object.assign({ "data-slot": "card-title", className: cn("leading-none font-semibold", className) }, props)));
25
+ }
26
+ function CardDescription(_a) {
27
+ var { className } = _a, props = __rest(_a, ["className"]);
28
+ return (_jsx("div", Object.assign({ "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className) }, props)));
29
+ }
30
+ function CardAction(_a) {
31
+ var { className } = _a, props = __rest(_a, ["className"]);
32
+ return (_jsx("div", Object.assign({ "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className) }, props)));
33
+ }
34
+ function CardContent(_a) {
35
+ var { className } = _a, props = __rest(_a, ["className"]);
36
+ return (_jsx("div", Object.assign({ "data-slot": "card-content", className: cn("px-6", className) }, props)));
37
+ }
38
+ function CardFooter(_a) {
39
+ var { className } = _a, props = __rest(_a, ["className"]);
40
+ return (_jsx("div", Object.assign({ "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className) }, props)));
41
+ }
42
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,21 @@
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 CheckboxPrimitive from "@radix-ui/react-checkbox";
15
+ import { CheckIcon } from "lucide-react";
16
+ import { cn } from "../utils/cn";
17
+ function Checkbox(_a) {
18
+ var { className } = _a, props = __rest(_a, ["className"]);
19
+ return (_jsx(CheckboxPrimitive.Root, Object.assign({ "data-slot": "checkbox", className: cn("peer border-input bg-[var(--background)] dark:bg-[var(--border)] data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border-1 shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className) }, props, { children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) })));
20
+ }
21
+ export { Checkbox };
@@ -0,0 +1,5 @@
1
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
4
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,27 @@
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 CollapsiblePrimitive from "@radix-ui/react-collapsible";
15
+ function Collapsible(_a) {
16
+ var props = __rest(_a, []);
17
+ return _jsx(CollapsiblePrimitive.Root, Object.assign({ "data-slot": "collapsible" }, props));
18
+ }
19
+ function CollapsibleTrigger(_a) {
20
+ var props = __rest(_a, []);
21
+ return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, Object.assign({ "data-slot": "collapsible-trigger" }, props)));
22
+ }
23
+ function CollapsibleContent(_a) {
24
+ var props = __rest(_a, []);
25
+ return (_jsx(CollapsiblePrimitive.CollapsibleContent, Object.assign({ "data-slot": "collapsible-content" }, props)));
26
+ }
27
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "./dialog";
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
12
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
13
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
14
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
15
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
16
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
17
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
18
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,54 @@
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 { Command as CommandPrimitive } from "cmdk";
15
+ import { SearchIcon } from "lucide-react";
16
+ import { cn } from "../utils/cn";
17
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog";
18
+ function Command(_a) {
19
+ var { className } = _a, props = __rest(_a, ["className"]);
20
+ return (_jsx(CommandPrimitive, Object.assign({ "data-slot": "command", className: cn("bg-card text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className) }, props)));
21
+ }
22
+ function CommandDialog(_a) {
23
+ var { title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true } = _a, props = __rest(_a, ["title", "description", "children", "className", "showCloseButton"]);
24
+ return (_jsxs(Dialog, Object.assign({}, props, { children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("overflow-hidden p-0", className), showCloseButton: showCloseButton, children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] })));
25
+ }
26
+ function CommandInput(_a) {
27
+ var { className } = _a, props = __rest(_a, ["className"]);
28
+ return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, Object.assign({ "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className) }, props))] }));
29
+ }
30
+ function CommandList(_a) {
31
+ var { className } = _a, props = __rest(_a, ["className"]);
32
+ return (_jsx(CommandPrimitive.List, Object.assign({ "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className) }, props)));
33
+ }
34
+ function CommandEmpty(_a) {
35
+ var props = __rest(_a, []);
36
+ return (_jsx(CommandPrimitive.Empty, Object.assign({ "data-slot": "command-empty", className: "py-6 text-center text-sm" }, props)));
37
+ }
38
+ function CommandGroup(_a) {
39
+ var { className } = _a, props = __rest(_a, ["className"]);
40
+ return (_jsx(CommandPrimitive.Group, Object.assign({ "data-slot": "command-group", className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className) }, props)));
41
+ }
42
+ function CommandSeparator(_a) {
43
+ var { className } = _a, props = __rest(_a, ["className"]);
44
+ return (_jsx(CommandPrimitive.Separator, Object.assign({ "data-slot": "command-separator", className: cn("bg-border -mx-1 h-px", className) }, props)));
45
+ }
46
+ function CommandItem(_a) {
47
+ var { className } = _a, props = __rest(_a, ["className"]);
48
+ return (_jsx(CommandPrimitive.Item, Object.assign({ "data-slot": "command-item", className: cn("data-[selected=true]:bg-[var(--input)] data-[selected=true]:text-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
49
+ }
50
+ function CommandShortcut(_a) {
51
+ var { className } = _a, props = __rest(_a, ["className"]);
52
+ return (_jsx("span", Object.assign({ "data-slot": "command-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className) }, props)));
53
+ }
54
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface DateInputProps {
3
+ value?: Date;
4
+ onChange: (date: Date) => void;
5
+ }
6
+ declare const DateInput: React.FC<DateInputProps>;
7
+ export { DateInput };
@@ -0,0 +1,179 @@
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 };