@greatapps/common 1.1.429 → 1.1.430

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 (477) 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 +129 -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 +182 -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 +91 -0
  24. package/dist/components/account/hooks/useChangePhoneForm.mjs.map +1 -0
  25. package/dist/components/account/hooks/useConfigurationsModal.mjs +34 -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 +181 -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 +192 -0
  38. package/dist/components/account/sections/ChangePhoneModal.mjs.map +1 -0
  39. package/dist/components/account/sections/MyProfileSection.mjs +317 -0
  40. package/dist/components/account/sections/MyProfileSection.mjs.map +1 -0
  41. package/dist/components/account/sections/PreferencesSection.mjs +227 -0
  42. package/dist/components/account/sections/PreferencesSection.mjs.map +1 -0
  43. package/dist/components/account/sections/SecuritySection.mjs +31 -0
  44. package/dist/components/account/sections/SecuritySection.mjs.map +1 -0
  45. package/dist/components/embeds/CrispEmbed.mjs +89 -0
  46. package/dist/components/embeds/CrispEmbed.mjs.map +1 -0
  47. package/dist/components/embeds/FrillEmbed.mjs +107 -0
  48. package/dist/components/embeds/FrillEmbed.mjs.map +1 -0
  49. package/dist/components/handlers/SearchParamsHandler.mjs +24 -0
  50. package/dist/components/handlers/SearchParamsHandler.mjs.map +1 -0
  51. package/dist/components/layouts/AppMobileNavBar.mjs +60 -0
  52. package/dist/components/layouts/AppMobileNavBar.mjs.map +1 -0
  53. package/dist/components/layouts/AppNavBar.mjs +37 -0
  54. package/dist/components/layouts/AppNavBar.mjs.map +1 -0
  55. package/dist/components/layouts/CollapsibleSidebar.mjs +65 -0
  56. package/dist/components/layouts/CollapsibleSidebar.mjs.map +1 -0
  57. package/dist/components/layouts/MainLayout.mjs +60 -0
  58. package/dist/components/layouts/MainLayout.mjs.map +1 -0
  59. package/dist/components/layouts/MdSideBarNavigation.mjs +54 -0
  60. package/dist/components/layouts/MdSideBarNavigation.mjs.map +1 -0
  61. package/dist/components/layouts/NavBar.mjs +152 -0
  62. package/dist/components/layouts/NavBar.mjs.map +1 -0
  63. package/dist/components/layouts/NavBarItem.mjs +23 -0
  64. package/dist/components/layouts/NavBarItem.mjs.map +1 -0
  65. package/dist/components/layouts/NotificationsPopover.mjs +97 -0
  66. package/dist/components/layouts/NotificationsPopover.mjs.map +1 -0
  67. package/dist/components/layouts/ProfilePopover.mjs +152 -0
  68. package/dist/components/layouts/ProfilePopover.mjs.map +1 -0
  69. package/dist/components/layouts/SideBarNavigation.mjs +63 -0
  70. package/dist/components/layouts/SideBarNavigation.mjs.map +1 -0
  71. package/dist/components/layouts/UsersSelectorPopover.mjs +210 -0
  72. package/dist/components/layouts/UsersSelectorPopover.mjs.map +1 -0
  73. package/dist/components/layouts/WhitelabelCodes.mjs +50 -0
  74. package/dist/components/layouts/WhitelabelCodes.mjs.map +1 -0
  75. package/dist/components/modals/BuyCreditsModal.mjs +281 -0
  76. package/dist/components/modals/BuyCreditsModal.mjs.map +1 -0
  77. package/dist/components/modals/ModalManager.mjs +19 -0
  78. package/dist/components/modals/ModalManager.mjs.map +1 -0
  79. package/dist/components/modals/Modals.mjs +20 -0
  80. package/dist/components/modals/Modals.mjs.map +1 -0
  81. package/dist/components/modals/PaidPlanRequiredModal.mjs +46 -0
  82. package/dist/components/modals/PaidPlanRequiredModal.mjs.map +1 -0
  83. package/dist/components/modals/cards/AddCardModal.mjs +215 -0
  84. package/dist/components/modals/cards/AddCardModal.mjs.map +1 -0
  85. package/dist/components/modals/cards/CardFormFields.mjs +268 -0
  86. package/dist/components/modals/cards/CardFormFields.mjs.map +1 -0
  87. package/dist/components/navigation/AppNavigation.mjs +33 -0
  88. package/dist/components/navigation/AppNavigation.mjs.map +1 -0
  89. package/dist/components/navigation/AppNavigationContext.mjs +13 -0
  90. package/dist/components/navigation/AppNavigationContext.mjs.map +1 -0
  91. package/dist/components/navigation/CancelledSubscriptionBanner.mjs +52 -0
  92. package/dist/components/navigation/CancelledSubscriptionBanner.mjs.map +1 -0
  93. package/dist/components/navigation/NavItem.mjs +41 -0
  94. package/dist/components/navigation/NavItem.mjs.map +1 -0
  95. package/dist/components/navigation/NavItemsContext.mjs +16 -0
  96. package/dist/components/navigation/NavItemsContext.mjs.map +1 -0
  97. package/dist/components/navigation/ProjectSelectorPopover.mjs +147 -0
  98. package/dist/components/navigation/ProjectSelectorPopover.mjs.map +1 -0
  99. package/dist/components/navigation/shells/DesktopShell.mjs +11 -0
  100. package/dist/components/navigation/shells/DesktopShell.mjs.map +1 -0
  101. package/dist/components/navigation/shells/MdShell.mjs +11 -0
  102. package/dist/components/navigation/shells/MdShell.mjs.map +1 -0
  103. package/dist/components/navigation/shells/MobileShell.mjs +27 -0
  104. package/dist/components/navigation/shells/MobileShell.mjs.map +1 -0
  105. package/dist/components/navigation/shells/TabsMobileShell.mjs +61 -0
  106. package/dist/components/navigation/shells/TabsMobileShell.mjs.map +1 -0
  107. package/dist/components/navigation/subcomponents/BottomLinks.mjs +35 -0
  108. package/dist/components/navigation/subcomponents/BottomLinks.mjs.map +1 -0
  109. package/dist/components/navigation/subcomponents/CreditsCard.mjs +33 -0
  110. package/dist/components/navigation/subcomponents/CreditsCard.mjs.map +1 -0
  111. package/dist/components/navigation/subcomponents/NavItems.mjs +25 -0
  112. package/dist/components/navigation/subcomponents/NavItems.mjs.map +1 -0
  113. package/dist/components/navigation/subcomponents/PlanCard.mjs +25 -0
  114. package/dist/components/navigation/subcomponents/PlanCard.mjs.map +1 -0
  115. package/dist/components/navigation/subcomponents/ProjectSelector.mjs +145 -0
  116. package/dist/components/navigation/subcomponents/ProjectSelector.mjs.map +1 -0
  117. package/dist/components/navigation/types.mjs +1 -0
  118. package/dist/components/navigation/types.mjs.map +1 -0
  119. package/dist/components/pages/NotFoundPage.mjs +47 -0
  120. package/dist/components/pages/NotFoundPage.mjs.map +1 -0
  121. package/dist/components/pages/notifications/Notifications.mjs +159 -0
  122. package/dist/components/pages/notifications/Notifications.mjs.map +1 -0
  123. package/dist/components/ui/buttons/Button.mjs +52 -0
  124. package/dist/components/ui/buttons/Button.mjs.map +1 -0
  125. package/dist/components/ui/buttons/CancelButton.mjs +17 -0
  126. package/dist/components/ui/buttons/CancelButton.mjs.map +1 -0
  127. package/dist/components/ui/buttons/CopyButton.mjs +42 -0
  128. package/dist/components/ui/buttons/CopyButton.mjs.map +1 -0
  129. package/dist/components/ui/data-display/Accordion.mjs +76 -0
  130. package/dist/components/ui/data-display/Accordion.mjs.map +1 -0
  131. package/dist/components/ui/data-display/Badge.mjs +42 -0
  132. package/dist/components/ui/data-display/Badge.mjs.map +1 -0
  133. package/dist/components/ui/data-display/Card.mjs +92 -0
  134. package/dist/components/ui/data-display/Card.mjs.map +1 -0
  135. package/dist/components/ui/data-display/CardBrandIcons.mjs +484 -0
  136. package/dist/components/ui/data-display/CardBrandIcons.mjs.map +1 -0
  137. package/dist/components/ui/data-display/CardItem.mjs +67 -0
  138. package/dist/components/ui/data-display/CardItem.mjs.map +1 -0
  139. package/dist/components/ui/data-display/Pagination.mjs +118 -0
  140. package/dist/components/ui/data-display/Pagination.mjs.map +1 -0
  141. package/dist/components/ui/data-display/PaymentInfoCard.mjs +161 -0
  142. package/dist/components/ui/data-display/PaymentInfoCard.mjs.map +1 -0
  143. package/dist/components/ui/data-display/ScrollArea.mjs +62 -0
  144. package/dist/components/ui/data-display/ScrollArea.mjs.map +1 -0
  145. package/dist/components/ui/data-display/Separator.mjs +28 -0
  146. package/dist/components/ui/data-display/Separator.mjs.map +1 -0
  147. package/dist/components/ui/data-display/Table.mjs +116 -0
  148. package/dist/components/ui/data-display/Table.mjs.map +1 -0
  149. package/dist/components/ui/data-display/Tabs.mjs +69 -0
  150. package/dist/components/ui/data-display/Tabs.mjs.map +1 -0
  151. package/dist/components/ui/data-display/UserAvatar.mjs +49 -0
  152. package/dist/components/ui/data-display/UserAvatar.mjs.map +1 -0
  153. package/dist/components/ui/feedback/CircularProgress.mjs +71 -0
  154. package/dist/components/ui/feedback/CircularProgress.mjs.map +1 -0
  155. package/dist/components/ui/feedback/DefaultCircularProgress.mjs +63 -0
  156. package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +1 -0
  157. package/dist/components/ui/feedback/LoadingOverlay.mjs +19 -0
  158. package/dist/components/ui/feedback/LoadingOverlay.mjs.map +1 -0
  159. package/dist/components/ui/feedback/Progress.mjs +37 -0
  160. package/dist/components/ui/feedback/Progress.mjs.map +1 -0
  161. package/dist/components/ui/feedback/Skeleton.mjs +9 -0
  162. package/dist/components/ui/feedback/Skeleton.mjs.map +1 -0
  163. package/dist/components/ui/feedback/Toast.mjs +77 -0
  164. package/dist/components/ui/feedback/Toast.mjs.map +1 -0
  165. package/dist/components/ui/form/Calendar.mjs +204 -0
  166. package/dist/components/ui/form/Calendar.mjs.map +1 -0
  167. package/dist/components/ui/form/Checkbox.mjs +33 -0
  168. package/dist/components/ui/form/Checkbox.mjs.map +1 -0
  169. package/dist/components/ui/form/ComboboxField.mjs +130 -0
  170. package/dist/components/ui/form/ComboboxField.mjs.map +1 -0
  171. package/dist/components/ui/form/DatePicker.mjs +82 -0
  172. package/dist/components/ui/form/DatePicker.mjs.map +1 -0
  173. package/dist/components/ui/form/DateRangePicker.mjs +92 -0
  174. package/dist/components/ui/form/DateRangePicker.mjs.map +1 -0
  175. package/dist/components/ui/form/FormField.mjs +103 -0
  176. package/dist/components/ui/form/FormField.mjs.map +1 -0
  177. package/dist/components/ui/form/Input.mjs +21 -0
  178. package/dist/components/ui/form/Input.mjs.map +1 -0
  179. package/dist/components/ui/form/InputOtp.mjs +70 -0
  180. package/dist/components/ui/form/InputOtp.mjs.map +1 -0
  181. package/dist/components/ui/form/PhoneInput.mjs +176 -0
  182. package/dist/components/ui/form/PhoneInput.mjs.map +1 -0
  183. package/dist/components/ui/form/RadioGroup.mjs +37 -0
  184. package/dist/components/ui/form/RadioGroup.mjs.map +1 -0
  185. package/dist/components/ui/form/Select.mjs +179 -0
  186. package/dist/components/ui/form/Select.mjs.map +1 -0
  187. package/dist/components/ui/form/SelectField.mjs +80 -0
  188. package/dist/components/ui/form/SelectField.mjs.map +1 -0
  189. package/dist/components/ui/form/Switch.mjs +33 -0
  190. package/dist/components/ui/form/Switch.mjs.map +1 -0
  191. package/dist/components/ui/form/SwitchOptionFieldWithIcon.mjs +40 -0
  192. package/dist/components/ui/form/SwitchOptionFieldWithIcon.mjs.map +1 -0
  193. package/dist/components/ui/form/TextAreaField.mjs +56 -0
  194. package/dist/components/ui/form/TextAreaField.mjs.map +1 -0
  195. package/dist/components/ui/form/Textarea.mjs +20 -0
  196. package/dist/components/ui/form/Textarea.mjs.map +1 -0
  197. package/dist/components/ui/overlay/Command.mjs +178 -0
  198. package/dist/components/ui/overlay/Command.mjs.map +1 -0
  199. package/dist/components/ui/overlay/Dialog.mjs +142 -0
  200. package/dist/components/ui/overlay/Dialog.mjs.map +1 -0
  201. package/dist/components/ui/overlay/Popover.mjs +46 -0
  202. package/dist/components/ui/overlay/Popover.mjs.map +1 -0
  203. package/dist/components/ui/overlay/Sheet.mjs +149 -0
  204. package/dist/components/ui/overlay/Sheet.mjs.map +1 -0
  205. package/dist/components/ui/overlay/Tooltip.mjs +57 -0
  206. package/dist/components/ui/overlay/Tooltip.mjs.map +1 -0
  207. package/dist/components/widgets/notifications/NotificationCard.mjs +54 -0
  208. package/dist/components/widgets/notifications/NotificationCard.mjs.map +1 -0
  209. package/dist/enums/AccountSectionType.mjs +11 -0
  210. package/dist/enums/AccountSectionType.mjs.map +1 -0
  211. package/dist/hooks/copy-to-clipboard.hook.mjs +52 -0
  212. package/dist/hooks/copy-to-clipboard.hook.mjs.map +1 -0
  213. package/dist/hooks/useCountdownTimer.mjs +29 -0
  214. package/dist/hooks/useCountdownTimer.mjs.map +1 -0
  215. package/dist/hooks/useDebounce.mjs +19 -0
  216. package/dist/hooks/useDebounce.mjs.map +1 -0
  217. package/dist/hooks/useDebounceState.mjs +12 -0
  218. package/dist/hooks/useDebounceState.mjs.map +1 -0
  219. package/dist/hooks/useDebouncedEffect.mjs +44 -0
  220. package/dist/hooks/useDebouncedEffect.mjs.map +1 -0
  221. package/dist/hooks/useIsMobile.mjs +18 -0
  222. package/dist/hooks/useIsMobile.mjs.map +1 -0
  223. package/dist/hooks/usePasswordVisibility.mjs +13 -0
  224. package/dist/hooks/usePasswordVisibility.mjs.map +1 -0
  225. package/dist/index.mjs +528 -0
  226. package/dist/index.mjs.map +1 -0
  227. package/dist/infra/api/client.mjs +162 -0
  228. package/dist/infra/api/client.mjs.map +1 -0
  229. package/dist/infra/api/types.mjs +31 -0
  230. package/dist/infra/api/types.mjs.map +1 -0
  231. package/dist/infra/utils/client-info.mjs +27 -0
  232. package/dist/infra/utils/client-info.mjs.map +1 -0
  233. package/dist/infra/utils/clsx.mjs +9 -0
  234. package/dist/infra/utils/clsx.mjs.map +1 -0
  235. package/dist/infra/utils/date.mjs +11 -0
  236. package/dist/infra/utils/date.mjs.map +1 -0
  237. package/dist/infra/utils/params.mjs +21 -0
  238. package/dist/infra/utils/params.mjs.map +1 -0
  239. package/dist/infra/utils/parser.mjs +24 -0
  240. package/dist/infra/utils/parser.mjs.map +1 -0
  241. package/dist/infra/utils/percentage.mjs +20 -0
  242. package/dist/infra/utils/percentage.mjs.map +1 -0
  243. package/dist/middleware.mjs +10 -0
  244. package/dist/middleware.mjs.map +1 -0
  245. package/dist/middlewares/chain.mjs +37 -0
  246. package/dist/middlewares/chain.mjs.map +1 -0
  247. package/dist/middlewares/create-auth-middleware.mjs +32 -0
  248. package/dist/middlewares/create-auth-middleware.mjs.map +1 -0
  249. package/dist/middlewares/types.mjs +11 -0
  250. package/dist/middlewares/types.mjs.map +1 -0
  251. package/dist/modules/accounts/actions/account-management.action.mjs +98 -0
  252. package/dist/modules/accounts/actions/account-management.action.mjs.map +1 -0
  253. package/dist/modules/accounts/actions/find-current-account.action.mjs +10 -0
  254. package/dist/modules/accounts/actions/find-current-account.action.mjs.map +1 -0
  255. package/dist/modules/accounts/actions/list-currencies.action.mjs +10 -0
  256. package/dist/modules/accounts/actions/list-currencies.action.mjs.map +1 -0
  257. package/dist/modules/accounts/actions/list-timezones.action.mjs +10 -0
  258. package/dist/modules/accounts/actions/list-timezones.action.mjs.map +1 -0
  259. package/dist/modules/accounts/hooks/current-account.hook.mjs +24 -0
  260. package/dist/modules/accounts/hooks/current-account.hook.mjs.map +1 -0
  261. package/dist/modules/accounts/hooks/useAccountManagement.mjs +71 -0
  262. package/dist/modules/accounts/hooks/useAccountManagement.mjs.map +1 -0
  263. package/dist/modules/accounts/hooks/useCurrencies.mjs +17 -0
  264. package/dist/modules/accounts/hooks/useCurrencies.mjs.map +1 -0
  265. package/dist/modules/accounts/hooks/useTimezones.mjs +17 -0
  266. package/dist/modules/accounts/hooks/useTimezones.mjs.map +1 -0
  267. package/dist/modules/accounts/hooks/useViaCep.mjs +19 -0
  268. package/dist/modules/accounts/hooks/useViaCep.mjs.map +1 -0
  269. package/dist/modules/accounts/services/account.service.mjs +182 -0
  270. package/dist/modules/accounts/services/account.service.mjs.map +1 -0
  271. package/dist/modules/accounts/services/currency.service.mjs +24 -0
  272. package/dist/modules/accounts/services/currency.service.mjs.map +1 -0
  273. package/dist/modules/accounts/services/timezone.service.mjs +65 -0
  274. package/dist/modules/accounts/services/timezone.service.mjs.map +1 -0
  275. package/dist/modules/accounts/services/two-factor.service.mjs +78 -0
  276. package/dist/modules/accounts/services/two-factor.service.mjs.map +1 -0
  277. package/dist/modules/accounts/types.mjs +1 -0
  278. package/dist/modules/accounts/types.mjs.map +1 -0
  279. package/dist/modules/auth/actions/login.action.mjs +14 -0
  280. package/dist/modules/auth/actions/login.action.mjs.map +1 -0
  281. package/dist/modules/auth/actions/logout.action.mjs +14 -0
  282. package/dist/modules/auth/actions/logout.action.mjs.map +1 -0
  283. package/dist/modules/auth/actions/register.action.mjs +14 -0
  284. package/dist/modules/auth/actions/register.action.mjs.map +1 -0
  285. package/dist/modules/auth/actions/validate-session.action.mjs +48 -0
  286. package/dist/modules/auth/actions/validate-session.action.mjs.map +1 -0
  287. package/dist/modules/auth/actions/verify-two-factor.action.mjs +17 -0
  288. package/dist/modules/auth/actions/verify-two-factor.action.mjs.map +1 -0
  289. package/dist/modules/auth/hooks/login.hook.mjs +13 -0
  290. package/dist/modules/auth/hooks/login.hook.mjs.map +1 -0
  291. package/dist/modules/auth/hooks/logout.hook.mjs +13 -0
  292. package/dist/modules/auth/hooks/logout.hook.mjs.map +1 -0
  293. package/dist/modules/auth/hooks/register.hook.mjs +13 -0
  294. package/dist/modules/auth/hooks/register.hook.mjs.map +1 -0
  295. package/dist/modules/auth/hooks/useManagementPermissions.mjs +41 -0
  296. package/dist/modules/auth/hooks/useManagementPermissions.mjs.map +1 -0
  297. package/dist/modules/auth/hooks/useUserQuery.mjs +63 -0
  298. package/dist/modules/auth/hooks/useUserQuery.mjs.map +1 -0
  299. package/dist/modules/auth/schema.mjs +1 -0
  300. package/dist/modules/auth/schema.mjs.map +1 -0
  301. package/dist/modules/auth/services/auth.service.mjs +341 -0
  302. package/dist/modules/auth/services/auth.service.mjs.map +1 -0
  303. package/dist/modules/auth/types/management-permission.type.mjs +1 -0
  304. package/dist/modules/auth/types/management-permission.type.mjs.map +1 -0
  305. package/dist/modules/auth/utils/assert-management-permission.mjs +42 -0
  306. package/dist/modules/auth/utils/assert-management-permission.mjs.map +1 -0
  307. package/dist/modules/auth/utils/assert-management-subscription.mjs +33 -0
  308. package/dist/modules/auth/utils/assert-management-subscription.mjs.map +1 -0
  309. package/dist/modules/auth/utils/assert-paid-subscription.mjs +40 -0
  310. package/dist/modules/auth/utils/assert-paid-subscription.mjs.map +1 -0
  311. package/dist/modules/auth/utils/assert-subscription-addon.mjs +35 -0
  312. package/dist/modules/auth/utils/assert-subscription-addon.mjs.map +1 -0
  313. package/dist/modules/auth/utils/build-wl-override.mjs +27 -0
  314. package/dist/modules/auth/utils/build-wl-override.mjs.map +1 -0
  315. package/dist/modules/auth/utils/get-user-context.mjs +25 -0
  316. package/dist/modules/auth/utils/get-user-context.mjs.map +1 -0
  317. package/dist/modules/cards/actions/create-card.action.mjs +10 -0
  318. package/dist/modules/cards/actions/create-card.action.mjs.map +1 -0
  319. package/dist/modules/cards/actions/list-cards.action.mjs +10 -0
  320. package/dist/modules/cards/actions/list-cards.action.mjs.map +1 -0
  321. package/dist/modules/cards/hooks/cards.hook.mjs +16 -0
  322. package/dist/modules/cards/hooks/cards.hook.mjs.map +1 -0
  323. package/dist/modules/cards/hooks/create-card.hook.mjs +18 -0
  324. package/dist/modules/cards/hooks/create-card.hook.mjs.map +1 -0
  325. package/dist/modules/cards/services/cards.service.mjs +44 -0
  326. package/dist/modules/cards/services/cards.service.mjs.map +1 -0
  327. package/dist/modules/cards/types.mjs +27 -0
  328. package/dist/modules/cards/types.mjs.map +1 -0
  329. package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs +10 -0
  330. package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs.map +1 -0
  331. package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs +76 -0
  332. package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs.map +1 -0
  333. package/dist/modules/ia-credits/services/ia-credits.service.mjs +31 -0
  334. package/dist/modules/ia-credits/services/ia-credits.service.mjs.map +1 -0
  335. package/dist/modules/ia-credits/types.mjs +25 -0
  336. package/dist/modules/ia-credits/types.mjs.map +1 -0
  337. package/dist/modules/plans/actions/find-plan-by-id.action.mjs +10 -0
  338. package/dist/modules/plans/actions/find-plan-by-id.action.mjs.map +1 -0
  339. package/dist/modules/plans/hooks/use-has-plan-addon.hook.mjs +13 -0
  340. package/dist/modules/plans/hooks/use-has-plan-addon.hook.mjs.map +1 -0
  341. package/dist/modules/plans/hooks/use-plan-by-id.hook.mjs +15 -0
  342. package/dist/modules/plans/hooks/use-plan-by-id.hook.mjs.map +1 -0
  343. package/dist/modules/plans/services/plans.service.mjs +34 -0
  344. package/dist/modules/plans/services/plans.service.mjs.map +1 -0
  345. package/dist/modules/plans/types/plan.type.mjs +20 -0
  346. package/dist/modules/plans/types/plan.type.mjs.map +1 -0
  347. package/dist/modules/projects/actions/add-project-user.action.mjs +10 -0
  348. package/dist/modules/projects/actions/add-project-user.action.mjs.map +1 -0
  349. package/dist/modules/projects/actions/list-all-account-users.action.mjs +10 -0
  350. package/dist/modules/projects/actions/list-all-account-users.action.mjs.map +1 -0
  351. package/dist/modules/projects/actions/list-available-users.action.mjs +10 -0
  352. package/dist/modules/projects/actions/list-available-users.action.mjs.map +1 -0
  353. package/dist/modules/projects/actions/list-project-users.action.mjs +10 -0
  354. package/dist/modules/projects/actions/list-project-users.action.mjs.map +1 -0
  355. package/dist/modules/projects/actions/remove-project-user.action.mjs +10 -0
  356. package/dist/modules/projects/actions/remove-project-user.action.mjs.map +1 -0
  357. package/dist/modules/projects/hooks/add-project-user.hook.mjs +61 -0
  358. package/dist/modules/projects/hooks/add-project-user.hook.mjs.map +1 -0
  359. package/dist/modules/projects/hooks/list-all-account-users.hook.mjs +35 -0
  360. package/dist/modules/projects/hooks/list-all-account-users.hook.mjs.map +1 -0
  361. package/dist/modules/projects/hooks/list-available-users.hook.mjs +34 -0
  362. package/dist/modules/projects/hooks/list-available-users.hook.mjs.map +1 -0
  363. package/dist/modules/projects/hooks/list-project-users.hook.mjs +34 -0
  364. package/dist/modules/projects/hooks/list-project-users.hook.mjs.map +1 -0
  365. package/dist/modules/projects/hooks/remove-project-user.hook.mjs +61 -0
  366. package/dist/modules/projects/hooks/remove-project-user.hook.mjs.map +1 -0
  367. package/dist/modules/projects/services/project-users.service.mjs +96 -0
  368. package/dist/modules/projects/services/project-users.service.mjs.map +1 -0
  369. package/dist/modules/projects/types.mjs +23 -0
  370. package/dist/modules/projects/types.mjs.map +1 -0
  371. package/dist/modules/subscriptions/actions/calculate-subscription.action.mjs +10 -0
  372. package/dist/modules/subscriptions/actions/calculate-subscription.action.mjs.map +1 -0
  373. package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs +10 -0
  374. package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs.map +1 -0
  375. package/dist/modules/subscriptions/actions/update-subscription-plan.action.mjs +12 -0
  376. package/dist/modules/subscriptions/actions/update-subscription-plan.action.mjs.map +1 -0
  377. package/dist/modules/subscriptions/constants/addons.constants.mjs +24 -0
  378. package/dist/modules/subscriptions/constants/addons.constants.mjs.map +1 -0
  379. package/dist/modules/subscriptions/constants/query-keys.constants.mjs +5 -0
  380. package/dist/modules/subscriptions/constants/query-keys.constants.mjs.map +1 -0
  381. package/dist/modules/subscriptions/hooks/calculate-subscription.hook.mjs +13 -0
  382. package/dist/modules/subscriptions/hooks/calculate-subscription.hook.mjs.map +1 -0
  383. package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs +17 -0
  384. package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs.map +1 -0
  385. package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs +17 -0
  386. package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs.map +1 -0
  387. package/dist/modules/subscriptions/hooks/update-subscription-plan.hook.mjs +22 -0
  388. package/dist/modules/subscriptions/hooks/update-subscription-plan.hook.mjs.map +1 -0
  389. package/dist/modules/subscriptions/hooks/use-cancelled-subscription-guard.mjs +37 -0
  390. package/dist/modules/subscriptions/hooks/use-cancelled-subscription-guard.mjs.map +1 -0
  391. package/dist/modules/subscriptions/services/subscriptions.service.mjs +75 -0
  392. package/dist/modules/subscriptions/services/subscriptions.service.mjs.map +1 -0
  393. package/dist/modules/subscriptions/types/billing-period.type.mjs +1 -0
  394. package/dist/modules/subscriptions/types/billing-period.type.mjs.map +1 -0
  395. package/dist/modules/subscriptions/types/calculate-subscription.type.mjs +72 -0
  396. package/dist/modules/subscriptions/types/calculate-subscription.type.mjs.map +1 -0
  397. package/dist/modules/subscriptions/types/subscription.type.mjs +57 -0
  398. package/dist/modules/subscriptions/types/subscription.type.mjs.map +1 -0
  399. package/dist/modules/subscriptions/utils/build-plan-extras.mjs +37 -0
  400. package/dist/modules/subscriptions/utils/build-plan-extras.mjs.map +1 -0
  401. package/dist/modules/subscriptions/utils/has-subscription-expired.mjs +10 -0
  402. package/dist/modules/subscriptions/utils/has-subscription-expired.mjs.map +1 -0
  403. package/dist/modules/subscriptions/utils/periodicity.mjs +48 -0
  404. package/dist/modules/subscriptions/utils/periodicity.mjs.map +1 -0
  405. package/dist/modules/subscriptions/utils/resolve-plan-extras-prices.mjs +14 -0
  406. package/dist/modules/subscriptions/utils/resolve-plan-extras-prices.mjs.map +1 -0
  407. package/dist/modules/users/action/find-user-by-id.action.mjs +10 -0
  408. package/dist/modules/users/action/find-user-by-id.action.mjs.map +1 -0
  409. package/dist/modules/users/action/list-messages.action.mjs +13 -0
  410. package/dist/modules/users/action/list-messages.action.mjs.map +1 -0
  411. package/dist/modules/users/action/mark-all-messages-as-read.action.mjs +10 -0
  412. package/dist/modules/users/action/mark-all-messages-as-read.action.mjs.map +1 -0
  413. package/dist/modules/users/action/mark-message-as-read.action.mjs +10 -0
  414. package/dist/modules/users/action/mark-message-as-read.action.mjs.map +1 -0
  415. package/dist/modules/users/hooks/messages.hook.mjs +57 -0
  416. package/dist/modules/users/hooks/messages.hook.mjs.map +1 -0
  417. package/dist/modules/users/schema/messages.schema.mjs +21 -0
  418. package/dist/modules/users/schema/messages.schema.mjs.map +1 -0
  419. package/dist/modules/users/schema.mjs +11 -0
  420. package/dist/modules/users/schema.mjs.map +1 -0
  421. package/dist/modules/users/services/messages.service.mjs +35 -0
  422. package/dist/modules/users/services/messages.service.mjs.map +1 -0
  423. package/dist/modules/users/services/user.service.mjs +52 -0
  424. package/dist/modules/users/services/user.service.mjs.map +1 -0
  425. package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs +21 -0
  426. package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs.map +1 -0
  427. package/dist/modules/whitelabel/actions/revalidate-whitelabel.action.mjs +19 -0
  428. package/dist/modules/whitelabel/actions/revalidate-whitelabel.action.mjs.map +1 -0
  429. package/dist/modules/whitelabel/schema.mjs +1 -0
  430. package/dist/modules/whitelabel/schema.mjs.map +1 -0
  431. package/dist/modules/whitelabel/services/whitelabel.service.mjs +146 -0
  432. package/dist/modules/whitelabel/services/whitelabel.service.mjs.map +1 -0
  433. package/dist/modules/whitelabel/utils/normalize-hostname.mjs +35 -0
  434. package/dist/modules/whitelabel/utils/normalize-hostname.mjs.map +1 -0
  435. package/dist/providers/auth.provider.mjs +114 -0
  436. package/dist/providers/auth.provider.mjs.map +1 -0
  437. package/dist/providers/query.provider.mjs +99 -0
  438. package/dist/providers/query.provider.mjs.map +1 -0
  439. package/dist/providers/whitelabel.provider.mjs +42 -0
  440. package/dist/providers/whitelabel.provider.mjs.map +1 -0
  441. package/dist/server.mjs +111 -0
  442. package/dist/server.mjs.map +1 -0
  443. package/dist/store/useAccountModals.mjs +18 -0
  444. package/dist/store/useAccountModals.mjs.map +1 -0
  445. package/dist/store/useBuyCreditsModal.mjs +16 -0
  446. package/dist/store/useBuyCreditsModal.mjs.map +1 -0
  447. package/dist/store/useDesktopSidebarStore.mjs +39 -0
  448. package/dist/store/useDesktopSidebarStore.mjs.map +1 -0
  449. package/dist/store/useMdSidebarStore.mjs +28 -0
  450. package/dist/store/useMdSidebarStore.mjs.map +1 -0
  451. package/dist/store/useMobileNavbarSheet.mjs +14 -0
  452. package/dist/store/useMobileNavbarSheet.mjs.map +1 -0
  453. package/dist/store/useModalManager.mjs +75 -0
  454. package/dist/store/useModalManager.mjs.map +1 -0
  455. package/dist/store/usePaidPlanRequiredModal.mjs +14 -0
  456. package/dist/store/usePaidPlanRequiredModal.mjs.map +1 -0
  457. package/dist/utils/browser/clipboard.mjs +36 -0
  458. package/dist/utils/browser/clipboard.mjs.map +1 -0
  459. package/dist/utils/constants/br-states.mjs +33 -0
  460. package/dist/utils/constants/br-states.mjs.map +1 -0
  461. package/dist/utils/countries.mjs +219 -0
  462. package/dist/utils/countries.mjs.map +1 -0
  463. package/dist/utils/file/index.mjs +9 -0
  464. package/dist/utils/file/index.mjs.map +1 -0
  465. package/dist/utils/format/masks.mjs +67 -0
  466. package/dist/utils/format/masks.mjs.map +1 -0
  467. package/dist/utils/intl/locales.mjs +12 -0
  468. package/dist/utils/intl/locales.mjs.map +1 -0
  469. package/dist/utils/safeServerAction.mjs +16 -0
  470. package/dist/utils/safeServerAction.mjs.map +1 -0
  471. package/dist/utils/validators/account.mjs +27 -0
  472. package/dist/utils/validators/account.mjs.map +1 -0
  473. package/dist/utils/validators/common.mjs +47 -0
  474. package/dist/utils/validators/common.mjs.map +1 -0
  475. package/dist/utils/withAction.mjs +13 -0
  476. package/dist/utils/withAction.mjs.map +1 -0
  477. package/package.json +1 -1
