Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Chore/move cmdk (#21936)

Jonathan Summers-Muir07a6c5ab4ea5
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
index 5ac5557f0d9..743f32ecc7e 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
@@ -2,7 +2,8 @@ import { useTheme } from 'next-themes'
import Image from 'next/legacy/image'
import Link from 'next/link'
import { FC } from 'react'
-import { Button, IconCommand, IconGitHub, IconSearch, SearchButton } from 'ui'
+import { Button, IconCommand, IconGitHub, IconSearch } from 'ui'
+import { SearchButton } from 'ui-patterns/Cmdk'
import { useIsLoggedIn, useIsUserLoading } from 'common'
import { ThemeToggle } from 'ui-patterns/ThemeToggle'
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index c75ece1b38b..3da019613df 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -10,7 +10,8 @@ import { QueryClientProvider, useQueryClient } from '@tanstack/react-query'
import { AuthProvider, ThemeProvider, useTelemetryProps, useThemeSandbox } from 'common'
import { useRouter } from 'next/router'
import { useCallback, useEffect, useState, type PropsWithChildren } from 'react'
-import { CommandMenuProvider, PortalToast, TabsProvider } from 'ui'
+import { PortalToast, TabsProvider } from 'ui'
+import { CommandMenuProvider } from 'ui-patterns/Cmdk'
import { useConsent } from 'ui-patterns/ConsentToast'
import Favicons from '~/components/Favicons'
diff --git a/apps/studio/components/interfaces/App/CommandMenuWrapper.tsx b/apps/studio/components/interfaces/App/CommandMenuWrapper.tsx
index 3494f1a0cb5..63b32c356d9 100644
--- a/apps/studio/components/interfaces/App/CommandMenuWrapper.tsx
+++ b/apps/studio/components/interfaces/App/CommandMenuWrapper.tsx
@@ -3,7 +3,7 @@ import { useParams } from 'common'
import { codeBlock } from 'common-tags'
import { PropsWithChildren, useMemo } from 'react'
import toast from 'react-hot-toast'
-import { CommandMenuProvider } from 'ui'
+import { CommandMenuProvider } from 'ui-patterns/Cmdk'
import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
import { useProjectApiQuery } from 'data/config/project-api-query'
diff --git a/apps/studio/components/interfaces/Auth/Policies/AIPolicyEditorPanel/AIPolicyChat.tsx b/apps/studio/components/interfaces/Auth/Policies/AIPolicyEditorPanel/AIPolicyChat.tsx
index 9f43f34f5e0..1ad3ded447e 100644
--- a/apps/studio/components/interfaces/Auth/Policies/AIPolicyEditorPanel/AIPolicyChat.tsx
+++ b/apps/studio/components/interfaces/Auth/Policies/AIPolicyEditorPanel/AIPolicyChat.tsx
@@ -7,7 +7,6 @@ import { useRouter } from 'next/router'
import { useEffect, useRef } from 'react'
import { useForm } from 'react-hook-form'
import {
- AiIcon,
Button,
FormControl_Shadcn_,
FormField_Shadcn_,
@@ -16,6 +15,7 @@ import {
Input_Shadcn_,
cn,
} from 'ui'
+import { AiIcon } from 'ui-patterns/Cmdk'
import * as z from 'zod'
import { useLocalStorageQuery, useSelectedOrganization } from 'hooks'
diff --git a/apps/studio/components/interfaces/SQLEditor/AiAssistantPanel/index.tsx b/apps/studio/components/interfaces/SQLEditor/AiAssistantPanel/index.tsx
index 341dd18cf71..2d80336ec67 100644
--- a/apps/studio/components/interfaces/SQLEditor/AiAssistantPanel/index.tsx
+++ b/apps/studio/components/interfaces/SQLEditor/AiAssistantPanel/index.tsx
@@ -8,7 +8,6 @@ import { useRouter } from 'next/router'
import { useEffect, useRef } from 'react'
import { useForm } from 'react-hook-form'
import {
- AiIcon,
Button,
FormControl_Shadcn_,
FormField_Shadcn_,
@@ -17,6 +16,7 @@ import {
Input_Shadcn_,
cn,
} from 'ui'
+import { AiIcon } from 'ui-patterns/Cmdk'
import * as z from 'zod'
import { useLocalStorageQuery, useSelectedOrganization } from 'hooks'
diff --git a/apps/studio/components/layouts/AppLayout/UserSettingsDropdown.tsx b/apps/studio/components/layouts/AppLayout/UserSettingsDropdown.tsx
index 276f7b1fe57..ffc611f7e03 100644
--- a/apps/studio/components/layouts/AppLayout/UserSettingsDropdown.tsx
+++ b/apps/studio/components/layouts/AppLayout/UserSettingsDropdown.tsx
@@ -17,8 +17,8 @@ import {
DropdownMenuShortcut,
DropdownMenuTrigger,
IconUser,
- useCommandMenu,
} from 'ui'
+import { useCommandMenu } from 'ui-patterns/Cmdk'
const UserSettingsDropdown = () => {
const signOut = useSignOut()
diff --git a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
index 71c6360b23d..dff9f2bfaa2 100644
--- a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
@@ -22,8 +22,8 @@ import {
Theme,
cn,
themes,
- useCommandMenu,
} from 'ui'
+import { useCommandMenu } from 'ui-patterns/Cmdk'
import { useIsAPIDocsSidePanelEnabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { useSignOut } from 'lib/auth'
diff --git a/apps/www/pages/_app.tsx b/apps/www/pages/_app.tsx
index a9d17d3202f..66157175641 100644
--- a/apps/www/pages/_app.tsx
+++ b/apps/www/pages/_app.tsx
@@ -9,7 +9,8 @@ import { AppProps } from 'next/app'
import Head from 'next/head'
import { useRouter } from 'next/router'
import { useEffect } from 'react'
-import { CommandMenuProvider, PortalToast, themes } from 'ui'
+import { PortalToast, themes } from 'ui'
+import { CommandMenuProvider } from 'ui-patterns/Cmdk'
import { useConsent } from 'ui-patterns/ConsentToast'
import Meta from '~/components/Favicons'
diff --git a/apps/www/pages/support.tsx b/apps/www/pages/support.tsx
index 37473605499..57556152d49 100644
--- a/apps/www/pages/support.tsx
+++ b/apps/www/pages/support.tsx
@@ -3,7 +3,8 @@ import Link from 'next/link'
import { useRouter } from 'next/router'
import { NextSeo } from 'next-seo'
import Typed from 'typed.js'
-import { Button, ButtonProps, cn, IconCommand, IconSearch, SearchButton } from 'ui'
+import { Button, ButtonProps, cn, IconCommand, IconSearch } from 'ui'
+import { SearchButton } from 'ui-patterns/Cmdk'
import DefaultLayout from '~/components/Layouts/Default'
import Panel from '~/components/Panel'
diff --git a/package-lock.json b/package-lock.json
index c2987f68129..b2e9ee4d538 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -44507,13 +44507,11 @@
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-toggle": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.7",
- "@supabase/auth-helpers-react": "^0.4.2",
"@tailwindcss/forms": "^0.5.0",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"class-variance-authority": "^0.6.0",
"clsx": "^1.2.1",
- "cmdk": "^0.2.1",
"color": "^4.2.3",
"colorjs.io": "^0.4.3",
"common-tags": "^1.8.2",
@@ -44528,7 +44526,6 @@
"react-copy-to-clipboard": "^5.1.0",
"react-countdown": "^2.3.5",
"react-day-picker": "^8.8.0",
- "react-error-boundary": "^4.0.12",
"react-feather": "^2.0.10",
"react-hook-form": "^7.45.0",
"react-hot-toast": "^2.4.1",
@@ -44592,10 +44589,12 @@
"packages/ui-patterns": {
"license": "MIT",
"dependencies": {
+ "cmdk": "^0.2.1",
"common": "*",
"lodash": "*",
"lucide-react": "*",
"next-themes": "*",
+ "react-error-boundary": "^4.0.12",
"react-hot-toast": "*",
"react-tooltip": "*",
"reactflow": "*",
diff --git a/packages/ui/src/components/Command/APIKeys.tsx b/packages/ui-patterns/Cmdk/APIKeys.tsx
similarity index 92%
rename from packages/ui/src/components/Command/APIKeys.tsx
rename to packages/ui-patterns/Cmdk/APIKeys.tsx
index c5ffa24f9ed..a0fb3c60a67 100644
--- a/packages/ui/src/components/Command/APIKeys.tsx
+++ b/packages/ui-patterns/Cmdk/APIKeys.tsx
@@ -1,8 +1,8 @@
import { CommandGroup } from 'cmdk'
import { useCommandMenu } from './CommandMenuProvider'
-import { Badge } from '../Badge'
+import { Badge } from 'ui/src/components/Badge'
import { CommandItem, copyToClipboard } from './Command.utils'
-import { IconAlertCircle } from './../Icon/icons/IconAlertCircle'
+import { IconAlertCircle } from 'ui/src/components/Icon/icons/IconAlertCircle'
import ChildItem from './ChildItem'
const APIKeys = ({ isSubItem = false }) => {
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui-patterns/Cmdk/AiCommand.tsx
similarity index 99%
rename from packages/ui/src/components/Command/AiCommand.tsx
rename to packages/ui-patterns/Cmdk/AiCommand.tsx
index 9aa82951354..2ffa3c6de57 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui-patterns/Cmdk/AiCommand.tsx
@@ -28,7 +28,7 @@ import { useCommandMenu } from './CommandMenuProvider'
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
-import { cn } from './../../lib/utils'
+import { cn } from 'ui/src/lib/utils'
const questions = [
'How do I get started with Supabase?',
diff --git a/packages/ui/src/components/Command/ChildItem.tsx b/packages/ui-patterns/Cmdk/ChildItem.tsx
similarity index 100%
rename from packages/ui/src/components/Command/ChildItem.tsx
rename to packages/ui-patterns/Cmdk/ChildItem.tsx
diff --git a/packages/ui/src/components/Command/Command.Badges.tsx b/packages/ui-patterns/Cmdk/Command.Badges.tsx
similarity index 100%
rename from packages/ui/src/components/Command/Command.Badges.tsx
rename to packages/ui-patterns/Cmdk/Command.Badges.tsx
diff --git a/packages/ui/src/components/Command/Command.alerts.tsx b/packages/ui-patterns/Cmdk/Command.alerts.tsx
similarity index 100%
rename from packages/ui/src/components/Command/Command.alerts.tsx
rename to packages/ui-patterns/Cmdk/Command.alerts.tsx
diff --git a/packages/ui/src/components/Command/Command.constants.ts b/packages/ui-patterns/Cmdk/Command.constants.ts
similarity index 100%
rename from packages/ui/src/components/Command/Command.constants.ts
rename to packages/ui-patterns/Cmdk/Command.constants.ts
diff --git a/packages/ui/src/components/Command/Command.icons.tsx b/packages/ui-patterns/Cmdk/Command.icons.tsx
similarity index 78%
rename from packages/ui/src/components/Command/Command.icons.tsx
rename to packages/ui-patterns/Cmdk/Command.icons.tsx
index e6e1ce78762..e9a81ab6608 100644
--- a/packages/ui/src/components/Command/Command.icons.tsx
+++ b/packages/ui-patterns/Cmdk/Command.icons.tsx
@@ -1,4 +1,4 @@
-import { AiIconAnimation } from '../../layout/ai-icon-animation/ai-icon-animation'
+import { AiIconAnimation } from 'ui/src/layout/ai-icon-animation/ai-icon-animation'
interface AiIconProps {
className?: string
diff --git a/packages/ui/src/components/Command/Command.types.ts b/packages/ui-patterns/Cmdk/Command.types.ts
similarity index 100%
rename from packages/ui/src/components/Command/Command.types.ts
rename to packages/ui-patterns/Cmdk/Command.types.ts
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui-patterns/Cmdk/Command.utils.tsx
similarity index 97%
rename from packages/ui/src/components/Command/Command.utils.tsx
rename to packages/ui-patterns/Cmdk/Command.utils.tsx
index e9f29c78f4a..ea97f22ff80 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui-patterns/Cmdk/Command.utils.tsx
@@ -1,16 +1,16 @@
import { Command as CommandPrimitive } from 'cmdk'
import * as React from 'react'
import { ErrorBoundary } from 'react-error-boundary'
-import { IconAlertTriangle } from 'ui'
-import { cn } from './../../lib/utils'
+import { cn } from 'ui/src/lib/utils'
import { DetailedHTMLProps, HTMLAttributes, KeyboardEventHandler } from 'react'
-import { LoadingLine } from '../LoadingLine/LoadingLine'
-import { Modal } from '../Modal'
-import { ModalProps } from '../Modal/Modal'
+import { LoadingLine } from 'ui/src/components/LoadingLine/LoadingLine'
+import { Modal } from 'ui/src/components/Modal'
+import { ModalProps } from 'ui/src/components/Modal/Modal'
import { useCommandMenu } from './CommandMenuProvider'
-import { Button } from '../Button'
+import { Button } from 'ui/src/components/Button'
+import { AlertTriangle } from 'lucide-react'
type CommandPrimitiveElement = React.ElementRef<typeof CommandPrimitive>
type CommandPrimitiveProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>
@@ -44,7 +44,7 @@ export function CommandError({ resetErrorBoundary }: { resetErrorBoundary: () =>
return (
<div className={cn('min-h-64', 'flex items-center justify-center')}>
<div className="p-10 flex flex-col items-center gap-6 mt-4">
- <IconAlertTriangle strokeWidth={1.5} size={40} />
+ <AlertTriangle strokeWidth={1.5} size={40} />
<p className="text-lg text-center">
Sorry, looks like we&apos;re having some issues with the command menu!
</p>
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui-patterns/Cmdk/CommandMenu.tsx
similarity index 93%
rename from packages/ui/src/components/Command/CommandMenu.tsx
rename to packages/ui-patterns/Cmdk/CommandMenu.tsx
index 9624ea67e39..a46a20d8fb1 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui-patterns/Cmdk/CommandMenu.tsx
@@ -2,18 +2,18 @@ import { useParams } from 'common'
import { useRouter } from 'next/router'
import * as React from 'react'
-import { AiIconAnimation } from '../../layout/ai-icon-animation/ai-icon-animation'
-import { IconHome } from '../Icon/icons/IconHome'
-import { IconArrowRight } from './../Icon/icons/IconArrowRight'
-import { IconBook } from './../Icon/icons/IconBook'
-import { IconColumns } from './../Icon/icons/IconColumns'
-import { IconInbox } from './../Icon/icons/IconInbox'
-import { IconKey } from './../Icon/icons/IconKey'
-import { IconLifeBuoy } from './../Icon/icons/IconLifeBuoy'
-import { IconLink } from './../Icon/icons/IconLink'
-import { IconMonitor } from './../Icon/icons/IconMonitor'
-import { IconPhone } from './../Icon/icons/IconPhone'
-import { IconUser } from './../Icon/icons/IconUser'
+import { AiIconAnimation } from 'ui/src/layout/ai-icon-animation/ai-icon-animation'
+import { IconHome } from 'ui/src/components/Icon/icons/IconHome'
+import { IconArrowRight } from 'ui/src/components/Icon/icons/IconArrowRight'
+import { IconBook } from 'ui/src/components/Icon/icons/IconBook'
+import { IconColumns } from 'ui/src/components/Icon/icons/IconColumns'
+import { IconInbox } from 'ui/src/components/Icon/icons/IconInbox'
+import { IconKey } from 'ui/src/components/Icon/icons/IconKey'
+import { IconLifeBuoy } from 'ui/src/components/Icon/icons/IconLifeBuoy'
+import { IconLink } from 'ui/src/components/Icon/icons/IconLink'
+import { IconMonitor } from 'ui/src/components/Icon/icons/IconMonitor'
+import { IconPhone } from 'ui/src/components/Icon/icons/IconPhone'
+import { IconUser } from 'ui/src/components/Icon/icons/IconUser'
import APIKeys from './APIKeys'
import AiCommand from './AiCommand'
import ChildItem from './ChildItem'
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui-patterns/Cmdk/CommandMenuProvider.tsx
similarity index 100%
rename from packages/ui/src/components/Command/CommandMenuProvider.tsx
rename to packages/ui-patterns/Cmdk/CommandMenuProvider.tsx
diff --git a/packages/ui/src/components/Command/CommandMenuShortcuts.tsx b/packages/ui-patterns/Cmdk/CommandMenuShortcuts.tsx
similarity index 95%
rename from packages/ui/src/components/Command/CommandMenuShortcuts.tsx
rename to packages/ui-patterns/Cmdk/CommandMenuShortcuts.tsx
index 34096855c07..c59b761dd9a 100644
--- a/packages/ui/src/components/Command/CommandMenuShortcuts.tsx
+++ b/packages/ui-patterns/Cmdk/CommandMenuShortcuts.tsx
@@ -1,4 +1,4 @@
-import { IconArrowLeft } from '../Icon/icons/IconArrowLeft'
+import { IconArrowLeft } from 'ui/src/components/Icon/icons/IconArrowLeft'
import { BadgeExperimental } from './Command.Badges'
import { COMMAND_ROUTES } from './Command.constants'
diff --git a/packages/ui/src/components/Command/DocsSearch.tsx b/packages/ui-patterns/Cmdk/DocsSearch.tsx
similarity index 99%
rename from packages/ui/src/components/Command/DocsSearch.tsx
rename to packages/ui-patterns/Cmdk/DocsSearch.tsx
index 82ebc9ec534..ec3444ec1f6 100644
--- a/packages/ui/src/components/Command/DocsSearch.tsx
+++ b/packages/ui-patterns/Cmdk/DocsSearch.tsx
@@ -12,7 +12,6 @@ import {
IconHash,
IconMessageSquare,
IconSearch,
- useCommandMenu,
} from 'ui'
import {
CommandGroup,
@@ -22,6 +21,7 @@ import {
escapeDoubleQuotes,
} from './Command.utils'
import { useRouter } from 'next/router'
+import { useCommandMenu } from './CommandMenuProvider'
const NUMBER_SOURCES = 2
diff --git a/packages/ui/src/components/Command/GenerateSQL/GenerateSQL.tsx b/packages/ui-patterns/Cmdk/GenerateSQL/GenerateSQL.tsx
similarity index 98%
rename from packages/ui/src/components/Command/GenerateSQL/GenerateSQL.tsx
rename to packages/ui-patterns/Cmdk/GenerateSQL/GenerateSQL.tsx
index 192d293989b..2d31fc7317e 100644
--- a/packages/ui/src/components/Command/GenerateSQL/GenerateSQL.tsx
+++ b/packages/ui-patterns/Cmdk/GenerateSQL/GenerateSQL.tsx
@@ -9,14 +9,11 @@ import {
IconUser,
Input,
Toggle,
- MessageRole,
- MessageStatus,
- useAiChat,
Tabs,
- UseAiChatOptions,
} from 'ui'
+import { MessageRole, MessageStatus, useAiChat, UseAiChatOptions } from './../AiCommand'
-import { cn } from './../../../lib/utils'
+import { cn } from 'ui/src/lib/utils'
import { AiIcon, AiIconChat } from '../Command.icons'
import { CommandItem, useAutoInputFocus, useHistoryKeys } from '../Command.utils'
import { useCommandMenu } from '../CommandMenuProvider'
diff --git a/packages/ui/src/components/Command/GenerateSQL/GenerateSQL.utils.ts b/packages/ui-patterns/Cmdk/GenerateSQL/GenerateSQL.utils.ts
similarity index 100%
rename from packages/ui/src/components/Command/GenerateSQL/GenerateSQL.utils.ts
rename to packages/ui-patterns/Cmdk/GenerateSQL/GenerateSQL.utils.ts
diff --git a/packages/ui/src/components/Command/GenerateSQL/SQLOutputActions.tsx b/packages/ui-patterns/Cmdk/GenerateSQL/SQLOutputActions.tsx
similarity index 95%
rename from packages/ui/src/components/Command/GenerateSQL/SQLOutputActions.tsx
rename to packages/ui-patterns/Cmdk/GenerateSQL/SQLOutputActions.tsx
index 270c78f66de..11e2ce7791e 100644
--- a/packages/ui/src/components/Command/GenerateSQL/SQLOutputActions.tsx
+++ b/packages/ui-patterns/Cmdk/GenerateSQL/SQLOutputActions.tsx
@@ -1,18 +1,10 @@
import { useState, useEffect } from 'react'
import CopyToClipboard from 'react-copy-to-clipboard'
-import {
- Button,
- IconCheck,
- IconClipboard,
- IconSave,
- Message,
- MessageRole,
- MessageStatus,
- queryAi,
-} from 'ui'
+import { Button, IconCheck, IconClipboard, IconSave } from 'ui'
import { useCommandMenu } from '../CommandMenuProvider'
import { stripIndent } from 'common-tags'
import { formatTitle } from './GenerateSQL.utils'
+import { Message, MessageRole, MessageStatus, queryAi } from './../AiCommand'
export interface SQLOutputActionsProps {
answer: string
diff --git a/packages/ui/src/components/Command/GenerateSQL/index.ts b/packages/ui-patterns/Cmdk/GenerateSQL/index.ts
similarity index 100%
rename from packages/ui/src/components/Command/GenerateSQL/index.ts
rename to packages/ui-patterns/Cmdk/GenerateSQL/index.ts
diff --git a/packages/ui/src/components/Command/SearchButton.tsx b/packages/ui-patterns/Cmdk/SearchButton.tsx
similarity index 100%
rename from packages/ui/src/components/Command/SearchButton.tsx
rename to packages/ui-patterns/Cmdk/SearchButton.tsx
diff --git a/packages/ui/src/components/Command/SearchOnlyItem.tsx b/packages/ui-patterns/Cmdk/SearchOnlyItem.tsx
similarity index 100%
rename from packages/ui/src/components/Command/SearchOnlyItem.tsx
rename to packages/ui-patterns/Cmdk/SearchOnlyItem.tsx
diff --git a/packages/ui/src/components/Command/SearchableStudioItems.tsx b/packages/ui-patterns/Cmdk/SearchableStudioItems.tsx
similarity index 100%
rename from packages/ui/src/components/Command/SearchableStudioItems.tsx
rename to packages/ui-patterns/Cmdk/SearchableStudioItems.tsx
diff --git a/packages/ui/src/components/Command/ThemeOptions.tsx b/packages/ui-patterns/Cmdk/ThemeOptions.tsx
similarity index 92%
rename from packages/ui/src/components/Command/ThemeOptions.tsx
rename to packages/ui-patterns/Cmdk/ThemeOptions.tsx
index 826b76edcda..75141925ba4 100644
--- a/packages/ui/src/components/Command/ThemeOptions.tsx
+++ b/packages/ui-patterns/Cmdk/ThemeOptions.tsx
@@ -2,7 +2,7 @@ import { CommandGroup } from 'cmdk'
import { useCommandMenu } from './CommandMenuProvider'
import ChildItem from './ChildItem'
import { useTheme } from 'next-themes'
-import { Theme, themes } from '../ThemeProvider/themes'
+import { Theme, themes } from 'ui/src/components/ThemeProvider/themes'
const ThemeOptions = ({ isSubItem = false }) => {
const { setIsOpen } = useCommandMenu()
diff --git a/packages/ui/src/components/Command/dashboard-nav-items.json b/packages/ui-patterns/Cmdk/dashboard-nav-items.json
similarity index 100%
rename from packages/ui/src/components/Command/dashboard-nav-items.json
rename to packages/ui-patterns/Cmdk/dashboard-nav-items.json
diff --git a/packages/ui/src/components/Command/index.tsx b/packages/ui-patterns/Cmdk/index.tsx
similarity index 100%
rename from packages/ui/src/components/Command/index.tsx
rename to packages/ui-patterns/Cmdk/index.tsx
diff --git a/packages/ui/src/components/Command/utils/dashboard-nav-items.json b/packages/ui-patterns/Cmdk/utils/dashboard-nav-items.json
similarity index 100%
rename from packages/ui/src/components/Command/utils/dashboard-nav-items.json
rename to packages/ui-patterns/Cmdk/utils/dashboard-nav-items.json
diff --git a/packages/ui/src/components/Command/utils/docs-nav-items.json b/packages/ui-patterns/Cmdk/utils/docs-nav-items.json
similarity index 100%
rename from packages/ui/src/components/Command/utils/docs-nav-items.json
rename to packages/ui-patterns/Cmdk/utils/docs-nav-items.json
diff --git a/packages/ui/src/components/Command/utils/shared-nav-items.json b/packages/ui-patterns/Cmdk/utils/shared-nav-items.json
similarity index 100%
rename from packages/ui/src/components/Command/utils/shared-nav-items.json
rename to packages/ui-patterns/Cmdk/utils/shared-nav-items.json
diff --git a/packages/ui-patterns/package.json b/packages/ui-patterns/package.json
index 23f9aa0a309..ba93c75112c 100644
--- a/packages/ui-patterns/package.json
+++ b/packages/ui-patterns/package.json
@@ -8,10 +8,12 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
+ "cmdk": "^0.2.1",
"common": "*",
"lodash": "*",
"lucide-react": "*",
"next-themes": "*",
+ "react-error-boundary": "^4.0.12",
"react-hot-toast": "*",
"react-tooltip": "*",
"reactflow": "*",
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index 602aa743a0f..b807d10efc8 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -62,9 +62,6 @@ export * from './src/components/Toggle'
export * from './src/components/Upload'
export * from './src/components/Form'
-// CMD+K
-export * from './src/components/Command'
-
// layout
export * from './src/components/LoadingLine'
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 53dbbd06483..13d79a5b5b1 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -48,13 +48,11 @@
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-toggle": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.7",
- "@supabase/auth-helpers-react": "^0.4.2",
"@tailwindcss/forms": "^0.5.0",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"class-variance-authority": "^0.6.0",
"clsx": "^1.2.1",
- "cmdk": "^0.2.1",
"color": "^4.2.3",
"colorjs.io": "^0.4.3",
"common-tags": "^1.8.2",
@@ -69,7 +67,6 @@
"react-copy-to-clipboard": "^5.1.0",
"react-countdown": "^2.3.5",
"react-day-picker": "^8.8.0",
- "react-error-boundary": "^4.0.12",
"react-feather": "^2.0.10",
"react-hook-form": "^7.45.0",
"react-hot-toast": "^2.4.1",