@agent-native/core 0.117.2 → 0.118.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/corpus/README.md +3 -3
- package/corpus/core/CHANGELOG.md +30 -0
- package/corpus/core/docs/content/custom-design-system.mdx +445 -0
- package/corpus/core/docs/content/toolkit-ui.mdx +16 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/types.ts +1 -0
- package/corpus/core/src/agent/types.ts +1 -1
- package/corpus/core/src/client/AgentPanel.tsx +90 -107
- package/corpus/core/src/client/AssistantChat.tsx +30 -13
- package/corpus/core/src/client/CommandMenu.tsx +68 -178
- package/corpus/core/src/client/agent-chat-adapter.ts +3 -1
- package/corpus/core/src/client/app-providers.tsx +1 -1
- package/corpus/core/src/client/chat/message-components.tsx +116 -10
- package/corpus/core/src/client/chat/tool-call-display.tsx +26 -5
- package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +14 -40
- package/corpus/core/src/client/components/ui/message-scroller.tsx +15 -1
- package/corpus/core/src/client/i18n.tsx +22 -0
- package/corpus/core/src/client/index.ts +17 -0
- package/corpus/core/src/client/org/TeamPage.tsx +257 -153
- package/corpus/core/src/client/progress/RunsTray.tsx +89 -88
- package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +5 -2
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +34 -13
- package/corpus/core/src/client/resources/mcp-integration-catalog.ts +13 -0
- package/corpus/core/src/client/settings/DemoModeSection.tsx +6 -18
- package/corpus/core/src/client/settings/SecretsSection.tsx +97 -52
- package/corpus/core/src/client/settings/SettingsPanel.tsx +202 -246
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +23 -2
- package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
- package/corpus/core/src/client/settings/index.ts +7 -0
- package/corpus/core/src/client/settings/useSettingsPanelController.ts +155 -0
- package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
- package/corpus/core/src/client/setup-connections/index.ts +10 -0
- package/corpus/core/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +64 -586
- package/corpus/core/src/client/sharing/ShareDialog.tsx +299 -633
- package/corpus/core/src/client/sharing/index.ts +42 -0
- package/corpus/core/src/client/sharing/share-controller-helpers.ts +318 -0
- package/corpus/core/src/client/sharing/useShareButtonController.ts +600 -0
- package/corpus/core/src/client/sharing/useShareDialogController.ts +559 -0
- package/corpus/core/src/client/sse-event-processor.ts +23 -0
- package/corpus/core/src/client/tool-display.ts +71 -0
- package/corpus/core/src/client/use-agent-engine-configured.ts +12 -19
- package/corpus/core/src/client/use-chat-threads.ts +33 -12
- package/corpus/core/src/localization/default-messages.ts +5 -0
- package/corpus/core/src/mcp-client/oauth-routes.ts +16 -2
- package/corpus/core/src/scripts/call-agent.ts +5 -1
- package/corpus/core/src/server/realtime-voice.ts +1 -1
- package/corpus/core/src/styles/agent-native.css +0 -24
- package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/core/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/core/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/core/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
- package/corpus/core/src/templates/default/app/design-system.ts +3 -0
- package/corpus/core/src/templates/default/app/root.tsx +5 -2
- package/corpus/core/src/templates/default/package.json +1 -0
- package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/core/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/core/src/vite/client.ts +39 -0
- package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/analytics/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/analytics/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/analytics/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/analytics/app/design-system.ts +3 -0
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/assets/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/assets/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/assets/app/components/ui/alert.tsx +1 -0
- package/corpus/templates/assets/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/assets/app/design-system.ts +3 -0
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +26 -30
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/brain/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/brain/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/brain/app/components/ui/dialog.tsx +1 -0
- package/corpus/templates/brain/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/brain/app/design-system.ts +3 -0
- package/corpus/templates/brain/app/routes/sources.tsx +8 -8
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/calendar/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/calendar/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/calendar/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/calendar/app/design-system.ts +3 -0
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/chat/app/design-system.ts +3 -0
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/clips/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/clips/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/clips/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/clips/app/design-system.ts +3 -0
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
- package/corpus/templates/clips/changelog/2026-07-22-fixed-windows-recordings-aborting-during-the-countdown.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-22-permissions-and-rewind-controls-are-now-grouped-with-clearer.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-22-the-desktop-popover-opens-centered-under-the-menu-bar-icon-o.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +86 -82
- package/corpus/templates/clips/desktop/src/styles.css +13 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +10 -1
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +37 -2
- package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -0
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/content/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/content/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +41 -59
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +41 -41
- package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +2 -1
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +2 -1
- package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +9 -9
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +7 -7
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +11 -11
- package/corpus/templates/content/app/components/ui/checkbox.tsx +1 -0
- package/corpus/templates/content/app/components/ui/collapsible.tsx +1 -0
- package/corpus/templates/content/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/content/app/design-system.ts +3 -0
- package/corpus/templates/content/app/global.css +29 -3
- package/corpus/templates/content/changelog/2026-07-22-page-actions-are-grouped-into-the-three-dots-menu-for-a-clea.md +6 -0
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/crm/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/crm/app/components/crm/CreateCrmRecordDialog.tsx +10 -10
- package/corpus/templates/crm/app/components/crm/CrmDashboardPanel.tsx +1 -6
- package/corpus/templates/crm/app/components/crm/CrmSignalsPanel.tsx +3 -2
- package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +13 -12
- package/corpus/templates/crm/app/components/crm/RecordActions.tsx +17 -17
- package/corpus/templates/crm/app/components/crm/RecordGrid.tsx +8 -8
- package/corpus/templates/crm/app/components/crm/RecordWorkspace.tsx +3 -8
- package/corpus/templates/crm/app/components/crm/SavedViewDataProgram.tsx +2 -1
- package/corpus/templates/crm/app/components/crm/Surface.tsx +3 -2
- package/corpus/templates/crm/app/components/crm/WorkOverview.tsx +2 -2
- package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +7 -7
- package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +1 -1
- package/corpus/templates/crm/app/components/ui/alert-dialog.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/badge.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/button.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/card.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/dialog.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/input.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/label.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/select.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/sheet.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/skeleton.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/switch.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/table.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/tabs.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/crm/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/templates/crm/app/design-system.ts +3 -0
- package/corpus/templates/crm/app/root.tsx +9 -6
- package/corpus/templates/crm/app/routes/dashboard.tsx +1 -1
- package/corpus/templates/crm/app/routes/proposals.tsx +13 -13
- package/corpus/templates/crm/app/routes/setup.tsx +9 -9
- package/corpus/templates/crm/app/routes/tasks.tsx +14 -14
- package/corpus/templates/crm/app/routes/views.tsx +16 -16
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/design/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/design/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +8 -8
- package/corpus/templates/design/app/components/ui/command.tsx +1 -0
- package/corpus/templates/design/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/design/app/design-system.ts +3 -0
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/dispatch/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/dispatch/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/dispatch/app/components/ui/button.tsx +1 -0
- package/corpus/templates/dispatch/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/templates/dispatch/app/design-system.ts +3 -0
- package/corpus/templates/dispatch/app/root.tsx +10 -7
- package/corpus/templates/dispatch/package.json +1 -0
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/forms/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/forms/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/forms/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/forms/app/design-system.ts +3 -0
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/macros/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/macros/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/macros/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/macros/app/design-system.ts +3 -0
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/mail/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/mail/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +134 -93
- package/corpus/templates/mail/app/components/email/email-iframe-document.ts +8 -2
- package/corpus/templates/mail/app/components/ui/textarea.tsx +1 -21
- package/corpus/templates/mail/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/mail/app/design-system.ts +3 -0
- package/corpus/templates/mail/changelog/2026-07-22-email-messages-no-longer-flash-with-an-unstyled-page-while-l.md +6 -0
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/plan/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/plan/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/plan/app/design-system.ts +3 -0
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/slides/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/slides/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/slides/app/components/ui/toolkit-provider.tsx +6 -1
- package/corpus/templates/slides/app/design-system.ts +3 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/corpus/templates/tasks/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +22 -2
- package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/corpus/templates/tasks/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/templates/tasks/app/design-system.ts +3 -0
- package/corpus/templates/tasks/app/root.tsx +5 -2
- package/corpus/toolkit/CHANGELOG.md +14 -0
- package/corpus/toolkit/agent-native.eject.json +71 -0
- package/corpus/toolkit/package.json +31 -1
- package/corpus/toolkit/src/chat-history/ChatHistoryRail.tsx +100 -39
- package/corpus/toolkit/src/chat-history/index.ts +9 -0
- package/corpus/toolkit/src/chat-history/useChatHistoryRailController.ts +76 -0
- package/corpus/toolkit/src/chat-history.css +2 -0
- package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +11 -8
- package/corpus/toolkit/src/composer/PromptComposer.tsx +27 -6
- package/corpus/toolkit/src/composer/useRealtimeVoiceMode.tsx +107 -22
- package/corpus/toolkit/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
- package/corpus/toolkit/src/conformance/index.ts +3 -0
- package/corpus/toolkit/src/conformance/runner.tsx +710 -0
- package/corpus/toolkit/src/conformance/types.ts +45 -0
- package/corpus/toolkit/src/conformance/version.ts +22 -0
- package/corpus/toolkit/src/design-system/components.tsx +146 -0
- package/corpus/toolkit/src/design-system/context.tsx +31 -0
- package/corpus/toolkit/src/design-system/default-adapter.tsx +915 -0
- package/corpus/toolkit/src/design-system/definition.ts +14 -0
- package/corpus/toolkit/src/design-system/error-boundary.tsx +37 -0
- package/corpus/toolkit/src/design-system/index.ts +7 -0
- package/corpus/toolkit/src/design-system/theme.ts +145 -0
- package/corpus/toolkit/src/design-system/types.ts +363 -0
- package/corpus/toolkit/src/provider.tsx +98 -5
- package/corpus/toolkit/src/ui/button.tsx +95 -6
- package/corpus/toolkit/src/ui/dialog.tsx +48 -23
- package/corpus/toolkit/src/ui/popover.tsx +16 -2
- package/corpus/toolkit/src/ui/select.tsx +7 -3
- package/corpus/toolkit/src/ui/sidebar.tsx +47 -48
- package/corpus/toolkit/src/ui/tooltip.tsx +7 -3
- package/dist/a2a/types.d.ts +1 -1
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/agent/types.d.ts +1 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +14 -14
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +26 -15
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +18 -106
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +2 -1
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/app-providers.d.ts.map +1 -1
- package/dist/client/app-providers.js +1 -1
- package/dist/client/app-providers.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +9 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +62 -7
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +20 -5
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/InlineExtensionWidget.js +9 -12
- package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
- package/dist/client/components/ui/message-scroller.d.ts +1 -1
- package/dist/client/components/ui/message-scroller.d.ts.map +1 -1
- package/dist/client/components/ui/message-scroller.js +4 -3
- package/dist/client/components/ui/message-scroller.js.map +1 -1
- package/dist/client/i18n.d.ts.map +1 -1
- package/dist/client/i18n.js +9 -0
- package/dist/client/i18n.js.map +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +41 -33
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +9 -10
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
- package/dist/client/resources/McpConnectionSuggestion.js +5 -4
- package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +10 -8
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.d.ts +1 -0
- package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.js +13 -0
- package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
- package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
- package/dist/client/settings/DemoModeSection.js +2 -5
- package/dist/client/settings/DemoModeSection.js.map +1 -1
- package/dist/client/settings/SecretsSection.d.ts.map +1 -1
- package/dist/client/settings/SecretsSection.js +18 -6
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +52 -117
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +16 -1
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +2 -5
- package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
- package/dist/client/settings/index.d.ts +1 -0
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -0
- package/dist/client/settings/index.js.map +1 -1
- package/dist/client/settings/useSettingsPanelController.d.ts +22 -0
- package/dist/client/settings/useSettingsPanelController.d.ts.map +1 -0
- package/dist/client/settings/useSettingsPanelController.js +103 -0
- package/dist/client/settings/useSettingsPanelController.js.map +1 -0
- package/dist/client/setup-connections/BuilderConnectCard.d.ts +14 -6
- package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -1
- package/dist/client/setup-connections/BuilderConnectCard.js +24 -16
- package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -1
- package/dist/client/setup-connections/index.d.ts +2 -1
- package/dist/client/setup-connections/index.d.ts.map +1 -1
- package/dist/client/setup-connections/index.js +2 -1
- package/dist/client/setup-connections/index.js.map +1 -1
- package/dist/client/setup-connections/useBuilderConnectCardController.d.ts +34 -0
- package/dist/client/setup-connections/useBuilderConnectCardController.d.ts.map +1 -0
- package/dist/client/setup-connections/useBuilderConnectCardController.js +39 -0
- package/dist/client/setup-connections/useBuilderConnectCardController.js.map +1 -0
- package/dist/client/sharing/ShareButton.d.ts +2 -1
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +17 -463
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.d.ts +6 -6
- package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
- package/dist/client/sharing/ShareDialog.js +69 -283
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/client/sharing/index.d.ts +3 -0
- package/dist/client/sharing/index.d.ts.map +1 -1
- package/dist/client/sharing/index.js +3 -0
- package/dist/client/sharing/index.js.map +1 -1
- package/dist/client/sharing/share-controller-helpers.d.ts +70 -0
- package/dist/client/sharing/share-controller-helpers.d.ts.map +1 -0
- package/dist/client/sharing/share-controller-helpers.js +224 -0
- package/dist/client/sharing/share-controller-helpers.js.map +1 -0
- package/dist/client/sharing/useShareButtonController.d.ts +91 -0
- package/dist/client/sharing/useShareButtonController.d.ts.map +1 -0
- package/dist/client/sharing/useShareButtonController.js +397 -0
- package/dist/client/sharing/useShareButtonController.js.map +1 -0
- package/dist/client/sharing/useShareDialogController.d.ts +109 -0
- package/dist/client/sharing/useShareDialogController.d.ts.map +1 -0
- package/dist/client/sharing/useShareDialogController.js +348 -0
- package/dist/client/sharing/useShareDialogController.js.map +1 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +21 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/tool-display.d.ts +16 -0
- package/dist/client/tool-display.d.ts.map +1 -1
- package/dist/client/tool-display.js +52 -0
- package/dist/client/tool-display.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts +3 -2
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +7 -19
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +21 -8
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/localization/default-messages.d.ts +4 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +4 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp-client/oauth-routes.d.ts +2 -0
- package/dist/mcp-client/oauth-routes.d.ts.map +1 -1
- package/dist/mcp-client/oauth-routes.js +12 -2
- package/dist/mcp-client/oauth-routes.js.map +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +5 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/realtime-voice.js +1 -1
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/agent-native.css +0 -24
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
- package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/dist/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
- package/dist/templates/chat/app/design-system.ts +3 -0
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
- package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/dist/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
- package/dist/templates/default/app/design-system.ts +3 -0
- package/dist/templates/default/app/root.tsx +5 -2
- package/dist/templates/default/package.json +1 -0
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/dist/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
- package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/dist/vite/client.d.ts +3 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +31 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/custom-design-system.mdx +445 -0
- package/docs/content/toolkit-ui.mdx +16 -0
- package/package.json +2 -2
- package/src/a2a/types.ts +1 -0
- package/src/agent/types.ts +1 -1
- package/src/client/AgentPanel.tsx +90 -107
- package/src/client/AssistantChat.tsx +30 -13
- package/src/client/CommandMenu.tsx +68 -178
- package/src/client/agent-chat-adapter.ts +3 -1
- package/src/client/app-providers.tsx +1 -1
- package/src/client/chat/message-components.tsx +116 -10
- package/src/client/chat/tool-call-display.tsx +26 -5
- package/src/client/chat/widgets/InlineExtensionWidget.tsx +14 -40
- package/src/client/components/ui/message-scroller.tsx +15 -1
- package/src/client/i18n.tsx +22 -0
- package/src/client/index.ts +17 -0
- package/src/client/org/TeamPage.tsx +257 -153
- package/src/client/progress/RunsTray.tsx +89 -88
- package/src/client/resources/McpConnectionSuggestion.tsx +5 -2
- package/src/client/resources/McpIntegrationDialog.tsx +34 -13
- package/src/client/resources/mcp-integration-catalog.ts +13 -0
- package/src/client/settings/DemoModeSection.tsx +6 -18
- package/src/client/settings/SecretsSection.tsx +97 -52
- package/src/client/settings/SettingsPanel.tsx +202 -246
- package/src/client/settings/SettingsTabsPage.tsx +23 -2
- package/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
- package/src/client/settings/index.ts +7 -0
- package/src/client/settings/useSettingsPanelController.ts +155 -0
- package/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
- package/src/client/setup-connections/index.ts +10 -0
- package/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
- package/src/client/sharing/ShareButton.tsx +64 -586
- package/src/client/sharing/ShareDialog.tsx +299 -633
- package/src/client/sharing/index.ts +42 -0
- package/src/client/sharing/share-controller-helpers.ts +318 -0
- package/src/client/sharing/useShareButtonController.ts +600 -0
- package/src/client/sharing/useShareDialogController.ts +559 -0
- package/src/client/sse-event-processor.ts +23 -0
- package/src/client/tool-display.ts +71 -0
- package/src/client/use-agent-engine-configured.ts +12 -19
- package/src/client/use-chat-threads.ts +33 -12
- package/src/localization/default-messages.ts +5 -0
- package/src/mcp-client/oauth-routes.ts +16 -2
- package/src/scripts/call-agent.ts +5 -1
- package/src/server/realtime-voice.ts +1 -1
- package/src/styles/agent-native.css +0 -24
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
- package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/src/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
- package/src/templates/chat/app/design-system.ts +3 -0
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
- package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
- package/src/templates/default/app/design-system.ts +3 -0
- package/src/templates/default/app/root.tsx +5 -2
- package/src/templates/default/package.json +1 -0
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
- package/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
- package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
- package/src/vite/client.ts +39 -0
- package/corpus/templates/analytics/app/components/ui/calendar.tsx +0 -70
- package/corpus/templates/analytics/app/components/ui/chart.tsx +0 -386
- package/corpus/templates/calendar/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/forms/app/components/ui/calendar.tsx +0 -214
- package/corpus/templates/forms/app/components/ui/chart.tsx +0 -379
- package/corpus/templates/forms/app/components/ui/command.tsx +0 -153
- package/corpus/templates/forms/app/components/ui/context-menu.tsx +0 -198
- package/corpus/templates/forms/app/components/ui/menubar.tsx +0 -254
- package/corpus/templates/macros/app/components/ui/menubar.tsx +0 -238
- package/corpus/templates/macros/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/mail/app/components/ui/calendar.tsx +0 -211
- package/corpus/templates/mail/app/components/ui/chart.tsx +0 -379
- package/corpus/templates/mail/app/components/ui/command.tsx +0 -153
- package/corpus/templates/mail/app/components/ui/context-menu.tsx +0 -198
- package/corpus/templates/mail/app/components/ui/menubar.tsx +0 -254
- package/corpus/templates/tasks/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/tasks/app/components/ui/calendar.tsx +0 -70
- package/corpus/templates/tasks/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/tasks/app/components/ui/chart.tsx +0 -379
- package/corpus/templates/tasks/app/components/ui/form.tsx +0 -177
- package/corpus/templates/tasks/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/tasks/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/tasks/app/components/ui/menubar.tsx +0 -254
- package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/tasks/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/tasks/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/tasks/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/tasks/app/components/ui/toggle.tsx +0 -43
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import {
|
|
5
|
-
Controller,
|
|
6
|
-
ControllerProps,
|
|
7
|
-
FieldPath,
|
|
8
|
-
FieldValues,
|
|
9
|
-
FormProvider,
|
|
10
|
-
useFormContext,
|
|
11
|
-
} from "react-hook-form";
|
|
12
|
-
|
|
13
|
-
import { Label } from "@/components/ui/label";
|
|
14
|
-
import { cn } from "@/lib/utils";
|
|
15
|
-
|
|
16
|
-
const Form = FormProvider;
|
|
17
|
-
|
|
18
|
-
type FormFieldContextValue<
|
|
19
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
20
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
21
|
-
> = {
|
|
22
|
-
name: TName;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const FormFieldContext = React.createContext<FormFieldContextValue>(
|
|
26
|
-
{} as FormFieldContextValue,
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const FormField = <
|
|
30
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
31
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
32
|
-
>({
|
|
33
|
-
...props
|
|
34
|
-
}: ControllerProps<TFieldValues, TName>) => {
|
|
35
|
-
return (
|
|
36
|
-
<FormFieldContext.Provider value={{ name: props.name }}>
|
|
37
|
-
<Controller {...props} />
|
|
38
|
-
</FormFieldContext.Provider>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const useFormField = () => {
|
|
43
|
-
const fieldContext = React.useContext(FormFieldContext);
|
|
44
|
-
const itemContext = React.useContext(FormItemContext);
|
|
45
|
-
const { getFieldState, formState } = useFormContext();
|
|
46
|
-
|
|
47
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
48
|
-
|
|
49
|
-
if (!fieldContext) {
|
|
50
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const { id } = itemContext;
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
id,
|
|
57
|
-
name: fieldContext.name,
|
|
58
|
-
formItemId: `${id}-form-item`,
|
|
59
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
60
|
-
formMessageId: `${id}-form-item-message`,
|
|
61
|
-
...fieldState,
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
type FormItemContextValue = {
|
|
66
|
-
id: string;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const FormItemContext = React.createContext<FormItemContextValue>(
|
|
70
|
-
{} as FormItemContextValue,
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
const FormItem = React.forwardRef<
|
|
74
|
-
HTMLDivElement,
|
|
75
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
76
|
-
>(({ className, ...props }, ref) => {
|
|
77
|
-
const id = React.useId();
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<FormItemContext.Provider value={{ id }}>
|
|
81
|
-
<div ref={ref} className={cn("space-y-2", className)} {...props} />
|
|
82
|
-
</FormItemContext.Provider>
|
|
83
|
-
);
|
|
84
|
-
});
|
|
85
|
-
FormItem.displayName = "FormItem";
|
|
86
|
-
|
|
87
|
-
const FormLabel = React.forwardRef<
|
|
88
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
89
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
|
|
90
|
-
>(({ className, ...props }, ref) => {
|
|
91
|
-
const { error, formItemId } = useFormField();
|
|
92
|
-
|
|
93
|
-
return (
|
|
94
|
-
<Label
|
|
95
|
-
ref={ref}
|
|
96
|
-
className={cn(error && "text-destructive", className)}
|
|
97
|
-
htmlFor={formItemId}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
);
|
|
101
|
-
});
|
|
102
|
-
FormLabel.displayName = "FormLabel";
|
|
103
|
-
|
|
104
|
-
const FormControl = React.forwardRef<
|
|
105
|
-
React.ElementRef<typeof Slot>,
|
|
106
|
-
React.ComponentPropsWithoutRef<typeof Slot>
|
|
107
|
-
>(({ ...props }, ref) => {
|
|
108
|
-
const { error, formItemId, formDescriptionId, formMessageId } =
|
|
109
|
-
useFormField();
|
|
110
|
-
|
|
111
|
-
return (
|
|
112
|
-
<Slot
|
|
113
|
-
ref={ref}
|
|
114
|
-
id={formItemId}
|
|
115
|
-
aria-describedby={
|
|
116
|
-
!error
|
|
117
|
-
? `${formDescriptionId}`
|
|
118
|
-
: `${formDescriptionId} ${formMessageId}`
|
|
119
|
-
}
|
|
120
|
-
aria-invalid={!!error}
|
|
121
|
-
{...props}
|
|
122
|
-
/>
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
FormControl.displayName = "FormControl";
|
|
126
|
-
|
|
127
|
-
const FormDescription = React.forwardRef<
|
|
128
|
-
HTMLParagraphElement,
|
|
129
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
130
|
-
>(({ className, ...props }, ref) => {
|
|
131
|
-
const { formDescriptionId } = useFormField();
|
|
132
|
-
|
|
133
|
-
return (
|
|
134
|
-
<p
|
|
135
|
-
ref={ref}
|
|
136
|
-
id={formDescriptionId}
|
|
137
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
138
|
-
{...props}
|
|
139
|
-
/>
|
|
140
|
-
);
|
|
141
|
-
});
|
|
142
|
-
FormDescription.displayName = "FormDescription";
|
|
143
|
-
|
|
144
|
-
const FormMessage = React.forwardRef<
|
|
145
|
-
HTMLParagraphElement,
|
|
146
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
147
|
-
>(({ className, children, ...props }, ref) => {
|
|
148
|
-
const { error, formMessageId } = useFormField();
|
|
149
|
-
const body = error ? String(error?.message) : children;
|
|
150
|
-
|
|
151
|
-
if (!body) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return (
|
|
156
|
-
<p
|
|
157
|
-
ref={ref}
|
|
158
|
-
id={formMessageId}
|
|
159
|
-
className={cn("text-sm font-medium text-destructive", className)}
|
|
160
|
-
{...props}
|
|
161
|
-
>
|
|
162
|
-
{body}
|
|
163
|
-
</p>
|
|
164
|
-
);
|
|
165
|
-
});
|
|
166
|
-
FormMessage.displayName = "FormMessage";
|
|
167
|
-
|
|
168
|
-
export {
|
|
169
|
-
useFormField,
|
|
170
|
-
Form,
|
|
171
|
-
FormItem,
|
|
172
|
-
FormLabel,
|
|
173
|
-
FormControl,
|
|
174
|
-
FormDescription,
|
|
175
|
-
FormMessage,
|
|
176
|
-
FormField,
|
|
177
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
|
|
6
|
-
const HoverCard = HoverCardPrimitive.Root;
|
|
7
|
-
|
|
8
|
-
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
9
|
-
|
|
10
|
-
const HoverCardContent = React.forwardRef<
|
|
11
|
-
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
13
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
14
|
-
<HoverCardPrimitive.Content
|
|
15
|
-
ref={ref}
|
|
16
|
-
align={align}
|
|
17
|
-
sideOffset={sideOffset}
|
|
18
|
-
className={cn(
|
|
19
|
-
"z-[250] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
));
|
|
25
|
-
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
26
|
-
|
|
27
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { IconPoint } from "@tabler/icons-react";
|
|
2
|
-
import { OTPInput, OTPInputContext } from "input-otp";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const InputOTP = React.forwardRef<
|
|
8
|
-
React.ElementRef<typeof OTPInput>,
|
|
9
|
-
React.ComponentPropsWithoutRef<typeof OTPInput>
|
|
10
|
-
>(({ className, containerClassName, ...props }, ref) => (
|
|
11
|
-
<OTPInput
|
|
12
|
-
ref={ref}
|
|
13
|
-
containerClassName={cn(
|
|
14
|
-
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
15
|
-
containerClassName,
|
|
16
|
-
)}
|
|
17
|
-
className={cn("disabled:cursor-not-allowed", className)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
));
|
|
21
|
-
InputOTP.displayName = "InputOTP";
|
|
22
|
-
|
|
23
|
-
const InputOTPGroup = React.forwardRef<
|
|
24
|
-
React.ElementRef<"div">,
|
|
25
|
-
React.ComponentPropsWithoutRef<"div">
|
|
26
|
-
>(({ className, ...props }, ref) => (
|
|
27
|
-
<div ref={ref} className={cn("flex items-center", className)} {...props} />
|
|
28
|
-
));
|
|
29
|
-
InputOTPGroup.displayName = "InputOTPGroup";
|
|
30
|
-
|
|
31
|
-
const InputOTPSlot = React.forwardRef<
|
|
32
|
-
React.ElementRef<"div">,
|
|
33
|
-
React.ComponentPropsWithoutRef<"div"> & { index: number }
|
|
34
|
-
>(({ index, className, ...props }, ref) => {
|
|
35
|
-
const inputOTPContext = React.useContext(OTPInputContext);
|
|
36
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<div
|
|
40
|
-
ref={ref}
|
|
41
|
-
className={cn(
|
|
42
|
-
"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
43
|
-
isActive && "z-10 ring-2 ring-ring ring-offset-background",
|
|
44
|
-
className,
|
|
45
|
-
)}
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
{char}
|
|
49
|
-
{hasFakeCaret && (
|
|
50
|
-
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
51
|
-
<div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
|
|
52
|
-
</div>
|
|
53
|
-
)}
|
|
54
|
-
</div>
|
|
55
|
-
);
|
|
56
|
-
});
|
|
57
|
-
InputOTPSlot.displayName = "InputOTPSlot";
|
|
58
|
-
|
|
59
|
-
const InputOTPSeparator = React.forwardRef<
|
|
60
|
-
React.ElementRef<"div">,
|
|
61
|
-
React.ComponentPropsWithoutRef<"div">
|
|
62
|
-
>(({ ...props }, ref) => (
|
|
63
|
-
<div ref={ref} role="separator" {...props}>
|
|
64
|
-
<IconPoint />
|
|
65
|
-
</div>
|
|
66
|
-
));
|
|
67
|
-
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
68
|
-
|
|
69
|
-
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
2
|
-
import { IconCheck, IconChevronRight, IconCircle } from "@tabler/icons-react";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
function MenubarMenu({
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {
|
|
10
|
-
return <MenubarPrimitive.Menu {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function MenubarGroup({
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Group>) {
|
|
16
|
-
return <MenubarPrimitive.Group {...props} />;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function MenubarPortal({
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
|
|
22
|
-
return <MenubarPrimitive.Portal {...props} />;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function MenubarRadioGroup({
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {
|
|
28
|
-
return <MenubarPrimitive.RadioGroup {...props} />;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function MenubarSub({
|
|
32
|
-
...props
|
|
33
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {
|
|
34
|
-
return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props} />;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const Menubar = React.forwardRef<
|
|
38
|
-
React.ElementRef<typeof MenubarPrimitive.Root>,
|
|
39
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
|
|
40
|
-
>(({ className, ...props }, ref) => (
|
|
41
|
-
<MenubarPrimitive.Root
|
|
42
|
-
ref={ref}
|
|
43
|
-
className={cn(
|
|
44
|
-
"flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
|
|
45
|
-
className,
|
|
46
|
-
)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
));
|
|
50
|
-
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
51
|
-
|
|
52
|
-
const MenubarTrigger = React.forwardRef<
|
|
53
|
-
React.ElementRef<typeof MenubarPrimitive.Trigger>,
|
|
54
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
|
|
55
|
-
>(({ className, ...props }, ref) => (
|
|
56
|
-
<MenubarPrimitive.Trigger
|
|
57
|
-
ref={ref}
|
|
58
|
-
className={cn(
|
|
59
|
-
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
60
|
-
className,
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
));
|
|
65
|
-
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
66
|
-
|
|
67
|
-
const MenubarSubTrigger = React.forwardRef<
|
|
68
|
-
React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
|
|
69
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
|
|
70
|
-
inset?: boolean;
|
|
71
|
-
}
|
|
72
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
73
|
-
<MenubarPrimitive.SubTrigger
|
|
74
|
-
ref={ref}
|
|
75
|
-
className={cn(
|
|
76
|
-
"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",
|
|
77
|
-
inset && "ps-8",
|
|
78
|
-
className,
|
|
79
|
-
)}
|
|
80
|
-
{...props}
|
|
81
|
-
>
|
|
82
|
-
{children}
|
|
83
|
-
<IconChevronRight className="ms-auto h-4 w-4 rtl:-scale-x-100" />
|
|
84
|
-
</MenubarPrimitive.SubTrigger>
|
|
85
|
-
));
|
|
86
|
-
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
87
|
-
|
|
88
|
-
const MenubarSubContent = React.forwardRef<
|
|
89
|
-
React.ElementRef<typeof MenubarPrimitive.SubContent>,
|
|
90
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
|
|
91
|
-
>(({ className, ...props }, ref) => (
|
|
92
|
-
<MenubarPrimitive.SubContent
|
|
93
|
-
ref={ref}
|
|
94
|
-
className={cn(
|
|
95
|
-
"z-[250] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]",
|
|
96
|
-
className,
|
|
97
|
-
)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
));
|
|
101
|
-
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
102
|
-
|
|
103
|
-
const MenubarContent = React.forwardRef<
|
|
104
|
-
React.ElementRef<typeof MenubarPrimitive.Content>,
|
|
105
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
|
|
106
|
-
>(
|
|
107
|
-
(
|
|
108
|
-
{ className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
|
|
109
|
-
ref,
|
|
110
|
-
) => (
|
|
111
|
-
<MenubarPrimitive.Portal>
|
|
112
|
-
<MenubarPrimitive.Content
|
|
113
|
-
ref={ref}
|
|
114
|
-
align={align}
|
|
115
|
-
alignOffset={alignOffset}
|
|
116
|
-
sideOffset={sideOffset}
|
|
117
|
-
className={cn(
|
|
118
|
-
"z-[250] min-w-[12rem] 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 origin-[--radix-menubar-content-transform-origin]",
|
|
119
|
-
className,
|
|
120
|
-
)}
|
|
121
|
-
{...props}
|
|
122
|
-
/>
|
|
123
|
-
</MenubarPrimitive.Portal>
|
|
124
|
-
),
|
|
125
|
-
);
|
|
126
|
-
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
127
|
-
|
|
128
|
-
const MenubarItem = React.forwardRef<
|
|
129
|
-
React.ElementRef<typeof MenubarPrimitive.Item>,
|
|
130
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
|
|
131
|
-
inset?: boolean;
|
|
132
|
-
}
|
|
133
|
-
>(({ className, inset, ...props }, ref) => (
|
|
134
|
-
<MenubarPrimitive.Item
|
|
135
|
-
ref={ref}
|
|
136
|
-
className={cn(
|
|
137
|
-
"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",
|
|
138
|
-
inset && "ps-8",
|
|
139
|
-
className,
|
|
140
|
-
)}
|
|
141
|
-
{...props}
|
|
142
|
-
/>
|
|
143
|
-
));
|
|
144
|
-
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
145
|
-
|
|
146
|
-
const MenubarCheckboxItem = React.forwardRef<
|
|
147
|
-
React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
|
|
148
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
|
|
149
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
150
|
-
<MenubarPrimitive.CheckboxItem
|
|
151
|
-
ref={ref}
|
|
152
|
-
className={cn(
|
|
153
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
154
|
-
className,
|
|
155
|
-
)}
|
|
156
|
-
checked={checked}
|
|
157
|
-
{...props}
|
|
158
|
-
>
|
|
159
|
-
<span className="absolute start-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
160
|
-
<MenubarPrimitive.ItemIndicator>
|
|
161
|
-
<IconCheck className="h-4 w-4" />
|
|
162
|
-
</MenubarPrimitive.ItemIndicator>
|
|
163
|
-
</span>
|
|
164
|
-
{children}
|
|
165
|
-
</MenubarPrimitive.CheckboxItem>
|
|
166
|
-
));
|
|
167
|
-
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
168
|
-
|
|
169
|
-
const MenubarRadioItem = React.forwardRef<
|
|
170
|
-
React.ElementRef<typeof MenubarPrimitive.RadioItem>,
|
|
171
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
|
|
172
|
-
>(({ className, children, ...props }, ref) => (
|
|
173
|
-
<MenubarPrimitive.RadioItem
|
|
174
|
-
ref={ref}
|
|
175
|
-
className={cn(
|
|
176
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
177
|
-
className,
|
|
178
|
-
)}
|
|
179
|
-
{...props}
|
|
180
|
-
>
|
|
181
|
-
<span className="absolute start-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
182
|
-
<MenubarPrimitive.ItemIndicator>
|
|
183
|
-
<IconCircle className="h-2 w-2 fill-current" />
|
|
184
|
-
</MenubarPrimitive.ItemIndicator>
|
|
185
|
-
</span>
|
|
186
|
-
{children}
|
|
187
|
-
</MenubarPrimitive.RadioItem>
|
|
188
|
-
));
|
|
189
|
-
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
190
|
-
|
|
191
|
-
const MenubarLabel = React.forwardRef<
|
|
192
|
-
React.ElementRef<typeof MenubarPrimitive.Label>,
|
|
193
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
|
|
194
|
-
inset?: boolean;
|
|
195
|
-
}
|
|
196
|
-
>(({ className, inset, ...props }, ref) => (
|
|
197
|
-
<MenubarPrimitive.Label
|
|
198
|
-
ref={ref}
|
|
199
|
-
className={cn(
|
|
200
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
201
|
-
inset && "ps-8",
|
|
202
|
-
className,
|
|
203
|
-
)}
|
|
204
|
-
{...props}
|
|
205
|
-
/>
|
|
206
|
-
));
|
|
207
|
-
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
208
|
-
|
|
209
|
-
const MenubarSeparator = React.forwardRef<
|
|
210
|
-
React.ElementRef<typeof MenubarPrimitive.Separator>,
|
|
211
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
|
|
212
|
-
>(({ className, ...props }, ref) => (
|
|
213
|
-
<MenubarPrimitive.Separator
|
|
214
|
-
ref={ref}
|
|
215
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
216
|
-
{...props}
|
|
217
|
-
/>
|
|
218
|
-
));
|
|
219
|
-
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
220
|
-
|
|
221
|
-
const MenubarShortcut = ({
|
|
222
|
-
className,
|
|
223
|
-
...props
|
|
224
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
225
|
-
return (
|
|
226
|
-
<span
|
|
227
|
-
className={cn(
|
|
228
|
-
"ms-auto text-xs tracking-widest text-muted-foreground",
|
|
229
|
-
className,
|
|
230
|
-
)}
|
|
231
|
-
{...props}
|
|
232
|
-
/>
|
|
233
|
-
);
|
|
234
|
-
};
|
|
235
|
-
MenubarShortcut.displayname = "MenubarShortcut";
|
|
236
|
-
|
|
237
|
-
export {
|
|
238
|
-
Menubar,
|
|
239
|
-
MenubarMenu,
|
|
240
|
-
MenubarTrigger,
|
|
241
|
-
MenubarContent,
|
|
242
|
-
MenubarItem,
|
|
243
|
-
MenubarSeparator,
|
|
244
|
-
MenubarLabel,
|
|
245
|
-
MenubarCheckboxItem,
|
|
246
|
-
MenubarRadioGroup,
|
|
247
|
-
MenubarRadioItem,
|
|
248
|
-
MenubarPortal,
|
|
249
|
-
MenubarSubContent,
|
|
250
|
-
MenubarSubTrigger,
|
|
251
|
-
MenubarGroup,
|
|
252
|
-
MenubarSub,
|
|
253
|
-
MenubarShortcut,
|
|
254
|
-
};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
2
|
-
import { IconChevronDown } from "@tabler/icons-react";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
const NavigationMenu = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
|
|
11
|
-
>(({ className, children, ...props }, ref) => (
|
|
12
|
-
<NavigationMenuPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
<NavigationMenuViewport />
|
|
22
|
-
</NavigationMenuPrimitive.Root>
|
|
23
|
-
));
|
|
24
|
-
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
25
|
-
|
|
26
|
-
const NavigationMenuList = React.forwardRef<
|
|
27
|
-
React.ElementRef<typeof NavigationMenuPrimitive.List>,
|
|
28
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
|
|
29
|
-
>(({ className, ...props }, ref) => (
|
|
30
|
-
<NavigationMenuPrimitive.List
|
|
31
|
-
ref={ref}
|
|
32
|
-
className={cn(
|
|
33
|
-
"group flex flex-1 list-none items-center justify-center space-x-1",
|
|
34
|
-
className,
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
));
|
|
39
|
-
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
40
|
-
|
|
41
|
-
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
42
|
-
|
|
43
|
-
const navigationMenuTriggerStyle = cva(
|
|
44
|
-
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent",
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const NavigationMenuTrigger = React.forwardRef<
|
|
48
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
|
|
49
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
|
|
50
|
-
>(({ className, children, ...props }, ref) => (
|
|
51
|
-
<NavigationMenuPrimitive.Trigger
|
|
52
|
-
ref={ref}
|
|
53
|
-
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
>
|
|
56
|
-
{children}{" "}
|
|
57
|
-
<IconChevronDown
|
|
58
|
-
className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
|
|
59
|
-
aria-hidden="true"
|
|
60
|
-
/>
|
|
61
|
-
</NavigationMenuPrimitive.Trigger>
|
|
62
|
-
));
|
|
63
|
-
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
64
|
-
|
|
65
|
-
const NavigationMenuContent = React.forwardRef<
|
|
66
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Content>,
|
|
67
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
|
|
68
|
-
>(({ className, ...props }, ref) => (
|
|
69
|
-
<NavigationMenuPrimitive.Content
|
|
70
|
-
ref={ref}
|
|
71
|
-
className={cn(
|
|
72
|
-
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
73
|
-
className,
|
|
74
|
-
)}
|
|
75
|
-
{...props}
|
|
76
|
-
/>
|
|
77
|
-
));
|
|
78
|
-
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
79
|
-
|
|
80
|
-
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
81
|
-
|
|
82
|
-
const NavigationMenuViewport = React.forwardRef<
|
|
83
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
|
|
84
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
|
|
85
|
-
>(({ className, ...props }, ref) => (
|
|
86
|
-
<div className={cn("absolute left-0 top-full flex justify-center")}>
|
|
87
|
-
<NavigationMenuPrimitive.Viewport
|
|
88
|
-
className={cn(
|
|
89
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
90
|
-
className,
|
|
91
|
-
)}
|
|
92
|
-
ref={ref}
|
|
93
|
-
{...props}
|
|
94
|
-
/>
|
|
95
|
-
</div>
|
|
96
|
-
));
|
|
97
|
-
NavigationMenuViewport.displayName =
|
|
98
|
-
NavigationMenuPrimitive.Viewport.displayName;
|
|
99
|
-
|
|
100
|
-
const NavigationMenuIndicator = React.forwardRef<
|
|
101
|
-
React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
|
|
102
|
-
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
|
|
103
|
-
>(({ className, ...props }, ref) => (
|
|
104
|
-
<NavigationMenuPrimitive.Indicator
|
|
105
|
-
ref={ref}
|
|
106
|
-
className={cn(
|
|
107
|
-
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
108
|
-
className,
|
|
109
|
-
)}
|
|
110
|
-
{...props}
|
|
111
|
-
>
|
|
112
|
-
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
|
|
113
|
-
</NavigationMenuPrimitive.Indicator>
|
|
114
|
-
));
|
|
115
|
-
NavigationMenuIndicator.displayName =
|
|
116
|
-
NavigationMenuPrimitive.Indicator.displayName;
|
|
117
|
-
|
|
118
|
-
export {
|
|
119
|
-
navigationMenuTriggerStyle,
|
|
120
|
-
NavigationMenu,
|
|
121
|
-
NavigationMenuList,
|
|
122
|
-
NavigationMenuItem,
|
|
123
|
-
NavigationMenuContent,
|
|
124
|
-
NavigationMenuTrigger,
|
|
125
|
-
NavigationMenuLink,
|
|
126
|
-
NavigationMenuIndicator,
|
|
127
|
-
NavigationMenuViewport,
|
|
128
|
-
};
|