@greatapps/common 1.1.169 → 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/components/layouts/ProfilePopover.tsx +9 -12
- 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 -150
- 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,92 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState, forwardRef, useEffect } from "react";
|
|
4
|
-
import { format } from "date-fns";
|
|
5
|
-
import { Calendar as CalendarIcon } from "lucide-react";
|
|
6
|
-
import { Calendar } from "./Calendar";
|
|
7
|
-
import { Popover, PopoverContent, PopoverTrigger } from "../overlay/Popover";
|
|
8
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
9
|
-
const isoParaDataLocal = (iso) => {
|
|
10
|
-
const [ano, mes, dia] = iso.split("-").map(Number);
|
|
11
|
-
return new Date(ano, mes - 1, dia);
|
|
12
|
-
};
|
|
13
|
-
const DateRangePicker = forwardRef(
|
|
14
|
-
({ value, onChange, placeholder = "Selecione o per\xEDodo", className, disabled }, ref) => {
|
|
15
|
-
const [open, setOpen] = useState(false);
|
|
16
|
-
const [range, setRange] = useState(() => {
|
|
17
|
-
if (value?.from && value?.to) {
|
|
18
|
-
return {
|
|
19
|
-
from: isoParaDataLocal(value.from),
|
|
20
|
-
to: isoParaDataLocal(value.to)
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
return void 0;
|
|
24
|
-
});
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (value?.from && value?.to) {
|
|
27
|
-
setRange({
|
|
28
|
-
from: isoParaDataLocal(value.from),
|
|
29
|
-
to: isoParaDataLocal(value.to)
|
|
30
|
-
});
|
|
31
|
-
} else {
|
|
32
|
-
setRange(void 0);
|
|
33
|
-
}
|
|
34
|
-
}, [value]);
|
|
35
|
-
const handleRangeSelect = (newRange) => {
|
|
36
|
-
setRange(newRange);
|
|
37
|
-
if (newRange?.from && newRange?.to) {
|
|
38
|
-
onChange?.({
|
|
39
|
-
from: format(newRange.from, "yyyy-MM-dd"),
|
|
40
|
-
to: format(newRange.to, "yyyy-MM-dd")
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
onChange?.(void 0);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const displayText = range?.from && range?.to ? `${format(range.from, "dd/MM/yyyy")} - ${format(range.to, "dd/MM/yyyy")}` : placeholder;
|
|
47
|
-
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
48
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
49
|
-
"button",
|
|
50
|
-
{
|
|
51
|
-
ref,
|
|
52
|
-
disabled,
|
|
53
|
-
className: cn(
|
|
54
|
-
"flex items-center gap-2 px-4 h-10 border rounded-lg transition-colors w-full justify-start",
|
|
55
|
-
"border-gray-200 hover:border-gray-400 focus-within:border-gray-950",
|
|
56
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
57
|
-
className
|
|
58
|
-
),
|
|
59
|
-
children: [
|
|
60
|
-
/* @__PURE__ */ jsx(CalendarIcon, { size: 20, className: "text-gray-400" }),
|
|
61
|
-
/* @__PURE__ */ jsx("span", { className: cn(
|
|
62
|
-
"paragraph-small-medium",
|
|
63
|
-
range?.from && range?.to ? "text-gray-950" : "text-gray-500"
|
|
64
|
-
), children: displayText })
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
) }),
|
|
68
|
-
/* @__PURE__ */ jsx(
|
|
69
|
-
PopoverContent,
|
|
70
|
-
{
|
|
71
|
-
className: "w-auto p-0 bg-white rounded-2xl shadow-md border border-gray-200",
|
|
72
|
-
align: "start",
|
|
73
|
-
sideOffset: 8,
|
|
74
|
-
children: /* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx(
|
|
75
|
-
Calendar,
|
|
76
|
-
{
|
|
77
|
-
mode: "range",
|
|
78
|
-
selected: range,
|
|
79
|
-
onSelect: handleRangeSelect,
|
|
80
|
-
numberOfMonths: 1
|
|
81
|
-
}
|
|
82
|
-
) })
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
] });
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
DateRangePicker.displayName = "DateRangePicker";
|
|
89
|
-
export {
|
|
90
|
-
DateRangePicker
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=DateRangePicker.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/form/DateRangePicker.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, forwardRef, useEffect } from \"react\";\nimport { format } from \"date-fns\";\nimport { Calendar as CalendarIcon } from \"lucide-react\";\nimport { DateRange } from \"react-day-picker\";\nimport { Calendar } from \"./Calendar\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../overlay/Popover\";\nimport { cn } from \"../../../infra/utils/clsx\";\n\n// Converte string ISO (yyyy-MM-dd) para Date no fuso horário local\n// Evita bug de timezone onde new Date(\"2025-08-02\") interpreta como UTC\nconst isoParaDataLocal = (iso: string): Date => {\n const [ano, mes, dia] = iso.split(\"-\").map(Number);\n return new Date(ano, mes - 1, dia);\n};\n\ninterface DateRangePickerProps {\n value?: { from: string; to: string };\n onChange?: (range: { from: string; to: string } | undefined) => void;\n placeholder?: string;\n className?: string;\n disabled?: boolean;\n}\n\nexport const DateRangePicker = forwardRef<HTMLButtonElement, DateRangePickerProps>(\n ({ value, onChange, placeholder = \"Selecione o período\", className, disabled }, ref) => {\n const [open, setOpen] = useState(false);\n const [range, setRange] = useState<DateRange | undefined>(() => {\n if (value?.from && value?.to) {\n return {\n from: isoParaDataLocal(value.from),\n to: isoParaDataLocal(value.to)\n };\n }\n return undefined;\n });\n\n useEffect(() => {\n if (value?.from && value?.to) {\n setRange({\n from: isoParaDataLocal(value.from),\n to: isoParaDataLocal(value.to)\n });\n } else {\n setRange(undefined);\n }\n }, [value]);\n\n const handleRangeSelect = (newRange: DateRange | undefined) => {\n setRange(newRange);\n\n if (newRange?.from && newRange?.to) {\n onChange?.({\n from: format(newRange.from, \"yyyy-MM-dd\"),\n to: format(newRange.to, \"yyyy-MM-dd\")\n });\n } else {\n onChange?.(undefined);\n }\n };\n\n const displayText = range?.from && range?.to\n ? `${format(range.from, \"dd/MM/yyyy\")} - ${format(range.to, \"dd/MM/yyyy\")}`\n : placeholder;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n ref={ref}\n disabled={disabled}\n className={cn(\n \"flex items-center gap-2 px-4 h-10 border rounded-lg transition-colors w-full justify-start\",\n \"border-gray-200 hover:border-gray-400 focus-within:border-gray-950\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n className\n )}\n >\n <CalendarIcon size={20} className=\"text-gray-400\" />\n <span className={cn(\n \"paragraph-small-medium\",\n range?.from && range?.to ? \"text-gray-950\" : \"text-gray-500\"\n )}>\n {displayText}\n </span>\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-auto p-0 bg-white rounded-2xl shadow-md border border-gray-200\"\n align=\"start\"\n sideOffset={8}\n >\n <div className=\"p-3\">\n <Calendar\n mode=\"range\"\n selected={range}\n onSelect={handleRangeSelect}\n numberOfMonths={1}\n />\n </div>\n </PopoverContent>\n </Popover>\n );\n }\n);\n\nDateRangePicker.displayName = \"DateRangePicker\";\n"],"mappings":";AAqEU,SAUE,KAVF;AAnEV,SAAS,UAAU,YAAY,iBAAiB;AAChD,SAAS,cAAc;AACvB,SAAS,YAAY,oBAAoB;AAEzC,SAAS,gBAAgB;AACzB,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,UAAU;AAInB,MAAM,mBAAmB,CAAC,QAAsB;AAC9C,QAAM,CAAC,KAAK,KAAK,GAAG,IAAI,IAAI,MAAM,GAAG,EAAE,IAAI,MAAM;AACjD,SAAO,IAAI,KAAK,KAAK,MAAM,GAAG,GAAG;AACnC;AAUO,MAAM,kBAAkB;AAAA,EAC7B,CAAC,EAAE,OAAO,UAAU,cAAc,0BAAuB,WAAW,SAAS,GAAG,QAAQ;AACtF,UAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,UAAM,CAAC,OAAO,QAAQ,IAAI,SAAgC,MAAM;AAC9D,UAAI,OAAO,QAAQ,OAAO,IAAI;AAC5B,eAAO;AAAA,UACL,MAAM,iBAAiB,MAAM,IAAI;AAAA,UACjC,IAAI,iBAAiB,MAAM,EAAE;AAAA,QAC/B;AAAA,MACF;AACA,aAAO;AAAA,IACT,CAAC;AAED,cAAU,MAAM;AACd,UAAI,OAAO,QAAQ,OAAO,IAAI;AAC5B,iBAAS;AAAA,UACP,MAAM,iBAAiB,MAAM,IAAI;AAAA,UACjC,IAAI,iBAAiB,MAAM,EAAE;AAAA,QAC/B,CAAC;AAAA,MACH,OAAO;AACL,iBAAS,MAAS;AAAA,MACpB;AAAA,IACF,GAAG,CAAC,KAAK,CAAC;AAEV,UAAM,oBAAoB,CAAC,aAAoC;AAC7D,eAAS,QAAQ;AAEjB,UAAI,UAAU,QAAQ,UAAU,IAAI;AAClC,mBAAW;AAAA,UACT,MAAM,OAAO,SAAS,MAAM,YAAY;AAAA,UACxC,IAAI,OAAO,SAAS,IAAI,YAAY;AAAA,QACtC,CAAC;AAAA,MACH,OAAO;AACL,mBAAW,MAAS;AAAA,MACtB;AAAA,IACF;AAEA,UAAM,cAAc,OAAO,QAAQ,OAAO,KACtC,GAAG,OAAO,MAAM,MAAM,YAAY,CAAC,MAAM,OAAO,MAAM,IAAI,YAAY,CAAC,KACvE;AAEJ,WACE,qBAAC,WAAQ,MAAY,cAAc,SACjC;AAAA,0BAAC,kBAAe,SAAO,MACrB;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,UAEA;AAAA,gCAAC,gBAAa,MAAM,IAAI,WAAU,iBAAgB;AAAA,YAClD,oBAAC,UAAK,WAAW;AAAA,cACf;AAAA,cACA,OAAO,QAAQ,OAAO,KAAK,kBAAkB;AAAA,YAC/C,GACG,uBACH;AAAA;AAAA;AAAA,MACF,GACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAM;AAAA,UACN,YAAY;AAAA,UAEZ,8BAAC,SAAI,WAAU,OACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAU;AAAA,cACV,UAAU;AAAA,cACV,gBAAgB;AAAA;AAAA,UAClB,GACF;AAAA;AAAA,MACF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,gBAAgB,cAAc;","names":[]}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import { Lock, Eye, EyeOff } from "lucide-react";
|
|
5
|
-
import { Input } from "./Input";
|
|
6
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
7
|
-
const FormField = forwardRef(
|
|
8
|
-
({
|
|
9
|
-
label,
|
|
10
|
-
optional = false,
|
|
11
|
-
required = false,
|
|
12
|
-
leftIcon: LeftIcon,
|
|
13
|
-
rightIcon: RightIcon,
|
|
14
|
-
rightIconColor = "var(--color-gray-400)",
|
|
15
|
-
hintMessage,
|
|
16
|
-
size = "default",
|
|
17
|
-
type = "text",
|
|
18
|
-
error = false,
|
|
19
|
-
errorMessage,
|
|
20
|
-
className,
|
|
21
|
-
classnameContainer,
|
|
22
|
-
showCharCount = false,
|
|
23
|
-
showPassword = false,
|
|
24
|
-
onTogglePassword,
|
|
25
|
-
...inputProps
|
|
26
|
-
}, ref) => {
|
|
27
|
-
const isPasswordField = type === "password";
|
|
28
|
-
const inputType = isPasswordField && showPassword ? "text" : type;
|
|
29
|
-
const containerHeight = size === "large" ? "h-12" : "h-10";
|
|
30
|
-
const FinalLeftIcon = isPasswordField ? Lock : LeftIcon;
|
|
31
|
-
const FinalRightIcon = isPasswordField ? !showPassword ? EyeOff : Eye : RightIcon;
|
|
32
|
-
const finalMessage = error && errorMessage ? errorMessage : hintMessage;
|
|
33
|
-
const messageColor = error ? "text-red-600" : "text-gray-600";
|
|
34
|
-
const currentLength = typeof inputProps.value === "string" ? inputProps.value.length : 0;
|
|
35
|
-
const shouldShowCharCount = showCharCount && inputProps.maxLength;
|
|
36
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
|
|
37
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 paragraph-xsmall-semibold truncate", children: [
|
|
38
|
-
label && /* @__PURE__ */ jsx("span", { className: "text-gray-600", children: label }),
|
|
39
|
-
optional && /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "(Opcional)" }),
|
|
40
|
-
required && /* @__PURE__ */ jsx("span", { className: "text-red-600", children: "*" })
|
|
41
|
-
] }),
|
|
42
|
-
/* @__PURE__ */ jsxs(
|
|
43
|
-
"div",
|
|
44
|
-
{
|
|
45
|
-
className: cn(
|
|
46
|
-
"flex gap-2 px-4 items-center border rounded-lg transition-color",
|
|
47
|
-
containerHeight,
|
|
48
|
-
classnameContainer,
|
|
49
|
-
error ? "border-red-600 hover:border-red-700" : "border-gray-200 hover:border-gray-400 focus-within:border-gray-950"
|
|
50
|
-
),
|
|
51
|
-
children: [
|
|
52
|
-
FinalLeftIcon && /* @__PURE__ */ jsx(FinalLeftIcon, { size: 20, className: "text-gray-400" }),
|
|
53
|
-
/* @__PURE__ */ jsx(
|
|
54
|
-
Input,
|
|
55
|
-
{
|
|
56
|
-
ref,
|
|
57
|
-
type: inputType,
|
|
58
|
-
className: cn(
|
|
59
|
-
"paragraph-small-medium w-full h-full text-gray-950",
|
|
60
|
-
error && "placeholder:text-red-400",
|
|
61
|
-
className
|
|
62
|
-
),
|
|
63
|
-
...inputProps
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
FinalRightIcon && /* @__PURE__ */ jsx(
|
|
67
|
-
"button",
|
|
68
|
-
{
|
|
69
|
-
type: "button",
|
|
70
|
-
onClick: isPasswordField ? onTogglePassword : void 0,
|
|
71
|
-
className: cn(
|
|
72
|
-
"flex items-center justify-center",
|
|
73
|
-
isPasswordField && "cursor-pointer hover:opacity-70 transition-opacity"
|
|
74
|
-
),
|
|
75
|
-
"aria-label": isPasswordField ? showPassword ? "Ocultar senha" : "Mostrar senha" : void 0,
|
|
76
|
-
children: /* @__PURE__ */ jsx(
|
|
77
|
-
FinalRightIcon,
|
|
78
|
-
{
|
|
79
|
-
size: 20,
|
|
80
|
-
color: isPasswordField ? "var(--color-gray-950)" : rightIconColor
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
finalMessage && /* @__PURE__ */ jsx("span", { className: cn("paragraph-xsmall-medium", messageColor), children: finalMessage }),
|
|
89
|
-
shouldShowCharCount && /* @__PURE__ */ jsxs("span", { className: "paragraph-xsmall-medium text-gray-600", children: [
|
|
90
|
-
currentLength,
|
|
91
|
-
"/",
|
|
92
|
-
inputProps.maxLength
|
|
93
|
-
] })
|
|
94
|
-
] });
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
FormField.displayName = "FormField";
|
|
98
|
-
var FormField_default = FormField;
|
|
99
|
-
export {
|
|
100
|
-
FormField,
|
|
101
|
-
FormField_default as default
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=FormField.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/form/FormField.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { forwardRef, type ComponentPropsWithoutRef } from 'react';\r\nimport { Lock, Eye, EyeOff, type LucideIcon } from 'lucide-react';\r\nimport { Input } from './Input';\r\nimport { cn } from '../../../infra/utils/clsx';\r\n\r\ntype FormFieldSize = 'default' | 'large';\r\n\r\ninterface FormFieldProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'> {\r\n label?: string;\r\n optional?: boolean;\r\n required?: boolean;\r\n leftIcon?: LucideIcon;\r\n rightIcon?: LucideIcon;\r\n rightIconColor?: string;\r\n hintMessage?: string;\r\n classnameContainer?: string;\r\n size?: FormFieldSize;\r\n error?: boolean;\r\n errorMessage?: string;\r\n showCharCount?: boolean;\r\n showPassword?: boolean;\r\n onTogglePassword?: () => void;\r\n}\r\n\r\nexport const FormField = forwardRef<HTMLInputElement, FormFieldProps>(\r\n (\r\n {\r\n label,\r\n optional = false,\r\n required = false,\r\n leftIcon: LeftIcon,\r\n rightIcon: RightIcon,\r\n rightIconColor = 'var(--color-gray-400)',\r\n hintMessage,\r\n size = 'default',\r\n type = 'text',\r\n error = false,\r\n errorMessage,\r\n className,\r\n classnameContainer,\r\n showCharCount = false,\r\n showPassword = false,\r\n onTogglePassword,\r\n ...inputProps\r\n },\r\n ref\r\n ) => {\r\n const isPasswordField = type === 'password';\r\n const inputType = isPasswordField && showPassword ? 'text' : type;\r\n const containerHeight = size === 'large' ? 'h-12' : 'h-10';\r\n\r\n const FinalLeftIcon = isPasswordField ? Lock : LeftIcon;\r\n const FinalRightIcon = isPasswordField ? (!showPassword ? EyeOff : Eye) : RightIcon;\r\n\r\n const finalMessage = error && errorMessage ? errorMessage : hintMessage;\r\n const messageColor = error ? 'text-red-600' : 'text-gray-600';\r\n\r\n const currentLength = typeof inputProps.value === 'string' ? inputProps.value.length : 0;\r\n const shouldShowCharCount = showCharCount && inputProps.maxLength;\r\n\r\n return (\r\n <div className=\"flex flex-col gap-1.5 w-full\">\r\n <div className=\"flex items-center gap-1 paragraph-xsmall-semibold truncate\">\r\n {label && <span className=\"text-gray-600\">{label}</span>}\r\n {optional && <span className=\"text-gray-500\">(Opcional)</span>}\r\n {required && <span className=\"text-red-600\">*</span>}\r\n </div>\r\n\r\n <div\r\n className={cn(\r\n 'flex gap-2 px-4 items-center border rounded-lg transition-color',\r\n containerHeight,\r\n classnameContainer,\r\n error\r\n ? 'border-red-600 hover:border-red-700'\r\n : 'border-gray-200 hover:border-gray-400 focus-within:border-gray-950'\r\n )}\r\n >\r\n {FinalLeftIcon && <FinalLeftIcon size={20} className=\"text-gray-400\" />}\r\n\r\n <Input\r\n ref={ref}\r\n type={inputType}\r\n className={cn(\r\n 'paragraph-small-medium w-full h-full text-gray-950',\r\n error && 'placeholder:text-red-400',\r\n className\r\n )}\r\n {...inputProps}\r\n />\r\n\r\n {FinalRightIcon && (\r\n <button\r\n type=\"button\"\r\n onClick={isPasswordField ? onTogglePassword : undefined}\r\n className={cn(\r\n 'flex items-center justify-center',\r\n isPasswordField && 'cursor-pointer hover:opacity-70 transition-opacity'\r\n )}\r\n aria-label={\r\n isPasswordField ? (showPassword ? 'Ocultar senha' : 'Mostrar senha') : undefined\r\n }\r\n >\r\n <FinalRightIcon\r\n size={20}\r\n color={isPasswordField ? 'var(--color-gray-950)' : rightIconColor}\r\n />\r\n </button>\r\n )}\r\n </div>\r\n\r\n {finalMessage && (\r\n <span className={cn('paragraph-xsmall-medium', messageColor)}>{finalMessage}</span>\r\n )}\r\n\r\n {shouldShowCharCount && (\r\n <span className=\"paragraph-xsmall-medium text-gray-600\">\r\n {currentLength}/{inputProps.maxLength}\r\n </span>\r\n )}\r\n </div>\r\n );\r\n }\r\n);\r\n\r\nFormField.displayName = 'FormField';\r\n\r\nexport default FormField;\r\n"],"mappings":";AAgEQ,SACY,KADZ;AA9DR,SAAS,kBAAiD;AAC1D,SAAS,MAAM,KAAK,cAA+B;AACnD,SAAS,aAAa;AACtB,SAAS,UAAU;AAqBZ,MAAM,YAAY;AAAA,EACvB,CACE;AAAA,IACE;AAAA,IACA,WAAW;AAAA,IACX,WAAW;AAAA,IACX,UAAU;AAAA,IACV,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,kBAAkB,SAAS;AACjC,UAAM,YAAY,mBAAmB,eAAe,SAAS;AAC7D,UAAM,kBAAkB,SAAS,UAAU,SAAS;AAEpD,UAAM,gBAAgB,kBAAkB,OAAO;AAC/C,UAAM,iBAAiB,kBAAmB,CAAC,eAAe,SAAS,MAAO;AAE1E,UAAM,eAAe,SAAS,eAAe,eAAe;AAC5D,UAAM,eAAe,QAAQ,iBAAiB;AAE9C,UAAM,gBAAgB,OAAO,WAAW,UAAU,WAAW,WAAW,MAAM,SAAS;AACvF,UAAM,sBAAsB,iBAAiB,WAAW;AAExD,WACE,qBAAC,SAAI,WAAU,gCACb;AAAA,2BAAC,SAAI,WAAU,8DACZ;AAAA,iBAAS,oBAAC,UAAK,WAAU,iBAAiB,iBAAM;AAAA,QAChD,YAAY,oBAAC,UAAK,WAAU,iBAAgB,wBAAU;AAAA,QACtD,YAAY,oBAAC,UAAK,WAAU,gBAAe,eAAC;AAAA,SAC/C;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA,QACI,wCACA;AAAA,UACN;AAAA,UAEC;AAAA,6BAAiB,oBAAC,iBAAc,MAAM,IAAI,WAAU,iBAAgB;AAAA,YAErE;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,MAAM;AAAA,gBACN,WAAW;AAAA,kBACT;AAAA,kBACA,SAAS;AAAA,kBACT;AAAA,gBACF;AAAA,gBACC,GAAG;AAAA;AAAA,YACN;AAAA,YAEC,kBACC;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAS,kBAAkB,mBAAmB;AAAA,gBAC9C,WAAW;AAAA,kBACT;AAAA,kBACA,mBAAmB;AAAA,gBACrB;AAAA,gBACA,cACE,kBAAmB,eAAe,kBAAkB,kBAAmB;AAAA,gBAGzE;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM;AAAA,oBACN,OAAO,kBAAkB,0BAA0B;AAAA;AAAA,gBACrD;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MAEJ;AAAA,MAEC,gBACC,oBAAC,UAAK,WAAW,GAAG,2BAA2B,YAAY,GAAI,wBAAa;AAAA,MAG7E,uBACC,qBAAC,UAAK,WAAU,yCACb;AAAA;AAAA,QAAc;AAAA,QAAE,WAAW;AAAA,SAC9B;AAAA,OAEJ;AAAA,EAEJ;AACF;AAEA,UAAU,cAAc;AAExB,IAAO,oBAAQ;","names":[]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
4
|
-
function Input({ className, type, ...props }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
"input",
|
|
7
|
-
{
|
|
8
|
-
type,
|
|
9
|
-
"data-slot": "input",
|
|
10
|
-
className: cn(
|
|
11
|
-
"outline-none",
|
|
12
|
-
className
|
|
13
|
-
),
|
|
14
|
-
...props
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
Input
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=Input.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/form/Input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"outline-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":";AAOI;AAJJ,SAAS,UAAU;AAEnB,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,MAAM,GAAkC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { OTPInput, OTPInputContext } from "input-otp";
|
|
5
|
-
import { MinusIcon } from "lucide-react";
|
|
6
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
7
|
-
function InputOTP({
|
|
8
|
-
className,
|
|
9
|
-
containerClassName,
|
|
10
|
-
...props
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ jsx(
|
|
13
|
-
OTPInput,
|
|
14
|
-
{
|
|
15
|
-
"data-slot": "input-otp",
|
|
16
|
-
containerClassName: cn(
|
|
17
|
-
"flex items-center gap-2 has-disabled:opacity-50",
|
|
18
|
-
containerClassName
|
|
19
|
-
),
|
|
20
|
-
className: cn("disabled:cursor-not-allowed", className),
|
|
21
|
-
...props
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
function InputOTPGroup({ className, ...props }) {
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
"data-slot": "input-otp-group",
|
|
30
|
-
className: cn("flex items-center", className),
|
|
31
|
-
...props
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
function InputOTPSlot({
|
|
36
|
-
index,
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}) {
|
|
40
|
-
const inputOTPContext = React.useContext(OTPInputContext);
|
|
41
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
42
|
-
return /* @__PURE__ */ jsxs(
|
|
43
|
-
"div",
|
|
44
|
-
{
|
|
45
|
-
"data-slot": "input-otp-slot",
|
|
46
|
-
"data-active": isActive,
|
|
47
|
-
className: cn(
|
|
48
|
-
"relative flex h-9 w-9 items-center justify-center border text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md",
|
|
49
|
-
"border-gray-200 hover:border-gray-400 data-[active=true]:border-gray-950",
|
|
50
|
-
"data-[active=true]:z-10",
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
...props,
|
|
54
|
-
children: [
|
|
55
|
-
char,
|
|
56
|
-
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
function InputOTPSeparator({ ...props }) {
|
|
62
|
-
return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
InputOTP,
|
|
66
|
-
InputOTPGroup,
|
|
67
|
-
InputOTPSeparator,
|
|
68
|
-
InputOTPSlot
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=InputOtp.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/form/InputOtp.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\n\nimport * as React from \"react\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\nimport { MinusIcon } from \"lucide-react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center\", className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"relative flex h-9 w-9 items-center justify-center border text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md\",\n \"border-gray-200 hover:border-gray-400 data-[active=true]:border-gray-950\",\n \"data-[active=true]:z-10\",\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n"],"mappings":";AAiBI,cAiCA,YAjCA;AAbJ,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAC1C,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AAEnB,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,oBAAoB;AAAA,QAClB;AAAA,QACA;AAAA,MACF;AAAA,MACA,WAAW,GAAG,+BAA+B,SAAS;AAAA,MACrD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,qBAAqB,SAAS;AAAA,MAC3C,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEG;AACD,QAAM,kBAAkB,MAAM,WAAW,eAAe;AACxD,QAAM,EAAE,MAAM,cAAc,SAAS,IAAI,iBAAiB,MAAM,KAAK,KAAK,CAAC;AAE3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,eAAa;AAAA,MACb,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,gBACC,oBAAC,SAAI,WAAU,yEACb,8BAAC,SAAI,WAAU,4DAA2D,GAC5E;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,SAAS,kBAAkB,EAAE,GAAG,MAAM,GAAgC;AACpE,SACE,oBAAC,SAAI,aAAU,uBAAsB,MAAK,aAAa,GAAG,OACxD,8BAAC,aAAU,GACb;AAEJ;","names":[]}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import Image from "next/image";
|
|
5
|
-
import { Input } from "./Input";
|
|
6
|
-
import { Separator } from "../data-display/Separator";
|
|
7
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
8
|
-
const PhoneInput = forwardRef(
|
|
9
|
-
({
|
|
10
|
-
label,
|
|
11
|
-
optional = false,
|
|
12
|
-
required = false,
|
|
13
|
-
hintMessage,
|
|
14
|
-
error = false,
|
|
15
|
-
errorMessage,
|
|
16
|
-
countryCode = "+55",
|
|
17
|
-
countryFlagSrc = "/icons/brazil-flag.svg",
|
|
18
|
-
countryFlagAlt = "Brazil flag",
|
|
19
|
-
className,
|
|
20
|
-
classnameContainer,
|
|
21
|
-
...props
|
|
22
|
-
}, ref) => {
|
|
23
|
-
const finalMessage = error && errorMessage ? errorMessage : hintMessage;
|
|
24
|
-
const showMessage = finalMessage && finalMessage.trim() !== "";
|
|
25
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1.5"), children: [
|
|
26
|
-
label && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 paragraph-xsmall-semibold", children: [
|
|
27
|
-
/* @__PURE__ */ jsx("span", { className: "text-gray-600", children: label }),
|
|
28
|
-
optional && /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "(Opcional)" }),
|
|
29
|
-
required && /* @__PURE__ */ jsx("span", { className: "text-red-600", children: "*" })
|
|
30
|
-
] }),
|
|
31
|
-
/* @__PURE__ */ jsxs(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: cn(
|
|
35
|
-
"flex gap-2 items-center border rounded-lg h-10 transition-colors",
|
|
36
|
-
error ? "border-red-600 hover:border-red-700" : "border-gray-200 hover:border-gray-400 focus-within:border-gray-950",
|
|
37
|
-
classnameContainer
|
|
38
|
-
),
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4", children: [
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
Image,
|
|
43
|
-
{
|
|
44
|
-
src: countryFlagSrc,
|
|
45
|
-
alt: countryFlagAlt,
|
|
46
|
-
width: 20,
|
|
47
|
-
height: 20,
|
|
48
|
-
className: "h-5! w-5! rounded-full"
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-gray-950", children: countryCode })
|
|
52
|
-
] }),
|
|
53
|
-
/* @__PURE__ */ jsx(Separator, { orientation: "vertical" }),
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
55
|
-
Input,
|
|
56
|
-
{
|
|
57
|
-
ref,
|
|
58
|
-
type: "tel",
|
|
59
|
-
className: cn(
|
|
60
|
-
"paragraph-small-medium w-full h-full text-gray-950 border-0 focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
61
|
-
className
|
|
62
|
-
),
|
|
63
|
-
...props
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
showMessage && /* @__PURE__ */ jsx("span", { className: cn("paragraph-xsmall-medium", error ? "text-red-600" : "text-gray-600"), children: finalMessage })
|
|
70
|
-
] });
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
PhoneInput.displayName = "PhoneInput";
|
|
74
|
-
var PhoneInput_default = PhoneInput;
|
|
75
|
-
export {
|
|
76
|
-
PhoneInput_default as default
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=PhoneInput.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/form/PhoneInput.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { ComponentPropsWithoutRef, forwardRef } from 'react';\r\nimport Image from 'next/image';\r\nimport { Input } from './Input';\r\nimport { Separator } from '../data-display/Separator';\r\nimport { cn } from '../../../infra/utils/clsx';\r\n\r\ninterface PhoneInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type'> {\r\n label?: string;\r\n optional?: boolean;\r\n required?: boolean;\r\n hintMessage?: string;\r\n error?: boolean;\r\n errorMessage?: string;\r\n countryCode?: string;\r\n countryFlagSrc?: string;\r\n countryFlagAlt?: string;\r\n classnameContainer?: string;\r\n}\r\n\r\nconst PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(\r\n (\r\n {\r\n label,\r\n optional = false,\r\n required = false,\r\n hintMessage,\r\n error = false,\r\n errorMessage,\r\n countryCode = '+55',\r\n countryFlagSrc = '/icons/brazil-flag.svg',\r\n countryFlagAlt = 'Brazil flag',\r\n className,\r\n classnameContainer,\r\n ...props\r\n },\r\n ref\r\n ) => {\r\n const finalMessage = error && errorMessage ? errorMessage : hintMessage;\r\n const showMessage = finalMessage && finalMessage.trim() !== '';\r\n\r\n return (\r\n <div className={cn('flex flex-col gap-1.5')}>\r\n {label && (\r\n <div className=\"flex items-center gap-1 paragraph-xsmall-semibold\">\r\n <span className=\"text-gray-600\">{label}</span>\r\n {optional && <span className=\"text-gray-500\">(Opcional)</span>}\r\n {required && <span className=\"text-red-600\">*</span>}\r\n </div>\r\n )}\r\n\r\n <div\r\n className={cn(\r\n 'flex gap-2 items-center border rounded-lg h-10 transition-colors',\r\n error\r\n ? 'border-red-600 hover:border-red-700'\r\n : 'border-gray-200 hover:border-gray-400 focus-within:border-gray-950',\r\n classnameContainer\r\n )}\r\n >\r\n <div className=\"flex items-center gap-2 px-4\">\r\n <Image\r\n src={countryFlagSrc}\r\n alt={countryFlagAlt}\r\n width={20}\r\n height={20}\r\n className=\"h-5! w-5! rounded-full\"\r\n />\r\n <span className=\"paragraph-small-regular text-gray-950\">{countryCode}</span>\r\n </div>\r\n\r\n <Separator orientation=\"vertical\" />\r\n\r\n <Input\r\n ref={ref}\r\n type=\"tel\"\r\n className={cn(\r\n 'paragraph-small-medium w-full h-full text-gray-950 border-0 focus-visible:ring-0 focus-visible:ring-offset-0',\r\n className\r\n )}\r\n {...props}\r\n />\r\n </div>\r\n\r\n {showMessage && (\r\n <span className={cn('paragraph-xsmall-medium', error ? 'text-red-600' : 'text-gray-600')}>\r\n {finalMessage}\r\n </span>\r\n )}\r\n </div>\r\n );\r\n }\r\n);\r\n\r\nPhoneInput.displayName = 'PhoneInput';\r\n\r\nexport default PhoneInput;\r\n"],"mappings":";AA6CU,SACE,KADF;AA3CV,SAAmC,kBAAkB;AACrD,OAAO,WAAW;AAClB,SAAS,aAAa;AACtB,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AAenB,MAAM,aAAa;AAAA,EACjB,CACE;AAAA,IACE;AAAA,IACA,WAAW;AAAA,IACX,WAAW;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,eAAe,SAAS,eAAe,eAAe;AAC5D,UAAM,cAAc,gBAAgB,aAAa,KAAK,MAAM;AAE5D,WACE,qBAAC,SAAI,WAAW,GAAG,uBAAuB,GACvC;AAAA,eACC,qBAAC,SAAI,WAAU,qDACb;AAAA,4BAAC,UAAK,WAAU,iBAAiB,iBAAM;AAAA,QACtC,YAAY,oBAAC,UAAK,WAAU,iBAAgB,wBAAU;AAAA,QACtD,YAAY,oBAAC,UAAK,WAAU,gBAAe,eAAC;AAAA,SAC/C;AAAA,MAGF;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA,QACI,wCACA;AAAA,YACJ;AAAA,UACF;AAAA,UAEA;AAAA,iCAAC,SAAI,WAAU,gCACb;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,KAAK;AAAA,kBACL,KAAK;AAAA,kBACL,OAAO;AAAA,kBACP,QAAQ;AAAA,kBACR,WAAU;AAAA;AAAA,cACZ;AAAA,cACA,oBAAC,UAAK,WAAU,yCAAyC,uBAAY;AAAA,eACvE;AAAA,YAEA,oBAAC,aAAU,aAAY,YAAW;AAAA,YAElC;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,MAAK;AAAA,gBACL,WAAW;AAAA,kBACT;AAAA,kBACA;AAAA,gBACF;AAAA,gBACC,GAAG;AAAA;AAAA,YACN;AAAA;AAAA;AAAA,MACF;AAAA,MAEC,eACC,oBAAC,UAAK,WAAW,GAAG,2BAA2B,QAAQ,iBAAiB,eAAe,GACpF,wBACH;AAAA,OAEJ;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;AAEzB,IAAO,qBAAQ;","names":[]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
5
|
-
import { Circle } from "lucide-react";
|
|
6
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
7
|
-
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
-
RadioGroupPrimitive.Root,
|
|
10
|
-
{
|
|
11
|
-
className: cn("grid gap-2", className),
|
|
12
|
-
...props,
|
|
13
|
-
ref
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
});
|
|
17
|
-
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
18
|
-
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
RadioGroupPrimitive.Item,
|
|
21
|
-
{
|
|
22
|
-
ref,
|
|
23
|
-
className: cn(
|
|
24
|
-
"aspect-square h-4 w-4 rounded-full border border-gray-300 text-gray-950 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
25
|
-
className
|
|
26
|
-
),
|
|
27
|
-
...props,
|
|
28
|
-
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
});
|
|
32
|
-
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
33
|
-
export {
|
|
34
|
-
RadioGroup,
|
|
35
|
-
RadioGroupItem
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=RadioGroup.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/form/RadioGroup.tsx"],"sourcesContent":["'use client';\n\n\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { Circle } from \"lucide-react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-gray-300 text-gray-950 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";AAcI;AAVJ,YAAY,WAAW;AACvB,YAAY,yBAAyB;AACrC,SAAS,cAAc;AACvB,SAAS,UAAU;AAEnB,MAAM,aAAa,MAAM,WAGvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAClC,SACE;AAAA,IAAC,oBAAoB;AAAA,IAApB;AAAA,MACC,WAAW,GAAG,cAAc,SAAS;AAAA,MACpC,GAAG;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ,CAAC;AACD,WAAW,cAAc,oBAAoB,KAAK;AAElD,MAAM,iBAAiB,MAAM,WAG3B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAClC,SACE;AAAA,IAAC,oBAAoB;AAAA,IAApB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,8BAAC,oBAAoB,WAApB,EAA8B,WAAU,oCACvC,8BAAC,UAAO,WAAU,yCAAwC,GAC5D;AAAA;AAAA,EACF;AAEJ,CAAC;AACD,eAAe,cAAc,oBAAoB,KAAK;","names":[]}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
|
-
import { cn } from "../../../infra/utils/clsx";
|
|
6
|
-
function Select({
|
|
7
|
-
...props
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
10
|
-
}
|
|
11
|
-
function SelectGroup({
|
|
12
|
-
...props
|
|
13
|
-
}) {
|
|
14
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
15
|
-
}
|
|
16
|
-
function SelectValue({
|
|
17
|
-
...props
|
|
18
|
-
}) {
|
|
19
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
20
|
-
}
|
|
21
|
-
function SelectTrigger({
|
|
22
|
-
className,
|
|
23
|
-
size = "default",
|
|
24
|
-
children,
|
|
25
|
-
icon,
|
|
26
|
-
...props
|
|
27
|
-
}) {
|
|
28
|
-
return /* @__PURE__ */ jsxs(
|
|
29
|
-
SelectPrimitive.Trigger,
|
|
30
|
-
{
|
|
31
|
-
"data-slot": "select-trigger",
|
|
32
|
-
"data-size": size,
|
|
33
|
-
className: cn(
|
|
34
|
-
"group/data-select border-input data-placeholder:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 cursor-pointer",
|
|
35
|
-
className
|
|
36
|
-
),
|
|
37
|
-
...props,
|
|
38
|
-
children: [
|
|
39
|
-
children,
|
|
40
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: icon ?? /* @__PURE__ */ jsx(
|
|
41
|
-
ChevronDownIcon,
|
|
42
|
-
{
|
|
43
|
-
className: "\n size-4 opacity-50 transition-all duration-200\n group-data-[state=open]/data-select:rotate-180\n group-data-[state=open]/data-select:opacity-100\n group-data-[state=open]/data-select:text-gray-950!\n "
|
|
44
|
-
}
|
|
45
|
-
) })
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
function SelectContent({
|
|
51
|
-
className,
|
|
52
|
-
children,
|
|
53
|
-
position = "popper",
|
|
54
|
-
align = "center",
|
|
55
|
-
...props
|
|
56
|
-
}) {
|
|
57
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
58
|
-
SelectPrimitive.Content,
|
|
59
|
-
{
|
|
60
|
-
"data-slot": "select-content",
|
|
61
|
-
className: cn(
|
|
62
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-[1001] max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
63
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
64
|
-
className
|
|
65
|
-
),
|
|
66
|
-
position,
|
|
67
|
-
align,
|
|
68
|
-
...props,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
71
|
-
/* @__PURE__ */ jsx(
|
|
72
|
-
SelectPrimitive.Viewport,
|
|
73
|
-
{
|
|
74
|
-
className: cn(
|
|
75
|
-
"p-1",
|
|
76
|
-
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"
|
|
77
|
-
),
|
|
78
|
-
children
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
) });
|
|
85
|
-
}
|
|
86
|
-
function SelectLabel({
|
|
87
|
-
className,
|
|
88
|
-
...props
|
|
89
|
-
}) {
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
SelectPrimitive.Label,
|
|
92
|
-
{
|
|
93
|
-
"data-slot": "select-label",
|
|
94
|
-
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
95
|
-
...props
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
function SelectItem({
|
|
100
|
-
className,
|
|
101
|
-
children,
|
|
102
|
-
...props
|
|
103
|
-
}) {
|
|
104
|
-
return /* @__PURE__ */ jsxs(
|
|
105
|
-
SelectPrimitive.Item,
|
|
106
|
-
{
|
|
107
|
-
"data-slot": "select-item",
|
|
108
|
-
className: cn(
|
|
109
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 cursor-pointer",
|
|
110
|
-
className
|
|
111
|
-
),
|
|
112
|
-
...props,
|
|
113
|
-
children: [
|
|
114
|
-
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
115
|
-
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { className: "cursor-pointer", children })
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
function SelectSeparator({
|
|
121
|
-
className,
|
|
122
|
-
...props
|
|
123
|
-
}) {
|
|
124
|
-
return /* @__PURE__ */ jsx(
|
|
125
|
-
SelectPrimitive.Separator,
|
|
126
|
-
{
|
|
127
|
-
"data-slot": "select-separator",
|
|
128
|
-
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
129
|
-
...props
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
function SelectScrollUpButton({
|
|
134
|
-
className,
|
|
135
|
-
...props
|
|
136
|
-
}) {
|
|
137
|
-
return /* @__PURE__ */ jsx(
|
|
138
|
-
SelectPrimitive.ScrollUpButton,
|
|
139
|
-
{
|
|
140
|
-
"data-slot": "select-scroll-up-button",
|
|
141
|
-
className: cn(
|
|
142
|
-
"flex cursor-default items-center justify-center py-1",
|
|
143
|
-
className
|
|
144
|
-
),
|
|
145
|
-
...props,
|
|
146
|
-
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
function SelectScrollDownButton({
|
|
151
|
-
className,
|
|
152
|
-
...props
|
|
153
|
-
}) {
|
|
154
|
-
return /* @__PURE__ */ jsx(
|
|
155
|
-
SelectPrimitive.ScrollDownButton,
|
|
156
|
-
{
|
|
157
|
-
"data-slot": "select-scroll-down-button",
|
|
158
|
-
className: cn(
|
|
159
|
-
"flex cursor-default items-center justify-center py-1",
|
|
160
|
-
className
|
|
161
|
-
),
|
|
162
|
-
...props,
|
|
163
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
164
|
-
}
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
export {
|
|
168
|
-
Select,
|
|
169
|
-
SelectContent,
|
|
170
|
-
SelectGroup,
|
|
171
|
-
SelectItem,
|
|
172
|
-
SelectLabel,
|
|
173
|
-
SelectScrollDownButton,
|
|
174
|
-
SelectScrollUpButton,
|
|
175
|
-
SelectSeparator,
|
|
176
|
-
SelectTrigger,
|
|
177
|
-
SelectValue
|
|
178
|
-
};
|
|
179
|
-
//# sourceMappingURL=Select.mjs.map
|