@greatapps/common 1.1.170 → 1.1.173
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.
- package/package.json +1 -1
- package/src/modules/auth/schema.ts +1 -0
- package/src/modules/auth/services/auth.service.ts +1 -0
- package/dist/components/account/AccountModals.mjs +0 -18
- package/dist/components/account/AccountModals.mjs.map +0 -1
- package/dist/components/account/ConfigurationsMyAccountModal.mjs +0 -132
- package/dist/components/account/ConfigurationsMyAccountModal.mjs.map +0 -1
- package/dist/components/account/ConfirmDeleteAccountModal.mjs +0 -45
- package/dist/components/account/ConfirmDeleteAccountModal.mjs.map +0 -1
- package/dist/components/account/ConfirmGlobalPreferencesModal.mjs +0 -45
- package/dist/components/account/ConfirmGlobalPreferencesModal.mjs.map +0 -1
- package/dist/components/account/DeleteAccountModal.mjs +0 -123
- package/dist/components/account/DeleteAccountModal.mjs.map +0 -1
- package/dist/components/account/DisableTwoFactorAuthModal.mjs +0 -67
- package/dist/components/account/DisableTwoFactorAuthModal.mjs.map +0 -1
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs +0 -42
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs.map +0 -1
- package/dist/components/account/TwoFactorAuthModal.mjs +0 -190
- package/dist/components/account/TwoFactorAuthModal.mjs.map +0 -1
- package/dist/components/account/constants.mjs +0 -29
- package/dist/components/account/constants.mjs.map +0 -1
- package/dist/components/account/hooks/useChangeEmailForm.mjs +0 -53
- package/dist/components/account/hooks/useChangeEmailForm.mjs.map +0 -1
- package/dist/components/account/hooks/useChangePasswordForm.mjs +0 -47
- package/dist/components/account/hooks/useChangePasswordForm.mjs.map +0 -1
- package/dist/components/account/hooks/useChangePhoneForm.mjs +0 -64
- package/dist/components/account/hooks/useChangePhoneForm.mjs.map +0 -1
- package/dist/components/account/hooks/useConfigurationsModal.mjs +0 -33
- package/dist/components/account/hooks/useConfigurationsModal.mjs.map +0 -1
- package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs +0 -54
- package/dist/components/account/hooks/useDisableTwoFactorAuthForm.mjs.map +0 -1
- package/dist/components/account/hooks/useOtpVerification.mjs +0 -94
- package/dist/components/account/hooks/useOtpVerification.mjs.map +0 -1
- package/dist/components/account/hooks/useTwoFactorAuthForm.mjs +0 -80
- package/dist/components/account/hooks/useTwoFactorAuthForm.mjs.map +0 -1
- package/dist/components/account/sections/ChangeEmailModal.mjs +0 -180
- package/dist/components/account/sections/ChangeEmailModal.mjs.map +0 -1
- package/dist/components/account/sections/ChangePasswordSection.mjs +0 -64
- package/dist/components/account/sections/ChangePasswordSection.mjs.map +0 -1
- package/dist/components/account/sections/ChangePhoneModal.mjs +0 -182
- package/dist/components/account/sections/ChangePhoneModal.mjs.map +0 -1
- package/dist/components/account/sections/MyProfileSection.mjs +0 -303
- package/dist/components/account/sections/MyProfileSection.mjs.map +0 -1
- package/dist/components/account/sections/PreferencesSection.mjs +0 -250
- package/dist/components/account/sections/PreferencesSection.mjs.map +0 -1
- package/dist/components/account/sections/SecuritySection.mjs +0 -147
- package/dist/components/account/sections/SecuritySection.mjs.map +0 -1
- package/dist/components/handlers/SearchParamsHandler.mjs +0 -24
- package/dist/components/handlers/SearchParamsHandler.mjs.map +0 -1
- package/dist/components/layouts/AppMobileNavBar.mjs +0 -115
- package/dist/components/layouts/AppMobileNavBar.mjs.map +0 -1
- package/dist/components/layouts/AppNavBar.mjs +0 -49
- package/dist/components/layouts/AppNavBar.mjs.map +0 -1
- package/dist/components/layouts/MainLayout.mjs +0 -60
- package/dist/components/layouts/MainLayout.mjs.map +0 -1
- package/dist/components/layouts/MdSideBarNavigation.mjs +0 -54
- package/dist/components/layouts/MdSideBarNavigation.mjs.map +0 -1
- package/dist/components/layouts/NavBar.mjs +0 -132
- package/dist/components/layouts/NavBar.mjs.map +0 -1
- package/dist/components/layouts/NavBarItem.mjs +0 -23
- package/dist/components/layouts/NavBarItem.mjs.map +0 -1
- package/dist/components/layouts/NotificationsPopover.mjs +0 -97
- package/dist/components/layouts/NotificationsPopover.mjs.map +0 -1
- package/dist/components/layouts/ProfilePopover.mjs +0 -149
- package/dist/components/layouts/ProfilePopover.mjs.map +0 -1
- package/dist/components/layouts/SideBarNavigation.mjs +0 -22
- package/dist/components/layouts/SideBarNavigation.mjs.map +0 -1
- package/dist/components/layouts/UsersSelectorPopover.mjs +0 -230
- package/dist/components/layouts/UsersSelectorPopover.mjs.map +0 -1
- package/dist/components/modals/ModalManager.mjs +0 -19
- package/dist/components/modals/ModalManager.mjs.map +0 -1
- package/dist/components/modals/Modals.mjs +0 -20
- package/dist/components/modals/Modals.mjs.map +0 -1
- package/dist/components/navigation/AppNavigation.mjs +0 -30
- package/dist/components/navigation/AppNavigation.mjs.map +0 -1
- package/dist/components/navigation/AppNavigationContext.mjs +0 -13
- package/dist/components/navigation/AppNavigationContext.mjs.map +0 -1
- package/dist/components/navigation/CancelledSubscriptionBanner.mjs +0 -59
- package/dist/components/navigation/CancelledSubscriptionBanner.mjs.map +0 -1
- package/dist/components/navigation/NavItem.mjs +0 -35
- package/dist/components/navigation/NavItem.mjs.map +0 -1
- package/dist/components/navigation/NavItemsContext.mjs +0 -16
- package/dist/components/navigation/NavItemsContext.mjs.map +0 -1
- package/dist/components/navigation/ProjectSelectorPopover.mjs +0 -128
- package/dist/components/navigation/ProjectSelectorPopover.mjs.map +0 -1
- package/dist/components/navigation/shells/DesktopShell.mjs +0 -11
- package/dist/components/navigation/shells/DesktopShell.mjs.map +0 -1
- package/dist/components/navigation/shells/MdShell.mjs +0 -11
- package/dist/components/navigation/shells/MdShell.mjs.map +0 -1
- package/dist/components/navigation/shells/MobileShell.mjs +0 -27
- package/dist/components/navigation/shells/MobileShell.mjs.map +0 -1
- package/dist/components/navigation/shells/TabsMobileShell.mjs +0 -59
- package/dist/components/navigation/shells/TabsMobileShell.mjs.map +0 -1
- package/dist/components/navigation/subcomponents/CreditsCard.mjs +0 -30
- package/dist/components/navigation/subcomponents/CreditsCard.mjs.map +0 -1
- package/dist/components/navigation/subcomponents/NavItems.mjs +0 -25
- package/dist/components/navigation/subcomponents/NavItems.mjs.map +0 -1
- package/dist/components/navigation/subcomponents/PlanCard.mjs +0 -25
- package/dist/components/navigation/subcomponents/PlanCard.mjs.map +0 -1
- package/dist/components/navigation/subcomponents/ProjectSelector.mjs +0 -130
- package/dist/components/navigation/subcomponents/ProjectSelector.mjs.map +0 -1
- package/dist/components/navigation/types.mjs +0 -1
- package/dist/components/navigation/types.mjs.map +0 -1
- package/dist/components/pages/notifications/Notifications.mjs +0 -156
- package/dist/components/pages/notifications/Notifications.mjs.map +0 -1
- package/dist/components/ui/buttons/Button.mjs +0 -52
- package/dist/components/ui/buttons/Button.mjs.map +0 -1
- package/dist/components/ui/buttons/CancelButton.mjs +0 -17
- package/dist/components/ui/buttons/CancelButton.mjs.map +0 -1
- package/dist/components/ui/buttons/CopyButton.mjs +0 -42
- package/dist/components/ui/buttons/CopyButton.mjs.map +0 -1
- package/dist/components/ui/data-display/Accordion.mjs +0 -76
- package/dist/components/ui/data-display/Accordion.mjs.map +0 -1
- package/dist/components/ui/data-display/Badge.mjs +0 -42
- package/dist/components/ui/data-display/Badge.mjs.map +0 -1
- package/dist/components/ui/data-display/Card.mjs +0 -92
- package/dist/components/ui/data-display/Card.mjs.map +0 -1
- package/dist/components/ui/data-display/Pagination.mjs +0 -118
- package/dist/components/ui/data-display/Pagination.mjs.map +0 -1
- package/dist/components/ui/data-display/ScrollArea.mjs +0 -62
- package/dist/components/ui/data-display/ScrollArea.mjs.map +0 -1
- package/dist/components/ui/data-display/Separator.mjs +0 -28
- package/dist/components/ui/data-display/Separator.mjs.map +0 -1
- package/dist/components/ui/data-display/Table.mjs +0 -116
- package/dist/components/ui/data-display/Table.mjs.map +0 -1
- package/dist/components/ui/data-display/Tabs.mjs +0 -69
- package/dist/components/ui/data-display/Tabs.mjs.map +0 -1
- package/dist/components/ui/data-display/UserAvatar.mjs +0 -49
- package/dist/components/ui/data-display/UserAvatar.mjs.map +0 -1
- package/dist/components/ui/feedback/CircularProgress.mjs +0 -71
- package/dist/components/ui/feedback/CircularProgress.mjs.map +0 -1
- package/dist/components/ui/feedback/DefaultCircularProgress.mjs +0 -50
- package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +0 -1
- package/dist/components/ui/feedback/LoadingOverlay.mjs +0 -19
- package/dist/components/ui/feedback/LoadingOverlay.mjs.map +0 -1
- package/dist/components/ui/feedback/Progress.mjs +0 -37
- package/dist/components/ui/feedback/Progress.mjs.map +0 -1
- package/dist/components/ui/feedback/Toast.mjs +0 -77
- package/dist/components/ui/feedback/Toast.mjs.map +0 -1
- package/dist/components/ui/form/Calendar.mjs +0 -204
- package/dist/components/ui/form/Calendar.mjs.map +0 -1
- package/dist/components/ui/form/Checkbox.mjs +0 -33
- package/dist/components/ui/form/Checkbox.mjs.map +0 -1
- package/dist/components/ui/form/ComboboxField.mjs +0 -130
- package/dist/components/ui/form/ComboboxField.mjs.map +0 -1
- package/dist/components/ui/form/DatePicker.mjs +0 -82
- package/dist/components/ui/form/DatePicker.mjs.map +0 -1
- package/dist/components/ui/form/DateRangePicker.mjs +0 -92
- package/dist/components/ui/form/DateRangePicker.mjs.map +0 -1
- package/dist/components/ui/form/FormField.mjs +0 -103
- package/dist/components/ui/form/FormField.mjs.map +0 -1
- package/dist/components/ui/form/Input.mjs +0 -21
- package/dist/components/ui/form/Input.mjs.map +0 -1
- package/dist/components/ui/form/InputOtp.mjs +0 -70
- package/dist/components/ui/form/InputOtp.mjs.map +0 -1
- package/dist/components/ui/form/PhoneInput.mjs +0 -78
- package/dist/components/ui/form/PhoneInput.mjs.map +0 -1
- package/dist/components/ui/form/RadioGroup.mjs +0 -37
- package/dist/components/ui/form/RadioGroup.mjs.map +0 -1
- package/dist/components/ui/form/Select.mjs +0 -179
- package/dist/components/ui/form/Select.mjs.map +0 -1
- package/dist/components/ui/form/SelectField.mjs +0 -80
- package/dist/components/ui/form/SelectField.mjs.map +0 -1
- package/dist/components/ui/form/Switch.mjs +0 -33
- package/dist/components/ui/form/Switch.mjs.map +0 -1
- package/dist/components/ui/form/SwitchOptionFieldWithIcon.mjs +0 -40
- package/dist/components/ui/form/SwitchOptionFieldWithIcon.mjs.map +0 -1
- package/dist/components/ui/form/TextAreaField.mjs +0 -56
- package/dist/components/ui/form/TextAreaField.mjs.map +0 -1
- package/dist/components/ui/form/Textarea.mjs +0 -20
- package/dist/components/ui/form/Textarea.mjs.map +0 -1
- package/dist/components/ui/overlay/Command.mjs +0 -178
- package/dist/components/ui/overlay/Command.mjs.map +0 -1
- package/dist/components/ui/overlay/Dialog.mjs +0 -142
- package/dist/components/ui/overlay/Dialog.mjs.map +0 -1
- package/dist/components/ui/overlay/Popover.mjs +0 -46
- package/dist/components/ui/overlay/Popover.mjs.map +0 -1
- package/dist/components/ui/overlay/Sheet.mjs +0 -142
- package/dist/components/ui/overlay/Sheet.mjs.map +0 -1
- package/dist/components/ui/overlay/Tooltip.mjs +0 -57
- package/dist/components/ui/overlay/Tooltip.mjs.map +0 -1
- package/dist/components/widgets/notifications/NotificationCard.mjs +0 -54
- package/dist/components/widgets/notifications/NotificationCard.mjs.map +0 -1
- package/dist/enums/AccountSectionType.mjs +0 -11
- package/dist/enums/AccountSectionType.mjs.map +0 -1
- package/dist/hooks/copy-to-clipboard.hook.mjs +0 -52
- package/dist/hooks/copy-to-clipboard.hook.mjs.map +0 -1
- package/dist/hooks/useCountdownTimer.mjs +0 -29
- package/dist/hooks/useCountdownTimer.mjs.map +0 -1
- package/dist/hooks/useDebounce.mjs +0 -19
- package/dist/hooks/useDebounce.mjs.map +0 -1
- package/dist/hooks/useDebounceState.mjs +0 -12
- package/dist/hooks/useDebounceState.mjs.map +0 -1
- package/dist/hooks/useDebouncedEffect.mjs +0 -44
- package/dist/hooks/useDebouncedEffect.mjs.map +0 -1
- package/dist/hooks/useIsMobile.mjs +0 -18
- package/dist/hooks/useIsMobile.mjs.map +0 -1
- package/dist/hooks/usePasswordVisibility.mjs +0 -13
- package/dist/hooks/usePasswordVisibility.mjs.map +0 -1
- package/dist/index.mjs +0 -457
- package/dist/index.mjs.map +0 -1
- package/dist/infra/api/client.mjs +0 -136
- package/dist/infra/api/client.mjs.map +0 -1
- package/dist/infra/api/types.mjs +0 -31
- package/dist/infra/api/types.mjs.map +0 -1
- package/dist/infra/utils/client-info.mjs +0 -27
- package/dist/infra/utils/client-info.mjs.map +0 -1
- package/dist/infra/utils/clsx.mjs +0 -9
- package/dist/infra/utils/clsx.mjs.map +0 -1
- package/dist/infra/utils/params.mjs +0 -21
- package/dist/infra/utils/params.mjs.map +0 -1
- package/dist/infra/utils/parser.mjs +0 -24
- package/dist/infra/utils/parser.mjs.map +0 -1
- package/dist/infra/utils/percentage.mjs +0 -20
- package/dist/infra/utils/percentage.mjs.map +0 -1
- package/dist/middleware.mjs +0 -10
- package/dist/middleware.mjs.map +0 -1
- package/dist/middlewares/chain.mjs +0 -37
- package/dist/middlewares/chain.mjs.map +0 -1
- package/dist/middlewares/create-auth-middleware.mjs +0 -28
- package/dist/middlewares/create-auth-middleware.mjs.map +0 -1
- package/dist/middlewares/types.mjs +0 -11
- package/dist/middlewares/types.mjs.map +0 -1
- package/dist/modules/accounts/actions/account-management.action.mjs +0 -82
- package/dist/modules/accounts/actions/account-management.action.mjs.map +0 -1
- package/dist/modules/accounts/actions/find-current-account.action.mjs +0 -10
- package/dist/modules/accounts/actions/find-current-account.action.mjs.map +0 -1
- package/dist/modules/accounts/actions/list-currencies.action.mjs +0 -10
- package/dist/modules/accounts/actions/list-currencies.action.mjs.map +0 -1
- package/dist/modules/accounts/actions/list-timezones.action.mjs +0 -10
- package/dist/modules/accounts/actions/list-timezones.action.mjs.map +0 -1
- package/dist/modules/accounts/hooks/current-account.hook.mjs +0 -24
- package/dist/modules/accounts/hooks/current-account.hook.mjs.map +0 -1
- package/dist/modules/accounts/hooks/useAccountManagement.mjs +0 -71
- package/dist/modules/accounts/hooks/useAccountManagement.mjs.map +0 -1
- package/dist/modules/accounts/hooks/useCurrencies.mjs +0 -17
- package/dist/modules/accounts/hooks/useCurrencies.mjs.map +0 -1
- package/dist/modules/accounts/hooks/useTimezones.mjs +0 -17
- package/dist/modules/accounts/hooks/useTimezones.mjs.map +0 -1
- package/dist/modules/accounts/services/account.service.mjs +0 -180
- package/dist/modules/accounts/services/account.service.mjs.map +0 -1
- package/dist/modules/accounts/services/currency.service.mjs +0 -24
- package/dist/modules/accounts/services/currency.service.mjs.map +0 -1
- package/dist/modules/accounts/services/timezone.service.mjs +0 -65
- package/dist/modules/accounts/services/timezone.service.mjs.map +0 -1
- package/dist/modules/accounts/services/two-factor.service.mjs +0 -77
- package/dist/modules/accounts/services/two-factor.service.mjs.map +0 -1
- package/dist/modules/accounts/types.mjs +0 -1
- package/dist/modules/accounts/types.mjs.map +0 -1
- package/dist/modules/auth/actions/login.action.mjs +0 -14
- package/dist/modules/auth/actions/login.action.mjs.map +0 -1
- package/dist/modules/auth/actions/logout.action.mjs +0 -14
- package/dist/modules/auth/actions/logout.action.mjs.map +0 -1
- package/dist/modules/auth/actions/register.action.mjs +0 -14
- package/dist/modules/auth/actions/register.action.mjs.map +0 -1
- package/dist/modules/auth/actions/validate-session.action.mjs +0 -60
- package/dist/modules/auth/actions/validate-session.action.mjs.map +0 -1
- package/dist/modules/auth/actions/verify-two-factor.action.mjs +0 -17
- package/dist/modules/auth/actions/verify-two-factor.action.mjs.map +0 -1
- package/dist/modules/auth/hooks/login.hook.mjs +0 -13
- package/dist/modules/auth/hooks/login.hook.mjs.map +0 -1
- package/dist/modules/auth/hooks/logout.hook.mjs +0 -13
- package/dist/modules/auth/hooks/logout.hook.mjs.map +0 -1
- package/dist/modules/auth/hooks/register.hook.mjs +0 -13
- package/dist/modules/auth/hooks/register.hook.mjs.map +0 -1
- package/dist/modules/auth/hooks/useUserQuery.mjs +0 -63
- package/dist/modules/auth/hooks/useUserQuery.mjs.map +0 -1
- package/dist/modules/auth/schema.mjs +0 -1
- package/dist/modules/auth/schema.mjs.map +0 -1
- package/dist/modules/auth/services/auth.service.mjs +0 -293
- package/dist/modules/auth/services/auth.service.mjs.map +0 -1
- package/dist/modules/auth/utils/get-user-context.mjs +0 -24
- package/dist/modules/auth/utils/get-user-context.mjs.map +0 -1
- package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs +0 -10
- package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs.map +0 -1
- package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs +0 -76
- package/dist/modules/ia-credits/hooks/ia-credits.hook.mjs.map +0 -1
- package/dist/modules/ia-credits/services/ia-credits.service.mjs +0 -31
- package/dist/modules/ia-credits/services/ia-credits.service.mjs.map +0 -1
- package/dist/modules/ia-credits/types.mjs +0 -25
- package/dist/modules/ia-credits/types.mjs.map +0 -1
- package/dist/modules/projects/actions/add-project-user.action.mjs +0 -10
- package/dist/modules/projects/actions/add-project-user.action.mjs.map +0 -1
- package/dist/modules/projects/actions/list-available-users.action.mjs +0 -10
- package/dist/modules/projects/actions/list-available-users.action.mjs.map +0 -1
- package/dist/modules/projects/actions/list-project-users.action.mjs +0 -10
- package/dist/modules/projects/actions/list-project-users.action.mjs.map +0 -1
- package/dist/modules/projects/actions/remove-project-user.action.mjs +0 -10
- package/dist/modules/projects/actions/remove-project-user.action.mjs.map +0 -1
- package/dist/modules/projects/hooks/list-available-users.hook.mjs +0 -34
- package/dist/modules/projects/hooks/list-available-users.hook.mjs.map +0 -1
- package/dist/modules/projects/hooks/list-project-users.hook.mjs +0 -34
- package/dist/modules/projects/hooks/list-project-users.hook.mjs.map +0 -1
- package/dist/modules/projects/services/project-users.service.mjs +0 -78
- package/dist/modules/projects/services/project-users.service.mjs.map +0 -1
- package/dist/modules/projects/types.mjs +0 -22
- package/dist/modules/projects/types.mjs.map +0 -1
- package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs +0 -10
- package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs.map +0 -1
- package/dist/modules/subscriptions/constants/addons.constants.mjs +0 -12
- package/dist/modules/subscriptions/constants/addons.constants.mjs.map +0 -1
- package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs +0 -20
- package/dist/modules/subscriptions/hooks/find-active-subscription.hook.mjs.map +0 -1
- package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs +0 -18
- package/dist/modules/subscriptions/hooks/list-subscriptions.hook.mjs.map +0 -1
- package/dist/modules/subscriptions/services/subscriptions.service.mjs +0 -32
- package/dist/modules/subscriptions/services/subscriptions.service.mjs.map +0 -1
- package/dist/modules/subscriptions/types.mjs +0 -57
- package/dist/modules/subscriptions/types.mjs.map +0 -1
- package/dist/modules/users/action/find-user-by-id.action.mjs +0 -10
- package/dist/modules/users/action/find-user-by-id.action.mjs.map +0 -1
- package/dist/modules/users/action/list-messages.action.mjs +0 -13
- package/dist/modules/users/action/list-messages.action.mjs.map +0 -1
- package/dist/modules/users/action/mark-all-messages-as-read.action.mjs +0 -10
- package/dist/modules/users/action/mark-all-messages-as-read.action.mjs.map +0 -1
- package/dist/modules/users/action/mark-message-as-read.action.mjs +0 -10
- package/dist/modules/users/action/mark-message-as-read.action.mjs.map +0 -1
- package/dist/modules/users/hooks/messages.hook.mjs +0 -57
- package/dist/modules/users/hooks/messages.hook.mjs.map +0 -1
- package/dist/modules/users/schema/messages.schema.mjs +0 -21
- package/dist/modules/users/schema/messages.schema.mjs.map +0 -1
- package/dist/modules/users/schema.mjs +0 -11
- package/dist/modules/users/schema.mjs.map +0 -1
- package/dist/modules/users/services/messages.service.mjs +0 -35
- package/dist/modules/users/services/messages.service.mjs.map +0 -1
- package/dist/modules/users/services/user.service.mjs +0 -50
- package/dist/modules/users/services/user.service.mjs.map +0 -1
- package/dist/modules/whitelabel/actions/find-whitelabel-styles.action.mjs +0 -15
- package/dist/modules/whitelabel/actions/find-whitelabel-styles.action.mjs.map +0 -1
- package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs +0 -21
- package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs.map +0 -1
- package/dist/modules/whitelabel/schema.mjs +0 -1
- package/dist/modules/whitelabel/schema.mjs.map +0 -1
- package/dist/modules/whitelabel/services/whitelabel-styles.service.mjs +0 -81
- package/dist/modules/whitelabel/services/whitelabel-styles.service.mjs.map +0 -1
- package/dist/modules/whitelabel/services/whitelabel.service.mjs +0 -61
- package/dist/modules/whitelabel/services/whitelabel.service.mjs.map +0 -1
- package/dist/modules/whitelabel/styles-schema.mjs +0 -1
- package/dist/modules/whitelabel/styles-schema.mjs.map +0 -1
- package/dist/providers/auth.provider.mjs +0 -100
- package/dist/providers/auth.provider.mjs.map +0 -1
- package/dist/providers/query.provider.mjs +0 -99
- package/dist/providers/query.provider.mjs.map +0 -1
- package/dist/providers/whitelabel.provider.mjs +0 -31
- package/dist/providers/whitelabel.provider.mjs.map +0 -1
- package/dist/server.mjs +0 -84
- package/dist/server.mjs.map +0 -1
- package/dist/store/useAccountModals.mjs +0 -18
- package/dist/store/useAccountModals.mjs.map +0 -1
- package/dist/store/useMdSidebarStore.mjs +0 -11
- package/dist/store/useMdSidebarStore.mjs.map +0 -1
- package/dist/store/useMobileNavbarSheet.mjs +0 -14
- package/dist/store/useMobileNavbarSheet.mjs.map +0 -1
- package/dist/store/useModalManager.mjs +0 -75
- package/dist/store/useModalManager.mjs.map +0 -1
- package/dist/utils/browser/clipboard.mjs +0 -36
- package/dist/utils/browser/clipboard.mjs.map +0 -1
- package/dist/utils/file/index.mjs +0 -9
- package/dist/utils/file/index.mjs.map +0 -1
- package/dist/utils/format/masks.mjs +0 -56
- package/dist/utils/format/masks.mjs.map +0 -1
- package/dist/utils/intl/locales.mjs +0 -12
- package/dist/utils/intl/locales.mjs.map +0 -1
- package/dist/utils/safeServerAction.mjs +0 -16
- package/dist/utils/safeServerAction.mjs.map +0 -1
- package/dist/utils/validators/account.mjs +0 -26
- package/dist/utils/validators/account.mjs.map +0 -1
- package/dist/utils/validators/common.mjs +0 -47
- package/dist/utils/validators/common.mjs.map +0 -1
- package/dist/utils/withAction.mjs +0 -13
- package/dist/utils/withAction.mjs.map +0 -1
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Bell, Check, Loader2 } from "lucide-react";
|
|
4
|
-
import { Button } from "../../ui/buttons/Button";
|
|
5
|
-
import {
|
|
6
|
-
Tabs,
|
|
7
|
-
TabsContent,
|
|
8
|
-
TabsList,
|
|
9
|
-
TabsTrigger
|
|
10
|
-
} from "../../ui/data-display/Tabs";
|
|
11
|
-
import { useInfiniteMessages, useMarkAllMessagesAsRead } from "../../../modules/users/hooks/messages.hook";
|
|
12
|
-
import NotificationCard from "../../widgets/notifications/NotificationCard";
|
|
13
|
-
import { Toast } from "../../ui/feedback/Toast";
|
|
14
|
-
import { formatDistanceToNow } from "date-fns";
|
|
15
|
-
import { ptBR } from "date-fns/locale";
|
|
16
|
-
import { toast } from "sonner";
|
|
17
|
-
function NotificationsList({
|
|
18
|
-
pages,
|
|
19
|
-
isFetchingNextPage,
|
|
20
|
-
hasNextPage,
|
|
21
|
-
fetchNextPage
|
|
22
|
-
}) {
|
|
23
|
-
const notifications = pages?.pages.flatMap((p) => p.data) ?? [];
|
|
24
|
-
const handleScroll = (e) => {
|
|
25
|
-
const target = e.currentTarget;
|
|
26
|
-
const nearBottom = target.scrollTop + target.clientHeight >= target.scrollHeight - 50;
|
|
27
|
-
if (!nearBottom) return;
|
|
28
|
-
if (hasNextPage && !isFetchingNextPage) {
|
|
29
|
-
fetchNextPage();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
return /* @__PURE__ */ jsxs(
|
|
33
|
-
"div",
|
|
34
|
-
{
|
|
35
|
-
className: "flex flex-col border border-gray-200 rounded-lg w-full bg-white max-h-[70vh] overflow-y-auto custom-scrollbar",
|
|
36
|
-
onScroll: handleScroll,
|
|
37
|
-
children: [
|
|
38
|
-
notifications.map((notification, index) => /* @__PURE__ */ jsx(
|
|
39
|
-
NotificationCard,
|
|
40
|
-
{
|
|
41
|
-
icon: /* @__PURE__ */ jsx(Bell, { size: 20, className: "text-pages-600" }),
|
|
42
|
-
iconBgColor: "bg-pages-100",
|
|
43
|
-
title: notification.subject,
|
|
44
|
-
description: notification.message,
|
|
45
|
-
gapPx: 16,
|
|
46
|
-
time: formatDistanceToNow(new Date(notification.datetime_add), {
|
|
47
|
-
addSuffix: true,
|
|
48
|
-
locale: ptBR
|
|
49
|
-
}),
|
|
50
|
-
isUnread: notification.status === 1,
|
|
51
|
-
showBorder: index < notifications.length - 1
|
|
52
|
-
},
|
|
53
|
-
notification.id
|
|
54
|
-
)),
|
|
55
|
-
isFetchingNextPage && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx(Loader2, { size: 20, className: "animate-spin text-gray-400" }) })
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
function NotificationPageContent() {
|
|
61
|
-
const unreadNotifications = useInfiniteMessages({
|
|
62
|
-
readed: false,
|
|
63
|
-
type: "notification",
|
|
64
|
-
order: "desc"
|
|
65
|
-
});
|
|
66
|
-
const allNotifications = useInfiniteMessages({
|
|
67
|
-
type: "notification",
|
|
68
|
-
order: "desc"
|
|
69
|
-
});
|
|
70
|
-
const totalAll = allNotifications.data?.pages[0]?.total ?? 0;
|
|
71
|
-
const totalUnread = unreadNotifications.data?.pages[0]?.total ?? 0;
|
|
72
|
-
const { mutate: markAllAsRead, isPending: isMarkingAll } = useMarkAllMessagesAsRead();
|
|
73
|
-
const handleMarkAllAsRead = () => {
|
|
74
|
-
markAllAsRead(void 0, {
|
|
75
|
-
onSuccess: () => {
|
|
76
|
-
toast.custom((t) => /* @__PURE__ */ jsx(Toast, { variant: "success", message: "Todas as notifica\xE7\xF5es foram marcadas como lidas", toastId: t }));
|
|
77
|
-
},
|
|
78
|
-
onError: () => {
|
|
79
|
-
toast.custom((t) => /* @__PURE__ */ jsx(Toast, { variant: "error", message: "Erro ao marcar notifica\xE7\xF5es como lidas", toastId: t }));
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 lg:gap-10 px-4 py-6 lg:px-20 lg:py-14", children: [
|
|
84
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
85
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
86
|
-
/* @__PURE__ */ jsx("h1", { className: "paragraph-xlarge-semibold lg:title-large-semibold text-gray-950", children: "Notifica\xE7\xF5es" }),
|
|
87
|
-
/* @__PURE__ */ jsx("p", { className: "paragraph-medium-regular text-gray-600 hidden lg:block", children: "Tenha controle total sobre p\xE1ginas, experi\xEAncias e convers\xF5es." })
|
|
88
|
-
] }),
|
|
89
|
-
/* @__PURE__ */ jsxs(
|
|
90
|
-
Button,
|
|
91
|
-
{
|
|
92
|
-
variant: "secondary",
|
|
93
|
-
className: "h-10! lg:h-12! shrink-0",
|
|
94
|
-
onClick: handleMarkAllAsRead,
|
|
95
|
-
disabled: isMarkingAll || totalUnread === 0,
|
|
96
|
-
children: [
|
|
97
|
-
isMarkingAll ? /* @__PURE__ */ jsx(Loader2, { size: 20, className: "animate-spin" }) : /* @__PURE__ */ jsx(Check, { size: 20 }),
|
|
98
|
-
/* @__PURE__ */ jsx("span", { className: "lg:block hidden", children: "Marcar todos como lidos" }),
|
|
99
|
-
/* @__PURE__ */ jsx("span", { className: "lg:hidden", children: "Marcar como lidos" })
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
] }),
|
|
104
|
-
/* @__PURE__ */ jsxs(
|
|
105
|
-
Tabs,
|
|
106
|
-
{
|
|
107
|
-
defaultValue: "all",
|
|
108
|
-
className: "flex flex-col w-full bg-transparent gap-6 lg:gap-8",
|
|
109
|
-
children: [
|
|
110
|
-
/* @__PURE__ */ jsxs(TabsList, { className: "h-auto pb-0 bg-transparent", children: [
|
|
111
|
-
/* @__PURE__ */ jsxs(TabsTrigger, { className: "gap-2", value: "all", children: [
|
|
112
|
-
"Todas as notifica\xE7\xF5es",
|
|
113
|
-
" ",
|
|
114
|
-
/* @__PURE__ */ jsxs("span", { className: "text-gray-500", children: [
|
|
115
|
-
"(",
|
|
116
|
-
totalAll,
|
|
117
|
-
")"
|
|
118
|
-
] })
|
|
119
|
-
] }),
|
|
120
|
-
/* @__PURE__ */ jsxs(TabsTrigger, { className: "gap-2", value: "unreads", disabled: totalUnread === 0, children: [
|
|
121
|
-
"N\xE3o lidas",
|
|
122
|
-
" ",
|
|
123
|
-
/* @__PURE__ */ jsxs("span", { className: "text-gray-500", children: [
|
|
124
|
-
"(",
|
|
125
|
-
totalUnread,
|
|
126
|
-
")"
|
|
127
|
-
] })
|
|
128
|
-
] })
|
|
129
|
-
] }),
|
|
130
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "all", children: /* @__PURE__ */ jsx(
|
|
131
|
-
NotificationsList,
|
|
132
|
-
{
|
|
133
|
-
pages: allNotifications.data,
|
|
134
|
-
isFetchingNextPage: allNotifications.isFetchingNextPage,
|
|
135
|
-
hasNextPage: allNotifications.hasNextPage,
|
|
136
|
-
fetchNextPage: allNotifications.fetchNextPage
|
|
137
|
-
}
|
|
138
|
-
) }),
|
|
139
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "unreads", children: /* @__PURE__ */ jsx(
|
|
140
|
-
NotificationsList,
|
|
141
|
-
{
|
|
142
|
-
pages: unreadNotifications.data,
|
|
143
|
-
isFetchingNextPage: unreadNotifications.isFetchingNextPage,
|
|
144
|
-
hasNextPage: unreadNotifications.hasNextPage,
|
|
145
|
-
fetchNextPage: unreadNotifications.fetchNextPage
|
|
146
|
-
}
|
|
147
|
-
) })
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
] });
|
|
152
|
-
}
|
|
153
|
-
export {
|
|
154
|
-
NotificationPageContent
|
|
155
|
-
};
|
|
156
|
-
//# sourceMappingURL=Notifications.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/pages/notifications/Notifications.tsx"],"sourcesContent":["'use client';\n\nimport { Bell, Check, Loader2 } from \"lucide-react\";\nimport { Button } from \"../../ui/buttons/Button\";\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"../../ui/data-display/Tabs\";\nimport { useInfiniteMessages, useMarkAllMessagesAsRead } from \"../../../modules/users/hooks/messages.hook\";\nimport NotificationCard from \"../../widgets/notifications/NotificationCard\";\nimport { Toast } from \"../../ui/feedback/Toast\";\nimport { formatDistanceToNow } from \"date-fns\";\nimport { ptBR } from \"date-fns/locale\";\nimport { toast } from \"sonner\";\nimport React from \"react\";\n\nfunction NotificationsList({\n pages,\n isFetchingNextPage,\n hasNextPage,\n fetchNextPage,\n}: {\n pages: ReturnType<typeof useInfiniteMessages>[\"data\"];\n isFetchingNextPage: boolean;\n hasNextPage: boolean;\n fetchNextPage: () => void;\n}) {\n const notifications = pages?.pages.flatMap((p) => p.data) ?? [];\n\n const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {\n const target = e.currentTarget;\n const nearBottom =\n target.scrollTop + target.clientHeight >= target.scrollHeight - 50;\n if (!nearBottom) return;\n if (hasNextPage && !isFetchingNextPage) {\n fetchNextPage();\n }\n };\n\n return (\n <div\n className=\"flex flex-col border border-gray-200 rounded-lg w-full bg-white max-h-[70vh] overflow-y-auto custom-scrollbar\"\n onScroll={handleScroll}\n >\n {notifications.map((notification, index) => (\n <NotificationCard\n key={notification.id}\n icon={<Bell size={20} className=\"text-pages-600\" />}\n iconBgColor=\"bg-pages-100\"\n title={notification.subject}\n description={notification.message}\n gapPx={16}\n time={formatDistanceToNow(new Date(notification.datetime_add), {\n addSuffix: true,\n locale: ptBR,\n })}\n isUnread={notification.status === 1}\n showBorder={index < notifications.length - 1}\n />\n ))}\n {isFetchingNextPage && (\n <div className=\"flex items-center justify-center py-4\">\n <Loader2 size={20} className=\"animate-spin text-gray-400\" />\n </div>\n )}\n </div>\n );\n}\n\nexport function NotificationPageContent() {\n const unreadNotifications = useInfiniteMessages({\n readed: false,\n type: \"notification\",\n order: \"desc\",\n });\n const allNotifications = useInfiniteMessages({\n type: \"notification\",\n order: \"desc\",\n });\n\n const totalAll = allNotifications.data?.pages[0]?.total ?? 0;\n const totalUnread = unreadNotifications.data?.pages[0]?.total ?? 0;\n\n const { mutate: markAllAsRead, isPending: isMarkingAll } = useMarkAllMessagesAsRead();\n\n const handleMarkAllAsRead = () => {\n markAllAsRead(undefined, {\n onSuccess: () => {\n toast.custom((t) => (\n <Toast variant=\"success\" message=\"Todas as notificações foram marcadas como lidas\" toastId={t} />\n ));\n },\n onError: () => {\n toast.custom((t) => (\n <Toast variant=\"error\" message=\"Erro ao marcar notificações como lidas\" toastId={t} />\n ));\n },\n });\n };\n\n return (\n <div className=\"flex flex-col gap-6 lg:gap-10 px-4 py-6 lg:px-20 lg:py-14\">\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex flex-col gap-2\">\n <h1 className=\"paragraph-xlarge-semibold lg:title-large-semibold text-gray-950\">\n Notificações\n </h1>\n <p className=\"paragraph-medium-regular text-gray-600 hidden lg:block\">\n Tenha controle total sobre páginas, experiências e conversões.\n </p>\n </div>\n <Button\n variant={\"secondary\"}\n className=\"h-10! lg:h-12! shrink-0\"\n onClick={handleMarkAllAsRead}\n disabled={isMarkingAll || totalUnread === 0}\n >\n {isMarkingAll ? <Loader2 size={20} className=\"animate-spin\" /> : <Check size={20} />}\n <span className=\"lg:block hidden\">Marcar todos como lidos</span>\n <span className=\"lg:hidden\">Marcar como lidos</span>\n </Button>\n </div>\n <Tabs\n defaultValue=\"all\"\n className=\"flex flex-col w-full bg-transparent gap-6 lg:gap-8\"\n >\n <TabsList className=\"h-auto pb-0 bg-transparent\">\n <TabsTrigger className=\"gap-2\" value=\"all\">\n Todas as notificações{\" \"}\n <span className=\"text-gray-500\">({totalAll})</span>\n </TabsTrigger>\n <TabsTrigger className=\"gap-2\" value=\"unreads\" disabled={totalUnread === 0}>\n Não lidas{\" \"}\n <span className=\"text-gray-500\">({totalUnread})</span>\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"all\">\n <NotificationsList\n pages={allNotifications.data}\n isFetchingNextPage={allNotifications.isFetchingNextPage}\n hasNextPage={allNotifications.hasNextPage}\n fetchNextPage={allNotifications.fetchNextPage}\n />\n </TabsContent>\n\n <TabsContent value=\"unreads\">\n <NotificationsList\n pages={unreadNotifications.data}\n isFetchingNextPage={unreadNotifications.isFetchingNextPage}\n hasNextPage={unreadNotifications.hasNextPage}\n fetchNextPage={unreadNotifications.fetchNextPage}\n />\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
6
|
-
const buttonVariants = cva(
|
|
7
|
-
"paragraph-small-semibold cursor-pointer flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: " bg-gray-950 text-white hover:bg-gray-950/90",
|
|
12
|
-
secondary: "bg-white text-gray-950 border-gray-200 hover:border-gray-400 border",
|
|
13
|
-
ghost: "text-gray-600 hover:bg-accent hover:text-gray-950 dark:hover:bg-accent/50",
|
|
14
|
-
brand: "bg-pages-300 hover:bg-pages-200 text-gray-950"
|
|
15
|
-
},
|
|
16
|
-
size: {
|
|
17
|
-
default: "h-12 px-4 py-2 has-[>svg]:px-3",
|
|
18
|
-
sm: "rounded-md gap-1.5 px-2 py-2 has-[>svg]:px-2.5",
|
|
19
|
-
lg: "rounded-md px-6 has-[>svg]:px-4",
|
|
20
|
-
icon: "size-9",
|
|
21
|
-
"icon-sm": "size-8",
|
|
22
|
-
"icon-lg": "size-10"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
variant: "default",
|
|
27
|
-
size: "default"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
function Button({
|
|
32
|
-
className,
|
|
33
|
-
variant,
|
|
34
|
-
size,
|
|
35
|
-
asChild = false,
|
|
36
|
-
...props
|
|
37
|
-
}) {
|
|
38
|
-
const Comp = asChild ? Slot : "button";
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
40
|
-
Comp,
|
|
41
|
-
{
|
|
42
|
-
"data-slot": "button",
|
|
43
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
44
|
-
...props
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
Button,
|
|
50
|
-
buttonVariants
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=Button.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/buttons/Button.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nconst buttonVariants = cva(\n \"paragraph-small-semibold cursor-pointer flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \" bg-gray-950 text-white hover:bg-gray-950/90\",\n secondary:\n \"bg-white text-gray-950 border-gray-200 hover:border-gray-400 border\",\n ghost:\n \"text-gray-600 hover:bg-accent hover:text-gray-950 dark:hover:bg-accent/50\",\n brand: \"bg-pages-300 hover:bg-pages-200 text-gray-950\",\n },\n size: {\n default: \"h-12 px-4 py-2 has-[>svg]:px-3\",\n sm: \"rounded-md gap-1.5 px-2 py-2 has-[>svg]:px-2.5\",\n lg: \"rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n"],"mappings":";AAgDI;AA7CJ,SAAS,YAAY;AACrB,SAAS,WAA8B;AACvC,SAAS,UAAU;AAEnB,MAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WACE;AAAA,QACF,OACE;AAAA,QACF,OAAO;AAAA,MACT;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,QACX,WAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEA,SAAS,OAAO;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,GAGK;AACH,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC,CAAC;AAAA,MACzD,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
function CancelButton({
|
|
4
|
-
...props
|
|
5
|
-
}) {
|
|
6
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
-
"button",
|
|
8
|
-
{
|
|
9
|
-
className: "flex h-8 px-2 justify-center items-center rounded-lg bg-red-50 text-red-600 font-semibold text-sm px-3 cursor-pointer hover:bg-red-100",
|
|
10
|
-
...props
|
|
11
|
-
}
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
CancelButton as default
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=CancelButton.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/buttons/CancelButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\";\n\nexport default function CancelButton({\n ...props\n}: React.ComponentProps<\"button\">) {\n return (\n <button\n className=\"flex h-8 px-2 justify-center items-center rounded-lg bg-red-50 text-red-600 font-semibold text-sm px-3 cursor-pointer hover:bg-red-100\"\n {...props}\n />\n );\n}\n"],"mappings":";AAQI;AAJW,SAAR,aAA8B;AAAA,EACnC,GAAG;AACL,GAAmC;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Check, Copy } from "lucide-react";
|
|
4
|
-
import { toast } from "sonner";
|
|
5
|
-
import { Toast } from "../feedback/Toast";
|
|
6
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "../overlay/Tooltip";
|
|
7
|
-
import useCopyToClipboard from "../../../hooks/copy-to-clipboard.hook";
|
|
8
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
9
|
-
function CopyButton({
|
|
10
|
-
textToCopy,
|
|
11
|
-
size = 14,
|
|
12
|
-
className,
|
|
13
|
-
tooltipText = "Copiar link",
|
|
14
|
-
successMessage = "Link copiado"
|
|
15
|
-
}) {
|
|
16
|
-
const { isCopied, copy } = useCopyToClipboard({
|
|
17
|
-
onSuccess: () => {
|
|
18
|
-
toast.custom((t) => /* @__PURE__ */ jsx(Toast, { variant: "success", message: successMessage, toastId: t }));
|
|
19
|
-
},
|
|
20
|
-
onError: () => {
|
|
21
|
-
toast.custom((t) => /* @__PURE__ */ jsx(Toast, { variant: "error", message: "N\xE3o foi poss\xEDvel copiar o link", toastId: t }));
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
-
TooltipTrigger,
|
|
27
|
-
{
|
|
28
|
-
asChild: true,
|
|
29
|
-
onClick: (e) => {
|
|
30
|
-
e.stopPropagation();
|
|
31
|
-
copy(textToCopy);
|
|
32
|
-
},
|
|
33
|
-
children: /* @__PURE__ */ jsx("span", { className: cn("cursor-pointer text-gray-500", className), children: isCopied ? /* @__PURE__ */ jsx(Check, { size }) : /* @__PURE__ */ jsx(Copy, { size }) })
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
/* @__PURE__ */ jsx(TooltipContent, { children: isCopied ? "Copiado!" : tooltipText })
|
|
37
|
-
] });
|
|
38
|
-
}
|
|
39
|
-
export {
|
|
40
|
-
CopyButton
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=CopyButton.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/buttons/CopyButton.tsx"],"sourcesContent":["'use client';\n\nimport { Check, Copy } from \"lucide-react\";\nimport { toast } from \"sonner\";\nimport { Toast } from \"../feedback/Toast\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../overlay/Tooltip\";\nimport useCopyToClipboard from \"../../../hooks/copy-to-clipboard.hook\";\nimport { cn } from \"../../../infra/utils/clsx\";\n\ninterface CopyButtonProps {\n textToCopy: string;\n size?: number;\n className?: string;\n tooltipText?: string;\n successMessage?: string;\n}\n\nexport function CopyButton({\n textToCopy,\n size = 14,\n className,\n tooltipText = \"Copiar link\",\n successMessage = \"Link copiado\",\n}: CopyButtonProps) {\n const { isCopied, copy } = useCopyToClipboard({\n onSuccess: () => {\n toast.custom((t) => (\n <Toast variant=\"success\" message={successMessage} toastId={t} />\n ));\n },\n onError: () => {\n toast.custom((t) => (\n <Toast variant=\"error\" message=\"Não foi possível copiar o link\" toastId={t} />\n ));\n },\n });\n\n return (\n <Tooltip>\n <TooltipTrigger\n asChild\n onClick={(e: React.MouseEvent) => {\n e.stopPropagation();\n copy(textToCopy);\n }}\n >\n <span className={cn(\"cursor-pointer text-gray-500\", className)}>\n {isCopied ? <Check size={size} /> : <Copy size={size} />}\n </span>\n </TooltipTrigger>\n <TooltipContent>{isCopied ? \"Copiado!\" : tooltipText}</TooltipContent>\n </Tooltip>\n );\n}\n"],"mappings":";AA2BQ,cAWJ,YAXI;AAzBR,SAAS,OAAO,YAAY;AAC5B,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,OAAO,wBAAwB;AAC/B,SAAS,UAAU;AAUZ,SAAS,WAAW;AAAA,EACzB;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,cAAc;AAAA,EACd,iBAAiB;AACnB,GAAoB;AAClB,QAAM,EAAE,UAAU,KAAK,IAAI,mBAAmB;AAAA,IAC5C,WAAW,MAAM;AACf,YAAM,OAAO,CAAC,MACZ,oBAAC,SAAM,SAAQ,WAAU,SAAS,gBAAgB,SAAS,GAAG,CAC/D;AAAA,IACH;AAAA,IACA,SAAS,MAAM;AACb,YAAM,OAAO,CAAC,MACZ,oBAAC,SAAM,SAAQ,SAAQ,SAAQ,wCAAiC,SAAS,GAAG,CAC7E;AAAA,IACH;AAAA,EACF,CAAC;AAED,SACE,qBAAC,WACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,SAAO;AAAA,QACP,SAAS,CAAC,MAAwB;AAChC,YAAE,gBAAgB;AAClB,eAAK,UAAU;AAAA,QACjB;AAAA,QAEA,8BAAC,UAAK,WAAW,GAAG,gCAAgC,SAAS,GAC1D,qBAAW,oBAAC,SAAM,MAAY,IAAK,oBAAC,QAAK,MAAY,GACxD;AAAA;AAAA,IACF;AAAA,IACA,oBAAC,kBAAgB,qBAAW,aAAa,aAAY;AAAA,KACvD;AAEJ;","names":[]}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
6
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
7
|
-
function Accordion({
|
|
8
|
-
...props
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
11
|
-
}
|
|
12
|
-
function AccordionItem({
|
|
13
|
-
className,
|
|
14
|
-
children,
|
|
15
|
-
...props
|
|
16
|
-
}) {
|
|
17
|
-
const itemRef = React.useRef(null);
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
AccordionPrimitive.Item,
|
|
20
|
-
{
|
|
21
|
-
ref: itemRef,
|
|
22
|
-
"data-slot": "accordion-item",
|
|
23
|
-
className: cn("cursor-pointer border rounded-lg p-5", className),
|
|
24
|
-
onClick: (e) => {
|
|
25
|
-
if (e.target.closest("[data-slot='accordion-trigger']")) return;
|
|
26
|
-
const trigger = itemRef.current?.querySelector("[data-slot='accordion-trigger']");
|
|
27
|
-
trigger?.click();
|
|
28
|
-
},
|
|
29
|
-
...props,
|
|
30
|
-
children
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
function AccordionTrigger({
|
|
35
|
-
className,
|
|
36
|
-
children,
|
|
37
|
-
...props
|
|
38
|
-
}) {
|
|
39
|
-
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
40
|
-
AccordionPrimitive.Trigger,
|
|
41
|
-
{
|
|
42
|
-
"data-slot": "accordion-trigger",
|
|
43
|
-
className: cn(
|
|
44
|
-
"cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
45
|
-
className
|
|
46
|
-
),
|
|
47
|
-
...props,
|
|
48
|
-
children: [
|
|
49
|
-
children,
|
|
50
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-5! text-gray-950 pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
) });
|
|
54
|
-
}
|
|
55
|
-
function AccordionContent({
|
|
56
|
-
className,
|
|
57
|
-
children,
|
|
58
|
-
...props
|
|
59
|
-
}) {
|
|
60
|
-
return /* @__PURE__ */ jsx(
|
|
61
|
-
AccordionPrimitive.Content,
|
|
62
|
-
{
|
|
63
|
-
"data-slot": "accordion-content",
|
|
64
|
-
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
65
|
-
...props,
|
|
66
|
-
children: /* @__PURE__ */ jsx("div", { className: cn("pt-3 paragraph-small-regular text-gray-500", className), children })
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
Accordion,
|
|
72
|
-
AccordionContent,
|
|
73
|
-
AccordionItem,
|
|
74
|
-
AccordionTrigger
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=Accordion.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/data-display/Accordion.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\n\nimport * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDownIcon } from \"lucide-react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Accordion({\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />\n}\n\nfunction AccordionItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n const itemRef = React.useRef<HTMLDivElement>(null);\n\n return (\n <AccordionPrimitive.Item\n ref={itemRef}\n data-slot=\"accordion-item\"\n className={cn(\"cursor-pointer border rounded-lg p-5\", className)}\n onClick={(e) => {\n // Evita abrir/fechar quando o clique já é no Trigger\n if ((e.target as HTMLElement).closest(\"[data-slot='accordion-trigger']\")) return;\n\n // Procura o trigger interno e clica nele\n const trigger = itemRef.current?.querySelector(\"[data-slot='accordion-trigger']\") as HTMLElement | null;\n trigger?.click();\n }}\n {...props}\n >\n {children}\n </AccordionPrimitive.Item>\n );\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"size-5! text-gray-950 pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm\"\n {...props}\n >\n <div className={cn(\"pt-3 paragraph-small-regular text-gray-500\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"],"mappings":";AAYS,cAqCH,YArCG;AART,YAAY,WAAW;AACvB,YAAY,wBAAwB;AACpC,SAAS,uBAAuB;AAChC,SAAS,UAAU;AAEnB,SAAS,UAAU;AAAA,EACjB,GAAG;AACL,GAAyD;AACvD,SAAO,oBAAC,mBAAmB,MAAnB,EAAwB,aAAU,aAAa,GAAG,OAAO;AACnE;AAEA,SAAS,cAAc;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAyD;AACvD,QAAM,UAAU,MAAM,OAAuB,IAAI;AAEjD,SACE;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC,KAAK;AAAA,MACL,aAAU;AAAA,MACV,WAAW,GAAG,wCAAwC,SAAS;AAAA,MAC/D,SAAS,CAAC,MAAM;AAEd,YAAK,EAAE,OAAuB,QAAQ,iCAAiC,EAAG;AAG1E,cAAM,UAAU,QAAQ,SAAS,cAAc,iCAAiC;AAChF,iBAAS,MAAM;AAAA,MACjB;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA4D;AAC1D,SACE,oBAAC,mBAAmB,QAAnB,EAA0B,WAAU,QACnC;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACD,oBAAC,mBAAgB,WAAU,wGAAuG;AAAA;AAAA;AAAA,EACpI,GACF;AAEJ;AAEA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA4D;AAC1D,SACE;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,8BAAC,SAAI,WAAW,GAAG,8CAA8C,SAAS,GAAI,UAAS;AAAA;AAAA,EACzF;AAEJ;","names":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
6
|
-
const badgeVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
12
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
13
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
14
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: "default"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
function Badge({
|
|
23
|
-
className,
|
|
24
|
-
variant,
|
|
25
|
-
asChild = false,
|
|
26
|
-
...props
|
|
27
|
-
}) {
|
|
28
|
-
const Comp = asChild ? Slot : "span";
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
Comp,
|
|
31
|
-
{
|
|
32
|
-
"data-slot": "badge",
|
|
33
|
-
className: cn(badgeVariants({ variant }), className),
|
|
34
|
-
...props
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
Badge,
|
|
40
|
-
badgeVariants
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=Badge.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/data-display/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : \"span\"\n\n return (\n <Comp\n data-slot=\"badge\"\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nexport { Badge, badgeVariants }\n"],"mappings":";AAsCI;AAnCJ,SAAS,YAAY;AACrB,SAAS,WAA8B;AACvC,SAAS,UAAU;AAEnB,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,WACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,MACJ;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,SAAS,MAAM;AAAA,EACb;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,GAC8D;AAC5D,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;AAAA,MAClD,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
4
|
-
function Card({ className, ...props }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
"data-slot": "card",
|
|
9
|
-
className: cn(
|
|
10
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
11
|
-
className
|
|
12
|
-
),
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
function CardHeader({ className, ...props }) {
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
"div",
|
|
20
|
-
{
|
|
21
|
-
"data-slot": "card-header",
|
|
22
|
-
className: cn(
|
|
23
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
24
|
-
className
|
|
25
|
-
),
|
|
26
|
-
...props
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
function CardTitle({ className, ...props }) {
|
|
31
|
-
return /* @__PURE__ */ jsx(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
"data-slot": "card-title",
|
|
35
|
-
className: cn("leading-none font-semibold", className),
|
|
36
|
-
...props
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
function CardDescription({ className, ...props }) {
|
|
41
|
-
return /* @__PURE__ */ jsx(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
"data-slot": "card-description",
|
|
45
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
46
|
-
...props
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
function CardAction({ className, ...props }) {
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
"data-slot": "card-action",
|
|
55
|
-
className: cn(
|
|
56
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
57
|
-
className
|
|
58
|
-
),
|
|
59
|
-
...props
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
function CardContent({ className, ...props }) {
|
|
64
|
-
return /* @__PURE__ */ jsx(
|
|
65
|
-
"div",
|
|
66
|
-
{
|
|
67
|
-
"data-slot": "card-content",
|
|
68
|
-
className: cn("px-6", className),
|
|
69
|
-
...props
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
function CardFooter({ className, ...props }) {
|
|
74
|
-
return /* @__PURE__ */ jsx(
|
|
75
|
-
"div",
|
|
76
|
-
{
|
|
77
|
-
"data-slot": "card-footer",
|
|
78
|
-
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
79
|
-
...props
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
export {
|
|
84
|
-
Card,
|
|
85
|
-
CardAction,
|
|
86
|
-
CardContent,
|
|
87
|
-
CardDescription,
|
|
88
|
-
CardFooter,
|
|
89
|
-
CardHeader,
|
|
90
|
-
CardTitle
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=Card.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/data-display/Card.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\";\nimport { cn } from \"../../../infra/utils/clsx\";\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n};\n"],"mappings":";AAOI;AAJJ,SAAS,UAAU;AAEnB,SAAS,KAAK,EAAE,WAAW,GAAG,MAAM,GAAgC;AAClE,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,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,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,GAAgC;AACvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,iCAAiC,SAAS;AAAA,MACvD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,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,YAAY,EAAE,WAAW,GAAG,MAAM,GAAgC;AACzE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,QAAQ,SAAS;AAAA,MAC9B,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2CAA2C,SAAS;AAAA,MACjE,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|