@vercel/geistdocs 1.3.0-canary.88e35b7 → 1.3.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/dist/assets/icons/icon-arrow-up-right-small.d.ts +8 -0
- package/dist/assets/icons/icon-arrow-up-right-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right-small.js +4 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts +5 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right.js +4 -0
- package/dist/assets/icons/icon-check.d.ts +5 -0
- package/dist/assets/icons/icon-check.d.ts.map +1 -0
- package/dist/assets/icons/icon-check.js +4 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts +8 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-down-small.js +7 -0
- package/dist/assets/icons/icon-chevron-right.d.ts +5 -0
- package/dist/assets/icons/icon-chevron-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-right.js +4 -0
- package/dist/assets/icons/icon-copy.d.ts +5 -0
- package/dist/assets/icons/icon-copy.d.ts.map +1 -0
- package/dist/assets/icons/icon-copy.js +4 -0
- package/dist/assets/icons/icon-file-text.d.ts +5 -0
- package/dist/assets/icons/icon-file-text.d.ts.map +1 -0
- package/dist/assets/icons/icon-file-text.js +4 -0
- package/dist/assets/icons/icon-menu-alt.d.ts +5 -0
- package/dist/assets/icons/icon-menu-alt.d.ts.map +1 -0
- package/dist/assets/icons/icon-menu-alt.js +4 -0
- package/dist/assets/icons/icon-slash-forward.d.ts +8 -0
- package/dist/assets/icons/icon-slash-forward.d.ts.map +1 -0
- package/dist/assets/icons/icon-slash-forward.js +4 -0
- package/dist/assets/icons/index.d.ts +10 -0
- package/dist/assets/icons/index.d.ts.map +1 -0
- package/{template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx → dist/assets/icons/index.js} +0 -1
- package/dist/assets/logos/index.d.ts +15 -0
- package/dist/assets/logos/index.d.ts.map +1 -0
- package/{template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx → dist/assets/logos/index.js} +2 -1
- package/dist/assets/logos/logo-ai-elements.d.ts +8 -0
- package/dist/assets/logos/logo-ai-elements.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-elements.js +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-sdk.js +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-chat-sdk.js +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-flags-sdk.js +8 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts +9 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts.map +1 -0
- package/dist/assets/logos/logo-icon-vercel.js +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts.map +1 -0
- package/dist/assets/logos/logo-nextjs.js +7 -0
- package/dist/assets/logos/logo-streamdown.d.ts +8 -0
- package/dist/assets/logos/logo-streamdown.d.ts.map +1 -0
- package/dist/assets/logos/logo-streamdown.js +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
- package/dist/assets/logos/logo-svelte-kit.js +7 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts +8 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts.map +1 -0
- package/dist/assets/logos/logo-vercel-oss.js +7 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-workflow-sdk.js +8 -0
- package/dist/cli/index.js +2 -5
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +2 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +2 -0
- package/dist/components/card.d.ts +2 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +2 -0
- package/dist/components/code-block-tabs.js +3 -3
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +7 -3
- package/dist/components/collapsible.d.ts +2 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +3 -0
- package/dist/components/copy-prompt.d.ts +11 -0
- package/dist/components/copy-prompt.d.ts.map +1 -0
- package/dist/components/copy-prompt.js +58 -0
- package/dist/components/dialog.d.ts +13 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/drawer.d.ts +2 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +3 -0
- package/dist/components/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +3 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +3 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +2 -0
- package/dist/components/kbd.d.ts +2 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +2 -0
- package/dist/components/navigation-menu.d.ts +2 -0
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +3 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +3 -0
- package/dist/components/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +3 -0
- package/dist/components/separator.d.ts +2 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +3 -0
- package/dist/components/sheet.d.ts +2 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +3 -0
- package/dist/components/sonner.d.ts +2 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +3 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +2 -0
- package/dist/components/textarea.d.ts +2 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +3 -0
- package/dist/config.d.ts +66 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/footer.d.ts +8 -0
- package/dist/footer.d.ts.map +1 -0
- package/dist/footer.js +6 -0
- package/dist/home-layout.d.ts +11 -0
- package/dist/home-layout.d.ts.map +1 -0
- package/dist/home-layout.js +31 -0
- package/dist/internal/chat/conversation.js +1 -1
- package/dist/internal/chat/message.js +1 -1
- package/dist/internal/chat/prompt-input.js +1 -1
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +6 -5
- package/dist/internal/chat/sources.js +1 -1
- package/dist/internal/config-context.d.ts +10 -0
- package/dist/internal/config-context.d.ts.map +1 -0
- package/dist/internal/config-context.js +15 -0
- package/dist/internal/footer/github-button.d.ts +7 -0
- package/dist/internal/footer/github-button.d.ts.map +1 -0
- package/dist/internal/footer/github-button.js +10 -0
- package/dist/internal/footer/rss-button.d.ts +2 -0
- package/dist/internal/footer/rss-button.d.ts.map +1 -0
- package/dist/internal/footer/rss-button.js +4 -0
- package/dist/internal/localized-link.d.ts +8 -0
- package/dist/internal/localized-link.d.ts.map +1 -0
- package/dist/internal/localized-link.js +13 -0
- package/dist/internal/navbar/desktop-menu.d.ts +10 -0
- package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
- package/dist/internal/navbar/desktop-menu.js +11 -0
- package/dist/internal/navbar/mobile-menu.d.ts +7 -0
- package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
- package/dist/internal/navbar/mobile-menu.js +44 -0
- package/dist/internal/navbar/navbar-logo.d.ts +16 -0
- package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
- package/dist/internal/navbar/navbar-logo.js +30 -0
- package/dist/internal/page-actions-client.d.ts +1 -2
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +28 -11
- package/dist/internal/page-visibility.d.ts +18 -0
- package/dist/internal/page-visibility.d.ts.map +1 -0
- package/dist/internal/page-visibility.js +24 -0
- package/dist/internal/provider-client.d.ts +9 -0
- package/dist/internal/provider-client.d.ts.map +1 -0
- package/dist/internal/provider-client.js +24 -0
- package/dist/internal/sidebar.d.ts +4 -1
- package/dist/internal/sidebar.d.ts.map +1 -1
- package/dist/internal/sidebar.js +8 -7
- package/dist/internal/table-of-contents.d.ts +9 -0
- package/dist/internal/table-of-contents.d.ts.map +1 -0
- package/dist/internal/table-of-contents.js +5 -0
- package/dist/internal/ui/button-group.js +2 -2
- package/dist/internal/ui/button.d.ts +1 -1
- package/dist/internal/ui/button.d.ts.map +1 -1
- package/dist/internal/ui/button.js +7 -7
- package/dist/internal/ui/card.js +1 -1
- package/dist/internal/ui/drawer.js +1 -1
- package/dist/internal/ui/dropdown-menu.js +7 -7
- package/dist/internal/ui/input-group.js +2 -2
- package/dist/internal/ui/input.js +1 -1
- package/dist/internal/ui/kbd.js +1 -1
- package/dist/internal/ui/navigation-menu.d.ts +17 -0
- package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
- package/dist/internal/ui/navigation-menu.js +38 -0
- package/dist/internal/ui/popover.js +1 -1
- package/dist/internal/ui/scroll-area.js +2 -2
- package/dist/internal/ui/separator.js +1 -1
- package/dist/internal/ui/sheet.js +4 -4
- package/dist/internal/ui/sonner.js +3 -3
- package/dist/internal/ui/textarea.js +1 -1
- package/dist/internal/ui/tooltip.js +1 -1
- package/dist/layout.d.ts +4 -8
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +26 -44
- package/dist/mdx.d.ts +55 -24
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +9 -46
- package/dist/mobile-docs-bar.d.ts +7 -0
- package/dist/mobile-docs-bar.d.ts.map +1 -0
- package/dist/mobile-docs-bar.js +13 -0
- package/dist/navbar.d.ts +7 -0
- package/dist/navbar.d.ts.map +1 -0
- package/dist/navbar.js +10 -0
- package/dist/pages/docs.d.ts +33 -5
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +57 -22
- package/dist/proxy.d.ts +24 -8
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +116 -36
- package/dist/routes/agents.d.ts +21 -0
- package/dist/routes/agents.d.ts.map +1 -0
- package/dist/routes/agents.js +201 -0
- package/dist/routes/chat.d.ts +11 -5
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +386 -65
- package/dist/routes/llms.d.ts +29 -10
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +80 -9
- package/dist/routes/search.d.ts +8 -5
- package/dist/routes/search.d.ts.map +1 -1
- package/dist/routes/search.js +52 -4
- package/dist/routes/sitemap.d.ts +15 -3
- package/dist/routes/sitemap.d.ts.map +1 -1
- package/dist/routes/sitemap.js +32 -6
- package/dist/shiki-theme.d.ts +20 -0
- package/dist/shiki-theme.d.ts.map +1 -0
- package/dist/shiki-theme.js +110 -0
- package/dist/sidebar.d.ts +11 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +16 -0
- package/dist/source-config.d.ts +68 -0
- package/dist/source-config.d.ts.map +1 -0
- package/dist/source-config.js +161 -0
- package/dist/source.d.ts +155 -4
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +73 -3
- package/dist/versions.d.ts +45 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +79 -0
- package/package.json +142 -9
- package/source-config.js +174 -0
- package/styles.css +465 -102
- package/template/AGENTS.md +95 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
- package/template/app/[lang]/(home)/components/hero.tsx +2 -2
- package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
- package/template/app/[lang]/(home)/components/templates.tsx +3 -5
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
- package/template/app/[lang]/(home)/layout.tsx +4 -3
- package/template/app/[lang]/(home)/page.tsx +2 -2
- package/template/app/[lang]/agents.md/route.ts +6 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +4 -1
- package/template/app/[lang]/layout.tsx +6 -6
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
- package/template/app/[lang]/llms.txt/route.ts +1 -1
- package/template/app/[lang]/sitemap.md/route.ts +2 -2
- package/template/app/api/chat/route.ts +12 -1
- package/template/app/api/search/route.ts +2 -2
- package/template/app/styles/geistdocs.css +151 -109
- package/template/components/ui/badge.tsx +5 -5
- package/template/components/ui/button.tsx +7 -7
- package/template/components/ui/command-prompt.tsx +2 -2
- package/template/content/docs/agent-readiness.mdx +103 -0
- package/template/content/docs/ask-ai.mdx +61 -5
- package/template/content/docs/configuration.cn.mdx +47 -7
- package/template/content/docs/configuration.mdx +226 -66
- package/template/content/docs/deployment.mdx +17 -0
- package/template/content/docs/edit-on-github.mdx +6 -2
- package/template/content/docs/env.mdx +38 -3
- package/template/content/docs/feedback.mdx +6 -2
- package/template/content/docs/getting-started.cn.mdx +2 -2
- package/template/content/docs/getting-started.mdx +71 -43
- package/template/content/docs/index.cn.mdx +36 -33
- package/template/content/docs/index.mdx +69 -59
- package/template/content/docs/internationalization.cn.mdx +7 -9
- package/template/content/docs/internationalization.mdx +10 -5
- package/template/content/docs/llms-txt.cn.mdx +24 -2
- package/template/content/docs/llms-txt.mdx +48 -12
- package/template/content/docs/md.cn.mdx +12 -15
- package/template/content/docs/md.mdx +30 -16
- package/template/content/docs/meta.json +6 -2
- package/template/content/docs/migration.mdx +364 -0
- package/template/content/docs/open-in-chat.mdx +12 -10
- package/template/content/docs/provider.cn.mdx +6 -5
- package/template/content/docs/provider.mdx +13 -8
- package/template/content/docs/proxy.cn.mdx +96 -0
- package/template/content/docs/proxy.mdx +178 -0
- package/template/content/docs/rss.mdx +6 -2
- package/template/content/docs/syntax.cn.mdx +2 -2
- package/template/content/docs/syntax.mdx +6 -2
- package/template/content/docs/theme-aware-image.mdx +5 -1
- package/template/content/docs/versioned-docs.cn.mdx +117 -0
- package/template/content/docs/versioned-docs.mdx +228 -0
- package/template/geistdocs.tsx +26 -0
- package/template/lib/geistdocs/config.tsx +3 -0
- package/template/package.json +5 -5
- package/template/proxy.ts +2 -1
- package/template/source.config.ts +8 -47
- package/template/app/actions/feedback/emotions.ts +0 -18
- package/template/app/actions/feedback/index.ts +0 -45
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
- package/template/components/geistdocs/callout.tsx +0 -40
- package/template/components/geistdocs/chat.tsx +0 -24
- package/template/components/geistdocs/code-block-tabs.tsx +0 -61
- package/template/components/geistdocs/code-block.tsx +0 -134
- package/template/components/geistdocs/copy-page.tsx +0 -27
- package/template/components/geistdocs/desktop-menu.tsx +0 -52
- package/template/components/geistdocs/docs-page.tsx +0 -35
- package/template/components/geistdocs/edit-source.tsx +0 -30
- package/template/components/geistdocs/feedback.tsx +0 -139
- package/template/components/geistdocs/footer.tsx +0 -30
- package/template/components/geistdocs/github-button.tsx +0 -19
- package/template/components/geistdocs/home-layout.tsx +0 -46
- package/template/components/geistdocs/icons.tsx +0 -13
- package/template/components/geistdocs/installer.tsx +0 -58
- package/template/components/geistdocs/language-selector.tsx +0 -3
- package/template/components/geistdocs/mermaid.tsx +0 -68
- package/template/components/geistdocs/mobile-docs-bar.tsx +0 -81
- package/template/components/geistdocs/mobile-menu.tsx +0 -150
- package/template/components/geistdocs/navbar-logo.tsx +0 -124
- package/template/components/geistdocs/navbar.tsx +0 -22
- package/template/components/geistdocs/rss-button.tsx +0 -10
- package/template/components/geistdocs/scroll-top.tsx +0 -21
- package/template/components/geistdocs/search.tsx +0 -17
- package/template/components/geistdocs/sidebar.tsx +0 -128
- package/template/components/geistdocs/theme-aware-image.tsx +0 -22
- package/template/components/geistdocs/theme-toggle.tsx +0 -3
- package/template/components/geistdocs/video.tsx +0 -16
- package/template/components/ui/button-group.tsx +0 -83
- package/template/components/ui/card.tsx +0 -92
- package/template/components/ui/collapsible.tsx +0 -33
- package/template/components/ui/command.tsx +0 -184
- package/template/components/ui/dialog.tsx +0 -143
- package/template/components/ui/drawer.tsx +0 -135
- package/template/components/ui/dropdown-menu.tsx +0 -257
- package/template/components/ui/hover-card.tsx +0 -44
- package/template/components/ui/input-group.tsx +0 -170
- package/template/components/ui/input.tsx +0 -21
- package/template/components/ui/kbd.tsx +0 -28
- package/template/components/ui/navigation-menu.tsx +0 -192
- package/template/components/ui/popover.tsx +0 -48
- package/template/components/ui/scroll-area.tsx +0 -58
- package/template/components/ui/select.tsx +0 -187
- package/template/components/ui/separator.tsx +0 -28
- package/template/components/ui/sheet.tsx +0 -139
- package/template/components/ui/sonner.tsx +0 -40
- package/template/components/ui/spinner.tsx +0 -16
- package/template/components/ui/textarea.tsx +0 -18
- package/template/components/ui/tooltip.tsx +0 -61
- package/template/hooks/geistdocs/use-sidebar.ts +0 -13
- package/template/hooks/use-mobile.ts +0 -19
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui"
|
|
3
|
-
import { cva } from "class-variance-authority"
|
|
4
|
-
import { IconChevronDownSmall } from "@/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
function isTouchDevice() {
|
|
9
|
-
return "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function isKeyboardClick(event: React.MouseEvent) {
|
|
13
|
-
return event.detail === 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function NavigationMenu({
|
|
17
|
-
className,
|
|
18
|
-
children,
|
|
19
|
-
viewport = true,
|
|
20
|
-
viewportClassName,
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
23
|
-
viewport?: boolean
|
|
24
|
-
viewportClassName?: string
|
|
25
|
-
}) {
|
|
26
|
-
return (
|
|
27
|
-
<NavigationMenuPrimitive.Root
|
|
28
|
-
data-slot="navigation-menu"
|
|
29
|
-
data-viewport={viewport}
|
|
30
|
-
className={cn(
|
|
31
|
-
"group/navigation-menu relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
{viewport && <NavigationMenuViewport wrapperClassName={viewportClassName} />}
|
|
38
|
-
</NavigationMenuPrimitive.Root>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function NavigationMenuList({
|
|
43
|
-
className,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
|
|
46
|
-
return (
|
|
47
|
-
<NavigationMenuPrimitive.List
|
|
48
|
-
data-slot="navigation-menu-list"
|
|
49
|
-
className={cn(
|
|
50
|
-
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function NavigationMenuItem({
|
|
59
|
-
className,
|
|
60
|
-
...props
|
|
61
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
|
|
62
|
-
return (
|
|
63
|
-
<NavigationMenuPrimitive.Item
|
|
64
|
-
data-slot="navigation-menu-item"
|
|
65
|
-
className={cn("relative", className)}
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const navigationMenuTriggerStyle = cva(
|
|
72
|
-
"group inline-flex relative px-3 gap-1 w-max items-center justify-center text-sm transition-colors text-gray-900 hover:text-gray-1000 focus:text-gray-1000 focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:text-gray-1000 data-[state=open]:text-gray-1000"
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
function NavigationMenuTrigger({
|
|
76
|
-
className,
|
|
77
|
-
children,
|
|
78
|
-
onClick,
|
|
79
|
-
...props
|
|
80
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
|
|
81
|
-
return (
|
|
82
|
-
<NavigationMenuPrimitive.Trigger
|
|
83
|
-
data-slot="navigation-menu-trigger"
|
|
84
|
-
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
85
|
-
// Prevent the trigger from closing the menu when clicked on non-touch
|
|
86
|
-
// devices. Touch and keyboard users retain default toggle behavior.
|
|
87
|
-
onClick={(event) => {
|
|
88
|
-
if (!isTouchDevice() && !isKeyboardClick(event)) {
|
|
89
|
-
event.preventDefault();
|
|
90
|
-
}
|
|
91
|
-
onClick?.(event);
|
|
92
|
-
}}
|
|
93
|
-
{...props}
|
|
94
|
-
>
|
|
95
|
-
{children}
|
|
96
|
-
<IconChevronDownSmall
|
|
97
|
-
className="relative top-px size-3.5 text-gray-900 transition-all duration-200 ease group-hover:text-gray-1000 group-data-[state=open]:rotate-180"
|
|
98
|
-
aria-hidden="true"
|
|
99
|
-
/>
|
|
100
|
-
<div className="absolute -mx-12 inset-x-0 bottom-0 z-50 hidden h-[18px] group-data-[state=open]:flex" />
|
|
101
|
-
</NavigationMenuPrimitive.Trigger>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function NavigationMenuContent({
|
|
106
|
-
className,
|
|
107
|
-
...props
|
|
108
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
|
|
109
|
-
return (
|
|
110
|
-
<NavigationMenuPrimitive.Content
|
|
111
|
-
data-slot="navigation-menu-content"
|
|
112
|
-
className={cn(
|
|
113
|
-
"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 md:absolute md:w-auto",
|
|
114
|
-
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
115
|
-
className
|
|
116
|
-
)}
|
|
117
|
-
{...props}
|
|
118
|
-
/>
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function NavigationMenuViewport({
|
|
123
|
-
className,
|
|
124
|
-
wrapperClassName,
|
|
125
|
-
...props
|
|
126
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport> & {
|
|
127
|
-
wrapperClassName?: string
|
|
128
|
-
}) {
|
|
129
|
-
return (
|
|
130
|
-
<div
|
|
131
|
-
className={cn(
|
|
132
|
-
"absolute left-0 top-[70%] flex justify-center",
|
|
133
|
-
wrapperClassName
|
|
134
|
-
)}
|
|
135
|
-
>
|
|
136
|
-
<NavigationMenuPrimitive.Viewport
|
|
137
|
-
data-slot="navigation-menu-viewport"
|
|
138
|
-
className={cn(
|
|
139
|
-
"origin-top-center relative mt-3.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-lg bg-background-100 text-gray-950 [box-shadow:var(--ds-shadow-menu)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
140
|
-
className
|
|
141
|
-
)}
|
|
142
|
-
{...props}
|
|
143
|
-
/>
|
|
144
|
-
</div>
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function NavigationMenuLink({
|
|
149
|
-
className,
|
|
150
|
-
...props
|
|
151
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
|
|
152
|
-
return (
|
|
153
|
-
<NavigationMenuPrimitive.Link
|
|
154
|
-
data-slot="navigation-menu-link"
|
|
155
|
-
className={cn(
|
|
156
|
-
"block w-full text-sm outline-none transition-colors",
|
|
157
|
-
className
|
|
158
|
-
)}
|
|
159
|
-
{...props}
|
|
160
|
-
/>
|
|
161
|
-
)
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function NavigationMenuIndicator({
|
|
165
|
-
className,
|
|
166
|
-
...props
|
|
167
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
|
|
168
|
-
return (
|
|
169
|
-
<NavigationMenuPrimitive.Indicator
|
|
170
|
-
data-slot="navigation-menu-indicator"
|
|
171
|
-
className={cn(
|
|
172
|
-
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-[70%] z-[1] flex items-end justify-center overflow-hidden transition-all duration-200",
|
|
173
|
-
className
|
|
174
|
-
)}
|
|
175
|
-
{...props}
|
|
176
|
-
>
|
|
177
|
-
<div className="relative top-[6.5px] size-4 rotate-45 rounded-tl-sm border border-r-0 border-b-0 border-gray-200 bg-white" />
|
|
178
|
-
</NavigationMenuPrimitive.Indicator>
|
|
179
|
-
)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export {
|
|
183
|
-
NavigationMenu,
|
|
184
|
-
NavigationMenuList,
|
|
185
|
-
NavigationMenuItem,
|
|
186
|
-
NavigationMenuContent,
|
|
187
|
-
NavigationMenuTrigger,
|
|
188
|
-
NavigationMenuLink,
|
|
189
|
-
NavigationMenuIndicator,
|
|
190
|
-
NavigationMenuViewport,
|
|
191
|
-
navigationMenuTriggerStyle,
|
|
192
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Popover as PopoverPrimitive } from "radix-ui"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
function Popover({
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
11
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function PopoverTrigger({
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
17
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function PopoverContent({
|
|
21
|
-
className,
|
|
22
|
-
align = "center",
|
|
23
|
-
sideOffset = 4,
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
26
|
-
return (
|
|
27
|
-
<PopoverPrimitive.Portal>
|
|
28
|
-
<PopoverPrimitive.Content
|
|
29
|
-
data-slot="popover-content"
|
|
30
|
-
align={align}
|
|
31
|
-
sideOffset={sideOffset}
|
|
32
|
-
className={cn(
|
|
33
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
34
|
-
className
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
</PopoverPrimitive.Portal>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function PopoverAnchor({
|
|
43
|
-
...props
|
|
44
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
45
|
-
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
function ScrollArea({
|
|
9
|
-
className,
|
|
10
|
-
children,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
13
|
-
return (
|
|
14
|
-
<ScrollAreaPrimitive.Root
|
|
15
|
-
data-slot="scroll-area"
|
|
16
|
-
className={cn("relative", className)}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
<ScrollAreaPrimitive.Viewport
|
|
20
|
-
data-slot="scroll-area-viewport"
|
|
21
|
-
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</ScrollAreaPrimitive.Viewport>
|
|
25
|
-
<ScrollBar />
|
|
26
|
-
<ScrollAreaPrimitive.Corner />
|
|
27
|
-
</ScrollAreaPrimitive.Root>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function ScrollBar({
|
|
32
|
-
className,
|
|
33
|
-
orientation = "vertical",
|
|
34
|
-
...props
|
|
35
|
-
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
36
|
-
return (
|
|
37
|
-
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
38
|
-
data-slot="scroll-area-scrollbar"
|
|
39
|
-
orientation={orientation}
|
|
40
|
-
className={cn(
|
|
41
|
-
"flex touch-none p-px transition-colors select-none",
|
|
42
|
-
orientation === "vertical" &&
|
|
43
|
-
"h-full w-2.5 border-l border-l-transparent",
|
|
44
|
-
orientation === "horizontal" &&
|
|
45
|
-
"h-2.5 flex-col border-t border-t-transparent",
|
|
46
|
-
className
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
>
|
|
50
|
-
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
51
|
-
data-slot="scroll-area-thumb"
|
|
52
|
-
className="bg-border relative flex-1 rounded-full"
|
|
53
|
-
/>
|
|
54
|
-
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { ScrollArea, ScrollBar }
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Select as SelectPrimitive } from "radix-ui"
|
|
5
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
function Select({
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
12
|
-
return <SelectPrimitive.Root data-slot="select" {...props} />
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function SelectGroup({
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
18
|
-
return <SelectPrimitive.Group data-slot="select-group" {...props} />
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function SelectValue({
|
|
22
|
-
...props
|
|
23
|
-
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
24
|
-
return <SelectPrimitive.Value data-slot="select-value" {...props} />
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function SelectTrigger({
|
|
28
|
-
className,
|
|
29
|
-
size = "default",
|
|
30
|
-
children,
|
|
31
|
-
...props
|
|
32
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
33
|
-
size?: "sm" | "default"
|
|
34
|
-
}) {
|
|
35
|
-
return (
|
|
36
|
-
<SelectPrimitive.Trigger
|
|
37
|
-
data-slot="select-trigger"
|
|
38
|
-
data-size={size}
|
|
39
|
-
className={cn(
|
|
40
|
-
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
41
|
-
className
|
|
42
|
-
)}
|
|
43
|
-
{...props}
|
|
44
|
-
>
|
|
45
|
-
{children}
|
|
46
|
-
<SelectPrimitive.Icon asChild>
|
|
47
|
-
<ChevronDownIcon className="size-4 opacity-50" />
|
|
48
|
-
</SelectPrimitive.Icon>
|
|
49
|
-
</SelectPrimitive.Trigger>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function SelectContent({
|
|
54
|
-
className,
|
|
55
|
-
children,
|
|
56
|
-
position = "popper",
|
|
57
|
-
align = "center",
|
|
58
|
-
...props
|
|
59
|
-
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
60
|
-
return (
|
|
61
|
-
<SelectPrimitive.Portal>
|
|
62
|
-
<SelectPrimitive.Content
|
|
63
|
-
data-slot="select-content"
|
|
64
|
-
className={cn(
|
|
65
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
66
|
-
position === "popper" &&
|
|
67
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
68
|
-
className
|
|
69
|
-
)}
|
|
70
|
-
position={position}
|
|
71
|
-
align={align}
|
|
72
|
-
{...props}
|
|
73
|
-
>
|
|
74
|
-
<SelectScrollUpButton />
|
|
75
|
-
<SelectPrimitive.Viewport
|
|
76
|
-
className={cn(
|
|
77
|
-
"p-1",
|
|
78
|
-
position === "popper" &&
|
|
79
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
80
|
-
)}
|
|
81
|
-
>
|
|
82
|
-
{children}
|
|
83
|
-
</SelectPrimitive.Viewport>
|
|
84
|
-
<SelectScrollDownButton />
|
|
85
|
-
</SelectPrimitive.Content>
|
|
86
|
-
</SelectPrimitive.Portal>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function SelectLabel({
|
|
91
|
-
className,
|
|
92
|
-
...props
|
|
93
|
-
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
94
|
-
return (
|
|
95
|
-
<SelectPrimitive.Label
|
|
96
|
-
data-slot="select-label"
|
|
97
|
-
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function SelectItem({
|
|
104
|
-
className,
|
|
105
|
-
children,
|
|
106
|
-
...props
|
|
107
|
-
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
108
|
-
return (
|
|
109
|
-
<SelectPrimitive.Item
|
|
110
|
-
data-slot="select-item"
|
|
111
|
-
className={cn(
|
|
112
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
113
|
-
className
|
|
114
|
-
)}
|
|
115
|
-
{...props}
|
|
116
|
-
>
|
|
117
|
-
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
118
|
-
<SelectPrimitive.ItemIndicator>
|
|
119
|
-
<CheckIcon className="size-4" />
|
|
120
|
-
</SelectPrimitive.ItemIndicator>
|
|
121
|
-
</span>
|
|
122
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
123
|
-
</SelectPrimitive.Item>
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function SelectSeparator({
|
|
128
|
-
className,
|
|
129
|
-
...props
|
|
130
|
-
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
131
|
-
return (
|
|
132
|
-
<SelectPrimitive.Separator
|
|
133
|
-
data-slot="select-separator"
|
|
134
|
-
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
|
|
135
|
-
{...props}
|
|
136
|
-
/>
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function SelectScrollUpButton({
|
|
141
|
-
className,
|
|
142
|
-
...props
|
|
143
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
144
|
-
return (
|
|
145
|
-
<SelectPrimitive.ScrollUpButton
|
|
146
|
-
data-slot="select-scroll-up-button"
|
|
147
|
-
className={cn(
|
|
148
|
-
"flex cursor-default items-center justify-center py-1",
|
|
149
|
-
className
|
|
150
|
-
)}
|
|
151
|
-
{...props}
|
|
152
|
-
>
|
|
153
|
-
<ChevronUpIcon className="size-4" />
|
|
154
|
-
</SelectPrimitive.ScrollUpButton>
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function SelectScrollDownButton({
|
|
159
|
-
className,
|
|
160
|
-
...props
|
|
161
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
162
|
-
return (
|
|
163
|
-
<SelectPrimitive.ScrollDownButton
|
|
164
|
-
data-slot="select-scroll-down-button"
|
|
165
|
-
className={cn(
|
|
166
|
-
"flex cursor-default items-center justify-center py-1",
|
|
167
|
-
className
|
|
168
|
-
)}
|
|
169
|
-
{...props}
|
|
170
|
-
>
|
|
171
|
-
<ChevronDownIcon className="size-4" />
|
|
172
|
-
</SelectPrimitive.ScrollDownButton>
|
|
173
|
-
)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export {
|
|
177
|
-
Select,
|
|
178
|
-
SelectContent,
|
|
179
|
-
SelectGroup,
|
|
180
|
-
SelectItem,
|
|
181
|
-
SelectLabel,
|
|
182
|
-
SelectScrollDownButton,
|
|
183
|
-
SelectScrollUpButton,
|
|
184
|
-
SelectSeparator,
|
|
185
|
-
SelectTrigger,
|
|
186
|
-
SelectValue,
|
|
187
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Separator as SeparatorPrimitive } from "radix-ui"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
function Separator({
|
|
9
|
-
className,
|
|
10
|
-
orientation = "horizontal",
|
|
11
|
-
decorative = true,
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
14
|
-
return (
|
|
15
|
-
<SeparatorPrimitive.Root
|
|
16
|
-
data-slot="separator"
|
|
17
|
-
decorative={decorative}
|
|
18
|
-
orientation={orientation}
|
|
19
|
-
className={cn(
|
|
20
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { Separator }
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Dialog as SheetPrimitive } from "radix-ui"
|
|
5
|
-
import { XIcon } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
10
|
-
return <SheetPrimitive.Root data-slot="sheet" {...props} />
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function SheetTrigger({
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
|
|
16
|
-
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function SheetClose({
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof SheetPrimitive.Close>) {
|
|
22
|
-
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function SheetPortal({
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof SheetPrimitive.Portal>) {
|
|
28
|
-
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function SheetOverlay({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
|
|
35
|
-
return (
|
|
36
|
-
<SheetPrimitive.Overlay
|
|
37
|
-
data-slot="sheet-overlay"
|
|
38
|
-
className={cn(
|
|
39
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
40
|
-
className
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function SheetContent({
|
|
48
|
-
className,
|
|
49
|
-
children,
|
|
50
|
-
side = "right",
|
|
51
|
-
...props
|
|
52
|
-
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
53
|
-
side?: "top" | "right" | "bottom" | "left"
|
|
54
|
-
}) {
|
|
55
|
-
return (
|
|
56
|
-
<SheetPortal>
|
|
57
|
-
<SheetOverlay />
|
|
58
|
-
<SheetPrimitive.Content
|
|
59
|
-
data-slot="sheet-content"
|
|
60
|
-
className={cn(
|
|
61
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
62
|
-
side === "right" &&
|
|
63
|
-
"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
64
|
-
side === "left" &&
|
|
65
|
-
"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
66
|
-
side === "top" &&
|
|
67
|
-
"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
68
|
-
side === "bottom" &&
|
|
69
|
-
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
70
|
-
className
|
|
71
|
-
)}
|
|
72
|
-
{...props}
|
|
73
|
-
>
|
|
74
|
-
{children}
|
|
75
|
-
<SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
|
|
76
|
-
<XIcon className="size-4" />
|
|
77
|
-
<span className="sr-only">Close</span>
|
|
78
|
-
</SheetPrimitive.Close>
|
|
79
|
-
</SheetPrimitive.Content>
|
|
80
|
-
</SheetPortal>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
85
|
-
return (
|
|
86
|
-
<div
|
|
87
|
-
data-slot="sheet-header"
|
|
88
|
-
className={cn("flex flex-col gap-1.5 p-4", className)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
95
|
-
return (
|
|
96
|
-
<div
|
|
97
|
-
data-slot="sheet-footer"
|
|
98
|
-
className={cn("mt-auto flex flex-col gap-2 p-4", className)}
|
|
99
|
-
{...props}
|
|
100
|
-
/>
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function SheetTitle({
|
|
105
|
-
className,
|
|
106
|
-
...props
|
|
107
|
-
}: React.ComponentProps<typeof SheetPrimitive.Title>) {
|
|
108
|
-
return (
|
|
109
|
-
<SheetPrimitive.Title
|
|
110
|
-
data-slot="sheet-title"
|
|
111
|
-
className={cn("text-foreground font-semibold", className)}
|
|
112
|
-
{...props}
|
|
113
|
-
/>
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function SheetDescription({
|
|
118
|
-
className,
|
|
119
|
-
...props
|
|
120
|
-
}: React.ComponentProps<typeof SheetPrimitive.Description>) {
|
|
121
|
-
return (
|
|
122
|
-
<SheetPrimitive.Description
|
|
123
|
-
data-slot="sheet-description"
|
|
124
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
125
|
-
{...props}
|
|
126
|
-
/>
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export {
|
|
131
|
-
Sheet,
|
|
132
|
-
SheetTrigger,
|
|
133
|
-
SheetClose,
|
|
134
|
-
SheetContent,
|
|
135
|
-
SheetHeader,
|
|
136
|
-
SheetFooter,
|
|
137
|
-
SheetTitle,
|
|
138
|
-
SheetDescription,
|
|
139
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CircleCheckIcon,
|
|
5
|
-
InfoIcon,
|
|
6
|
-
Loader2Icon,
|
|
7
|
-
OctagonXIcon,
|
|
8
|
-
TriangleAlertIcon,
|
|
9
|
-
} from "lucide-react"
|
|
10
|
-
import { useTheme } from "next-themes"
|
|
11
|
-
import { Toaster as Sonner, type ToasterProps } from "sonner"
|
|
12
|
-
|
|
13
|
-
const Toaster = ({ ...props }: ToasterProps) => {
|
|
14
|
-
const { theme = "system" } = useTheme()
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Sonner
|
|
18
|
-
theme={theme as ToasterProps["theme"]}
|
|
19
|
-
className="toaster group"
|
|
20
|
-
icons={{
|
|
21
|
-
success: <CircleCheckIcon className="size-4" />,
|
|
22
|
-
info: <InfoIcon className="size-4" />,
|
|
23
|
-
warning: <TriangleAlertIcon className="size-4" />,
|
|
24
|
-
error: <OctagonXIcon className="size-4" />,
|
|
25
|
-
loading: <Loader2Icon className="size-4 animate-spin" />,
|
|
26
|
-
}}
|
|
27
|
-
style={
|
|
28
|
-
{
|
|
29
|
-
"--normal-bg": "var(--popover)",
|
|
30
|
-
"--normal-text": "var(--popover-foreground)",
|
|
31
|
-
"--normal-border": "var(--border)",
|
|
32
|
-
"--border-radius": "var(--radius)",
|
|
33
|
-
} as React.CSSProperties
|
|
34
|
-
}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { Toaster }
|