moonhead 1.0.0
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 +32 -0
- package/dist/components/layout/app-header.d.ts +1 -0
- package/dist/components/layout/app-header.js +1 -0
- package/dist/components/layout/app-sidebar.d.ts +9 -0
- package/dist/components/layout/app-sidebar.js +1 -0
- package/dist/components/layout/brand-logo.d.ts +2 -0
- package/dist/components/layout/brand-logo.js +1 -0
- package/dist/components/layout/user-menu.d.ts +6 -0
- package/dist/components/layout/user-menu.js +1 -0
- package/dist/components/ui/action-form.d.ts +10 -0
- package/dist/components/ui/action-form.js +1 -0
- package/dist/components/ui/alert-dialog.d.ts +14 -0
- package/dist/components/ui/alert-dialog.js +1 -0
- package/dist/components/ui/alert.d.ts +12 -0
- package/dist/components/ui/alert.js +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.js +1 -0
- package/dist/components/ui/badge.d.ts +2 -0
- package/dist/components/ui/badge.js +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.js +1 -0
- package/dist/components/ui/card.d.ts +2 -0
- package/dist/components/ui/card.js +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +1 -0
- package/dist/components/ui/combobox.d.ts +18 -0
- package/dist/components/ui/combobox.js +1 -0
- package/dist/components/ui/copy-button.d.ts +8 -0
- package/dist/components/ui/copy-button.js +1 -0
- package/dist/components/ui/country-select.d.ts +12 -0
- package/dist/components/ui/country-select.js +1 -0
- package/dist/components/ui/data-table.d.ts +11 -0
- package/dist/components/ui/data-table.js +1 -0
- package/dist/components/ui/date-range-picker.d.ts +25 -0
- package/dist/components/ui/date-range-picker.js +1 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +1 -0
- package/dist/components/ui/drawer.d.ts +24 -0
- package/dist/components/ui/drawer.js +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +17 -0
- package/dist/components/ui/dropdown-menu.js +1 -0
- package/dist/components/ui/field.d.ts +7 -0
- package/dist/components/ui/field.js +1 -0
- package/dist/components/ui/fieldset.d.ts +4 -0
- package/dist/components/ui/fieldset.js +1 -0
- package/dist/components/ui/form-field.d.ts +17 -0
- package/dist/components/ui/form-field.js +1 -0
- package/dist/components/ui/form.d.ts +3 -0
- package/dist/components/ui/form.js +1 -0
- package/dist/components/ui/icon-tile.d.ts +5 -0
- package/dist/components/ui/icon-tile.js +1 -0
- package/dist/components/ui/identity.d.ts +6 -0
- package/dist/components/ui/identity.js +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.js +1 -0
- package/dist/components/ui/number-input.d.ts +19 -0
- package/dist/components/ui/number-input.js +1 -0
- package/dist/components/ui/otp-field.d.ts +6 -0
- package/dist/components/ui/otp-field.js +1 -0
- package/dist/components/ui/page-toolbar.d.ts +9 -0
- package/dist/components/ui/page-toolbar.js +1 -0
- package/dist/components/ui/password-input.d.ts +7 -0
- package/dist/components/ui/password-input.js +1 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +1 -0
- package/dist/components/ui/search-input.d.ts +4 -0
- package/dist/components/ui/search-input.js +1 -0
- package/dist/components/ui/section-card.d.ts +7 -0
- package/dist/components/ui/section-card.js +1 -0
- package/dist/components/ui/select-field.d.ts +19 -0
- package/dist/components/ui/select-field.js +1 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +1 -0
- package/dist/components/ui/sidebar.d.ts +27 -0
- package/dist/components/ui/sidebar.js +1 -0
- package/dist/components/ui/slider.d.ts +10 -0
- package/dist/components/ui/slider.js +1 -0
- package/dist/components/ui/sort-button.d.ts +5 -0
- package/dist/components/ui/sort-button.js +1 -0
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +1 -0
- package/dist/components/ui/status-badge.d.ts +11 -0
- package/dist/components/ui/status-badge.js +1 -0
- package/dist/components/ui/switch-field.d.ts +18 -0
- package/dist/components/ui/switch-field.js +1 -0
- package/dist/components/ui/switch.d.ts +3 -0
- package/dist/components/ui/switch.js +1 -0
- package/dist/components/ui/table-pagination.d.ts +9 -0
- package/dist/components/ui/table-pagination.js +1 -0
- package/dist/components/ui/table.d.ts +18 -0
- package/dist/components/ui/table.js +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.js +1 -0
- package/dist/components/ui/tag-input.d.ts +9 -0
- package/dist/components/ui/tag-input.js +1 -0
- package/dist/components/ui/text-link.d.ts +10 -0
- package/dist/components/ui/text-link.js +1 -0
- package/dist/components/ui/textarea.d.ts +2 -0
- package/dist/components/ui/textarea.js +1 -0
- package/dist/components/ui/toast.d.ts +1 -0
- package/dist/components/ui/toast.js +1 -0
- package/dist/components/ui/tree.d.ts +32 -0
- package/dist/components/ui/tree.js +1 -0
- package/dist/db/client.d.ts +8 -0
- package/dist/db/client.js +1 -0
- package/dist/db/index.d.ts +3 -0
- package/dist/db/index.js +1 -0
- package/dist/db/logger.d.ts +2 -0
- package/dist/db/logger.js +1 -0
- package/dist/db/migrations/20260628182304_wonderful_groot/migration.sql +289 -0
- package/dist/db/migrations/20260628182304_wonderful_groot/snapshot.json +3750 -0
- package/dist/db/migrations/20260630082829_wet_robin_chapel/migration.sql +2 -0
- package/dist/db/migrations/20260630082829_wet_robin_chapel/snapshot.json +3791 -0
- package/dist/db/migrations/20260702132335_wooden_iron_monger/migration.sql +48 -0
- package/dist/db/migrations/20260702132335_wooden_iron_monger/snapshot.json +4407 -0
- package/dist/db/migrations/20260702142948_vengeful_rhino/migration.sql +1 -0
- package/dist/db/migrations/20260702142948_vengeful_rhino/snapshot.json +4420 -0
- package/dist/db/migrations/20260702185813_curved_pyro/migration.sql +16 -0
- package/dist/db/migrations/20260702185813_curved_pyro/snapshot.json +4646 -0
- package/dist/db/migrations/20260702192041_shiny_franklin_storm/migration.sql +16 -0
- package/dist/db/migrations/20260702192041_shiny_franklin_storm/snapshot.json +4872 -0
- package/dist/db/migrations/20260704101548_bizarre_namorita/migration.sql +1 -0
- package/dist/db/migrations/20260704101548_bizarre_namorita/snapshot.json +4885 -0
- package/dist/db/migrations/20260704105911_sleepy_juggernaut/migration.sql +1 -0
- package/dist/db/migrations/20260704105911_sleepy_juggernaut/snapshot.json +4898 -0
- package/dist/db/migrations/20260704115959_lean_sandman/migration.sql +1 -0
- package/dist/db/migrations/20260704115959_lean_sandman/snapshot.json +4885 -0
- package/dist/db/migrations/20260707231532_daffy_captain_stacy/migration.sql +10 -0
- package/dist/db/migrations/20260707231532_daffy_captain_stacy/snapshot.json +4919 -0
- package/dist/db/migrations/20260708190355_spooky_jimmy_woo/migration.sql +3 -0
- package/dist/db/migrations/20260708190355_spooky_jimmy_woo/snapshot.json +4970 -0
- package/dist/db/migrations/20260711145212_drop_legacy_earning_status/migration.sql +7 -0
- package/dist/db/migrations/20260711145212_drop_legacy_earning_status/snapshot.json +4968 -0
- package/dist/db/migrations/20260712161249_dashboard_stat_indexes/migration.sql +3 -0
- package/dist/db/migrations/20260712161249_dashboard_stat_indexes/snapshot.json +5038 -0
- package/dist/db/migrations/20260713013911_add_payout_paid_at/migration.sql +2 -0
- package/dist/db/migrations/20260713013911_add_payout_paid_at/snapshot.json +5072 -0
- package/dist/db/schema/analytics-outbox.d.ts +145 -0
- package/dist/db/schema/analytics-outbox.js +1 -0
- package/dist/db/schema/audit-logs.d.ts +204 -0
- package/dist/db/schema/audit-logs.js +1 -0
- package/dist/db/schema/campaigns.d.ts +180 -0
- package/dist/db/schema/campaigns.js +1 -0
- package/dist/db/schema/casinos.d.ts +129 -0
- package/dist/db/schema/casinos.js +1 -0
- package/dist/db/schema/commission-rule-groups.d.ts +84 -0
- package/dist/db/schema/commission-rule-groups.js +1 -0
- package/dist/db/schema/commission-rules.d.ts +145 -0
- package/dist/db/schema/commission-rules.js +1 -0
- package/dist/db/schema/commissions.d.ts +242 -0
- package/dist/db/schema/commissions.js +1 -0
- package/dist/db/schema/conversions.d.ts +302 -0
- package/dist/db/schema/conversions.js +1 -0
- package/dist/db/schema/deals.d.ts +180 -0
- package/dist/db/schema/deals.js +1 -0
- package/dist/db/schema/earnings.d.ts +262 -0
- package/dist/db/schema/earnings.js +1 -0
- package/dist/db/schema/groups.d.ts +214 -0
- package/dist/db/schema/groups.js +1 -0
- package/dist/db/schema/index.d.ts +18 -0
- package/dist/db/schema/index.js +1 -0
- package/dist/db/schema/payouts.d.ts +182 -0
- package/dist/db/schema/payouts.js +1 -0
- package/dist/db/schema/platform-settings.d.ts +84 -0
- package/dist/db/schema/platform-settings.js +1 -0
- package/dist/db/schema/player-activity.d.ts +159 -0
- package/dist/db/schema/player-activity.js +1 -0
- package/dist/db/schema/revshare-carryover.d.ts +129 -0
- package/dist/db/schema/revshare-carryover.js +1 -0
- package/dist/db/schema/sessions.d.ts +213 -0
- package/dist/db/schema/sessions.js +1 -0
- package/dist/db/schema/table.d.ts +1 -0
- package/dist/db/schema/table.js +1 -0
- package/dist/db/schema/users.d.ts +609 -0
- package/dist/db/schema/users.js +1 -0
- package/dist/db/schema/verification-tokens.d.ts +106 -0
- package/dist/db/schema/verification-tokens.js +1 -0
- package/dist/db/types/branded.d.ts +3 -0
- package/dist/db/types/branded.js +0 -0
- package/dist/db/types/commission-rules.d.ts +70 -0
- package/dist/db/types/commission-rules.js +1 -0
- package/dist/db/types/index.d.ts +2 -0
- package/dist/db/types/index.js +1 -0
- package/dist/emails/admin/support-message.d.ts +39 -0
- package/dist/emails/admin/support-message.js +5 -0
- package/dist/emails/affiliate/activated.d.ts +33 -0
- package/dist/emails/affiliate/activated.js +1 -0
- package/dist/emails/affiliate/deal-notice.d.ts +35 -0
- package/dist/emails/affiliate/deal-notice.js +1 -0
- package/dist/emails/affiliate/invite.d.ts +35 -0
- package/dist/emails/affiliate/invite.js +1 -0
- package/dist/emails/affiliate/signup-verify.d.ts +35 -0
- package/dist/emails/affiliate/signup-verify.js +1 -0
- package/dist/emails/auth/password-reset.d.ts +37 -0
- package/dist/emails/auth/password-reset.js +1 -0
- package/dist/emails/layout.d.ts +10 -0
- package/dist/emails/layout.js +1 -0
- package/dist/emails/manager/affiliate-activated.d.ts +33 -0
- package/dist/emails/manager/affiliate-activated.js +1 -0
- package/dist/emails/manager/bulk-affiliates-activated.d.ts +33 -0
- package/dist/emails/manager/bulk-affiliates-activated.js +1 -0
- package/dist/emails/manager/invite.d.ts +35 -0
- package/dist/emails/manager/invite.js +1 -0
- package/dist/emails/manager/pending-approval.d.ts +33 -0
- package/dist/emails/manager/pending-approval.js +1 -0
- package/dist/emails/preview-env.d.ts +2 -0
- package/dist/emails/preview-env.js +1 -0
- package/dist/features/affiliates/actions.d.ts +60 -0
- package/dist/features/affiliates/actions.js +1 -0
- package/dist/features/affiliates/activation-email.d.ts +8 -0
- package/dist/features/affiliates/activation-email.js +1 -0
- package/dist/features/affiliates/bulk-approve.d.ts +2 -0
- package/dist/features/affiliates/bulk-approve.js +1 -0
- package/dist/features/affiliates/components/affiliate-actions-menu.d.ts +6 -0
- package/dist/features/affiliates/components/affiliate-actions-menu.js +1 -0
- package/dist/features/affiliates/components/affiliate-create-button.d.ts +1 -0
- package/dist/features/affiliates/components/affiliate-create-button.js +1 -0
- package/dist/features/affiliates/components/affiliate-detail-tabs.d.ts +6 -0
- package/dist/features/affiliates/components/affiliate-detail-tabs.js +1 -0
- package/dist/features/affiliates/components/affiliate-dialog.d.ts +11 -0
- package/dist/features/affiliates/components/affiliate-dialog.js +1 -0
- package/dist/features/affiliates/components/affiliate-profile-fields.d.ts +6 -0
- package/dist/features/affiliates/components/affiliate-profile-fields.js +1 -0
- package/dist/features/affiliates/components/affiliate-status-badge.d.ts +4 -0
- package/dist/features/affiliates/components/affiliate-status-badge.js +1 -0
- package/dist/features/affiliates/components/affiliate-status-tabs.d.ts +4 -0
- package/dist/features/affiliates/components/affiliate-status-tabs.js +1 -0
- package/dist/features/affiliates/components/affiliates-table.d.ts +10 -0
- package/dist/features/affiliates/components/affiliates-table.js +1 -0
- package/dist/features/affiliates/components/assign-parent-dialog.d.ts +5 -0
- package/dist/features/affiliates/components/assign-parent-dialog.js +1 -0
- package/dist/features/affiliates/components/detach-affiliate-confirm.d.ts +5 -0
- package/dist/features/affiliates/components/detach-affiliate-confirm.js +1 -0
- package/dist/features/affiliates/components/reject-affiliate-confirm.d.ts +5 -0
- package/dist/features/affiliates/components/reject-affiliate-confirm.js +1 -0
- package/dist/features/affiliates/components/sub-affiliate-invite-button.d.ts +3 -0
- package/dist/features/affiliates/components/sub-affiliate-invite-button.js +1 -0
- package/dist/features/affiliates/invite.d.ts +6 -0
- package/dist/features/affiliates/invite.js +1 -0
- package/dist/features/affiliates/list-params.d.ts +27 -0
- package/dist/features/affiliates/list-params.js +1 -0
- package/dist/features/affiliates/pending-notification.d.ts +18 -0
- package/dist/features/affiliates/pending-notification.js +1 -0
- package/dist/features/affiliates/sub-invite.d.ts +7 -0
- package/dist/features/affiliates/sub-invite.js +1 -0
- package/dist/features/audit/action-labels.d.ts +15 -0
- package/dist/features/audit/action-labels.js +1 -0
- package/dist/features/audit/components/audit-log-table.d.ts +5 -0
- package/dist/features/audit/components/audit-log-table.js +1 -0
- package/dist/features/audit/list-params.d.ts +2 -0
- package/dist/features/audit/list-params.js +1 -0
- package/dist/features/audit/read.d.ts +27 -0
- package/dist/features/audit/read.js +1 -0
- package/dist/features/auth/actions.d.ts +33 -0
- package/dist/features/auth/actions.js +1 -0
- package/dist/features/auth/authorization.d.ts +14 -0
- package/dist/features/auth/authorization.js +1 -0
- package/dist/features/auth/components/accept-invite-form.d.ts +3 -0
- package/dist/features/auth/components/accept-invite-form.js +1 -0
- package/dist/features/auth/components/forgot-password-form.d.ts +1 -0
- package/dist/features/auth/components/forgot-password-form.js +1 -0
- package/dist/features/auth/components/permissions-form.d.ts +5 -0
- package/dist/features/auth/components/permissions-form.js +1 -0
- package/dist/features/auth/components/reset-password-form.d.ts +3 -0
- package/dist/features/auth/components/reset-password-form.js +1 -0
- package/dist/features/auth/components/signin-form.d.ts +5 -0
- package/dist/features/auth/components/signin-form.js +1 -0
- package/dist/features/auth/components/signup-form.d.ts +1 -0
- package/dist/features/auth/components/signup-form.js +1 -0
- package/dist/features/auth/components/verify-email-form.d.ts +3 -0
- package/dist/features/auth/components/verify-email-form.js +1 -0
- package/dist/features/auth/password-reset.d.ts +6 -0
- package/dist/features/auth/password-reset.js +1 -0
- package/dist/features/auth/permissions.d.ts +49 -0
- package/dist/features/auth/permissions.js +1 -0
- package/dist/features/auth/require.d.ts +3 -0
- package/dist/features/auth/require.js +1 -0
- package/dist/features/auth/signup-email.d.ts +6 -0
- package/dist/features/auth/signup-email.js +1 -0
- package/dist/features/campaigns/actions.d.ts +53 -0
- package/dist/features/campaigns/actions.js +1 -0
- package/dist/features/campaigns/components/campaign-dialog.d.ts +7 -0
- package/dist/features/campaigns/components/campaign-dialog.js +1 -0
- package/dist/features/campaigns/components/campaign-row-actions.d.ts +8 -0
- package/dist/features/campaigns/components/campaign-row-actions.js +1 -0
- package/dist/features/campaigns/components/campaign-status-badge.d.ts +6 -0
- package/dist/features/campaigns/components/campaign-status-badge.js +1 -0
- package/dist/features/campaigns/components/campaign-status-tabs.d.ts +1 -0
- package/dist/features/campaigns/components/campaign-status-tabs.js +1 -0
- package/dist/features/campaigns/components/campaigns-table.d.ts +7 -0
- package/dist/features/campaigns/components/campaigns-table.js +1 -0
- package/dist/features/campaigns/components/create-campaign-button.d.ts +5 -0
- package/dist/features/campaigns/components/create-campaign-button.js +1 -0
- package/dist/features/campaigns/components/sub-id-builder.d.ts +4 -0
- package/dist/features/campaigns/components/sub-id-builder.js +1 -0
- package/dist/features/campaigns/components/tracking-link-box.d.ts +3 -0
- package/dist/features/campaigns/components/tracking-link-box.js +1 -0
- package/dist/features/campaigns/components/tracking-link-cell.d.ts +4 -0
- package/dist/features/campaigns/components/tracking-link-cell.js +1 -0
- package/dist/features/campaigns/components/tracking-link-dialog.d.ts +6 -0
- package/dist/features/campaigns/components/tracking-link-dialog.js +1 -0
- package/dist/features/campaigns/list-params.d.ts +14 -0
- package/dist/features/campaigns/list-params.js +1 -0
- package/dist/features/campaigns/tracking-url.d.ts +8 -0
- package/dist/features/campaigns/tracking-url.js +1 -0
- package/dist/features/casinos/actions.d.ts +39 -0
- package/dist/features/casinos/actions.js +1 -0
- package/dist/features/casinos/components/casino-create-button.d.ts +1 -0
- package/dist/features/casinos/components/casino-create-button.js +1 -0
- package/dist/features/casinos/components/casino-dialog.d.ts +11 -0
- package/dist/features/casinos/components/casino-dialog.js +1 -0
- package/dist/features/casinos/components/casino-form-fields.d.ts +7 -0
- package/dist/features/casinos/components/casino-form-fields.js +1 -0
- package/dist/features/casinos/components/casino-status-tabs.d.ts +1 -0
- package/dist/features/casinos/components/casino-status-tabs.js +1 -0
- package/dist/features/casinos/components/casinos-table.d.ts +6 -0
- package/dist/features/casinos/components/casinos-table.js +1 -0
- package/dist/features/casinos/components/delete-casino-confirm.d.ts +5 -0
- package/dist/features/casinos/components/delete-casino-confirm.js +1 -0
- package/dist/features/casinos/list-params.d.ts +14 -0
- package/dist/features/casinos/list-params.js +1 -0
- package/dist/features/commissions/actions.d.ts +76 -0
- package/dist/features/commissions/actions.js +1 -0
- package/dist/features/commissions/components/casino-bindings-field.d.ts +10 -0
- package/dist/features/commissions/components/casino-bindings-field.js +1 -0
- package/dist/features/commissions/components/commission-create-button.d.ts +1 -0
- package/dist/features/commissions/components/commission-create-button.js +1 -0
- package/dist/features/commissions/components/commission-detail-dialog.d.ts +5 -0
- package/dist/features/commissions/components/commission-detail-dialog.js +1 -0
- package/dist/features/commissions/components/commission-editor.d.ts +8 -0
- package/dist/features/commissions/components/commission-editor.js +1 -0
- package/dist/features/commissions/components/commission-read-view.d.ts +5 -0
- package/dist/features/commissions/components/commission-read-view.js +1 -0
- package/dist/features/commissions/components/commission-status-badge.d.ts +4 -0
- package/dist/features/commissions/components/commission-status-badge.js +1 -0
- package/dist/features/commissions/components/commission-status-tabs.d.ts +1 -0
- package/dist/features/commissions/components/commission-status-tabs.js +1 -0
- package/dist/features/commissions/components/commissions-table.d.ts +14 -0
- package/dist/features/commissions/components/commissions-table.js +1 -0
- package/dist/features/commissions/components/delete-commission-confirm.d.ts +5 -0
- package/dist/features/commissions/components/delete-commission-confirm.js +1 -0
- package/dist/features/commissions/components/duplicate-commission-dialog.d.ts +6 -0
- package/dist/features/commissions/components/duplicate-commission-dialog.js +1 -0
- package/dist/features/commissions/components/rule-editor/conditions-block.d.ts +9 -0
- package/dist/features/commissions/components/rule-editor/conditions-block.js +1 -0
- package/dist/features/commissions/components/rule-editor/modifiers-block.d.ts +9 -0
- package/dist/features/commissions/components/rule-editor/modifiers-block.js +1 -0
- package/dist/features/commissions/components/rule-editor/qualifiers-block.d.ts +9 -0
- package/dist/features/commissions/components/rule-editor/qualifiers-block.js +1 -0
- package/dist/features/commissions/components/rule-editor/reducer.d.ts +102 -0
- package/dist/features/commissions/components/rule-editor/reducer.js +1 -0
- package/dist/features/commissions/components/rule-editor/rewards-block.d.ts +9 -0
- package/dist/features/commissions/components/rule-editor/rewards-block.js +1 -0
- package/dist/features/commissions/components/rule-editor/rule-card.d.ts +10 -0
- package/dist/features/commissions/components/rule-editor/rule-card.js +1 -0
- package/dist/features/commissions/components/rule-editor/rule-editor.d.ts +7 -0
- package/dist/features/commissions/components/rule-editor/rule-editor.js +1 -0
- package/dist/features/commissions/components/rule-editor/rule-group-card.d.ts +9 -0
- package/dist/features/commissions/components/rule-editor/rule-group-card.js +1 -0
- package/dist/features/commissions/components/rule-editor/state.d.ts +21 -0
- package/dist/features/commissions/components/rule-editor/state.js +1 -0
- package/dist/features/commissions/components/rule-groups-read-view.d.ts +4 -0
- package/dist/features/commissions/components/rule-groups-read-view.js +1 -0
- package/dist/features/commissions/list-params.d.ts +14 -0
- package/dist/features/commissions/list-params.js +1 -0
- package/dist/features/commissions/rule-validation.d.ts +173 -0
- package/dist/features/commissions/rule-validation.js +1 -0
- package/dist/features/dashboard/affiliate-queries.d.ts +14 -0
- package/dist/features/dashboard/affiliate-queries.js +1 -0
- package/dist/features/dashboard/clickhouse.d.ts +3 -0
- package/dist/features/dashboard/clickhouse.js +2 -0
- package/dist/features/dashboard/components/affiliate-charts.d.ts +5 -0
- package/dist/features/dashboard/components/affiliate-charts.js +1 -0
- package/dist/features/dashboard/components/affiliate-stats.d.ts +5 -0
- package/dist/features/dashboard/components/affiliate-stats.js +1 -0
- package/dist/features/dashboard/components/charts/funnel-chart.d.ts +11 -0
- package/dist/features/dashboard/components/charts/funnel-chart.js +1 -0
- package/dist/features/dashboard/components/charts/rank-bar-chart.d.ts +10 -0
- package/dist/features/dashboard/components/charts/rank-bar-chart.js +1 -0
- package/dist/features/dashboard/components/charts/time-series-chart.d.ts +12 -0
- package/dist/features/dashboard/components/charts/time-series-chart.js +1 -0
- package/dist/features/dashboard/components/charts-grid.d.ts +8 -0
- package/dist/features/dashboard/components/charts-grid.js +1 -0
- package/dist/features/dashboard/components/dashboard-charts.d.ts +4 -0
- package/dist/features/dashboard/components/dashboard-charts.js +1 -0
- package/dist/features/dashboard/components/dashboard-period-tabs.d.ts +1 -0
- package/dist/features/dashboard/components/dashboard-period-tabs.js +1 -0
- package/dist/features/dashboard/components/money-stat-card.d.ts +6 -0
- package/dist/features/dashboard/components/money-stat-card.js +1 -0
- package/dist/features/dashboard/components/stat-card.d.ts +6 -0
- package/dist/features/dashboard/components/stat-card.js +1 -0
- package/dist/features/dashboard/components/top-affiliates.d.ts +4 -0
- package/dist/features/dashboard/components/top-affiliates.js +1 -0
- package/dist/features/dashboard/list-params.d.ts +24 -0
- package/dist/features/dashboard/list-params.js +1 -0
- package/dist/features/dashboard/queries.d.ts +63 -0
- package/dist/features/dashboard/queries.js +1 -0
- package/dist/features/dashboard/series.d.ts +32 -0
- package/dist/features/dashboard/series.js +1 -0
- package/dist/features/deals/actions.d.ts +60 -0
- package/dist/features/deals/actions.js +1 -0
- package/dist/features/deals/components/affiliate-deals.d.ts +10 -0
- package/dist/features/deals/components/affiliate-deals.js +1 -0
- package/dist/features/deals/components/assign-deal-button.d.ts +9 -0
- package/dist/features/deals/components/assign-deal-button.js +1 -0
- package/dist/features/deals/components/deal-dialog.d.ts +19 -0
- package/dist/features/deals/components/deal-dialog.js +1 -0
- package/dist/features/deals/components/deal-row-actions.d.ts +6 -0
- package/dist/features/deals/components/deal-row-actions.js +1 -0
- package/dist/features/deals/components/deal-status-badge.d.ts +10 -0
- package/dist/features/deals/components/deal-status-badge.js +1 -0
- package/dist/features/deals/components/deal-status-tabs.d.ts +1 -0
- package/dist/features/deals/components/deal-status-tabs.js +1 -0
- package/dist/features/deals/components/delegate-deal-button.d.ts +8 -0
- package/dist/features/deals/components/delegate-deal-button.js +1 -0
- package/dist/features/deals/deal-assigned-email.d.ts +11 -0
- package/dist/features/deals/deal-assigned-email.js +1 -0
- package/dist/features/deals/deal-delegated-email.d.ts +13 -0
- package/dist/features/deals/deal-delegated-email.js +1 -0
- package/dist/features/deals/list-params.d.ts +14 -0
- package/dist/features/deals/list-params.js +1 -0
- package/dist/features/earnings/components/earnings-balances.d.ts +4 -0
- package/dist/features/earnings/components/earnings-balances.js +1 -0
- package/dist/features/earnings/components/earnings-ledger.d.ts +5 -0
- package/dist/features/earnings/components/earnings-ledger.js +1 -0
- package/dist/features/earnings/components/earnings-status-badge.d.ts +4 -0
- package/dist/features/earnings/components/earnings-status-badge.js +1 -0
- package/dist/features/earnings/components/earnings-status-tabs.d.ts +1 -0
- package/dist/features/earnings/components/earnings-status-tabs.js +1 -0
- package/dist/features/earnings/components/sub-affiliate-earnings.d.ts +4 -0
- package/dist/features/earnings/components/sub-affiliate-earnings.js +1 -0
- package/dist/features/earnings/list-params.d.ts +14 -0
- package/dist/features/earnings/list-params.js +1 -0
- package/dist/features/earnings/queries.d.ts +30 -0
- package/dist/features/earnings/queries.js +1 -0
- package/dist/features/groups/actions.d.ts +36 -0
- package/dist/features/groups/actions.js +1 -0
- package/dist/features/groups/components/delete-group-confirm.d.ts +5 -0
- package/dist/features/groups/components/delete-group-confirm.js +1 -0
- package/dist/features/groups/components/group-create-button.d.ts +1 -0
- package/dist/features/groups/components/group-create-button.js +1 -0
- package/dist/features/groups/components/group-dialog.d.ts +11 -0
- package/dist/features/groups/components/group-dialog.js +1 -0
- package/dist/features/groups/components/group-form-fields.d.ts +10 -0
- package/dist/features/groups/components/group-form-fields.js +1 -0
- package/dist/features/groups/components/group-status-tabs.d.ts +1 -0
- package/dist/features/groups/components/group-status-tabs.js +1 -0
- package/dist/features/groups/components/groups-table.d.ts +9 -0
- package/dist/features/groups/components/groups-table.js +1 -0
- package/dist/features/groups/list-params.d.ts +14 -0
- package/dist/features/groups/list-params.js +1 -0
- package/dist/features/managers/actions.d.ts +43 -0
- package/dist/features/managers/actions.js +1 -0
- package/dist/features/managers/components/manager-create-button.d.ts +1 -0
- package/dist/features/managers/components/manager-create-button.js +1 -0
- package/dist/features/managers/components/manager-dialog.d.ts +11 -0
- package/dist/features/managers/components/manager-dialog.js +1 -0
- package/dist/features/managers/components/manager-permissions-dialog.d.ts +7 -0
- package/dist/features/managers/components/manager-permissions-dialog.js +1 -0
- package/dist/features/managers/components/manager-profile-fields.d.ts +7 -0
- package/dist/features/managers/components/manager-profile-fields.js +1 -0
- package/dist/features/managers/components/manager-status-tabs.d.ts +1 -0
- package/dist/features/managers/components/manager-status-tabs.js +1 -0
- package/dist/features/managers/components/managers-table.d.ts +8 -0
- package/dist/features/managers/components/managers-table.js +1 -0
- package/dist/features/managers/invite.d.ts +6 -0
- package/dist/features/managers/invite.js +1 -0
- package/dist/features/managers/list-params.d.ts +14 -0
- package/dist/features/managers/list-params.js +1 -0
- package/dist/features/payouts/actions.d.ts +12 -0
- package/dist/features/payouts/actions.js +1 -0
- package/dist/features/payouts/balance.d.ts +2 -0
- package/dist/features/payouts/balance.js +1 -0
- package/dist/features/payouts/components/my-payouts-table.d.ts +5 -0
- package/dist/features/payouts/components/my-payouts-table.js +1 -0
- package/dist/features/payouts/components/payout-row-actions.d.ts +5 -0
- package/dist/features/payouts/components/payout-row-actions.js +1 -0
- package/dist/features/payouts/components/payout-status-badge.d.ts +4 -0
- package/dist/features/payouts/components/payout-status-badge.js +1 -0
- package/dist/features/payouts/components/payout-status-tabs.d.ts +1 -0
- package/dist/features/payouts/components/payout-status-tabs.js +1 -0
- package/dist/features/payouts/components/payouts-table.d.ts +6 -0
- package/dist/features/payouts/components/payouts-table.js +1 -0
- package/dist/features/payouts/components/request-payout-dialog.d.ts +4 -0
- package/dist/features/payouts/components/request-payout-dialog.js +1 -0
- package/dist/features/payouts/constants.d.ts +2 -0
- package/dist/features/payouts/constants.js +1 -0
- package/dist/features/payouts/list-params.d.ts +14 -0
- package/dist/features/payouts/list-params.js +1 -0
- package/dist/features/payouts/my-queries.d.ts +14 -0
- package/dist/features/payouts/my-queries.js +1 -0
- package/dist/features/payouts/queries.d.ts +14 -0
- package/dist/features/payouts/queries.js +1 -0
- package/dist/features/postbacks/actions.d.ts +27 -0
- package/dist/features/postbacks/actions.js +1 -0
- package/dist/features/postbacks/components/integration-dialog.d.ts +6 -0
- package/dist/features/postbacks/components/integration-dialog.js +1 -0
- package/dist/features/postbacks/components/postback-editor.d.ts +5 -0
- package/dist/features/postbacks/components/postback-editor.js +1 -0
- package/dist/features/postbacks/components/postbacks-table.d.ts +4 -0
- package/dist/features/postbacks/components/postbacks-table.js +1 -0
- package/dist/features/settings/actions.d.ts +2 -0
- package/dist/features/settings/actions.js +1 -0
- package/dist/features/settings/components/affiliate-approval-setting.d.ts +3 -0
- package/dist/features/settings/components/affiliate-approval-setting.js +1 -0
- package/dist/features/settings/components/manager-totp-setting.d.ts +3 -0
- package/dist/features/settings/components/manager-totp-setting.js +1 -0
- package/dist/features/support/actions.d.ts +12 -0
- package/dist/features/support/actions.js +1 -0
- package/dist/features/support/components/support-page.d.ts +4 -0
- package/dist/features/support/components/support-page.js +1 -0
- package/dist/features/support/email.d.ts +13 -0
- package/dist/features/support/email.js +1 -0
- package/dist/features/users/actions.d.ts +4 -0
- package/dist/features/users/actions.js +1 -0
- package/dist/features/users/components/password-section.d.ts +1 -0
- package/dist/features/users/components/password-section.js +1 -0
- package/dist/features/users/components/preferences-section.d.ts +4 -0
- package/dist/features/users/components/preferences-section.js +1 -0
- package/dist/features/users/components/settings-tabs.d.ts +1 -0
- package/dist/features/users/components/settings-tabs.js +1 -0
- package/dist/features/users/components/totp-section.d.ts +4 -0
- package/dist/features/users/components/totp-section.js +1 -0
- package/dist/features/users/list-params.d.ts +12 -0
- package/dist/features/users/list-params.js +1 -0
- package/dist/features/users/totp.d.ts +7 -0
- package/dist/features/users/totp.js +1 -0
- package/dist/i18n/config.d.ts +5 -0
- package/dist/i18n/config.js +1 -0
- package/dist/i18n/get-locale.d.ts +3 -0
- package/dist/i18n/get-locale.js +1 -0
- package/dist/i18n/locale.d.ts +2 -0
- package/dist/i18n/locale.js +1 -0
- package/dist/lib/actions/parse-form.d.ts +3 -0
- package/dist/lib/actions/parse-form.js +1 -0
- package/dist/lib/actions/state.d.ts +22 -0
- package/dist/lib/actions/state.js +0 -0
- package/dist/lib/audit/actions.d.ts +9 -0
- package/dist/lib/audit/actions.js +1 -0
- package/dist/lib/audit/record.d.ts +4 -0
- package/dist/lib/audit/record.js +1 -0
- package/dist/lib/auth/action.d.ts +45 -0
- package/dist/lib/auth/action.js +1 -0
- package/dist/lib/auth/config.d.ts +24 -0
- package/dist/lib/auth/config.js +1 -0
- package/dist/lib/auth/jwt.d.ts +17 -0
- package/dist/lib/auth/jwt.js +1 -0
- package/dist/lib/auth/password-options.d.ts +6 -0
- package/dist/lib/auth/password-options.js +1 -0
- package/dist/lib/auth/password.d.ts +3 -0
- package/dist/lib/auth/password.js +1 -0
- package/dist/lib/auth/session.d.ts +26 -0
- package/dist/lib/auth/session.js +1 -0
- package/dist/lib/auth/tokens.d.ts +43 -0
- package/dist/lib/auth/tokens.js +1 -0
- package/dist/lib/auth/totp-challenge.d.ts +4 -0
- package/dist/lib/auth/totp-challenge.js +1 -0
- package/dist/lib/auth/totp.d.ts +7 -0
- package/dist/lib/auth/totp.js +1 -0
- package/dist/lib/auth/verification-tokens.d.ts +19 -0
- package/dist/lib/auth/verification-tokens.js +1 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/cn.js +1 -0
- package/dist/lib/countries.d.ts +18 -0
- package/dist/lib/countries.js +1 -0
- package/dist/lib/currencies.d.ts +6 -0
- package/dist/lib/currencies.js +1 -0
- package/dist/lib/data/countries-by-continent.json +257 -0
- package/dist/lib/db/errors.d.ts +4 -0
- package/dist/lib/db/errors.js +1 -0
- package/dist/lib/email/client.d.ts +6 -0
- package/dist/lib/email/client.js +1 -0
- package/dist/lib/email/env.d.ts +12 -0
- package/dist/lib/email/env.js +1 -0
- package/dist/lib/email/format.d.ts +5 -0
- package/dist/lib/email/format.js +1 -0
- package/dist/lib/email/locale.d.ts +3 -0
- package/dist/lib/email/locale.js +1 -0
- package/dist/lib/email/send.d.ts +12 -0
- package/dist/lib/email/send.js +1 -0
- package/dist/lib/env.d.ts +20 -0
- package/dist/lib/env.js +1 -0
- package/dist/lib/errors/codes.d.ts +72 -0
- package/dist/lib/errors/codes.js +1 -0
- package/dist/lib/errors/server.d.ts +10 -0
- package/dist/lib/errors/server.js +1 -0
- package/dist/lib/format.d.ts +3 -0
- package/dist/lib/format.js +1 -0
- package/dist/lib/hooks/use-deferred-dialog.d.ts +11 -0
- package/dist/lib/hooks/use-deferred-dialog.js +1 -0
- package/dist/lib/hooks/use-form-reset.d.ts +2 -0
- package/dist/lib/hooks/use-form-reset.js +1 -0
- package/dist/lib/hooks/use-form-toast.d.ts +2 -0
- package/dist/lib/hooks/use-form-toast.js +1 -0
- package/dist/lib/i18n/format-datetime.d.ts +1 -0
- package/dist/lib/i18n/format-datetime.js +1 -0
- package/dist/lib/i18n/relative-time.d.ts +1 -0
- package/dist/lib/i18n/relative-time.js +1 -0
- package/dist/lib/list-params.d.ts +51 -0
- package/dist/lib/list-params.js +1 -0
- package/dist/lib/money.d.ts +2 -0
- package/dist/lib/money.js +1 -0
- package/dist/lib/platform-settings.d.ts +5 -0
- package/dist/lib/platform-settings.js +1 -0
- package/dist/lib/preferences/actions.d.ts +1 -0
- package/dist/lib/preferences/actions.js +1 -0
- package/dist/lib/preferences/index.d.ts +15 -0
- package/dist/lib/preferences/index.js +1 -0
- package/dist/lib/preferences/read.d.ts +2 -0
- package/dist/lib/preferences/read.js +1 -0
- package/dist/lib/slug.d.ts +1 -0
- package/dist/lib/slug.js +1 -0
- package/dist/lib/toast.d.ts +13 -0
- package/dist/lib/toast.js +1 -0
- package/dist/lib/tracking-cache.d.ts +2 -0
- package/dist/lib/tracking-cache.js +1 -0
- package/dist/lib/users.d.ts +12 -0
- package/dist/lib/users.js +1 -0
- package/dist/lib/validation/zod.d.ts +30 -0
- package/dist/lib/validation/zod.js +1 -0
- package/dist/messages/de/emails.json +136 -0
- package/dist/messages/de/index.json +1104 -0
- package/dist/messages/en/emails.json +136 -0
- package/dist/messages/en/index.json +1104 -0
- package/dist/theme/config.d.ts +8 -0
- package/dist/theme/config.js +1 -0
- package/dist/theme/get-theme.d.ts +3 -0
- package/dist/theme/get-theme.js +1 -0
- package/dist/theme/theme.d.ts +2 -0
- package/dist/theme/theme.js +1 -0
- package/package.json +131 -0
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Moonhead
|
|
2
|
+
|
|
3
|
+
Application features, UI components, emails, translations, and database schema.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
pnpm typecheck
|
|
10
|
+
pnpm build
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Publishing
|
|
14
|
+
|
|
15
|
+
`moonhead` is published as a public package to npmjs.org by the `Publish packages` GitHub Actions workflow.
|
|
16
|
+
|
|
17
|
+
After the initial local publish, configure npm Trusted Publishing for this repository and the `publish.yml` workflow. Increment the package version, push the changes, and publish a GitHub Release whose tag matches the Moonhead version. The pipeline uses GitHub OIDC, verifies and builds the package, and publishes it without stored npm tokens.
|
|
18
|
+
|
|
19
|
+
Install the application package with:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add moonhead
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Import modules through the package subpaths:
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Button } from "moonhead/ui/button";
|
|
29
|
+
import { db } from "moonhead/db";
|
|
30
|
+
import { users } from "moonhead/db/schema";
|
|
31
|
+
import { requireSession } from "moonhead/feature/auth/authorization";
|
|
32
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AppHeader(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{SidebarTrigger as e}from"../ui/sidebar.js";function o(){return r("header",{className:"sticky top-0 z-10 flex h-14 shrink-0 items-center gap-3 border-b border-border/60 bg-card/85 px-4 backdrop-blur-md",children:r(e,{})})}export{o as AppHeader};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PublicUser } from "../../db/schema/index.js";
|
|
2
|
+
import { type PermissionCarrier } from "../../features/auth/permissions.js";
|
|
3
|
+
import type { Theme } from "../../theme/config.js";
|
|
4
|
+
export declare function AppSidebar({ user, carrier, theme, brandName, }: {
|
|
5
|
+
user: PublicUser;
|
|
6
|
+
carrier: PermissionCarrier;
|
|
7
|
+
theme: Theme;
|
|
8
|
+
brandName: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Fragment as E,jsx as a,jsxs as d}from"react/jsx-runtime";import{isSubAffiliate as y}from"../../db/schema/index.js";import{Collapsible as m}from"@base-ui/react/collapsible";import{IconBuildingStore as v,IconChevronDown as k,IconCoin as N,IconContract as x,IconLayoutDashboard as I,IconLifebuoy as w,IconReceipt as S,IconSettingsCog as C,IconSpeakerphone as P,IconUserShield as U,IconUsers as G,IconUsersGroup as _,IconWallet as L,IconWebhook as R}from"@tabler/icons-react";import T from"next/link";import{usePathname as g}from"next/navigation";import{useTranslations as f}from"next-intl";import{useState as z}from"react";import{BrandLogo as A}from"./brand-logo.js";import{UserMenu as K}from"./user-menu.js";import{Sidebar as j,SidebarCollapseToggle as B,SidebarContent as D,SidebarFooter as O,SidebarHeader as W,useSidebar as u}from"../ui/sidebar.js";import{hasPermission as F}from"../../features/auth/permissions.js";import{cn as s}from"../../lib/cn.js";const H=[{items:[{href:"/",key:"dashboard",icon:I,roles:["platform_admin","manager","affiliate"]},{href:"/support",key:"support",icon:w,roles:["manager"]}]},{label:"affiliates",items:[{href:"/affiliates",key:"affiliates",icon:G,roles:["platform_admin","manager","affiliate"],permission:"affiliates:read",affiliateGate:e=>!y(e)},{href:"/commissions",key:"commissions",icon:S,roles:["platform_admin","manager"],permission:"commissions:read"},{href:"/deals",key:"deals",icon:x,roles:["affiliate"]},{href:"/campaigns",key:"campaigns",icon:P,roles:["affiliate"]},{href:"/earnings",key:"earnings",icon:N,roles:["affiliate"]},{href:"/payouts",key:"payouts",icon:L,roles:["platform_admin","manager","affiliate"],permission:"payouts:read"}]},{label:"administration",items:[{href:"/managers",key:"managers",icon:U,roles:["platform_admin","manager"],permission:"managers:read"},{href:"/groups",key:"groups",icon:_,roles:["platform_admin","manager"],permission:"groups:read"},{href:"/casinos",key:"casinos",icon:v,roles:["platform_admin"]},{href:"/postbacks",key:"postbacks",icon:R,roles:["platform_admin","manager"],permission:"postbacks:read"},{href:"/settings",key:"settings",icon:C,roles:["platform_admin","manager"],permission:"settings:read"}]}];function b(e,i){return i==="/"?e==="/":e===i||e.startsWith(`${i}/`)}function M({brandName:e}){return d(E,{children:[a("div",{"aria-hidden":!0,className:"flex size-14 shrink-0 items-center justify-center in-data-collapsed:size-8",children:a(A,{className:"w-full"})}),a("span",{className:"truncate text-sm font-semibold tracking-tight transition-opacity duration-slow in-data-collapsed:opacity-0",children:e})]})}function h({item:e}){const i=f("Nav"),n=g(),{collapsed:o}=u(),r=b(n,e.href),t=e.icon;return d(T,{href:e.href,prefetch:!1,"aria-current":r?"page":void 0,title:i(e.key),className:s("group/nav relative flex h-8 w-full items-center gap-3 overflow-hidden rounded-md px-2 text-sm font-medium outline-none","transition-[width,margin,gap,background-color,color] duration-slow ease-out","focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",o&&"lg:ml-2 lg:w-8 lg:gap-0",r?"bg-sidebar-accent text-sidebar-accent-foreground shadow-2xs":"text-sidebar-foreground/65 hover:bg-sidebar-foreground/5 hover:text-sidebar-foreground"),children:[a(t,{size:16,"aria-hidden":!0,className:s("shrink-0 transition-colors duration-base",r?"text-sidebar-accent-foreground":"text-sidebar-foreground/55 group-hover/nav:text-sidebar-foreground/80")}),a("span",{className:s("min-w-0 flex-1 truncate transition-opacity duration-slow ease-out",o&&"lg:opacity-0"),children:i(e.key)})]})}function $({items:e}){return a("div",{className:"flex flex-col gap-0.5",children:e.map(i=>a(h,{item:i},i.href))})}function V({label:e,items:i}){const n=f("Nav"),{collapsed:o}=u(),r=g(),t=i.some(p=>b(r,p.href)),[c,l]=z(!0);return d(m.Root,{open:c,onOpenChange:l,children:[d(m.Trigger,{className:s("group flex cursor-pointer items-center rounded-md outline-none","transition-[width,margin,gap,padding,color] duration-slow ease-out","hover:text-sidebar-foreground focus-visible:text-sidebar-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring","h-8 w-full justify-between gap-2 px-2 text-xs font-medium",t?"text-sidebar-foreground":"text-sidebar-foreground/55",o&&"lg:ml-2 lg:w-8 lg:justify-center lg:gap-0 lg:px-2"),children:[a("span",{className:s(o&&"lg:hidden"),children:n(e)}),a(k,{size:12,"aria-hidden":!0,className:"-rotate-90 opacity-60 transition-transform duration-slow group-data-panel-open:rotate-0"})]}),a(m.Panel,{className:"h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-slow ease-out data-ending-style:h-0 data-starting-style:h-0",children:a("div",{className:s("flex flex-col gap-0.5 transition-[padding] duration-slow ease-out",o?"pt-0.5":"pt-1"),children:i.map(p=>a(h,{item:p},p.href))})})]})}function q({user:e,carrier:i}){const{collapsed:n}=u();return a("nav",{className:s("flex flex-col px-2 py-2 transition-[gap] duration-slow ease-out",n?"gap-0.5":"gap-2"),children:H.map((o,r)=>{const t=o.items.filter(l=>l.roles.includes(i.role)?i.role==="affiliate"?l.affiliateGate?l.affiliateGate(e):!0:!(l.permission&&!F(i,l.permission)):!1);if(t.length===0)return null;const c=o.label??`ungrouped-${r}`;return o.label?a(V,{label:o.label,items:t},c):a($,{items:t},c)})})}function ce({user:e,carrier:i,theme:n,brandName:o}){const r=f("Nav");return d(j,{title:r("openMenu"),children:[d(W,{className:"group/sidebar-header relative",children:[a("div",{className:"flex flex-1 items-center gap-3 transition-opacity duration-slow in-data-collapsed:group-hover/sidebar-header:opacity-0",children:a(M,{brandName:o})}),a(B,{label:r("toggleSidebar"),className:s("hidden size-8 shrink-0 transition-opacity duration-slow lg:inline-flex","in-data-collapsed:absolute in-data-collapsed:inset-0 in-data-collapsed:m-auto","in-data-collapsed:opacity-0 in-data-collapsed:group-hover/sidebar-header:opacity-100")})]}),a(D,{children:a(q,{user:e,carrier:i})}),a(O,{children:a(K,{user:e,theme:n})})]})}export{ce as AppSidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as L,jsxs as l}from"react/jsx-runtime";function t(f){return l("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1536 1024",...f,children:[L("title",{children:"Logo"}),l("g",{fillRule:"evenodd",children:[L("path",{fill:"#e30613",d:"M 489.0 385.0 L 479.0 438.0 L 489.0 465.0 L 507.0 484.0 L 536.0 496.0 L 564.0 497.0 L 618.0 473.0 L 631.0 489.0 L 620.0 514.0 L 587.0 521.0 L 589.0 538.0 L 641.0 540.0 L 667.0 483.0 L 641.0 456.0 L 648.0 428.0 L 705.0 431.0 L 736.0 418.0 L 766.0 391.0 L 810.0 413.0 L 846.0 411.0 L 882.0 396.0 L 886.0 412.0 L 867.0 442.0 L 879.0 456.0 L 849.0 508.0 L 869.0 502.0 L 891.0 507.0 L 929.0 492.0 L 935.0 469.0 L 909.0 475.0 L 893.0 466.0 L 892.0 454.0 L 912.0 430.0 L 934.0 441.0 L 962.0 442.0 L 975.0 417.0 L 947.0 417.0 L 921.0 399.0 L 915.0 364.0 L 923.0 343.0 L 964.0 308.0 L 994.0 305.0 L 1013.0 313.0 L 1030.0 336.0 L 1029.0 373.0 L 1003.0 413.0 L 990.0 415.0 L 936.0 534.0 L 910.0 556.0 L 921.0 553.0 L 915.0 567.0 L 920.0 571.0 L 878.0 675.0 L 892.0 655.0 L 876.0 715.0 L 913.0 652.0 L 913.0 671.0 L 959.0 579.0 L 1016.0 656.0 L 1081.0 686.0 L 1019.0 600.0 L 991.0 543.0 L 1098.0 458.0 L 1104.0 476.0 L 1126.0 472.0 L 1143.0 446.0 L 1129.0 439.0 L 1194.0 392.0 L 1173.0 403.0 L 1178.0 394.0 L 1281.0 329.0 L 1150.0 379.0 L 1064.0 438.0 L 997.0 497.0 L 1032.0 402.0 L 1043.0 395.0 L 1045.0 405.0 L 1056.0 381.0 L 1053.0 326.0 L 1029.0 293.0 L 1002.0 279.0 L 964.0 280.0 L 927.0 299.0 L 910.0 267.0 L 874.0 245.0 L 814.0 250.0 L 767.0 285.0 L 723.0 264.0 L 670.0 270.0 L 626.0 301.0 L 608.0 339.0 L 567.0 333.0 L 540.0 340.0 L 513.0 356.0 Z M 598.0 367.0 L 604.0 371.0 L 614.0 382.0 L 620.0 394.0 L 622.0 403.0 L 622.0 415.0 L 621.0 421.0 L 619.0 427.0 L 611.0 442.0 L 607.0 447.0 L 594.0 459.0 L 582.0 466.0 L 571.0 470.0 L 566.0 471.0 L 546.0 471.0 L 538.0 469.0 L 525.0 462.0 L 516.0 453.0 L 512.0 447.0 L 507.0 433.0 L 507.0 415.0 L 512.0 399.0 L 518.0 389.0 L 522.0 384.0 L 535.0 372.0 L 553.0 363.0 L 561.0 361.0 L 575.0 360.0 L 587.0 362.0 Z M 726.0 296.0 L 736.0 302.0 L 746.0 312.0 L 750.0 318.0 L 753.0 325.0 L 755.0 333.0 L 755.0 349.0 L 753.0 358.0 L 747.0 371.0 L 743.0 377.0 L 725.0 394.0 L 714.0 400.0 L 699.0 405.0 L 693.0 406.0 L 678.0 406.0 L 666.0 403.0 L 655.0 397.0 L 647.0 390.0 L 640.0 380.0 L 637.0 372.0 L 635.0 361.0 L 635.0 354.0 L 638.0 339.0 L 644.0 326.0 L 653.0 314.0 L 663.0 305.0 L 669.0 301.0 L 684.0 294.0 L 693.0 292.0 L 713.0 292.0 Z M 883.0 283.0 L 893.0 293.0 L 897.0 300.0 L 899.0 305.0 L 901.0 315.0 L 901.0 327.0 L 899.0 336.0 L 892.0 351.0 L 887.0 358.0 L 873.0 372.0 L 866.0 377.0 L 852.0 384.0 L 842.0 387.0 L 836.0 388.0 L 822.0 388.0 L 810.0 385.0 L 800.0 380.0 L 791.0 372.0 L 784.0 361.0 L 781.0 351.0 L 781.0 334.0 L 785.0 320.0 L 791.0 309.0 L 797.0 301.0 L 807.0 291.0 L 818.0 283.0 L 826.0 279.0 L 839.0 275.0 L 845.0 274.0 L 859.0 274.0 L 865.0 275.0 L 874.0 278.0 Z "}),L("path",{fill:"#e30613",d:"M 1445.0 449.0 L 1436.0 439.0 L 1416.0 437.0 L 1390.0 448.0 L 1365.0 469.0 L 1352.0 492.0 L 1354.0 509.0 L 1362.0 518.0 L 1399.0 534.0 L 1383.0 550.0 L 1357.0 564.0 L 1351.0 562.0 L 1364.0 545.0 L 1337.0 565.0 L 1332.0 577.0 L 1317.0 583.0 L 1314.0 579.0 L 1354.0 463.0 L 1342.0 448.0 L 1333.0 446.0 L 1324.0 459.0 L 1313.0 452.0 L 1300.0 453.0 L 1268.0 475.0 L 1239.0 511.0 L 1217.0 565.0 L 1197.0 587.0 L 1194.0 584.0 L 1245.0 474.0 L 1235.0 468.0 L 1236.0 458.0 L 1220.0 461.0 L 1164.0 522.0 L 1161.0 518.0 L 1174.0 481.0 L 1165.0 475.0 L 1147.0 476.0 L 1106.0 575.0 L 1083.0 595.0 L 1081.0 588.0 L 1119.0 498.0 L 1107.0 488.0 L 1088.0 489.0 L 1042.0 610.0 L 1048.0 612.0 L 1047.0 619.0 L 1062.0 640.0 L 1094.0 586.0 L 1104.0 580.0 L 1099.0 600.0 L 1108.0 634.0 L 1118.0 612.0 L 1123.0 616.0 L 1155.0 562.0 L 1180.0 531.0 L 1183.0 534.0 L 1164.0 589.0 L 1170.0 612.0 L 1180.0 625.0 L 1213.0 571.0 L 1217.0 571.0 L 1222.0 589.0 L 1244.0 599.0 L 1283.0 575.0 L 1275.0 597.0 L 1224.0 626.0 L 1191.0 665.0 L 1189.0 682.0 L 1200.0 698.0 L 1233.0 705.0 L 1265.0 684.0 L 1276.0 671.0 L 1308.0 604.0 L 1353.0 588.0 L 1355.0 592.0 L 1342.0 598.0 L 1372.0 590.0 L 1398.0 577.0 L 1422.0 557.0 L 1432.0 539.0 L 1429.0 521.0 L 1416.0 510.0 L 1386.0 499.0 L 1384.0 490.0 L 1397.0 475.0 L 1415.0 465.0 L 1419.0 472.0 L 1413.0 488.0 L 1432.0 482.0 L 1443.0 465.0 Z M 1317.0 477.0 L 1320.0 481.0 L 1319.0 485.0 L 1317.0 485.0 L 1306.0 509.0 L 1293.0 531.0 L 1282.0 545.0 L 1266.0 561.0 L 1254.0 569.0 L 1250.0 568.0 L 1250.0 559.0 L 1254.0 547.0 L 1261.0 533.0 L 1272.0 516.0 L 1287.0 497.0 L 1301.0 484.0 L 1311.0 477.0 Z "}),L("path",{fill:"#e30613",d:"M 1171.0 692.0 L 1169.0 686.0 L 1123.0 690.0 L 1146.0 680.0 L 1097.0 687.0 L 1103.0 705.0 L 1057.0 694.0 L 1022.0 701.0 L 1010.0 699.0 L 889.0 721.0 L 877.0 737.0 L 872.0 733.0 L 862.0 738.0 L 862.0 726.0 L 823.0 735.0 L 821.0 731.0 L 839.0 725.0 L 750.0 745.0 L 749.0 760.0 L 728.0 751.0 L 660.0 767.0 L 713.0 749.0 L 604.0 773.0 L 431.0 822.0 L 405.0 833.0 L 439.0 826.0 L 441.0 830.0 L 384.0 851.0 L 395.0 849.0 L 397.0 853.0 L 304.0 897.0 L 493.0 843.0 L 496.0 847.0 L 444.0 883.0 L 605.0 826.0 L 723.0 790.0 L 725.0 794.0 L 689.0 809.0 L 695.0 809.0 L 643.0 840.0 L 883.0 762.0 Z "}),L("path",{fill:"#e30613",d:"M 554.0 185.0 L 590.0 231.0 L 607.0 258.0 L 668.0 233.0 L 752.0 214.0 L 831.0 207.0 L 878.0 208.0 L 917.0 213.0 L 933.0 172.0 L 963.0 110.0 L 905.0 152.0 L 910.0 165.0 L 895.0 180.0 L 883.0 185.0 L 874.0 185.0 L 862.0 180.0 L 852.0 169.0 L 849.0 160.0 L 860.0 147.0 L 845.0 114.0 L 821.0 148.0 L 830.0 161.0 L 817.0 179.0 L 800.0 187.0 L 788.0 187.0 L 775.0 182.0 L 761.0 167.0 L 770.0 150.0 L 731.0 93.0 L 712.0 160.0 L 722.0 167.0 L 724.0 177.0 L 719.0 189.0 L 709.0 199.0 L 698.0 204.0 L 686.0 204.0 L 673.0 199.0 L 664.0 191.0 L 667.0 175.0 L 640.0 154.0 L 636.0 188.0 L 648.0 195.0 L 648.0 202.0 L 642.0 215.0 L 631.0 223.0 L 618.0 223.0 L 602.0 214.0 L 602.0 201.0 Z "}),L("path",{fill:"#e30613",d:"M 916.0 223.0 L 911.0 221.0 L 889.0 218.0 L 854.0 216.0 L 812.0 217.0 L 761.0 222.0 L 736.0 226.0 L 721.0 230.0 L 716.0 230.0 L 676.0 240.0 L 644.0 251.0 L 611.0 266.0 L 618.0 280.0 L 620.0 280.0 L 649.0 265.0 L 688.0 252.0 L 713.0 246.0 L 741.0 241.0 L 789.0 235.0 L 838.0 233.0 L 845.0 231.0 L 873.0 231.0 L 886.0 233.0 L 902.0 238.0 L 907.0 238.0 L 911.0 240.0 Z "}),L("path",{fill:"#e30613",d:"M 1289.0 247.0 L 1217.0 267.0 L 1198.0 266.0 L 1191.0 274.0 L 1130.0 291.0 L 1115.0 293.0 L 1102.0 297.0 L 1099.0 296.0 L 1100.0 293.0 L 1108.0 290.0 L 1070.0 303.0 L 1067.0 303.0 L 1066.0 301.0 L 1064.0 302.0 L 1071.0 317.0 L 1077.0 341.0 L 1078.0 359.0 L 1074.0 381.0 L 1108.0 370.0 L 1128.0 366.0 L 1136.0 362.0 L 1115.0 369.0 L 1106.0 369.0 L 1100.0 367.0 L 1101.0 364.0 L 1108.0 361.0 L 1100.0 364.0 L 1091.0 362.0 L 1089.0 360.0 L 1087.0 352.0 L 1102.0 343.0 L 1165.0 320.0 L 1110.0 336.0 L 1100.0 335.0 L 1099.0 333.0 L 1089.0 331.0 L 1088.0 325.0 L 1101.0 313.0 L 1136.0 298.0 L 1140.0 300.0 L 1140.0 298.0 L 1144.0 295.0 L 1186.0 279.0 L 1193.0 278.0 L 1195.0 280.0 L 1202.0 281.0 L 1212.0 275.0 L 1216.0 270.0 Z "}),L("path",{fill:"#e30613",d:"M 1101.0 209.0 L 1069.0 219.0 L 1063.0 218.0 L 1063.0 220.0 L 1061.0 222.0 L 1037.0 229.0 L 1019.0 236.0 L 1015.0 236.0 L 1008.0 240.0 L 1002.0 241.0 L 981.0 250.0 L 978.0 249.0 L 979.0 246.0 L 985.0 240.0 L 978.0 243.0 L 975.0 251.0 L 966.0 256.0 L 963.0 255.0 L 964.0 252.0 L 959.0 253.0 L 956.0 255.0 L 951.0 255.0 L 949.0 253.0 L 944.0 255.0 L 942.0 253.0 L 942.0 255.0 L 940.0 257.0 L 938.0 257.0 L 933.0 261.0 L 938.0 267.0 L 940.0 272.0 L 955.0 266.0 L 971.0 262.0 L 990.0 260.0 L 1008.0 262.0 L 1022.0 266.0 L 1031.0 270.0 L 1046.0 280.0 L 1039.0 275.0 L 1038.0 271.0 L 1047.0 262.0 L 1105.0 241.0 L 1052.0 258.0 L 1043.0 259.0 L 1034.0 262.0 L 1029.0 261.0 L 1022.0 265.0 L 1019.0 265.0 L 1013.0 262.0 L 1000.0 261.0 L 998.0 259.0 L 999.0 256.0 L 1003.0 255.0 L 1008.0 250.0 L 1015.0 247.0 L 1017.0 241.0 L 1027.0 236.0 L 1067.0 220.0 Z "}),L("path",{fill:"#e30613",d:"M 433.0 531.0 L 438.0 531.0 L 443.0 528.0 L 465.0 523.0 L 468.0 521.0 L 476.0 520.0 L 481.0 518.0 L 480.0 513.0 L 482.0 511.0 L 487.0 509.0 L 492.0 509.0 L 497.0 507.0 L 500.0 507.0 L 501.0 509.0 L 513.0 509.0 L 513.0 511.0 L 509.0 514.0 L 511.0 515.0 L 511.0 517.0 L 509.0 519.0 L 499.0 522.0 L 493.0 526.0 L 495.0 524.0 L 504.0 521.0 L 508.0 522.0 L 508.0 525.0 L 508.0 521.0 L 510.0 519.0 L 521.0 516.0 L 527.0 517.0 L 542.0 516.0 L 544.0 518.0 L 544.0 520.0 L 539.0 526.0 L 530.0 529.0 L 529.0 532.0 L 521.0 534.0 L 515.0 537.0 L 510.0 537.0 L 507.0 539.0 L 497.0 542.0 L 493.0 542.0 L 491.0 543.0 L 496.0 543.0 L 506.0 539.0 L 513.0 538.0 L 526.0 533.0 L 538.0 530.0 L 538.0 528.0 L 540.0 526.0 L 551.0 527.0 L 551.0 529.0 L 560.0 527.0 L 560.0 524.0 L 566.0 514.0 L 564.0 515.0 L 545.0 516.0 L 544.0 515.0 L 536.0 515.0 L 532.0 513.0 L 528.0 513.0 L 518.0 510.0 L 509.0 506.0 L 498.0 499.0 L 484.0 486.0 L 474.0 495.0 L 470.0 496.0 L 465.0 499.0 L 464.0 503.0 L 459.0 506.0 L 456.0 506.0 L 454.0 509.0 L 445.0 513.0 L 447.0 513.0 L 452.0 510.0 L 457.0 509.0 L 467.0 504.0 L 474.0 502.0 L 480.0 503.0 L 481.0 506.0 L 480.0 509.0 L 452.0 520.0 Z "}),L("path",{fill:"#e30613",d:"M 1459.0 623.0 L 1457.0 624.0 L 1450.0 624.0 L 1449.0 625.0 L 1430.0 627.0 L 1416.0 627.0 L 1390.0 630.0 L 1376.0 630.0 L 1364.0 631.0 L 1356.0 633.0 L 1344.0 632.0 L 1320.0 635.0 L 1314.0 637.0 L 1311.0 646.0 L 1304.0 660.0 L 1313.0 657.0 L 1311.0 656.0 L 1312.0 653.0 L 1327.0 651.0 L 1341.0 647.0 L 1355.0 645.0 L 1369.0 641.0 L 1383.0 639.0 L 1397.0 635.0 L 1447.0 625.0 L 1452.0 625.0 Z "}),L("path",{fill:"#e30613",d:"M 1477.0 407.0 L 1455.0 411.0 L 1446.0 414.0 L 1441.0 414.0 L 1433.0 417.0 L 1424.0 419.0 L 1415.0 419.0 L 1392.0 423.0 L 1385.0 422.0 L 1385.0 419.0 L 1387.0 417.0 L 1392.0 415.0 L 1395.0 412.0 L 1428.0 401.0 L 1426.0 401.0 L 1422.0 403.0 L 1396.0 410.0 L 1375.0 414.0 L 1343.0 423.0 L 1355.0 422.0 L 1357.0 424.0 L 1360.0 425.0 L 1359.0 428.0 L 1352.0 431.0 L 1346.0 431.0 L 1353.0 434.0 L 1359.0 438.0 L 1365.0 445.0 L 1367.0 446.0 L 1384.0 433.0 L 1391.0 429.0 L 1404.0 423.0 L 1417.0 420.0 L 1427.0 420.0 L 1440.0 423.0 L 1449.0 428.0 L 1456.0 434.0 L 1463.0 430.0 L 1471.0 427.0 L 1477.0 426.0 L 1473.0 426.0 L 1468.0 428.0 L 1457.0 430.0 L 1454.0 429.0 L 1453.0 426.0 L 1450.0 423.0 L 1447.0 422.0 L 1446.0 419.0 L 1453.0 413.0 Z "}),L("path",{fill:"#e30613",d:"M 781.0 489.0 L 777.0 489.0 L 776.0 490.0 L 753.0 494.0 L 739.0 495.0 L 723.0 526.0 L 741.0 521.0 L 748.0 521.0 L 758.0 528.0 Z "}),L("path",{fill:"#e30613",d:"M 1389.0 397.0 L 1384.0 397.0 L 1361.0 404.0 L 1356.0 403.0 L 1356.0 398.0 L 1354.0 398.0 L 1352.0 401.0 L 1354.0 403.0 L 1353.0 406.0 L 1349.0 408.0 L 1336.0 411.0 L 1331.0 414.0 L 1321.0 417.0 L 1318.0 417.0 L 1314.0 419.0 L 1312.0 422.0 L 1306.0 423.0 L 1305.0 421.0 L 1303.0 421.0 L 1299.0 425.0 L 1291.0 427.0 L 1287.0 426.0 L 1288.0 423.0 L 1292.0 422.0 L 1289.0 422.0 L 1280.0 425.0 L 1265.0 426.0 L 1252.0 430.0 L 1246.0 429.0 L 1246.0 427.0 L 1241.0 428.0 L 1237.0 431.0 L 1227.0 432.0 L 1222.0 434.0 L 1219.0 433.0 L 1220.0 430.0 L 1226.0 428.0 L 1208.0 431.0 L 1208.0 434.0 L 1203.0 440.0 L 1194.0 442.0 L 1189.0 445.0 L 1179.0 447.0 L 1175.0 450.0 L 1169.0 452.0 L 1173.0 452.0 L 1178.0 454.0 L 1180.0 451.0 L 1188.0 448.0 L 1202.0 447.0 L 1208.0 444.0 L 1224.0 439.0 L 1236.0 437.0 L 1241.0 434.0 L 1245.0 434.0 L 1252.0 438.0 L 1255.0 441.0 L 1258.0 440.0 L 1256.0 439.0 L 1255.0 436.0 L 1256.0 433.0 L 1278.0 428.0 L 1284.0 425.0 L 1287.0 426.0 L 1287.0 428.0 L 1346.0 416.0 L 1342.0 416.0 L 1321.0 421.0 L 1318.0 420.0 L 1319.0 417.0 L 1326.0 416.0 L 1359.0 405.0 L 1363.0 405.0 L 1386.0 397.0 Z "}),L("path",{fill:"#e30613",d:"M 607.0 300.0 L 604.0 301.0 L 602.0 304.0 L 596.0 307.0 L 591.0 306.0 L 591.0 303.0 L 586.0 302.0 L 580.0 305.0 L 572.0 314.0 L 568.0 316.0 L 553.0 318.0 L 545.0 320.0 L 539.0 323.0 L 535.0 322.0 L 527.0 328.0 L 519.0 332.0 L 509.0 339.0 L 505.0 339.0 L 505.0 342.0 L 486.0 361.0 L 479.0 364.0 L 470.0 364.0 L 468.0 365.0 L 468.0 367.0 L 463.0 373.0 L 463.0 377.0 L 460.0 379.0 L 455.0 378.0 L 454.0 374.0 L 452.0 374.0 L 450.0 375.0 L 449.0 379.0 L 452.0 380.0 L 452.0 382.0 L 450.0 384.0 L 443.0 388.0 L 437.0 388.0 L 434.0 391.0 L 422.0 396.0 L 417.0 395.0 L 417.0 389.0 L 415.0 393.0 L 417.0 395.0 L 417.0 397.0 L 415.0 399.0 L 429.0 393.0 L 466.0 382.0 L 470.0 382.0 L 472.0 384.0 L 472.0 382.0 L 479.0 371.0 L 488.0 359.0 L 500.0 347.0 L 514.0 336.0 L 530.0 327.0 L 539.0 323.0 L 552.0 319.0 L 563.0 317.0 L 589.0 317.0 L 597.0 319.0 L 598.0 314.0 L 602.0 306.0 Z "}),L("path",{fill:"#e30613",d:"M 467.0 396.0 L 457.0 401.0 L 445.0 409.0 L 413.0 420.0 L 415.0 420.0 L 421.0 417.0 L 432.0 414.0 L 436.0 414.0 L 437.0 416.0 L 442.0 416.0 L 445.0 414.0 L 453.0 414.0 L 457.0 417.0 L 457.0 420.0 L 451.0 427.0 L 447.0 427.0 L 442.0 429.0 L 448.0 430.0 L 448.0 432.0 L 444.0 437.0 L 440.0 440.0 L 424.0 447.0 L 413.0 451.0 L 409.0 450.0 L 389.0 459.0 L 406.0 452.0 L 412.0 452.0 L 418.0 449.0 L 430.0 447.0 L 447.0 441.0 L 451.0 442.0 L 451.0 444.0 L 449.0 446.0 L 446.0 447.0 L 448.0 447.0 L 454.0 444.0 L 463.0 442.0 L 462.0 415.0 L 464.0 405.0 L 466.0 401.0 Z "}),L("path",{fill:"#e30613",d:"M 1383.0 332.0 L 1380.0 333.0 L 1378.0 335.0 L 1370.0 336.0 L 1313.0 351.0 L 1292.0 355.0 L 1278.0 356.0 L 1275.0 357.0 L 1262.0 368.0 L 1252.0 375.0 L 1269.0 370.0 L 1274.0 370.0 L 1281.0 366.0 L 1292.0 363.0 L 1304.0 357.0 L 1309.0 357.0 L 1365.0 338.0 L 1376.0 335.0 L 1382.0 336.0 Z "}),L("path",{fill:"#e30613",d:"M 289.0 836.0 L 277.0 829.0 L 274.0 829.0 L 244.0 841.0 L 239.0 845.0 L 234.0 845.0 L 229.0 849.0 L 203.0 860.0 L 190.0 864.0 L 176.0 870.0 L 183.0 868.0 L 186.0 866.0 L 241.0 849.0 L 252.0 847.0 L 262.0 843.0 Z "}),L("path",{fill:"#e30613",d:"M 1117.0 376.0 L 1113.0 378.0 L 1108.0 379.0 L 1100.0 383.0 L 1095.0 383.0 L 1088.0 388.0 L 1083.0 389.0 L 1080.0 388.0 L 1080.0 386.0 L 1082.0 384.0 L 1073.0 386.0 L 1067.0 404.0 L 1065.0 407.0 L 1072.0 404.0 L 1076.0 404.0 L 1080.0 401.0 L 1082.0 398.0 L 1085.0 397.0 L 1086.0 395.0 L 1090.0 394.0 L 1113.0 378.0 Z "}),L("path",{fill:"#e30613",d:"M 442.0 795.0 L 440.0 795.0 L 421.0 802.0 L 410.0 804.0 L 397.0 809.0 L 384.0 812.0 L 371.0 817.0 L 369.0 817.0 L 376.0 824.0 L 425.0 801.0 Z "}),L("path",{fill:"#e30613",d:"M 1372.0 677.0 L 1352.0 680.0 L 1347.0 682.0 L 1335.0 683.0 L 1323.0 686.0 L 1311.0 687.0 L 1305.0 689.0 L 1292.0 691.0 L 1286.0 691.0 L 1280.0 699.0 L 1288.0 696.0 L 1305.0 693.0 L 1352.0 681.0 Z "}),L("path",{fill:"#e30613",d:"M 1196.0 722.0 L 1191.0 720.0 L 1185.0 715.0 L 1182.0 715.0 L 1169.0 719.0 L 1166.0 722.0 L 1163.0 722.0 L 1159.0 724.0 L 1161.0 724.0 L 1162.0 723.0 L 1168.0 723.0 L 1171.0 725.0 L 1181.0 724.0 L 1182.0 726.0 L 1187.0 726.0 Z "}),L("path",{fill:"#e30613",d:"M 1006.0 767.0 L 1001.0 766.0 L 1001.0 764.0 L 993.0 767.0 L 973.0 771.0 L 969.0 773.0 L 969.0 774.0 L 966.0 776.0 L 971.0 776.0 L 974.0 778.0 L 976.0 778.0 L 989.0 772.0 L 997.0 772.0 Z "}),L("path",{fill:"#e30613",d:"M 1291.0 437.0 L 1284.0 439.0 L 1278.0 442.0 L 1274.0 442.0 L 1273.0 440.0 L 1263.0 443.0 L 1261.0 448.0 L 1261.0 452.0 L 1264.0 453.0 L 1264.0 455.0 L 1278.0 444.0 Z "}),L("path",{fill:"#e30613",d:"M 1081.0 278.0 L 1075.0 279.0 L 1065.0 283.0 L 1060.0 283.0 L 1057.0 281.0 L 1054.0 284.0 L 1051.0 284.0 L 1053.0 288.0 L 1057.0 291.0 L 1066.0 285.0 L 1074.0 282.0 Z "}),L("path",{fill:"#ffffff",d:"M 471.0 465.0 L 420.0 481.0 L 416.0 480.0 L 420.0 473.0 L 393.0 486.0 L 391.0 481.0 L 398.0 477.0 L 371.0 489.0 L 287.0 546.0 L 207.0 614.0 L 204.0 611.0 L 251.0 506.0 L 235.0 508.0 L 229.0 517.0 L 225.0 517.0 L 227.0 506.0 L 208.0 513.0 L 197.0 509.0 L 139.0 652.0 L 104.0 682.0 L 116.0 682.0 L 116.0 690.0 L 123.0 697.0 L 84.0 808.0 L 111.0 746.0 L 115.0 748.0 L 94.0 810.0 L 80.0 870.0 L 93.0 841.0 L 101.0 837.0 L 117.0 799.0 L 121.0 801.0 L 116.0 827.0 L 167.0 706.0 L 174.0 699.0 L 213.0 749.0 L 262.0 792.0 L 256.0 782.0 L 259.0 779.0 L 295.0 809.0 L 303.0 808.0 L 354.0 836.0 L 308.0 791.0 L 311.0 788.0 L 327.0 800.0 L 250.0 718.0 L 208.0 658.0 L 268.0 610.0 L 419.0 506.0 L 390.0 520.0 L 387.0 519.0 L 392.0 513.0 Z "}),L("path",{fill:"#ffffff",d:"M 528.0 566.0 L 525.0 572.0 L 518.0 574.0 L 509.0 569.0 L 465.0 658.0 L 446.0 684.0 L 427.0 703.0 L 423.0 700.0 L 433.0 670.0 L 473.0 589.0 L 464.0 585.0 L 464.0 581.0 L 453.0 585.0 L 443.0 583.0 L 411.0 647.0 L 398.0 681.0 L 369.0 713.0 L 366.0 709.0 L 374.0 687.0 L 416.0 597.0 L 410.0 585.0 L 402.0 587.0 L 395.0 583.0 L 332.0 651.0 L 329.0 648.0 L 347.0 605.0 L 342.0 596.0 L 332.0 597.0 L 330.0 593.0 L 325.0 597.0 L 318.0 595.0 L 279.0 692.0 L 270.0 725.0 L 291.0 747.0 L 312.0 705.0 L 355.0 652.0 L 358.0 655.0 L 341.0 694.0 L 332.0 726.0 L 333.0 743.0 L 333.0 739.0 L 338.0 738.0 L 340.0 756.0 L 345.0 754.0 L 345.0 771.0 L 360.0 740.0 L 392.0 695.0 L 396.0 695.0 L 394.0 719.0 L 402.0 731.0 L 413.0 737.0 L 425.0 733.0 L 450.0 702.0 L 454.0 702.0 L 452.0 728.0 L 454.0 723.0 L 457.0 724.0 L 460.0 741.0 L 477.0 693.0 L 482.0 693.0 L 475.0 715.0 L 526.0 604.0 L 533.0 583.0 Z "}),L("path",{fill:"#ffffff",d:"M 731.0 457.0 L 725.0 463.0 L 719.0 461.0 L 712.0 468.0 L 695.0 465.0 L 648.0 566.0 L 623.0 635.0 L 605.0 650.0 L 600.0 649.0 L 547.0 685.0 L 541.0 683.0 L 541.0 673.0 L 561.0 628.0 L 591.0 592.0 L 599.0 587.0 L 603.0 588.0 L 595.0 616.0 L 615.0 606.0 L 628.0 580.0 L 628.0 572.0 L 624.0 566.0 L 615.0 560.0 L 589.0 563.0 L 570.0 575.0 L 550.0 595.0 L 526.0 630.0 L 511.0 666.0 L 509.0 693.0 L 520.0 711.0 L 542.0 716.0 L 561.0 706.0 L 595.0 675.0 L 590.0 678.0 L 587.0 675.0 L 618.0 643.0 L 621.0 647.0 L 607.0 689.0 L 607.0 700.0 L 610.0 690.0 L 613.0 691.0 L 610.0 706.0 L 611.0 729.0 L 625.0 695.0 L 628.0 696.0 L 628.0 701.0 L 631.0 699.0 L 647.0 652.0 L 654.0 641.0 L 682.0 691.0 L 687.0 691.0 L 698.0 704.0 L 702.0 701.0 L 720.0 718.0 L 705.0 691.0 L 706.0 688.0 L 712.0 694.0 L 680.0 618.0 L 727.0 580.0 L 734.0 570.0 L 751.0 559.0 L 746.0 558.0 L 747.0 549.0 L 740.0 539.0 L 735.0 543.0 L 729.0 541.0 L 674.0 593.0 L 671.0 589.0 L 722.0 485.0 L 723.0 472.0 Z "}),L("path",{fill:"#ffffff",d:"M 855.0 443.0 L 846.0 450.0 L 842.0 450.0 L 840.0 446.0 L 828.0 457.0 L 821.0 454.0 L 761.0 556.0 L 730.0 622.0 L 715.0 667.0 L 717.0 670.0 L 718.0 667.0 L 721.0 668.0 L 721.0 678.0 L 725.0 682.0 L 729.0 702.0 L 731.0 697.0 L 734.0 698.0 L 735.0 730.0 L 737.0 733.0 L 739.0 716.0 L 746.0 695.0 L 775.0 645.0 L 779.0 645.0 L 780.0 657.0 L 785.0 666.0 L 803.0 674.0 L 814.0 671.0 L 839.0 657.0 L 834.0 659.0 L 831.0 658.0 L 832.0 655.0 L 870.0 629.0 L 862.0 634.0 L 859.0 631.0 L 900.0 594.0 L 826.0 639.0 L 813.0 645.0 L 807.0 642.0 L 814.0 622.0 L 835.0 612.0 L 862.0 594.0 L 883.0 570.0 L 889.0 551.0 L 887.0 556.0 L 883.0 556.0 L 884.0 549.0 L 878.0 553.0 L 873.0 552.0 L 872.0 556.0 L 868.0 553.0 L 870.0 546.0 L 866.0 548.0 L 860.0 546.0 L 833.0 565.0 L 827.0 565.0 L 817.0 574.0 L 814.0 573.0 L 816.0 569.0 L 791.0 601.0 L 786.0 610.0 L 786.0 618.0 L 782.0 627.0 L 753.0 656.0 L 750.0 655.0 L 755.0 636.0 L 777.0 590.0 L 856.0 458.0 L 852.0 457.0 L 850.0 453.0 Z "})]})]})}export{t as BrandLogo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{displayName as y}from"../../db/schema/index.js";import{Menu as t}from"@base-ui/react/menu";import{IconDeviceDesktop as T,IconLogout as k,IconMoon as I,IconSettings as M,IconSun as P,IconUserCog as O}from"@tabler/icons-react";import S from"next/link";import{useRouter as C}from"next/navigation";import{useTranslations as m}from"next-intl";import{useTransition as u}from"react";import{Avatar as z}from"../ui/avatar.js";import{DropdownMenuSeparator as U}from"../ui/dropdown-menu.js";import{signOutAction as L}from"../../features/auth/actions.js";import{cn as o}from"../../lib/cn.js";import{themes as r}from"../../theme/config.js";import{setUserTheme as A}from"../../theme/theme.js";const D={light:P,dark:I,system:T},l=o("flex h-7 w-full cursor-pointer items-center gap-2 overflow-hidden rounded-sm px-2 text-sm outline-none","text-foreground/80 transition-colors","hover:bg-accent hover:text-accent-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground","focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring","data-disabled:cursor-not-allowed data-disabled:opacity-50");function X({user:a,theme:i}){const d=m("Auth"),c=m("ThemeSwitcher"),g=C(),[p,f]=u(),[h,b]=u(),s=y(a),x=s!==a.email,v=D[i];function N(){const w=r[(r.indexOf(i)+1)%r.length];f(async()=>{await A(w),g.refresh()})}return n(t.Root,{children:[n(t.Trigger,{"aria-label":s,className:o("group flex h-12 w-full cursor-pointer items-center gap-2 overflow-hidden rounded-md p-2 text-left outline-none","text-sidebar-foreground","transition-[background-color,box-shadow] duration-base ease-out","hover:bg-sidebar-accent/80 data-popup-open:bg-sidebar-accent/80","focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"),children:[e(z,{seed:a.email,name:s,size:"md"}),n("span",{className:"grid min-w-0 flex-1 text-sm leading-tight in-data-collapsed:lg:hidden",children:[e("span",{className:"truncate font-semibold",children:s}),x&&e("span",{className:"truncate text-xs text-muted-foreground",children:a.email})]}),e(M,{size:16,"aria-hidden":!0,className:"ml-auto shrink-0 text-muted-foreground transition-transform duration-base group-data-popup-open:rotate-90 in-data-collapsed:lg:hidden"})]}),e(t.Portal,{children:e(t.Positioner,{side:"top",align:"end",sideOffset:8,className:"z-40 outline-none",children:n(t.Popup,{className:o("flex w-(--anchor-width) min-w-52 flex-col gap-0.5 rounded-md border border-border bg-card p-1 shadow-md","transition-[opacity,transform] duration-base","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0"),children:[n(t.Item,{closeOnClick:!1,disabled:p,onClick:N,"aria-label":c("label"),className:l,children:[e(v,{size:16,"aria-hidden":!0,className:"shrink-0"}),e("span",{className:"flex-1 text-left",children:c(i)})]}),n(t.LinkItem,{render:e(S,{href:"/user/settings"}),closeOnClick:!0,className:l,children:[e(O,{size:16,"aria-hidden":!0,className:"shrink-0"}),e("span",{className:"flex-1 text-left",children:d("Settings.button")})]}),e(U,{}),n(t.Item,{disabled:h,onClick:()=>b(async()=>{await L()}),className:o(l,"text-destructive hover:bg-destructive/10 hover:text-destructive data-highlighted:bg-destructive/10 data-highlighted:text-destructive"),children:[e(k,{size:16,"aria-hidden":!0,className:"shrink-0"}),e("span",{className:"flex-1 text-left",children:d("SignOut.button")})]})]})})})]})}export{X as UserMenu};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Form } from "./form.js";
|
|
3
|
+
import type { FormState } from "../../lib/actions/state.js";
|
|
4
|
+
type ActionFormProps = React.ComponentProps<typeof Form> & {
|
|
5
|
+
actionState?: FormState<unknown>;
|
|
6
|
+
resetOnSuccess?: boolean;
|
|
7
|
+
errorClassName?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function ActionForm({ actionState, onSubmitCapture, resetOnSuccess, errorClassName, children, ...rest }: ActionFormProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as y,jsxs as T}from"react/jsx-runtime";import{useLayoutEffect as a,useRef as u}from"react";import{Alert as p}from"./alert.js";import{Form as F}from"./form.js";import{useFormToast as d}from"../../lib/hooks/use-form-toast.js";function E(t){const n=new Map;for(const[e,o]of new FormData(t).entries()){if(typeof o!="string")continue;const r=n.get(e);r?r.push(o):n.set(e,[o])}return n}function h(t,n){for(const e of t.elements){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)||!e.name)continue;const o=n.get(e.name)??[];if(e instanceof HTMLInputElement){if(e.type==="file")continue;if(e.type==="password"){e.value="";continue}if(e.type==="checkbox"||e.type==="radio"){e.checked=o.includes(e.value);continue}}if(e instanceof HTMLSelectElement&&e.multiple){for(const r of e.options)r.selected=o.includes(r.value);continue}e.value=o[0]??""}}function S({actionState:t,onSubmitCapture:n,resetOnSuccess:e=!1,errorClassName:o,children:r,...c}){const m=u(null),i=u(null);d(t),a(()=>{const s=m.current;if(!(!s||!t)){if(t.ok){i.current=null,e&&s.reset();return}i.current&&h(s,i.current)}},[t,e]);const f=t&&!t.ok?t.fieldErrors:void 0,l=f?._form?.[0];return T(F,{noValidate:!0,...c,errors:f,ref:m,onSubmitCapture:s=>{n?.(s),s.defaultPrevented||(i.current=E(s.currentTarget))},children:[l?y(p,{tone:"destructive",className:o,children:l}):null,r]})}export{S as ActionForm};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const AlertDialog: typeof AlertDialogPrimitive.Root;
|
|
4
|
+
declare const AlertDialogTrigger: AlertDialogPrimitive.Trigger;
|
|
5
|
+
declare const AlertDialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const AlertDialogClose: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare function AlertDialogBackdrop({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Backdrop>): React.JSX.Element;
|
|
8
|
+
declare function AlertDialogPopup({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Popup>): React.JSX.Element;
|
|
9
|
+
declare function AlertDialogViewport({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Viewport>): React.JSX.Element;
|
|
10
|
+
declare function AlertDialogContent({ className, children, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Popup>): React.JSX.Element;
|
|
11
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
|
|
12
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
|
|
13
|
+
declare function AlertDialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
14
|
+
export { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogPopup, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as o,jsxs as y}from"react/jsx-runtime";import{AlertDialog as i}from"@base-ui/react/alert-dialog";import{cn as r}from"../../lib/cn.js";const c=i.Root,g=i.Trigger,a=i.Portal,m=i.Close;function l({className:t,...e}){return o(i.Backdrop,{className:r("fixed inset-0 z-30 bg-black/60 transition-opacity duration-base","data-closed:opacity-0 data-starting-style:opacity-0 data-ending-style:opacity-0",t),...e})}function n({className:t,...e}){return o(i.Popup,{className:r("relative w-full max-w-md","rounded-lg border border-border bg-card p-6 shadow-lg outline-none","transition-[opacity,transform] duration-base ease-out","data-starting-style:opacity-0 data-starting-style:scale-95","data-ending-style:opacity-0 data-ending-style:scale-95",t),...e})}function s({className:t,...e}){return o(i.Viewport,{className:r("fixed inset-0 z-40 flex items-center justify-center overflow-y-auto p-4",t),...e})}function d({className:t,children:e,...p}){return y(a,{children:[o(l,{}),o(s,{children:o(n,{className:t,...p,children:o("div",{className:"flex flex-col gap-4",children:e})})})]})}function f({className:t,...e}){return o(i.Title,{className:r("text-base font-semibold text-foreground",t),...e})}function u({className:t,...e}){return o(i.Description,{className:r("text-sm text-muted-foreground",t),...e})}function D({className:t,...e}){return o("div",{className:r("mt-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}export{c as AlertDialog,l as AlertDialogBackdrop,m as AlertDialogClose,d as AlertDialogContent,u as AlertDialogDescription,D as AlertDialogFooter,n as AlertDialogPopup,a as AlertDialogPortal,f as AlertDialogTitle,g as AlertDialogTrigger,s as AlertDialogViewport};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
tone?: "success" | "destructive" | "warning" | "info" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export type AlertTone = NonNullable<VariantProps<typeof alertVariants>["tone"]>;
|
|
7
|
+
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof alertVariants> {
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function Alert({ tone, icon, title, role, className, children, ...props }: AlertProps): React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as a,jsxs as s}from"react/jsx-runtime";import{cva as d}from"class-variance-authority";import{cn as p}from"../../lib/cn.js";const u=d("flex items-start gap-3 rounded-lg border p-4 text-sm",{variants:{tone:{destructive:"border-destructive/30 bg-destructive/10 text-destructive",warning:"border-warning/30 bg-warning/10 text-warning",info:"border-border bg-muted text-foreground",success:"border-success/30 bg-success/10 text-success"}},defaultVariants:{tone:"info"}}),m=new Set(["destructive","warning"]);function g({tone:e,icon:t,title:r,role:n,className:o,children:i,...l}){const c=n??(e&&m.has(e)?"alert":"status");return s("div",{role:c,className:p(u({tone:e}),o),...l,children:[t?a("span",{"aria-hidden":!0,className:"mt-0.5 shrink-0",children:t}):null,s("div",{className:"flex flex-col gap-1",children:[r?a("p",{className:"font-semibold",children:r}):null,i]})]})}export{g as Alert};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare const avatarVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export type AvatarSize = NonNullable<VariantProps<typeof avatarVariants>["size"]>;
|
|
6
|
+
type AvatarProps = VariantProps<typeof avatarVariants> & {
|
|
7
|
+
seed: string;
|
|
8
|
+
name?: string | null;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function Avatar({ seed, name, size, className }: AvatarProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as n,jsxs as g}from"react/jsx-runtime";import{Avatar as a}from"@base-ui/react/avatar";import{initials as l}from"@dicebear/collection";import{createAvatar as m}from"@dicebear/core";import{cva as c}from"class-variance-authority";import{useMemo as u}from"react";import{cn as f}from"../../lib/cn.js";const p=c("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted font-medium text-muted-foreground",{variants:{size:{sm:"size-6 text-[10px]",md:"size-8 text-xs",lg:"size-9 text-xs",xl:"size-11 text-sm","2xl":"size-16 text-base"}},defaultVariants:{size:"md"}});function v(t,e){const r=(t?.trim()||e).split(/[\s.@_-]+/).filter(Boolean);return((r[0]?.[0]??"?")+(r[1]?.[0]??"")).toUpperCase()}function d(t){const e=m(l,{seed:t}).toString();return`data:image/svg+xml;utf8,${encodeURIComponent(e)}`}function V({seed:t,name:e,size:i,className:r}){const s=e?.trim()||t,o=u(()=>d(s),[s]);return g(a.Root,{className:f(p({size:i}),r),children:[n(a.Image,{src:o,alt:"",className:"size-full object-cover"}),n(a.Fallback,{delay:200,className:"flex size-full items-center justify-center",children:v(e,t)})]})}export{V as Avatar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{cn as n}from"../../lib/cn.js";function r({className:e,...t}){return o("span",{className:n("inline-flex h-5 items-center rounded-sm bg-muted px-1.5 text-xs font-medium text-muted-foreground",e),...t})}export{r as Badge};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Button as BaseButton } from "@base-ui/react/button";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "primary" | "secondary" | "destructive" | "ghost" | null | undefined;
|
|
6
|
+
size?: "icon" | "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type BaseButtonProps = React.ComponentProps<typeof BaseButton>;
|
|
9
|
+
export interface ButtonProps extends BaseButtonProps, VariantProps<typeof buttonVariants> {
|
|
10
|
+
}
|
|
11
|
+
export declare function Button({ className, variant, size, ...props }: ButtonProps): React.JSX.Element;
|
|
12
|
+
export { buttonVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as p}from"react/jsx-runtime";import{Button as a}from"@base-ui/react/button";import{cva as i}from"class-variance-authority";import{cn as s}from"../../lib/cn.js";const t=i("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border border-transparent font-medium outline-none transition-colors select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50",{variants:{variant:{primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",secondary:"border border-border bg-input text-foreground hover:bg-accent hover:text-accent-foreground",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-white hover:bg-destructive/90 active:bg-destructive/80"},size:{xs:"h-7 px-3 text-sm",sm:"h-9 px-3 text-sm",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-base",icon:"size-10"}},defaultVariants:{variant:"primary",size:"md"}});function f({className:e,variant:r,size:o,...n}){return p(a,{className:s(t({variant:r,size:o}),e),...n})}export{f as Button,t as buttonVariants};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{cn as o}from"../../lib/cn.js";function a({className:r,...e}){return t("div",{className:o("rounded-lg border border-border bg-card p-6 shadow-2xs",r),...e})}export{a as Card};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
2
|
+
import { CheckboxGroup as CheckboxGroupPrimitive } from "@base-ui/react/checkbox-group";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
export declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
export declare function CheckboxGroup({ className, ...props }: React.ComponentProps<typeof CheckboxGroupPrimitive>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{Checkbox as i}from"@base-ui/react/checkbox";import{CheckboxGroup as c}from"@base-ui/react/checkbox-group";import{IconCheck as a}from"@tabler/icons-react";import{cn as t}from"../../lib/cn.js";function p({className:o,...r}){return e(i.Root,{className:t("inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-border bg-input text-foreground outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground","data-disabled:cursor-not-allowed data-disabled:opacity-50",o),...r,children:e(i.Indicator,{className:"flex items-center justify-center",children:e(a,{size:12,stroke:3,"aria-hidden":!0})})})}function f({className:o,...r}){return e(c,{className:t("flex flex-col gap-3 data-disabled:opacity-50",o),...r})}export{p as Checkbox,f as CheckboxGroup};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type ComboboxItem = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function Combobox({ value, onChange, onSearch, placeholder, searchPlaceholder, emptyText, loadingText, name, ariaLabel, className, disabled, }: {
|
|
7
|
+
value: ComboboxItem | null;
|
|
8
|
+
onChange: (item: ComboboxItem | null) => void;
|
|
9
|
+
onSearch: (query: string) => Promise<ComboboxItem[]>;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
searchPlaceholder: string;
|
|
12
|
+
emptyText: string;
|
|
13
|
+
loadingText: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as o,jsxs as r}from"react/jsx-runtime";import{Combobox as t}from"@base-ui/react/combobox";import{IconCheck as E,IconChevronDown as L}from"@tabler/icons-react";import{useEffect as R,useRef as h,useState as l}from"react";import{Spinner as O}from"./spinner.js";import{cn as n}from"../../lib/cn.js";function A({value:i,onChange:v,onSearch:b,placeholder:C,searchPlaceholder:y,emptyText:I,loadingText:P,name:N,ariaLabel:w,className:T,disabled:k}){const[m,q]=l(!1),[p,x]=l(""),[d,c]=l([]),[f,a]=l(!1),g=h(b);g.current=b;const s=h(0);return R(()=>{if(!m)return;const e=++s.current;a(!0);const u=setTimeout(()=>{g.current(p.trim()).then(z=>{s.current===e&&(c(z),a(!1))}).catch(()=>{s.current===e&&(c([]),a(!1))})},250);return()=>clearTimeout(u)},[m,p]),r(t.Root,{items:d,filter:null,name:N,value:i,onValueChange:e=>v(e),isItemEqualToValue:(e,u)=>e.value===u.value,open:m,onOpenChange:e=>{q(e),e||(x(""),s.current++,c([]),a(!1))},onInputValueChange:e=>x(e),disabled:k,children:[r(t.Trigger,{"aria-label":w,className:n("inline-flex h-10 w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-md border border-border bg-input px-2.5 text-sm text-foreground outline-none","transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","data-disabled:cursor-not-allowed data-disabled:opacity-50 data-popup-open:bg-accent data-popup-open:text-accent-foreground",T),children:[o("span",{className:n("min-w-0 flex-1 truncate text-left",!i&&"text-muted-foreground"),children:i?i.label:C}),o(t.Icon,{className:"shrink-0",children:o(L,{size:14,className:"opacity-60","aria-hidden":!0})})]}),o(t.Portal,{children:o(t.Positioner,{sideOffset:4,align:"start",className:"z-40 outline-none",children:r(t.Popup,{className:n("flex w-(--anchor-width) min-w-56 flex-col overflow-hidden rounded-md border border-border bg-popover text-sm text-popover-foreground shadow-md outline-none","transition-[opacity,transform] duration-fast ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0"),children:[o(t.Input,{placeholder:y,className:"h-9 w-full shrink-0 border-0 border-b border-border bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"}),r("div",{className:"max-h-[min(18.5rem,var(--available-height))] overflow-y-auto p-1 outline-none",children:[o(t.List,{children:e=>r(t.Item,{value:e,className:n("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground/80 outline-none transition-colors","data-highlighted:bg-accent data-highlighted:text-accent-foreground","data-disabled:cursor-not-allowed data-disabled:opacity-50"),children:[r("span",{className:"flex min-w-0 flex-1 flex-col",children:[o("span",{className:"truncate",children:e.label}),e.description?o("span",{className:"truncate text-xs text-muted-foreground",children:e.description}):null]}),o(t.ItemIndicator,{className:"flex shrink-0 items-center",children:o(E,{size:14,"aria-hidden":!0})})]},e.value)}),f&&d.length===0?r("div",{className:"flex items-center justify-center gap-2 px-2 py-6 text-sm text-muted-foreground",children:[o(O,{size:14}),P]}):o(t.Empty,{className:n(d.length===0&&!f&&"px-2 py-6 text-center text-sm text-muted-foreground"),children:I})]})]})})})]})}export{A as Combobox};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function CopyButton({ value, copyLabel, copiedLabel, variant, size, className, }: {
|
|
2
|
+
value: string;
|
|
3
|
+
copyLabel: string;
|
|
4
|
+
copiedLabel: string;
|
|
5
|
+
variant?: "primary" | "secondary" | "ghost" | "destructive";
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "icon";
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{IconCheck as p,IconCopy as l}from"@tabler/icons-react";import{useState as m}from"react";import{Button as u}from"./button.js";function b({value:i,copyLabel:s,copiedLabel:a,variant:n="secondary",size:r="sm",className:c}){const[o,e]=m(!1);return t(u,{type:"button",variant:n,size:r,className:c,"aria-label":o?a:s,onClick:async()=>{await navigator.clipboard.writeText(i),e(!0),setTimeout(()=>e(!1),2e3)},children:o?t(p,{size:16}):t(l,{size:16})})}export{b as CopyButton};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function CountrySelect({ value, onChange, ariaLabel, className, }: {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (code: string) => void;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function CountryMultiSelect({ value, onChange, ariaLabel, className, }: {
|
|
8
|
+
value: readonly string[];
|
|
9
|
+
onChange: (codes: string[]) => void;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e,jsxs as s}from"react/jsx-runtime";import{Popover as u}from"@base-ui/react/popover";import{IconChevronDown as R}from"@tabler/icons-react";import{useLocale as S,useTranslations as y}from"next-intl";import{useMemo as C,useState as N}from"react";import{Checkbox as z}from"./checkbox.js";import{Select as D,SelectContent as K,SelectGroup as M,SelectGroupLabel as O,SelectItem as V,SelectTrigger as q,SelectValue as F}from"./select.js";import{cn as m}from"../../lib/cn.js";import{countriesByContinent as k,getCountryName as L}from"../../lib/countries.js";function G(n){return n.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function U({value:n,onChange:d,ariaLabel:g,className:f}){const i=S(),a=y("Common.Continents"),h=C(()=>k(i),[i]);return s(D,{value:n,onValueChange:r=>d(r??""),children:[e(q,{"aria-label":g,className:m("w-56",f),children:e(F,{children:r=>r?L(r,i):null})}),e(K,{className:"max-h-64 overflow-y-auto",children:h.map(({continent:r,countries:p})=>p.length===0?null:s(M,{children:[e(O,{className:"px-3 pt-1.5 pb-0.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase",children:a(r)}),p.map(({code:l,name:x})=>e(V,{value:l,children:x},l))]},r))})]})}function W({value:n,onChange:d,ariaLabel:g,className:f}){const i=S(),a=y("Commissions.EditorRules.Conditions"),h=y("Common.Continents"),[r,p]=N(!1),[l,x]=N(""),b=C(()=>k(i),[i]),w=C(()=>{const t=G(l.trim());return t?b.map(o=>({...o,countries:o.countries.filter(({code:c,name:v})=>G(v).includes(t)||c.toLowerCase().includes(t))})).filter(o=>o.countries.length>0):b},[b,l]),P=new Set(n),I=t=>{const o=new Set(P);o.has(t)?o.delete(t):o.add(t),d([...o])},T=n.length===0?a("countryMultiPlaceholder"):n.slice(0,3).map(t=>L(t,i)).join(", ")+(n.length>3?` +${n.length-3}`:"");return s(u.Root,{open:r,onOpenChange:p,children:[s(u.Trigger,{"aria-label":g,className:m("inline-flex h-10 min-w-0 cursor-pointer items-center justify-between gap-2 rounded-md border border-border bg-input px-2.5 text-sm text-foreground outline-none","transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","data-popup-open:bg-accent data-popup-open:text-accent-foreground","disabled:cursor-not-allowed disabled:opacity-50","w-56",f),children:[e("span",{className:m("min-w-0 flex-1 truncate text-left",n.length===0&&"text-muted-foreground"),children:T}),e(R,{size:14,className:"shrink-0 opacity-60","aria-hidden":!0})]}),e(u.Portal,{children:e(u.Positioner,{sideOffset:4,align:"start",className:"z-40 outline-none",children:s(u.Popup,{className:m("flex max-h-[min(16rem,var(--available-height))] w-(--anchor-width) min-w-56 flex-col overflow-hidden rounded-md border border-border bg-popover text-sm text-popover-foreground shadow-md outline-none","transition-[opacity,transform] duration-fast ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0"),children:[e("input",{type:"text",value:l,onChange:t=>x(t.target.value),placeholder:a("countrySearchPlaceholder"),"aria-label":a("countrySearchPlaceholder"),className:"h-9 w-full shrink-0 border-0 border-b border-border bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"}),e("div",{tabIndex:-1,className:"min-h-0 flex-1 overflow-y-auto p-1 outline-none",children:w.length===0?e("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:a("countryNoResults")}):w.map(({continent:t,countries:o})=>s("section",{children:[e("h4",{className:"px-3 pt-1.5 pb-0.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase",children:h(t)}),e("ul",{children:o.map(({code:c,name:v})=>e("li",{children:s("button",{type:"button",onClick:()=>I(c),className:"flex h-7 w-full cursor-pointer items-center gap-2 rounded-sm px-2 text-left text-sm text-foreground/80 outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",children:[e(z,{checked:P.has(c),tabIndex:-1,className:"shrink-0"}),e("span",{className:"min-w-0 flex-1 truncate",children:v})]})},c))})]},t))})]})})})]})}export{W as CountryMultiSelect,U as CountrySelect};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ColumnDef } from "@tanstack/react-table";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
type Props<T> = {
|
|
4
|
+
data: T[];
|
|
5
|
+
columns: ColumnDef<T>[];
|
|
6
|
+
empty?: ReactNode;
|
|
7
|
+
pagination?: ReactNode;
|
|
8
|
+
getRowId?: (row: T) => string;
|
|
9
|
+
};
|
|
10
|
+
export declare function DataTable<T>({ data, columns, empty, pagination, getRowId, }: Props<T>): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{flexRender as s,getCoreRowModel as u,useReactTable as b}from"@tanstack/react-table";import{Table as f,TableBody as g,TableCell as y,TableEmptyState as R,TableHead as C,TableHeader as w,TableRow as r}from"./table.js";function M({data:c,columns:n,empty:p,pagination:m,getRowId:d}){const o=b({data:c,columns:n,getCoreRowModel:u(),getRowId:d?l=>d(l):void 0}),T=n.length;return i("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[i(f,{children:[a(w,{children:o.getHeaderGroups().map(l=>a(r,{children:l.headers.map(e=>{const t=e.column.columnDef.meta;return a(C,{pin:t?.pin,className:t?.className,children:e.isPlaceholder?null:s(e.column.columnDef.header,e.getContext())},e.id)})},l.id))}),a(g,{children:o.getRowModel().rows.length===0?a(R,{colSpan:T,children:p}):o.getRowModel().rows.map(l=>a(r,{children:l.getVisibleCells().map(e=>{const t=e.column.columnDef.meta;return a(y,{pin:t?.pin,className:t?.className,children:s(e.column.columnDef.cell,e.getContext())},e.id)})},l.id))})]}),m&&a("div",{className:"mt-auto shrink-0 pb-4",children:m})]})}export{M as DataTable};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type DateRangePickerProps = {
|
|
2
|
+
startName: string;
|
|
3
|
+
endName: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultStart?: string;
|
|
7
|
+
defaultEnd?: string | null;
|
|
8
|
+
/** Earliest selectable start date (ISO `YYYY-MM-DD`). Defaults to today. */
|
|
9
|
+
minDate?: string;
|
|
10
|
+
/** Latest selectable date (ISO `YYYY-MM-DD`). Defaults to unbounded. */
|
|
11
|
+
maxDate?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Called whenever the selection changes, with ISO `YYYY-MM-DD` values (or
|
|
14
|
+
* `null`). Use for controlled/filter scenarios; the hidden inputs remain for
|
|
15
|
+
* plain form submission.
|
|
16
|
+
*/
|
|
17
|
+
onChange?: (start: string | null, end: string | null) => void;
|
|
18
|
+
/** Allow the end date to remain empty (open-ended). Defaults to true. */
|
|
19
|
+
allowOpenEnded?: boolean;
|
|
20
|
+
/** Number of years selectable into the future from today. Defaults to 10. */
|
|
21
|
+
yearLookahead?: number;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function DateRangePicker({ startName, endName, label, description, defaultStart, defaultEnd, minDate, maxDate, onChange, allowOpenEnded, yearLookahead, disabled, className, }: DateRangePickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Fragment as ke,jsx as t,jsxs as m}from"react/jsx-runtime";import{Popover as V}from"@base-ui/react/popover";import{IconCalendar as me,IconChevronLeft as de,IconChevronRight as fe,IconX as pe}from"@tabler/icons-react";import{useLocale as be,useTranslations as ee}from"next-intl";import{useMemo as f,useState as T}from"react";import{Button as te}from"./button.js";import{Field as he,FieldDescription as ve,FieldError as De,FieldLabel as ye}from"./field.js";import{Select as ne,SelectContent as re,SelectItem as ae,SelectTrigger as oe,SelectValue as se}from"./select.js";import{cn as b}from"../../lib/cn.js";function F(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function C(e,r){return new Date(e.getFullYear(),e.getMonth()+r,1)}function U(e,r){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+r)}function K(e,r){return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()}function ie(e,r){return F(e).getTime()>=F(r).getTime()}function Z(e,r){return F(e).getTime()<F(r).getTime()}function xe(e,r){return F(e).getTime()>F(r).getTime()}function I(e){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),u=String(e.getDate()).padStart(2,"0");return`${r}-${s}-${u}`}function W(e){if(!e)return null;const[r,s,u]=e.split("-").map(Number);return!r||!s||!u?null:new Date(r,s-1,u)}function Ne(e){const r=new Date(e.getFullYear(),e.getMonth(),1),s=(r.getDay()+6)%7,u=U(r,-s);return Array.from({length:42},(p,x)=>U(u,x))}const we=["mon","tue","wed","thu","fri","sat","sun"];function Se(e){return f(()=>{const r=new Intl.DateTimeFormat(e,{weekday:"narrow"}),s=new Date(2024,0,1);return we.map((u,p)=>({key:u,label:r.format(U(s,p))}))},[e])}function Pe(e,r,s,u,p){return f(()=>{if(!r)return u;const x=new Intl.DateTimeFormat(e,{day:"numeric",month:"short",year:"numeric"});return s?x.formatRange(r,s):p(x.format(r))},[e,r,s,u,p])}function _e({startName:e,endName:r,label:s,description:u,defaultStart:p,defaultEnd:x,minDate:z,maxDate:L,onChange:B,allowOpenEnded:q=!0,yearLookahead:R=10,disabled:M=!1,className:G}){const h=ee("DateRangePicker"),S=be(),v=f(()=>F(new Date),[]),i=f(()=>W(z)??v,[z,v]),D=f(()=>W(L),[L]),[l,N]=T(()=>W(p)),[y,O]=T(()=>W(x??null)),[d,P]=T(()=>C(l??D??i,0)),[E,_]=T(!1),Y=(n,o)=>{B?.(n?I(n):null,o?I(o):null)},H=Pe(S,l,y,h("placeholder"),n=>h("startOnly",{date:n})),j=n=>{if(!l||l&&y){N(n),O(null),Y(n,null);return}if(Z(n,l)){N(n),O(null),Y(n,null);return}K(n,l)||(O(n),Y(l,n),_(!1))},A=()=>{N(null),O(null),P(C(D??i,0)),Y(null,null)},$=f(()=>ie(C(d,-1),new Date(i.getFullYear(),i.getMonth(),1)),[d,i]),J=f(()=>{const n=Math.min(i.getFullYear(),v.getFullYear()),o=v.getFullYear()+R;return Array.from({length:o-n+1},(c,g)=>n+g)},[i,v,R]),X=f(()=>{const n=Array.from({length:12},(o,c)=>c);return d.getFullYear()===i.getFullYear()?n.filter(o=>o>=i.getMonth()):n},[d,i]),a=f(()=>new Intl.DateTimeFormat(S,{month:"long"}),[S]),w=(n,o)=>{let c=n,g=o;(g<i.getFullYear()||g===i.getFullYear()&&c<i.getMonth())&&(g=i.getFullYear(),c=i.getMonth()),P(new Date(g,c,1))};return m(he,{className:G,children:[s?t(ye,{children:s}):null,m(V.Root,{open:E,onOpenChange:_,children:[m("div",{className:"relative",children:[m(V.Trigger,{disabled:M,className:b("inline-flex h-10 w-full cursor-pointer items-center gap-2 rounded-md border border-border bg-input px-3 text-left text-sm text-foreground outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","data-popup-open:bg-accent data-popup-open:text-accent-foreground","disabled:cursor-not-allowed disabled:opacity-50",l&&!M&&"pr-9"),children:[t(me,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),t("span",{className:b("flex-1 truncate tabular-nums",!l&&"text-muted-foreground"),children:H})]}),l&&!M?t("button",{type:"button","aria-label":h("clear"),onClick:n=>{n.stopPropagation(),A()},className:b("absolute top-1/2 right-2 inline-flex size-5 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none transition-colors","hover:bg-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"),children:t(pe,{size:12,"aria-hidden":!0})}):null]}),t(V.Portal,{children:t(V.Positioner,{sideOffset:6,align:"start",className:"z-40 outline-none",children:t(V.Popup,{className:b("min-w-(--anchor-width) overflow-hidden rounded-lg border border-border bg-card shadow-lg outline-none","transition-[opacity,transform] duration-fast ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0"),children:m("div",{className:"flex flex-col gap-4 p-4",children:[m("div",{className:"flex gap-6",children:[t(le,{viewMonth:d,start:l,end:y,minDay:i,maxDay:D,today:v,monthOptions:X,yearOptions:J,monthNameFormatter:a,onDayClick:j,onPrev:()=>P(C(d,-1)),onNext:()=>P(C(d,1)),nextClassName:"sm:hidden",onJumpTo:w,canPrev:$,showPrev:!0,showNext:!0,locale:S,parentOpen:E}),t("div",{className:"hidden border-l border-border sm:block"}),t("div",{className:"hidden sm:block",children:t(le,{viewMonth:C(d,1),start:l,end:y,minDay:i,maxDay:D,today:v,monthOptions:null,yearOptions:null,monthNameFormatter:a,onDayClick:j,onPrev:null,onNext:()=>P(C(d,1)),onJumpTo:null,canPrev:!1,showPrev:!1,showNext:!0,locale:S,parentOpen:E})})]}),m("div",{className:"flex items-center justify-between border-t border-border pt-3",children:[t(te,{type:"button",variant:"ghost",size:"sm",onClick:A,disabled:!l,children:h("clear")}),t(te,{type:"button",variant:"primary",size:"sm",onClick:()=>_(!1),disabled:!l||!q&&!y,children:h("done")})]})]})})})})]}),t("input",{type:"hidden",name:e,value:l?I(l):""}),t("input",{type:"hidden",name:r,value:y?I(y):""}),u?t(ve,{children:u}):null,t(De,{})]})}function le({viewMonth:e,start:r,end:s,minDay:u,maxDay:p,today:x,monthOptions:z,yearOptions:L,monthNameFormatter:B,onDayClick:q,onPrev:R,onNext:M,nextClassName:G,onJumpTo:h,canPrev:S,showPrev:v,showNext:i,locale:D,parentOpen:l}){const N=ee("DateRangePicker"),[y,O]=T(!1),[d,P]=T(!1),E=l&&y,_=l&&d,Y=f(()=>{const a=Ne(e),w=[];for(let n=0;n<a.length;n+=7){const o=a.slice(n,n+7),c=o[0];c&&w.push({key:I(c),days:o})}return w},[e]),H=Se(D),j=b("inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none transition-colors","hover:bg-accent hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted-foreground"),A=e.getMonth(),$=e.getFullYear(),J=f(()=>new Intl.DateTimeFormat(D,{month:"long",year:"numeric"}).format(e),[D,e]),X=h!==null&&z&&L;return m("div",{className:"flex w-full flex-col gap-2 sm:w-64",children:[m("div",{className:"flex items-center justify-between gap-2",children:[v&&R?t("button",{type:"button","aria-label":N("previousMonth"),disabled:!S,onClick:R,className:j,children:t(de,{size:14,"aria-hidden":!0})}):t("span",{className:"size-7"}),t("div",{className:"flex flex-1 items-center justify-center gap-1.5",children:X?m(ke,{children:[m(ne,{value:String(A),open:E,onOpenChange:O,onValueChange:a=>h(Number(a),$),children:[t(oe,{"aria-label":N("monthLabel"),className:"h-8 px-2 text-sm font-semibold",children:t(se,{children:a=>a!=null?B.format(new Date(2e3,Number(a),1)):null})}),t(re,{align:"start",children:z.map(a=>t(ae,{value:String(a),children:B.format(new Date(2e3,a,1))},a))})]}),m(ne,{value:String($),open:_,onOpenChange:P,onValueChange:a=>h(A,Number(a)),children:[t(oe,{"aria-label":N("yearLabel"),className:"h-8 px-2 text-sm font-semibold",children:t(se,{children:a=>String(a??"")})}),t(re,{align:"start",children:L.map(a=>t(ae,{value:String(a),children:a},a))})]})]}):t("span",{className:"text-sm font-semibold text-foreground capitalize",children:J})}),t("span",{className:"flex size-7 shrink-0 items-center justify-center",children:i&&M?t("button",{type:"button","aria-label":N("nextMonth"),onClick:M,className:b(j,G),children:t(fe,{size:14,"aria-hidden":!0})}):null})]}),m("table",{className:"w-full border-separate border-spacing-0 text-center",children:[t("thead",{children:t("tr",{children:H.map(({key:a,label:w})=>t("th",{scope:"col",className:"py-1.5 text-2xs font-medium tracking-wider text-muted-foreground uppercase",children:w},a))})}),t("tbody",{children:Y.map(({key:a,days:w})=>t("tr",{children:w.map(n=>{const o=n.getMonth()!==e.getMonth(),c=Z(n,u)||!!p&&xe(n,p),g=!o&&!!r&&K(n,r),k=!o&&!!s&&K(n,s),ue=!o&&K(n,x),Q=!o&&!!r&&!!s&&!g&&!k&&ie(n,r)&&Z(n,s),ce=g&&k?"":g&&!!s?"bg-[linear-gradient(to_right,transparent_50%,var(--accent)_50%)]":k?"bg-[linear-gradient(to_right,var(--accent)_50%,transparent_50%)]":Q?"bg-accent":"",ge=!c&&!o&&!g&&!k&&!Q;return t("td",{className:b("p-0",ce),children:t("button",{type:"button",tabIndex:c||o?-1:0,disabled:c||o,onClick:()=>q(n),"aria-pressed":g||k,"aria-label":n.toLocaleDateString(D,{dateStyle:"full"}),className:b("group relative flex h-9 w-full items-center justify-center text-sm outline-none",!c&&!o&&"cursor-pointer",o&&"pointer-events-none text-muted-foreground/30",!o&&!c&&"text-foreground",c&&"cursor-not-allowed text-muted-foreground/40 line-through","focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"),children:m("span",{className:b("relative flex size-9 items-center justify-center rounded-full tabular-nums transition-colors",(g||k)&&"bg-primary font-semibold text-primary-foreground",ge&&"group-hover:bg-accent"),children:[n.getDate(),ue&&!g&&!k?t("span",{"aria-hidden":!0,className:b("absolute bottom-1 left-1/2 size-1 -translate-x-1/2 rounded-full",Q?"bg-foreground":"bg-primary")}):null]})})},I(n))})},a))})]})]})}export{_e as DateRangePicker};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const Dialog: typeof DialogPrimitive.Root;
|
|
4
|
+
declare const DialogTrigger: DialogPrimitive.Trigger;
|
|
5
|
+
declare const DialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare function DialogBackdrop({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Backdrop>): React.JSX.Element;
|
|
8
|
+
declare function DialogPopup({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Popup>): React.JSX.Element;
|
|
9
|
+
declare function DialogViewport({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Viewport>): React.JSX.Element;
|
|
10
|
+
type DialogContentProps = React.ComponentProps<typeof DialogPrimitive.Popup> & {
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
declare function DialogContent({ className, children, closeLabel, ...props }: DialogContentProps): React.JSX.Element;
|
|
14
|
+
declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
15
|
+
declare function DialogBody({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
16
|
+
declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
17
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
|
|
18
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
|
|
19
|
+
export { Dialog, DialogBackdrop, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as t,jsxs as c}from"react/jsx-runtime";import{Dialog as i}from"@base-ui/react/dialog";import{IconX as f}from"@tabler/icons-react";import{cn as r}from"../../lib/cn.js";const g=i.Root,m=i.Trigger,a=i.Portal,u=i.Close;function n({className:e,...o}){return t(i.Backdrop,{className:r("fixed inset-0 z-30 bg-black/60 transition-opacity duration-base","data-closed:opacity-0 data-starting-style:opacity-0 data-ending-style:opacity-0",e),...o})}function l({className:e,...o}){return t(i.Popup,{className:r("relative flex max-h-[calc(100dvh-2rem)] w-full max-w-lg flex-col overflow-hidden","rounded-lg border border-border bg-card shadow-lg outline-none","transition-[opacity,transform] duration-base ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0",e),...o})}function s({className:e,...o}){return t(i.Viewport,{className:r("fixed inset-0 z-40 overflow-y-auto",e),...o})}function D({className:e,children:o,closeLabel:p="Close",...d}){return c(a,{children:[t(n,{}),t(s,{children:t("div",{className:"flex min-h-full items-center justify-center p-4",children:c(l,{className:e,...d,children:[t("div",{className:"flex min-h-0 flex-1 flex-col",children:o}),t(i.Close,{"aria-label":p,className:r("absolute top-4 right-4 inline-flex size-8 cursor-pointer items-center justify-center rounded-md border border-transparent text-muted-foreground outline-none","transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card"),children:t(f,{size:16,"aria-hidden":!0})})]})})})]})}function v({className:e,...o}){return t("div",{className:r("flex shrink-0 flex-col gap-1 border-b border-border px-6 py-4",e),...o})}function b({className:e,...o}){return t("div",{className:r("min-h-0 flex-1 overflow-y-auto overscroll-contain px-6 py-4",e),...o})}function y({className:e,...o}){return t("div",{className:r("flex shrink-0 flex-col-reverse gap-2 border-t border-border px-6 py-4 sm:flex-row sm:justify-end",e),...o})}function x({className:e,...o}){return t(i.Title,{className:r("text-base font-semibold text-foreground",e),...o})}function P({className:e,...o}){return t(i.Description,{className:r("text-sm text-muted-foreground",e),...o})}export{g as Dialog,n as DialogBackdrop,b as DialogBody,u as DialogClose,D as DialogContent,P as DialogDescription,y as DialogFooter,v as DialogHeader,l as DialogPopup,a as DialogPortal,x as DialogTitle,m as DialogTrigger,s as DialogViewport};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const Drawer: typeof DrawerPrimitive.Root;
|
|
4
|
+
declare const DrawerTrigger: DrawerPrimitive.Trigger;
|
|
5
|
+
declare const DrawerPortal: DrawerPrimitive.Portal;
|
|
6
|
+
declare const DrawerViewport: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").DrawerViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const DrawerClose: DrawerPrimitive.Close;
|
|
8
|
+
declare function DrawerBackdrop({ className, style, ...props }: React.ComponentProps<typeof DrawerPrimitive.Backdrop>): React.JSX.Element;
|
|
9
|
+
declare const contentSides: {
|
|
10
|
+
readonly left: "inset-y-0 left-0 h-full data-starting-style:-translate-x-full data-ending-style:-translate-x-full";
|
|
11
|
+
readonly right: "inset-y-0 right-0 h-full data-starting-style:translate-x-full data-ending-style:translate-x-full";
|
|
12
|
+
readonly top: "inset-x-0 top-0 w-full data-starting-style:-translate-y-full data-ending-style:-translate-y-full";
|
|
13
|
+
readonly bottom: "inset-x-0 bottom-0 w-full data-starting-style:translate-y-full data-ending-style:translate-y-full";
|
|
14
|
+
};
|
|
15
|
+
type DrawerSide = keyof typeof contentSides;
|
|
16
|
+
declare function DrawerContent({ className, side, style, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Popup> & {
|
|
17
|
+
side?: DrawerSide;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): React.JSX.Element;
|
|
20
|
+
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): React.JSX.Element;
|
|
21
|
+
declare function DrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
22
|
+
declare function DrawerBody({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
23
|
+
declare function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
24
|
+
export { Drawer, DrawerBackdrop, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPortal, DrawerTitle, DrawerTrigger, DrawerViewport, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{Drawer as r}from"@base-ui/react/drawer";import{cn as a}from"../../lib/cn.js";const l=r.Root,p=r.Trigger,c=r.Portal,d=r.Viewport,f=r.Close;function u({className:t,style:e,...n}){return o(r.Backdrop,{className:a("fixed inset-0 z-30 bg-black/60 transition-opacity duration-slow","data-starting-style:opacity-0 data-ending-style:opacity-0","data-swiping:transition-none",t),style:{opacity:"calc(1 - var(--drawer-swipe-progress, 0))",...e},...n})}const w={left:"inset-y-0 left-0 h-full data-starting-style:-translate-x-full data-ending-style:-translate-x-full",right:"inset-y-0 right-0 h-full data-starting-style:translate-x-full data-ending-style:translate-x-full",top:"inset-x-0 top-0 w-full data-starting-style:-translate-y-full data-ending-style:-translate-y-full",bottom:"inset-x-0 bottom-0 w-full data-starting-style:translate-y-full data-ending-style:translate-y-full"};function y({className:t,side:e="right",style:n,children:i,...s}){return o(r.Popup,{className:a("fixed z-40 flex flex-col bg-card shadow-lg outline-none","translate-x-(--drawer-swipe-movement-x,0px) translate-y-(--drawer-swipe-movement-y,0px) transition-[translate] duration-slow ease-out","data-swiping:transition-none",w[e],t),style:n,...s,children:i})}function m({className:t,...e}){return o(r.Title,{className:a("text-lg font-semibold text-foreground",t),...e})}function g({className:t,...e}){return o(r.Description,{className:a("text-sm text-muted-foreground",t),...e})}function x({className:t,...e}){return o("div",{className:a("flex shrink-0 flex-col gap-1 border-b border-border px-6 py-4",t),...e})}function D({className:t,...e}){return o("div",{className:a("relative flex-1 overflow-y-auto px-6 py-4",t),...e})}function v({className:t,...e}){return o("div",{className:a("flex shrink-0 flex-col-reverse gap-2 border-t border-border px-6 py-4 sm:flex-row sm:justify-end",t),...e})}export{l as Drawer,u as DrawerBackdrop,D as DrawerBody,f as DrawerClose,y as DrawerContent,g as DrawerDescription,v as DrawerFooter,x as DrawerHeader,c as DrawerPortal,m as DrawerTitle,p as DrawerTrigger,d as DrawerViewport};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const DropdownMenu: <Payload>(props: MenuPrimitive.Root.Props<Payload>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const DropdownMenuTrigger: MenuPrimitive.Trigger;
|
|
5
|
+
declare const DropdownMenuPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare function DropdownMenuPositioner({ className, sideOffset, align, ...props }: React.ComponentProps<typeof MenuPrimitive.Positioner>): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuPopup({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Popup>): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuContent({ className, children, sideOffset, align, ...props }: React.ComponentProps<typeof MenuPrimitive.Popup> & {
|
|
9
|
+
sideOffset?: number;
|
|
10
|
+
align?: "start" | "center" | "end";
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function DropdownMenuItem({ className, variant, ...props }: React.ComponentProps<typeof MenuPrimitive.Item> & {
|
|
13
|
+
variant?: "default" | "destructive";
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>): React.JSX.Element;
|
|
16
|
+
declare function DropdownMenuLabel({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.GroupLabel>): React.JSX.Element;
|
|
17
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuSeparator, DropdownMenuTrigger, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import{Menu as o}from"@base-ui/react/menu";import{cn as i}from"../../lib/cn.js";const c=o.Root,m=o.Trigger,p=o.Portal;function d({className:e,sideOffset:t=4,align:r="end",...a}){return n(o.Positioner,{className:i("z-40 outline-none",e),sideOffset:t,align:r,...a})}function s({className:e,...t}){return n(o.Popup,{className:i("min-w-40 origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none","transition-[opacity,transform] duration-fast ease-out","data-starting-style:scale-95 data-starting-style:opacity-0","data-ending-style:scale-95 data-ending-style:opacity-0",e),...t})}function l({className:e,children:t,sideOffset:r,align:a,...u}){return n(p,{children:n(d,{sideOffset:r,align:a,children:n(s,{className:e,...u,children:t})})})}function f({className:e,variant:t="default",...r}){return n(o.Item,{className:i("relative flex h-7 w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 text-sm outline-none transition-colors","text-foreground/80","data-highlighted:bg-accent data-highlighted:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",t==="destructive"&&"text-destructive data-highlighted:bg-destructive/10 data-highlighted:text-destructive",e),...r})}function g({className:e,...t}){return n(o.Separator,{className:i("-mx-1 my-1 h-px bg-border",e),...t})}function P({className:e,...t}){return n(o.GroupLabel,{className:i("px-2 py-1.5 text-xs font-medium text-muted-foreground",e),...t})}export{c as DropdownMenu,l as DropdownMenuContent,f as DropdownMenuItem,P as DropdownMenuLabel,s as DropdownMenuPopup,p as DropdownMenuPortal,d as DropdownMenuPositioner,g as DropdownMenuSeparator,m as DropdownMenuTrigger};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Field as FieldPrimitive } from "@base-ui/react/field";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export declare function Field({ className, ...props }: React.ComponentProps<typeof FieldPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
export declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof FieldPrimitive.Label>): React.JSX.Element;
|
|
5
|
+
export declare function FieldItem({ className, ...props }: React.ComponentProps<typeof FieldPrimitive.Item>): React.JSX.Element;
|
|
6
|
+
export declare function FieldDescription({ className, ...props }: React.ComponentProps<typeof FieldPrimitive.Description>): React.JSX.Element;
|
|
7
|
+
export declare function FieldError({ className, ...props }: React.ComponentProps<typeof FieldPrimitive.Error>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Field as o}from"@base-ui/react/field";import{cn as i}from"../../lib/cn.js";function p({className:e,...t}){return r(o.Root,{className:i("flex flex-col gap-1.5",e),...t})}function l({className:e,...t}){return r(o.Label,{className:i("text-sm font-medium text-foreground",e),...t})}function s({className:e,...t}){return r(o.Item,{className:e,...t})}function a({className:e,...t}){return r(o.Description,{className:i("text-xs text-muted-foreground",e),...t})}function c({className:e,...t}){return r(o.Error,{className:i("text-sm text-destructive",e),...t})}export{p as Field,a as FieldDescription,c as FieldError,s as FieldItem,l as FieldLabel};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Fieldset as FieldsetPrimitive } from "@base-ui/react/fieldset";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export declare function Fieldset({ className, ...props }: React.ComponentProps<typeof FieldsetPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
export declare function FieldsetLegend({ className, ...props }: React.ComponentProps<typeof FieldsetPrimitive.Legend>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Fieldset as o}from"@base-ui/react/fieldset";import{cn as i}from"../../lib/cn.js";function s({className:e,...t}){return r(o.Root,{className:i("flex flex-col gap-2",e),...t})}function p({className:e,...t}){return r(o.Legend,{className:i("text-sm font-medium text-foreground",e),...t})}export{s as Fieldset,p as FieldsetLegend};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare function FormField({ name, label, description, className, children, nativeLabel, }: {
|
|
3
|
+
name: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
nativeLabel?: boolean;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function FormFieldset({ name, legend, description, className, fieldsetClassName, children, }: {
|
|
11
|
+
name: string;
|
|
12
|
+
legend: ReactNode;
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
fieldsetClassName?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Field as o,FieldDescription as s,FieldError as c,FieldLabel as m}from"./field.js";import{Fieldset as F,FieldsetLegend as N}from"./fieldset.js";import{cn as p}from"../../lib/cn.js";function u({name:d,label:l,description:r,className:i,children:a,nativeLabel:t=!0}){return n(o,{name:d,className:i,children:[t?e(m,{children:l}):e(m,{nativeLabel:!1,render:e("span",{}),children:l}),a,r?e(s,{children:r}):null,e(c,{})]})}function L({name:d,legend:l,description:r,className:i,fieldsetClassName:a,children:t}){return n(o,{name:d,className:i,children:[n(F,{className:p("rounded-md border border-border bg-card p-3",a),children:[e(N,{className:"px-1",children:l}),r?e(s,{children:r}):null,t]}),e(c,{})]})}export{u as FormField,L as FormFieldset};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{Form as r}from"@base-ui/react/form";function m(o){return t(r,{...o})}export{m as Form};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{cn as r}from"../../lib/cn.js";function d({icon:e,className:t}){return i("div",{"aria-hidden":!0,className:r("flex size-9 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",t),children:e})}export{d as IconTile};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,jsxs as a}from"react/jsx-runtime";function o({visual:s,primary:n,secondary:e}){return a("div",{className:"flex items-center gap-3",children:[s,a("div",{className:"flex min-w-0 flex-col",children:[t("span",{className:"truncate text-sm font-medium text-foreground",children:n}),e&&t("span",{className:"truncate text-xs text-muted-foreground",children:e})]})]})}export{o as Identity};
|