@greatapps/common 1.1.138 → 1.1.140

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 (392) hide show
  1. package/dist/components/account/AccountModals.mjs +18 -0
  2. package/dist/components/account/AccountModals.mjs.map +1 -0
  3. package/dist/components/account/ConfigurationsMyAccountModal.mjs +132 -0
  4. package/dist/components/account/ConfigurationsMyAccountModal.mjs.map +1 -0
  5. package/dist/components/account/ConfirmDeleteAccountModal.mjs +45 -0
  6. package/dist/components/account/ConfirmDeleteAccountModal.mjs.map +1 -0
  7. package/dist/components/account/ConfirmGlobalPreferencesModal.mjs +45 -0
  8. package/dist/components/account/ConfirmGlobalPreferencesModal.mjs.map +1 -0
  9. package/dist/components/account/DeleteAccountModal.mjs +123 -0
  10. package/dist/components/account/DeleteAccountModal.mjs.map +1 -0
  11. package/dist/components/account/DisableTwoFactorAuthModal.mjs +67 -0
  12. package/dist/components/account/DisableTwoFactorAuthModal.mjs.map +1 -0
  13. package/dist/components/account/IsntPossibleDeleteAccountModal.mjs +42 -0
  14. package/dist/components/account/IsntPossibleDeleteAccountModal.mjs.map +1 -0
  15. package/dist/components/account/TwoFactorAuthModal.mjs +190 -0
  16. package/dist/components/account/TwoFactorAuthModal.mjs.map +1 -0
  17. package/dist/components/account/constants.mjs +29 -0
  18. package/dist/components/account/constants.mjs.map +1 -0
  19. package/dist/components/account/hooks/useChangeEmailForm.mjs +53 -0
  20. package/dist/components/account/hooks/useChangeEmailForm.mjs.map +1 -0
  21. package/dist/components/account/hooks/useChangePasswordForm.mjs +47 -0
  22. package/dist/components/account/hooks/useChangePasswordForm.mjs.map +1 -0
  23. package/dist/components/account/hooks/useChangePhoneForm.mjs +64 -0
  24. package/dist/components/account/hooks/useChangePhoneForm.mjs.map +1 -0
  25. package/dist/components/account/hooks/useConfigurationsModal.mjs +33 -0
  26. package/dist/components/account/hooks/useConfigurationsModal.mjs.map +1 -0
  27. package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs +54 -0
  28. package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs.map +1 -0
  29. package/dist/components/account/hooks/useOtpVerification.mjs +94 -0
  30. package/dist/components/account/hooks/useOtpVerification.mjs.map +1 -0
  31. package/dist/components/account/hooks/useTwoFactorAuthForm.mjs +80 -0
  32. package/dist/components/account/hooks/useTwoFactorAuthForm.mjs.map +1 -0
  33. package/dist/components/account/sections/ChangeEmailModal.mjs +180 -0
  34. package/dist/components/account/sections/ChangeEmailModal.mjs.map +1 -0
  35. package/dist/components/account/sections/ChangePasswordSection.mjs +64 -0
  36. package/dist/components/account/sections/ChangePasswordSection.mjs.map +1 -0
  37. package/dist/components/account/sections/ChangePhoneModal.mjs +182 -0
  38. package/dist/components/account/sections/ChangePhoneModal.mjs.map +1 -0
  39. package/dist/components/account/sections/MyProfileSection.mjs +303 -0
  40. package/dist/components/account/sections/MyProfileSection.mjs.map +1 -0
  41. package/dist/components/account/sections/PreferencesSection.mjs +250 -0
  42. package/dist/components/account/sections/PreferencesSection.mjs.map +1 -0
  43. package/dist/components/account/sections/SecuritySection.mjs +147 -0
  44. package/dist/components/account/sections/SecuritySection.mjs.map +1 -0
  45. package/dist/components/handlers/SearchParamsHandler.mjs +24 -0
  46. package/dist/components/handlers/SearchParamsHandler.mjs.map +1 -0
  47. package/dist/components/layouts/AppMobileNavBar.mjs +115 -0
  48. package/dist/components/layouts/AppMobileNavBar.mjs.map +1 -0
  49. package/dist/components/layouts/AppNavBar.mjs +49 -0
  50. package/dist/components/layouts/AppNavBar.mjs.map +1 -0
  51. package/dist/components/layouts/MainLayout.mjs +60 -0
  52. package/dist/components/layouts/MainLayout.mjs.map +1 -0
  53. package/dist/components/layouts/MdSideBarNavigation.mjs +54 -0
  54. package/dist/components/layouts/MdSideBarNavigation.mjs.map +1 -0
  55. package/dist/components/layouts/NavBar.mjs +132 -0
  56. package/dist/components/layouts/NavBar.mjs.map +1 -0
  57. package/dist/components/layouts/NavBarItem.mjs +23 -0
  58. package/dist/components/layouts/NavBarItem.mjs.map +1 -0
  59. package/dist/components/layouts/NotificationsPopover.mjs +97 -0
  60. package/dist/components/layouts/NotificationsPopover.mjs.map +1 -0
  61. package/dist/components/layouts/ProfilePopover.mjs +150 -0
  62. package/dist/components/layouts/ProfilePopover.mjs.map +1 -0
  63. package/dist/components/layouts/SideBarNavigation.mjs +22 -0
  64. package/dist/components/layouts/SideBarNavigation.mjs.map +1 -0
  65. package/dist/components/layouts/UsersSelectorPopover.mjs +236 -0
  66. package/dist/components/layouts/UsersSelectorPopover.mjs.map +1 -0
  67. package/dist/components/modals/ModalManager.mjs +19 -0
  68. package/dist/components/modals/ModalManager.mjs.map +1 -0
  69. package/dist/components/modals/Modals.mjs +20 -0
  70. package/dist/components/modals/Modals.mjs.map +1 -0
  71. package/dist/components/navigation/AppNavigation.mjs +30 -0
  72. package/dist/components/navigation/AppNavigation.mjs.map +1 -0
  73. package/dist/components/navigation/AppNavigationContext.mjs +13 -0
  74. package/dist/components/navigation/AppNavigationContext.mjs.map +1 -0
  75. package/dist/components/navigation/NavItem.mjs +35 -0
  76. package/dist/components/navigation/NavItem.mjs.map +1 -0
  77. package/dist/components/navigation/NavItemsContext.mjs +16 -0
  78. package/dist/components/navigation/NavItemsContext.mjs.map +1 -0
  79. package/dist/components/navigation/ProjectSelectorPopover.mjs +128 -0
  80. package/dist/components/navigation/ProjectSelectorPopover.mjs.map +1 -0
  81. package/dist/components/navigation/shells/DesktopShell.mjs +11 -0
  82. package/dist/components/navigation/shells/DesktopShell.mjs.map +1 -0
  83. package/dist/components/navigation/shells/MdShell.mjs +11 -0
  84. package/dist/components/navigation/shells/MdShell.mjs.map +1 -0
  85. package/dist/components/navigation/shells/MobileShell.mjs +27 -0
  86. package/dist/components/navigation/shells/MobileShell.mjs.map +1 -0
  87. package/dist/components/navigation/shells/TabsMobileShell.mjs +59 -0
  88. package/dist/components/navigation/shells/TabsMobileShell.mjs.map +1 -0
  89. package/dist/components/navigation/subcomponents/CreditsCard.mjs +30 -0
  90. package/dist/components/navigation/subcomponents/CreditsCard.mjs.map +1 -0
  91. package/dist/components/navigation/subcomponents/NavItems.mjs +25 -0
  92. package/dist/components/navigation/subcomponents/NavItems.mjs.map +1 -0
  93. package/dist/components/navigation/subcomponents/PlanCard.mjs +25 -0
  94. package/dist/components/navigation/subcomponents/PlanCard.mjs.map +1 -0
  95. package/dist/components/navigation/subcomponents/ProjectSelector.mjs +130 -0
  96. package/dist/components/navigation/subcomponents/ProjectSelector.mjs.map +1 -0
  97. package/dist/components/navigation/types.mjs +1 -0
  98. package/dist/components/pages/notifications/Notifications.mjs +156 -0
  99. package/dist/components/pages/notifications/Notifications.mjs.map +1 -0
  100. package/dist/components/ui/buttons/Button.mjs +52 -0
  101. package/dist/components/ui/buttons/Button.mjs.map +1 -0
  102. package/dist/components/ui/buttons/CancelButton.mjs +17 -0
  103. package/dist/components/ui/buttons/CancelButton.mjs.map +1 -0
  104. package/dist/components/ui/buttons/CopyButton.mjs +42 -0
  105. package/dist/components/ui/buttons/CopyButton.mjs.map +1 -0
  106. package/dist/components/ui/data-display/Accordion.mjs +76 -0
  107. package/dist/components/ui/data-display/Accordion.mjs.map +1 -0
  108. package/dist/components/ui/data-display/Badge.mjs +42 -0
  109. package/dist/components/ui/data-display/Badge.mjs.map +1 -0
  110. package/dist/components/ui/data-display/Card.mjs +92 -0
  111. package/dist/components/ui/data-display/Card.mjs.map +1 -0
  112. package/dist/components/ui/data-display/Pagination.mjs +118 -0
  113. package/dist/components/ui/data-display/Pagination.mjs.map +1 -0
  114. package/dist/components/ui/data-display/ScrollArea.mjs +62 -0
  115. package/dist/components/ui/data-display/ScrollArea.mjs.map +1 -0
  116. package/dist/components/ui/data-display/Separator.mjs +28 -0
  117. package/dist/components/ui/data-display/Separator.mjs.map +1 -0
  118. package/dist/components/ui/data-display/Table.mjs +116 -0
  119. package/dist/components/ui/data-display/Table.mjs.map +1 -0
  120. package/dist/components/ui/data-display/Tabs.mjs +69 -0
  121. package/dist/components/ui/data-display/Tabs.mjs.map +1 -0
  122. package/dist/components/ui/data-display/UserAvatar.mjs +49 -0
  123. package/dist/components/ui/data-display/UserAvatar.mjs.map +1 -0
  124. package/dist/components/ui/feedback/CircularProgress.mjs +71 -0
  125. package/dist/components/ui/feedback/CircularProgress.mjs.map +1 -0
  126. package/dist/components/ui/feedback/DefaultCircularProgress.mjs +50 -0
  127. package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +1 -0
  128. package/dist/components/ui/feedback/LoadingOverlay.mjs +19 -0
  129. package/dist/components/ui/feedback/LoadingOverlay.mjs.map +1 -0
  130. package/dist/components/ui/feedback/Progress.mjs +37 -0
  131. package/dist/components/ui/feedback/Progress.mjs.map +1 -0
  132. package/dist/components/ui/feedback/Toast.mjs +77 -0
  133. package/dist/components/ui/feedback/Toast.mjs.map +1 -0
  134. package/dist/components/ui/form/Calendar.mjs +204 -0
  135. package/dist/components/ui/form/Calendar.mjs.map +1 -0
  136. package/dist/components/ui/form/Checkbox.mjs +33 -0
  137. package/dist/components/ui/form/Checkbox.mjs.map +1 -0
  138. package/dist/components/ui/form/ComboboxField.mjs +130 -0
  139. package/dist/components/ui/form/ComboboxField.mjs.map +1 -0
  140. package/dist/components/ui/form/DatePicker.mjs +82 -0
  141. package/dist/components/ui/form/DatePicker.mjs.map +1 -0
  142. package/dist/components/ui/form/DateRangePicker.mjs +92 -0
  143. package/dist/components/ui/form/DateRangePicker.mjs.map +1 -0
  144. package/dist/components/ui/form/FormField.mjs +103 -0
  145. package/dist/components/ui/form/FormField.mjs.map +1 -0
  146. package/dist/components/ui/form/Input.mjs +21 -0
  147. package/dist/components/ui/form/Input.mjs.map +1 -0
  148. package/dist/components/ui/form/InputOtp.mjs +70 -0
  149. package/dist/components/ui/form/InputOtp.mjs.map +1 -0
  150. package/dist/components/ui/form/PhoneInput.mjs +78 -0
  151. package/dist/components/ui/form/PhoneInput.mjs.map +1 -0
  152. package/dist/components/ui/form/RadioGroup.mjs +37 -0
  153. package/dist/components/ui/form/RadioGroup.mjs.map +1 -0
  154. package/dist/components/ui/form/Select.mjs +179 -0
  155. package/dist/components/ui/form/Select.mjs.map +1 -0
  156. package/dist/components/ui/form/SelectField.mjs +80 -0
  157. package/dist/components/ui/form/SelectField.mjs.map +1 -0
  158. package/dist/components/ui/form/Switch.mjs +33 -0
  159. package/dist/components/ui/form/Switch.mjs.map +1 -0
  160. package/dist/components/ui/form/SwitchOptionFieldWithIcon.mjs +40 -0
  161. package/dist/components/ui/form/SwitchOptionFieldWithIcon.mjs.map +1 -0
  162. package/dist/components/ui/form/TextAreaField.mjs +56 -0
  163. package/dist/components/ui/form/TextAreaField.mjs.map +1 -0
  164. package/dist/components/ui/form/Textarea.mjs +20 -0
  165. package/dist/components/ui/form/Textarea.mjs.map +1 -0
  166. package/dist/components/ui/overlay/Command.mjs +178 -0
  167. package/dist/components/ui/overlay/Command.mjs.map +1 -0
  168. package/dist/components/ui/overlay/Dialog.mjs +142 -0
  169. package/dist/components/ui/overlay/Dialog.mjs.map +1 -0
  170. package/dist/components/ui/overlay/Popover.mjs +46 -0
  171. package/dist/components/ui/overlay/Popover.mjs.map +1 -0
  172. package/dist/components/ui/overlay/Sheet.mjs +142 -0
  173. package/dist/components/ui/overlay/Sheet.mjs.map +1 -0
  174. package/dist/components/ui/overlay/Tooltip.mjs +57 -0
  175. package/dist/components/ui/overlay/Tooltip.mjs.map +1 -0
  176. package/dist/components/widgets/notifications/NotificationCard.mjs +54 -0
  177. package/dist/components/widgets/notifications/NotificationCard.mjs.map +1 -0
  178. package/dist/enums/AccountSectionType.mjs +11 -0
  179. package/dist/enums/AccountSectionType.mjs.map +1 -0
  180. package/dist/hooks/copy-to-clipboard.hook.mjs +52 -0
  181. package/dist/hooks/copy-to-clipboard.hook.mjs.map +1 -0
  182. package/dist/hooks/useCountdownTimer.mjs +29 -0
  183. package/dist/hooks/useCountdownTimer.mjs.map +1 -0
  184. package/dist/hooks/useDebounce.mjs +19 -0
  185. package/dist/hooks/useDebounce.mjs.map +1 -0
  186. package/dist/hooks/useDebounceState.mjs +12 -0
  187. package/dist/hooks/useDebounceState.mjs.map +1 -0
  188. package/dist/hooks/useDebouncedEffect.mjs +44 -0
  189. package/dist/hooks/useDebouncedEffect.mjs.map +1 -0
  190. package/dist/hooks/useIsMobile.mjs +18 -0
  191. package/dist/hooks/useIsMobile.mjs.map +1 -0
  192. package/dist/hooks/usePasswordVisibility.mjs +13 -0
  193. package/dist/hooks/usePasswordVisibility.mjs.map +1 -0
  194. package/dist/index.mjs +259 -9841
  195. package/dist/index.mjs.map +1 -1
  196. package/dist/{chunk-R2FMWFY6.mjs → infra/api/client.mjs} +10 -14
  197. package/dist/infra/api/client.mjs.map +1 -0
  198. package/dist/infra/api/types.mjs +31 -0
  199. package/dist/infra/api/types.mjs.map +1 -0
  200. package/dist/infra/utils/client-info.mjs +27 -0
  201. package/dist/infra/utils/client-info.mjs.map +1 -0
  202. package/dist/infra/utils/clsx.mjs +9 -0
  203. package/dist/infra/utils/clsx.mjs.map +1 -0
  204. package/dist/infra/utils/params.mjs +21 -0
  205. package/dist/infra/utils/params.mjs.map +1 -0
  206. package/dist/infra/utils/parser.mjs +24 -0
  207. package/dist/infra/utils/parser.mjs.map +1 -0
  208. package/dist/infra/utils/percentage.mjs +20 -0
  209. package/dist/infra/utils/percentage.mjs.map +1 -0
  210. package/dist/middleware.mjs +3 -69
  211. package/dist/middleware.mjs.map +1 -1
  212. package/dist/middlewares/chain.mjs +37 -0
  213. package/dist/middlewares/chain.mjs.map +1 -0
  214. package/dist/middlewares/create-auth-middleware.mjs +28 -0
  215. package/dist/middlewares/create-auth-middleware.mjs.map +1 -0
  216. package/dist/middlewares/types.mjs +11 -0
  217. package/dist/middlewares/types.mjs.map +1 -0
  218. package/dist/modules/accounts/actions/account-management.action.mjs +82 -0
  219. package/dist/modules/accounts/actions/account-management.action.mjs.map +1 -0
  220. package/dist/modules/accounts/actions/find-current-account.action.mjs +10 -0
  221. package/dist/modules/accounts/actions/find-current-account.action.mjs.map +1 -0
  222. package/dist/modules/accounts/actions/list-currencies.action.mjs +10 -0
  223. package/dist/modules/accounts/actions/list-currencies.action.mjs.map +1 -0
  224. package/dist/modules/accounts/actions/list-timezones.action.mjs +10 -0
  225. package/dist/modules/accounts/actions/list-timezones.action.mjs.map +1 -0
  226. package/dist/modules/accounts/hooks/current-account.hook.mjs +24 -0
  227. package/dist/modules/accounts/hooks/current-account.hook.mjs.map +1 -0
  228. package/dist/modules/accounts/hooks/useAccountManagement.mjs +71 -0
  229. package/dist/modules/accounts/hooks/useAccountManagement.mjs.map +1 -0
  230. package/dist/modules/accounts/hooks/useCurrencies.mjs +17 -0
  231. package/dist/modules/accounts/hooks/useCurrencies.mjs.map +1 -0
  232. package/dist/modules/accounts/hooks/useTimezones.mjs +17 -0
  233. package/dist/modules/accounts/hooks/useTimezones.mjs.map +1 -0
  234. package/dist/{chunk-EDTDKGI5.mjs → modules/accounts/services/account.service.mjs} +9 -65
  235. package/dist/modules/accounts/services/account.service.mjs.map +1 -0
  236. package/dist/modules/accounts/services/currency.service.mjs +24 -0
  237. package/dist/modules/accounts/services/currency.service.mjs.map +1 -0
  238. package/dist/modules/accounts/services/timezone.service.mjs +65 -0
  239. package/dist/modules/accounts/services/timezone.service.mjs.map +1 -0
  240. package/dist/modules/accounts/services/two-factor.service.mjs +77 -0
  241. package/dist/modules/accounts/services/two-factor.service.mjs.map +1 -0
  242. package/dist/modules/accounts/types.mjs +1 -0
  243. package/dist/modules/auth/actions/login.action.mjs +14 -0
  244. package/dist/modules/auth/actions/login.action.mjs.map +1 -0
  245. package/dist/modules/auth/actions/logout.action.mjs +14 -0
  246. package/dist/modules/auth/actions/logout.action.mjs.map +1 -0
  247. package/dist/modules/auth/actions/register.action.mjs +14 -0
  248. package/dist/modules/auth/actions/register.action.mjs.map +1 -0
  249. package/dist/{validate-session.action-TMZN36SG.mjs → modules/auth/actions/validate-session.action.mjs} +3 -10
  250. package/dist/modules/auth/actions/validate-session.action.mjs.map +1 -0
  251. package/dist/{verify-two-factor.action-IQM6SU5U.mjs → modules/auth/actions/verify-two-factor.action.mjs} +4 -13
  252. package/dist/modules/auth/actions/verify-two-factor.action.mjs.map +1 -0
  253. package/dist/modules/auth/hooks/login.hook.mjs +18 -0
  254. package/dist/modules/auth/hooks/login.hook.mjs.map +1 -0
  255. package/dist/modules/auth/hooks/logout.hook.mjs +13 -0
  256. package/dist/modules/auth/hooks/logout.hook.mjs.map +1 -0
  257. package/dist/modules/auth/hooks/register.hook.mjs +13 -0
  258. package/dist/modules/auth/hooks/register.hook.mjs.map +1 -0
  259. package/dist/modules/auth/hooks/useUserQuery.mjs +63 -0
  260. package/dist/modules/auth/hooks/useUserQuery.mjs.map +1 -0
  261. package/dist/modules/auth/schema.mjs +1 -0
  262. package/dist/{chunk-I26OTCGJ.mjs → modules/auth/services/auth.service.mjs} +13 -47
  263. package/dist/modules/auth/services/auth.service.mjs.map +1 -0
  264. package/dist/modules/auth/utils/get-user-context.mjs +24 -0
  265. package/dist/modules/auth/utils/get-user-context.mjs.map +1 -0
  266. package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs +10 -0
  267. package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs.map +1 -0
  268. package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs +76 -0
  269. package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs.map +1 -0
  270. package/dist/modules/ia-credits/services/ia-credits.service.mjs +31 -0
  271. package/dist/modules/ia-credits/services/ia-credits.service.mjs.map +1 -0
  272. package/dist/modules/ia-credits/types.mjs +25 -0
  273. package/dist/modules/ia-credits/types.mjs.map +1 -0
  274. package/dist/modules/projects/actions/add-project-user.action.mjs +10 -0
  275. package/dist/modules/projects/actions/add-project-user.action.mjs.map +1 -0
  276. package/dist/modules/projects/actions/list-available-users.action.mjs +10 -0
  277. package/dist/modules/projects/actions/list-available-users.action.mjs.map +1 -0
  278. package/dist/modules/projects/actions/list-project-users.action.mjs +10 -0
  279. package/dist/modules/projects/actions/list-project-users.action.mjs.map +1 -0
  280. package/dist/modules/projects/actions/remove-project-user.action.mjs +10 -0
  281. package/dist/modules/projects/actions/remove-project-user.action.mjs.map +1 -0
  282. package/dist/modules/projects/hooks/list-available-users.hook.mjs +34 -0
  283. package/dist/modules/projects/hooks/list-available-users.hook.mjs.map +1 -0
  284. package/dist/modules/projects/hooks/list-project-users.hook.mjs +34 -0
  285. package/dist/modules/projects/hooks/list-project-users.hook.mjs.map +1 -0
  286. package/dist/modules/projects/services/project-users.service.mjs +78 -0
  287. package/dist/modules/projects/services/project-users.service.mjs.map +1 -0
  288. package/dist/modules/projects/types.mjs +22 -0
  289. package/dist/modules/projects/types.mjs.map +1 -0
  290. package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs +10 -0
  291. package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs.map +1 -0
  292. package/dist/modules/subscriptions/constants/addons.constants.mjs +12 -0
  293. package/dist/modules/subscriptions/constants/addons.constants.mjs.map +1 -0
  294. package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs +20 -0
  295. package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs.map +1 -0
  296. package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs +18 -0
  297. package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs.map +1 -0
  298. package/dist/modules/subscriptions/services/subscriptions.service.mjs +32 -0
  299. package/dist/modules/subscriptions/services/subscriptions.service.mjs.map +1 -0
  300. package/dist/modules/subscriptions/types.mjs +57 -0
  301. package/dist/modules/subscriptions/types.mjs.map +1 -0
  302. package/dist/modules/users/action/find-user-by-id.action.mjs +10 -0
  303. package/dist/modules/users/action/find-user-by-id.action.mjs.map +1 -0
  304. package/dist/modules/users/action/list-messages.action.mjs +13 -0
  305. package/dist/modules/users/action/list-messages.action.mjs.map +1 -0
  306. package/dist/modules/users/action/mark-all-messages-as-read.action.mjs +10 -0
  307. package/dist/modules/users/action/mark-all-messages-as-read.action.mjs.map +1 -0
  308. package/dist/modules/users/action/mark-message-as-read.action.mjs +10 -0
  309. package/dist/modules/users/action/mark-message-as-read.action.mjs.map +1 -0
  310. package/dist/modules/users/hooks/messages.hook.mjs +57 -0
  311. package/dist/modules/users/hooks/messages.hook.mjs.map +1 -0
  312. package/dist/modules/users/schema/messages.schema.mjs +21 -0
  313. package/dist/modules/users/schema/messages.schema.mjs.map +1 -0
  314. package/dist/modules/users/schema.mjs +11 -0
  315. package/dist/modules/users/schema.mjs.map +1 -0
  316. package/dist/modules/users/services/messages.service.mjs +35 -0
  317. package/dist/modules/users/services/messages.service.mjs.map +1 -0
  318. package/dist/{chunk-ZQZNWUKB.mjs → modules/users/services/user.service.mjs} +8 -14
  319. package/dist/modules/users/services/user.service.mjs.map +1 -0
  320. package/dist/modules/whitelabel/actions/find-whitelabel-styles.action.mjs +15 -0
  321. package/dist/modules/whitelabel/actions/find-whitelabel-styles.action.mjs.map +1 -0
  322. package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs +21 -0
  323. package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs.map +1 -0
  324. package/dist/modules/whitelabel/schema.mjs +1 -0
  325. package/dist/modules/whitelabel/schema.mjs.map +1 -0
  326. package/dist/modules/whitelabel/services/whitelabel-styles.service.mjs +76 -0
  327. package/dist/modules/whitelabel/services/whitelabel-styles.service.mjs.map +1 -0
  328. package/dist/{chunk-4IBSIBU6.mjs → modules/whitelabel/services/whitelabel.service.mjs} +9 -60
  329. package/dist/modules/whitelabel/services/whitelabel.service.mjs.map +1 -0
  330. package/dist/modules/whitelabel/styles-schema.mjs +1 -0
  331. package/dist/modules/whitelabel/styles-schema.mjs.map +1 -0
  332. package/dist/providers/auth.provider.mjs +94 -0
  333. package/dist/providers/auth.provider.mjs.map +1 -0
  334. package/dist/providers/query.provider.mjs +99 -0
  335. package/dist/providers/query.provider.mjs.map +1 -0
  336. package/dist/providers/whitelabel.provider.mjs +31 -0
  337. package/dist/providers/whitelabel.provider.mjs.map +1 -0
  338. package/dist/server.mjs +40 -1445
  339. package/dist/server.mjs.map +1 -1
  340. package/dist/store/useAccountModals.mjs +18 -0
  341. package/dist/store/useAccountModals.mjs.map +1 -0
  342. package/dist/store/useMdSidebarStore.mjs +11 -0
  343. package/dist/store/useMdSidebarStore.mjs.map +1 -0
  344. package/dist/store/useMobileNavbarSheet.mjs +14 -0
  345. package/dist/store/useMobileNavbarSheet.mjs.map +1 -0
  346. package/dist/store/useModalManager.mjs +75 -0
  347. package/dist/store/useModalManager.mjs.map +1 -0
  348. package/dist/utils/browser/clipboard.mjs +36 -0
  349. package/dist/utils/browser/clipboard.mjs.map +1 -0
  350. package/dist/utils/file/index.mjs +9 -0
  351. package/dist/utils/file/index.mjs.map +1 -0
  352. package/dist/utils/format/masks.mjs +56 -0
  353. package/dist/utils/format/masks.mjs.map +1 -0
  354. package/dist/utils/intl/locales.mjs +12 -0
  355. package/dist/utils/intl/locales.mjs.map +1 -0
  356. package/dist/{chunk-MXQIEEP6.mjs → utils/safeServerAction.mjs} +2 -8
  357. package/dist/utils/safeServerAction.mjs.map +1 -0
  358. package/dist/utils/validators/account.mjs +26 -0
  359. package/dist/utils/validators/account.mjs.map +1 -0
  360. package/dist/utils/validators/common.mjs +47 -0
  361. package/dist/utils/validators/common.mjs.map +1 -0
  362. package/dist/utils/withAction.mjs +13 -0
  363. package/dist/utils/withAction.mjs.map +1 -0
  364. package/package.json +2 -1
  365. package/dist/MMQ4R4NB-HKE335ZM.mjs +0 -62
  366. package/dist/MMQ4R4NB-HKE335ZM.mjs.map +0 -1
  367. package/dist/V4HPSUGU-XMVFKNNR.mjs +0 -52
  368. package/dist/V4HPSUGU-XMVFKNNR.mjs.map +0 -1
  369. package/dist/account-management.action-4D4A3IPF.mjs +0 -41
  370. package/dist/account.service-FPMIFBBX.mjs +0 -10
  371. package/dist/chunk-4IBSIBU6.mjs.map +0 -1
  372. package/dist/chunk-CO6HSV2G.mjs +0 -165
  373. package/dist/chunk-CO6HSV2G.mjs.map +0 -1
  374. package/dist/chunk-EDTDKGI5.mjs.map +0 -1
  375. package/dist/chunk-I26OTCGJ.mjs.map +0 -1
  376. package/dist/chunk-MXQIEEP6.mjs.map +0 -1
  377. package/dist/chunk-OO354ZZZ.mjs +0 -12702
  378. package/dist/chunk-OO354ZZZ.mjs.map +0 -1
  379. package/dist/chunk-OXVONU6X.mjs +0 -2930
  380. package/dist/chunk-OXVONU6X.mjs.map +0 -1
  381. package/dist/chunk-R2FMWFY6.mjs.map +0 -1
  382. package/dist/chunk-ZQZNWUKB.mjs.map +0 -1
  383. package/dist/find-user-by-id.action-K7PB7IH6.mjs +0 -18
  384. package/dist/find-user-by-id.action-K7PB7IH6.mjs.map +0 -1
  385. package/dist/modern-P2CXBCGW.mjs +0 -427
  386. package/dist/modern-P2CXBCGW.mjs.map +0 -1
  387. package/dist/user.service-GCI4YGGI.mjs +0 -9
  388. package/dist/validate-session.action-TMZN36SG.mjs.map +0 -1
  389. package/dist/verify-two-factor.action-IQM6SU5U.mjs.map +0 -1
  390. /package/dist/{account-management.action-4D4A3IPF.mjs.map → components/navigation/types.mjs.map} +0 -0
  391. /package/dist/{account.service-FPMIFBBX.mjs.map → modules/accounts/types.mjs.map} +0 -0
  392. /package/dist/{user.service-GCI4YGGI.mjs.map → modules/auth/schema.mjs.map} +0 -0