@@ -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,63 @@
1
+ import { jsx, jsxs } 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__ */ jsxs("svg", { width: size, height: size, className: "absolute", children: [
29
+ /* @__PURE__ */ jsx(
30
+ "circle",
31
+ {
32
+ cx: size / 2,
33
+ cy: size / 2,
34
+ r: radius,
35
+ stroke: "var(--color-zinc-200)",
36
+ strokeWidth,
37
+ fill: "none"
38
+ }
39
+ ),
40
+ /* @__PURE__ */ jsx(
41
+ "circle",
42
+ {
43
+ cx: size / 2,
44
+ cy: size / 2,
45
+ r: radius,
46
+ stroke: "var(--color-cyan-300)",
47
+ strokeWidth,
48
+ fill: "none",
49
+ strokeDasharray: circumference,
50
+ strokeDashoffset: offset,
51
+ strokeLinecap: "round",
52
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
53
+ className: "transition-all duration-300 ease-in-out"
54
+ }
55
+ )
56
+ ] })
57
+ }
58
+ );
59
+ }
60
+ export {
61
+ DefaultCircularProgress as default
62
+ };
63
+ //# 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-zinc-200)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-cyan-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":"AAmCM,SACE,KADF;AAnCN;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,+BAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,WAAU,YACxC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,OAAO;AAAA,YACX,IAAI,OAAO;AAAA,YACX,GAAG;AAAA,YACH,QAAO;AAAA,YACP;AAAA,YACA,MAAK;AAAA;AAAA,QACP;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,OAAO;AAAA,YACX,IAAI,OAAO;AAAA,YACX,GAAG;AAAA,YACH,QAAO;AAAA,YACP;AAAA,YACA,MAAK;AAAA,YACL,iBAAiB;AAAA,YACjB,kBAAkB;AAAA,YAClB,eAAc;AAAA,YACd,WAAW,cAAc,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,YAC7C,WAAU;AAAA;AAAA,QACZ;AAAA,SACF;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-[9999] 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-[9999] 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,2FACb,+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,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../../infra/utils/clsx";
3
+ function Skeleton({ className, ...props }) {
4
+ return /* @__PURE__ */ jsx("div", { className: cn("skeleton rounded-md", className), ...props });
5
+ }
6
+ export {
7
+ Skeleton
8
+ };
9
+ //# sourceMappingURL=Skeleton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/Skeleton.tsx"],"sourcesContent":["import { cn } from '../../../infra/utils/clsx';\n\nexport function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('skeleton rounded-md', className)} {...props} />;\n}\n"],"mappings":"AAGS;AAHT,SAAS,UAAU;AAEZ,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAAyC;AACtF,SAAO,oBAAC,SAAI,WAAW,GAAG,uBAAuB,SAAS,GAAI,GAAG,OAAO;AAC1E;","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 { IconCircleCheck, IconCircleX, IconAlertCircle, IconInfoCircle, IconCircle, IconX } from "@tabler/icons-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-cyan-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: IconCircleCheck,
44
+ error: IconCircleX,
45
+ warning: IconAlertCircle,
46
+ info: IconInfoCircle,
47
+ default: IconCircle
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(IconX, { 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 { IconCircleCheck, IconCircleX, IconAlertCircle, IconInfoCircle, IconCircle, IconX } from \"@tabler/icons-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-cyan-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: IconCircleCheck,\n error: IconCircleX,\n warning: IconAlertCircle,\n info: IconInfoCircle,\n default: IconCircle,\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 <IconX 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,iBAAiB,aAAa,iBAAiB,gBAAgB,YAAY,aAAa;AACjG,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,SAAM,MAAM,IAAI;AAAA;AAAA,IACnB;AAAA,KACF,GAEJ;AAEJ;","names":[]}