From 243e079a2c44e7bbd4eb24cf0d96ce4aeae438e6 Mon Sep 17 00:00:00 2001 From: Gildas Garcia <1122076+djhi@users.noreply.github.com> Date: Wed, 20 May 2026 15:45:32 +0200 Subject: [PATCH] chore: remove `_Shadcn_` suffix from `Command` components (#46153) ## Problem The `_Shadcn_` suffix isn't needed anymore on `Command` components ## Solution - Remove the `_Shadcn_` suffix - Simplify UI package exports - Apply prettier ## Summary by CodeRabbit * **Refactor** * Simplified command component imports and exports across the UI library by removing internal naming aliases and adopting direct component references. Updated the public UI package barrel export to use wildcard re-exports for cleaner API surface. [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46153?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) --- .../design-system/components/command-menu.tsx | 50 ++++++------- .../default/example/combobox-demo.tsx | 32 ++++----- .../example/combobox-dropdown-menu.tsx | 32 ++++----- .../default/example/combobox-form.tsx | 32 ++++----- .../default/example/combobox-popover.tsx | 32 ++++----- .../default/example/combobox-responsive.tsx | 32 ++++----- .../registry/default/example/command-demo.tsx | 68 +++++++++--------- .../default/example/command-dialog.tsx | 62 ++++++++-------- .../ProjectConfigVariables.ComboBox.tsx | 18 ++--- apps/docs/features/ui/InfoTooltip.tsx | 10 +-- apps/docs/features/ui/McpConfigPanel.tsx | 52 +++++++------- apps/learn/components/command-menu.tsx | 56 +++++++-------- .../PermissionResourceSelector.tsx | 32 ++++----- .../Account/Preferences/TimezoneSettings.tsx | 36 +++++----- .../ContextSearchResults.shared.tsx | 6 +- .../PolicyEditorPanel/PolicyDetailsV2.tsx | 32 ++++----- .../Auth/RLSTester/UserSelector.tsx | 32 ++++----- .../ThirdPartyAuthForm/AwsRegionSelector.tsx | 32 ++++----- .../NewPaymentMethodElement.tsx | 12 ++-- .../BranchManagement/BranchSelector.tsx | 32 ++++----- .../interfaces/Connect/ConnectDropdown.tsx | 32 ++++----- .../ConnectSheet/FrameworkSelector.tsx | 32 ++++----- .../Backups/PITR/TimezoneSelection.tsx | 32 ++++----- .../Database/Indexes/CreateIndexSidePanel.tsx | 54 +++++++------- .../DestinationForm/PublicationsComboBox.tsx | 46 ++++++------ .../CronJobs/EdgeFunctionSection.tsx | 32 ++++----- .../Vercel/OrganizationPicker.tsx | 32 ++++----- .../VercelGithub/ProjectLinker.tsx | 54 +++++++------- .../Integrations/Wrappers/ColumnType.tsx | 44 ++++++------ .../Wrappers/WrapperTableEditor.tsx | 32 ++++----- .../BillingCustomerDataForm.tsx | 12 ++-- .../Apps/CreateAppSheet/CreateAppSheet.tsx | 32 ++++----- .../interfaces/Organization/Usage/Usage.tsx | 10 +-- .../ProjectAPIDocs/LanguageSelector.tsx | 28 ++++---- .../SecondLevelNav.ResourcePicker.tsx | 28 +++----- .../SecondLevelNav.StoragePicker.tsx | 35 ++++------ .../ProjectHome/SnippetDropdown.tsx | 36 +++++----- .../RealtimeFilterPopover/TableSelector.tsx | 41 +++++------ .../interfaces/Reports/MetricOptions.tsx | 36 +++++----- .../Reports/ReportFilterPopover.tsx | 34 ++++----- .../Reports/v2/ReportsSelectFilter.tsx | 14 +--- .../interfaces/SQLEditor/MoveQueryModal.tsx | 48 ++++++------- .../Settings/API/ExposedFunctionSelector.tsx | 28 ++++---- .../Settings/API/ExposedSchemaSelector.tsx | 34 ++++----- .../Settings/API/ExposedTableSelector.tsx | 28 ++++---- .../GitHubRepositoryField.tsx | 52 +++++++------- .../Settings/Logs/LogsQueryPanel.tsx | 32 ++++----- .../VectorBucketTableExamplesSheet.tsx | 28 ++++---- .../interfaces/Support/ProjectAndPlanInfo.tsx | 10 +-- .../ColumnEditor/ColumnType.tsx | 44 ++++++------ .../SidePanelEditor/TableEditor/Column.tsx | 36 +++++----- .../UserDropdown/TimezoneDropdown.tsx | 36 +++++----- .../BranchDropdownCommandContent.tsx | 70 +++++++++---------- .../layouts/AppLayout/BranchLink.tsx | 6 +- .../layouts/AppLayout/OrgCommandItem.tsx | 6 +- .../OrganizationDropdownCommandContent.tsx | 64 ++++++++--------- .../layouts/AppLayout/ProjectDropdown.tsx | 10 +-- .../Navigation/NavigationBar/OrgSelector.tsx | 50 ++++++------- .../layouts/ProjectLayout/index.test.tsx | 10 +-- .../SQLEditorLayout/SqlEditor.Commands.tsx | 54 +++++++------- .../AIAssistantChatSelector.tsx | 44 ++++++------ .../ui/AIAssistantPanel/ModelSelector.tsx | 24 +++---- .../ui/DataTable/DataTableViewOptions.tsx | 12 ++-- .../studio/components/ui/DatabaseSelector.tsx | 40 +++++------ .../components/ui/EditorPanel/EditorPanel.tsx | 52 +++++++------- .../studio/components/ui/FunctionSelector.tsx | 48 ++++++------- .../components/ui/Logs/LogsExplorerHeader.tsx | 32 ++++----- .../ui/OrganizationProjectSelector.tsx | 22 +++--- .../ProjectCommandItem.tsx | 6 +- apps/studio/components/ui/SchemaComboBox.tsx | 32 ++++----- apps/studio/components/ui/SchemaSelector.tsx | 48 ++++++------- .../pages/project/[ref]/functions/new.tsx | 32 ++++----- apps/ui-library/components/command-menu.tsx | 50 ++++++------- .../tanstack-db-generator/ComboBox.tsx | 17 ++--- apps/www/components/Pricing/UpgradePlan.tsx | 44 ++++++------ .../src/CommandMenu/api/CommandMenu.tsx | 12 ++-- .../src/CommandMenu/api/CommandMenuInput.tsx | 8 +-- .../src/CommandMenu/api/CommandMenuList.tsx | 10 +-- .../CommandMenu/internal/CommandMenuGroup.tsx | 8 +-- .../CommandMenu/internal/CommandMenuItem.tsx | 10 +-- .../prepackaged/DocsAi/DocsAiPage.tsx | 23 +++--- .../prepackaged/DocsSearch/DocsSearchPage.tsx | 26 +++---- .../components/ClientSelectDropdown.tsx | 34 ++++----- .../src/MobileSheetNav/MobileSheetNav.tsx | 4 +- .../src/multi-select/multi-select.tsx | 10 +-- packages/ui/index.tsx | 12 +--- 86 files changed, 1320 insertions(+), 1372 deletions(-) diff --git a/apps/design-system/components/command-menu.tsx b/apps/design-system/components/command-menu.tsx index fbd26bea2e8..2fa3cfee17f 100644 --- a/apps/design-system/components/command-menu.tsx +++ b/apps/design-system/components/command-menu.tsx @@ -7,12 +7,12 @@ import * as React from 'react' import { Button, CommandDialog, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, DialogProps, DialogTitle, } from 'ui' @@ -77,13 +77,13 @@ export function CommandMenu({ ...props }: DialogProps) { /> Search Design System... - - - No results found. + + + No results found. {docsConfig.sidebarNav.map((group) => ( - + {group.items.map((navItem) => ( - { @@ -94,30 +94,30 @@ export function CommandMenu({ ...props }: DialogProps) { {navItem.title} - + ))} - + ))} - - - runCommand(() => setTheme('light'))}> + + + runCommand(() => setTheme('light'))}> Light - - runCommand(() => setTheme('dark'))}> + + runCommand(() => setTheme('dark'))}> Dark - - runCommand(() => setTheme('classic-dark'))}> + + runCommand(() => setTheme('classic-dark'))}> Classic dark - - runCommand(() => setTheme('system'))}> + + runCommand(() => setTheme('system'))}> System - - - + + + ) diff --git a/apps/design-system/registry/default/example/combobox-demo.tsx b/apps/design-system/registry/default/example/combobox-demo.tsx index 558d83237e4..b7f8fabd978 100644 --- a/apps/design-system/registry/default/example/combobox-demo.tsx +++ b/apps/design-system/registry/default/example/combobox-demo.tsx @@ -4,12 +4,12 @@ import { Check, ChevronsUpDown } from 'lucide-react' import * as React from 'react' import { Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -61,13 +61,13 @@ export default function ComboboxDemo() { - - - - No framework found. - + + + + No framework found. + {frameworks.map((framework) => ( - { @@ -82,11 +82,11 @@ export default function ComboboxDemo() { )} /> {framework.label} - + ))} - - - + + + ) diff --git a/apps/design-system/registry/default/example/combobox-dropdown-menu.tsx b/apps/design-system/registry/default/example/combobox-dropdown-menu.tsx index ae866941efa..b9885ea531b 100644 --- a/apps/design-system/registry/default/example/combobox-dropdown-menu.tsx +++ b/apps/design-system/registry/default/example/combobox-dropdown-menu.tsx @@ -4,12 +4,12 @@ import { Calendar, MoreHorizontal, Tags, Trash, User } from 'lucide-react' import * as React from 'react' import { Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, @@ -72,14 +72,14 @@ export default function ComboboxDropdownMenu() { Apply label - - + + - - No label found. - + + No label found. + {labels.map((label) => ( - { @@ -88,12 +88,12 @@ export default function ComboboxDropdownMenu() { }} > {label} - + ))} - - + + - + diff --git a/apps/design-system/registry/default/example/combobox-form.tsx b/apps/design-system/registry/default/example/combobox-form.tsx index b83b07f07fa..b6cd2f507d1 100644 --- a/apps/design-system/registry/default/example/combobox-form.tsx +++ b/apps/design-system/registry/default/example/combobox-form.tsx @@ -6,12 +6,12 @@ import { useForm } from 'react-hook-form' import { toast } from 'sonner' import { Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Form, FormControl, FormDescription, @@ -94,13 +94,13 @@ export default function ComboboxForm() { - - - - No language found. - + + + + No language found. + {languages.map((language) => ( - { @@ -114,11 +114,11 @@ export default function ComboboxForm() { )} /> {language.label} - + ))} - - - + + + diff --git a/apps/design-system/registry/default/example/combobox-popover.tsx b/apps/design-system/registry/default/example/combobox-popover.tsx index 88ac417d507..4c2df6b951c 100644 --- a/apps/design-system/registry/default/example/combobox-popover.tsx +++ b/apps/design-system/registry/default/example/combobox-popover.tsx @@ -12,12 +12,12 @@ import { import * as React from 'react' import { Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -84,13 +84,13 @@ export default function ComboboxPopover() { - - - - No results found. - + + + + No results found. + {statuses.map((status) => ( - { @@ -107,11 +107,11 @@ export default function ComboboxPopover() { )} /> {status.label} - + ))} - - - + + + diff --git a/apps/design-system/registry/default/example/combobox-responsive.tsx b/apps/design-system/registry/default/example/combobox-responsive.tsx index d09a1fd6285..90dcb2f8506 100644 --- a/apps/design-system/registry/default/example/combobox-responsive.tsx +++ b/apps/design-system/registry/default/example/combobox-responsive.tsx @@ -4,12 +4,12 @@ import { Plus } from 'lucide-react' import * as React from 'react' import { Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Drawer, DrawerContent, DrawerTrigger, @@ -97,13 +97,13 @@ function StatusList({ setSelectedStatus: (status: Status | null) => void }) { return ( - - - - No results found. - + + + + No results found. + {statuses.map((status) => ( - { @@ -112,10 +112,10 @@ function StatusList({ }} > {status.label} - + ))} - - - + + + ) } diff --git a/apps/design-system/registry/default/example/command-demo.tsx b/apps/design-system/registry/default/example/command-demo.tsx index 8589373f51d..b51049ab5bc 100644 --- a/apps/design-system/registry/default/example/command-demo.tsx +++ b/apps/design-system/registry/default/example/command-demo.tsx @@ -1,54 +1,54 @@ import { Calculator, Calendar, CreditCard, Settings, Smile, User } from 'lucide-react' import { - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, - CommandShortcut_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, + CommandShortcut, } from 'ui' export default function CommandDemo() { return ( - - - - No results found. - - + + + + No results found. + + Calendar - - + + Search Emoji - - + + Calculator - - - - - + + + + + Profile - ⌘P - - + ⌘P + + Billing - ⌘B - - + ⌘B + + Settings - ⌘S - - - - + ⌘S + + + + ) } diff --git a/apps/design-system/registry/default/example/command-dialog.tsx b/apps/design-system/registry/default/example/command-dialog.tsx index fc9eab9b0ff..308c3cc1ac2 100644 --- a/apps/design-system/registry/default/example/command-dialog.tsx +++ b/apps/design-system/registry/default/example/command-dialog.tsx @@ -4,13 +4,13 @@ import { Calculator, Calendar, CreditCard, Settings, Smile, User } from 'lucide- import * as React from 'react' import { CommandDialog, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, - CommandShortcut_Shadcn_, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, + CommandShortcut, } from 'ui' export default function CommandDialogDemo() { @@ -37,42 +37,42 @@ export default function CommandDialogDemo() {

- - - No results found. - - + + + No results found. + + Calendar - - + + Search Emoji - - + + Calculator - - - - - + + + + + Profile - ⌘P - - + ⌘P + + Billing - ⌘B - - + ⌘B + + Settings - ⌘S - - - + ⌘S + + + ) diff --git a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx index fc8d2a50cf5..105cb3e45b6 100644 --- a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx +++ b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx @@ -1,21 +1,21 @@ +import { useIntersectionObserver } from '~/hooks/useIntersectionObserver' import { noop } from 'lodash-es' import { Check, ChevronsUpDown } from 'lucide-react' import { useEffect, useRef, useState } from 'react' import { Button_Shadcn_ as Button, cn, - Command_Shadcn_ as Command, - CommandGroup_Shadcn_ as CommandGroup, - CommandInput_Shadcn_ as CommandInput, - CommandItem_Shadcn_ as CommandItem, - CommandList_Shadcn_ as CommandList, - Popover as Popover, - PopoverContent as PopoverContent, - PopoverTrigger as PopoverTrigger, + Command, + CommandGroup as CommandGroup, + CommandInput, + CommandItem as CommandItem, + CommandList as CommandList, + Popover, + PopoverContent, + PopoverTrigger, ScrollArea, } from 'ui' import ShimmeringLoader from 'ui-patterns/ShimmeringLoader' -import { useIntersectionObserver } from '~/hooks/useIntersectionObserver' export interface ComboBoxOption { id: string diff --git a/apps/docs/features/ui/InfoTooltip.tsx b/apps/docs/features/ui/InfoTooltip.tsx index d8dd67b1da6..d604a0047b1 100644 --- a/apps/docs/features/ui/InfoTooltip.tsx +++ b/apps/docs/features/ui/InfoTooltip.tsx @@ -1,20 +1,20 @@ 'use client' +import { useBreakpoint } from 'common' +import { InfoIcon, XIcon } from 'lucide-react' import React, { - type PropsWithChildren, useCallback, useEffect, useId, useRef, useState, + type PropsWithChildren, } from 'react' -import { InfoIcon, XIcon } from 'lucide-react' import { ErrorBoundary } from 'react-error-boundary' -import { useBreakpoint } from 'common' import { Button, cn, - CommandEmpty_Shadcn_, + CommandEmpty, Sheet, SheetContent, SheetHeader, @@ -105,7 +105,7 @@ const InfoTooltip = ({ 'w-full h-fit min-h-[200px] py-2 px-4' )} > - }> + }>
diff --git a/apps/docs/features/ui/McpConfigPanel.tsx b/apps/docs/features/ui/McpConfigPanel.tsx index e4723715f4a..ec2cd3c752f 100644 --- a/apps/docs/features/ui/McpConfigPanel.tsx +++ b/apps/docs/features/ui/McpConfigPanel.tsx @@ -1,5 +1,9 @@ 'use client' +import { useDebounce } from '~/hooks/useDebounce' +import { useIntersectionObserver } from '~/hooks/useIntersectionObserver' +import { useProjectsInfiniteQuery } from '~/lib/fetch/projects-infinite' +import { useSendTelemetryEvent } from '~/lib/telemetry' import { useIsLoggedIn, useIsUserLoading } from 'common' import { Check, ChevronDown } from 'lucide-react' import { useTheme } from 'next-themes' @@ -8,11 +12,11 @@ import { useEffect, useMemo, useRef, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -25,10 +29,6 @@ import { type McpClient, } from 'ui-patterns/McpUrlBuilder' import ShimmeringLoader from 'ui-patterns/ShimmeringLoader' -import { useDebounce } from '~/hooks/useDebounce' -import { useIntersectionObserver } from '~/hooks/useIntersectionObserver' -import { useProjectsInfiniteQuery } from '~/lib/fetch/projects-infinite' -import { useSendTelemetryEvent } from '~/lib/telemetry' type PlatformType = (typeof PLATFORMS)[number]['value'] @@ -135,8 +135,8 @@ function ProjectSelector({ )}
- - + setSearch('')} /> - - + + {isLoading ? (
@@ -160,7 +160,7 @@ function ProjectSelector({ )} 7 ? 'h-[210px]' : ''}> {projects?.map((project) => ( - { @@ -178,16 +178,16 @@ function ProjectSelector({ project.ref === selectedProject?.ref ? 'opacity-100' : 'opacity-0' )} /> - + ))}
{hasNextPage && } )} - - - + + + ) @@ -230,11 +230,11 @@ function PlatformSelector({
- - - + + + {PLATFORMS.map((platform) => ( - { @@ -252,11 +252,11 @@ function PlatformSelector({ platform.value === selectedPlatform ? 'opacity-100' : 'opacity-0' )} /> - + ))} - - - + + + ) diff --git a/apps/learn/components/command-menu.tsx b/apps/learn/components/command-menu.tsx index d764ce7e38f..75f055f9a8f 100644 --- a/apps/learn/components/command-menu.tsx +++ b/apps/learn/components/command-menu.tsx @@ -4,21 +4,21 @@ import { CircleIcon, LaptopIcon, MoonIcon, SunIcon } from 'lucide-react' import { useTheme } from 'next-themes' import { useRouter } from 'next/navigation' import * as React from 'react' - -import { COMMAND_ITEMS } from '@/config/docs' -import { cn } from '@/lib/utils' import { Button, CommandDialog, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, DialogProps, } from 'ui' +import { COMMAND_ITEMS } from '@/config/docs' +import { cn } from '@/lib/utils' + export function CommandMenu({ ...props }: DialogProps) { const router = useRouter() const [open, setOpen] = React.useState(false) @@ -69,12 +69,12 @@ export function CommandMenu({ ...props }: DialogProps) { - - - No results found. - + + + No results found. + {COMMAND_ITEMS.map((navItem) => ( - runCommand(() => router.push(navItem.href as string))} @@ -83,29 +83,29 @@ export function CommandMenu({ ...props }: DialogProps) {
{navItem.label} - + ))} -
- - - runCommand(() => setTheme('light'))}> + + + + runCommand(() => setTheme('light'))}> Light - - runCommand(() => setTheme('dark'))}> + + runCommand(() => setTheme('dark'))}> Dark - - runCommand(() => setTheme('classic-dark'))}> + + runCommand(() => setTheme('classic-dark'))}> Classic dark - - runCommand(() => setTheme('system'))}> + + runCommand(() => setTheme('system'))}> System - - -
+ + + ) diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/Permissions/PermissionResourceSelector.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/Permissions/PermissionResourceSelector.tsx index 8f6416c71a1..f1d2e54c9d2 100644 --- a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/Permissions/PermissionResourceSelector.tsx +++ b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/Permissions/PermissionResourceSelector.tsx @@ -3,12 +3,12 @@ import { Path, PathValue } from 'react-hook-form' import { Button, Checkbox, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -46,19 +46,19 @@ export const PermissionResourceSelector = - - - - No resources found. + + + + No resources found. - +
{ACCESS_TOKEN_RESOURCES.map((resource) => { const isChecked = permissionRows.some( (row: PermissionRow) => row.resource === resource.resource ) return ( - handleToggleResource(resource)} @@ -77,13 +77,13 @@ export const PermissionResourceSelector =
- + ) })} -
-
-
+ + +
) diff --git a/apps/studio/components/interfaces/Account/Preferences/TimezoneSettings.tsx b/apps/studio/components/interfaces/Account/Preferences/TimezoneSettings.tsx index 2430bf3bdee..63a318f171b 100644 --- a/apps/studio/components/interfaces/Account/Preferences/TimezoneSettings.tsx +++ b/apps/studio/components/interfaces/Account/Preferences/TimezoneSettings.tsx @@ -6,12 +6,12 @@ import { Card, CardContent, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -103,13 +103,13 @@ export const TimezoneSettings = () => { - - - - No timezones found - + + + + No timezones found + - handleSelect('')} @@ -126,12 +126,12 @@ export const TimezoneSettings = () => { isAutoDetected ? 'opacity-100' : 'opacity-0' )} /> - + {TIMEZONES_BY_IANA.map((entry) => { const ianaName = entry.utc[0] const isSelected = !isAutoDetected && storedTimezone === ianaName return ( - { isSelected ? 'opacity-100' : 'opacity-0' )} /> - + ) })} - - - + + + diff --git a/apps/studio/components/interfaces/App/CommandMenu/ContextSearchResults.shared.tsx b/apps/studio/components/interfaces/App/CommandMenu/ContextSearchResults.shared.tsx index 3eaf23408ef..d798f407c50 100644 --- a/apps/studio/components/interfaces/App/CommandMenu/ContextSearchResults.shared.tsx +++ b/apps/studio/components/interfaces/App/CommandMenu/ContextSearchResults.shared.tsx @@ -1,6 +1,6 @@ 'use client' -import { cn, CommandList_Shadcn_ } from 'ui' +import { cn, CommandList } from 'ui' import { ShimmeringLoader } from 'ui-patterns' import { TextHighlighter } from 'ui-patterns/CommandMenu' import { CommandMenuGroup } from 'ui-patterns/CommandMenu/internal/CommandMenuGroup' @@ -86,7 +86,7 @@ export function ResultsList({ }) return ( - ))} - + ) } diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx index ca41b17194a..01340314da6 100644 --- a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx +++ b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx @@ -11,12 +11,12 @@ import { UseFormReturn } from 'react-hook-form' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, FormControl, FormField, FormItem, @@ -182,14 +182,14 @@ export const PolicyDetailsV2 = ({ align="start" sameWidthAsTrigger > - - - event.stopPropagation()}> - No tables found - + + + event.stopPropagation()}> + No tables found + 7 ? 'h-[200px]' : ''}> {(tables ?? []).map((table) => ( - { @@ -205,12 +205,12 @@ export const PolicyDetailsV2 = ({ {field.value === table.name ? : ''} {table.name} - + ))} - - - + + +
diff --git a/apps/studio/components/interfaces/Auth/RLSTester/UserSelector.tsx b/apps/studio/components/interfaces/Auth/RLSTester/UserSelector.tsx index 17daee2762c..bd26666b3da 100644 --- a/apps/studio/components/interfaces/Auth/RLSTester/UserSelector.tsx +++ b/apps/studio/components/interfaces/Auth/RLSTester/UserSelector.tsx @@ -6,12 +6,12 @@ import { toast } from 'sonner' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -82,8 +82,8 @@ export const UserSelector = () => { - - + { Failed to fetch users: {error.message} ) : ( - No user found + No user found )} - + {isPending && (
@@ -107,11 +107,11 @@ export const UserSelector = () => { )} {isSuccess && ( - + 7 ? 'h-full md:h-[210px]' : ''}> {users.map((user) => { return ( - {

{impersonatingUser?.id === user.id && }
- + ) })} - + )} -
-
+ +
diff --git a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AwsRegionSelector.tsx b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AwsRegionSelector.tsx index f6682a1b187..6cbbdfab020 100644 --- a/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AwsRegionSelector.tsx +++ b/apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/AwsRegionSelector.tsx @@ -3,12 +3,12 @@ import { useId, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, FormControl, Popover, PopoverContent, @@ -78,14 +78,14 @@ export const AwsRegionSelector = ({ - - - - No regions found. - + + + + No regions found. + {AWS_IDP_REGIONS.map((option) => ( - { @@ -97,12 +97,12 @@ export const AwsRegionSelector = ({ className={cn('mr-2 h-4 w-4', option === value ? 'opacity-100' : 'opacity-0')} /> {option} - + ))} - - - + + + ) diff --git a/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/NewPaymentMethodElement.tsx b/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/NewPaymentMethodElement.tsx index 83160919291..6c6abcc3d92 100644 --- a/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/NewPaymentMethodElement.tsx +++ b/apps/studio/components/interfaces/Billing/Payment/PaymentMethods/NewPaymentMethodElement.tsx @@ -20,12 +20,12 @@ import { Button, Checkbox, cn, - Command_Shadcn_ as Command, - CommandEmpty_Shadcn_ as CommandEmpty, - CommandGroup_Shadcn_ as CommandGroup, - CommandInput_Shadcn_ as CommandInput, - CommandItem_Shadcn_ as CommandItem, - CommandList_Shadcn_ as CommandList, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, FormControl, FormField, FormItem, diff --git a/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx b/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx index 7fcc00cc2e9..544de78c274 100644 --- a/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx +++ b/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx @@ -1,12 +1,12 @@ import { Check, GitMerge, Shield } from 'lucide-react' import { useState } from 'react' import { - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -68,14 +68,14 @@ export const BranchSelector = ({ - - - - No available branches found - + + + + No available branches found + {availableBranches.map((branch) => ( - Synced to a Git branch} {branch.review_requested_at && Merge request opened} - + ))} - - - + + + ) diff --git a/apps/studio/components/interfaces/Connect/ConnectDropdown.tsx b/apps/studio/components/interfaces/Connect/ConnectDropdown.tsx index 70a25816e18..a2a0b30e9b0 100644 --- a/apps/studio/components/interfaces/Connect/ConnectDropdown.tsx +++ b/apps/studio/components/interfaces/Connect/ConnectDropdown.tsx @@ -3,12 +3,12 @@ import { useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -73,13 +73,13 @@ export const ConnectDropdown = ({ - - - - No results found. - + + + + No results found. + {items.map((item) => ( - { @@ -102,11 +102,11 @@ export const ConnectDropdown = ({ size={15} className={cn('ml-auto ', item.key === state ? 'opacity-100' : 'opacity-0')} /> - + ))} - - - + + + ) diff --git a/apps/studio/components/interfaces/ConnectSheet/FrameworkSelector.tsx b/apps/studio/components/interfaces/ConnectSheet/FrameworkSelector.tsx index 1d372e1bdf2..1bf01b509d2 100644 --- a/apps/studio/components/interfaces/ConnectSheet/FrameworkSelector.tsx +++ b/apps/studio/components/interfaces/ConnectSheet/FrameworkSelector.tsx @@ -3,12 +3,12 @@ import { useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -64,13 +64,13 @@ export const FrameworkSelector = ({ align="start" onOpenAutoFocus={(e) => e.preventDefault()} > - - - - No results found. - + + + + No results found. + {items.map((item) => ( - handleSelect(item.key)} @@ -82,11 +82,11 @@ export const FrameworkSelector = ({ size={15} className={cn('ml-auto', item.key === value ? 'opacity-100' : 'opacity-0')} /> - + ))} - - - + + + ) diff --git a/apps/studio/components/interfaces/Database/Backups/PITR/TimezoneSelection.tsx b/apps/studio/components/interfaces/Database/Backups/PITR/TimezoneSelection.tsx index a0a8d24f945..028bd48a27c 100644 --- a/apps/studio/components/interfaces/Database/Backups/PITR/TimezoneSelection.tsx +++ b/apps/studio/components/interfaces/Database/Backups/PITR/TimezoneSelection.tsx @@ -3,12 +3,12 @@ import { useId, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -51,14 +51,14 @@ export const TimezoneSelection = ({ - - - - No timezones found... - + + + + No timezones found... + {timezoneOptions.map((option) => ( - { @@ -78,12 +78,12 @@ export const TimezoneSelection = ({ selectedTimezone.text === option ? 'opacity-100' : 'opacity-0' )} /> - + ))} - - - + + + diff --git a/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx b/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx index 68e89737b64..270350ebba9 100644 --- a/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx +++ b/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx @@ -5,12 +5,12 @@ import { toast } from 'sonner' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -195,20 +195,20 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp - - + - 7 && 'max-h-[210px]! overflow-y-auto')} onWheel={(event) => event.stopPropagation()} > - No schemas found - + No schemas found + {(schemas ?? []).map((schema) => ( - { @@ -222,11 +222,11 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp {selectedSchema === schema.name && ( )} - + ))} - - - + + + @@ -264,17 +264,17 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp {/* [Terry] shouldFilter context: https://github.com/pacocoursey/cmdk/issues/267#issuecomment-2252717107 */} - - + - 7 && 'max-h-[210px]! overflow-y-auto')} onWheel={(event) => event.stopPropagation()} > - + {isLoadingEntities ? (
@@ -283,10 +283,10 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp ) : ( 'No tables found' )} - - + + {entityTypes.map((entity) => ( - { @@ -302,11 +302,11 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp {selectedEntity === entity.name && ( )} - + ))} - - - + + + diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx index 158a21ab7b4..dd4e9fea9a3 100644 --- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx +++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx @@ -5,13 +5,13 @@ import { Badge, Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Popover, PopoverContent, PopoverTrigger, @@ -74,8 +74,8 @@ export const PublicationsComboBox = ({ - - +
- - + + {isLoadingPublications ? (
@@ -96,9 +96,9 @@ export const PublicationsComboBox = ({ ) : ( 'No publications found' )} - + - + {publications.length === 0 && (

No publications available @@ -106,7 +106,7 @@ export const PublicationsComboBox = ({ )} 7 ? 'h-[210px]' : ''}> {publications.map((pub) => ( - { @@ -128,25 +128,25 @@ export const PublicationsComboBox = ({ )}

- + ))} - + - + - - +

New publication

-
-
-
-
+ + + +
) diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx index 774959c9006..d14d8bd5f7e 100644 --- a/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx +++ b/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx @@ -6,12 +6,12 @@ import { UseFormReturn } from 'react-hook-form' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, FormControl, FormField, FormItem, @@ -152,15 +152,15 @@ export const EdgeFunctionSection = ({ form }: HTTPRequestFieldsProps) => { - - - - No edge function found. - + + + + No edge function found. + 7 ? 'h-[210px]' : ''}> {edgeFunctions.map((fn) => { return ( - { @@ -175,13 +175,13 @@ export const EdgeFunctionSection = ({ form }: HTTPRequestFieldsProps) => { )} /> {fn.name} - + ) })} - - - + + + diff --git a/apps/studio/components/interfaces/Integrations/Vercel/OrganizationPicker.tsx b/apps/studio/components/interfaces/Integrations/Vercel/OrganizationPicker.tsx index 6cbda52b97e..e3426736122 100644 --- a/apps/studio/components/interfaces/Integrations/Vercel/OrganizationPicker.tsx +++ b/apps/studio/components/interfaces/Integrations/Vercel/OrganizationPicker.tsx @@ -4,12 +4,12 @@ import { Badge, Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -85,14 +85,14 @@ const OrganizationPicker = ({ - - - - No results found. - + + + + No results found. + {organizationsData?.map((org) => { return ( - Integration Installed )} - + ) })} - - - + + + diff --git a/apps/studio/components/interfaces/Integrations/VercelGithub/ProjectLinker.tsx b/apps/studio/components/interfaces/Integrations/VercelGithub/ProjectLinker.tsx index f08401a8858..4a790b302e5 100644 --- a/apps/studio/components/interfaces/Integrations/VercelGithub/ProjectLinker.tsx +++ b/apps/studio/components/interfaces/Integrations/VercelGithub/ProjectLinker.tsx @@ -7,13 +7,13 @@ import { Badge, Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Popover, PopoverContent, PopoverTrigger, @@ -262,8 +262,8 @@ const ProjectLinker = ({ renderActions={() => { return ( projectCreationEnabled && ( - - + { setOpenProjectsDropdown(false) @@ -281,8 +281,8 @@ const ProjectLinker = ({

Create a new project

-
-
+ + ) ) }} @@ -324,14 +324,14 @@ const ProjectLinker = ({ - - - - No results found. - + + + + No results found. + {foreignProjects.map((project, i) => { return ( - {project.name} - + ) })} {foreignProjects.length === 0 && ( - No results found. + No results found. )} - + {mode === 'GitHub' && ( <> - - - + + openInstallGitHubIntegrationWindow('install')} > Add GitHub Repositories - - + + )} - - + + diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/ColumnType.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/ColumnType.tsx index e258d44edc6..634cc26a74f 100644 --- a/apps/studio/components/interfaces/Integrations/Wrappers/ColumnType.tsx +++ b/apps/studio/components/interfaces/Integrations/Wrappers/ColumnType.tsx @@ -17,13 +17,13 @@ import { AlertTitle, Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, CriticalIcon, FormControl, FormField, @@ -159,20 +159,20 @@ export const ColumnType = ({ - - + - Type not found. + Type not found. - + - + {POSTGRES_DATA_TYPE_OPTIONS.map((option: PostgresDataTypeOption) => ( - - + ))} - + {enumTypes.length > 0 && ( <> - - + + {enumTypes.map((option) => ( - )} - + ))} - + )} - - + + {showRecommendation && recommendation !== undefined && ( diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx index 12afee25856..ae230c6fe10 100644 --- a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx +++ b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx @@ -12,12 +12,12 @@ import { import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Form, FormControl, FormField, @@ -136,14 +136,14 @@ const WrapperTableEditor = ({ - - - - No targets found - + + + + No targets found + 7 ? 'h-[200px]' : ''}> {(tables ?? []).map((table, i) => ( - { @@ -162,12 +162,12 @@ const WrapperTableEditor = ({ {String(i) === selectedTableIndex && ( )} - + ))} - - - + + + diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerDataForm.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerDataForm.tsx index a91acb83ca6..522214d7b79 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerDataForm.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingCustomerData/BillingCustomerDataForm.tsx @@ -10,12 +10,12 @@ import { UseFormReturn } from 'react-hook-form' import { Button, cn, - Command_Shadcn_ as Command, - CommandEmpty_Shadcn_ as CommandEmpty, - CommandGroup_Shadcn_ as CommandGroup, - CommandInput_Shadcn_ as CommandInput, - CommandItem_Shadcn_ as CommandItem, - CommandList_Shadcn_ as CommandList, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, FormControl, FormField, FormMessage, diff --git a/apps/studio/components/interfaces/Organization/PrivateApps/Apps/CreateAppSheet/CreateAppSheet.tsx b/apps/studio/components/interfaces/Organization/PrivateApps/Apps/CreateAppSheet/CreateAppSheet.tsx index 1128f408b19..5f603fa83c4 100644 --- a/apps/studio/components/interfaces/Organization/PrivateApps/Apps/CreateAppSheet/CreateAppSheet.tsx +++ b/apps/studio/components/interfaces/Organization/PrivateApps/Apps/CreateAppSheet/CreateAppSheet.tsx @@ -5,12 +5,12 @@ import { toast } from 'sonner' import { Button, Checkbox, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Input, Popover, PopoverContent, @@ -206,14 +206,14 @@ export function CreateAppSheet({ visible, onClose, onCreated }: CreateAppSheetPr - - - - No permissions found. - + + + + No permissions found. +
{PERMISSIONS.map((perm) => ( - toggle(perm.id)} @@ -230,12 +230,12 @@ export function CreateAppSheet({ visible, onClose, onCreated }: CreateAppSheetPr {perm.label}
- + ))} -
-
-
+ + +
diff --git a/apps/studio/components/interfaces/Organization/Usage/Usage.tsx b/apps/studio/components/interfaces/Organization/Usage/Usage.tsx index 4c0c21f4a8c..f9221c0ae2f 100644 --- a/apps/studio/components/interfaces/Organization/Usage/Usage.tsx +++ b/apps/studio/components/interfaces/Organization/Usage/Usage.tsx @@ -5,7 +5,7 @@ import { Check, ChevronDown } from 'lucide-react' import Link from 'next/link' import { useQueryState } from 'nuqs' import { useMemo, useState } from 'react' -import { Button, cn, CommandGroup_Shadcn_, CommandItem_Shadcn_ } from 'ui' +import { Button, cn, CommandGroup, CommandItem } from 'ui' import { Admonition } from 'ui-patterns' import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader' @@ -191,8 +191,8 @@ export const Usage = () => { ) }} renderActions={() => ( - - + { setOpenProjectSelector(false) @@ -205,8 +205,8 @@ export const Usage = () => { > All projects {!selectedProjectRef && } - - + + )} /> diff --git a/apps/studio/components/interfaces/ProjectAPIDocs/LanguageSelector.tsx b/apps/studio/components/interfaces/ProjectAPIDocs/LanguageSelector.tsx index ca77123d885..1f4b2119ec6 100644 --- a/apps/studio/components/interfaces/ProjectAPIDocs/LanguageSelector.tsx +++ b/apps/studio/components/interfaces/ProjectAPIDocs/LanguageSelector.tsx @@ -2,10 +2,10 @@ import { ChevronDown, Terminal } from 'lucide-react' import { useState } from 'react' import { Button, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -58,26 +58,26 @@ const LanguageSelector = ({ simplifiedVersion = false }: LanguageSelectorProps) - - - - + + + updateLanguage('js')} onClick={() => updateLanguage('js')} >

Javascript

-
- + updateLanguage('bash')} onClick={() => updateLanguage('bash')} >

Bash

-
-
-
-
+ + + +
diff --git a/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.ResourcePicker.tsx b/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.ResourcePicker.tsx index a0f04bcfd68..dd30ddfade3 100644 --- a/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.ResourcePicker.tsx +++ b/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.ResourcePicker.tsx @@ -1,10 +1,4 @@ -import { - cn, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, -} from 'ui' +import { cn, Command, CommandGroup, CommandItem, CommandList } from 'ui' import type { ResourcePickerRenderProps } from './SecondLevelNav.Layout' @@ -28,18 +22,18 @@ export const ResourcePickerList = ({ } return ( - - - + + + {items.length === 0 && ( - +

{emptyMessage}

-
+ )} {items.map((item) => { const isActive = item.name === selectedResource return ( - handleSelect(item.name)} >

{item.name}

-
+ ) })} -
-
-
+ + + ) } diff --git a/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.StoragePicker.tsx b/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.StoragePicker.tsx index 3433213358d..60cdc1e505f 100644 --- a/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.StoragePicker.tsx +++ b/apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.StoragePicker.tsx @@ -1,15 +1,7 @@ import { keepPreviousData } from '@tanstack/react-query' import { useDebounce, useIntersectionObserver } from '@uidotdev/usehooks' import { useEffect, useMemo, useRef, useState } from 'react' -import { - cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, -} from 'ui' +import { cn, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from 'ui' import type { ResourcePickerRenderProps } from './SecondLevelNav.Layout' import { usePaginatedBucketsQuery } from '@/data/storage/buckets-query' @@ -101,22 +93,19 @@ export const StorageResourceList = ({ rawQuery.length > 0 ? 'No buckets found for this search' : 'No buckets available' return ( - - + setSearch('')} /> - - - +
+ {isFetching && buckets.length === 0 ? (
Loading buckets...
) : ( @@ -124,7 +113,7 @@ export const StorageResourceList = ({ {buckets.map((bucket) => { const isActive = bucket.name === selectedResource return ( - handleSelect(bucket.name)} >

{bucket.name}

-
+ ) })} {hasNextPage &&
}
)} - +
{isFetchingNextPage && (
Loading more buckets...
)} - - + + ) } diff --git a/apps/studio/components/interfaces/ProjectHome/SnippetDropdown.tsx b/apps/studio/components/interfaces/ProjectHome/SnippetDropdown.tsx index 5fefc1ce491..fc197b07526 100644 --- a/apps/studio/components/interfaces/ProjectHome/SnippetDropdown.tsx +++ b/apps/studio/components/interfaces/ProjectHome/SnippetDropdown.tsx @@ -3,11 +3,11 @@ import { useDebounce, useIntersectionObserver } from '@uidotdev/usehooks' import { Plus } from 'lucide-react' import { ReactNode, useEffect, useMemo, useRef, useState } from 'react' import { - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandInput, + CommandItem, + CommandList, DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, @@ -91,8 +91,8 @@ export const SnippetDropdown = ({ align={align} className={['w-80 p-0', className].filter(Boolean).join(' ')} > - - + setSearch('')} /> - + {isLoading ? (

Loading...

) : search.length > 0 && snippets.length === 0 ? (

No snippets found

) : ( - + 7 ? 'h-[210px]' : ''}> {snippets.map((snippet) => ( - onSelect({ id: snippet.id, name: snippet.name })} > {snippet.name} - + ))}
{hasNextPage && ( @@ -124,13 +124,13 @@ export const SnippetDropdown = ({
)}
-
+ )}
- - + { setOpen(false) @@ -142,10 +142,10 @@ export const SnippetDropdown = ({

Create snippet

- - -
-
+ + + + ) diff --git a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/TableSelector.tsx b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/TableSelector.tsx index b6ed1cb238f..8d8b07df62e 100644 --- a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/TableSelector.tsx +++ b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeFilterPopover/TableSelector.tsx @@ -6,12 +6,12 @@ import { AlertDescription, AlertTitle, Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -101,12 +101,9 @@ const TableSelector = ({ - - searchTables(str)} - /> - + + searchTables(str)} /> + {isLoading && (
@@ -128,13 +125,11 @@ const TableSelector = ({ {isSuccess && ( <> - + 7 ? 'h-[210px]' : ''}> - {entities.length === 0 && ( - No tables found - )} + {entities.length === 0 && No tables found} {!searchInput && ( - { @@ -150,10 +145,10 @@ const TableSelector = ({ {selectedSchemaName === '*' && ( )} - + )} {entities?.map((table) => ( - { @@ -169,14 +164,14 @@ const TableSelector = ({ {selectedSchemaName === table.name && ( )} - + ))} - + )} - - + +
diff --git a/apps/studio/components/interfaces/Reports/MetricOptions.tsx b/apps/studio/components/interfaces/Reports/MetricOptions.tsx index 831f2eead53..d6066f2f987 100644 --- a/apps/studio/components/interfaces/Reports/MetricOptions.tsx +++ b/apps/studio/components/interfaces/Reports/MetricOptions.tsx @@ -3,11 +3,11 @@ import { useParams } from 'common' import { Home, Plus } from 'lucide-react' import { useState } from 'react' import { - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandInput, + CommandItem, + CommandList, DropdownMenuCheckboxItem, DropdownMenuPortal, DropdownMenuSub, @@ -118,14 +118,14 @@ export const MetricOptions = ({ config, handleChartSelection }: MetricOptionsPro - - + - + {isLoading ? (
@@ -136,9 +136,9 @@ export const MetricOptions = ({ config, handleChartSelection }: MetricOptionsPro No snippets found

) : null} - + {snippets?.map((snippet) => ( - {snippet.name} - + ))} - - + +
- - + { editorPanelState.openAsNew() @@ -182,9 +182,9 @@ export const MetricOptions = ({ config, handleChartSelection }: MetricOptionsPro

Create snippet

- - - + + + diff --git a/apps/studio/components/interfaces/Reports/ReportFilterPopover.tsx b/apps/studio/components/interfaces/Reports/ReportFilterPopover.tsx index 1d76a03b682..da045344504 100644 --- a/apps/studio/components/interfaces/Reports/ReportFilterPopover.tsx +++ b/apps/studio/components/interfaces/Reports/ReportFilterPopover.tsx @@ -4,12 +4,12 @@ import { KeyboardEvent, useCallback, useEffect, useMemo, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Input, Popover, PopoverContent, @@ -79,8 +79,8 @@ const FilterableInput = ({ return (
- - + 0 && 'opacity-100 pointer-events-auto' )} > - - + + No matching options found. Press Enter to use "{inputValue}" - - + + {safeOptions.map((option, index) => ( - handleOptionSelect(option)} className="px-3 py-2 text-sm cursor-pointer" > {option} - + ))} - - + +
- + {isOpen &&
setIsOpen(false)} />}
) diff --git a/apps/studio/components/interfaces/Reports/v2/ReportsSelectFilter.tsx b/apps/studio/components/interfaces/Reports/v2/ReportsSelectFilter.tsx index fd06a093715..fe867b3c256 100644 --- a/apps/studio/components/interfaces/Reports/v2/ReportsSelectFilter.tsx +++ b/apps/studio/components/interfaces/Reports/v2/ReportsSelectFilter.tsx @@ -4,15 +4,7 @@ import { Label } from '@ui/components/shadcn/ui/label' import { Popover, PopoverContent, PopoverTrigger } from '@ui/components/shadcn/ui/popover' import { ChevronDown } from 'lucide-react' import { useEffect, useState } from 'react' -import { - Button, - cn, - Command_Shadcn_ as Command, - CommandEmpty_Shadcn_ as CommandEmpty, - CommandInput_Shadcn_ as CommandInput, - CommandItem_Shadcn_, - CommandList_Shadcn_ as CommandList, -} from 'ui' +import { Button, cn, Command, CommandEmpty, CommandInput, CommandItem, CommandList } from 'ui' import { z } from 'zod' export interface ReportSelectOption { @@ -95,7 +87,7 @@ export const ReportsSelectFilter = ({ No options found. {options.map((option) => ( - + - + ))} diff --git a/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx b/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx index c34f80e9079..981f001b6b7 100644 --- a/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx +++ b/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx @@ -7,13 +7,13 @@ import { useForm } from 'react-hook-form' import { toast } from 'sonner' import { Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Dialog, DialogContent, DialogDescription, @@ -252,13 +252,13 @@ export const MoveQueryModal = ({ visible, snippets = [], onClose }: MoveQueryMod - - - - No folders found - + + + + No folders found + 6 ? 'h-[210px]' : ''}> - {selectedId === 'root' && } - + {folders?.map((folder) => ( - {folder.id === selectedId && } - + ))} - - - - + + + { setOpen(false) @@ -319,10 +319,10 @@ export const MoveQueryModal = ({ visible, snippets = [], onClose }: MoveQueryMod >

New folder

-
-
-
-
+ + + +
diff --git a/apps/studio/components/interfaces/Settings/API/ExposedFunctionSelector.tsx b/apps/studio/components/interfaces/Settings/API/ExposedFunctionSelector.tsx index e7f1cee472e..3e8041fa35f 100644 --- a/apps/studio/components/interfaces/Settings/API/ExposedFunctionSelector.tsx +++ b/apps/studio/components/interfaces/Settings/API/ExposedFunctionSelector.tsx @@ -5,11 +5,11 @@ import { useEffect, useMemo, useRef, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -126,15 +126,15 @@ export const ExposedFunctionSelector = ({ align="start" sameWidthAsTrigger > - - + - - + + {isPending ? ( <>
@@ -179,7 +179,7 @@ export const ExposedFunctionSelector = ({ }) return ( -
- + ) })}
@@ -278,9 +278,9 @@ export const ExposedFunctionSelector = ({ )} - - - + + + ) diff --git a/apps/studio/components/interfaces/Settings/API/ExposedSchemaSelector.tsx b/apps/studio/components/interfaces/Settings/API/ExposedSchemaSelector.tsx index 396ef368cfa..596d9541816 100644 --- a/apps/studio/components/interfaces/Settings/API/ExposedSchemaSelector.tsx +++ b/apps/studio/components/interfaces/Settings/API/ExposedSchemaSelector.tsx @@ -3,12 +3,12 @@ import { useMemo, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -85,10 +85,10 @@ export const ExposedSchemaSelector = ({ align="start" sameWidthAsTrigger > - - - - + + + + {isPending ? ( <>
@@ -104,17 +104,17 @@ export const ExposedSchemaSelector = ({
) : ( <> - +

No schemas found

-
+ 7 ? 'h-[210px]' : ''}> {schemas.map((schema) => { const isExposed = selectedSet.has(schema.name) return ( - } {schema.name}
- + ) })} )} -
-
-
+ +
+
) diff --git a/apps/studio/components/interfaces/Settings/API/ExposedTableSelector.tsx b/apps/studio/components/interfaces/Settings/API/ExposedTableSelector.tsx index e7ecfd3411b..21695b9105a 100644 --- a/apps/studio/components/interfaces/Settings/API/ExposedTableSelector.tsx +++ b/apps/studio/components/interfaces/Settings/API/ExposedTableSelector.tsx @@ -5,11 +5,11 @@ import { useEffect, useMemo, useRef, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -120,15 +120,15 @@ export const ExposedTableSelector = ({ align="start" sameWidthAsTrigger > - - + - - + + {isPending ? ( <>
@@ -173,7 +173,7 @@ export const ExposedTableSelector = ({ }) return ( -
- + ) })}
@@ -272,9 +272,9 @@ export const ExposedTableSelector = ({ )} - - - + + + ) diff --git a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubRepositoryField.tsx b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubRepositoryField.tsx index e76a04a69dc..0fda2c6dfee 100644 --- a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubRepositoryField.tsx +++ b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubRepositoryField.tsx @@ -3,13 +3,13 @@ import { useMemo, useState, type ComponentProps, type ReactNode } from 'react' import type { FieldValues, Path, UseFormReturn } from 'react-hook-form' import { Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, FormControl, FormField, Popover, @@ -174,14 +174,14 @@ export const GitHubRepositoryField = ({ - - - - No repositories found. + + + + No repositories found. {repositories.length > 0 ? ( - + {repositories.map((repo) => ( - ({ {repo.name} - + ))} - + ) : null} - - + { setIsRepoSelectorOpen(false) @@ -222,13 +222,13 @@ export const GitHubRepositoryField = ({ > Add GitHub Repositories - - + + {hasPartialResponseDueToSSO && ( <> - - - + + { setIsRepoSelectorOpen(false) @@ -239,12 +239,12 @@ export const GitHubRepositoryField = ({
Re-authorize GitHub with SSO to show all repositories
-
-
+ + )} -
-
+ +
)} diff --git a/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx b/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx index b7fab29a9ff..1fa3d8900a7 100644 --- a/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx +++ b/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx @@ -7,12 +7,12 @@ import { Badge, Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, copyToClipboard, DropdownMenu, DropdownMenuContent, @@ -280,13 +280,13 @@ const LogsQueryPanel = ({ - - - - No source found. - + + + + No source found. + {logConstants.schemas.map((schema) => ( - { @@ -301,11 +301,11 @@ const LogsQueryPanel = ({ )} /> {schema.name} - + ))} - - - + + + - - - - + + + onLanguageChange('sql')} onClick={() => onLanguageChange('sql')} >

SQL

-
- + onLanguageChange('javascript')} onClick={() => onLanguageChange('javascript')} >

JavaScript

-
-
-
-
+ + + +
diff --git a/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsx b/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsx index af6ef46f857..983c187e708 100644 --- a/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsx +++ b/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsx @@ -6,7 +6,7 @@ import { Check, ChevronsUpDown, ExternalLink } from 'lucide-react' import Link from 'next/link' import type { UseFormReturn } from 'react-hook-form' import { toast } from 'sonner' -import { Button, cn, CommandGroup_Shadcn_, CommandItem_Shadcn_, FormControl, FormField } from 'ui' +import { Button, cn, CommandGroup, CommandItem, FormControl, FormField } from 'ui' import { Admonition } from 'ui-patterns' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import ShimmeringLoader from 'ui-patterns/ShimmeringLoader' @@ -99,8 +99,8 @@ function ProjectSelector({ form, orgSlug, projectRef }: ProjectSelectorProps) { ) }} renderActions={(setOpen) => ( - - + { field.onChange(NO_PROJECT_MARKER) @@ -111,8 +111,8 @@ function ProjectSelector({ form, orgSlug, projectRef }: ProjectSelectorProps) {

No specific project

-
-
+ + )} /> diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx index 887951359dc..b01df7bc81b 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx @@ -17,13 +17,13 @@ import { AlertTitle, Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, CriticalIcon, Input, InputGroup, @@ -209,22 +209,22 @@ const ColumnType = ({ - - + - Type not found. + Type not found. - + - + {POSTGRES_DATA_TYPE_OPTIONS.map((option: PostgresDataTypeOption) => { const isSelected = matchesBuiltin(option.name, value) return ( - {isSelected ? : ''} - + ) })} - + {enumTypes.length > 0 && ( <> - - + + {enumTypes.map((option) => { const isSelected = matchesEnum(option, value) return ( - )} - + ) })} - + )} - - + + diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx index 9bb7473f3b3..d203b1232ea 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx @@ -7,11 +7,11 @@ import { Button, Checkbox, cn, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandGroup, + CommandItem, + CommandList, + CommandSeparator, Input, Popover, PopoverContent, @@ -167,16 +167,16 @@ export const Column = ({
Involved in {relations.length} foreign key{relations.length > 1 ? 's' : ''}
- - - + + + {relations.map((relation, idx) => { const key = String(relation?.id ?? `${column.id}-relation-${idx}`) const status = getRelationStatus(relation) if (status === 'REMOVE') return null return ( - )} - + ) })} - - - - + + + onEditForeignKey()} onClick={() => onEditForeignKey()} >

Add foreign key relation

-
-
-
-
+ + + + )} diff --git a/apps/studio/components/interfaces/UserDropdown/TimezoneDropdown.tsx b/apps/studio/components/interfaces/UserDropdown/TimezoneDropdown.tsx index f6e7cf989be..16fcc29ce99 100644 --- a/apps/studio/components/interfaces/UserDropdown/TimezoneDropdown.tsx +++ b/apps/studio/components/interfaces/UserDropdown/TimezoneDropdown.tsx @@ -2,12 +2,12 @@ import { CheckIcon } from 'lucide-react' import { useMemo, useState } from 'react' import { cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, @@ -59,13 +59,13 @@ export const TimezoneDropdown = () => { - - - - No timezones found - + + + + No timezones found + - handleSelect('')} @@ -80,12 +80,12 @@ export const TimezoneDropdown = () => { isAutoDetected ? 'opacity-100' : 'opacity-0' )} /> - + {TIMEZONES_BY_IANA.map((entry) => { const ianaName = entry.utc[0] const isSelected = !isAutoDetected && storedTimezone === ianaName return ( - { isSelected ? 'opacity-100' : 'opacity-0' )} /> - + ) })} - - - + + + diff --git a/apps/studio/components/layouts/AppLayout/BranchDropdownCommandContent.tsx b/apps/studio/components/layouts/AppLayout/BranchDropdownCommandContent.tsx index 216164c180f..54a044c8e8b 100644 --- a/apps/studio/components/layouts/AppLayout/BranchDropdownCommandContent.tsx +++ b/apps/studio/components/layouts/AppLayout/BranchDropdownCommandContent.tsx @@ -3,13 +3,13 @@ import Link from 'next/link' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, ScrollArea, } from 'ui' @@ -46,7 +46,7 @@ export function BranchDropdownCommandContent({ if (embedded) { return ( - +
{isBranchingEnabled && ( - + )} - - {isBranchingEnabled && No branches found} - + + {isBranchingEnabled && No branches found} + {branchList.map((branch) => ( ))} - - -
+ + + ) } return ( - - {isBranchingEnabled && } - - {isBranchingEnabled && No branches found} - + + {isBranchingEnabled && } + + {isBranchingEnabled && No branches found} + {branchList.map((branch) => ( ))} - + - + - - + { track('branch_selector_create_clicked') @@ -148,8 +148,8 @@ export function BranchDropdownCommandContent({

Create branch

-
- + { track('branch_selector_manage_clicked') @@ -163,13 +163,13 @@ export function BranchDropdownCommandContent({

Manage branches

-
-
+ + - + - - + { onClose() @@ -190,9 +190,9 @@ export function BranchDropdownCommandContent({

Join GitHub Discussion

-
-
-
-
+ + + + ) } diff --git a/apps/studio/components/layouts/AppLayout/BranchLink.tsx b/apps/studio/components/layouts/AppLayout/BranchLink.tsx index 32cdce43d41..aa65952f733 100644 --- a/apps/studio/components/layouts/AppLayout/BranchLink.tsx +++ b/apps/studio/components/layouts/AppLayout/BranchLink.tsx @@ -1,7 +1,7 @@ import { Check, Shield } from 'lucide-react' import Link from 'next/link' import { useRouter } from 'next/router' -import { CommandItem_Shadcn_ } from 'ui' +import { CommandItem } from 'ui' import { sanitizeRoute } from './ProjectDropdown.utils' import type { Branch } from '@/data/branches/branches-query' @@ -22,7 +22,7 @@ export function BranchLink({ branch, isSelected, onClose }: BranchLinkProps) { return ( - { @@ -38,7 +38,7 @@ export function BranchLink({ branch, isSelected, onClose }: BranchLinkProps) { {branch.name}

{isSelected && } -
+ ) } diff --git a/apps/studio/components/layouts/AppLayout/OrgCommandItem.tsx b/apps/studio/components/layouts/AppLayout/OrgCommandItem.tsx index cfd09ee9d27..a4a0e712248 100644 --- a/apps/studio/components/layouts/AppLayout/OrgCommandItem.tsx +++ b/apps/studio/components/layouts/AppLayout/OrgCommandItem.tsx @@ -1,6 +1,6 @@ import { Check } from 'lucide-react' import Link from 'next/link' -import { cn, CommandItem_Shadcn_ } from 'ui' +import { cn, CommandItem } from 'ui' import PartnerIcon from '@/components/ui/PartnerIcon' import type { Organization } from '@/types' @@ -25,7 +25,7 @@ export function OrgCommandItem({ const href = hasRouteSlug ? routePathname.replace('[slug]', org.slug) : `/org/${org.slug}` return ( - {org.slug === selectedSlug && } - + ) } diff --git a/apps/studio/components/layouts/AppLayout/OrganizationDropdownCommandContent.tsx b/apps/studio/components/layouts/AppLayout/OrganizationDropdownCommandContent.tsx index 78a395fa35e..3eb12d3705c 100644 --- a/apps/studio/components/layouts/AppLayout/OrganizationDropdownCommandContent.tsx +++ b/apps/studio/components/layouts/AppLayout/OrganizationDropdownCommandContent.tsx @@ -3,13 +3,13 @@ import Link from 'next/link' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, ScrollArea, } from 'ui' @@ -55,7 +55,7 @@ export function OrganizationDropdownCommandContent({ if (embedded) { return ( - +
- - - No organizations found - {orgList} - -
+ + No organizations found + {orgList} + + ) } return ( - - - - No organizations found - + + + + No organizations found + 7 ? 'md:h-[210px]' : ''}> {orgList} - - - - onClose()}> + + + + onClose()}> All Organizations - - + + {organizationCreationEnabled && ( <> - - - onClose()}> + + + onClose()}>

New organization

-
-
+ + )} -
-
+ + ) } diff --git a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx index 14acd11c451..671c6947e46 100644 --- a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx +++ b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx @@ -4,7 +4,7 @@ import Link from 'next/link' import { useRouter } from 'next/router' import type { ComponentProps } from 'react' import { useState } from 'react' -import { Button, CommandGroup_Shadcn_, CommandItem_Shadcn_ } from 'ui' +import { Button, CommandGroup, CommandItem } from 'ui' import { ShimmeringLoader } from 'ui-patterns' import { AppLayoutDropdownTriggerButton } from './AppLayoutDropdown' @@ -55,8 +55,8 @@ function ProjectDropdownNewProjectActions({ } return ( - - + { onClose() @@ -68,8 +68,8 @@ function ProjectDropdownNewProjectActions({

New project

-
-
+ + ) } diff --git a/apps/studio/components/layouts/Navigation/NavigationBar/OrgSelector.tsx b/apps/studio/components/layouts/Navigation/NavigationBar/OrgSelector.tsx index d6a9f12c618..fb9f3e09b72 100644 --- a/apps/studio/components/layouts/Navigation/NavigationBar/OrgSelector.tsx +++ b/apps/studio/components/layouts/Navigation/NavigationBar/OrgSelector.tsx @@ -4,13 +4,13 @@ import Link from 'next/link' import { useRouter } from 'next/router' import { useState } from 'react' import { - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Popover, PopoverContent, PopoverTrigger, @@ -107,11 +107,11 @@ export function OrgSelector() { {triggerButton} - - - - No organizations found - + + + + No organizations found + 7 ? 'h-full md:h-[210px]' : ''} > @@ -126,10 +126,10 @@ export function OrgSelector() { /> ))} - - - - + + + { setOpen(false) @@ -140,13 +140,13 @@ export function OrgSelector() {

All Organizations

-
-
+ + {organizationCreationEnabled && ( <> - - - + + { setOpen(false) @@ -158,12 +158,12 @@ export function OrgSelector() {

New organization

-
-
+ + )} -
-
+ +
diff --git a/apps/studio/components/layouts/ProjectLayout/index.test.tsx b/apps/studio/components/layouts/ProjectLayout/index.test.tsx index da21a6aed34..bff3522e1d0 100644 --- a/apps/studio/components/layouts/ProjectLayout/index.test.tsx +++ b/apps/studio/components/layouts/ProjectLayout/index.test.tsx @@ -96,11 +96,11 @@ vi.mock('ui', () => ({ Alert: ({ children, ...props }: any) =>
{children}
, AlertDescription: ({ children, ...props }: any) =>
{children}
, AlertTitle: ({ children, ...props }: any) =>
{children}
, - CommandInput_Shadcn_: { displayName: 'CommandInput' }, - Command_Shadcn_: { displayName: 'Command' }, - CommandGroup_Shadcn_: { displayName: 'CommandGroup' }, - CommandItem_Shadcn_: { displayName: 'CommandItem' }, - CommandList_Shadcn_: { displayName: 'CommandList' }, + CommandInput: { displayName: 'CommandInput' }, + Command: { displayName: 'Command' }, + CommandGroup: { displayName: 'CommandGroup' }, + CommandItem: { displayName: 'CommandItem' }, + CommandList: { displayName: 'CommandList' }, LogoLoader: () =>
, ResizableHandle: (props: any) =>
, ResizablePanel: ({ children, ...props }: any) =>
{children}
, diff --git a/apps/studio/components/layouts/SQLEditorLayout/SqlEditor.Commands.tsx b/apps/studio/components/layouts/SQLEditorLayout/SqlEditor.Commands.tsx index 01b5961e2c0..df8be38a8f1 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/SqlEditor.Commands.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/SqlEditor.Commands.tsx @@ -4,13 +4,7 @@ import { useParams } from 'common' import { AlertTriangle, Code, Loader2, Table2 } from 'lucide-react' import { useRouter } from 'next/navigation' import { useEffect, useMemo, useRef } from 'react' -import { - cn, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, -} from 'ui' +import { cn, CommandEmpty, CommandGroup, CommandItem, CommandList } from 'ui' import { CodeBlock } from 'ui-patterns/CodeBlock' import type { CommandOptions } from 'ui-patterns/CommandMenu' import { @@ -166,17 +160,17 @@ function EmptyState({ return (

No snippets found.

- - - + + router.push(`/project/${projectRef ?? '_'}/sql/new`)} > {canCreateNew ? 'Create new snippet' : 'Run new SQL'} - - - + + +
) } @@ -198,16 +192,16 @@ function SnippetSelector({ return (
- {!!snippets && snippets.length > 0 && ( - + {snippets.map((snippet) => ( - void router.push(`/project/${projectRef ?? '_'}/sql/${snippet.id}`)} > {snippet.name} - + ))} - + )} {canCreateNew && (

- - + router.push(`/project/${projectRef ?? '_'}/sql/new`)} forceMount={true} > Create new snippet - - + +
)} -
+ - + {isLoading && } {isError && } {isSuccess && ( <> - - + + {tables?.map((table) => ( - {`${table.schema}.${table.name}`} - + ))} - + )} - + ) } diff --git a/apps/studio/components/ui/AIAssistantPanel/AIAssistantChatSelector.tsx b/apps/studio/components/ui/AIAssistantPanel/AIAssistantChatSelector.tsx index 742497e6e0b..5415702eaf6 100644 --- a/apps/studio/components/ui/AIAssistantPanel/AIAssistantChatSelector.tsx +++ b/apps/studio/components/ui/AIAssistantPanel/AIAssistantChatSelector.tsx @@ -3,13 +3,13 @@ import { useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Input, Popover, PopoverContent, @@ -97,15 +97,15 @@ export const AIAssistantChatSelector = ({ disabled = false }: AIAssistantChatSel - - - - No chats found. - + + + + No chats found. + 4 ? 'h-40' : ''}> {/* @ts-ignore */} {chats.map(([id, chat]) => ( - handleSelectChat(id)} @@ -185,13 +185,13 @@ export const AIAssistantChatSelector = ({ disabled = false }: AIAssistantChatSel )}
)} - + ))} - - - - + + + { snap.newChat() @@ -205,10 +205,10 @@ export const AIAssistantChatSelector = ({ disabled = false }: AIAssistantChatSel > Start a new chat - - - - + + + + ) diff --git a/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx b/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx index f9c4740b9a0..8e7817dad49 100644 --- a/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx +++ b/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx @@ -4,10 +4,10 @@ import { useState } from 'react' import { Badge, Button, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -64,11 +64,11 @@ export const ModelSelector = ({ selectedModel, onSelectModel }: ModelSelectorPro - - - + + + {ASSISTANT_MODELS.map((m) => ( - )} - + ))} - - - + + + ) diff --git a/apps/studio/components/ui/DataTable/DataTableViewOptions.tsx b/apps/studio/components/ui/DataTable/DataTableViewOptions.tsx index c61a2b80365..dc92700e354 100644 --- a/apps/studio/components/ui/DataTable/DataTableViewOptions.tsx +++ b/apps/studio/components/ui/DataTable/DataTableViewOptions.tsx @@ -2,12 +2,12 @@ import { GripVertical, Settings2 } from 'lucide-react' import { useId, useMemo, useState } from 'react' import { Checkbox, - Command_Shadcn_ as Command, - CommandEmpty_Shadcn_ as CommandEmpty, - CommandGroup_Shadcn_ as CommandGroup, - CommandInput_Shadcn_ as CommandInput, - CommandItem_Shadcn_ as CommandItem, - CommandList_Shadcn_ as CommandList, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, diff --git a/apps/studio/components/ui/DatabaseSelector.tsx b/apps/studio/components/ui/DatabaseSelector.tsx index 59796bb70e7..71ed1313537 100644 --- a/apps/studio/components/ui/DatabaseSelector.tsx +++ b/apps/studio/components/ui/DatabaseSelector.tsx @@ -9,10 +9,10 @@ import { Button, ButtonProps, cn, - Command_Shadcn_, - CommandGroup_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandGroup, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -123,12 +123,12 @@ export const DatabaseSelector = ({
- - + + {additionalOptions.length > 0 && ( - + {additionalOptions.map((option) => ( - {option.name}

{option.id === selectedDatabaseId && }
- + ))} - + )} - + 7 ? 'h-[210px]' : ''}> {sortedDatabases?.map((database) => { const region = formatDatabaseRegion(database.region) @@ -185,7 +185,7 @@ export const DatabaseSelector = ({ } return ( - {database.identifier === selectedDatabaseId && } - + ) })} - + {IS_PLATFORM && infrastructureReadReplicas && ( - - + { setOpen(false) @@ -235,11 +235,11 @@ export const DatabaseSelector = ({

Create a new read replica

-
-
+ + )} - - + + ) diff --git a/apps/studio/components/ui/EditorPanel/EditorPanel.tsx b/apps/studio/components/ui/EditorPanel/EditorPanel.tsx index afbecfa6363..87a4f2a8b13 100644 --- a/apps/studio/components/ui/EditorPanel/EditorPanel.tsx +++ b/apps/studio/components/ui/EditorPanel/EditorPanel.tsx @@ -19,12 +19,12 @@ import { useEffect, useRef, useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, HoverCard, HoverCardContent, HoverCardTrigger, @@ -330,23 +330,23 @@ export const EditorPanel = () => { > - - + - + {isLoadingSnippets ? (
Loading snippets...
) : ( - No snippets found. + No snippets found. )} - + {(snippetsData?.content ?? []).map((snippet) => ( - { }} > {snippet.name} - + ))} - -
-
+ + +
{templates.length > 0 && ( @@ -379,15 +379,15 @@ export const EditorPanel = () => { - - - - No templates found. - + + + + No templates found. + {templates.map((template) => ( - onSelectTemplate(template.content)} className="cursor-pointer" @@ -406,7 +406,7 @@ export const EditorPanel = () => {

-
+
{
))} -
-
-
+ + +
)} diff --git a/apps/studio/components/ui/FunctionSelector.tsx b/apps/studio/components/ui/FunctionSelector.tsx index bb99e250b85..19c206746e4 100644 --- a/apps/studio/components/ui/FunctionSelector.tsx +++ b/apps/studio/components/ui/FunctionSelector.tsx @@ -9,13 +9,13 @@ import { AlertDescription, AlertTitle, Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Popover, PopoverContent, PopoverTrigger, @@ -123,25 +123,25 @@ const FunctionSelector = ({ - - - + + event.stopPropagation() : undefined} > - No functions found - + No functions found + 7 ? 'h-[210px]' : ''}> {!functions.length && ( - {noResultsLabel} - + )} {functions.map((func) => ( - )} - + ))} - - - - + + + { setOpen(false) @@ -182,10 +182,10 @@ const FunctionSelector = ({

New function

-
-
-
-
+ + + +
)} diff --git a/apps/studio/components/ui/Logs/LogsExplorerHeader.tsx b/apps/studio/components/ui/Logs/LogsExplorerHeader.tsx index d03bb0816cf..8f530ad8036 100644 --- a/apps/studio/components/ui/Logs/LogsExplorerHeader.tsx +++ b/apps/studio/components/ui/Logs/LogsExplorerHeader.tsx @@ -5,12 +5,12 @@ import { logConstants } from 'shared-data' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, copyToClipboard, Popover, PopoverContent, @@ -115,13 +115,13 @@ const LogsExplorerHeader = ({ subtitle }: LogsExplorerHeaderProps) => { - - - - No source found. - + + + + No source found. + {logConstants.schemas.map((schema) => ( - { @@ -136,11 +136,11 @@ const LogsExplorerHeader = ({ subtitle }: LogsExplorerHeaderProps) => { )} /> {schema.name} - + ))} - - - + + +
@@ -226,7 +226,7 @@ export const OrganizationProjectSelector = ({ {renderActions(setOpen, { embedded: true })} )} - - - + {renderListContent()} - + {!!renderActions && !embedded && ( <>
{renderActions(setOpen)} )} - - + + ) if (embedded) { diff --git a/apps/studio/components/ui/OrganizationProjectSelector/ProjectCommandItem.tsx b/apps/studio/components/ui/OrganizationProjectSelector/ProjectCommandItem.tsx index 1f7b39463ae..d9076d79936 100644 --- a/apps/studio/components/ui/OrganizationProjectSelector/ProjectCommandItem.tsx +++ b/apps/studio/components/ui/OrganizationProjectSelector/ProjectCommandItem.tsx @@ -1,6 +1,6 @@ import { Check } from 'lucide-react' import { ReactNode } from 'react' -import { cn, CommandItem_Shadcn_ } from 'ui' +import { cn, CommandItem } from 'ui' import type { OrgProject } from '@/data/projects/org-projects-infinite-query' @@ -31,7 +31,7 @@ export function ProjectCommandItem({ const disabled = isOptionDisabled?.(project) ?? false return ( - }
)} - + ) } diff --git a/apps/studio/components/ui/SchemaComboBox.tsx b/apps/studio/components/ui/SchemaComboBox.tsx index 673f41754ac..ce0f5f0fc9f 100644 --- a/apps/studio/components/ui/SchemaComboBox.tsx +++ b/apps/studio/components/ui/SchemaComboBox.tsx @@ -5,12 +5,12 @@ import { AlertDescription, AlertTitle, Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -108,14 +108,14 @@ export const SchemaComboBox = ({ - - - - No schemas found - + + + + No schemas found + 7 ? 'h-[210px]' : ''}> {schemas?.map((schema) => ( - toggleSchema(schema.name)} @@ -125,12 +125,12 @@ export const SchemaComboBox = ({ {selectedSchemas.includes(schema.name) && ( )} - + ))} - - - + + + )} diff --git a/apps/studio/components/ui/SchemaSelector.tsx b/apps/studio/components/ui/SchemaSelector.tsx index 8426adf79e1..bc7832fe38c 100644 --- a/apps/studio/components/ui/SchemaSelector.tsx +++ b/apps/studio/components/ui/SchemaSelector.tsx @@ -6,13 +6,13 @@ import { AlertDescription, AlertTitle, Button, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Popover, PopoverContent, PopoverTrigger, @@ -149,16 +149,16 @@ export const SchemaSelector = forwardRef( align={align} sameWidthAsTrigger > - - - + + event.stopPropagation() : undefined} > - No schemas found - + No schemas found + 7 ? 'h-[210px]' : ''}> {supportSelectAll && ( - { @@ -174,10 +174,10 @@ export const SchemaSelector = forwardRef( {selectedSchemaName === '*' && ( )} - + )} {schemas.map((schema) => ( - { @@ -193,15 +193,15 @@ export const SchemaSelector = forwardRef( {selectedSchemaName === schema.name && ( )} - + ))} - + {onSelectCreateSchema !== undefined && canCreateSchemas && ( <> - - - + + { onSelectCreateSchema() @@ -214,12 +214,12 @@ export const SchemaSelector = forwardRef( > Create a new schema - - + + )} - - + + )} diff --git a/apps/studio/pages/project/[ref]/functions/new.tsx b/apps/studio/pages/project/[ref]/functions/new.tsx index 61bb1bd2011..6cb09a857df 100644 --- a/apps/studio/pages/project/[ref]/functions/new.tsx +++ b/apps/studio/pages/project/[ref]/functions/new.tsx @@ -10,12 +10,12 @@ import { AiIconAnimation, Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Form, FormControl, FormField, @@ -313,13 +313,13 @@ const NewFunctionPage = () => { - - - - No templates found. - + + + + No templates found. + {templates.map((template) => ( - { {template.description} - + ))} - - - + + + - - - No results found. - + + + No results found. + {COMMAND_ITEMS.map((navItem) => ( - runCommand(() => router.push(navItem.href as string))} @@ -83,29 +83,29 @@ export function CommandMenu({ ...props }: DialogProps) { {navItem.label} - + ))} - - - - runCommand(() => setTheme('light'))}> + + + + runCommand(() => setTheme('light'))}> Light - - runCommand(() => setTheme('dark'))}> + + runCommand(() => setTheme('dark'))}> Dark - - runCommand(() => setTheme('classic-dark'))}> + + runCommand(() => setTheme('classic-dark'))}> Classic dark - - runCommand(() => setTheme('system'))}> + + runCommand(() => setTheme('system'))}> System - - - + + + ) diff --git a/apps/ui-library/components/tanstack-db-generator/ComboBox.tsx b/apps/ui-library/components/tanstack-db-generator/ComboBox.tsx index 208ab15dc9c..cb5009d850e 100644 --- a/apps/ui-library/components/tanstack-db-generator/ComboBox.tsx +++ b/apps/ui-library/components/tanstack-db-generator/ComboBox.tsx @@ -6,17 +6,18 @@ import { useEffect, useRef, useState } from 'react' import { Button_Shadcn_ as Button, cn, - Command_Shadcn_ as Command, - CommandGroup_Shadcn_ as CommandGroup, - CommandInput_Shadcn_ as CommandInput, - CommandItem_Shadcn_ as CommandItem, - CommandList_Shadcn_ as CommandList, - Popover as Popover, - PopoverContent as PopoverContent, - PopoverTrigger as PopoverTrigger, + Command, + CommandGroup as CommandGroup, + CommandInput, + CommandItem as CommandItem, + CommandList as CommandList, + Popover, + PopoverContent, + PopoverTrigger, ScrollArea, } from 'ui' import ShimmeringLoader from 'ui-patterns/ShimmeringLoader' + import { useIntersectionObserver } from '@/hooks/useIntersectionObserver' export interface ComboBoxOption { diff --git a/apps/www/components/Pricing/UpgradePlan.tsx b/apps/www/components/Pricing/UpgradePlan.tsx index d0371567367..2c7b0d6297d 100644 --- a/apps/www/components/Pricing/UpgradePlan.tsx +++ b/apps/www/components/Pricing/UpgradePlan.tsx @@ -9,13 +9,13 @@ import { Button, ButtonProps, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, - CommandSeparator_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, Dialog, DialogClose, DialogContent, @@ -81,13 +81,13 @@ const UpgradePlan = ({ organizations = [], onClick, size = 'large', planId }: Up - - - - No organizations found. - + + + + No organizations found. + {organizations.map((organization) => ( - { @@ -103,12 +103,12 @@ const UpgradePlan = ({ organizations = [], onClick, size = 'large', planId }: Up )} /> {organization.name} - + ))} - - - - + + + { setValue(currentValue === value ? '' : currentValue) @@ -123,10 +123,10 @@ const UpgradePlan = ({ organizations = [], onClick, size = 'large', planId }: Up )} /> Create a new organization - - - - + + + + diff --git a/packages/ui-patterns/src/CommandMenu/api/CommandMenu.tsx b/packages/ui-patterns/src/CommandMenu/api/CommandMenu.tsx index bc0ab4c55fc..bb2cbbee04c 100644 --- a/packages/ui-patterns/src/CommandMenu/api/CommandMenu.tsx +++ b/packages/ui-patterns/src/CommandMenu/api/CommandMenu.tsx @@ -10,7 +10,7 @@ import { ErrorBoundary } from 'react-error-boundary' import { Button, cn, - Command_Shadcn_, + Command, Dialog, DialogContent, DialogDescription, @@ -50,11 +50,11 @@ function Breadcrumb({ className }: { className?: string }) { } const CommandWrapper = forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ children, className, ...props }, ref) => { return ( - {children} - + ) }) -CommandWrapper.displayName = Command_Shadcn_.displayName +CommandWrapper.displayName = Command.displayName function CommandError({ resetErrorBoundary }: { resetErrorBoundary: () => void }) { return ( diff --git a/packages/ui-patterns/src/CommandMenu/api/CommandMenuInput.tsx b/packages/ui-patterns/src/CommandMenu/api/CommandMenuInput.tsx index 8f3c33c1a66..79036c8894d 100644 --- a/packages/ui-patterns/src/CommandMenu/api/CommandMenuInput.tsx +++ b/packages/ui-patterns/src/CommandMenu/api/CommandMenuInput.tsx @@ -3,7 +3,7 @@ import { useBreakpoint, useDebounce } from 'common' import { forwardRef, useCallback, useEffect, useRef, useState } from 'react' import type React from 'react' -import { cn, CommandInput_Shadcn_ } from 'ui' +import { cn, CommandInput } from 'ui' import { useQuery, useSetQuery } from './hooks/queryHooks' import { useCommandMenuTelemetryContext } from './hooks/useCommandMenuTelemetryContext' @@ -42,8 +42,8 @@ function useFocusInputOnWiderScreens(ref: React.ForwardedRef) } const CommandMenuInput = forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => { const inputRef = useFocusInputOnWiderScreens(ref) @@ -113,7 +113,7 @@ const CommandMenuInput = forwardRef< return (
- , - React.ComponentPropsWithoutRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => { const commandSections = useCommands() const query = useQuery() @@ -26,7 +26,7 @@ const CommandMenuList = forwardRef< } return ( - ) })} - + ) }) CommandMenuList.displayName = 'CommandMenuList' diff --git a/packages/ui-patterns/src/CommandMenu/internal/CommandMenuGroup.tsx b/packages/ui-patterns/src/CommandMenu/internal/CommandMenuGroup.tsx index c100b155ef2..4d4acf40d49 100644 --- a/packages/ui-patterns/src/CommandMenu/internal/CommandMenuGroup.tsx +++ b/packages/ui-patterns/src/CommandMenu/internal/CommandMenuGroup.tsx @@ -1,14 +1,14 @@ 'use client' import { forwardRef } from 'react' -import { cn, CommandGroup_Shadcn_ } from 'ui' +import { cn, CommandGroup } from 'ui' const CommandMenuGroup = forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => { return ( - { +interface CommandItemProps extends React.ComponentPropsWithoutRef { command: ICommand } const CommandMenuItem = forwardRef< - React.ElementRef, + React.ElementRef, PropsWithChildren >(({ children, className, command: _command, ...props }, ref) => { const router = useCrossCompatRouter() @@ -95,7 +95,7 @@ const CommandMenuItem = forwardRef< } return ( - {command.badge?.()}
- + ) }) CommandMenuItem.displayName = 'CommandMenuItem' diff --git a/packages/ui-patterns/src/CommandMenu/prepackaged/DocsAi/DocsAiPage.tsx b/packages/ui-patterns/src/CommandMenu/prepackaged/DocsAi/DocsAiPage.tsx index 0d13efe3da3..f77a11be38c 100644 --- a/packages/ui-patterns/src/CommandMenu/prepackaged/DocsAi/DocsAiPage.tsx +++ b/packages/ui-patterns/src/CommandMenu/prepackaged/DocsAi/DocsAiPage.tsx @@ -5,14 +5,7 @@ import { User } from 'lucide-react' import { Fragment, useCallback, useEffect, useRef, useState } from 'react' import ReactMarkdown from 'react-markdown' import remarkGfm from 'remark-gfm' -import { - AiIconAnimation, - Button, - cn, - CommandGroup_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, -} from 'ui' +import { AiIconAnimation, Button, cn, CommandGroup, CommandItem, CommandList } from 'ui' import { markdownComponents } from 'ui-patterns/Markdown' import { StatusIcon } from 'ui/src/components/StatusIcon' @@ -195,7 +188,7 @@ function AiMessages({ messages }: { messages: Array }) { error. This display doesn't actually need the Command Menu, but it's needed for the empty state to work with the input, so this is a somewhat hacktastic way of making it not error. */} - +
void const query = useQuery() return ( - - + void {questions.map((question) => { const key = question.replace(/\s+/g, '_') return ( - { if (!query) { @@ -312,11 +305,11 @@ function EmptyState({ handleSubmit }: { handleSubmit: (message: string) => void > {question} - + ) })} - - + + ) } diff --git a/packages/ui-patterns/src/CommandMenu/prepackaged/DocsSearch/DocsSearchPage.tsx b/packages/ui-patterns/src/CommandMenu/prepackaged/DocsSearch/DocsSearchPage.tsx index 00bf0ab4d74..ba7454ba5c4 100644 --- a/packages/ui-patterns/src/CommandMenu/prepackaged/DocsSearch/DocsSearchPage.tsx +++ b/packages/ui-patterns/src/CommandMenu/prepackaged/DocsSearch/DocsSearchPage.tsx @@ -8,7 +8,7 @@ import { } from 'common' import { Book, ChevronRight, Github, Hash, Loader2, MessageSquare, Search } from 'lucide-react' import { useCallback, useEffect, useRef } from 'react' -import { Button, cn, CommandGroup_Shadcn_, CommandItem_Shadcn_, CommandList_Shadcn_ } from 'ui' +import { Button, cn, CommandGroup, CommandItem, CommandList } from 'ui' import { StatusIcon } from 'ui/src/components/StatusIcon' import { @@ -193,18 +193,18 @@ const DocsSearchPage = () => { - + {hasResults && ('results' in state ? state.results : state.staleResults).map((page, i) => { return ( - - { @@ -227,11 +227,11 @@ const DocsSearchPage = () => {
- + {page.sections.length > 0 && (
{page.sections.map((section, i) => ( - {
- + ))} )} - + ) })} {state.status === 'initial' && ( - + {questions.map((question) => { const key = question.replace(/\s+/g, '_') return ( - { @@ -287,10 +287,10 @@ const DocsSearchPage = () => { > {question} - + ) })} - + )} {state.status === 'loading' && state.staleResults.length === 0 && (
@@ -319,7 +319,7 @@ const DocsSearchPage = () => {
)} -
+ ) } diff --git a/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsx b/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsx index 288d14726f1..14fde11eb20 100644 --- a/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsx +++ b/packages/ui-patterns/src/McpUrlBuilder/components/ClientSelectDropdown.tsx @@ -5,12 +5,12 @@ import { useState } from 'react' import { Button, cn, - Command_Shadcn_, - CommandEmpty_Shadcn_, - CommandGroup_Shadcn_, - CommandInput_Shadcn_, - CommandItem_Shadcn_, - CommandList_Shadcn_, + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, Popover, PopoverContent, PopoverTrigger, @@ -50,7 +50,7 @@ export const ClientSelectDropdown = ({ function renderClient(client: McpClient) { return ( - onSelectClient(client.key)} @@ -71,7 +71,7 @@ export const ClientSelectDropdown = ({ size={15} className={cn('ml-auto', client.key === selectedClient.key ? 'opacity-100' : 'opacity-0')} /> - + ) } @@ -109,21 +109,21 @@ export const ClientSelectDropdown = ({ - - - - No results found. + + + + No results found. {groups ? ( groups.map((group) => ( - + {group.clients.map(renderClient)} - + )) ) : ( - {clients.map(renderClient)} + {clients.map(renderClient)} )} - - + + ) diff --git a/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.tsx b/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.tsx index d683197688b..3d29ab996f1 100644 --- a/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.tsx +++ b/packages/ui-patterns/src/MobileSheetNav/MobileSheetNav.tsx @@ -4,7 +4,7 @@ import { useRouter } from 'next/router' import { useEffect } from 'react' import { ErrorBoundary } from 'react-error-boundary' import { useWindowSize } from 'react-use' -import { CommandEmpty_Shadcn_, Sheet, SheetContent } from 'ui' +import { CommandEmpty, Sheet, SheetContent } from 'ui' import { cn } from 'ui/src/lib/utils' const MobileSheetNav: React.FC<{ @@ -53,7 +53,7 @@ const MobileSheetNav: React.FC<{ className )} > - }>{children} + }>{children} ) diff --git a/packages/ui-patterns/src/multi-select/multi-select.tsx b/packages/ui-patterns/src/multi-select/multi-select.tsx index 4311a2aee1f..837e273e2b9 100644 --- a/packages/ui-patterns/src/multi-select/multi-select.tsx +++ b/packages/ui-patterns/src/multi-select/multi-select.tsx @@ -8,11 +8,11 @@ import React, { isValidElement, ReactElement, useEffect } from 'react' import { Badge, cn, - Command_Shadcn_ as Command, - CommandEmpty_Shadcn_ as CommandEmpty, - CommandInput_Shadcn_ as CommandInput, - CommandItem_Shadcn_ as CommandItem, - CommandList_Shadcn_ as CommandList, + Command as Command, + CommandEmpty as CommandEmpty, + CommandInput as CommandInput, + CommandItem as CommandItem, + CommandList as CommandList, Popover, PopoverAnchor, PopoverContent, diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx index c39bd29b88d..0ad715c9a99 100644 --- a/packages/ui/index.tsx +++ b/packages/ui/index.tsx @@ -63,17 +63,7 @@ export * from './src/components/shadcn/ui/toggle-group' export * from './src/components/shadcn/ui/toggle' export * from './src/components/shadcn/ui/card' -export { - Command as Command_Shadcn_, - CommandDialog as CommandDialog, - CommandInput as CommandInput_Shadcn_, - CommandList as CommandList_Shadcn_, - CommandEmpty as CommandEmpty_Shadcn_, - CommandGroup as CommandGroup_Shadcn_, - CommandItem as CommandItem_Shadcn_, - CommandShortcut as CommandShortcut_Shadcn_, - CommandSeparator as CommandSeparator_Shadcn_, -} from './src/components/shadcn/ui/command' +export * from './src/components/shadcn/ui/command' export * from './src/components/shadcn/ui/context-menu'