@@ -0,0 +1,116 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "../../../infra/utils/clsx";
4
+ function Table({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx(
6
+ "div",
7
+ {
8
+ "data-slot": "table-container",
9
+ className: "relative w-full overflow-x-auto",
10
+ children: /* @__PURE__ */ jsx(
11
+ "table",
12
+ {
13
+ "data-slot": "table",
14
+ className: cn("w-full caption-bottom text-sm", className),
15
+ ...props
16
+ }
17
+ )
18
+ }
19
+ );
20
+ }
21
+ function TableHeader({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx(
23
+ "thead",
24
+ {
25
+ "data-slot": "table-header",
26
+ className: cn("[&_tr]:border-b", className),
27
+ ...props
28
+ }
29
+ );
30
+ }
31
+ function TableBody({ className, ...props }) {
32
+ return /* @__PURE__ */ jsx(
33
+ "tbody",
34
+ {
35
+ "data-slot": "table-body",
36
+ className: cn("[&_tr:last-child]:border-0", className),
37
+ ...props
38
+ }
39
+ );
40
+ }
41
+ function TableFooter({ className, ...props }) {
42
+ return /* @__PURE__ */ jsx(
43
+ "tfoot",
44
+ {
45
+ "data-slot": "table-footer",
46
+ className: cn(
47
+ "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
48
+ className
49
+ ),
50
+ ...props
51
+ }
52
+ );
53
+ }
54
+ function TableRow({ className, ...props }) {
55
+ return /* @__PURE__ */ jsx(
56
+ "tr",
57
+ {
58
+ "data-slot": "table-row",
59
+ className: cn(
60
+ "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
61
+ className
62
+ ),
63
+ ...props
64
+ }
65
+ );
66
+ }
67
+ function TableHead({ className, ...props }) {
68
+ return /* @__PURE__ */ jsx(
69
+ "th",
70
+ {
71
+ "data-slot": "table-head",
72
+ className: cn(
73
+ "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
74
+ className
75
+ ),
76
+ ...props
77
+ }
78
+ );
79
+ }
80
+ function TableCell({ className, ...props }) {
81
+ return /* @__PURE__ */ jsx(
82
+ "td",
83
+ {
84
+ "data-slot": "table-cell",
85
+ className: cn(
86
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
87
+ className
88
+ ),
89
+ ...props
90
+ }
91
+ );
92
+ }
93
+ function TableCaption({
94
+ className,
95
+ ...props
96
+ }) {
97
+ return /* @__PURE__ */ jsx(
98
+ "caption",
99
+ {
100
+ "data-slot": "table-caption",
101
+ className: cn("text-muted-foreground mt-4 text-sm", className),
102
+ ...props
103
+ }
104
+ );
105
+ }
106
+ export {
107
+ Table,
108
+ TableBody,
109
+ TableCaption,
110
+ TableCell,
111
+ TableFooter,
112
+ TableHead,
113
+ TableHeader,
114
+ TableRow
115
+ };
116
+ //# sourceMappingURL=Table.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/Table.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div\n data-slot=\"table-container\"\n className=\"relative w-full overflow-x-auto\"\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"text-muted-foreground mt-4 text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n"],"mappings":";AAaM;AARN,SAAS,UAAU;AAEnB,SAAS,MAAM,EAAE,WAAW,GAAG,MAAM,GAAkC;AACrE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAU;AAAA,MAEV;AAAA,QAAC;AAAA;AAAA,UACC,aAAU;AAAA,UACV,WAAW,GAAG,iCAAiC,SAAS;AAAA,UACvD,GAAG;AAAA;AAAA,MACN;AAAA;AAAA,EACF;AAEJ;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,mBAAmB,SAAS;AAAA,MACzC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAkC;AACzE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAA+B;AACrE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAA+B;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAA+B;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GAAoC;AAClC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,sCAAsC,SAAS;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
4
+ import { cn } from "../../../infra/utils/clsx";
5
+ function Tabs({
6
+ className,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(
10
+ TabsPrimitive.Root,
11
+ {
12
+ "data-slot": "tabs",
13
+ className: cn("flex flex-col gap-2", className),
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ function TabsList({
19
+ className,
20
+ ...props
21
+ }) {
22
+ return /* @__PURE__ */ jsx(
23
+ TabsPrimitive.List,
24
+ {
25
+ "data-slot": "tabs-list",
26
+ className: cn(
27
+ "inline-flex w-full items-center justify-start border-b border-gray-200",
28
+ className
29
+ ),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function TabsTrigger({
35
+ className,
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ jsx(
39
+ TabsPrimitive.Trigger,
40
+ {
41
+ "data-slot": "tabs-trigger",
42
+ className: cn(
43
+ "inline-flex items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium text-gray-500 transition-all border-b-2 border-transparent hover:text-gray-900 cursor-pointer data-[state=active]:text-gray-950 data-[state=active]:border-gray-950 disabled:pointer-events-none disabled:opacity-50",
44
+ className
45
+ ),
46
+ ...props
47
+ }
48
+ );
49
+ }
50
+ function TabsContent({
51
+ className,
52
+ ...props
53
+ }) {
54
+ return /* @__PURE__ */ jsx(
55
+ TabsPrimitive.Content,
56
+ {
57
+ "data-slot": "tabs-content",
58
+ className: cn("flex-1 outline-none", className),
59
+ ...props
60
+ }
61
+ );
62
+ }
63
+ export {
64
+ Tabs,
65
+ TabsContent,
66
+ TabsList,
67
+ TabsTrigger
68
+ };
69
+ //# sourceMappingURL=Tabs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/Tabs.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n \"inline-flex w-full items-center justify-start border-b border-gray-200\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium text-gray-500 transition-all border-b-2 border-transparent hover:text-gray-900 cursor-pointer data-[state=active]:text-gray-950 data-[state=active]:border-gray-950 disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\"flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"],"mappings":";AAaI;AARJ,YAAY,mBAAmB;AAC/B,SAAS,UAAU;AAEnB,SAAS,KAAK;AAAA,EACZ;AAAA,EACA,GAAG;AACL,GAAoD;AAClD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,uBAAuB,SAAS;AAAA,MAC7C,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA,GAAG;AACL,GAAoD;AAClD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA,GAAG;AACL,GAAuD;AACrD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA,GAAG;AACL,GAAuD;AACrD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,uBAAuB,SAAS;AAAA,MAC7C,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,49 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import Image from "next/image";
4
+ import { cn } from "../../../infra/utils/clsx";
5
+ function getInitials(name, maxLength = 2) {
6
+ return name.split(" ").map((n) => n[0]).join("").slice(0, maxLength).toUpperCase();
7
+ }
8
+ const STORAGE_URL = process.env.NEXT_PUBLIC_STORAGE_URL || "";
9
+ function UserAvatar({
10
+ photo,
11
+ name,
12
+ initials,
13
+ size = 32,
14
+ shape = "circle",
15
+ className
16
+ }) {
17
+ const shapeClass = shape === "circle" ? "rounded-full" : "rounded-lg";
18
+ const displayInitials = initials || (name ? getInitials(name) : "?");
19
+ const photoUrl = STORAGE_URL && photo ? `${STORAGE_URL}/${photo}` : photo;
20
+ if (photoUrl) {
21
+ return /* @__PURE__ */ jsx(
22
+ Image,
23
+ {
24
+ alt: name || "imagem do usuario",
25
+ src: photoUrl,
26
+ width: size,
27
+ height: size,
28
+ className: cn("object-cover shrink-0", shapeClass, className),
29
+ style: { width: size, height: size }
30
+ }
31
+ );
32
+ }
33
+ return /* @__PURE__ */ jsx(
34
+ "div",
35
+ {
36
+ className: cn(
37
+ "flex items-center justify-center shrink-0 bg-gray-100",
38
+ shapeClass,
39
+ className
40
+ ),
41
+ style: { width: size, height: size },
42
+ children: /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-gray-700", children: displayInitials })
43
+ }
44
+ );
45
+ }
46
+ export {
47
+ UserAvatar
48
+ };
49
+ //# sourceMappingURL=UserAvatar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/UserAvatar.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\r\n\r\nimport Image from 'next/image';\r\nimport { cn } from '../../../infra/utils/clsx';\r\n\r\nfunction getInitials(name: string, maxLength: number = 2): string {\r\n return name\r\n .split(' ')\r\n .map((n) => n[0])\r\n .join('')\r\n .slice(0, maxLength)\r\n .toUpperCase();\r\n}\r\n\r\nconst STORAGE_URL = process.env.NEXT_PUBLIC_STORAGE_URL || '';\r\n\r\ninterface UserAvatarProps {\r\n photo?: string | null;\r\n name?: string;\r\n initials?: string;\r\n size?: number;\r\n shape?: 'circle' | 'square';\r\n className?: string;\r\n}\r\n\r\nfunction UserAvatar({\r\n photo,\r\n name,\r\n initials,\r\n size = 32,\r\n shape = 'circle',\r\n className,\r\n}: UserAvatarProps) {\r\n const shapeClass = shape === 'circle' ? 'rounded-full' : 'rounded-lg';\r\n const displayInitials = initials || (name ? getInitials(name) : '?');\r\n\r\n const photoUrl = STORAGE_URL && photo ? `${STORAGE_URL}/${photo}` : photo;\r\n\r\n if (photoUrl) {\r\n return (\r\n <Image\r\n alt={name || 'imagem do usuario'}\r\n src={photoUrl}\r\n width={size}\r\n height={size}\r\n className={cn('object-cover shrink-0', shapeClass, className)}\r\n style={{ width: size, height: size }}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <div\r\n className={cn(\r\n 'flex items-center justify-center shrink-0 bg-gray-100',\r\n shapeClass,\r\n className\r\n )}\r\n style={{ width: size, height: size }}\r\n >\r\n <span className=\"text-xs font-semibold text-gray-700\">{displayInitials}</span>\r\n </div>\r\n );\r\n}\r\n\r\nexport { UserAvatar };\r\nexport type { UserAvatarProps };\r\n"],"mappings":";AA0CM;AAtCN,OAAO,WAAW;AAClB,SAAS,UAAU;AAEnB,SAAS,YAAY,MAAc,YAAoB,GAAW;AAChE,SAAO,KACJ,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EACf,KAAK,EAAE,EACP,MAAM,GAAG,SAAS,EAClB,YAAY;AACjB;AAEA,MAAM,cAAc,QAAQ,IAAI,2BAA2B;AAW3D,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AACF,GAAoB;AAClB,QAAM,aAAa,UAAU,WAAW,iBAAiB;AACzD,QAAM,kBAAkB,aAAa,OAAO,YAAY,IAAI,IAAI;AAEhE,QAAM,WAAW,eAAe,QAAQ,GAAG,WAAW,IAAI,KAAK,KAAK;AAEpE,MAAI,UAAU;AACZ,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,QAAQ;AAAA,QACb,KAAK;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,WAAW,GAAG,yBAAyB,YAAY,SAAS;AAAA,QAC5D,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,IACrC;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MAEnC,8BAAC,UAAK,WAAU,uCAAuC,2BAAgB;AAAA;AAAA,EACzE;AAEJ;","names":[]}
@@ -0,0 +1,71 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ calculateRadius,
4
+ calculateCircumference,
5
+ calculatePercentage,
6
+ calculateCircularProgressOffset
7
+ } from "../../../infra/utils/percentage";
8
+ function CircularProgress({
9
+ current,
10
+ total,
11
+ size = 62,
12
+ strokeWidth = 3,
13
+ children
14
+ }) {
15
+ const radius = calculateRadius(size, strokeWidth);
16
+ const circumference = calculateCircumference(radius);
17
+ const percentage = calculatePercentage(current, total);
18
+ const offset = calculateCircularProgressOffset(percentage, circumference);
19
+ return /* @__PURE__ */ jsxs(
20
+ "div",
21
+ {
22
+ className: "relative flex items-center justify-center",
23
+ style: { width: size, height: size },
24
+ role: "progressbar",
25
+ "aria-valuenow": current,
26
+ "aria-valuemin": 0,
27
+ "aria-valuemax": total,
28
+ "aria-label": "Progresso",
29
+ children: [
30
+ /* @__PURE__ */ jsxs("svg", { width: size, height: size, className: "absolute", children: [
31
+ /* @__PURE__ */ jsx(
32
+ "circle",
33
+ {
34
+ cx: size / 2,
35
+ cy: size / 2,
36
+ r: radius,
37
+ stroke: "var(--color-gray-50)",
38
+ strokeWidth,
39
+ fill: "white"
40
+ }
41
+ ),
42
+ /* @__PURE__ */ jsx(
43
+ "circle",
44
+ {
45
+ cx: size / 2,
46
+ cy: size / 2,
47
+ r: radius,
48
+ stroke: "var(--color-gray-950)",
49
+ strokeWidth,
50
+ fill: "none",
51
+ strokeDasharray: circumference,
52
+ strokeDashoffset: offset,
53
+ strokeLinecap: "round",
54
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
55
+ className: "transition-all duration-300 ease-in-out"
56
+ }
57
+ )
58
+ ] }),
59
+ /* @__PURE__ */ jsx("div", { className: "relative z-10 flex items-center justify-center w-[50px] h-[50px] rounded-full bg-gray-50 paragraph-small-semibold", children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx("span", { className: "text-gray-600", children: current }),
61
+ /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "/" }),
62
+ /* @__PURE__ */ jsx("span", { className: "text-gray-600", children: total })
63
+ ] }) })
64
+ ]
65
+ }
66
+ );
67
+ }
68
+ export {
69
+ CircularProgress as default
70
+ };
71
+ //# sourceMappingURL=CircularProgress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/CircularProgress.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport {\n calculateRadius,\n calculateCircumference,\n calculatePercentage,\n calculateCircularProgressOffset,\n} from \"../../../infra/utils/percentage\";\n\ninterface CircularProgressProps {\n current: number;\n total: number;\n size?: number;\n strokeWidth?: number;\n children?: ReactNode;\n}\n\nexport default function CircularProgress({\n current,\n total,\n size = 62,\n strokeWidth = 3,\n children,\n}: CircularProgressProps) {\n const radius = calculateRadius(size, strokeWidth);\n const circumference = calculateCircumference(radius);\n const percentage = calculatePercentage(current, total);\n const offset = calculateCircularProgressOffset(percentage, circumference);\n\n return (\n <div\n className=\"relative flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-label=\"Progresso\"\n >\n <svg width={size} height={size} className=\"absolute\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-gray-50)\"\n strokeWidth={strokeWidth}\n fill=\"white\"\n />\n\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-gray-950)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all duration-300 ease-in-out\"\n />\n </svg>\n\n <div className=\"relative z-10 flex items-center justify-center w-[50px] h-[50px] rounded-full bg-gray-50 paragraph-small-semibold\">\n {children ?? (\n <>\n <span className=\"text-gray-600\">{current}</span>\n <span className=\"text-gray-500\">/</span>\n <span className=\"text-gray-600\">{total}</span>\n </>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"AAsCM,SA2BI,UA1BF,KADF;AArCN;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUQ,SAAR,iBAAkC;AAAA,EACvC;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc;AAAA,EACd;AACF,GAA0B;AACxB,QAAM,SAAS,gBAAgB,MAAM,WAAW;AAChD,QAAM,gBAAgB,uBAAuB,MAAM;AACnD,QAAM,aAAa,oBAAoB,SAAS,KAAK;AACrD,QAAM,SAAS,gCAAgC,YAAY,aAAa;AAExE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MACnC,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,cAAW;AAAA,MAEX;AAAA,6BAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,WAAU,YACxC;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,IAAI,OAAO;AAAA,cACX,IAAI,OAAO;AAAA,cACX,GAAG;AAAA,cACH,QAAO;AAAA,cACP;AAAA,cACA,MAAK;AAAA;AAAA,UACP;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC,IAAI,OAAO;AAAA,cACX,IAAI,OAAO;AAAA,cACX,GAAG;AAAA,cACH,QAAO;AAAA,cACP;AAAA,cACA,MAAK;AAAA,cACL,iBAAiB;AAAA,cACjB,kBAAkB;AAAA,cAClB,eAAc;AAAA,cACd,WAAW,cAAc,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,cAC7C,WAAU;AAAA;AAAA,UACZ;AAAA,WACF;AAAA,QAEA,oBAAC,SAAI,WAAU,qHACZ,sBACC,iCACE;AAAA,8BAAC,UAAK,WAAU,iBAAiB,mBAAQ;AAAA,UACzC,oBAAC,UAAK,WAAU,iBAAgB,eAAC;AAAA,UACjC,oBAAC,UAAK,WAAU,iBAAiB,iBAAM;AAAA,WACzC,GAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,50 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import {
3
+ calculateRadius,
4
+ calculateCircumference,
5
+ calculatePercentage,
6
+ calculateCircularProgressOffset
7
+ } from "../../../infra/utils/percentage";
8
+ function DefaultCircularProgress({
9
+ current,
10
+ total,
11
+ size = 62,
12
+ strokeWidth = 3
13
+ }) {
14
+ const radius = calculateRadius(size, strokeWidth);
15
+ const circumference = calculateCircumference(radius);
16
+ const percentage = calculatePercentage(current, total);
17
+ const offset = calculateCircularProgressOffset(percentage, circumference);
18
+ return /* @__PURE__ */ jsx(
19
+ "div",
20
+ {
21
+ className: "relative flex items-center justify-center",
22
+ style: { width: size, height: size },
23
+ role: "progressbar",
24
+ "aria-valuenow": current,
25
+ "aria-valuemin": 0,
26
+ "aria-valuemax": total,
27
+ "aria-label": "Progresso de exporta\xE7\xE3o",
28
+ children: /* @__PURE__ */ jsx("svg", { width: size, height: size, className: "absolute", children: /* @__PURE__ */ jsx(
29
+ "circle",
30
+ {
31
+ cx: size / 2,
32
+ cy: size / 2,
33
+ r: radius,
34
+ stroke: "var(--color-pages-300)",
35
+ strokeWidth,
36
+ fill: "none",
37
+ strokeDasharray: circumference,
38
+ strokeDashoffset: offset,
39
+ strokeLinecap: "round",
40
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
41
+ className: "transition-all duration-300 ease-in-out"
42
+ }
43
+ ) })
44
+ }
45
+ );
46
+ }
47
+ export {
48
+ DefaultCircularProgress as default
49
+ };
50
+ //# sourceMappingURL=DefaultCircularProgress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/DefaultCircularProgress.tsx"],"sourcesContent":["import {\n calculateRadius,\n calculateCircumference,\n calculatePercentage,\n calculateCircularProgressOffset,\n} from \"../../../infra/utils/percentage\";\n\ninterface CircularProgressProps {\n current: number;\n total: number;\n size?: number;\n strokeWidth?: number;\n}\n\nexport default function DefaultCircularProgress({\n current,\n total,\n size = 62,\n strokeWidth = 3,\n}: CircularProgressProps) {\n const radius = calculateRadius(size, strokeWidth);\n const circumference = calculateCircumference(radius);\n const percentage = calculatePercentage(current, total);\n const offset = calculateCircularProgressOffset(percentage, circumference);\n\n return (\n <div\n className=\"relative flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-label=\"Progresso de exportação\"\n >\n <svg width={size} height={size} className=\"absolute\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-pages-300)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all duration-300 ease-in-out\"\n />\n </svg>\n </div>\n );\n}\n"],"mappings":"AAoCQ;AApCR;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASQ,SAAR,wBAAyC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc;AAChB,GAA0B;AACxB,QAAM,SAAS,gBAAgB,MAAM,WAAW;AAChD,QAAM,gBAAgB,uBAAuB,MAAM;AACnD,QAAM,aAAa,oBAAoB,SAAS,KAAK;AACrD,QAAM,SAAS,gCAAgC,YAAY,aAAa;AAExE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MACnC,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,cAAW;AAAA,MAEX,8BAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,WAAU,YACxC;AAAA,QAAC;AAAA;AAAA,UACC,IAAI,OAAO;AAAA,UACX,IAAI,OAAO;AAAA,UACX,GAAG;AAAA,UACH,QAAO;AAAA,UACP;AAAA,UACA,MAAK;AAAA,UACL,iBAAiB;AAAA,UACjB,kBAAkB;AAAA,UAClB,eAAc;AAAA,UACd,WAAW,cAAc,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,UAC7C,WAAU;AAAA;AAAA,MACZ,GACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Image from "next/image";
4
+ function LoadingOverlay({ isLoading, message, icon }) {
5
+ if (!isLoading) return null;
6
+ const defaultIcon = /* @__PURE__ */ jsx(Image, { src: "/icons/great-icon.svg", alt: "Great Icon", width: 20, height: 20 });
7
+ return /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]", children: /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-2xl shadow-xl px-16 py-12 flex flex-col items-center gap-6 min-w-[380px]", children: [
8
+ /* @__PURE__ */ jsxs("div", { className: "relative flex items-center justify-center w-20 h-20", children: [
9
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 border-[5px] border-gray-100 rounded-full" }),
10
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 border-[5px] border-transparent border-t-black rounded-full animate-spin" }),
11
+ /* @__PURE__ */ jsx("div", { className: "relative z-20 flex items-center justify-center w-14 h-14 bg-gray-100 rounded-full", children: icon ?? defaultIcon })
12
+ ] }),
13
+ /* @__PURE__ */ jsx("span", { className: "font-bold text-gray-900 text-lg", children: message })
14
+ ] }) });
15
+ }
16
+ export {
17
+ LoadingOverlay
18
+ };
19
+ //# sourceMappingURL=LoadingOverlay.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/LoadingOverlay.tsx"],"sourcesContent":["'use client';\n\nimport Image from 'next/image';\nimport { ReactNode } from 'react';\n\ninterface LoadingOverlayProps {\n isLoading: boolean;\n message?: string;\n icon?: ReactNode;\n}\n\nexport function LoadingOverlay({ isLoading, message, icon }: LoadingOverlayProps) {\n if (!isLoading) return null;\n\n const defaultIcon = <Image src=\"/icons/great-icon.svg\" alt=\"Great Icon\" width={20} height={20} />;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-[2px]\">\n <div className=\"bg-white rounded-2xl shadow-xl px-16 py-12 flex flex-col items-center gap-6 min-w-[380px]\">\n <div className=\"relative flex items-center justify-center w-20 h-20\">\n <div className=\"absolute inset-0 border-[5px] border-gray-100 rounded-full\" />\n <div className=\"absolute inset-0 border-[5px] border-transparent border-t-black rounded-full animate-spin\" />\n <div className=\"relative z-20 flex items-center justify-center w-14 h-14 bg-gray-100 rounded-full\">\n {icon ?? defaultIcon}\n </div>\n </div>\n <span className=\"font-bold text-gray-900 text-lg\">{message}</span>\n </div>\n </div>\n );\n}\n"],"mappings":";AAcsB,cAKd,YALc;AAZtB,OAAO,WAAW;AASX,SAAS,eAAe,EAAE,WAAW,SAAS,KAAK,GAAwB;AAChF,MAAI,CAAC,UAAW,QAAO;AAEvB,QAAM,cAAc,oBAAC,SAAM,KAAI,yBAAwB,KAAI,cAAa,OAAO,IAAI,QAAQ,IAAI;AAE/F,SACE,oBAAC,SAAI,WAAU,uFACb,+BAAC,SAAI,WAAU,6FACb;AAAA,yBAAC,SAAI,WAAU,uDACb;AAAA,0BAAC,SAAI,WAAU,8DAA6D;AAAA,MAC5E,oBAAC,SAAI,WAAU,6FAA4F;AAAA,MAC3G,oBAAC,SAAI,WAAU,qFACZ,kBAAQ,aACX;AAAA,OACF;AAAA,IACA,oBAAC,UAAK,WAAU,mCAAmC,mBAAQ;AAAA,KAC7D,GACF;AAEJ;","names":[]}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
4
+ import { cn } from "../../../infra/utils/clsx";
5
+ function Progress({
6
+ className,
7
+ value,
8
+ indicatorColor,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(
12
+ ProgressPrimitive.Root,
13
+ {
14
+ "data-slot": "progress",
15
+ className: cn(
16
+ "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
17
+ className
18
+ ),
19
+ ...props,
20
+ children: /* @__PURE__ */ jsx(
21
+ ProgressPrimitive.Indicator,
22
+ {
23
+ "data-slot": "progress-indicator",
24
+ className: cn(
25
+ "bg-primary h-full w-full flex-1 transition-all rounded-full",
26
+ indicatorColor
27
+ ),
28
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
29
+ }
30
+ )
31
+ }
32
+ );
33
+ }
34
+ export {
35
+ Progress
36
+ };
37
+ //# sourceMappingURL=Progress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/Progress.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\ninterface ProgressProps extends React.ComponentProps<typeof ProgressPrimitive.Root> {\n indicatorColor?: string\n}\n\nfunction Progress({\n className,\n value,\n indicatorColor,\n ...props\n}: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\n \"bg-primary h-full w-full flex-1 transition-all rounded-full\",\n indicatorColor\n )}\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress }\n"],"mappings":";AA2BM;AAtBN,YAAY,uBAAuB;AACnC,SAAS,UAAU;AAMnB,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,SACE;AAAA,IAAC,kBAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,QAAC,kBAAkB;AAAA,QAAlB;AAAA,UACC,aAAU;AAAA,UACV,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACA,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,EAAE,KAAK;AAAA;AAAA,MAC5D;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,77 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { CheckCircle, XCircle, AlertCircle, Info, Circle, X } from "lucide-react";
5
+ import { toast } from "sonner";
6
+ import { cn } from "../../../infra/utils/clsx";
7
+ import { Button } from "../buttons/Button";
8
+ const toastVariants = cva(
9
+ "w-full bg-white rounded-lg p-4 shadow-lg backdrop-blur-sm transition-all",
10
+ {
11
+ variants: {
12
+ variant: {
13
+ success: "",
14
+ error: "",
15
+ warning: "",
16
+ info: "",
17
+ default: ""
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "default"
22
+ }
23
+ }
24
+ );
25
+ const toastIconContainerVariants = cva(
26
+ "size-10 rounded-lg flex items-center justify-center shrink-0",
27
+ {
28
+ variants: {
29
+ variant: {
30
+ success: "bg-green-50 text-green-500",
31
+ error: "bg-red-50 text-red-500",
32
+ warning: "bg-yellow-50 text-yellow-400",
33
+ info: "bg-pages-50 text-pages-500",
34
+ default: "bg-gray-50 text-gray-950"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ variant: "default"
39
+ }
40
+ }
41
+ );
42
+ const TOAST_ICONS = {
43
+ success: CheckCircle,
44
+ error: XCircle,
45
+ warning: AlertCircle,
46
+ info: Info,
47
+ default: Circle
48
+ };
49
+ function Toast({
50
+ variant = "default",
51
+ message,
52
+ icon,
53
+ children,
54
+ className,
55
+ toastId
56
+ }) {
57
+ const Icon = variant ? TOAST_ICONS[variant] : null;
58
+ return /* @__PURE__ */ jsx("div", { "data-slot": "toast", className: cn(toastVariants({ variant }), className, "md:min-w-[310px] lg:min-w-[310px]"), children: children ? children : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
59
+ /* @__PURE__ */ jsx("div", { className: cn(toastIconContainerVariants({ variant })), children: icon || Icon && /* @__PURE__ */ jsx(Icon, { size: 16 }) }),
60
+ /* @__PURE__ */ jsx("span", { className: "w-full text-gray-600 paragraph-small-medium", children: message }),
61
+ /* @__PURE__ */ jsx(
62
+ Button,
63
+ {
64
+ variant: "ghost",
65
+ className: "size-8 rounded-full",
66
+ onClick: () => toastId && toast.dismiss(toastId),
67
+ children: /* @__PURE__ */ jsx(X, { size: 18 })
68
+ }
69
+ )
70
+ ] }) });
71
+ }
72
+ export {
73
+ Toast,
74
+ toastIconContainerVariants,
75
+ toastVariants
76
+ };
77
+ //# sourceMappingURL=Toast.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/Toast.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { CheckCircle, XCircle, AlertCircle, Info, Circle, X } from \"lucide-react\"\nimport { toast } from \"sonner\"\nimport { cn } from \"../../../infra/utils/clsx\"\nimport { Button } from \"../buttons/Button\"\n\nconst toastVariants = cva(\n \"w-full bg-white rounded-lg p-4 shadow-lg backdrop-blur-sm transition-all\",\n {\n variants: {\n variant: {\n success: \"\",\n error: \"\",\n warning: \"\",\n info: \"\",\n default: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst toastIconContainerVariants = cva(\n \"size-10 rounded-lg flex items-center justify-center shrink-0\",\n {\n variants: {\n variant: {\n success: \"bg-green-50 text-green-500\",\n error: \"bg-red-50 text-red-500\",\n warning: \"bg-yellow-50 text-yellow-400\",\n info: \"bg-pages-50 text-pages-500\",\n default: \"bg-gray-50 text-gray-950\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst TOAST_ICONS = {\n success: CheckCircle,\n error: XCircle,\n warning: AlertCircle,\n info: Info,\n default: Circle,\n} as const\n\ninterface ToastProps extends VariantProps<typeof toastIconContainerVariants> {\n message?: React.ReactNode\n icon?: React.ReactNode\n children?: React.ReactNode\n className?: string\n toastId?: string | number\n}\n\nfunction Toast({\n variant = \"default\",\n message,\n icon,\n children,\n className,\n toastId,\n}: ToastProps) {\n const Icon = variant ? TOAST_ICONS[variant] : null\n\n return (\n <div data-slot=\"toast\" className={cn(toastVariants({ variant }), className, \"md:min-w-[310px] lg:min-w-[310px]\")}>\n {children ? (\n children\n ) : (\n <div className=\"flex items-center gap-3 flex-1 min-w-0\">\n <div className={cn(toastIconContainerVariants({ variant }))}>\n {icon || (Icon && <Icon size={16} />)}\n </div>\n\n <span className=\"w-full text-gray-600 paragraph-small-medium\">\n {message}\n </span>\n <Button\n variant={\"ghost\"}\n className=\"size-8 rounded-full\"\n onClick={() => toastId && toast.dismiss(toastId)}\n >\n <X size={18} />\n </Button>\n </div>\n )}\n </div>\n )\n}\n\nexport { Toast, toastVariants, toastIconContainerVariants }\nexport type { ToastProps }\n"],"mappings":";AA8EQ,SAEsB,KAFtB;AAzER,SAAS,WAA8B;AACvC,SAAS,aAAa,SAAS,aAAa,MAAM,QAAQ,SAAS;AACnE,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB,SAAS,cAAc;AAEvB,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,OAAO;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,MAAM,6BAA6B;AAAA,EACjC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,OAAO;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,MAAM,cAAc;AAAA,EAClB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AACX;AAUA,SAAS,MAAM;AAAA,EACb,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAe;AACb,QAAM,OAAO,UAAU,YAAY,OAAO,IAAI;AAE9C,SACE,oBAAC,SAAI,aAAU,SAAQ,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,WAAW,mCAAmC,GAC5G,qBACC,WAEA,qBAAC,SAAI,WAAU,0CACb;AAAA,wBAAC,SAAI,WAAW,GAAG,2BAA2B,EAAE,QAAQ,CAAC,CAAC,GACvD,kBAAS,QAAQ,oBAAC,QAAK,MAAM,IAAI,GACpC;AAAA,IAEA,oBAAC,UAAK,WAAU,+CACb,mBACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAU;AAAA,QACV,SAAS,MAAM,WAAW,MAAM,QAAQ,OAAO;AAAA,QAE/C,8BAAC,KAAE,MAAM,IAAI;AAAA;AAAA,IACf;AAAA,KACF,GAEJ;AAEJ;","names":[]}