@agent-native/dispatch 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -0
- package/dist/actions/approve-dispatch-change.d.ts +3 -0
- package/dist/actions/approve-dispatch-change.d.ts.map +1 -0
- package/dist/actions/approve-dispatch-change.js +11 -0
- package/dist/actions/approve-dispatch-change.js.map +1 -0
- package/dist/actions/approve-vault-request.d.ts +3 -0
- package/dist/actions/approve-vault-request.d.ts.map +1 -0
- package/dist/actions/approve-vault-request.js +16 -0
- package/dist/actions/approve-vault-request.js.map +1 -0
- package/dist/actions/create-link-token.d.ts +3 -0
- package/dist/actions/create-link-token.d.ts.map +1 -0
- package/dist/actions/create-link-token.js +11 -0
- package/dist/actions/create-link-token.js.map +1 -0
- package/dist/actions/create-vault-grant.d.ts +3 -0
- package/dist/actions/create-vault-grant.d.ts.map +1 -0
- package/dist/actions/create-vault-grant.js +14 -0
- package/dist/actions/create-vault-grant.js.map +1 -0
- package/dist/actions/create-vault-secret.d.ts +3 -0
- package/dist/actions/create-vault-secret.d.ts.map +1 -0
- package/dist/actions/create-vault-secret.js +20 -0
- package/dist/actions/create-vault-secret.js.map +1 -0
- package/dist/actions/create-workspace-resource-grant.d.ts +3 -0
- package/dist/actions/create-workspace-resource-grant.d.ts.map +1 -0
- package/dist/actions/create-workspace-resource-grant.js +14 -0
- package/dist/actions/create-workspace-resource-grant.js.map +1 -0
- package/dist/actions/create-workspace-resource.d.ts +3 -0
- package/dist/actions/create-workspace-resource.d.ts.map +1 -0
- package/dist/actions/create-workspace-resource.js +24 -0
- package/dist/actions/create-workspace-resource.js.map +1 -0
- package/dist/actions/delete-destination.d.ts +3 -0
- package/dist/actions/delete-destination.d.ts.map +1 -0
- package/dist/actions/delete-destination.js +11 -0
- package/dist/actions/delete-destination.js.map +1 -0
- package/dist/actions/delete-vault-secret.d.ts +3 -0
- package/dist/actions/delete-vault-secret.d.ts.map +1 -0
- package/dist/actions/delete-vault-secret.js +11 -0
- package/dist/actions/delete-vault-secret.js.map +1 -0
- package/dist/actions/delete-workspace-resource.d.ts +3 -0
- package/dist/actions/delete-workspace-resource.d.ts.map +1 -0
- package/dist/actions/delete-workspace-resource.js +11 -0
- package/dist/actions/delete-workspace-resource.js.map +1 -0
- package/dist/actions/deny-vault-request.d.ts +3 -0
- package/dist/actions/deny-vault-request.d.ts.map +1 -0
- package/dist/actions/deny-vault-request.js +12 -0
- package/dist/actions/deny-vault-request.js.map +1 -0
- package/dist/actions/get-app-creation-settings.d.ts +3 -0
- package/dist/actions/get-app-creation-settings.d.ts.map +1 -0
- package/dist/actions/get-app-creation-settings.js +10 -0
- package/dist/actions/get-app-creation-settings.js.map +1 -0
- package/dist/actions/get-dispatch-settings.d.ts +3 -0
- package/dist/actions/get-dispatch-settings.d.ts.map +1 -0
- package/dist/actions/get-dispatch-settings.js +10 -0
- package/dist/actions/get-dispatch-settings.js.map +1 -0
- package/dist/actions/get-workspace-info.d.ts +3 -0
- package/dist/actions/get-workspace-info.d.ts.map +1 -0
- package/dist/actions/get-workspace-info.js +10 -0
- package/dist/actions/get-workspace-info.js.map +1 -0
- package/dist/actions/grant-vault-secrets-to-app.d.ts +3 -0
- package/dist/actions/grant-vault-secrets-to-app.d.ts.map +1 -0
- package/dist/actions/grant-vault-secrets-to-app.js +19 -0
- package/dist/actions/grant-vault-secrets-to-app.js.map +1 -0
- package/dist/actions/index.d.ts +9 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +101 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/list-connected-agents.d.ts +3 -0
- package/dist/actions/list-connected-agents.d.ts.map +1 -0
- package/dist/actions/list-connected-agents.js +79 -0
- package/dist/actions/list-connected-agents.js.map +1 -0
- package/dist/actions/list-destinations.d.ts +3 -0
- package/dist/actions/list-destinations.d.ts.map +1 -0
- package/dist/actions/list-destinations.js +10 -0
- package/dist/actions/list-destinations.js.map +1 -0
- package/dist/actions/list-dispatch-approvals.d.ts +3 -0
- package/dist/actions/list-dispatch-approvals.d.ts.map +1 -0
- package/dist/actions/list-dispatch-approvals.js +10 -0
- package/dist/actions/list-dispatch-approvals.js.map +1 -0
- package/dist/actions/list-dispatch-audit.d.ts +3 -0
- package/dist/actions/list-dispatch-audit.d.ts.map +1 -0
- package/dist/actions/list-dispatch-audit.js +12 -0
- package/dist/actions/list-dispatch-audit.js.map +1 -0
- package/dist/actions/list-dispatch-overview.d.ts +3 -0
- package/dist/actions/list-dispatch-overview.d.ts.map +1 -0
- package/dist/actions/list-dispatch-overview.js +17 -0
- package/dist/actions/list-dispatch-overview.js.map +1 -0
- package/dist/actions/list-integrations-catalog.d.ts +3 -0
- package/dist/actions/list-integrations-catalog.d.ts.map +1 -0
- package/dist/actions/list-integrations-catalog.js +10 -0
- package/dist/actions/list-integrations-catalog.js.map +1 -0
- package/dist/actions/list-linked-identities.d.ts +3 -0
- package/dist/actions/list-linked-identities.d.ts.map +1 -0
- package/dist/actions/list-linked-identities.js +10 -0
- package/dist/actions/list-linked-identities.js.map +1 -0
- package/dist/actions/list-vault-audit.d.ts +3 -0
- package/dist/actions/list-vault-audit.d.ts.map +1 -0
- package/dist/actions/list-vault-audit.js +15 -0
- package/dist/actions/list-vault-audit.js.map +1 -0
- package/dist/actions/list-vault-grants.d.ts +3 -0
- package/dist/actions/list-vault-grants.d.ts.map +1 -0
- package/dist/actions/list-vault-grants.js +13 -0
- package/dist/actions/list-vault-grants.js.map +1 -0
- package/dist/actions/list-vault-requests.d.ts +3 -0
- package/dist/actions/list-vault-requests.d.ts.map +1 -0
- package/dist/actions/list-vault-requests.js +15 -0
- package/dist/actions/list-vault-requests.js.map +1 -0
- package/dist/actions/list-vault-secret-options.d.ts +3 -0
- package/dist/actions/list-vault-secret-options.d.ts.map +1 -0
- package/dist/actions/list-vault-secret-options.js +19 -0
- package/dist/actions/list-vault-secret-options.js.map +1 -0
- package/dist/actions/list-vault-secrets.d.ts +3 -0
- package/dist/actions/list-vault-secrets.d.ts.map +1 -0
- package/dist/actions/list-vault-secrets.js +25 -0
- package/dist/actions/list-vault-secrets.js.map +1 -0
- package/dist/actions/list-workspace-apps.d.ts +3 -0
- package/dist/actions/list-workspace-apps.d.ts.map +1 -0
- package/dist/actions/list-workspace-apps.js +24 -0
- package/dist/actions/list-workspace-apps.js.map +1 -0
- package/dist/actions/list-workspace-resource-grants.d.ts +3 -0
- package/dist/actions/list-workspace-resource-grants.d.ts.map +1 -0
- package/dist/actions/list-workspace-resource-grants.js +13 -0
- package/dist/actions/list-workspace-resource-grants.js.map +1 -0
- package/dist/actions/list-workspace-resources.d.ts +3 -0
- package/dist/actions/list-workspace-resources.d.ts.map +1 -0
- package/dist/actions/list-workspace-resources.js +15 -0
- package/dist/actions/list-workspace-resources.js.map +1 -0
- package/dist/actions/navigate.d.ts +16 -0
- package/dist/actions/navigate.d.ts.map +1 -0
- package/dist/actions/navigate.js +55 -0
- package/dist/actions/navigate.js.map +1 -0
- package/dist/actions/reject-dispatch-change.d.ts +3 -0
- package/dist/actions/reject-dispatch-change.d.ts.map +1 -0
- package/dist/actions/reject-dispatch-change.js +12 -0
- package/dist/actions/reject-dispatch-change.js.map +1 -0
- package/dist/actions/request-vault-secret.d.ts +3 -0
- package/dist/actions/request-vault-secret.d.ts.map +1 -0
- package/dist/actions/request-vault-secret.js +15 -0
- package/dist/actions/request-vault-secret.js.map +1 -0
- package/dist/actions/revoke-vault-grant.d.ts +3 -0
- package/dist/actions/revoke-vault-grant.d.ts.map +1 -0
- package/dist/actions/revoke-vault-grant.js +11 -0
- package/dist/actions/revoke-vault-grant.js.map +1 -0
- package/dist/actions/revoke-workspace-resource-grant.d.ts +3 -0
- package/dist/actions/revoke-workspace-resource-grant.d.ts.map +1 -0
- package/dist/actions/revoke-workspace-resource-grant.js +11 -0
- package/dist/actions/revoke-workspace-resource-grant.js.map +1 -0
- package/dist/actions/send-platform-message.d.ts +3 -0
- package/dist/actions/send-platform-message.d.ts.map +1 -0
- package/dist/actions/send-platform-message.js +73 -0
- package/dist/actions/send-platform-message.js.map +1 -0
- package/dist/actions/set-app-creation-settings.d.ts +3 -0
- package/dist/actions/set-app-creation-settings.d.ts.map +1 -0
- package/dist/actions/set-app-creation-settings.js +18 -0
- package/dist/actions/set-app-creation-settings.js.map +1 -0
- package/dist/actions/set-dispatch-approval-policy.d.ts +3 -0
- package/dist/actions/set-dispatch-approval-policy.d.ts.map +1 -0
- package/dist/actions/set-dispatch-approval-policy.js +19 -0
- package/dist/actions/set-dispatch-approval-policy.js.map +1 -0
- package/dist/actions/start-workspace-app-creation.d.ts +3 -0
- package/dist/actions/start-workspace-app-creation.d.ts.map +1 -0
- package/dist/actions/start-workspace-app-creation.js +31 -0
- package/dist/actions/start-workspace-app-creation.js.map +1 -0
- package/dist/actions/sync-vault-to-app.d.ts +3 -0
- package/dist/actions/sync-vault-to-app.d.ts.map +1 -0
- package/dist/actions/sync-vault-to-app.js +13 -0
- package/dist/actions/sync-vault-to-app.js.map +1 -0
- package/dist/actions/sync-workspace-resources-to-all.d.ts +3 -0
- package/dist/actions/sync-workspace-resources-to-all.d.ts.map +1 -0
- package/dist/actions/sync-workspace-resources-to-all.js +9 -0
- package/dist/actions/sync-workspace-resources-to-all.js.map +1 -0
- package/dist/actions/sync-workspace-resources-to-app.d.ts +3 -0
- package/dist/actions/sync-workspace-resources-to-app.d.ts.map +1 -0
- package/dist/actions/sync-workspace-resources-to-app.js +11 -0
- package/dist/actions/sync-workspace-resources-to-app.js.map +1 -0
- package/dist/actions/update-vault-secret.d.ts +3 -0
- package/dist/actions/update-vault-secret.d.ts.map +1 -0
- package/dist/actions/update-vault-secret.js +12 -0
- package/dist/actions/update-vault-secret.js.map +1 -0
- package/dist/actions/update-workspace-resource.d.ts +3 -0
- package/dist/actions/update-workspace-resource.d.ts.map +1 -0
- package/dist/actions/update-workspace-resource.js +18 -0
- package/dist/actions/update-workspace-resource.js.map +1 -0
- package/dist/actions/upsert-destination.d.ts +3 -0
- package/dist/actions/upsert-destination.d.ts.map +1 -0
- package/dist/actions/upsert-destination.js +26 -0
- package/dist/actions/upsert-destination.js.map +1 -0
- package/dist/actions/view-screen.d.ts +11 -0
- package/dist/actions/view-screen.d.ts.map +1 -0
- package/dist/actions/view-screen.js +68 -0
- package/dist/actions/view-screen.js.map +1 -0
- package/dist/components/agents-panel.d.ts +16 -0
- package/dist/components/agents-panel.d.ts.map +1 -0
- package/dist/components/agents-panel.js +64 -0
- package/dist/components/agents-panel.js.map +1 -0
- package/dist/components/app-keys-popover.d.ts +11 -0
- package/dist/components/app-keys-popover.d.ts.map +1 -0
- package/dist/components/app-keys-popover.js +84 -0
- package/dist/components/app-keys-popover.js.map +1 -0
- package/dist/components/create-app-popover.d.ts +24 -0
- package/dist/components/create-app-popover.d.ts.map +1 -0
- package/dist/components/create-app-popover.js +188 -0
- package/dist/components/create-app-popover.js.map +1 -0
- package/dist/components/dispatch-shell.d.ts +13 -0
- package/dist/components/dispatch-shell.d.ts.map +1 -0
- package/dist/components/dispatch-shell.js +15 -0
- package/dist/components/dispatch-shell.js.map +1 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +12 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/layout/Header.d.ts +5 -0
- package/dist/components/layout/Header.d.ts.map +1 -0
- package/dist/components/layout/Header.js +34 -0
- package/dist/components/layout/Header.js.map +1 -0
- package/dist/components/layout/HeaderActions.d.ts +18 -0
- package/dist/components/layout/HeaderActions.d.ts.map +1 -0
- package/dist/components/layout/HeaderActions.js +52 -0
- package/dist/components/layout/HeaderActions.js.map +1 -0
- package/dist/components/layout/Layout.d.ts +8 -0
- package/dist/components/layout/Layout.d.ts.map +1 -0
- package/dist/components/layout/Layout.js +70 -0
- package/dist/components/layout/Layout.js.map +1 -0
- package/dist/components/messaging-setup-panel.d.ts +2 -0
- package/dist/components/messaging-setup-panel.d.ts.map +1 -0
- package/dist/components/messaging-setup-panel.js +300 -0
- package/dist/components/messaging-setup-panel.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +14 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +27 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +23 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +4 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +12 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +21 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +24 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +34 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +41 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +99 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +80 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +131 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +9 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +6 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +83 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +29 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +34 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +23 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +23 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +36 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +63 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +10 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +35 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +19 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +10 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +41 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +25 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +29 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +24 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +10 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +8 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +15 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +9 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +12 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +27 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +26 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +37 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +67 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +233 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +7 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +8 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +25 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +7 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +8 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +21 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +13 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +9 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +34 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +10 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +21 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +13 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +26 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +11 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/use-toast.d.ts +3 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +3 -0
- package/dist/components/ui/use-toast.js.map +1 -0
- package/dist/config.d.ts +33 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +7 -0
- package/dist/config.js.map +1 -0
- package/dist/db/index.d.ts +7 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +10 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +5 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +166 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/schema.d.ts +2344 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +148 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-navigation-state.d.ts +6 -0
- package/dist/hooks/use-navigation-state.d.ts.map +1 -0
- package/dist/hooks/use-navigation-state.js +129 -0
- package/dist/hooks/use-navigation-state.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +2 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/routes/index.d.ts +32 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +51 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/pages/_index.d.ts +15 -0
- package/dist/routes/pages/_index.d.ts.map +1 -0
- package/dist/routes/pages/_index.js +42 -0
- package/dist/routes/pages/_index.js.map +1 -0
- package/dist/routes/pages/agents.d.ts +5 -0
- package/dist/routes/pages/agents.d.ts.map +1 -0
- package/dist/routes/pages/agents.js +12 -0
- package/dist/routes/pages/agents.js.map +1 -0
- package/dist/routes/pages/approval.d.ts +5 -0
- package/dist/routes/pages/approval.d.ts.map +1 -0
- package/dist/routes/pages/approval.js +47 -0
- package/dist/routes/pages/approval.js.map +1 -0
- package/dist/routes/pages/approvals.d.ts +5 -0
- package/dist/routes/pages/approvals.d.ts.map +1 -0
- package/dist/routes/pages/approvals.js +48 -0
- package/dist/routes/pages/approvals.js.map +1 -0
- package/dist/routes/pages/apps.$appId.d.ts +5 -0
- package/dist/routes/pages/apps.$appId.d.ts.map +1 -0
- package/dist/routes/pages/apps.$appId.js +31 -0
- package/dist/routes/pages/apps.$appId.js.map +1 -0
- package/dist/routes/pages/apps.d.ts +5 -0
- package/dist/routes/pages/apps.d.ts.map +1 -0
- package/dist/routes/pages/apps.js +42 -0
- package/dist/routes/pages/apps.js.map +1 -0
- package/dist/routes/pages/audit.d.ts +5 -0
- package/dist/routes/pages/audit.d.ts.map +1 -0
- package/dist/routes/pages/audit.js +11 -0
- package/dist/routes/pages/audit.js.map +1 -0
- package/dist/routes/pages/destinations.d.ts +5 -0
- package/dist/routes/pages/destinations.d.ts.map +1 -0
- package/dist/routes/pages/destinations.js +80 -0
- package/dist/routes/pages/destinations.js.map +1 -0
- package/dist/routes/pages/identities.d.ts +5 -0
- package/dist/routes/pages/identities.d.ts.map +1 -0
- package/dist/routes/pages/identities.js +18 -0
- package/dist/routes/pages/identities.js.map +1 -0
- package/dist/routes/pages/integrations.d.ts +5 -0
- package/dist/routes/pages/integrations.d.ts.map +1 -0
- package/dist/routes/pages/integrations.js +46 -0
- package/dist/routes/pages/integrations.js.map +1 -0
- package/dist/routes/pages/messaging.d.ts +5 -0
- package/dist/routes/pages/messaging.d.ts.map +1 -0
- package/dist/routes/pages/messaging.js +10 -0
- package/dist/routes/pages/messaging.js.map +1 -0
- package/dist/routes/pages/new-app.d.ts +5 -0
- package/dist/routes/pages/new-app.d.ts.map +1 -0
- package/dist/routes/pages/new-app.js +10 -0
- package/dist/routes/pages/new-app.js.map +1 -0
- package/dist/routes/pages/overview.d.ts +5 -0
- package/dist/routes/pages/overview.d.ts.map +1 -0
- package/dist/routes/pages/overview.js +225 -0
- package/dist/routes/pages/overview.js.map +1 -0
- package/dist/routes/pages/team.d.ts +5 -0
- package/dist/routes/pages/team.d.ts.map +1 -0
- package/dist/routes/pages/team.js +10 -0
- package/dist/routes/pages/team.js.map +1 -0
- package/dist/routes/pages/tools.$id.d.ts +2 -0
- package/dist/routes/pages/tools.$id.d.ts.map +1 -0
- package/dist/routes/pages/tools.$id.js +6 -0
- package/dist/routes/pages/tools.$id.js.map +1 -0
- package/dist/routes/pages/tools._index.d.ts +2 -0
- package/dist/routes/pages/tools._index.d.ts.map +1 -0
- package/dist/routes/pages/tools._index.js +6 -0
- package/dist/routes/pages/tools._index.js.map +1 -0
- package/dist/routes/pages/vault.d.ts +5 -0
- package/dist/routes/pages/vault.d.ts.map +1 -0
- package/dist/routes/pages/vault.js +131 -0
- package/dist/routes/pages/vault.js.map +1 -0
- package/dist/routes/pages/workspace.d.ts +5 -0
- package/dist/routes/pages/workspace.d.ts.map +1 -0
- package/dist/routes/pages/workspace.js +149 -0
- package/dist/routes/pages/workspace.js.map +1 -0
- package/dist/server/index.d.ts +44 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +68 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/lib/app-creation-store.d.ts +102 -0
- package/dist/server/lib/app-creation-store.d.ts.map +1 -0
- package/dist/server/lib/app-creation-store.js +780 -0
- package/dist/server/lib/app-creation-store.js.map +1 -0
- package/dist/server/lib/dispatch-integrations.d.ts +10 -0
- package/dist/server/lib/dispatch-integrations.d.ts.map +1 -0
- package/dist/server/lib/dispatch-integrations.js +105 -0
- package/dist/server/lib/dispatch-integrations.js.map +1 -0
- package/dist/server/lib/dispatch-store.d.ts +313 -0
- package/dist/server/lib/dispatch-store.d.ts.map +1 -0
- package/dist/server/lib/dispatch-store.js +669 -0
- package/dist/server/lib/dispatch-store.js.map +1 -0
- package/dist/server/lib/env-config.d.ts +3 -0
- package/dist/server/lib/env-config.d.ts.map +1 -0
- package/dist/server/lib/env-config.js +43 -0
- package/dist/server/lib/env-config.js.map +1 -0
- package/dist/server/lib/pre-auth-routing.d.ts +2 -0
- package/dist/server/lib/pre-auth-routing.d.ts.map +1 -0
- package/dist/server/lib/pre-auth-routing.js +128 -0
- package/dist/server/lib/pre-auth-routing.js.map +1 -0
- package/dist/server/lib/vault-store.d.ts +270 -0
- package/dist/server/lib/vault-store.d.ts.map +1 -0
- package/dist/server/lib/vault-store.js +554 -0
- package/dist/server/lib/vault-store.js.map +1 -0
- package/dist/server/lib/workspace-resources-store.d.ts +165 -0
- package/dist/server/lib/workspace-resources-store.d.ts.map +1 -0
- package/dist/server/lib/workspace-resources-store.js +310 -0
- package/dist/server/lib/workspace-resources-store.js.map +1 -0
- package/dist/server/plugins/agent-chat.d.ts +3 -0
- package/dist/server/plugins/agent-chat.d.ts.map +1 -0
- package/dist/server/plugins/agent-chat.js +36 -0
- package/dist/server/plugins/agent-chat.js.map +1 -0
- package/dist/server/plugins/auth.d.ts +9 -0
- package/dist/server/plugins/auth.d.ts.map +1 -0
- package/dist/server/plugins/auth.js +30 -0
- package/dist/server/plugins/auth.js.map +1 -0
- package/dist/server/plugins/core-routes.d.ts +3 -0
- package/dist/server/plugins/core-routes.d.ts.map +1 -0
- package/dist/server/plugins/core-routes.js +6 -0
- package/dist/server/plugins/core-routes.js.map +1 -0
- package/dist/server/plugins/db.d.ts +3 -0
- package/dist/server/plugins/db.d.ts.map +1 -0
- package/dist/server/plugins/db.js +6 -0
- package/dist/server/plugins/db.js.map +1 -0
- package/dist/server/plugins/integrations.d.ts +8 -0
- package/dist/server/plugins/integrations.d.ts.map +1 -0
- package/dist/server/plugins/integrations.js +51 -0
- package/dist/server/plugins/integrations.js.map +1 -0
- package/package.json +103 -0
- package/src/actions/approve-dispatch-change.ts +11 -0
- package/src/actions/approve-vault-request.ts +23 -0
- package/src/actions/create-link-token.ts +12 -0
- package/src/actions/create-vault-grant.ts +15 -0
- package/src/actions/create-vault-secret.ts +21 -0
- package/src/actions/create-workspace-resource-grant.ts +15 -0
- package/src/actions/create-workspace-resource.ts +29 -0
- package/src/actions/delete-destination.ts +11 -0
- package/src/actions/delete-vault-secret.ts +12 -0
- package/src/actions/delete-workspace-resource.ts +12 -0
- package/src/actions/deny-vault-request.ts +12 -0
- package/src/actions/get-app-creation-settings.ts +11 -0
- package/src/actions/get-dispatch-settings.ts +10 -0
- package/src/actions/get-workspace-info.ts +11 -0
- package/src/actions/grant-vault-secrets-to-app.ts +20 -0
- package/src/actions/index.ts +102 -0
- package/src/actions/list-connected-agents.ts +103 -0
- package/src/actions/list-destinations.ts +10 -0
- package/src/actions/list-dispatch-approvals.ts +10 -0
- package/src/actions/list-dispatch-audit.ts +12 -0
- package/src/actions/list-dispatch-overview.ts +18 -0
- package/src/actions/list-integrations-catalog.ts +11 -0
- package/src/actions/list-linked-identities.ts +10 -0
- package/src/actions/list-vault-audit.ts +16 -0
- package/src/actions/list-vault-grants.ts +14 -0
- package/src/actions/list-vault-requests.ts +16 -0
- package/src/actions/list-vault-secret-options.ts +20 -0
- package/src/actions/list-vault-secrets.ts +26 -0
- package/src/actions/list-workspace-apps.ts +25 -0
- package/src/actions/list-workspace-resource-grants.ts +14 -0
- package/src/actions/list-workspace-resources.ts +16 -0
- package/src/actions/navigate.ts +55 -0
- package/src/actions/reject-dispatch-change.ts +12 -0
- package/src/actions/request-vault-secret.ts +16 -0
- package/src/actions/revoke-vault-grant.ts +11 -0
- package/src/actions/revoke-workspace-resource-grant.ts +15 -0
- package/src/actions/send-platform-message.ts +96 -0
- package/src/actions/set-app-creation-settings.ts +19 -0
- package/src/actions/set-dispatch-approval-policy.ts +24 -0
- package/src/actions/start-workspace-app-creation.ts +33 -0
- package/src/actions/sync-vault-to-app.ts +14 -0
- package/src/actions/sync-workspace-resources-to-all.ts +10 -0
- package/src/actions/sync-workspace-resources-to-app.ts +12 -0
- package/src/actions/update-vault-secret.ts +12 -0
- package/src/actions/update-workspace-resource.ts +19 -0
- package/src/actions/upsert-destination.ts +29 -0
- package/src/actions/view-screen.ts +78 -0
- package/src/components/agents-panel.tsx +262 -0
- package/src/components/app-keys-popover.tsx +231 -0
- package/src/components/create-app-popover.tsx +423 -0
- package/src/components/dispatch-shell.tsx +53 -0
- package/src/components/index.ts +11 -0
- package/src/components/layout/Header.tsx +69 -0
- package/src/components/layout/HeaderActions.tsx +84 -0
- package/src/components/layout/Layout.tsx +243 -0
- package/src/components/messaging-setup-panel.tsx +666 -0
- package/src/components/ui/accordion.tsx +56 -0
- package/src/components/ui/alert-dialog.tsx +139 -0
- package/src/components/ui/alert.tsx +59 -0
- package/src/components/ui/aspect-ratio.tsx +5 -0
- package/src/components/ui/avatar.tsx +48 -0
- package/src/components/ui/badge.tsx +37 -0
- package/src/components/ui/breadcrumb.tsx +115 -0
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/calendar.tsx +68 -0
- package/src/components/ui/card.tsx +86 -0
- package/src/components/ui/carousel.tsx +260 -0
- package/src/components/ui/chart.tsx +375 -0
- package/src/components/ui/checkbox.tsx +28 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/command.tsx +154 -0
- package/src/components/ui/context-menu.tsx +198 -0
- package/src/components/ui/dialog.tsx +120 -0
- package/src/components/ui/drawer.tsx +116 -0
- package/src/components/ui/dropdown-menu.tsx +198 -0
- package/src/components/ui/form.tsx +177 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/input-otp.tsx +69 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/menubar.tsx +235 -0
- package/src/components/ui/navigation-menu.tsx +128 -0
- package/src/components/ui/pagination.tsx +121 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/progress.tsx +26 -0
- package/src/components/ui/radio-group.tsx +42 -0
- package/src/components/ui/resizable.tsx +43 -0
- package/src/components/ui/scroll-area.tsx +46 -0
- package/src/components/ui/select.tsx +158 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.tsx +139 -0
- package/src/components/ui/sidebar.tsx +778 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +26 -0
- package/src/components/ui/sonner.tsx +58 -0
- package/src/components/ui/spinner.tsx +17 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +117 -0
- package/src/components/ui/tabs.tsx +53 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/toast.tsx +127 -0
- package/src/components/ui/toaster.tsx +33 -0
- package/src/components/ui/toggle-group.tsx +59 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/components/ui/use-toast.ts +3 -0
- package/src/config.ts +35 -0
- package/src/db/index.ts +12 -0
- package/src/db/migrations.ts +165 -0
- package/src/db/schema.ts +160 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-navigation-state.ts +132 -0
- package/src/hooks/use-toast.ts +188 -0
- package/src/index.ts +19 -0
- package/src/lib/utils.ts +1 -0
- package/src/routes/index.ts +51 -0
- package/src/routes/pages/_index.tsx +51 -0
- package/src/routes/pages/agents.tsx +23 -0
- package/src/routes/pages/approval.tsx +243 -0
- package/src/routes/pages/approvals.tsx +157 -0
- package/src/routes/pages/apps.$appId.tsx +134 -0
- package/src/routes/pages/apps.tsx +163 -0
- package/src/routes/pages/audit.tsx +41 -0
- package/src/routes/pages/destinations.tsx +253 -0
- package/src/routes/pages/identities.tsx +91 -0
- package/src/routes/pages/integrations.tsx +278 -0
- package/src/routes/pages/messaging.tsx +17 -0
- package/src/routes/pages/new-app.tsx +17 -0
- package/src/routes/pages/overview.tsx +792 -0
- package/src/routes/pages/team.tsx +23 -0
- package/src/routes/pages/tools.$id.tsx +5 -0
- package/src/routes/pages/tools._index.tsx +5 -0
- package/src/routes/pages/vault.tsx +617 -0
- package/src/routes/pages/workspace.tsx +598 -0
- package/src/server/index.ts +78 -0
- package/src/server/lib/app-creation-store.ts +996 -0
- package/src/server/lib/dispatch-integrations.ts +125 -0
- package/src/server/lib/dispatch-store.ts +889 -0
- package/src/server/lib/env-config.ts +44 -0
- package/src/server/lib/pre-auth-routing.ts +150 -0
- package/src/server/lib/vault-store.ts +811 -0
- package/src/server/lib/workspace-resources-store.ts +445 -0
- package/src/server/plugins/agent-chat.ts +36 -0
- package/src/server/plugins/auth.ts +34 -0
- package/src/server/plugins/core-routes.ts +6 -0
- package/src/server/plugins/db.ts +6 -0
- package/src/server/plugins/integrations.ts +59 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type DialogProps } from "@radix-ui/react-dialog";
|
|
3
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
4
|
+
import { IconSearch } from "@tabler/icons-react";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
|
|
8
|
+
|
|
9
|
+
const Command = React.forwardRef<
|
|
10
|
+
React.ElementRef<typeof CommandPrimitive>,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
|
|
12
|
+
>(({ className, ...props }, ref) => (
|
|
13
|
+
<CommandPrimitive
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn(
|
|
16
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
));
|
|
22
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
23
|
+
|
|
24
|
+
interface CommandDialogProps extends DialogProps {}
|
|
25
|
+
|
|
26
|
+
const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
|
|
27
|
+
return (
|
|
28
|
+
<Dialog {...props}>
|
|
29
|
+
<DialogContent className="overflow-hidden p-0 shadow-lg">
|
|
30
|
+
<DialogTitle className="sr-only">Command menu</DialogTitle>
|
|
31
|
+
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
32
|
+
{children}
|
|
33
|
+
</Command>
|
|
34
|
+
</DialogContent>
|
|
35
|
+
</Dialog>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const CommandInput = React.forwardRef<
|
|
40
|
+
React.ElementRef<typeof CommandPrimitive.Input>,
|
|
41
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
|
42
|
+
>(({ className, ...props }, ref) => (
|
|
43
|
+
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
|
|
44
|
+
<IconSearch className="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
|
45
|
+
<CommandPrimitive.Input
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={cn(
|
|
48
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
));
|
|
55
|
+
|
|
56
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
57
|
+
|
|
58
|
+
const CommandList = React.forwardRef<
|
|
59
|
+
React.ElementRef<typeof CommandPrimitive.List>,
|
|
60
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
|
61
|
+
>(({ className, ...props }, ref) => (
|
|
62
|
+
<CommandPrimitive.List
|
|
63
|
+
ref={ref}
|
|
64
|
+
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
));
|
|
68
|
+
|
|
69
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
70
|
+
|
|
71
|
+
const CommandEmpty = React.forwardRef<
|
|
72
|
+
React.ElementRef<typeof CommandPrimitive.Empty>,
|
|
73
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
|
|
74
|
+
>((props, ref) => (
|
|
75
|
+
<CommandPrimitive.Empty
|
|
76
|
+
ref={ref}
|
|
77
|
+
className="py-6 text-center text-sm"
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
));
|
|
81
|
+
|
|
82
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
83
|
+
|
|
84
|
+
const CommandGroup = React.forwardRef<
|
|
85
|
+
React.ElementRef<typeof CommandPrimitive.Group>,
|
|
86
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
|
|
87
|
+
>(({ className, ...props }, ref) => (
|
|
88
|
+
<CommandPrimitive.Group
|
|
89
|
+
ref={ref}
|
|
90
|
+
className={cn(
|
|
91
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
92
|
+
className,
|
|
93
|
+
)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
));
|
|
97
|
+
|
|
98
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
99
|
+
|
|
100
|
+
const CommandSeparator = React.forwardRef<
|
|
101
|
+
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
102
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
|
|
103
|
+
>(({ className, ...props }, ref) => (
|
|
104
|
+
<CommandPrimitive.Separator
|
|
105
|
+
ref={ref}
|
|
106
|
+
className={cn("-mx-1 h-px bg-border", className)}
|
|
107
|
+
{...props}
|
|
108
|
+
/>
|
|
109
|
+
));
|
|
110
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
111
|
+
|
|
112
|
+
const CommandItem = React.forwardRef<
|
|
113
|
+
React.ElementRef<typeof CommandPrimitive.Item>,
|
|
114
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
|
|
115
|
+
>(({ className, ...props }, ref) => (
|
|
116
|
+
<CommandPrimitive.Item
|
|
117
|
+
ref={ref}
|
|
118
|
+
className={cn(
|
|
119
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
|
120
|
+
className,
|
|
121
|
+
)}
|
|
122
|
+
{...props}
|
|
123
|
+
/>
|
|
124
|
+
));
|
|
125
|
+
|
|
126
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
127
|
+
|
|
128
|
+
const CommandShortcut = ({
|
|
129
|
+
className,
|
|
130
|
+
...props
|
|
131
|
+
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
132
|
+
return (
|
|
133
|
+
<span
|
|
134
|
+
className={cn(
|
|
135
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
136
|
+
className,
|
|
137
|
+
)}
|
|
138
|
+
{...props}
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
143
|
+
|
|
144
|
+
export {
|
|
145
|
+
Command,
|
|
146
|
+
CommandDialog,
|
|
147
|
+
CommandInput,
|
|
148
|
+
CommandList,
|
|
149
|
+
CommandEmpty,
|
|
150
|
+
CommandGroup,
|
|
151
|
+
CommandItem,
|
|
152
|
+
CommandShortcut,
|
|
153
|
+
CommandSeparator,
|
|
154
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
import { IconCheck, IconChevronRight, IconCircle } from "@tabler/icons-react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const ContextMenu = ContextMenuPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
10
|
+
|
|
11
|
+
const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
12
|
+
|
|
13
|
+
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
14
|
+
|
|
15
|
+
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
16
|
+
|
|
17
|
+
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
18
|
+
|
|
19
|
+
const ContextMenuSubTrigger = React.forwardRef<
|
|
20
|
+
React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
|
|
21
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}
|
|
24
|
+
>(({ className, inset, children, ...props }, ref) => (
|
|
25
|
+
<ContextMenuPrimitive.SubTrigger
|
|
26
|
+
ref={ref}
|
|
27
|
+
className={cn(
|
|
28
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
29
|
+
inset && "pl-8",
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
<IconChevronRight className="ml-auto h-4 w-4" />
|
|
36
|
+
</ContextMenuPrimitive.SubTrigger>
|
|
37
|
+
));
|
|
38
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
39
|
+
|
|
40
|
+
const ContextMenuSubContent = React.forwardRef<
|
|
41
|
+
React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
|
|
42
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
|
|
43
|
+
>(({ className, ...props }, ref) => (
|
|
44
|
+
<ContextMenuPrimitive.SubContent
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
48
|
+
className,
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
));
|
|
53
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
54
|
+
|
|
55
|
+
const ContextMenuContent = React.forwardRef<
|
|
56
|
+
React.ElementRef<typeof ContextMenuPrimitive.Content>,
|
|
57
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
<ContextMenuPrimitive.Portal>
|
|
60
|
+
<ContextMenuPrimitive.Content
|
|
61
|
+
ref={ref}
|
|
62
|
+
className={cn(
|
|
63
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
64
|
+
className,
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
</ContextMenuPrimitive.Portal>
|
|
69
|
+
));
|
|
70
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
71
|
+
|
|
72
|
+
const ContextMenuItem = React.forwardRef<
|
|
73
|
+
React.ElementRef<typeof ContextMenuPrimitive.Item>,
|
|
74
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
|
|
75
|
+
inset?: boolean;
|
|
76
|
+
}
|
|
77
|
+
>(({ className, inset, ...props }, ref) => (
|
|
78
|
+
<ContextMenuPrimitive.Item
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn(
|
|
81
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
82
|
+
inset && "pl-8",
|
|
83
|
+
className,
|
|
84
|
+
)}
|
|
85
|
+
{...props}
|
|
86
|
+
/>
|
|
87
|
+
));
|
|
88
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
89
|
+
|
|
90
|
+
const ContextMenuCheckboxItem = React.forwardRef<
|
|
91
|
+
React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
|
|
92
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>
|
|
93
|
+
>(({ className, children, checked, ...props }, ref) => (
|
|
94
|
+
<ContextMenuPrimitive.CheckboxItem
|
|
95
|
+
ref={ref}
|
|
96
|
+
className={cn(
|
|
97
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
98
|
+
className,
|
|
99
|
+
)}
|
|
100
|
+
checked={checked}
|
|
101
|
+
{...props}
|
|
102
|
+
>
|
|
103
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
104
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
105
|
+
<IconCheck className="h-4 w-4" />
|
|
106
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
107
|
+
</span>
|
|
108
|
+
{children}
|
|
109
|
+
</ContextMenuPrimitive.CheckboxItem>
|
|
110
|
+
));
|
|
111
|
+
ContextMenuCheckboxItem.displayName =
|
|
112
|
+
ContextMenuPrimitive.CheckboxItem.displayName;
|
|
113
|
+
|
|
114
|
+
const ContextMenuRadioItem = React.forwardRef<
|
|
115
|
+
React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
|
|
116
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>
|
|
117
|
+
>(({ className, children, ...props }, ref) => (
|
|
118
|
+
<ContextMenuPrimitive.RadioItem
|
|
119
|
+
ref={ref}
|
|
120
|
+
className={cn(
|
|
121
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
122
|
+
className,
|
|
123
|
+
)}
|
|
124
|
+
{...props}
|
|
125
|
+
>
|
|
126
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
127
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
128
|
+
<IconCircle className="h-2 w-2 fill-current" />
|
|
129
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
130
|
+
</span>
|
|
131
|
+
{children}
|
|
132
|
+
</ContextMenuPrimitive.RadioItem>
|
|
133
|
+
));
|
|
134
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
135
|
+
|
|
136
|
+
const ContextMenuLabel = React.forwardRef<
|
|
137
|
+
React.ElementRef<typeof ContextMenuPrimitive.Label>,
|
|
138
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
|
|
139
|
+
inset?: boolean;
|
|
140
|
+
}
|
|
141
|
+
>(({ className, inset, ...props }, ref) => (
|
|
142
|
+
<ContextMenuPrimitive.Label
|
|
143
|
+
ref={ref}
|
|
144
|
+
className={cn(
|
|
145
|
+
"px-2 py-1.5 text-sm font-semibold text-foreground",
|
|
146
|
+
inset && "pl-8",
|
|
147
|
+
className,
|
|
148
|
+
)}
|
|
149
|
+
{...props}
|
|
150
|
+
/>
|
|
151
|
+
));
|
|
152
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
153
|
+
|
|
154
|
+
const ContextMenuSeparator = React.forwardRef<
|
|
155
|
+
React.ElementRef<typeof ContextMenuPrimitive.Separator>,
|
|
156
|
+
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>
|
|
157
|
+
>(({ className, ...props }, ref) => (
|
|
158
|
+
<ContextMenuPrimitive.Separator
|
|
159
|
+
ref={ref}
|
|
160
|
+
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
161
|
+
{...props}
|
|
162
|
+
/>
|
|
163
|
+
));
|
|
164
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
165
|
+
|
|
166
|
+
const ContextMenuShortcut = ({
|
|
167
|
+
className,
|
|
168
|
+
...props
|
|
169
|
+
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
170
|
+
return (
|
|
171
|
+
<span
|
|
172
|
+
className={cn(
|
|
173
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
174
|
+
className,
|
|
175
|
+
)}
|
|
176
|
+
{...props}
|
|
177
|
+
/>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
181
|
+
|
|
182
|
+
export {
|
|
183
|
+
ContextMenu,
|
|
184
|
+
ContextMenuTrigger,
|
|
185
|
+
ContextMenuContent,
|
|
186
|
+
ContextMenuItem,
|
|
187
|
+
ContextMenuCheckboxItem,
|
|
188
|
+
ContextMenuRadioItem,
|
|
189
|
+
ContextMenuLabel,
|
|
190
|
+
ContextMenuSeparator,
|
|
191
|
+
ContextMenuShortcut,
|
|
192
|
+
ContextMenuGroup,
|
|
193
|
+
ContextMenuPortal,
|
|
194
|
+
ContextMenuSub,
|
|
195
|
+
ContextMenuSubContent,
|
|
196
|
+
ContextMenuSubTrigger,
|
|
197
|
+
ContextMenuRadioGroup,
|
|
198
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { IconX } from "@tabler/icons-react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const Dialog = DialogPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
10
|
+
|
|
11
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
12
|
+
|
|
13
|
+
const DialogClose = DialogPrimitive.Close;
|
|
14
|
+
|
|
15
|
+
const DialogOverlay = React.forwardRef<
|
|
16
|
+
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
17
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
18
|
+
>(({ className, ...props }, ref) => (
|
|
19
|
+
<DialogPrimitive.Overlay
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn(
|
|
22
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
));
|
|
28
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
29
|
+
|
|
30
|
+
const DialogContent = React.forwardRef<
|
|
31
|
+
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
32
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
33
|
+
>(({ className, children, ...props }, ref) => (
|
|
34
|
+
<DialogPortal>
|
|
35
|
+
<DialogOverlay />
|
|
36
|
+
<DialogPrimitive.Content
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={cn(
|
|
39
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
|
|
40
|
+
className,
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
46
|
+
<IconX className="h-4 w-4" />
|
|
47
|
+
<span className="sr-only">Close</span>
|
|
48
|
+
</DialogPrimitive.Close>
|
|
49
|
+
</DialogPrimitive.Content>
|
|
50
|
+
</DialogPortal>
|
|
51
|
+
));
|
|
52
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
53
|
+
|
|
54
|
+
const DialogHeader = ({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
58
|
+
<div
|
|
59
|
+
className={cn(
|
|
60
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
61
|
+
className,
|
|
62
|
+
)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
DialogHeader.displayName = "DialogHeader";
|
|
67
|
+
|
|
68
|
+
const DialogFooter = ({
|
|
69
|
+
className,
|
|
70
|
+
...props
|
|
71
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
72
|
+
<div
|
|
73
|
+
className={cn(
|
|
74
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
75
|
+
className,
|
|
76
|
+
)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
DialogFooter.displayName = "DialogFooter";
|
|
81
|
+
|
|
82
|
+
const DialogTitle = React.forwardRef<
|
|
83
|
+
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
84
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
85
|
+
>(({ className, ...props }, ref) => (
|
|
86
|
+
<DialogPrimitive.Title
|
|
87
|
+
ref={ref}
|
|
88
|
+
className={cn(
|
|
89
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
90
|
+
className,
|
|
91
|
+
)}
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
94
|
+
));
|
|
95
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
96
|
+
|
|
97
|
+
const DialogDescription = React.forwardRef<
|
|
98
|
+
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
99
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
100
|
+
>(({ className, ...props }, ref) => (
|
|
101
|
+
<DialogPrimitive.Description
|
|
102
|
+
ref={ref}
|
|
103
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
));
|
|
107
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
108
|
+
|
|
109
|
+
export {
|
|
110
|
+
Dialog,
|
|
111
|
+
DialogPortal,
|
|
112
|
+
DialogOverlay,
|
|
113
|
+
DialogClose,
|
|
114
|
+
DialogTrigger,
|
|
115
|
+
DialogContent,
|
|
116
|
+
DialogHeader,
|
|
117
|
+
DialogFooter,
|
|
118
|
+
DialogTitle,
|
|
119
|
+
DialogDescription,
|
|
120
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
|
|
6
|
+
const Drawer = ({
|
|
7
|
+
shouldScaleBackground = true,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
|
|
10
|
+
<DrawerPrimitive.Root
|
|
11
|
+
shouldScaleBackground={shouldScaleBackground}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
Drawer.displayName = "Drawer";
|
|
16
|
+
|
|
17
|
+
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
18
|
+
|
|
19
|
+
const DrawerPortal = DrawerPrimitive.Portal;
|
|
20
|
+
|
|
21
|
+
const DrawerClose = DrawerPrimitive.Close;
|
|
22
|
+
|
|
23
|
+
const DrawerOverlay = React.forwardRef<
|
|
24
|
+
React.ElementRef<typeof DrawerPrimitive.Overlay>,
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
|
|
26
|
+
>(({ className, ...props }, ref) => (
|
|
27
|
+
<DrawerPrimitive.Overlay
|
|
28
|
+
ref={ref}
|
|
29
|
+
className={cn("fixed inset-0 z-50 bg-black/80", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
));
|
|
33
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
34
|
+
|
|
35
|
+
const DrawerContent = React.forwardRef<
|
|
36
|
+
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
37
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
38
|
+
>(({ className, children, ...props }, ref) => (
|
|
39
|
+
<DrawerPortal>
|
|
40
|
+
<DrawerOverlay />
|
|
41
|
+
<DrawerPrimitive.Content
|
|
42
|
+
ref={ref}
|
|
43
|
+
className={cn(
|
|
44
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
45
|
+
className,
|
|
46
|
+
)}
|
|
47
|
+
{...props}
|
|
48
|
+
>
|
|
49
|
+
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
|
|
50
|
+
{children}
|
|
51
|
+
</DrawerPrimitive.Content>
|
|
52
|
+
</DrawerPortal>
|
|
53
|
+
));
|
|
54
|
+
DrawerContent.displayName = "DrawerContent";
|
|
55
|
+
|
|
56
|
+
const DrawerHeader = ({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
60
|
+
<div
|
|
61
|
+
className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
66
|
+
|
|
67
|
+
const DrawerFooter = ({
|
|
68
|
+
className,
|
|
69
|
+
...props
|
|
70
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
71
|
+
<div
|
|
72
|
+
className={cn("mt-auto flex flex-col gap-2 p-4", className)}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
77
|
+
|
|
78
|
+
const DrawerTitle = React.forwardRef<
|
|
79
|
+
React.ElementRef<typeof DrawerPrimitive.Title>,
|
|
80
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
|
|
81
|
+
>(({ className, ...props }, ref) => (
|
|
82
|
+
<DrawerPrimitive.Title
|
|
83
|
+
ref={ref}
|
|
84
|
+
className={cn(
|
|
85
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
86
|
+
className,
|
|
87
|
+
)}
|
|
88
|
+
{...props}
|
|
89
|
+
/>
|
|
90
|
+
));
|
|
91
|
+
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
92
|
+
|
|
93
|
+
const DrawerDescription = React.forwardRef<
|
|
94
|
+
React.ElementRef<typeof DrawerPrimitive.Description>,
|
|
95
|
+
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
|
|
96
|
+
>(({ className, ...props }, ref) => (
|
|
97
|
+
<DrawerPrimitive.Description
|
|
98
|
+
ref={ref}
|
|
99
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
100
|
+
{...props}
|
|
101
|
+
/>
|
|
102
|
+
));
|
|
103
|
+
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
Drawer,
|
|
107
|
+
DrawerPortal,
|
|
108
|
+
DrawerOverlay,
|
|
109
|
+
DrawerTrigger,
|
|
110
|
+
DrawerClose,
|
|
111
|
+
DrawerContent,
|
|
112
|
+
DrawerHeader,
|
|
113
|
+
DrawerFooter,
|
|
114
|
+
DrawerTitle,
|
|
115
|
+
DrawerDescription,
|
|
116
|
+
};
|