hazo_auth 1.4.2 → 1.6.1
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/README.md +65 -19
- package/SETUP_CHECKLIST.md +779 -0
- package/dist/app/api/hazo_auth/change_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/change_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/change_password/route.js +98 -0
- package/dist/app/api/hazo_auth/forgot_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/forgot_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/forgot_password/route.js +78 -0
- package/dist/app/api/hazo_auth/get_auth/route.d.ts +10 -0
- package/dist/app/api/hazo_auth/get_auth/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/get_auth/route.js +63 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts +14 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/invalidate_cache/route.js +96 -0
- package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.js +82 -0
- package/dist/app/api/hazo_auth/library_photos/route.d.ts +22 -0
- package/dist/app/api/hazo_auth/library_photos/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/library_photos/route.js +80 -0
- package/dist/app/api/hazo_auth/login/route.d.ts +12 -0
- package/dist/app/api/hazo_auth/login/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/login/route.js +140 -0
- package/dist/app/api/hazo_auth/logout/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/logout/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/logout/route.js +71 -0
- package/dist/app/api/hazo_auth/me/route.d.ts +3 -0
- package/dist/app/api/hazo_auth/me/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/me/route.js +34 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts +7 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/profile_picture/[filename]/route.js +43 -0
- package/dist/app/api/hazo_auth/register/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/register/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/register/route.js +80 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/remove_profile_picture/route.js +64 -0
- package/dist/app/api/hazo_auth/resend_verification/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/resend_verification/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/resend_verification/route.js +79 -0
- package/dist/app/api/hazo_auth/reset_password/route.d.ts +8 -0
- package/dist/app/api/hazo_auth/reset_password/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/reset_password/route.js +76 -0
- package/dist/app/api/hazo_auth/update_user/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/update_user/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/update_user/route.js +95 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts +9 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/upload_profile_picture/route.js +204 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts +6 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/validate_reset_token/route.js +58 -0
- package/dist/app/api/hazo_auth/verify_email/route.d.ts +11 -0
- package/dist/app/api/hazo_auth/verify_email/route.d.ts.map +1 -0
- package/dist/app/api/hazo_auth/verify_email/route.js +63 -0
- package/dist/cli/generate.d.ts +7 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +184 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +173 -0
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +201 -0
- package/dist/cli/validate.d.ts +15 -0
- package/dist/cli/validate.d.ts.map +1 -0
- package/dist/cli/validate.js +509 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +45 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +17 -3
- package/dist/lib/services/profile_picture_service.d.ts +34 -2
- package/dist/lib/services/profile_picture_service.d.ts.map +1 -1
- package/dist/lib/services/profile_picture_service.js +157 -15
- package/dist/page_components/forgot_password.d.ts +19 -0
- package/dist/page_components/forgot_password.d.ts.map +1 -0
- package/dist/page_components/forgot_password.js +36 -0
- package/dist/page_components/index.d.ts +7 -0
- package/dist/page_components/index.d.ts.map +1 -0
- package/dist/page_components/index.js +9 -0
- package/dist/page_components/login.d.ts +26 -0
- package/dist/page_components/login.d.ts.map +1 -0
- package/dist/page_components/login.js +40 -0
- package/dist/page_components/my_settings.d.ts +64 -0
- package/dist/page_components/my_settings.d.ts.map +1 -0
- package/dist/page_components/my_settings.js +67 -0
- package/dist/page_components/register.d.ts +25 -0
- package/dist/page_components/register.d.ts.map +1 -0
- package/dist/page_components/register.js +43 -0
- package/dist/page_components/reset_password.d.ts +25 -0
- package/dist/page_components/reset_password.d.ts.map +1 -0
- package/dist/page_components/reset_password.js +43 -0
- package/dist/page_components/verify_email.d.ts +21 -0
- package/dist/page_components/verify_email.d.ts.map +1 -0
- package/dist/page_components/verify_email.js +36 -0
- package/dist/server/routes/change_password.d.ts +2 -0
- package/dist/server/routes/change_password.d.ts.map +1 -0
- package/dist/server/routes/change_password.js +2 -0
- package/dist/server/routes/forgot_password.d.ts +2 -0
- package/dist/server/routes/forgot_password.d.ts.map +1 -0
- package/dist/server/routes/forgot_password.js +2 -0
- package/dist/server/routes/get_auth.d.ts +2 -0
- package/dist/server/routes/get_auth.d.ts.map +1 -0
- package/dist/server/routes/get_auth.js +2 -0
- package/dist/server/routes/index.d.ts +19 -0
- package/dist/server/routes/index.d.ts.map +1 -0
- package/dist/server/routes/index.js +25 -0
- package/dist/server/routes/invalidate_cache.d.ts +2 -0
- package/dist/server/routes/invalidate_cache.d.ts.map +1 -0
- package/dist/server/routes/invalidate_cache.js +2 -0
- package/dist/server/routes/library_photo.d.ts +2 -0
- package/dist/server/routes/library_photo.d.ts.map +1 -0
- package/dist/server/routes/library_photo.js +3 -0
- package/dist/server/routes/library_photos.d.ts +2 -0
- package/dist/server/routes/library_photos.d.ts.map +1 -0
- package/dist/server/routes/library_photos.js +2 -0
- package/dist/server/routes/login.d.ts +2 -0
- package/dist/server/routes/login.d.ts.map +1 -0
- package/dist/server/routes/login.js +2 -0
- package/dist/server/routes/logout.d.ts +2 -0
- package/dist/server/routes/logout.d.ts.map +1 -0
- package/dist/server/routes/logout.js +2 -0
- package/dist/server/routes/me.d.ts +2 -0
- package/dist/server/routes/me.d.ts.map +1 -0
- package/dist/server/routes/me.js +2 -0
- package/dist/server/routes/profile_picture_filename.d.ts +2 -0
- package/dist/server/routes/profile_picture_filename.d.ts.map +1 -0
- package/dist/server/routes/profile_picture_filename.js +3 -0
- package/dist/server/routes/register.d.ts +2 -0
- package/dist/server/routes/register.d.ts.map +1 -0
- package/dist/server/routes/register.js +2 -0
- package/dist/server/routes/remove_profile_picture.d.ts +2 -0
- package/dist/server/routes/remove_profile_picture.d.ts.map +1 -0
- package/dist/server/routes/remove_profile_picture.js +2 -0
- package/dist/server/routes/resend_verification.d.ts +2 -0
- package/dist/server/routes/resend_verification.d.ts.map +1 -0
- package/dist/server/routes/resend_verification.js +2 -0
- package/dist/server/routes/reset_password.d.ts +2 -0
- package/dist/server/routes/reset_password.d.ts.map +1 -0
- package/dist/server/routes/reset_password.js +2 -0
- package/dist/server/routes/update_user.d.ts +2 -0
- package/dist/server/routes/update_user.d.ts.map +1 -0
- package/dist/server/routes/update_user.js +2 -0
- package/dist/server/routes/upload_profile_picture.d.ts +2 -0
- package/dist/server/routes/upload_profile_picture.d.ts.map +1 -0
- package/dist/server/routes/upload_profile_picture.js +2 -0
- package/dist/server/routes/validate_reset_token.d.ts +2 -0
- package/dist/server/routes/validate_reset_token.d.ts.map +1 -0
- package/dist/server/routes/validate_reset_token.js +2 -0
- package/dist/server/routes/verify_email.d.ts +2 -0
- package/dist/server/routes/verify_email.d.ts.map +1 -0
- package/dist/server/routes/verify_email.js +2 -0
- package/package.json +40 -17
- package/components.json +0 -22
- package/instrumentation.ts +0 -32
- package/migrations/001_add_token_type_to_refresh_tokens.sql +0 -14
- package/migrations/002_add_name_to_hazo_users.sql +0 -7
- package/migrations/003_add_url_on_logon_to_hazo_users.sql +0 -8
- package/next.config.mjs +0 -67
- package/postcss.config.mjs +0 -8
- package/public/file.svg +0 -1
- package/public/globe.svg +0 -1
- package/public/next.svg +0 -1
- package/public/vercel.svg +0 -1
- package/public/window.svg +0 -1
- package/scripts/apply_migration.ts +0 -118
- package/scripts/init_users.ts +0 -378
- package/src/app/api/hazo_auth/auth/upload_profile_picture/route.ts +0 -268
- package/src/app/api/hazo_auth/change_password/route.ts +0 -132
- package/src/app/api/hazo_auth/forgot_password/route.ts +0 -107
- package/src/app/api/hazo_auth/get_auth/route.ts +0 -89
- package/src/app/api/hazo_auth/invalidate_cache/route.ts +0 -139
- package/src/app/api/hazo_auth/library_photos/route.ts +0 -73
- package/src/app/api/hazo_auth/login/route.ts +0 -181
- package/src/app/api/hazo_auth/logout/route.ts +0 -89
- package/src/app/api/hazo_auth/me/route.ts +0 -47
- package/src/app/api/hazo_auth/profile_picture/[filename]/route.ts +0 -67
- package/src/app/api/hazo_auth/register/route.ts +0 -109
- package/src/app/api/hazo_auth/remove_profile_picture/route.ts +0 -86
- package/src/app/api/hazo_auth/resend_verification/route.ts +0 -108
- package/src/app/api/hazo_auth/reset_password/route.ts +0 -107
- package/src/app/api/hazo_auth/update_user/route.ts +0 -126
- package/src/app/api/hazo_auth/upload_profile_picture/route.ts +0 -268
- package/src/app/api/hazo_auth/user_management/permissions/route.ts +0 -367
- package/src/app/api/hazo_auth/user_management/roles/route.ts +0 -442
- package/src/app/api/hazo_auth/user_management/users/roles/route.ts +0 -367
- package/src/app/api/hazo_auth/user_management/users/route.ts +0 -239
- package/src/app/api/hazo_auth/validate_reset_token/route.ts +0 -83
- package/src/app/api/hazo_auth/verify_email/route.ts +0 -88
- package/src/app/api/migrations/apply/route.ts +0 -91
- package/src/app/favicon.ico +0 -0
- package/src/app/fonts/GeistMonoVF.woff +0 -0
- package/src/app/fonts/GeistVF.woff +0 -0
- package/src/app/globals.css +0 -89
- package/src/app/hazo_auth/forgot_password/forgot_password_page_client.tsx +0 -60
- package/src/app/hazo_auth/forgot_password/page.tsx +0 -24
- package/src/app/hazo_auth/login/login_page_client.tsx +0 -86
- package/src/app/hazo_auth/login/page.tsx +0 -38
- package/src/app/hazo_auth/my_settings/my_settings_page_client.tsx +0 -120
- package/src/app/hazo_auth/my_settings/page.tsx +0 -40
- package/src/app/hazo_auth/register/page.tsx +0 -36
- package/src/app/hazo_auth/register/register_page_client.tsx +0 -81
- package/src/app/hazo_auth/reset_password/page.tsx +0 -29
- package/src/app/hazo_auth/reset_password/reset_password_page_client.tsx +0 -81
- package/src/app/hazo_auth/user_management/page.tsx +0 -14
- package/src/app/hazo_auth/user_management/user_management_page_client.tsx +0 -16
- package/src/app/hazo_auth/verify_email/page.tsx +0 -24
- package/src/app/hazo_auth/verify_email/verify_email_page_client.tsx +0 -60
- package/src/app/hazo_connect/api/sqlite/data/route.ts +0 -203
- package/src/app/hazo_connect/api/sqlite/schema/route.ts +0 -45
- package/src/app/hazo_connect/api/sqlite/tables/route.ts +0 -36
- package/src/app/hazo_connect/sqlite_admin/page.tsx +0 -51
- package/src/app/hazo_connect/sqlite_admin/sqlite-admin-client.tsx +0 -984
- package/src/app/layout.tsx +0 -43
- package/src/app/page.tsx +0 -170
- package/src/components/index.ts +0 -7
- package/src/components/layouts/email_verification/config/email_verification_field_config.ts +0 -86
- package/src/components/layouts/email_verification/hooks/use_email_verification.ts +0 -297
- package/src/components/layouts/email_verification/index.tsx +0 -297
- package/src/components/layouts/forgot_password/config/forgot_password_field_config.ts +0 -58
- package/src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts +0 -179
- package/src/components/layouts/forgot_password/index.tsx +0 -168
- package/src/components/layouts/index.ts +0 -26
- package/src/components/layouts/login/config/login_field_config.ts +0 -67
- package/src/components/layouts/login/hooks/use_login_form.ts +0 -286
- package/src/components/layouts/login/index.tsx +0 -252
- package/src/components/layouts/my_settings/components/editable_field.tsx +0 -177
- package/src/components/layouts/my_settings/components/password_change_dialog.tsx +0 -301
- package/src/components/layouts/my_settings/components/profile_picture_dialog.tsx +0 -385
- package/src/components/layouts/my_settings/components/profile_picture_display.tsx +0 -66
- package/src/components/layouts/my_settings/components/profile_picture_gravatar_tab.tsx +0 -143
- package/src/components/layouts/my_settings/components/profile_picture_library_tab.tsx +0 -311
- package/src/components/layouts/my_settings/components/profile_picture_upload_tab.tsx +0 -341
- package/src/components/layouts/my_settings/config/my_settings_field_config.ts +0 -61
- package/src/components/layouts/my_settings/hooks/use_my_settings.ts +0 -458
- package/src/components/layouts/my_settings/index.tsx +0 -351
- package/src/components/layouts/register/config/register_field_config.ts +0 -101
- package/src/components/layouts/register/hooks/use_register_form.ts +0 -275
- package/src/components/layouts/register/index.tsx +0 -226
- package/src/components/layouts/reset_password/config/reset_password_field_config.ts +0 -86
- package/src/components/layouts/reset_password/hooks/use_reset_password_form.ts +0 -276
- package/src/components/layouts/reset_password/index.tsx +0 -294
- package/src/components/layouts/shared/components/already_logged_in_guard.tsx +0 -95
- package/src/components/layouts/shared/components/auth_page_shell.tsx +0 -36
- package/src/components/layouts/shared/components/field_error_message.tsx +0 -29
- package/src/components/layouts/shared/components/form_action_buttons.tsx +0 -64
- package/src/components/layouts/shared/components/form_field_wrapper.tsx +0 -44
- package/src/components/layouts/shared/components/form_header.tsx +0 -36
- package/src/components/layouts/shared/components/logout_button.tsx +0 -76
- package/src/components/layouts/shared/components/password_field.tsx +0 -72
- package/src/components/layouts/shared/components/profile_pic_menu.tsx +0 -321
- package/src/components/layouts/shared/components/profile_pic_menu_wrapper.tsx +0 -40
- package/src/components/layouts/shared/components/sidebar_layout_wrapper.tsx +0 -214
- package/src/components/layouts/shared/components/standalone_layout_wrapper.tsx +0 -53
- package/src/components/layouts/shared/components/two_column_auth_layout.tsx +0 -44
- package/src/components/layouts/shared/components/unauthorized_guard.tsx +0 -78
- package/src/components/layouts/shared/components/visual_panel.tsx +0 -41
- package/src/components/layouts/shared/config/layout_customization.ts +0 -95
- package/src/components/layouts/shared/data/layout_data_client.ts +0 -19
- package/src/components/layouts/shared/hooks/use_auth_status.ts +0 -103
- package/src/components/layouts/shared/hooks/use_hazo_auth.ts +0 -158
- package/src/components/layouts/shared/index.ts +0 -34
- package/src/components/layouts/shared/utils/ip_address.ts +0 -37
- package/src/components/layouts/shared/utils/validation.ts +0 -66
- package/src/components/layouts/user_management/components/roles_matrix.tsx +0 -607
- package/src/components/layouts/user_management/index.tsx +0 -1295
- package/src/components/ui/alert-dialog.tsx +0 -141
- package/src/components/ui/avatar.tsx +0 -50
- package/src/components/ui/button.tsx +0 -57
- package/src/components/ui/checkbox.tsx +0 -30
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/dropdown-menu.tsx +0 -201
- package/src/components/ui/hazo_ui_tooltip.tsx +0 -67
- package/src/components/ui/index.ts +0 -22
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/sheet.tsx +0 -139
- package/src/components/ui/sidebar.tsx +0 -773
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/sonner.tsx +0 -31
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/table.tsx +0 -120
- package/src/components/ui/tabs.tsx +0 -55
- package/src/components/ui/tooltip.tsx +0 -32
- package/src/components/ui/vertical-tabs.tsx +0 -59
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/index.ts +0 -7
- package/src/lib/already_logged_in_config.server.ts +0 -46
- package/src/lib/app_logger.ts +0 -24
- package/src/lib/auth/auth_cache.ts +0 -220
- package/src/lib/auth/auth_rate_limiter.ts +0 -121
- package/src/lib/auth/auth_types.ts +0 -65
- package/src/lib/auth/auth_utils.server.ts +0 -196
- package/src/lib/auth/hazo_get_auth.server.ts +0 -333
- package/src/lib/auth/index.ts +0 -23
- package/src/lib/auth/server_auth.ts +0 -88
- package/src/lib/auth_utility_config.server.ts +0 -136
- package/src/lib/config/config_loader.server.ts +0 -164
- package/src/lib/email_verification_config.server.ts +0 -32
- package/src/lib/file_types_config.server.ts +0 -25
- package/src/lib/forgot_password_config.server.ts +0 -32
- package/src/lib/hazo_connect_instance.server.ts +0 -101
- package/src/lib/hazo_connect_setup.server.ts +0 -194
- package/src/lib/hazo_connect_setup.ts +0 -54
- package/src/lib/index.ts +0 -44
- package/src/lib/login_config.server.ts +0 -71
- package/src/lib/messages_config.server.ts +0 -45
- package/src/lib/migrations/apply_migration.ts +0 -105
- package/src/lib/my_settings_config.server.ts +0 -135
- package/src/lib/password_requirements_config.server.ts +0 -39
- package/src/lib/profile_pic_menu_config.server.ts +0 -138
- package/src/lib/profile_picture_config.server.ts +0 -56
- package/src/lib/register_config.server.ts +0 -73
- package/src/lib/reset_password_config.server.ts +0 -75
- package/src/lib/services/email_service.ts +0 -581
- package/src/lib/services/email_verification_service.ts +0 -270
- package/src/lib/services/index.ts +0 -15
- package/src/lib/services/login_service.ts +0 -134
- package/src/lib/services/password_change_service.ts +0 -154
- package/src/lib/services/password_reset_service.ts +0 -405
- package/src/lib/services/profile_picture_remove_service.ts +0 -120
- package/src/lib/services/profile_picture_service.ts +0 -215
- package/src/lib/services/profile_picture_source_mapper.ts +0 -62
- package/src/lib/services/registration_service.ts +0 -184
- package/src/lib/services/token_service.ts +0 -240
- package/src/lib/services/user_profiles_service.ts +0 -143
- package/src/lib/services/user_update_service.ts +0 -141
- package/src/lib/ui_shell_config.server.ts +0 -73
- package/src/lib/ui_sizes_config.server.ts +0 -37
- package/src/lib/user_fields_config.server.ts +0 -31
- package/src/lib/user_management_config.server.ts +0 -39
- package/src/lib/utils/api_route_helpers.ts +0 -60
- package/src/lib/utils/error_sanitizer.ts +0 -75
- package/src/lib/utils.ts +0 -11
- package/src/middleware.ts +0 -94
- package/src/routes/index.ts +0 -34
- package/src/server/config/config_loader.ts +0 -496
- package/src/server/index.ts +0 -38
- package/src/server/logging/logger_service.ts +0 -56
- package/src/server/routes/root_router.ts +0 -16
- package/src/server/server.ts +0 -28
- package/src/server/types/app_types.ts +0 -74
- package/src/server/types/express.d.ts +0 -16
- package/src/stories/email_verification_layout.stories.tsx +0 -137
- package/src/stories/forgot_password_layout.stories.tsx +0 -85
- package/src/stories/login_layout.stories.tsx +0 -85
- package/src/stories/project_overview.stories.tsx +0 -33
- package/src/stories/register_layout.stories.tsx +0 -107
- package/tailwind.config.ts +0 -77
- package/tsconfig.build.json +0 -36
- package/tsconfig.json +0 -28
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils"
|
|
7
|
-
import { buttonVariants } from "./button"
|
|
8
|
-
|
|
9
|
-
const AlertDialog = AlertDialogPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const AlertDialogTrigger = AlertDialogPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const AlertDialogPortal = AlertDialogPrimitive.Portal
|
|
14
|
-
|
|
15
|
-
const AlertDialogOverlay = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
18
|
-
>(({ className, ...props }, ref) => (
|
|
19
|
-
<AlertDialogPrimitive.Overlay
|
|
20
|
-
className={cn(
|
|
21
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
22
|
-
className
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
ref={ref}
|
|
26
|
-
/>
|
|
27
|
-
))
|
|
28
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
|
|
29
|
-
|
|
30
|
-
const AlertDialogContent = React.forwardRef<
|
|
31
|
-
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
32
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
33
|
-
>(({ className, ...props }, ref) => (
|
|
34
|
-
<AlertDialogPortal>
|
|
35
|
-
<AlertDialogOverlay />
|
|
36
|
-
<AlertDialogPrimitive.Content
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cn(
|
|
39
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
40
|
-
className
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
</AlertDialogPortal>
|
|
45
|
-
))
|
|
46
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
|
|
47
|
-
|
|
48
|
-
const AlertDialogHeader = ({
|
|
49
|
-
className,
|
|
50
|
-
...props
|
|
51
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
52
|
-
<div
|
|
53
|
-
className={cn(
|
|
54
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
55
|
-
className
|
|
56
|
-
)}
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
)
|
|
60
|
-
AlertDialogHeader.displayName = "AlertDialogHeader"
|
|
61
|
-
|
|
62
|
-
const AlertDialogFooter = ({
|
|
63
|
-
className,
|
|
64
|
-
...props
|
|
65
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
66
|
-
<div
|
|
67
|
-
className={cn(
|
|
68
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
69
|
-
className
|
|
70
|
-
)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
)
|
|
74
|
-
AlertDialogFooter.displayName = "AlertDialogFooter"
|
|
75
|
-
|
|
76
|
-
const AlertDialogTitle = React.forwardRef<
|
|
77
|
-
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
78
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
79
|
-
>(({ className, ...props }, ref) => (
|
|
80
|
-
<AlertDialogPrimitive.Title
|
|
81
|
-
ref={ref}
|
|
82
|
-
className={cn("text-lg font-semibold", className)}
|
|
83
|
-
{...props}
|
|
84
|
-
/>
|
|
85
|
-
))
|
|
86
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName
|
|
87
|
-
|
|
88
|
-
const AlertDialogDescription = React.forwardRef<
|
|
89
|
-
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
90
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
91
|
-
>(({ className, ...props }, ref) => (
|
|
92
|
-
<AlertDialogPrimitive.Description
|
|
93
|
-
ref={ref}
|
|
94
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
))
|
|
98
|
-
AlertDialogDescription.displayName =
|
|
99
|
-
AlertDialogPrimitive.Description.displayName
|
|
100
|
-
|
|
101
|
-
const AlertDialogAction = React.forwardRef<
|
|
102
|
-
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
103
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
104
|
-
>(({ className, ...props }, ref) => (
|
|
105
|
-
<AlertDialogPrimitive.Action
|
|
106
|
-
ref={ref}
|
|
107
|
-
className={cn(buttonVariants(), className)}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
))
|
|
111
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName
|
|
112
|
-
|
|
113
|
-
const AlertDialogCancel = React.forwardRef<
|
|
114
|
-
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
115
|
-
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
116
|
-
>(({ className, ...props }, ref) => (
|
|
117
|
-
<AlertDialogPrimitive.Cancel
|
|
118
|
-
ref={ref}
|
|
119
|
-
className={cn(
|
|
120
|
-
buttonVariants({ variant: "outline" }),
|
|
121
|
-
"mt-2 sm:mt-0",
|
|
122
|
-
className
|
|
123
|
-
)}
|
|
124
|
-
{...props}
|
|
125
|
-
/>
|
|
126
|
-
))
|
|
127
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName
|
|
128
|
-
|
|
129
|
-
export {
|
|
130
|
-
AlertDialog,
|
|
131
|
-
AlertDialogPortal,
|
|
132
|
-
AlertDialogOverlay,
|
|
133
|
-
AlertDialogTrigger,
|
|
134
|
-
AlertDialogContent,
|
|
135
|
-
AlertDialogHeader,
|
|
136
|
-
AlertDialogFooter,
|
|
137
|
-
AlertDialogTitle,
|
|
138
|
-
AlertDialogDescription,
|
|
139
|
-
AlertDialogAction,
|
|
140
|
-
AlertDialogCancel,
|
|
141
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils"
|
|
7
|
-
|
|
8
|
-
const Avatar = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<AvatarPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
))
|
|
21
|
-
Avatar.displayName = AvatarPrimitive.Root.displayName
|
|
22
|
-
|
|
23
|
-
const AvatarImage = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
26
|
-
>(({ className, ...props }, ref) => (
|
|
27
|
-
<AvatarPrimitive.Image
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn("aspect-square h-full w-full", className)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
))
|
|
33
|
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName
|
|
34
|
-
|
|
35
|
-
const AvatarFallback = React.forwardRef<
|
|
36
|
-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
37
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
38
|
-
>(({ className, ...props }, ref) => (
|
|
39
|
-
<AvatarPrimitive.Fallback
|
|
40
|
-
ref={ref}
|
|
41
|
-
className={cn(
|
|
42
|
-
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
))
|
|
48
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
49
|
-
|
|
50
|
-
export { Avatar, AvatarImage, AvatarFallback }
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils"
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
14
|
-
destructive:
|
|
15
|
-
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
16
|
-
outline:
|
|
17
|
-
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
18
|
-
secondary:
|
|
19
|
-
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
20
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
21
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
default: "h-9 px-4 py-2",
|
|
25
|
-
sm: "h-8 rounded-md px-3 text-xs",
|
|
26
|
-
lg: "h-10 rounded-md px-8",
|
|
27
|
-
icon: "h-9 w-9",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
variant: "default",
|
|
32
|
-
size: "default",
|
|
33
|
-
},
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
export interface ButtonProps
|
|
38
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
39
|
-
VariantProps<typeof buttonVariants> {
|
|
40
|
-
asChild?: boolean
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
44
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
45
|
-
const Comp = asChild ? Slot : "button"
|
|
46
|
-
return (
|
|
47
|
-
<Comp
|
|
48
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
49
|
-
ref={ref}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
Button.displayName = "Button"
|
|
56
|
-
|
|
57
|
-
export { Button, buttonVariants }
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
|
|
5
|
-
import { Check } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
|
|
9
|
-
const Checkbox = React.forwardRef<
|
|
10
|
-
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
11
|
-
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
12
|
-
>(({ className, ...props }, ref) => (
|
|
13
|
-
<CheckboxPrimitive.Root
|
|
14
|
-
ref={ref}
|
|
15
|
-
className={cn(
|
|
16
|
-
"grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
>
|
|
21
|
-
<CheckboxPrimitive.Indicator
|
|
22
|
-
className={cn("grid place-content-center text-current")}
|
|
23
|
-
>
|
|
24
|
-
<Check className="h-4 w-4" />
|
|
25
|
-
</CheckboxPrimitive.Indicator>
|
|
26
|
-
</CheckboxPrimitive.Root>
|
|
27
|
-
))
|
|
28
|
-
Checkbox.displayName = CheckboxPrimitive.Root.displayName
|
|
29
|
-
|
|
30
|
-
export { Checkbox }
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog"
|
|
5
|
-
import { X } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
|
|
9
|
-
const Dialog = DialogPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const DialogTrigger = DialogPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const DialogPortal = DialogPrimitive.Portal
|
|
14
|
-
|
|
15
|
-
const DialogClose = DialogPrimitive.Close
|
|
16
|
-
|
|
17
|
-
const DialogOverlay = React.forwardRef<
|
|
18
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
19
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
20
|
-
>(({ className, ...props }, ref) => (
|
|
21
|
-
<DialogPrimitive.Overlay
|
|
22
|
-
ref={ref}
|
|
23
|
-
className={cn(
|
|
24
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
25
|
-
className
|
|
26
|
-
)}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
))
|
|
30
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
|
|
31
|
-
|
|
32
|
-
const DialogContent = React.forwardRef<
|
|
33
|
-
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
34
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
35
|
-
>(({ className, children, ...props }, ref) => (
|
|
36
|
-
<DialogPortal>
|
|
37
|
-
<DialogOverlay />
|
|
38
|
-
<DialogPrimitive.Content
|
|
39
|
-
ref={ref}
|
|
40
|
-
className={cn(
|
|
41
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
42
|
-
className
|
|
43
|
-
)}
|
|
44
|
-
{...props}
|
|
45
|
-
>
|
|
46
|
-
{children}
|
|
47
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
48
|
-
<X className="h-4 w-4" />
|
|
49
|
-
<span className="sr-only">Close</span>
|
|
50
|
-
</DialogPrimitive.Close>
|
|
51
|
-
</DialogPrimitive.Content>
|
|
52
|
-
</DialogPortal>
|
|
53
|
-
))
|
|
54
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName
|
|
55
|
-
|
|
56
|
-
const DialogHeader = ({
|
|
57
|
-
className,
|
|
58
|
-
...props
|
|
59
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
60
|
-
<div
|
|
61
|
-
className={cn(
|
|
62
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
63
|
-
className
|
|
64
|
-
)}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
)
|
|
68
|
-
DialogHeader.displayName = "DialogHeader"
|
|
69
|
-
|
|
70
|
-
const DialogFooter = ({
|
|
71
|
-
className,
|
|
72
|
-
...props
|
|
73
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
74
|
-
<div
|
|
75
|
-
className={cn(
|
|
76
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
77
|
-
className
|
|
78
|
-
)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
)
|
|
82
|
-
DialogFooter.displayName = "DialogFooter"
|
|
83
|
-
|
|
84
|
-
const DialogTitle = React.forwardRef<
|
|
85
|
-
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
86
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
87
|
-
>(({ className, ...props }, ref) => (
|
|
88
|
-
<DialogPrimitive.Title
|
|
89
|
-
ref={ref}
|
|
90
|
-
className={cn(
|
|
91
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
92
|
-
className
|
|
93
|
-
)}
|
|
94
|
-
{...props}
|
|
95
|
-
/>
|
|
96
|
-
))
|
|
97
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName
|
|
98
|
-
|
|
99
|
-
const DialogDescription = React.forwardRef<
|
|
100
|
-
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
101
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
102
|
-
>(({ className, ...props }, ref) => (
|
|
103
|
-
<DialogPrimitive.Description
|
|
104
|
-
ref={ref}
|
|
105
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
))
|
|
109
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName
|
|
110
|
-
|
|
111
|
-
export {
|
|
112
|
-
Dialog,
|
|
113
|
-
DialogPortal,
|
|
114
|
-
DialogOverlay,
|
|
115
|
-
DialogTrigger,
|
|
116
|
-
DialogClose,
|
|
117
|
-
DialogContent,
|
|
118
|
-
DialogHeader,
|
|
119
|
-
DialogFooter,
|
|
120
|
-
DialogTitle,
|
|
121
|
-
DialogDescription,
|
|
122
|
-
}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
|
|
9
|
-
const DropdownMenu = DropdownMenuPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const DropdownMenuGroup = DropdownMenuPrimitive.Group
|
|
14
|
-
|
|
15
|
-
const DropdownMenuPortal = DropdownMenuPrimitive.Portal
|
|
16
|
-
|
|
17
|
-
const DropdownMenuSub = DropdownMenuPrimitive.Sub
|
|
18
|
-
|
|
19
|
-
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
|
|
20
|
-
|
|
21
|
-
const DropdownMenuSubTrigger = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
-
inset?: boolean
|
|
25
|
-
}
|
|
26
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
27
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn(
|
|
30
|
-
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
31
|
-
inset && "pl-8",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
<ChevronRight className="ml-auto" />
|
|
38
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
39
|
-
))
|
|
40
|
-
DropdownMenuSubTrigger.displayName =
|
|
41
|
-
DropdownMenuPrimitive.SubTrigger.displayName
|
|
42
|
-
|
|
43
|
-
const DropdownMenuSubContent = React.forwardRef<
|
|
44
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
45
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
46
|
-
>(({ className, ...props }, ref) => (
|
|
47
|
-
<DropdownMenuPrimitive.SubContent
|
|
48
|
-
ref={ref}
|
|
49
|
-
className={cn(
|
|
50
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
))
|
|
56
|
-
DropdownMenuSubContent.displayName =
|
|
57
|
-
DropdownMenuPrimitive.SubContent.displayName
|
|
58
|
-
|
|
59
|
-
const DropdownMenuContent = React.forwardRef<
|
|
60
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
62
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
63
|
-
<DropdownMenuPrimitive.Portal>
|
|
64
|
-
<DropdownMenuPrimitive.Content
|
|
65
|
-
ref={ref}
|
|
66
|
-
sideOffset={sideOffset}
|
|
67
|
-
className={cn(
|
|
68
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
69
|
-
"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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
70
|
-
className
|
|
71
|
-
)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
</DropdownMenuPrimitive.Portal>
|
|
75
|
-
))
|
|
76
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
|
|
77
|
-
|
|
78
|
-
const DropdownMenuItem = React.forwardRef<
|
|
79
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
80
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
81
|
-
inset?: boolean
|
|
82
|
-
}
|
|
83
|
-
>(({ className, inset, ...props }, ref) => (
|
|
84
|
-
<DropdownMenuPrimitive.Item
|
|
85
|
-
ref={ref}
|
|
86
|
-
className={cn(
|
|
87
|
-
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
88
|
-
inset && "pl-8",
|
|
89
|
-
className
|
|
90
|
-
)}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
))
|
|
94
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
|
|
95
|
-
|
|
96
|
-
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
97
|
-
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
98
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
99
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
100
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
101
|
-
ref={ref}
|
|
102
|
-
className={cn(
|
|
103
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
104
|
-
className
|
|
105
|
-
)}
|
|
106
|
-
checked={checked}
|
|
107
|
-
{...props}
|
|
108
|
-
>
|
|
109
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
110
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
111
|
-
<Check className="h-4 w-4" />
|
|
112
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
113
|
-
</span>
|
|
114
|
-
{children}
|
|
115
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
116
|
-
))
|
|
117
|
-
DropdownMenuCheckboxItem.displayName =
|
|
118
|
-
DropdownMenuPrimitive.CheckboxItem.displayName
|
|
119
|
-
|
|
120
|
-
const DropdownMenuRadioItem = React.forwardRef<
|
|
121
|
-
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
122
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
123
|
-
>(({ className, children, ...props }, ref) => (
|
|
124
|
-
<DropdownMenuPrimitive.RadioItem
|
|
125
|
-
ref={ref}
|
|
126
|
-
className={cn(
|
|
127
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
128
|
-
className
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
>
|
|
132
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
133
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
134
|
-
<Circle className="h-2 w-2 fill-current" />
|
|
135
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
136
|
-
</span>
|
|
137
|
-
{children}
|
|
138
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
139
|
-
))
|
|
140
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
|
141
|
-
|
|
142
|
-
const DropdownMenuLabel = React.forwardRef<
|
|
143
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
144
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
145
|
-
inset?: boolean
|
|
146
|
-
}
|
|
147
|
-
>(({ className, inset, ...props }, ref) => (
|
|
148
|
-
<DropdownMenuPrimitive.Label
|
|
149
|
-
ref={ref}
|
|
150
|
-
className={cn(
|
|
151
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
152
|
-
inset && "pl-8",
|
|
153
|
-
className
|
|
154
|
-
)}
|
|
155
|
-
{...props}
|
|
156
|
-
/>
|
|
157
|
-
))
|
|
158
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
|
|
159
|
-
|
|
160
|
-
const DropdownMenuSeparator = React.forwardRef<
|
|
161
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
162
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
163
|
-
>(({ className, ...props }, ref) => (
|
|
164
|
-
<DropdownMenuPrimitive.Separator
|
|
165
|
-
ref={ref}
|
|
166
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
167
|
-
{...props}
|
|
168
|
-
/>
|
|
169
|
-
))
|
|
170
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
|
|
171
|
-
|
|
172
|
-
const DropdownMenuShortcut = ({
|
|
173
|
-
className,
|
|
174
|
-
...props
|
|
175
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
176
|
-
return (
|
|
177
|
-
<span
|
|
178
|
-
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
|
|
184
|
-
|
|
185
|
-
export {
|
|
186
|
-
DropdownMenu,
|
|
187
|
-
DropdownMenuTrigger,
|
|
188
|
-
DropdownMenuContent,
|
|
189
|
-
DropdownMenuItem,
|
|
190
|
-
DropdownMenuCheckboxItem,
|
|
191
|
-
DropdownMenuRadioItem,
|
|
192
|
-
DropdownMenuLabel,
|
|
193
|
-
DropdownMenuSeparator,
|
|
194
|
-
DropdownMenuShortcut,
|
|
195
|
-
DropdownMenuGroup,
|
|
196
|
-
DropdownMenuPortal,
|
|
197
|
-
DropdownMenuSub,
|
|
198
|
-
DropdownMenuSubContent,
|
|
199
|
-
DropdownMenuSubTrigger,
|
|
200
|
-
DropdownMenuRadioGroup,
|
|
201
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// file_description: reusable tooltip component for hazo_auth with question mark icon
|
|
2
|
-
// section: client_directive
|
|
3
|
-
"use client";
|
|
4
|
-
|
|
5
|
-
// section: imports
|
|
6
|
-
import { HelpCircle } from "lucide-react";
|
|
7
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip";
|
|
8
|
-
|
|
9
|
-
// section: types
|
|
10
|
-
export type HazoUITooltipProps = {
|
|
11
|
-
/**
|
|
12
|
-
* The tooltip message to display
|
|
13
|
-
*/
|
|
14
|
-
message: string;
|
|
15
|
-
/**
|
|
16
|
-
* Optional custom icon size (default: 16)
|
|
17
|
-
*/
|
|
18
|
-
iconSize?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Optional custom icon className
|
|
21
|
-
*/
|
|
22
|
-
iconClassName?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Optional side for tooltip placement (default: "top")
|
|
25
|
-
*/
|
|
26
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// section: component
|
|
30
|
-
/**
|
|
31
|
-
* Reusable tooltip component with question mark icon
|
|
32
|
-
* Displays a help icon that shows a tooltip message on hover
|
|
33
|
-
* @param props - Component props including message, icon size, and placement
|
|
34
|
-
* @returns Tooltip component with question mark icon
|
|
35
|
-
*/
|
|
36
|
-
export function HazoUITooltip({
|
|
37
|
-
message,
|
|
38
|
-
iconSize = 16,
|
|
39
|
-
iconClassName = "text-slate-400 hover:text-slate-600",
|
|
40
|
-
side = "top",
|
|
41
|
-
}: HazoUITooltipProps) {
|
|
42
|
-
return (
|
|
43
|
-
<TooltipProvider>
|
|
44
|
-
<Tooltip>
|
|
45
|
-
<TooltipTrigger asChild>
|
|
46
|
-
<button
|
|
47
|
-
type="button"
|
|
48
|
-
className="cls_hazo_ui_tooltip_trigger inline-flex items-start focus:outline-none align-super"
|
|
49
|
-
aria-label="Help"
|
|
50
|
-
style={{ verticalAlign: "super" }}
|
|
51
|
-
>
|
|
52
|
-
<HelpCircle
|
|
53
|
-
size={iconSize}
|
|
54
|
-
className={`cls_hazo_ui_tooltip_icon ${iconClassName}`}
|
|
55
|
-
aria-hidden="true"
|
|
56
|
-
style={{ transform: "translateY(-0.2em)" }}
|
|
57
|
-
/>
|
|
58
|
-
</button>
|
|
59
|
-
</TooltipTrigger>
|
|
60
|
-
<TooltipContent side={side} className="cls_hazo_ui_tooltip_content">
|
|
61
|
-
<p className="cls_hazo_ui_tooltip_message">{message}</p>
|
|
62
|
-
</TooltipContent>
|
|
63
|
-
</Tooltip>
|
|
64
|
-
</TooltipProvider>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// file_description: barrel export for all UI components
|
|
2
|
-
// section: exports
|
|
3
|
-
export * from "./alert-dialog";
|
|
4
|
-
export * from "./avatar";
|
|
5
|
-
export * from "./button";
|
|
6
|
-
export * from "./checkbox";
|
|
7
|
-
export * from "./dialog";
|
|
8
|
-
export * from "./dropdown-menu";
|
|
9
|
-
export * from "./hazo_ui_tooltip";
|
|
10
|
-
export * from "./input";
|
|
11
|
-
export * from "./label";
|
|
12
|
-
export * from "./separator";
|
|
13
|
-
export * from "./sheet";
|
|
14
|
-
export * from "./sidebar";
|
|
15
|
-
export * from "./skeleton";
|
|
16
|
-
export * from "./sonner";
|
|
17
|
-
export * from "./switch";
|
|
18
|
-
export * from "./table";
|
|
19
|
-
export * from "./tabs";
|
|
20
|
-
export * from "./tooltip";
|
|
21
|
-
export * from "./vertical-tabs";
|
|
22
|
-
|