@pagamio/frontend-commons-lib 0.8.175 → 0.8.183

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 (508) hide show
  1. package/lib/api/client.d.ts +88 -0
  2. package/lib/api/client.js +339 -0
  3. package/lib/api/context.d.ts +112 -0
  4. package/lib/api/context.js +105 -0
  5. package/lib/api/index.d.ts +4 -0
  6. package/lib/api/index.js +4 -0
  7. package/lib/api/swr.d.ts +46 -0
  8. package/lib/api/swr.js +124 -0
  9. package/lib/api/types.d.ts +145 -0
  10. package/lib/api/types.js +10 -0
  11. package/lib/auth/authenticators/AuthenticatorFactory.d.ts +25 -0
  12. package/lib/auth/authenticators/AuthenticatorFactory.js +32 -0
  13. package/lib/auth/authenticators/index.d.ts +7 -0
  14. package/lib/auth/authenticators/index.js +7 -0
  15. package/lib/auth/authenticators/processors/DefaultAuthenticatorProcessor.d.ts +21 -0
  16. package/lib/auth/authenticators/processors/DefaultAuthenticatorProcessor.js +26 -0
  17. package/lib/auth/authenticators/processors/StrapiAuthenticatorProcessor.d.ts +74 -0
  18. package/lib/auth/authenticators/processors/StrapiAuthenticatorProcessor.js +99 -0
  19. package/lib/auth/authenticators/types.d.ts +26 -0
  20. package/lib/auth/authenticators/types.js +9 -0
  21. package/lib/auth/components/AppBanner.d.ts +7 -0
  22. package/lib/auth/components/AppBanner.js +9 -0
  23. package/lib/auth/components/AuthCard.d.ts +8 -0
  24. package/lib/auth/components/AuthCard.js +14 -0
  25. package/lib/auth/components/AuthFormUtils.d.ts +58 -0
  26. package/lib/auth/components/AuthFormUtils.js +52 -0
  27. package/lib/auth/components/AuthPageLayout.d.ts +45 -0
  28. package/lib/auth/components/AuthPageLayout.js +12 -0
  29. package/lib/auth/components/ChangePasswordPage.d.ts +12 -0
  30. package/lib/auth/components/ChangePasswordPage.js +59 -0
  31. package/lib/auth/components/CustomerRegistrationPage.d.ts +50 -0
  32. package/lib/auth/components/CustomerRegistrationPage.js +140 -0
  33. package/lib/auth/components/ForgotPasswordPage.d.ts +38 -0
  34. package/lib/auth/components/ForgotPasswordPage.js +76 -0
  35. package/lib/auth/components/LoginPage.d.ts +73 -0
  36. package/lib/auth/components/LoginPage.js +115 -0
  37. package/lib/auth/components/LogoutButton.d.ts +30 -0
  38. package/lib/auth/components/LogoutButton.js +47 -0
  39. package/lib/auth/components/ResetPasswordPage.d.ts +42 -0
  40. package/lib/auth/components/ResetPasswordPage.js +88 -0
  41. package/lib/auth/components/hooks/useChangeUserPassword.d.ts +26 -0
  42. package/lib/auth/components/hooks/useChangeUserPassword.js +63 -0
  43. package/lib/auth/components/index.d.ts +8 -0
  44. package/lib/auth/components/index.js +7 -0
  45. package/lib/auth/context/AuthContext.d.ts +65 -0
  46. package/lib/auth/context/AuthContext.js +150 -0
  47. package/lib/auth/context/index.d.ts +1 -0
  48. package/lib/auth/context/index.js +1 -0
  49. package/lib/auth/index.d.ts +7 -0
  50. package/lib/auth/index.js +7 -0
  51. package/lib/auth/services/AuthService.d.ts +230 -0
  52. package/lib/auth/services/AuthService.js +475 -0
  53. package/lib/auth/services/LogoutService.d.ts +27 -0
  54. package/lib/auth/services/LogoutService.js +98 -0
  55. package/lib/auth/services/index.d.ts +2 -0
  56. package/lib/auth/services/index.js +2 -0
  57. package/lib/auth/shared/index.d.ts +1 -0
  58. package/lib/auth/shared/index.js +1 -0
  59. package/lib/auth/shared/layout/AuthPageLayout.d.ts +10 -0
  60. package/lib/auth/shared/layout/AuthPageLayout.js +16 -0
  61. package/lib/auth/shared/layout/index.d.ts +1 -0
  62. package/lib/auth/shared/layout/index.js +1 -0
  63. package/lib/auth/types/auth.types.d.ts +234 -0
  64. package/lib/auth/types/auth.types.js +14 -0
  65. package/lib/auth/types/index.d.ts +1 -0
  66. package/lib/auth/types/index.js +1 -0
  67. package/lib/auth/utils/TokenManager.d.ts +43 -0
  68. package/lib/auth/utils/TokenManager.js +171 -0
  69. package/lib/auth/utils/Transformers.d.ts +158 -0
  70. package/lib/auth/utils/Transformers.js +263 -0
  71. package/lib/auth/utils/errorDetection.d.ts +22 -0
  72. package/lib/auth/utils/errorDetection.js +190 -0
  73. package/lib/auth/utils/index.d.ts +3 -0
  74. package/lib/auth/utils/index.js +3 -0
  75. package/lib/components/charts/LineGraph.d.ts +15 -0
  76. package/lib/components/charts/LineGraph.js +131 -0
  77. package/lib/components/icons/Icon.d.ts +8 -0
  78. package/lib/components/icons/Icon.js +13 -0
  79. package/lib/components/icons/index.d.ts +2 -0
  80. package/lib/components/icons/index.js +2 -0
  81. package/lib/components/icons/types.d.ts +26 -0
  82. package/lib/components/icons/types.js +33 -0
  83. package/lib/components/index.d.ts +3 -0
  84. package/lib/components/index.js +3 -0
  85. package/lib/components/layout/AppLayout.d.ts +34 -0
  86. package/lib/components/layout/AppLayout.js +19 -0
  87. package/lib/components/layout/AuthPageLayout.d.ts +13 -0
  88. package/lib/components/layout/AuthPageLayout.js +15 -0
  89. package/lib/components/layout/BreadcrumbNav.d.ts +2 -0
  90. package/lib/components/layout/BreadcrumbNav.js +10 -0
  91. package/lib/components/layout/LayoutContent.d.ts +6 -0
  92. package/lib/components/layout/LayoutContent.js +10 -0
  93. package/lib/components/layout/Navbar.d.ts +106 -0
  94. package/lib/components/layout/Navbar.js +66 -0
  95. package/lib/components/layout/PageHeader.d.ts +8 -0
  96. package/lib/components/layout/PageHeader.js +7 -0
  97. package/lib/components/layout/SessionExpiryModal.d.ts +10 -0
  98. package/lib/components/layout/SessionExpiryModal.js +9 -0
  99. package/lib/components/layout/Sidebar.d.ts +6 -0
  100. package/lib/components/layout/Sidebar.js +87 -0
  101. package/lib/components/layout/VerticalTabsLayout.d.ts +12 -0
  102. package/lib/components/layout/VerticalTabsLayout.js +14 -0
  103. package/lib/components/layout/index.d.ts +9 -0
  104. package/lib/components/layout/index.js +9 -0
  105. package/lib/components/ui/Avatar.d.ts +6 -0
  106. package/lib/components/ui/Avatar.js +11 -0
  107. package/lib/components/ui/AvatarIcon.d.ts +4 -0
  108. package/lib/components/ui/AvatarIcon.js +6 -0
  109. package/lib/components/ui/Button.d.ts +14 -0
  110. package/lib/components/ui/Button.js +30 -0
  111. package/lib/components/ui/Calendar.d.ts +9 -0
  112. package/lib/components/ui/Calendar.js +35 -0
  113. package/lib/components/ui/Card.d.ts +16 -0
  114. package/lib/components/ui/Card.js +6 -0
  115. package/lib/components/ui/Chart.d.ts +2 -0
  116. package/lib/components/ui/Chart.js +16 -0
  117. package/lib/components/ui/Checkbox.d.ts +4 -0
  118. package/lib/components/ui/Checkbox.js +8 -0
  119. package/lib/components/ui/Command.d.ts +80 -0
  120. package/lib/components/ui/Command.js +28 -0
  121. package/lib/components/ui/ContainedTab.d.ts +21 -0
  122. package/lib/components/ui/ContainedTab.js +37 -0
  123. package/lib/components/ui/DateFormat.d.ts +6 -0
  124. package/lib/components/ui/DateFormat.js +8 -0
  125. package/lib/components/ui/DatePicker.d.ts +14 -0
  126. package/lib/components/ui/DatePicker.js +91 -0
  127. package/lib/components/ui/DateRangeModal.d.ts +38 -0
  128. package/lib/components/ui/DateRangeModal.js +89 -0
  129. package/lib/components/ui/DetailsCard.d.ts +16 -0
  130. package/lib/components/ui/DetailsCard.js +14 -0
  131. package/lib/components/ui/DetailsPage.d.ts +36 -0
  132. package/lib/components/ui/DetailsPage.js +50 -0
  133. package/lib/components/ui/Dialog.d.ts +19 -0
  134. package/lib/components/ui/Dialog.js +22 -0
  135. package/lib/components/ui/EmptyState.d.ts +6 -0
  136. package/lib/components/ui/EmptyState.js +6 -0
  137. package/lib/components/ui/FilterComponent.d.ts +30 -0
  138. package/lib/components/ui/FilterComponent.js +80 -0
  139. package/lib/components/ui/FilterList.d.ts +52 -0
  140. package/lib/components/ui/FilterList.js +62 -0
  141. package/lib/components/ui/FilterSection.d.ts +31 -0
  142. package/lib/components/ui/FilterSection.js +21 -0
  143. package/lib/components/ui/FilterWrapper.d.ts +6 -0
  144. package/lib/components/ui/FilterWrapper.js +7 -0
  145. package/lib/components/ui/Form.d.ts +23 -0
  146. package/lib/components/ui/Form.js +62 -0
  147. package/lib/components/ui/HoverableValue.d.ts +7 -0
  148. package/lib/components/ui/HoverableValue.js +8 -0
  149. package/lib/components/ui/IconButton.d.ts +10 -0
  150. package/lib/components/ui/IconButton.js +10 -0
  151. package/lib/components/ui/ImageComponent.d.ts +8 -0
  152. package/lib/components/ui/ImageComponent.js +5 -0
  153. package/lib/components/ui/ImageUploader.d.ts +17 -0
  154. package/lib/components/ui/ImageUploader.js +144 -0
  155. package/lib/components/ui/Input.d.ts +4 -0
  156. package/lib/components/ui/Input.js +8 -0
  157. package/lib/components/ui/Label.d.ts +5 -0
  158. package/lib/components/ui/Label.js +9 -0
  159. package/lib/components/ui/Loader.d.ts +10 -0
  160. package/lib/components/ui/Loader.js +7 -0
  161. package/lib/components/ui/Modal.d.ts +72 -0
  162. package/lib/components/ui/Modal.js +31 -0
  163. package/lib/components/ui/MultiSelect.d.ts +16 -0
  164. package/lib/components/ui/MultiSelect.js +59 -0
  165. package/lib/components/ui/NotificationModal.d.ts +18 -0
  166. package/lib/components/ui/NotificationModal.js +40 -0
  167. package/lib/components/ui/PhoneInput.d.ts +12 -0
  168. package/lib/components/ui/PhoneInput.js +58 -0
  169. package/lib/components/ui/Popover.d.ts +7 -0
  170. package/lib/components/ui/Popover.js +10 -0
  171. package/lib/components/ui/Progress.d.ts +7 -0
  172. package/lib/components/ui/Progress.js +7 -0
  173. package/lib/components/ui/Radio.d.ts +5 -0
  174. package/lib/components/ui/Radio.js +14 -0
  175. package/lib/components/ui/RangeDatePicker.d.ts +78 -0
  176. package/lib/components/ui/RangeDatePicker.js +68 -0
  177. package/lib/components/ui/Select.d.ts +13 -0
  178. package/lib/components/ui/Select.js +57 -0
  179. package/lib/components/ui/Separator.d.ts +4 -0
  180. package/lib/components/ui/Separator.js +7 -0
  181. package/lib/components/ui/Sheet.d.ts +26 -0
  182. package/lib/components/ui/Sheet.js +37 -0
  183. package/lib/components/ui/StatusCell.d.ts +9 -0
  184. package/lib/components/ui/StatusCell.js +6 -0
  185. package/lib/components/ui/Switch.d.ts +10 -0
  186. package/lib/components/ui/Switch.js +22 -0
  187. package/lib/components/ui/Tab.d.ts +15 -0
  188. package/lib/components/ui/Tab.js +13 -0
  189. package/lib/components/ui/TableDownload.d.ts +11 -0
  190. package/lib/components/ui/TableDownload.js +82 -0
  191. package/lib/components/ui/TailwindIndicator.d.ts +1 -0
  192. package/lib/components/ui/TailwindIndicator.js +6 -0
  193. package/lib/components/ui/TextField.d.ts +60 -0
  194. package/lib/components/ui/TextField.js +42 -0
  195. package/lib/components/ui/Textarea.d.ts +5 -0
  196. package/lib/components/ui/Textarea.js +8 -0
  197. package/lib/components/ui/Toast.d.ts +12 -0
  198. package/lib/components/ui/Toast.js +25 -0
  199. package/lib/components/ui/UploadField.d.ts +15 -0
  200. package/lib/components/ui/UploadField.js +45 -0
  201. package/lib/components/ui/VerticalTab.d.ts +16 -0
  202. package/lib/components/ui/VerticalTab.js +13 -0
  203. package/lib/components/ui/index.d.ts +49 -0
  204. package/lib/components/ui/index.js +47 -0
  205. package/lib/context/BreadcrumbContext.d.ts +28 -0
  206. package/lib/context/BreadcrumbContext.js +238 -0
  207. package/lib/context/FormEngineDrawerProvider.d.ts +21 -0
  208. package/lib/context/FormEngineDrawerProvider.js +38 -0
  209. package/lib/context/MultiFormEngineDrawerProvider.d.ts +25 -0
  210. package/lib/context/MultiFormEngineDrawerProvider.js +89 -0
  211. package/lib/context/SidebarContext.d.ts +65 -0
  212. package/lib/context/SidebarContext.js +47 -0
  213. package/lib/context/ToastContext.d.ts +17 -0
  214. package/lib/context/ToastContext.js +29 -0
  215. package/lib/context/index.d.ts +5 -0
  216. package/lib/context/index.js +5 -0
  217. package/lib/dashboard-visuals/components/BaseChart.d.ts +55 -0
  218. package/lib/dashboard-visuals/components/BaseChart.js +201 -0
  219. package/lib/dashboard-visuals/components/CardWrapper.d.ts +10 -0
  220. package/lib/dashboard-visuals/components/CardWrapper.js +13 -0
  221. package/lib/dashboard-visuals/components/ChartDetailsModal.d.ts +57 -0
  222. package/lib/dashboard-visuals/components/ChartDetailsModal.js +27 -0
  223. package/lib/dashboard-visuals/components/ChartDetailsModalWrapper.d.ts +29 -0
  224. package/lib/dashboard-visuals/components/ChartDetailsModalWrapper.js +4 -0
  225. package/lib/dashboard-visuals/components/ChartFormatter.d.ts +22 -0
  226. package/lib/dashboard-visuals/components/ChartFormatter.js +46 -0
  227. package/lib/dashboard-visuals/components/ChartWrapper.d.ts +11 -0
  228. package/lib/dashboard-visuals/components/ChartWrapper.js +14 -0
  229. package/lib/dashboard-visuals/components/DashboardFilter.d.ts +8 -0
  230. package/lib/dashboard-visuals/components/DashboardFilter.js +17 -0
  231. package/lib/dashboard-visuals/components/DataTable.d.ts +3 -0
  232. package/lib/dashboard-visuals/components/DataTable.js +57 -0
  233. package/lib/dashboard-visuals/components/EmptyState.d.ts +6 -0
  234. package/lib/dashboard-visuals/components/EmptyState.js +6 -0
  235. package/lib/dashboard-visuals/components/ErrorState.d.ts +7 -0
  236. package/lib/dashboard-visuals/components/ErrorState.js +5 -0
  237. package/lib/dashboard-visuals/components/FilterComponentSkeleton.d.ts +3 -0
  238. package/lib/dashboard-visuals/components/FilterComponentSkeleton.js +11 -0
  239. package/lib/dashboard-visuals/components/Pagination.d.ts +10 -0
  240. package/lib/dashboard-visuals/components/Pagination.js +7 -0
  241. package/lib/dashboard-visuals/components/Switch.d.ts +8 -0
  242. package/lib/dashboard-visuals/components/Switch.js +10 -0
  243. package/lib/dashboard-visuals/components/TileSkeleton.d.ts +2 -0
  244. package/lib/dashboard-visuals/components/TileSkeleton.js +5 -0
  245. package/lib/dashboard-visuals/components/molecules/Analytics.d.ts +11 -0
  246. package/lib/dashboard-visuals/components/molecules/Analytics.js +9 -0
  247. package/lib/dashboard-visuals/components/molecules/DataGrid.d.ts +15 -0
  248. package/lib/dashboard-visuals/components/molecules/DataGrid.js +124 -0
  249. package/lib/dashboard-visuals/components/molecules/NoChartData.d.ts +6 -0
  250. package/lib/dashboard-visuals/components/molecules/NoChartData.js +6 -0
  251. package/lib/dashboard-visuals/components/molecules/VisualChart.d.ts +16 -0
  252. package/lib/dashboard-visuals/components/molecules/VisualChart.js +8 -0
  253. package/lib/dashboard-visuals/components/types.d.ts +62 -0
  254. package/lib/dashboard-visuals/components/types.js +1 -0
  255. package/lib/dashboard-visuals/hooks/useChartData.d.ts +15 -0
  256. package/lib/dashboard-visuals/hooks/useChartData.js +82 -0
  257. package/lib/dashboard-visuals/hooks/useTooltipFormatter.d.ts +13 -0
  258. package/lib/dashboard-visuals/hooks/useTooltipFormatter.js +10 -0
  259. package/lib/dashboard-visuals/index.d.ts +39 -0
  260. package/lib/dashboard-visuals/index.js +168 -0
  261. package/lib/dashboard-visuals/types/index.d.ts +83 -0
  262. package/lib/dashboard-visuals/types/index.js +1 -0
  263. package/lib/dashboard-visuals/types/metricDetailData.d.ts +25 -0
  264. package/lib/dashboard-visuals/types/metricDetailData.js +1 -0
  265. package/lib/dashboard-visuals/utils/api.d.ts +5 -0
  266. package/lib/dashboard-visuals/utils/api.js +6 -0
  267. package/lib/dashboard-visuals/utils/chartOptions.d.ts +481 -0
  268. package/lib/dashboard-visuals/utils/chartOptions.js +393 -0
  269. package/lib/dashboard-visuals/utils/chunkArray.d.ts +1 -0
  270. package/lib/dashboard-visuals/utils/chunkArray.js +7 -0
  271. package/lib/dashboard-visuals/utils/defaultColors.d.ts +1 -0
  272. package/lib/dashboard-visuals/utils/defaultColors.js +1 -0
  273. package/lib/dashboard-visuals/utils/formatUtil.d.ts +203 -0
  274. package/lib/dashboard-visuals/utils/formatUtil.js +472 -0
  275. package/lib/dashboard-visuals/utils/gridUtil.d.ts +11 -0
  276. package/lib/dashboard-visuals/utils/gridUtil.js +32 -0
  277. package/lib/dashboard-visuals/utils/index.d.ts +6 -0
  278. package/lib/dashboard-visuals/utils/index.js +6 -0
  279. package/lib/dashboard-visuals/utils/tooltipUtils.d.ts +11 -0
  280. package/lib/dashboard-visuals/utils/tooltipUtils.js +180 -0
  281. package/lib/dashboard-visuals/visualRegistry.d.ts +4 -0
  282. package/lib/dashboard-visuals/visualRegistry.js +41 -0
  283. package/lib/dashboard-visuals/visuals/BarChart.d.ts +58 -0
  284. package/lib/dashboard-visuals/visuals/BarChart.js +95 -0
  285. package/lib/dashboard-visuals/visuals/BarLineHybridChart.d.ts +33 -0
  286. package/lib/dashboard-visuals/visuals/BarLineHybridChart.js +60 -0
  287. package/lib/dashboard-visuals/visuals/BubbleChart.d.ts +25 -0
  288. package/lib/dashboard-visuals/visuals/BubbleChart.js +101 -0
  289. package/lib/dashboard-visuals/visuals/DistributionChart.d.ts +11 -0
  290. package/lib/dashboard-visuals/visuals/DistributionChart.js +48 -0
  291. package/lib/dashboard-visuals/visuals/DonutChart.d.ts +50 -0
  292. package/lib/dashboard-visuals/visuals/DonutChart.js +105 -0
  293. package/lib/dashboard-visuals/visuals/GaugeChart.d.ts +32 -0
  294. package/lib/dashboard-visuals/visuals/GaugeChart.js +53 -0
  295. package/lib/dashboard-visuals/visuals/GroupedBarChart.d.ts +47 -0
  296. package/lib/dashboard-visuals/visuals/GroupedBarChart.js +131 -0
  297. package/lib/dashboard-visuals/visuals/HeatmapChart.d.ts +79 -0
  298. package/lib/dashboard-visuals/visuals/HeatmapChart.js +146 -0
  299. package/lib/dashboard-visuals/visuals/HorizontalBarChart.d.ts +50 -0
  300. package/lib/dashboard-visuals/visuals/HorizontalBarChart.js +131 -0
  301. package/lib/dashboard-visuals/visuals/ItemPerformanceCard.d.ts +30 -0
  302. package/lib/dashboard-visuals/visuals/ItemPerformanceCard.js +31 -0
  303. package/lib/dashboard-visuals/visuals/LineChart.d.ts +56 -0
  304. package/lib/dashboard-visuals/visuals/LineChart.js +80 -0
  305. package/lib/dashboard-visuals/visuals/LineGraph.d.ts +50 -0
  306. package/lib/dashboard-visuals/visuals/LineGraph.js +189 -0
  307. package/lib/dashboard-visuals/visuals/MetricSummaryCard.d.ts +14 -0
  308. package/lib/dashboard-visuals/visuals/MetricSummaryCard.js +8 -0
  309. package/lib/dashboard-visuals/visuals/MultiGaugeChart.d.ts +39 -0
  310. package/lib/dashboard-visuals/visuals/MultiGaugeChart.js +119 -0
  311. package/lib/dashboard-visuals/visuals/PieChart.d.ts +59 -0
  312. package/lib/dashboard-visuals/visuals/PieChart.js +194 -0
  313. package/lib/dashboard-visuals/visuals/SelectedEventTile.d.ts +14 -0
  314. package/lib/dashboard-visuals/visuals/SelectedEventTile.js +35 -0
  315. package/lib/dashboard-visuals/visuals/SpeedometerChart.d.ts +53 -0
  316. package/lib/dashboard-visuals/visuals/SpeedometerChart.js +94 -0
  317. package/lib/dashboard-visuals/visuals/Table.d.ts +26 -0
  318. package/lib/dashboard-visuals/visuals/Table.js +113 -0
  319. package/lib/dashboard-visuals/visuals/Tile.d.ts +16 -0
  320. package/lib/dashboard-visuals/visuals/Tile.js +16 -0
  321. package/lib/dashboard-visuals/visuals/TreeMap.d.ts +25 -0
  322. package/lib/dashboard-visuals/visuals/TreeMap.js +45 -0
  323. package/lib/dashboard-visuals/visuals/WaterfallChart.d.ts +52 -0
  324. package/lib/dashboard-visuals/visuals/WaterfallChart.js +266 -0
  325. package/lib/form-engine/Form.d.ts +4 -0
  326. package/lib/form-engine/Form.js +14 -0
  327. package/lib/form-engine/FormEngine.d.ts +3 -0
  328. package/lib/form-engine/FormEngine.js +121 -0
  329. package/lib/form-engine/components/FieldWrapper.d.ts +18 -0
  330. package/lib/form-engine/components/FieldWrapper.js +63 -0
  331. package/lib/form-engine/components/index.d.ts +2 -0
  332. package/lib/form-engine/components/index.js +2 -0
  333. package/lib/form-engine/components/inputs/card-expiry-input/CardExpiryInput.d.ts +16 -0
  334. package/lib/form-engine/components/inputs/card-expiry-input/CardExpiryInput.js +48 -0
  335. package/lib/form-engine/components/inputs/checkbox-input/CheckboxInput.d.ts +4 -0
  336. package/lib/form-engine/components/inputs/checkbox-input/CheckboxInput.js +5 -0
  337. package/lib/form-engine/components/inputs/credit-card-input/CreditCardInput.d.ts +4 -0
  338. package/lib/form-engine/components/inputs/credit-card-input/CreditCardInput.js +82 -0
  339. package/lib/form-engine/components/inputs/date-input/DateInput.d.ts +4 -0
  340. package/lib/form-engine/components/inputs/date-input/DateInput.js +7 -0
  341. package/lib/form-engine/components/inputs/date-input/index.d.ts +1 -0
  342. package/lib/form-engine/components/inputs/date-input/index.js +1 -0
  343. package/lib/form-engine/components/inputs/email-input/EmailInput.d.ts +4 -0
  344. package/lib/form-engine/components/inputs/email-input/EmailInput.js +5 -0
  345. package/lib/form-engine/components/inputs/email-input/index.d.ts +1 -0
  346. package/lib/form-engine/components/inputs/email-input/index.js +1 -0
  347. package/lib/form-engine/components/inputs/index.d.ts +13 -0
  348. package/lib/form-engine/components/inputs/index.js +13 -0
  349. package/lib/form-engine/components/inputs/label-input/LabelInput.d.ts +4 -0
  350. package/lib/form-engine/components/inputs/label-input/LabelInput.js +7 -0
  351. package/lib/form-engine/components/inputs/label-input/index.d.ts +1 -0
  352. package/lib/form-engine/components/inputs/label-input/index.js +1 -0
  353. package/lib/form-engine/components/inputs/multi-select-input/MultiSelectInput.d.ts +4 -0
  354. package/lib/form-engine/components/inputs/multi-select-input/MultiSelectInput.js +5 -0
  355. package/lib/form-engine/components/inputs/number-input/NumberInput.d.ts +4 -0
  356. package/lib/form-engine/components/inputs/number-input/NumberInput.js +5 -0
  357. package/lib/form-engine/components/inputs/number-input/index.d.ts +1 -0
  358. package/lib/form-engine/components/inputs/number-input/index.js +1 -0
  359. package/lib/form-engine/components/inputs/password-input/PasswordInput.d.ts +4 -0
  360. package/lib/form-engine/components/inputs/password-input/PasswordInput.js +9 -0
  361. package/lib/form-engine/components/inputs/password-input/index.d.ts +1 -0
  362. package/lib/form-engine/components/inputs/password-input/index.js +1 -0
  363. package/lib/form-engine/components/inputs/radio-button/RadioInput.d.ts +4 -0
  364. package/lib/form-engine/components/inputs/radio-button/RadioInput.js +6 -0
  365. package/lib/form-engine/components/inputs/radio-button/index.d.ts +1 -0
  366. package/lib/form-engine/components/inputs/radio-button/index.js +1 -0
  367. package/lib/form-engine/components/inputs/select/SelectInput.d.ts +4 -0
  368. package/lib/form-engine/components/inputs/select/SelectInput.js +6 -0
  369. package/lib/form-engine/components/inputs/select/index.d.ts +1 -0
  370. package/lib/form-engine/components/inputs/select/index.js +1 -0
  371. package/lib/form-engine/components/inputs/textarea-input/TextareaInput.d.ts +4 -0
  372. package/lib/form-engine/components/inputs/textarea-input/TextareaInput.js +5 -0
  373. package/lib/form-engine/components/inputs/textarea-input/index.d.ts +1 -0
  374. package/lib/form-engine/components/inputs/textarea-input/index.js +1 -0
  375. package/lib/form-engine/components/inputs/time-input/TimeInput.d.ts +4 -0
  376. package/lib/form-engine/components/inputs/time-input/TimeInput.js +5 -0
  377. package/lib/form-engine/components/inputs/time-input/index.d.ts +1 -0
  378. package/lib/form-engine/components/inputs/time-input/index.js +1 -0
  379. package/lib/form-engine/components/inputs/toggle-switch-input/ToggleSwitchInput.d.ts +4 -0
  380. package/lib/form-engine/components/inputs/toggle-switch-input/ToggleSwitchInput.js +7 -0
  381. package/lib/form-engine/components/inputs/toggle-switch-input/index.d.ts +1 -0
  382. package/lib/form-engine/components/inputs/toggle-switch-input/index.js +1 -0
  383. package/lib/form-engine/components/inputs/upload-field/UploadFieldForm.d.ts +4 -0
  384. package/lib/form-engine/components/inputs/upload-field/UploadFieldForm.js +59 -0
  385. package/lib/form-engine/components/inputs/upload-field/index.d.ts +1 -0
  386. package/lib/form-engine/components/inputs/upload-field/index.js +1 -0
  387. package/lib/form-engine/hooks/useFormPersistence.d.ts +11 -0
  388. package/lib/form-engine/hooks/useFormPersistence.js +46 -0
  389. package/lib/form-engine/index.d.ts +5 -0
  390. package/lib/form-engine/index.js +5 -0
  391. package/lib/form-engine/registry/RegisterComponents.d.ts +1 -0
  392. package/lib/form-engine/registry/RegisterComponents.js +35 -0
  393. package/lib/form-engine/registry/Registry.d.ts +5 -0
  394. package/lib/form-engine/registry/Registry.js +13 -0
  395. package/lib/form-engine/registry/index.d.ts +2 -0
  396. package/lib/form-engine/registry/index.js +2 -0
  397. package/lib/form-engine/types/index.d.ts +311 -0
  398. package/lib/form-engine/types/index.js +1 -0
  399. package/lib/helpers/index.d.ts +2 -0
  400. package/lib/helpers/index.js +2 -0
  401. package/lib/helpers/utils.d.ts +37 -0
  402. package/lib/helpers/utils.js +77 -0
  403. package/lib/helpers/validations.d.ts +80 -0
  404. package/lib/helpers/validations.js +39 -0
  405. package/lib/index.d.ts +21 -0
  406. package/lib/index.js +30 -0
  407. package/lib/mocks/mockApiRequestsConfig.d.ts +2 -0
  408. package/lib/mocks/mockApiRequestsConfig.js +343 -0
  409. package/lib/pagamio-drawer/TopUpWalletDrawer/TopUpWalletContent.d.ts +14 -0
  410. package/lib/pagamio-drawer/TopUpWalletDrawer/TopUpWalletContent.js +40 -0
  411. package/lib/pagamio-drawer/TopUpWalletDrawer/index.d.ts +11 -0
  412. package/lib/pagamio-drawer/TopUpWalletDrawer/index.js +7 -0
  413. package/lib/pagamio-drawer/components/BaseDrawer.d.ts +11 -0
  414. package/lib/pagamio-drawer/components/BaseDrawer.js +10 -0
  415. package/lib/pagamio-drawer/components/DrawerContent.d.ts +27 -0
  416. package/lib/pagamio-drawer/components/DrawerContent.js +237 -0
  417. package/lib/pagamio-drawer/index.d.ts +22 -0
  418. package/lib/pagamio-drawer/index.js +133 -0
  419. package/lib/pagamio-table/data-table/ExportButton.d.ts +57 -0
  420. package/lib/pagamio-table/data-table/ExportButton.js +96 -0
  421. package/lib/pagamio-table/data-table/MantineCoreTable.d.ts +44 -0
  422. package/lib/pagamio-table/data-table/MantineCoreTable.js +129 -0
  423. package/lib/pagamio-table/data-table/Pagination.d.ts +10 -0
  424. package/lib/pagamio-table/data-table/Pagination.js +5 -0
  425. package/lib/pagamio-table/data-table/TableDownload.d.ts +8 -0
  426. package/lib/pagamio-table/data-table/TableDownload.js +81 -0
  427. package/lib/pagamio-table/data-table/TableToolbar.d.ts +3 -0
  428. package/lib/pagamio-table/data-table/TableToolbar.js +16 -0
  429. package/lib/pagamio-table/data-table/exportUtils.d.ts +42 -0
  430. package/lib/pagamio-table/data-table/exportUtils.js +782 -0
  431. package/lib/pagamio-table/data-table/index.d.ts +5 -0
  432. package/lib/pagamio-table/data-table/index.js +11 -0
  433. package/lib/pagamio-table/data-table/pdfExportUtils.d.ts +111 -0
  434. package/lib/pagamio-table/data-table/pdfExportUtils.js +113 -0
  435. package/lib/pagamio-table/data-table/types.d.ts +169 -0
  436. package/lib/pagamio-table/data-table/types.js +1 -0
  437. package/lib/pagamio-table/index.d.ts +4 -0
  438. package/lib/pagamio-table/index.js +4 -0
  439. package/lib/pagamio-table/utils/functionHelper.d.ts +12 -0
  440. package/lib/pagamio-table/utils/functionHelper.js +24 -0
  441. package/lib/pagamio-table/utils/index.d.ts +1 -0
  442. package/lib/pagamio-table/utils/index.js +1 -0
  443. package/lib/rbac/hooks.d.ts +39 -0
  444. package/lib/rbac/hooks.js +51 -0
  445. package/lib/rbac/index.d.ts +8 -0
  446. package/lib/rbac/index.js +11 -0
  447. package/lib/rbac/store.d.ts +24 -0
  448. package/lib/rbac/store.js +37 -0
  449. package/lib/rbac/types.d.ts +39 -0
  450. package/lib/rbac/types.js +4 -0
  451. package/lib/rbac/utils.d.ts +44 -0
  452. package/lib/rbac/utils.js +117 -0
  453. package/lib/shared/constants/index.d.ts +2 -0
  454. package/lib/shared/constants/index.js +2 -0
  455. package/lib/shared/hooks/index.d.ts +4 -0
  456. package/lib/shared/hooks/index.js +4 -0
  457. package/lib/shared/hooks/useAnyDrawerOpen.d.ts +4 -0
  458. package/lib/shared/hooks/useAnyDrawerOpen.js +18 -0
  459. package/lib/shared/hooks/useContainerWidth.d.ts +2 -0
  460. package/lib/shared/hooks/useContainerWidth.js +18 -0
  461. package/lib/shared/hooks/useImageUpload.d.ts +15 -0
  462. package/lib/shared/hooks/useImageUpload.js +66 -0
  463. package/lib/shared/hooks/useMediaQueries.d.ts +5 -0
  464. package/lib/shared/hooks/useMediaQueries.js +35 -0
  465. package/lib/shared/hooks/usePagamioTable.d.ts +158 -0
  466. package/lib/shared/hooks/usePagamioTable.js +475 -0
  467. package/lib/shared/hooks/useSessionTimer.d.ts +33 -0
  468. package/lib/shared/hooks/useSessionTimer.js +96 -0
  469. package/lib/shared/index.d.ts +4 -0
  470. package/lib/shared/index.js +4 -0
  471. package/lib/shared/types/index.d.ts +1 -0
  472. package/lib/shared/types/index.js +1 -0
  473. package/lib/shared/url/index.d.ts +9 -0
  474. package/lib/shared/url/index.js +20 -0
  475. package/lib/shared/utils/filterUtils.d.ts +5 -0
  476. package/lib/shared/utils/filterUtils.js +31 -0
  477. package/lib/shared/utils/functionHelper.d.ts +27 -0
  478. package/lib/shared/utils/functionHelper.js +124 -0
  479. package/lib/shared/utils/index.d.ts +2 -0
  480. package/lib/shared/utils/index.js +2 -0
  481. package/lib/shared/utils/localStorage.d.ts +53 -0
  482. package/lib/shared/utils/localStorage.js +139 -0
  483. package/lib/styles.css +6247 -0
  484. package/lib/translations/components/LocaleSwitcher.d.ts +7 -0
  485. package/lib/translations/components/LocaleSwitcher.js +18 -0
  486. package/lib/translations/components/index.d.ts +1 -0
  487. package/lib/translations/components/index.js +1 -0
  488. package/lib/translations/context/TranslationContext.d.ts +5 -0
  489. package/lib/translations/context/TranslationContext.js +151 -0
  490. package/lib/translations/context/index.d.ts +1 -0
  491. package/lib/translations/context/index.js +1 -0
  492. package/lib/translations/hooks/index.d.ts +2 -0
  493. package/lib/translations/hooks/index.js +2 -0
  494. package/lib/translations/hooks/useLibTranslations.d.ts +7 -0
  495. package/lib/translations/hooks/useLibTranslations.js +46 -0
  496. package/lib/translations/hooks/useTranslation.d.ts +7 -0
  497. package/lib/translations/hooks/useTranslation.js +11 -0
  498. package/lib/translations/index.d.ts +91 -0
  499. package/lib/translations/index.js +11 -0
  500. package/lib/translations/locales/en.json +21 -0
  501. package/lib/translations/locales/es.json +21 -0
  502. package/lib/translations/locales/fr.json +21 -0
  503. package/lib/translations/locales/pt.json +21 -0
  504. package/lib/translations/types/index.d.ts +24 -0
  505. package/lib/translations/types/index.js +1 -0
  506. package/lib/translations/utils/index.d.ts +6 -0
  507. package/lib/translations/utils/index.js +25 -0
  508. package/package.json +9 -1
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Sidebar, TextInput } from 'flowbite-react';
3
+ import { HiSearch } from 'react-icons/hi';
4
+ import { twMerge } from 'tailwind-merge';
5
+ import React, { useEffect, useState } from 'react';
6
+ import { useAppSidebarContext } from '../../context';
7
+ import { useLibTranslations, useTranslation } from '../../translations';
8
+ const AppSidebarMenu = () => {
9
+ const { pages } = useAppSidebarContext();
10
+ return (_jsx(Sidebar.Items, { children: _jsx(Sidebar.ItemGroup, { className: "mt-0 border-t-0 pb-1 pt-0", children: pages.map((item) => (_jsx(AppSidebarItem, { ...item }, item.label))) }) }));
11
+ };
12
+ const AppSidebarItem = ({ href, target, icon, label, items, badge, forceDropdown }) => {
13
+ const { pathname, linkComponent: Link } = useAppSidebarContext();
14
+ const { t } = useTranslation();
15
+ // Check if current path matches this item or any of its descendants
16
+ const isParentActive = href ? pathname === href || pathname.startsWith(`${href}/`) : false;
17
+ // Recursive function to check if any nested child is active
18
+ const hasActiveChild = (children = []) => {
19
+ return children.some((child) => {
20
+ if (child.href && pathname.startsWith(child.href))
21
+ return true;
22
+ if (child.items)
23
+ return hasActiveChild(child.items);
24
+ return false;
25
+ });
26
+ };
27
+ // If there's exactly one item, render it as a direct link instead of a dropdown
28
+ if (items?.length === 1 && !forceDropdown) {
29
+ const singleItem = items[0];
30
+ return (_jsx(Sidebar.Item, { as: Link, href: singleItem.href, target: target, icon: icon, label: badge && t(badge), className: twMerge('text-gray-600 hover:text-primary-700 hover:bg-primary-50/70', 'dark:text-gray-400 dark:hover:text-primary-300 dark:hover:bg-primary-900/30', pathname === singleItem.href &&
31
+ 'text-primary-700 bg-primary-100/80 hover:bg-primary-100/80 dark:text-primary-300 dark:bg-primary-900/40 dark:hover:bg-primary-900/40'), children: t(label) }));
32
+ }
33
+ if (items?.length) {
34
+ const isOpen = isParentActive || hasActiveChild(items);
35
+ return (_jsx(Sidebar.Collapse, { icon: icon, label: t(label), open: isOpen, className: twMerge('text-gray-600 hover:text-primary-700 hover:bg-primary-50/70', 'dark:text-gray-400 dark:hover:text-primary-300 dark:hover:bg-primary-900/30',
36
+ // Parent styling when its child is active
37
+ hasActiveChild(items) && 'text-primary-700 dark:text-primary-300',
38
+ // Parent styling when it's directly active
39
+ isParentActive &&
40
+ !hasActiveChild(items) &&
41
+ 'text-primary-700 bg-primary-100/80 hover:bg-primary-100/80 dark:text-primary-300 dark:bg-primary-900/40 dark:hover:bg-primary-900/40'), theme: { list: 'space-y-2 py-2 [&>li>div]:w-full' }, children: items.map((child) => (_jsx(React.Fragment, { children: child.items?.length ? (
42
+ // Recursively render nested items
43
+ _jsx("div", { className: "pl-3", children: _jsx(AppSidebarItem, { ...child }) })) : (
44
+ // Render leaf item
45
+ _jsx(Sidebar.Item, { as: Link, href: child.href, target: child.target, icon: child.icon, className: twMerge('justify-center [&>*]:font-normal', 'text-gray-600 hover:text-primary-700 hover:bg-primary-50/70', 'dark:text-gray-400 dark:hover:text-primary-300 dark:hover:bg-primary-900/30', pathname === child.href &&
46
+ 'text-primary-700 bg-primary-100/80 hover:bg-primary-100/80 dark:text-primary-300 dark:bg-primary-900/40 dark:hover:bg-primary-900/40'), children: t(child.label) })) }, child.label))) }));
47
+ }
48
+ // Render leaf item
49
+ return (_jsx(Sidebar.Item, { as: Link, href: href, target: target, icon: icon, label: badge && t(badge), className: twMerge('text-gray-600 hover:text-primary-700 hover:bg-primary-50/70', 'dark:text-gray-400 dark:hover:text-primary-300 dark:hover:bg-primary-900/30', isParentActive &&
50
+ 'text-primary-700 bg-primary-100/80 hover:bg-primary-100/80 dark:text-primary-300 dark:bg-primary-900/40 dark:hover:bg-primary-900/40'), children: t(label) }));
51
+ };
52
+ const AppMobileSidebar = () => {
53
+ const { mobile: { isOpen, close }, } = useAppSidebarContext();
54
+ const { t } = useTranslation();
55
+ const { tLib } = useLibTranslations();
56
+ if (!isOpen)
57
+ return null;
58
+ return (_jsxs(_Fragment, { children: [_jsx(Sidebar, { "aria-label": t('sidebar.mobileAriaLabel', 'Sidebar with multi-level dropdown example'), className: twMerge('fixed inset-y-0 left-0 z-20 hidden h-full shrink-0 flex-col border-r border-gray-200 pt-16 dark:border-gray-700 md:flex', isOpen && 'flex'), id: "sidebar", children: _jsx("div", { className: "flex h-full flex-col justify-between", children: _jsxs("div", { className: "py-2", children: [_jsx("form", { className: "pb-3", children: _jsx(TextInput, { icon: HiSearch, type: "search", placeholder: tLib('sidebar.searchPlaceholder', 'Search'), required: true, size: 32 }) }), _jsx(AppSidebarMenu, {})] }) }) }), _jsx("div", { onClick: close, "aria-hidden": "true", className: "fixed inset-0 z-10 h-full w-full bg-gray-900/50 pt-16 dark:bg-gray-900/90" })] }));
59
+ };
60
+ const AppDesktopSidebar = () => {
61
+ const { desktop: { isCollapsed, setCollapsed }, } = useAppSidebarContext();
62
+ const [isPreview, setIsPreview] = useState(isCollapsed);
63
+ const { tLib } = useLibTranslations();
64
+ useEffect(() => {
65
+ if (isCollapsed)
66
+ setIsPreview(false);
67
+ }, [isCollapsed]);
68
+ const preview = {
69
+ enable() {
70
+ if (!isCollapsed)
71
+ return;
72
+ setIsPreview(true);
73
+ setCollapsed(false);
74
+ },
75
+ disable() {
76
+ if (!isPreview)
77
+ return;
78
+ setCollapsed(true);
79
+ },
80
+ };
81
+ return (_jsx(Sidebar, { onMouseEnter: preview.enable, onMouseLeave: preview.disable, "aria-label": tLib('sidebar.desktopAriaLabel', 'Sidebar with multi-level dropdown example'), collapsed: isCollapsed, className: twMerge('fixed inset-y-0 left-0 z-20 flex h-full shrink-0 flex-col border-r border-gray-200 pt-16 duration-75 dark:border-gray-700', isCollapsed && 'hidden w-16'), id: "sidebar", children: _jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "py-2", children: _jsx(AppSidebarMenu, {}) }) }) }));
82
+ };
83
+ const AppDashboardSidebar = () => {
84
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "md:hidden", children: _jsx(AppMobileSidebar, {}) }), _jsx("div", { className: "hidden md:block", children: _jsx(AppDesktopSidebar, {}) })] }));
85
+ };
86
+ export default AppDashboardSidebar;
87
+ export { AppSidebarMenu, AppMobileSidebar, AppDesktopSidebar, AppDashboardSidebar };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface Content {
3
+ id: number;
4
+ label: string;
5
+ content: React.ReactNode;
6
+ }
7
+ interface VerticalTabsLayoutProps {
8
+ content: Content[];
9
+ }
10
+ declare const VerticalTabsLayout: ({ content }: VerticalTabsLayoutProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default VerticalTabsLayout;
12
+ export type { VerticalTabsLayoutProps };
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import classNames from 'classnames';
4
+ import { useState } from 'react';
5
+ import { useTranslation } from '../../translations';
6
+ const VerticalTabsLayout = ({ content }) => {
7
+ const [activeTab, setActiveTab] = useState(content[0].id);
8
+ const { t } = useTranslation();
9
+ return (_jsxs("div", { className: "flex ", children: [_jsx("div", { className: "bg-gray-10 w-[260px]", children: _jsx("ul", { className: "flex flex-col space-y-3 border-r border-primary-700 pr-4", children: content.map((tab) => (_jsx("li", { children: _jsx("button", { type: "button", className: classNames('flex w-full cursor-pointer items-center justify-center rounded-lg p-4 text-lg font-semibold', {
10
+ 'border border-gray-400 text-gray-700 hover:bg-gray-400 hover:text-white': activeTab === tab.id,
11
+ 'bg-gray-300 text-gray-700 hover:bg-gray-200': activeTab !== tab.id,
12
+ }), onClick: () => setActiveTab(tab.id), children: t(tab.label) }) }, tab.id))) }) }), _jsx("div", { className: "flex-1 p-6", children: _jsx("div", { className: "text-xl text-gray-800", children: content.find((tab) => tab.id === activeTab)?.content }) })] }));
13
+ };
14
+ export default VerticalTabsLayout;
@@ -0,0 +1,9 @@
1
+ export { default as AppDashboardNavbar, type AppDashboardNavbarProps, AppDarkThemeToggleWithTooltip, AppSidebarToggleButton, AppUserDropdown, } from './Navbar';
2
+ export { default as AuthPageLayout } from './AuthPageLayout';
3
+ export { default as AppBreadcrumbNav } from './BreadcrumbNav';
4
+ export { default as AppLayoutContent } from './LayoutContent';
5
+ export { default as AppPageHeader, type AppPageHeaderProps } from './PageHeader';
6
+ export { default as AppDashboardSidebar, AppDesktopSidebar, AppMobileSidebar, AppSidebarMenu } from './Sidebar';
7
+ export { default as VerticalTabsLayout, type VerticalTabsLayoutProps } from './VerticalTabsLayout';
8
+ export { default as AppLayout, type AppLayoutProps } from './AppLayout';
9
+ export { default as SessionExpiryModal, type SessionExpiryModalProps } from './SessionExpiryModal';
@@ -0,0 +1,9 @@
1
+ export { default as AppDashboardNavbar, AppDarkThemeToggleWithTooltip, AppSidebarToggleButton, AppUserDropdown, } from './Navbar';
2
+ export { default as AuthPageLayout } from './AuthPageLayout';
3
+ export { default as AppBreadcrumbNav } from './BreadcrumbNav';
4
+ export { default as AppLayoutContent } from './LayoutContent';
5
+ export { default as AppPageHeader } from './PageHeader';
6
+ export { default as AppDashboardSidebar, AppDesktopSidebar, AppMobileSidebar, AppSidebarMenu } from './Sidebar';
7
+ export { default as VerticalTabsLayout } from './VerticalTabsLayout';
8
+ export { default as AppLayout } from './AppLayout';
9
+ export { default as SessionExpiryModal } from './SessionExpiryModal';
@@ -0,0 +1,6 @@
1
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
+ import * as React from 'react';
3
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+ import * as React from 'react';
4
+ import { cn } from '../../helpers';
5
+ const Avatar = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className), ...props })));
6
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
7
+ const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Image, { ref: ref, className: cn('aspect-square h-full w-full', className), ...props })));
8
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
9
+ const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Fallback, { ref: ref, className: cn('flex h-full w-full items-center justify-center rounded-full bg-muted', className), ...props })));
10
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
11
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,4 @@
1
+ declare const AvatarIcon: ({ username }: {
2
+ username: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default AvatarIcon;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Avatar, AvatarFallback, AvatarImage } from './Avatar';
3
+ const AvatarIcon = ({ username }) => {
4
+ return (_jsxs("div", { className: "flex gap-2 p-3 mb-1", children: [_jsxs("div", { className: "relative", children: [_jsxs(Avatar, { children: [_jsx(AvatarImage, { src: "https://github.com/shadcn.png", alt: "user" }), _jsx(AvatarFallback, { children: "CN" })] }), _jsx("div", { className: "border size-3 absolute bottom-0 right-0 rounded-full bg-green-400" })] }), _jsxs("div", { className: "", children: [_jsx("p", { className: "text-sm", children: username }), _jsx("p", { className: "text-xs", children: "Administrator" })] })] }));
5
+ };
6
+ export default AvatarIcon;
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ type ButtonVariant = 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' | 'primary' | 'outline-primary' | 'transparent';
3
+ type ButtonSize = 'default' | 'sm' | 'md' | 'lg' | 'icon';
4
+ declare const variantStyles: Record<ButtonVariant, string>;
5
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6
+ variant?: ButtonVariant;
7
+ size?: ButtonSize;
8
+ asChild?: boolean;
9
+ className?: string;
10
+ }
11
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
+ export default Button;
13
+ export { variantStyles };
14
+ export type { ButtonVariant, ButtonSize };
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import * as React from 'react';
4
+ import { cn } from '../../helpers';
5
+ const variantStyles = {
6
+ default: 'bg-primary text-white shadow hover:bg-primary/90',
7
+ destructive: 'bg-red-500 text-white shadow-sm hover:bg-red-600',
8
+ outline: 'border border-gray-200 bg-white shadow-sm hover:bg-gray-100',
9
+ secondary: 'bg-gray-500 text-white shadow-sm hover:bg-gray-600',
10
+ ghost: 'hover:bg-gray-100 hover:text-gray-900',
11
+ link: 'text-primary underline-offset-4 hover:underline',
12
+ primary: 'bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500',
13
+ 'outline-primary': 'border border-primary-500 text-primary-500 hover:bg-primary-500 hover:text-white focus:ring-gray-400',
14
+ transparent: 'bg-transparent text-primary-500 hover:bg-primary-50 focus:ring-primary-500',
15
+ };
16
+ const sizeStyles = {
17
+ default: 'h-9 px-4 py-2',
18
+ sm: 'h-8 px-3 py-2 text-sm',
19
+ md: 'px-6 py-2 text-base',
20
+ lg: 'h-10 px-8 py-2 text-lg',
21
+ icon: 'h-9 w-9',
22
+ };
23
+ const Button = React.forwardRef(({ className, variant = 'primary', size = 'default', asChild = false, disabled = false, ...props }, ref) => {
24
+ const Comp = asChild ? Slot : 'button';
25
+ const baseStyles = 'inline-flex items-center justify-center rounded-md text-xs sm:text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50';
26
+ return (_jsx(Comp, { className: cn(baseStyles, variantStyles[variant], sizeStyles[size], disabled && 'bg-gray-400 text-white cursor-not-allowed', className), ref: ref, disabled: disabled, ...props }));
27
+ });
28
+ Button.displayName = 'Button';
29
+ export default Button;
30
+ export { variantStyles };
@@ -0,0 +1,9 @@
1
+ import { DayPicker } from 'react-day-picker';
2
+ import * as React from 'react';
3
+ type CalendarProps = React.ComponentProps<typeof DayPicker>;
4
+ declare const Calendar: {
5
+ ({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ export default Calendar;
9
+ export type { CalendarProps };
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DayPicker } from 'react-day-picker';
3
+ import { cn } from '../../helpers';
4
+ import { variantStyles } from '../ui';
5
+ const Calendar = ({ className, classNames, showOutsideDays = true, ...props }) => {
6
+ return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn('p-3', className), classNames: {
7
+ months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',
8
+ month: 'space-y-4',
9
+ caption: 'flex justify-center pt-1 relative items-center',
10
+ caption_label: 'text-sm font-medium',
11
+ nav: 'space-x-1 flex items-center',
12
+ nav_button: cn(variantStyles.outline, 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100'),
13
+ nav_button_previous: 'absolute left-1',
14
+ nav_button_next: 'absolute right-1',
15
+ table: 'w-full border-collapse space-y-1',
16
+ head_row: 'flex',
17
+ head_cell: 'text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]',
18
+ row: 'flex w-full mt-2',
19
+ cell: cn('relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md', props.mode === 'range'
20
+ ? '[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md'
21
+ : '[&:has([aria-selected])]:rounded-md'),
22
+ day: cn(variantStyles.ghost, 'h-8 w-8 p-0 font-normal aria-selected:opacity-100'),
23
+ day_range_start: 'day-range-start',
24
+ day_range_end: 'day-range-end',
25
+ day_selected: 'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground',
26
+ day_today: 'bg-accent text-accent-foreground',
27
+ day_outside: 'day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30',
28
+ day_disabled: 'text-muted-foreground opacity-50',
29
+ day_range_middle: 'aria-selected:bg-accent aria-selected:text-accent-foreground',
30
+ day_hidden: 'invisible',
31
+ ...classNames,
32
+ }, ...props }));
33
+ };
34
+ Calendar.displayName = 'Calendar';
35
+ export default Calendar;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { type ButtonVariant } from './Button';
3
+ interface CardProps {
4
+ title?: string;
5
+ description?: string;
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ showButton?: boolean;
9
+ buttonVariant?: ButtonVariant;
10
+ buttonText?: string;
11
+ handleButtonClick?: () => void;
12
+ /** Custom element to render inline with title and description */
13
+ headerElement?: React.ReactNode;
14
+ }
15
+ declare const Card: React.FC<CardProps>;
16
+ export default Card;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Button from './Button';
3
+ const Card = ({ title, description, children, className = '', showButton, buttonText, buttonVariant = 'primary', handleButtonClick, headerElement, }) => {
4
+ return (_jsxs("div", { className: `bg-white border rounded-[10px] shadow-sm ${className}`, children: [(title || description || showButton || headerElement) && (_jsx("div", { className: "p-6", children: _jsxs("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start gap-4", children: [_jsxs("div", { children: [title && (_jsx("h2", { className: "text-[1.5rem] font-semibold leading-[1] tracking-[-0.025em] text-gray-900", children: title })), description && _jsx("p", { className: "mt-2 text-[0.875rem] leading-[1.25rem] text-gray-600", children: description })] }), headerElement && _jsx("div", { children: headerElement }), showButton && (_jsx("div", { children: _jsx(Button, { onClick: handleButtonClick, variant: buttonVariant, className: buttonVariant, style: { height: 39 }, children: buttonText ?? 'Add' }) }))] }) })), _jsx("div", { className: "p-6 pt-0", children: children })] }));
5
+ };
6
+ export default Card;
@@ -0,0 +1,2 @@
1
+ declare const Chart: (props: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default Chart;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ReactApexChart from 'react-apexcharts';
3
+ import { useEffect, useState } from 'react';
4
+ import { Loader } from '../ui';
5
+ // TODO: Define proper props type
6
+ const Chart = (props) => {
7
+ const [mounted, setMounted] = useState(false);
8
+ useEffect(() => {
9
+ setMounted(true);
10
+ }, []);
11
+ if (!mounted) {
12
+ return _jsx(Loader, { colorClassName: "primary-500" });
13
+ }
14
+ return _jsx(ReactApexChart, { ...props, width: "100%" });
15
+ };
16
+ export default Chart;
@@ -0,0 +1,4 @@
1
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
+ import * as React from 'react';
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export default Checkbox;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ import { CheckIcon } from '@radix-ui/react-icons';
4
+ import * as React from 'react';
5
+ import { cn } from '../../helpers';
6
+ const Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn('peer h-4 w-4 shrink-0 rounded-sm border border-customPurple-25 shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary-500 data-[state=checked]:text-primary-foreground', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn('flex items-center justify-center text-current'), children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) })));
7
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
8
+ export default Checkbox;
@@ -0,0 +1,80 @@
1
+ import { type DialogProps } from '@radix-ui/react-dialog';
2
+ import * as React from 'react';
3
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
4
+ children?: React.ReactNode;
5
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
6
+ ref?: React.Ref<HTMLDivElement>;
7
+ } & {
8
+ asChild?: boolean;
9
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
10
+ label?: string;
11
+ shouldFilter?: boolean;
12
+ filter?: (value: string, search: string, keywords?: string[]) => number;
13
+ defaultValue?: string;
14
+ value?: string;
15
+ onValueChange?: (value: string) => void;
16
+ loop?: boolean;
17
+ disablePointerSelection?: boolean;
18
+ vimBindings?: boolean;
19
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const CommandDialog: ({ children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
22
+ ref?: React.Ref<HTMLInputElement>;
23
+ } & {
24
+ asChild?: boolean;
25
+ }, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "onChange" | "value"> & {
26
+ value?: string;
27
+ onValueChange?: (search: string) => void;
28
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
29
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
30
+ children?: React.ReactNode;
31
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
32
+ ref?: React.Ref<HTMLDivElement>;
33
+ } & {
34
+ asChild?: boolean;
35
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
36
+ label?: string;
37
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
39
+ children?: React.ReactNode;
40
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
41
+ ref?: React.Ref<HTMLDivElement>;
42
+ } & {
43
+ asChild?: boolean;
44
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
46
+ children?: React.ReactNode;
47
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
48
+ ref?: React.Ref<HTMLDivElement>;
49
+ } & {
50
+ asChild?: boolean;
51
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
52
+ heading?: React.ReactNode;
53
+ value?: string;
54
+ forceMount?: boolean;
55
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
57
+ ref?: React.Ref<HTMLDivElement>;
58
+ } & {
59
+ asChild?: boolean;
60
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
61
+ alwaysRender?: boolean;
62
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
64
+ children?: React.ReactNode;
65
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
66
+ ref?: React.Ref<HTMLDivElement>;
67
+ } & {
68
+ asChild?: boolean;
69
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "value" | "disabled"> & {
70
+ disabled?: boolean;
71
+ onSelect?: (value: string) => void;
72
+ value?: string;
73
+ keywords?: string[];
74
+ forceMount?: boolean;
75
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
+ declare const CommandShortcut: {
77
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
78
+ displayName: string;
79
+ };
80
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
3
+ import { Command as CommandPrimitive } from 'cmdk';
4
+ import * as React from 'react';
5
+ import { cn } from '../../helpers';
6
+ import { Dialog, DialogContent } from './Dialog';
7
+ const Command = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive, { ref: ref, className: cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', className), ...props })));
8
+ Command.displayName = CommandPrimitive.displayName;
9
+ const CommandDialog = ({ children, ...props }) => {
10
+ return (_jsx(Dialog, { ...props, children: _jsx(DialogContent, { className: "overflow-hidden p-0", children: _jsx(Command, { className: "[&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group-heading]]:text-muted-foreground [&_[data-cmdk-group]:not([hidden])_~[data-cmdk-group]]:pt-0 [&_[data-cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[data-cmdk-input]]:h-12 [&_[data-cmdk-item]]:px-2 [&_[data-cmdk-item]]:py-3 [&_[data-cmdk-item]_svg]:h-5 [&_[data-cmdk-item]_svg]:w-5", children: children }) }) }));
11
+ };
12
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => (_jsxs("div", { className: "flex items-center border-b px-3", "data-cmdk-input-wrapper": "", children: [_jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { ref: ref, className: cn('flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] })));
13
+ CommandInput.displayName = CommandPrimitive.Input.displayName;
14
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.List, { ref: ref, className: cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className), ...props })));
15
+ CommandList.displayName = CommandPrimitive.List.displayName;
16
+ const CommandEmpty = React.forwardRef((props, ref) => _jsx(CommandPrimitive.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props }));
17
+ CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
18
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Group, { ref: ref, className: cn('overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground', className), ...props })));
19
+ CommandGroup.displayName = CommandPrimitive.Group.displayName;
20
+ const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Separator, { ref: ref, className: cn('-mx-1 h-px bg-border', className), ...props })));
21
+ CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
22
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50', className), ...props })));
23
+ CommandItem.displayName = CommandPrimitive.Item.displayName;
24
+ const CommandShortcut = ({ className, ...props }) => {
25
+ return _jsx("span", { className: cn('ml-auto text-xs tracking-widest text-muted-foreground', className), ...props });
26
+ };
27
+ CommandShortcut.displayName = 'CommandShortcut';
28
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,21 @@
1
+ interface TabItem {
2
+ id: number;
3
+ title: string;
4
+ content: React.ReactNode;
5
+ }
6
+ interface ContainedTabProps {
7
+ tabs: TabItem[];
8
+ activeTab?: number;
9
+ onTabChange?: (index: number) => void;
10
+ tabClassName?: string;
11
+ /** Title to display above the tabs */
12
+ title?: string;
13
+ /** Optional description text below the title */
14
+ description?: string;
15
+ /** Whether the tab buttons should stick to the top when scrolling */
16
+ isSticky?: boolean;
17
+ /** Whether tabs should take full width of container. Default is true */
18
+ isFullWidth?: boolean;
19
+ }
20
+ declare const ContainedTab: ({ tabs, activeTab: controlledActiveTab, onTabChange, tabClassName, title, description, isSticky, isFullWidth, }: ContainedTabProps) => import("react/jsx-runtime").JSX.Element;
21
+ export default ContainedTab;
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Tabs } from 'flowbite-react';
3
+ import { useState } from 'react';
4
+ const ContainedTab = ({ tabs, activeTab: controlledActiveTab, onTabChange, tabClassName = '', title, description, isSticky = false, isFullWidth = true, }) => {
5
+ const [internalActiveTab, setInternalActiveTab] = useState(tabs[0]?.id || 0);
6
+ const isControlled = typeof controlledActiveTab !== 'undefined';
7
+ const activeTab = isControlled ? controlledActiveTab : internalActiveTab;
8
+ const handleTabClick = (tabId) => {
9
+ if (!isControlled) {
10
+ setInternalActiveTab(tabId);
11
+ }
12
+ onTabChange?.(tabId);
13
+ };
14
+ return (_jsxs("div", { className: "w-full", children: [_jsxs("div", { children: [title && _jsx("h2", { className: "text-lg font-semibold", children: title }), description && _jsx("p", { className: "text-sm text-gray-500", children: description })] }), _jsx(Tabs, { "aria-label": "Tabs", className: "flex-nowrap", style: {
15
+ display: 'flex',
16
+ flexDirection: 'row',
17
+ }, theme: {
18
+ base: 'flex flex-col gap-2',
19
+ tablist: {
20
+ base: `${isSticky ? 'sticky top-0 z-10 bg-white' : ''} flex text-center p-[5px] rounded-lg border-b border-gray-200 dark:border-gray-700 bg-gray-200 ${isFullWidth ? 'w-full' : 'w-fit'} ${tabClassName}`,
21
+ tabitem: {
22
+ base: 'flex items-center justify-center p-2 flex-1 rounded-lg text-sm font-medium first:ml-0 disabled:cursor-not-allowed disabled:text-gray-400 focus:outline-none',
23
+ variant: {
24
+ default: {
25
+ base: 'rounded-t-lg',
26
+ active: {
27
+ on: 'text-black bg-white active dark:text-cyan-500 dark:border-cyan-500',
28
+ off: 'border-b-2 border-transparent text-gray-500 dark:text-gray-400 dark:hover:text-gray-300',
29
+ },
30
+ },
31
+ },
32
+ },
33
+ },
34
+ tabpanel: 'p-0',
35
+ }, onActiveTabChange: (tab) => handleTabClick(tab), children: tabs.map((tab) => (_jsx(Tabs.Item, { title: tab.title, active: activeTab === tab.id, children: tab.content }, tab.id))) })] }));
36
+ };
37
+ export default ContainedTab;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type DateFormatterProps = {
3
+ dateString: string;
4
+ };
5
+ declare const DateFormatter: React.FC<DateFormatterProps>;
6
+ export default DateFormatter;
@@ -0,0 +1,8 @@
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ import { format, parseISO } from 'date-fns';
3
+ const DateFormatter = ({ dateString }) => {
4
+ const dateObject = parseISO(dateString);
5
+ const formattedDate = format(dateObject, 'yyyy/MM/dd HH:mm:ss');
6
+ return _jsx(_Fragment, { children: formattedDate });
7
+ };
8
+ export default DateFormatter;
@@ -0,0 +1,14 @@
1
+ import 'flowbite';
2
+ type DatePickerProps = {
3
+ ref?: any;
4
+ name?: string;
5
+ placeholder?: string;
6
+ disabled?: boolean;
7
+ id?: string;
8
+ className?: string;
9
+ value?: Date | null;
10
+ onChange?: (date: Date) => void;
11
+ };
12
+ declare function DatePicker({ value, disabled, name, onChange }: Readonly<DatePickerProps>): import("react/jsx-runtime").JSX.Element;
13
+ export default DatePicker;
14
+ export type { DatePickerProps };