Skip to content

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

Deprecate usage of Typography and remove all unused deprecated files

Joshen Lim5641fad66d87
diff --git a/studio/components/interfaces/Database/Tables/ColumnList.tsx b/studio/components/interfaces/Database/Tables/ColumnList.tsx
index 4d5e3202853..83b62b42089 100644
--- a/studio/components/interfaces/Database/Tables/ColumnList.tsx
+++ b/studio/components/interfaces/Database/Tables/ColumnList.tsx
@@ -3,7 +3,6 @@ import { observer } from 'mobx-react-lite'
import {
Input,
Button,
- Typography,
IconSearch,
IconPlus,
IconChevronLeft,
@@ -110,20 +109,16 @@ const ColumnList: FC<{
body={columns.map((x: any, i: number) => (
<Table.tr className="border-t" key={x.name}>
<Table.td>
- <Typography.Text>{x.name}</Typography.Text>
+ <p>{x.name}</p>
</Table.td>
<Table.td>
- <Typography.Text>{x.comment}</Typography.Text>
+ <p>{x.comment}</p>
</Table.td>
<Table.td>
- <Typography.Text small code>
- {x.data_type}
- </Typography.Text>
+ <code className="text-sm">{x.data_type}</code>
</Table.td>
<Table.td className="font-mono text-xs">
- <Typography.Text small code>
- {x.format}
- </Typography.Text>
+ <code className="text-sm">{x.format}</code>
</Table.td>
<Table.td className="px-4 py-3 pr-2">
<div className="flex justify-end gap-2">
diff --git a/studio/components/interfaces/Database/Tables/TableList.tsx b/studio/components/interfaces/Database/Tables/TableList.tsx
index c551ea65b51..1edbc0f357a 100644
--- a/studio/components/interfaces/Database/Tables/TableList.tsx
+++ b/studio/components/interfaces/Database/Tables/TableList.tsx
@@ -8,7 +8,6 @@ import {
IconTrash,
IconEdit3,
IconColumns,
- Typography,
} from '@supabase/ui'
import { useStore } from 'hooks'
@@ -102,23 +101,19 @@ const TableList: FC<{
body={tables.map((x: any, i: any) => (
<Table.tr key={x.id} hoverable>
<Table.td>
- <Typography.Text>{x.name}</Typography.Text>
+ <p>{x.name}</p>
</Table.td>
<Table.td>
- <Typography.Text>{x.schema}</Typography.Text>
+ <p>{x.schema}</p>
</Table.td>
<Table.td className=" hidden max-w-sm truncate lg:table-cell">
- <Typography.Text>{x.comment}</Typography.Text>
+ <p>{x.comment}</p>
</Table.td>
<Table.td className=" hidden xl:table-cell">
- <Typography.Text small code>
- {x.live_rows_estimate ?? x.live_row_count}
- </Typography.Text>
+ <code className="text-sm">{x.live_rows_estimate ?? x.live_row_count}</code>
</Table.td>
<Table.td className=" hidden xl:table-cell">
- <Typography.Text small code>
- {x.size}
- </Typography.Text>
+ <code className="text-sm">{x.size}</code>
</Table.td>
<Table.td>
<div className="flex justify-end gap-2">
diff --git a/studio/components/interfaces/Database/Triggers/ChooseFunctionForm.tsx b/studio/components/interfaces/Database/Triggers/ChooseFunctionForm.tsx
index e2887f12f3c..dd42f715384 100644
--- a/studio/components/interfaces/Database/Triggers/ChooseFunctionForm.tsx
+++ b/studio/components/interfaces/Database/Triggers/ChooseFunctionForm.tsx
@@ -1,16 +1,9 @@
-import * as React from 'react'
+import { FC, createContext, useContext, useState } from 'react'
import { useRouter } from 'next/router'
import { observer, useLocalObservable } from 'mobx-react-lite'
import { uniqBy, map as lodashMap } from 'lodash'
import { Transition } from '@headlessui/react'
-import {
- Button,
- IconChevronDown,
- IconHelpCircle,
- IconTerminal,
- SidePanel,
- Typography,
-} from '@supabase/ui'
+import { Button, IconChevronDown, IconHelpCircle, IconTerminal, SidePanel } from '@supabase/ui'
import { Dictionary } from 'components/grid'
import SqlEditor from 'components/ui/SqlEditor'
import ProductEmptyState from 'components/to-be-cleaned/ProductEmptyState'
@@ -29,7 +22,7 @@ class ChooseFunctionFormStore implements IChooseFunctionFormStore {
}
}
-const ChooseFunctionFormContext = React.createContext<IChooseFunctionFormStore | null>(null)
+const ChooseFunctionFormContext = createContext<IChooseFunctionFormStore | null>(null)
type ChooseFunctionFormProps = {
triggerFunctions: Dictionary<any>[]
@@ -38,7 +31,7 @@ type ChooseFunctionFormProps = {
setVisible: (value: boolean) => void
}
-const ChooseFunctionForm: React.FC<ChooseFunctionFormProps> = ({
+const ChooseFunctionForm: FC<ChooseFunctionFormProps> = ({
triggerFunctions,
visible,
onChange,
@@ -80,7 +73,7 @@ const ChooseFunctionForm: React.FC<ChooseFunctionFormProps> = ({
export default observer(ChooseFunctionForm)
-const NoticeBox: React.FC = ({}) => {
+const NoticeBox: FC = ({}) => {
const router = useRouter()
const { ref } = router.query
return (
@@ -104,7 +97,7 @@ const NoticeBox: React.FC = ({}) => {
)
}
-const NoFunctionsState: React.FC = ({}) => {
+const NoFunctionsState: FC = ({}) => {
// for the empty 'no tables' state link
const router = useRouter()
const { ref } = router.query
@@ -129,33 +122,29 @@ type SchemaFunctionGroupProps = {
selectFunction: (id: number) => void
}
-const SchemaFunctionGroup: React.FC<SchemaFunctionGroupProps> = observer(
- ({ schema, selectFunction }) => {
- const _pageState = React.useContext(ChooseFunctionFormContext)
- const _functions = _pageState!.triggerFunctions.filter((x) => x.schema == schema)
- return (
- <div className="space-y-4">
- <div className="sticky top-0 backdrop-filter backdrop-blur px-6 flex items-center space-x-1">
- <Typography.Title level={5} className="opacity-50">
- schema
- </Typography.Title>
- <Typography.Title level={5}>{schema}</Typography.Title>
- </div>
- <div className="space-y-0 divide-y dark:divide-dark border-t border-b dark:border-dark">
- {_functions.map((x) => (
- <Function
- id={x.id}
- key={x.id}
- completeStatement={x.complete_statement}
- name={x.name}
- onClick={selectFunction}
- />
- ))}
- </div>
+const SchemaFunctionGroup: FC<SchemaFunctionGroupProps> = observer(({ schema, selectFunction }) => {
+ const _pageState = useContext(ChooseFunctionFormContext)
+ const _functions = _pageState!.triggerFunctions.filter((x) => x.schema == schema)
+ return (
+ <div className="space-y-4">
+ <div className="sticky top-0 backdrop-filter backdrop-blur px-6 flex items-center space-x-1">
+ <h5 className="text-scale-1000">schema</h5>
+ <h5>{schema}</h5>
</div>
- )
- }
-)
+ <div className="space-y-0 divide-y dark:divide-dark border-t border-b dark:border-dark">
+ {_functions.map((x) => (
+ <Function
+ id={x.id}
+ key={x.id}
+ completeStatement={x.complete_statement}
+ name={x.name}
+ onClick={selectFunction}
+ />
+ ))}
+ </div>
+ </div>
+ )
+})
type FunctionProps = {
id: number
@@ -164,8 +153,8 @@ type FunctionProps = {
onClick: (id: number) => void
}
-const Function: React.FC<FunctionProps> = ({ id, completeStatement, name, onClick }) => {
- const [visible, setVisible] = React.useState(false)
+const Function: FC<FunctionProps> = ({ id, completeStatement, name, onClick }) => {
+ const [visible, setVisible] = useState(false)
return (
<div
className="hover:bg-bg-alt-light dark:hover:bg-bg-alt-dark rounded p-3 px-6 cursor-pointer"
@@ -176,9 +165,7 @@ const Function: React.FC<FunctionProps> = ({ id, completeStatement, name, onClic
<div className="bg-scale-1200 p-1 flex items-center justify-center rounded text-scale-100 ">
<IconTerminal strokeWidth={2} size={14} />
</div>
- <Typography.Title level={5} className="mb-0">
- {name}
- </Typography.Title>
+ <h5 className="mb-0">{name}</h5>
</div>
<Button
type="text"
diff --git a/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx b/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
index 1ba4c457a67..968673f94a2 100644
--- a/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
+++ b/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
@@ -2,7 +2,7 @@ import { FC } from 'react'
import { includes, uniqBy, map as lodashMap } from 'lodash'
import { observer } from 'mobx-react-lite'
import * as Tooltip from '@radix-ui/react-tooltip'
-import { Typography, Button, Input, IconSearch, IconLoader } from '@supabase/ui'
+import { Button, Input, IconSearch, IconLoader } from '@supabase/ui'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { checkPermissions, useStore } from 'hooks'
@@ -29,17 +29,17 @@ const TriggersList: FC<any> = ({
return (
<div className="flex h-full w-full items-center justify-center space-x-2">
<IconLoader className="animate-spin" size={14} />
- <Typography.Text>Loading triggers...</Typography.Text>
+ <p className="text-sm text-scale-1000">Loading triggers...</p>
</div>
)
}
if (meta.triggers.hasError) {
return (
- <Typography.Text className="px-6 py-4" type="danger">
+ <div className="px-6 py-4 text-scale-1000">
<p>Error connecting to API</p>
<p>{`${meta.triggers.error?.message ?? 'Unknown error'}`}</p>
- </Typography.Text>
+ </div>
)
}
@@ -98,7 +98,7 @@ const TriggersList: FC<any> = ({
</div>
{filteredTriggers.length <= 0 && (
<div className="dark:border-dark mx-auto flex max-w-lg items-center justify-center space-x-3 rounded border p-6 shadow-md">
- <Typography.Text>No results match your filter query</Typography.Text>
+ <p>No results match your filter query</p>
<Button type="outline" onClick={() => setFilterString('')}>
Reset filter
</Button>
diff --git a/studio/components/interfaces/Functions/FunctionLogsItem.tsx b/studio/components/interfaces/Functions/FunctionLogsItem.tsx
index f1b6d964b16..67a18e50b1f 100644
--- a/studio/components/interfaces/Functions/FunctionLogsItem.tsx
+++ b/studio/components/interfaces/Functions/FunctionLogsItem.tsx
@@ -1,7 +1,7 @@
import dayjs from 'dayjs'
import { FC } from 'react'
import { observer } from 'mobx-react-lite'
-import { Badge, IconClipboard, IconExternalLink, IconGlobe, Typography } from '@supabase/ui'
+import { Badge, IconClipboard, IconExternalLink, IconGlobe } from '@supabase/ui'
import Table from 'components/to-be-cleaned/Table'
import SimpleCodeBlock from 'components/to-be-cleaned/SimpleCodeBlock'
diff --git a/studio/components/interfaces/Home/ClientLibrary.tsx b/studio/components/interfaces/Home/ClientLibrary.tsx
index 00c357279d1..30c6836beeb 100644
--- a/studio/components/interfaces/Home/ClientLibrary.tsx
+++ b/studio/components/interfaces/Home/ClientLibrary.tsx
@@ -1,5 +1,5 @@
import { FC } from 'react'
-import { Typography, IconBookOpen, IconGitHub, Button, Badge } from '@supabase/ui'
+import { IconBookOpen, IconGitHub, Button, Badge } from '@supabase/ui'
interface Props {
language: string
diff --git a/studio/components/interfaces/Home/ExampleProject.tsx b/studio/components/interfaces/Home/ExampleProject.tsx
index 568acc4674a..367bb0851c7 100644
--- a/studio/components/interfaces/Home/ExampleProject.tsx
+++ b/studio/components/interfaces/Home/ExampleProject.tsx
@@ -1,5 +1,5 @@
import { FC } from 'react'
-import { Typography, IconChevronRight } from '@supabase/ui'
+import { IconChevronRight } from '@supabase/ui'
import { useStore } from 'hooks'
import Link from 'next/link'
diff --git a/studio/components/interfaces/Home/Landing.tsx b/studio/components/interfaces/Home/Landing.tsx
index 1df14b1cf47..8474e4b5022 100644
--- a/studio/components/interfaces/Home/Landing.tsx
+++ b/studio/components/interfaces/Home/Landing.tsx
@@ -2,7 +2,7 @@ import Image from 'next/image'
import Link from 'next/link'
import Head from 'next/head'
import { observer } from 'mobx-react-lite'
-import { Button, IconGitHub, Typography } from '@supabase/ui'
+import { Button, IconGitHub } from '@supabase/ui'
import { useStore } from 'hooks'
import { auth } from 'lib/gotrue'
diff --git a/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx b/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx
index ac872be7fe6..adc87c022b1 100644
--- a/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx
+++ b/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx
@@ -1,7 +1,7 @@
import { FC } from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import { Typography, Button, IconDatabase, IconKey, IconArchive } from '@supabase/ui'
+import { Button, IconDatabase, IconKey, IconArchive } from '@supabase/ui'
import Panel from 'components/ui/Panel'
interface Props {}
diff --git a/studio/components/interfaces/Home/ProjectList/PausedProjectCard.tsx b/studio/components/interfaces/Home/ProjectList/PausedProjectCard.tsx
index b84afbc1790..2c911c13826 100644
--- a/studio/components/interfaces/Home/ProjectList/PausedProjectCard.tsx
+++ b/studio/components/interfaces/Home/ProjectList/PausedProjectCard.tsx
@@ -1,5 +1,5 @@
import { FC } from 'react'
-import { Typography, Badge, Button } from '@supabase/ui'
+import { Badge, Button } from '@supabase/ui'
import { Project } from 'types'
@@ -28,9 +28,7 @@ const PausedProjectCard: FC<Props> = ({
].join(' ')}
>
<div className="flex items-center justify-between space-x-2">
- <Typography.Title level={4} className="m-0 truncate">
- {project.name}
- </Typography.Title>
+ <h5 className="m-0 truncate">{project.name}</h5>
<Badge color="yellow" dot>
Paused
</Badge>
diff --git a/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx b/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
index 22810ce4f6a..9bdcf08803c 100644
--- a/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
+++ b/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
@@ -27,10 +27,9 @@ const ProjectCard: FC<Props> = ({ project, rewriteHref }) => {
<span className="flex-shrink truncate">{name}</span>
</div>
}
- description={''}
footer={
<div className="flex items-end justify-between">
- <span className="text-scale-900 text-sm lowercase">{desc}</span>
+ <span className="text-scale-1000 text-sm lowercase">{desc}</span>
{isRestoring ? (
<div className="grow text-right">
<Badge color="brand">
@@ -63,7 +62,7 @@ const ProjectCard: FC<Props> = ({ project, rewriteHref }) => {
)}
</div>
}
- ></CardButton>
+ />
</li>
)
}
diff --git a/studio/components/interfaces/Home/ProjectUsage.tsx b/studio/components/interfaces/Home/ProjectUsage.tsx
index d181601a406..41a07d507c5 100644
--- a/studio/components/interfaces/Home/ProjectUsage.tsx
+++ b/studio/components/interfaces/Home/ProjectUsage.tsx
@@ -6,7 +6,6 @@ import {
IconDatabase,
IconKey,
IconZap,
- Typography,
} from '@supabase/ui'
import ChartHandler from 'components/to-be-cleaned/Charts/ChartHandler'
import Panel from 'components/ui/Panel'
@@ -219,7 +218,7 @@ const PanelHeader = (props: any) => {
(props.href ? 'hover:text-gray-1200 cursor-pointer hover:opacity-100' : '')
}
>
- <Typography.Text>{props.icon}</Typography.Text>
+ <p>{props.icon}</p>
<span className="flex items-center space-x-1">
<h4 className="mb-0 text-lg">{props.title}</h4>
</span>
diff --git a/studio/components/interfaces/Home/ProjectUsageSection.tsx b/studio/components/interfaces/Home/ProjectUsageSection.tsx
index 4561dd7c3be..f760233c522 100644
--- a/studio/components/interfaces/Home/ProjectUsageSection.tsx
+++ b/studio/components/interfaces/Home/ProjectUsageSection.tsx
@@ -1,7 +1,7 @@
import useSWR from 'swr'
import { FC } from 'react'
import { observer } from 'mobx-react-lite'
-import { Typography, IconLoader } from '@supabase/ui'
+import { IconLoader } from '@supabase/ui'
import { get } from 'lib/common/fetch'
import { API_URL } from 'lib/constants'
import { useStore } from 'hooks'
@@ -20,7 +20,7 @@ const ProjectUsageSection: FC = observer(({}) => {
: false
if (usageError) {
- return <Typography.Text type="danger">Error loading data {usageError.message}</Typography.Text>
+ return <p className="text-scale-1000 text-sm">Error loading data {usageError.message}</p>
}
return (
diff --git a/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx b/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx
index b2f022a6f4c..4e3bfae5e66 100644
--- a/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx
+++ b/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx
@@ -2,7 +2,6 @@ import { FC, useState, useEffect } from 'react'
import {
Button,
Loading,
- Typography,
IconFileText,
IconDownload,
IconChevronLeft,
@@ -116,9 +115,9 @@ const InvoicesSettings: FC<Props> = ({ organization }) => {
invoices.length === 0 ? (
<Table.tr>
<Table.td colSpan={5} className="p-3 py-12 text-center">
- <Typography.Text type="secondary">
+ <p className="text-scale-1000">
{loading ? 'Checking for invoices' : 'No invoices for this organization yet'}
- </Typography.Text>
+ </p>
</Table.td>
</Table.tr>
) : (
@@ -130,15 +129,13 @@ const InvoicesSettings: FC<Props> = ({ organization }) => {
<IconFileText size="xxl" />
</Table.td>
<Table.td>
- <Typography.Text>
- {new Date(x.period_end * 1000).toLocaleString()}
- </Typography.Text>
+ <p>{new Date(x.period_end * 1000).toLocaleString()}</p>
</Table.td>
<Table.td>
- <Typography.Text>${x.subtotal / 100}</Typography.Text>
+ <p>${x.subtotal / 100}</p>
</Table.td>
<Table.td>
- <Typography.Text>{x.number}</Typography.Text>
+ <p>{x.number}</p>
</Table.td>
<Table.td className="align-right">
<div className="flex items-center space-x-2 justify-end">
diff --git a/studio/components/interfaces/SQLEditor/ResultsPane.tsx b/studio/components/interfaces/SQLEditor/ResultsPane.tsx
index 82a67e44ec2..af5f6569dfe 100644
--- a/studio/components/interfaces/SQLEditor/ResultsPane.tsx
+++ b/studio/components/interfaces/SQLEditor/ResultsPane.tsx
@@ -1,5 +1,4 @@
import { FC } from 'react'
-import { Typography } from '@supabase/ui'
import DataGrid, { Row } from '@supabase/react-data-grid'
interface Props {
@@ -10,7 +9,7 @@ const ResultsPane: FC<Props> = ({ results }) => {
if (results.length === 0) {
return (
<div className="p-5 flex items-center space-x-2 bg-gray-100 dark:bg-gray-700">
- <Typography.Text>Success. No rows returned.</Typography.Text>
+ <p>Success. No rows returned.</p>
</div>
)
}
diff --git a/studio/components/interfaces/SQLEditor/SQLEditor.tsx b/studio/components/interfaces/SQLEditor/SQLEditor.tsx
deleted file mode 100644
index d7de490926b..00000000000
--- a/studio/components/interfaces/SQLEditor/SQLEditor.tsx
+++ /dev/null
@@ -1,195 +0,0 @@
-import { FC, useEffect, useState, useRef } from 'react'
-import Split from 'react-split'
-import { observer } from 'mobx-react-lite'
-import { CSVLink } from 'react-csv'
-import { useMonaco } from '@monaco-editor/react'
-import { IconLoader, Typography } from '@supabase/ui'
-
-import { copyToClipboard, uuidv4 } from 'lib/helpers'
-import { useStore } from 'hooks'
-import { SQL_TEMPLATES } from './SQLEditor.constants'
-import { getResultsMarkdown } from './SQLEditor.utils'
-import { find, isUndefined } from 'lodash'
-
-import Toolbar from './Toolbar'
-import ResultsPane from './ResultsPane'
-import CodeEditor from 'components/ui/CodeEditor'
-
-const MIN_SPLIT_SIZE = 44
-const SNAP_OFFSET = 50
-
-// [Nice to have]: Implement AbortController to stop long running queries
-
-interface Props {
- queryId?: string
- templateId?: number
-}
-
-const SQLEditor: FC<Props> = ({ queryId, templateId }) => {
- const csvRef = useRef(null)
-
- const [id, setId] = useState<string>(uuidv4())
- const [sizes, setSizes] = useState<number[]>([50, 50])
- const [results, setResults] = useState<any>(undefined)
- const [isRunning, setIsRunning] = useState<boolean>(false)
-
- const [error, setError] = useState<any>(undefined)
- const [query, setQuery] = useState<string>('')
-
- const { meta, ui, content } = useStore()
- const queries = content.sqlSnippets()
- const monaco = useMonaco()
-
- useEffect(() => {
- if (queryId) {
- const query = find(queries, (query: any) => query.id === queryId)
- if (!isUndefined(query)) setSQLQuery(query.content.sql)
- }
- }, [queryId])
-
- useEffect(() => {
- if (templateId) {
- const template = find(SQL_TEMPLATES, { id: templateId })
- if (!isUndefined(template)) setSQLQuery(template.sql)
- }
- }, [templateId])
-
- useEffect(() => {
- if (monaco) {
- // Enable format provider for pgsql
- const formatProvider = monaco.languages.registerDocumentFormattingEditProvider('pgsql', {
- async provideDocumentFormattingEdits(model: any) {
- const value = model.getValue()
- const formatted = await formatPgsql(value)
- return [
- {
- range: model.getFullModelRange(),
- text: formatted,
- },
- ]
- },
- })
- return () => {
- formatProvider.dispose()
- }
- }
- }, [monaco])
-
- async function formatPgsql(value: string) {
- try {
- const formatted = await meta.formatQuery(value)
- if (formatted.error) throw formatted.error
- return formatted
- } catch (error) {
- console.error('formatPgsql error:', error)
- return value
- }
- }
-
- const setSQLQuery = (query: string) => {
- setId(uuidv4())
- setQuery(query)
- }
-
- const runQuery = async (q: string) => {
- setIsRunning(true)
- setResults(null)
- setError(null)
- const response = await meta.query(q)
- if (response.error) {
- setError(response.error)
- } else {
- setResults(response)
- }
- setIsRunning(false)
- }
-
- const onSelectCopy = () => {
- if (!results || results.length === 0) {
- return ui.setNotification({ category: 'info', message: 'There are no results to be copied' })
- }
- const markdown = getResultsMarkdown(results)
- copyToClipboard(markdown, () => {
- ui.setNotification({ category: 'success', message: 'Results copied to clipboard' })
- })
- }
-
- const onSelectDownload = () => {
- if (!results || results.length === 0) {
- return ui.setNotification({
- category: 'info',
- message: 'There are no results to be downloaded',
- })
- }
- ;(csvRef.current as any)?.link.click()
- }
-
- const onSelectFavourite = () => {
- // console.log('Favourite query')
- }
-
- return (
- <div className="flex flex-col h-full">
- <Split
- className="h-full"
- direction="vertical"
- gutterSize={3}
- sizes={sizes}
- minSize={MIN_SPLIT_SIZE}
- snapOffset={SNAP_OFFSET}
- expandToMin={true}
- onDragEnd={setSizes}
- >
- <CodeEditor
- id={id}
- language="pgsql"
- defaultValue={query}
- onInputChange={(value?: string) => setQuery(value || '')}
- onInputRun={runQuery}
- />
- <div className="flex flex-col">
- <Toolbar
- isRunning={isRunning}
- runQuery={() => runQuery(query)}
- onSelectCopy={onSelectCopy}
- onSelectDownload={onSelectDownload}
- onSelectFavourite={onSelectFavourite}
- />
- <CSVLink
- ref={csvRef}
- className="hidden"
- data={results || []}
- filename={`supabase_${ui.selectedProject?.ref}_query`}
- />
- {isRunning ? (
- <div className="p-5 flex items-center space-x-4 bg-gray-100 dark:bg-gray-700">
- <IconLoader className="animate-spin" size={14} strokeWidth={2} />
- <Typography.Text>Running query</Typography.Text>
- </div>
- ) : (
- <>
- {results ? (
- <ResultsPane results={results} />
- ) : error ? (
- <div className="p-5 flex flex-col space-y-1">
- <Typography.Text>The following error has occured:</Typography.Text>
- <Typography.Text type="danger">{error.message}</Typography.Text>
- </div>
- ) : (
- <div className="p-5 flex items-center space-x-1 bg-table-header-light dark:bg-table-header-dark">
- <Typography.Text>Click</Typography.Text>
- <Typography.Text code small>
- RUN
- </Typography.Text>
- <Typography.Text>to execute your query</Typography.Text>
- </div>
- )}
- </>
- )}
- </div>
- </Split>
- </div>
- )
-}
-
-export default observer(SQLEditor)
diff --git a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx
index 93cc106859d..c640c3fa8ac 100644
--- a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx
+++ b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx
@@ -1,5 +1,5 @@
import { FC, useState } from 'react'
-import { Typography, IconChevronRight, IconLoader } from '@supabase/ui'
+import { IconChevronRight, IconLoader } from '@supabase/ui'
import { SQLTemplate } from '../SQLEditor.types'
interface Props {
@@ -18,21 +18,19 @@ const SQLCard: FC<Props> = ({ template }) => {
cursor-pointer w-full"
>
<div className="px-6 py-3 border-b dark:border-dark flex items-center justify-between">
- <Typography.Title level={5} className="m-0">
- {title}
- </Typography.Title>
+ <h5 className="m-0">{title}</h5>
{loading ? (
<div className="animate-spin">
<IconLoader size={16} />
</div>
) : (
- <Typography.Text type="secondary">
+ <p className="text-scale-1000">
<IconChevronRight />
- </Typography.Text>
+ </p>
)}
</div>
<p className="px-6 py-4 capitalize-first">
- <Typography.Text type="secondary">{description}</Typography.Text>
+ <p className="text-scale-1000">{description}</p>
</p>
</div>
)
diff --git a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx
index 957ebf8b10d..d332d4e9159 100644
--- a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx
+++ b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLTemplates.tsx
@@ -1,6 +1,5 @@
import { FC } from 'react'
import Link from 'next/link'
-import { Typography } from '@supabase/ui'
import { observer } from 'mobx-react-lite'
import { partition } from 'lodash'
@@ -19,15 +18,13 @@ const SQLTemplates: FC<Props> = ({}) => {
<div className="p-6 h-full overflow-y-auto space-y-8">
<div className="flex flex-col">
<div className="mb-4">
- <Typography.Title level={4} className="mb-0">
- Scripts
- </Typography.Title>
- <Typography.Text>
+ <h4 className="text-lg mb-0">Scripts</h4>
+ <p>
Quick scripts to run on your database.
<br />
Click on any script to fill the query box, modify the script, then click
- <Typography.Text code>Run</Typography.Text>. More scripts coming soon!
- </Typography.Text>
+ <code>Run</code>. More scripts coming soon!
+ </p>
</div>
<div className="grid grid-cols-3 gap-4">
{templates.map((template) => (
@@ -41,16 +38,14 @@ const SQLTemplates: FC<Props> = ({}) => {
</div>
<div className="flex flex-col">
<div className="mb-4">
- <Typography.Title level={4} className="mb-0">
- Quick start
- </Typography.Title>
- <Typography.Text>
+ <h4 className="text-lg mb-0">Quick start</h4>
+ <p>
While we're in beta, we want to offer a quick way to explore Supabase. While we build
importers, check out these simple starters.
<br />
Click on any script to fill the query box, modify the script, then click{' '}
- <Typography.Text code>Run</Typography.Text>. More coming soon!
- </Typography.Text>
+ <code>Run</code>. More coming soon!
+ </p>
</div>
<div className="grid grid-cols-3 gap-4">
{quickstarts.map((template) => (
diff --git a/studio/components/interfaces/SQLEditor/Toolbar.tsx b/studio/components/interfaces/SQLEditor/Toolbar.tsx
deleted file mode 100644
index 304ead7333f..00000000000
--- a/studio/components/interfaces/SQLEditor/Toolbar.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import { FC } from 'react'
-import {
- Button,
- Dropdown,
- Typography,
- IconDownload,
- IconCopy,
- IconChevronDown,
- IconHeart,
-} from '@supabase/ui'
-
-interface Props {
- isRunning: boolean
- runQuery: () => void
- onSelectDownload: () => void
- onSelectCopy: () => void
- onSelectFavourite: () => void
-}
-
-const Toolbar: FC<Props> = ({
- isRunning,
- runQuery = () => {},
- onSelectDownload = () => {},
- onSelectCopy = () => {},
- onSelectFavourite = () => {},
-}) => {
- return (
- <div className="flex items-center justify-between px-5 py-2">
- <div className="flex items-center space-x-2">
- <Dropdown
- side="bottom"
- align="start"
- overlay={[
- <Dropdown.Item
- key="download-csv"
- icon={<IconDownload size={14} strokeWidth={2} />}
- onClick={onSelectDownload}
- >
- Download as CSV
- </Dropdown.Item>,
- <Dropdown.Item
- key="copy-markdown"
- icon={<IconCopy size={14} strokeWidth={2} />}
- onClick={onSelectCopy}
- >
- Copy as markdown
- </Dropdown.Item>,
- ]}
- >
- <Button as="span" type="text" iconRight={<IconChevronDown size={14} strokeWidth={2} />}>
- <div>Results</div>
- </Button>
- </Dropdown>
- </div>
- <div className="flex items-center space-x-2">
- <Button type="text" onClick={() => onSelectFavourite()}>
- <div className="py-1">
- <IconHeart size={14} strokeWidth={2} />
- </div>
- </Button>
- <Button type="default" loading={isRunning} onClick={() => runQuery()}>
- <div className="space-x-2">
- <Typography.Text small>Run</Typography.Text>
- <Typography.Text keyboard>⌘</Typography.Text>
- <Typography.Text small>+</Typography.Text>
- <Typography.Text keyboard>↵</Typography.Text>
- </div>
- </Button>
- </div>
- </div>
- )
-}
-
-export default Toolbar
diff --git a/studio/components/interfaces/SQLEditor/index.ts b/studio/components/interfaces/SQLEditor/index.ts
index 202285e3eaa..5ce7f8a5bc0 100644
--- a/studio/components/interfaces/SQLEditor/index.ts
+++ b/studio/components/interfaces/SQLEditor/index.ts
@@ -1,5 +1,3 @@
-import SQLEditor from './SQLEditor'
import SQLTemplates from './SQLTemplates/SQLTemplates'
export { SQLTemplates }
-export default SQLEditor
diff --git a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx
index 14b8880ff19..5fa9ad73775 100644
--- a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx
+++ b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'
import { useRouter } from 'next/router'
-import { Typography, IconAlertCircle, IconRewind, Button, Card, Input } from '@supabase/ui'
+import { IconAlertCircle, IconRewind, Button, Card, Input } from '@supabase/ui'
import {
LogTable,
@@ -205,9 +205,7 @@ export const LogsPreviewer: React.FC<Props> = ({
<Card className="flex flex-col gap-y-2 w-2/5 bg-scale-400">
<div className="flex flex-row gap-x-2 py-2">
<IconAlertCircle size={16} />
- <Typography.Text type="secondary">
- Sorry! An error occured when fetching data.
- </Typography.Text>
+ <p className="text-scale-1000">Sorry! An error occured when fetching data.</p>
</div>
<Input.TextArea
label="Error Messages"
diff --git a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
index 8800f924183..c88af9d5b15 100644
--- a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
+++ b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
@@ -1,13 +1,4 @@
-import {
- Button,
- Dropdown,
- Typography,
- IconChevronDown,
- IconPlay,
- Badge,
- Popover,
- Alert,
-} from '@supabase/ui'
+import { Button, Dropdown, IconChevronDown, IconPlay, Badge, Popover, Alert } from '@supabase/ui'
import * as Tooltip from '@radix-ui/react-tooltip'
import { PermissionAction } from '@supabase/shared-types/out/constants'
@@ -96,7 +87,7 @@ const LogsQueryPanel: React.FC<Props> = ({
.sort((a, b) => a.label!.localeCompare(b.label!))
.map((template: LogTemplate) => (
<Dropdown.Item key={template.label} onClick={() => onSelectTemplate(template)}>
- <Typography.Text>{template.label}</Typography.Text>
+ <p>{template.label}</p>
</Dropdown.Item>
))}
>
diff --git a/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx b/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx
index 52e670b762d..72eef27d16d 100644
--- a/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx
+++ b/studio/components/interfaces/Settings/Logs/PreviewFilterPanel.tsx
@@ -2,7 +2,6 @@ import React, { FC, useEffect, useState } from 'react'
import {
Button,
Input,
- Typography,
IconRefreshCw,
IconSearch,
IconExternalLink,
@@ -79,9 +78,9 @@ const PreviewFilterPanel: FC<Props> = ({
].join(' ')}
>
<div className="absolute z-20">
- <Typography.Text style={{ fontSize: '0.6rem' }} className="opacity-80">
+ <p style={{ fontSize: '0.6rem' }} className="text-scale-1000">
{newCount > 1000 ? `${Math.floor(newCount / 100) / 10}K` : newCount}
- </Typography.Text>
+ </p>
</div>
<div className="h-full w-full animate-ping rounded-full bg-green-800 opacity-60"></div>
<div className="z-60 absolute top-0 right-0 h-full w-full rounded-full bg-green-900 opacity-80"></div>
diff --git a/studio/components/interfaces/TableGridEditor/NotFoundState.tsx b/studio/components/interfaces/TableGridEditor/NotFoundState.tsx
index 4d63eecbb00..9f695da5c22 100644
--- a/studio/components/interfaces/TableGridEditor/NotFoundState.tsx
+++ b/studio/components/interfaces/TableGridEditor/NotFoundState.tsx
@@ -1,4 +1,3 @@
-import { Typography } from '@supabase/ui'
import { FC } from 'react'
interface Props {
@@ -8,7 +7,7 @@ interface Props {
const NotFoundState: FC<Props> = ({ id }) => {
return (
<div className="flex items-center justify-center h-full">
- <Typography.Text>Oops! Unable to find your table with the ID {id}</Typography.Text>
+ <p>Oops! Unable to find your table with the ID {id}</p>
</div>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx
index c37eae2c714..7da2c4ca6c9 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx
@@ -1,6 +1,6 @@
import { FC } from 'react'
import { isUndefined } from 'lodash'
-import { Button, IconArrowRight, IconLink, Typography } from '@supabase/ui'
+import { Button, IconArrowRight, IconLink } from '@supabase/ui'
import { ColumnField } from '../SidePanelEditor.types'
import InformationBox from 'components/ui/InformationBox'
@@ -168,19 +168,17 @@ const ColumnForeignKeyRemoved: FC<{
title={
<div className="flex items-center justify-between">
<div className="space-y-2">
- <Typography.Text>
+ <p>
The following foreign key relation will be{' '}
<span className="text-amber-900">removed</span> from this column:
- </Typography.Text>
+ </p>
<div className="flex items-center space-x-2">
- <Typography.Text code small>
- {columnName}
- </Typography.Text>
+ <code className="text-sm">{columnName}</code>
<IconArrowRight size={14} strokeWidth={2} />
- <Typography.Text code small>
+ <code className="text-sm">
{originalForeignKey?.target_table_schema}.{originalForeignKey?.target_table_name}.
{originalForeignKey?.target_column_name}
- </Typography.Text>
+ </code>
</div>
</div>
<div className="flex items-center space-x-2">
@@ -214,26 +212,24 @@ const ColumnForeignKeyUpdated: FC<{
title={
<div className="flex items-center justify-between">
<div className="space-y-2">
- <Typography.Text>
+ <p>
The foreign key relation will be <span className="text-brand-900">updated</span> as
such:
- </Typography.Text>
+ </p>
<div className="flex items-start space-x-2">
- <Typography.Text code small>
- {columnName}
- </Typography.Text>
+ <code className="text-sm">{columnName}</code>
<IconArrowRight className="mt-1" size={14} strokeWidth={2} />
<div className="flex flex-col space-y-2">
<p className="line-through">
- <Typography.Text code small>
+ <code className="text-sm">
{originalForeignKey?.target_table_schema}.
{originalForeignKey?.target_table_name}.{originalForeignKey?.target_column_name}
- </Typography.Text>
+ </code>
</p>
- <Typography.Text code small>
+ <code className="text-sm">
{updatedForeignKey?.target_table_schema}.{updatedForeignKey?.target_table_name}.
{updatedForeignKey?.target_column_name}
- </Typography.Text>
+ </code>
</div>
</div>
</div>
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/HeaderTitle.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/HeaderTitle.tsx
index 49fb2b1bd60..d416f54bba7 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/HeaderTitle.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/HeaderTitle.tsx
@@ -1,5 +1,4 @@
import { PostgresTable, PostgresColumn } from '@supabase/postgres-meta'
-import { Typography } from '@supabase/ui'
interface Props {
table: PostgresTable
@@ -11,14 +10,13 @@ const HeaderTitle: React.FC<Props> = ({ table, column }) => {
if (!column) {
return (
<>
- Add new column to <Typography.Text code>{table.name}</Typography.Text>
+ Add new column to <code>{table.name}</code>
</>
)
}
return (
<>
- Update column <Typography.Text code>{column.name}</Typography.Text> from{' '}
- <Typography.Text code>{column.table}</Typography.Text>
+ Update column <code>{column.name}</code> from <code>{column.table}</code>
</>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
index 0a27d975522..eecfd3dca56 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
@@ -1,7 +1,7 @@
import React, { FC, useEffect, useState } from 'react'
import { get, find, isEmpty, sortBy } from 'lodash'
import { Dictionary } from 'components/grid'
-import { SidePanel, Typography, Listbox, IconHelpCircle } from '@supabase/ui'
+import { SidePanel, Listbox, IconHelpCircle } from '@supabase/ui'
import { PostgresTable, PostgresColumn } from '@supabase/postgres-meta'
import ActionBar from '../ActionBar'
@@ -166,9 +166,7 @@ const ForeignKeySelector: FC<Props> = ({
// @ts-ignore
label={
<div>
- Select a column from{' '}
- <Typography.Text code>{selectedForeignKey?.table}</Typography.Text> to reference
- to
+ Select a column from <code>{selectedForeignKey?.table}</code> to reference to
</div>
}
error={errors.column}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx
index e1032242a70..b9b2823c7c9 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx
@@ -1,5 +1,4 @@
import { FC } from 'react'
-import { Typography } from '@supabase/ui'
interface Props {
isNewRecord: boolean
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx
index 5cf22e5a9e2..cf02167097e 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx
@@ -1,6 +1,6 @@
import { FC } from 'react'
import { isUndefined, includes } from 'lodash'
-import { Button, Select, Input, IconLink, Typography, IconArrowRight } from '@supabase/ui'
+import { Button, Select, Input, IconLink, IconArrowRight, IconEdit2 } from '@supabase/ui'
import { RowField } from './RowEditor.types'
import DateTimeInput from './DateTimeInput'
@@ -56,15 +56,15 @@ const InputField: FC<Props> = ({
// because descriptionText is a <p> element as a parent
descriptionText={
<div className="flex items-center space-x-1 opacity-50">
- {field.comment && <Typography.Text small>{field.comment}</Typography.Text>}
- <Typography.Text small>({field.name}</Typography.Text>
- <Typography.Text small>
+ {field.comment && <p className="text-sm">{field.comment}</p>}
+ <p className="text-sm">({field.name}</p>
+ <p className="text-sm">
<IconArrowRight size={14} strokeWidth={2} />
- </Typography.Text>
- <Typography.Text small>
+ </p>
+ <p className="text-sm">
{field.foreignKey.target_table_schema}.{field.foreignKey.target_table_name}.
{field.foreignKey.target_column_name})
- </Typography.Text>
+ </p>
</div>
}
labelOptional={field.format}
@@ -121,9 +121,9 @@ const InputField: FC<Props> = ({
type="default"
htmlType="button"
onClick={() => onEditJson({ column: field.name, jsonString: field.value })}
- icon={<IconLink />}
+ icon={<IconEdit2 />}
>
- View JSON
+ Edit JSON
</Button>
}
/>
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/JsonEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/JsonEditor.tsx
index 9adadec1895..49777e9672d 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/JsonEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/JsonEditor.tsx
@@ -1,5 +1,5 @@
import { FC, useState, useEffect } from 'react'
-import { SidePanel, Typography } from '@supabase/ui'
+import { SidePanel } from '@supabase/ui'
import { useStore } from 'hooks'
import JsonEditor from './JsonCodeEditor'
@@ -51,62 +51,44 @@ const JsonEdit: FC<JsonEditProps> = ({ column, jsonString, visible, closePanel,
return (
<SidePanel
size="large"
- header={'JSON'}
- visible={visible}
- onCancel={closePanel}
- customFooter={<ActionBar closePanel={closePanel} applyFunction={validateJSON} />}
- >
- <SidePanel.Content>
- <TwoOptionToggle
- options={['view', 'edit']}
- activeOption={view}
- borderOverride="border-gray-500"
- onClickOption={onToggleClick}
- />
-
- <div className="mt-4 flex flex-auto flex-col space-y-2">
+ header={
+ <div className="flex items-center justify-between">
{view === 'edit' ? (
- <Editor column={column} value={jsonStr} onChange={onInputChange} />
+ <p>
+ Editing JSON Field: <code>{column}</code>
+ </p>
) : (
- <Viewer column={column} value={jsonStr} />
+ <p>
+ Viewing JSON Field: <code>{column}</code>
+ </p>
)}
+ <TwoOptionToggle
+ options={['view', 'edit']}
+ activeOption={view}
+ borderOverride="border-gray-500"
+ onClickOption={onToggleClick}
+ />
</div>
- </SidePanel.Content>
+ }
+ visible={visible}
+ onCancel={closePanel}
+ customFooter={<ActionBar closePanel={closePanel} applyFunction={validateJSON} />}
+ >
+ <div className="py-4">
+ <SidePanel.Content>
+ <div className="mt-4 flex flex-auto flex-col space-y-4">
+ {view === 'edit' ? (
+ <div className="dark:border-dark h-[500px] w-full flex-grow border">
+ <JsonEditor onInputChange={onInputChange} defaultValue={jsonStr.toString()} />
+ </div>
+ ) : (
+ <DrilldownViewer jsonData={tryParseJson(jsonStr)} />
+ )}
+ </div>
+ </SidePanel.Content>
+ </div>
</SidePanel>
)
}
export default JsonEdit
-
-interface EditorProps {
- column: string
- value: string
- onChange: (value: any) => void
-}
-
-const Editor: FC<EditorProps> = ({ column, value, onChange }) => {
- return (
- <>
- <Typography.Title level={4}>Edit JSON Field: {column}</Typography.Title>
-
- <div className="dark:border-dark h-96 w-full flex-grow border">
- <JsonEditor onInputChange={onChange} defaultValue={value.toString()} />
- </div>
- </>
- )
-}
-
-type ViewerProps = {
- column: string
- value: string
-}
-
-const Viewer: FC<ViewerProps> = ({ column, value }) => {
- const json = tryParseJson(value)
- return (
- <>
- <Typography.Title level={4}>Viewing JSON Field: {column}</Typography.Title>
- <DrilldownViewer jsonData={json} />
- </>
- )
-}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/TwoOptionToggle.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/TwoOptionToggle.tsx
index f487fe57301..44aba26ed7a 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/TwoOptionToggle.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/JsonEditor/TwoOptionToggle.tsx
@@ -38,14 +38,14 @@ const TwoOptionToggle: FC<Props> = ({
key={`toggle_${index}`}
style={{ width: 51 }}
className={`
- ${activeOption === option ? 'text-gray-200' : 'text-gray-400'}
+ ${activeOption === option ? 'text-scale-1200' : 'text-scale-1000'}
${index === 0 ? 'right-0' : 'left-0'}
${buttonStyle(activeOption === option)}
cursor-pointer
`}
onClick={() => onClickOption(option)}
>
- <span className="text-color-inherit uppercase">{option}</span>
+ <span className="text-color-inherit capitalize">{option}</span>
</span>
))}
</div>
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
index e18b8003c86..383788bad03 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
@@ -3,7 +3,6 @@ import { isUndefined } from 'lodash'
import {
Checkbox,
Input,
- Typography,
IconX,
IconMenu,
Popover,
@@ -71,9 +70,7 @@ const Column: FC<Props> = ({
<div className="flex w-full items-center">
<div className={`w-[5%] ${!isNewRecord ? 'hidden' : ''}`}>
<div className="cursor-drag" {...dragHandleProps}>
- <Typography>
- <IconMenu strokeWidth={1} size={15} />
- </Typography>
+ <IconMenu strokeWidth={1} size={15} />
</div>
</div>
<div className="w-[20%]">
@@ -235,9 +232,7 @@ const Column: FC<Props> = ({
{!hasImportContent && (
<div className="flex w-[5%] justify-end">
<div className="cursor-pointer" onClick={() => onRemoveColumn()}>
- <Typography>
- <IconX strokeWidth={1} />
- </Typography>
+ <IconX strokeWidth={1} />
</div>
</div>
)}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
index 8b8e8842346..d61808d5664 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
@@ -1,14 +1,6 @@
import React, { FC, useState } from 'react'
import { partition, isEmpty, isUndefined } from 'lodash'
-import {
- Alert,
- Button,
- IconEdit,
- IconHelpCircle,
- IconKey,
- IconTrash,
- Typography,
-} from '@supabase/ui'
+import { Alert, Button, IconEdit, IconHelpCircle, IconKey, IconTrash } from '@supabase/ui'
import {
PostgresTable,
PostgresColumn,
@@ -150,7 +142,7 @@ const ColumnManagement: FC<Props> = ({
<>
<div className="table-editor-columns w-full space-y-4">
<div className="flex w-full items-center justify-between">
- <Typography.Title level={5}>Columns</Typography.Title>
+ <h5>Columns</h5>
{isNewRecord && (
<>
{hasImportContent ? (
@@ -173,10 +165,10 @@ const ColumnManagement: FC<Props> = ({
{hasImportContent && (
<div className="my-2 opacity-75">
- <Typography.Text>
+ <p>
Your table will be created with {importContent?.rowCount?.toLocaleString()} rows and
the following {columns.length} columns.
- </Typography.Text>
+ </p>
</div>
)}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx
index f78b3bf6199..45e0fd37775 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx
@@ -1,5 +1,5 @@
+import { FC } from 'react'
import { PostgresTable } from '@supabase/postgres-meta'
-import { Typography } from '@supabase/ui'
interface Props {
schema: string
@@ -7,7 +7,7 @@ interface Props {
isDuplicating: boolean
}
-const HeaderTitle: React.FC<Props> = ({ schema, table, isDuplicating }) => {
+const HeaderTitle: FC<Props> = ({ schema, table, isDuplicating }) => {
if (!table) {
return (
<>
@@ -18,13 +18,13 @@ const HeaderTitle: React.FC<Props> = ({ schema, table, isDuplicating }) => {
if (isDuplicating) {
return (
<>
- Duplicate table <Typography.Text code>{table.name}</Typography.Text>
+ Duplicate table <code>{table.name}</code>
</>
)
}
return (
<>
- Update table <Typography.Text code>{table.name}</Typography.Text>
+ Update table <code>{table.name}</code>
</>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx
index c9f58aa2091..1bfc22d5a89 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx
@@ -1,5 +1,5 @@
import { DragEvent, useRef, useState, FC } from 'react'
-import { Button, Typography, IconLoader, IconFileText } from '@supabase/ui'
+import { Button, IconLoader, IconFileText } from '@supabase/ui'
import SparkBar from 'components/ui/SparkBar'
interface Props {
@@ -56,9 +56,9 @@ const SpreadSheetFileUpload: FC<Props> = ({
onDrop={onDrop}
onClick={() => (uploadButtonRef.current as any)?.click()}
>
- <Typography.Text>
+ <p>
Drag and drop, or <span className="text-green-1000">browse</span> your files
- </Typography.Text>
+ </p>
</div>
) : (
<div className="flex h-32 flex-col items-center justify-center space-y-2 rounded-md border border-dashed dark:border-gray-500">
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetTextInput.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetTextInput.tsx
index 62ac20dc83b..5168fcdcc8f 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetTextInput.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetTextInput.tsx
@@ -1,5 +1,5 @@
import { FC } from 'react'
-import { Input, Typography } from '@supabase/ui'
+import { Input } from '@supabase/ui'
interface Props {
input: string
@@ -12,8 +12,8 @@ const SpreadSheetTextInput: FC<Props> = ({ input, onInputChange }) => (
<p className="text-sm text-scale-1100 mb-2">
Copy a table from a spreadsheet program such as Google Sheets or Excel and paste it in the
field below. The first row should be the headers of the table, and your headers should not
- include any special characters other than hyphens (<Typography.Text code>-</Typography.Text>
- ) or underscores (<Typography.Text code>_</Typography.Text>).
+ include any special characters other than hyphens (<code>-</code>) or underscores (
+ <code>_</code>).
</p>
<p className="text-xs text-scale-900">
Tip: Datetime columns should be formatted as YYYY-MM-DD HH:mm:ss
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx
index 2b80a7340d2..6108d82f7ea 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx
@@ -1,6 +1,6 @@
import { useCallback, useState, FC, useEffect } from 'react'
import { debounce, includes } from 'lodash'
-import { SidePanel, Typography, Tabs, IconArrowRight, IconChevronRight } from '@supabase/ui'
+import { SidePanel, Tabs, IconArrowRight, IconChevronRight } from '@supabase/ui'
import { useStore } from 'hooks'
import ActionBar from '../../ActionBar'
@@ -165,22 +165,22 @@ const SpreadsheetImport: FC<Props> = ({
<div className="space-y-5 py-5">
<div className="space-y-2">
<div className="flex flex-col space-y-1">
- <Typography.Text>Content Preview</Typography.Text>
- <Typography.Text type="secondary">
+ <p>Content Preview</p>
+ <p className="text-scale-1000">
Your table will have {spreadsheetData.rowCount.toLocaleString()} rows and the
following {spreadsheetData.headers.length} columns.
- </Typography.Text>
+ </p>
</div>
<SpreadsheetPreview headers={spreadsheetData.headers} />
</div>
{errors.length > 0 && (
<div className="space-y-2">
<div className="flex flex-col space-y-1">
- <Typography.Text>Issues found in spreadsheet</Typography.Text>
- <Typography.Text type="secondary">
+ <p>Issues found in spreadsheet</p>
+ <p className="text-scale-1000">
Your table can still be created nonetheless despite issues in the following
rows.
- </Typography.Text>
+ </p>
</div>
<div className="space-y-2">
{errors.map((error: any, idx: number) => {
@@ -194,16 +194,14 @@ const SpreadsheetImport: FC<Props> = ({
size={14}
onClick={() => onSelectExpandError(key)}
/>
- <Typography.Text className="w-14">Row: {error.row}</Typography.Text>
- <Typography.Text>{error.message}</Typography.Text>
+ <p className="w-14">Row: {error.row}</p>
+ <p>{error.message}</p>
{error.data?.__parsed_extra && (
<>
<IconArrowRight size={14} />
- <Typography.Text>Extra field(s):</Typography.Text>
+ <p>Extra field(s):</p>
{error.data?.__parsed_extra.map((value: any) => (
- <Typography.Text code small>
- {value}
- </Typography.Text>
+ <code className="text-sm">{value}</code>
))}
</>
)}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetPreview.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetPreview.tsx
index 72f338bbfe3..785def383ee 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetPreview.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetPreview.tsx
@@ -1,7 +1,6 @@
import { FC } from 'react'
import { isUndefined } from 'lodash'
import DataGrid from '@supabase/react-data-grid'
-import { Typography } from '@supabase/ui'
interface Props {
headers: string[]
@@ -19,7 +18,7 @@ const SpreadsheetPreview: FC<Props> = ({ headers = [], rows = [] }) => {
resizable: true,
headerRenderer: () => (
<div className="flex items-center justify-center font-mono h-full">
- <Typography.Text small>{header}</Typography.Text>
+ <p className="text-sm">{header}</p>
</div>
),
formatter: ({ row }: { row: any }) => (
diff --git a/studio/components/interfaces/index.ts b/studio/components/interfaces/index.ts
index e9065fdd504..de0b1eee793 100644
--- a/studio/components/interfaces/index.ts
+++ b/studio/components/interfaces/index.ts
@@ -1,6 +1,5 @@
import TableGridEditor from './TableGridEditor'
-import SQLEditor from './SQLEditor'
export * from './Auth'
-export { TableGridEditor, SQLEditor }
+export { TableGridEditor }
diff --git a/studio/components/layouts/AccountLayout/WithSidebar.tsx b/studio/components/layouts/AccountLayout/WithSidebar.tsx
index b907ada3ff9..e05c347b248 100644
--- a/studio/components/layouts/AccountLayout/WithSidebar.tsx
+++ b/studio/components/layouts/AccountLayout/WithSidebar.tsx
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { FC, ReactNode } from 'react'
import { isUndefined } from 'lodash'
-import { Menu, Typography, IconArrowUpRight, Badge, IconLogOut } from '@supabase/ui'
+import { Menu, IconArrowUpRight, Badge, IconLogOut } from '@supabase/ui'
import { useFlag } from 'hooks'
import LayoutHeader from '../ProjectLayout/LayoutHeader'
import { SidebarLink, SidebarSection } from './AccountLayout.types'
@@ -56,9 +56,7 @@ const WithSidebar: FC<Props> = ({
{title && (
<div className="mb-2">
<div className="dark:border-dark flex h-12 max-h-12 items-center border-b px-6">
- <Typography.Title level={4} className="mb-0">
- {title}
- </Typography.Title>
+ <h4 className="text-lg mb-0">{title}</h4>
</div>
</div>
)}
diff --git a/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx b/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx
index e7a5b160349..4e08db436cf 100644
--- a/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx
+++ b/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx
@@ -1,5 +1,4 @@
import { FC, ReactNode } from 'react'
-import { Typography } from '@supabase/ui'
import { useFlag } from 'hooks'
interface Props {
@@ -24,7 +23,7 @@ const ProductMenuBar: FC<Props> = ({ title, children }) => {
className="dark:border-dark flex max-h-12 items-center border-b px-6"
style={{ minHeight: '3rem' }}
>
- <Typography.Title level={4}>{title}</Typography.Title>
+ <h4 className="text-lg">{title}</h4>
</div>
<div className="flex-grow overflow-y-auto">{children}</div>
</div>
diff --git a/studio/components/layouts/StorageLayout/StorageMenu.tsx b/studio/components/layouts/StorageLayout/StorageMenu.tsx
index d2bc0302cfd..e1738b8294a 100644
--- a/studio/components/layouts/StorageLayout/StorageMenu.tsx
+++ b/studio/components/layouts/StorageLayout/StorageMenu.tsx
@@ -8,7 +8,6 @@ import {
Button,
Dropdown,
Menu,
- Typography,
IconLoader,
IconMoreVertical,
Alert,
@@ -96,17 +95,17 @@ const StorageMenu: FC<Props> = () => {
<Menu.Group title="Configuration" />
<Link href={`/project/${projectRef}/storage/settings`}>
<Menu.Item rounded active={page === 'settings'}>
- <Typography.Text className="truncate">Settings</Typography.Text>
+ <p className="truncate">Settings</p>
</Menu.Item>
</Link>
<Link href={`/project/${projectRef}/storage/policies`}>
<Menu.Item rounded active={page === 'policies'}>
- <Typography.Text className="truncate">Policies</Typography.Text>
+ <p className="truncate">Policies</p>
</Menu.Item>
</Link>
<Link href={`/project/${projectRef}/storage/usage`}>
<Menu.Item rounded active={page === 'usage'}>
- <Typography.Text className="truncate">Usage</Typography.Text>
+ <p className="truncate">Usage</p>
</Menu.Item>
</Link>
</div>
@@ -129,7 +128,7 @@ const BucketRow = ({
key={bucket.id}
name={
<div className="flex items-center space-x-2">
- <Typography.Text>{bucket.name}</Typography.Text>
+ <p>{bucket.name}</p>
{bucket.public && <Badge color="yellow">Public</Badge>}
</div>
}
@@ -159,13 +158,11 @@ const BucketRow = ({
</Dropdown.Item>,
]}
>
- <Typography.Text>
- <IconMoreVertical
- className="opacity-0 group-hover:opacity-100"
- size="tiny"
- strokeWidth={2}
- />
- </Typography.Text>
+ <IconMoreVertical
+ className="opacity-0 group-hover:opacity-100"
+ size="tiny"
+ strokeWidth={2}
+ />
</Dropdown>
) : (
<div />
diff --git a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
index 3de017cf5c3..97494305f53 100644
--- a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
+++ b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
@@ -17,7 +17,6 @@ import {
Input,
Listbox,
Menu,
- Typography,
} from '@supabase/ui'
import * as Tooltip from '@radix-ui/react-tooltip'
import { PermissionAction } from '@supabase/shared-types/out/constants'
@@ -314,7 +313,7 @@ const TableEditorMenu: FC<Props> = ({
<Link key={viewId} href={`/project/${projectRef}/editor/${viewId}`}>
<Menu.Item key={viewId} rounded active={isActive}>
<div className="flex justify-between">
- <Typography.Text className="truncate">{view.name}</Typography.Text>
+ <p className="truncate">{view.name}</p>
</div>
</Menu.Item>
</Link>
diff --git a/studio/components/to-be-cleaned/AlphaPreview.tsx b/studio/components/to-be-cleaned/AlphaPreview.tsx
index 364d0c19c15..a5ba90dbaa1 100644
--- a/studio/components/to-be-cleaned/AlphaPreview.tsx
+++ b/studio/components/to-be-cleaned/AlphaPreview.tsx
@@ -1,4 +1,4 @@
-import { Typography, IconAlertCircle, Alert } from '@supabase/ui'
+import { Alert } from '@supabase/ui'
const AlphaPreview = () => {
return (
diff --git a/studio/components/to-be-cleaned/Charts/ChartHandler.tsx b/studio/components/to-be-cleaned/Charts/ChartHandler.tsx
index 7e2b16a16a4..8b8b17fa3e1 100644
--- a/studio/components/to-be-cleaned/Charts/ChartHandler.tsx
+++ b/studio/components/to-be-cleaned/Charts/ChartHandler.tsx
@@ -1,14 +1,7 @@
import React, { FC, ReactNode, useState, useEffect } from 'react'
import { useRouter } from 'next/router'
import { isUndefined } from 'lodash'
-import {
- Button,
- IconActivity,
- IconAlertCircle,
- IconBarChart,
- IconLoader,
- Typography,
-} from '@supabase/ui'
+import { Button, IconActivity, IconAlertCircle, IconBarChart, IconLoader } from '@supabase/ui'
import { Dictionary } from 'components/grid'
import { API_URL } from 'lib/constants'
diff --git a/studio/components/to-be-cleaned/ProductEmptyState.tsx b/studio/components/to-be-cleaned/ProductEmptyState.tsx
index f0b725174d1..61d02ad2287 100644
--- a/studio/components/to-be-cleaned/ProductEmptyState.tsx
+++ b/studio/components/to-be-cleaned/ProductEmptyState.tsx
@@ -1,4 +1,4 @@
-import { Button, Typography } from '@supabase/ui'
+import { Button } from '@supabase/ui'
import { FC, ReactNode } from 'react'
import * as Tooltip from '@radix-ui/react-tooltip'
@@ -31,7 +31,7 @@ const ProductEmptyState: FC<Props> = ({
{/* A graphic can probably be placed here as a sibling to the div below*/}
<div className="flex flex-col">
<div className="w-80 space-y-4">
- <Typography.Title level={5}>{title}</Typography.Title>
+ <h5>{title}</h5>
<div className="flex flex-col space-y-2">{children}</div>
{hasAction && (
<div className="flex items-center space-x-2">
diff --git a/studio/components/to-be-cleaned/SqlEditor/TabSqlQuery.js b/studio/components/to-be-cleaned/SqlEditor/TabSqlQuery.js
index e4e07c5dd92..3fbdfcd0174 100644
--- a/studio/components/to-be-cleaned/SqlEditor/TabSqlQuery.js
+++ b/studio/components/to-be-cleaned/SqlEditor/TabSqlQuery.js
@@ -5,7 +5,7 @@ import { CSVLink } from 'react-csv'
import { debounce } from 'lodash'
import { observer } from 'mobx-react-lite'
import { useEffect, useRef, useState } from 'react'
-import { Button, Dropdown, IconChevronDown, Typography } from '@supabase/ui'
+import { Button, Dropdown, IconChevronDown } from '@supabase/ui'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { useKeyboardShortcuts, useStore, useWindowDimensions, checkPermissions } from 'hooks'
@@ -277,19 +277,15 @@ const UtilityTabResults = observer(() => {
} else if (sqlEditorStore.activeTab.errorResult) {
return (
<div className="bg-table-header-light dark:bg-table-header-dark">
- <Typography.Text>
- <p className="m-0 border-0 px-6 py-4 font-mono">{sqlEditorStore.activeTab.errorResult}</p>
- </Typography.Text>
+ <p className="m-0 border-0 px-6 py-4 font-mono">{sqlEditorStore.activeTab.errorResult}</p>
</div>
)
} else if (sqlEditorStore.activeTab.hasNoResult) {
return (
<div className="bg-table-header-light dark:bg-table-header-dark">
- <Typography.Text type="secondary">
- <p className="m-0 border-0 px-6 py-4 ">
- Click <Typography.Text code>RUN</Typography.Text> to execute your query.
- </p>
- </Typography.Text>
+ <p className="m-0 border-0 px-6 py-4 text-sm text-scale-1000">
+ Click <code>RUN</code> to execute your query.
+ </p>
</div>
)
}
@@ -321,9 +317,7 @@ const Results = ({ results }) => {
if (results?.error) {
return (
<div className="bg-table-header-light dark:bg-table-header-dark">
- <Typography.Text type="danger">
- <p className="m-0 border-0 px-6 py-4 font-mono"> {`ERROR: ${results.error}`}</p>
- </Typography.Text>
+ <p className="m-0 border-0 px-6 py-4 font-mono text-scale-1000">ERROR: {results.error}</p>
</div>
)
}
diff --git a/studio/components/to-be-cleaned/SqlEditor/TabWelcome.js b/studio/components/to-be-cleaned/SqlEditor/TabWelcome.js
index 3289f768eb2..b488d7bd9c5 100644
--- a/studio/components/to-be-cleaned/SqlEditor/TabWelcome.js
+++ b/studio/components/to-be-cleaned/SqlEditor/TabWelcome.js
@@ -1,10 +1,8 @@
import { useState } from 'react'
import { partition } from 'lodash'
import { observer } from 'mobx-react-lite'
-import { IconChevronRight, Typography } from '@supabase/ui'
import { PermissionAction } from '@supabase/shared-types/out/constants'
-import { useSqlStore } from 'localStores/sqlEditor/SqlEditorStore'
import Telemetry from 'lib/telemetry'
import { useOptimisticSqlSnippetCreate, checkPermissions, useStore } from 'hooks'
import { SQL_TEMPLATES } from 'components/interfaces/SQLEditor/SQLEditor.constants'
@@ -90,62 +88,6 @@ const SqlCard = ({ title, description, sql, onClick }) => {
onClick={() => handleOnClick()}
title={title}
footer={<span className="text-scale-1100 text-sm">{description}</span>}
- >
- {/* <a
- className="rounded bg-panel-header-light dark:bg-panel-header-dark transition-colors
- border border-panel-border-light dark:border-panel-border-dark
- hover:border-panel-border-hover-light dark:hover:border-panel-border-hover-dark
- cursor-pointer"
- onClick={() => handleOnClick()}
- > */}
- {/* <div className="px-6 py-3 border-b dark:border-dark flex items-center justify-between">
- <Typography.Title level={6} className="m-0">
- {title}
- </Typography.Title>
- {loading ? (
- <IconLoader className="animate-spin" size={16} />
- ) : (
- <Typography.Text type="secondary">
- <IconChevronRight />
- </Typography.Text>
- )}
- </div>
- <p className="px-6 py-4 capitalize-first">
- <Typography.Text type="secondary">{description}</Typography.Text>
- </p> */}
- {/* </a> */}
- </CardButton>
+ />
)
}
-
-const FavoriteCard = observer(({ favorite }) => {
- const sqlEditorStore = useSqlStore()
- const { key, name, desc } = favorite
-
- function onClick() {
- sqlEditorStore.createQueryTabFromFavorite(key)
- Telemetry.sendEvent('script_favorite', 'script_clicked', name)
- }
-
- return (
- <a
- className="bg-panel-header-light dark:bg-panel-header-dark border-panel-border-light dark:border-panel-border-dark
- hover:border-panel-border-hover-light dark:hover:border-panel-border-hover-dark cursor-pointer
- rounded border
- transition-colors"
- onClick={onClick}
- >
- <div className="dark:border-dark flex items-center justify-between border-b p-6 py-3">
- <Typography.Title level={6} className="m-0">
- {name}
- </Typography.Title>
- <Typography.Text type="secondary">
- <IconChevronRight />
- </Typography.Text>
- </div>
- <p className="capitalize-first p-6 py-4">
- <Typography.Text type="secondary">{desc}</Typography.Text>
- </p>
- </a>
- )
-})
diff --git a/studio/components/to-be-cleaned/Storage/CreateBucketModal.tsx b/studio/components/to-be-cleaned/Storage/CreateBucketModal.tsx
index 700c25c329b..0a377d29bba 100644
--- a/studio/components/to-be-cleaned/Storage/CreateBucketModal.tsx
+++ b/studio/components/to-be-cleaned/Storage/CreateBucketModal.tsx
@@ -1,8 +1,8 @@
import { FC, useEffect, useState } from 'react'
-import { Modal, Alert, Button, Input, Space, Typography, Toggle } from '@supabase/ui'
+import { Modal, Alert, Button, Input, Toggle } from '@supabase/ui'
interface Props {
- visible : boolean
+ visible: boolean
onSelectCancel: () => {}
onSelectSave: () => {}
}
@@ -73,9 +73,9 @@ const CreateBucketModal: FC<Props> = ({
label="Name of bucket"
labelOptional="Buckets cannot be renamed once created."
descriptionText={
- <Typography.Text type="secondary">
+ <p className="text-scale-1000">
Only lowercase letters, numbers, dots, and hyphens
- </Typography.Text>
+ </p>
}
layout="vertical"
error={error}
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.js
index 04fc8859042..be9812b816d 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.js
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.js
@@ -15,7 +15,6 @@ import {
IconX,
IconEdit2,
IconLoader,
- Typography,
IconChevronsUp,
} from '@supabase/ui'
import { useStorageStore } from 'localStores/storageExplorer/StorageExplorerStore'
@@ -29,18 +28,12 @@ const HeaderPathEdit = ({ loading, breadcrumbs, togglePathEdit }) => {
>
{loading.isLoading ? (
<div className="ml-2 flex items-center">
- <Typography.Text>
- <IconLoader size={16} strokeWidth={2} className="animate-spin" />
- </Typography.Text>
- <Typography.Text>
- <p className="ml-3 text-sm">{loading.message}</p>
- </Typography.Text>
+ <IconLoader size={16} strokeWidth={2} className="animate-spin" />
+ <p className="ml-3 text-sm">{loading.message}</p>
</div>
) : (
<div className="flex cursor-pointer items-center">
- <Typography.Text>
- <p className="ml-3 text-sm">{breadcrumbs[breadcrumbs.length - 1] || ''}</p>
- </Typography.Text>
+ <p className="ml-3 text-sm">{breadcrumbs[breadcrumbs.length - 1] || ''}</p>
<div className="ml-3 flex items-center space-x-2 opacity-0 transition group-hover:opacity-100">
<Button type="text" icon={<IconEdit2 />}>
Navigate
@@ -75,32 +68,22 @@ const HeaderBreadcrumbs = ({ loading, breadcrumbs, selectBreadcrumb }) => {
return loading.isLoading ? (
<div className="ml-2 flex items-center">
- <Typography.Text>
- <IconLoader size={16} strokeWidth={2} className="animate-spin" />
- </Typography.Text>
- <Typography.Text>
- <p className="ml-3 text-sm">{loading.message}</p>
- </Typography.Text>
+ <IconLoader size={16} strokeWidth={2} className="animate-spin" />
+ <p className="ml-3 text-sm">{loading.message}</p>
</div>
) : (
<div className="ml-3 flex items-center">
{formattedBreadcrumbs.map((crumb, idx) => (
<div className="flex items-center" key={crumb.name}>
- {idx !== 0 && (
- <Typography.Text>
- <IconChevronRight size={10} strokeWidth={2} className="mx-3" />
- </Typography.Text>
- )}
- <Typography.Text>
- <p
- key={crumb.name}
- className={`truncate text-sm ${crumb.name !== ellipsis ? 'cursor-pointer' : ''}`}
- style={{ maxWidth: '6rem' }}
- onClick={() => (crumb.name !== ellipsis ? selectBreadcrumb(crumb.index) : {})}
- >
- {crumb.name}
- </p>
- </Typography.Text>
+ {idx !== 0 && <IconChevronRight size={10} strokeWidth={2} className="mx-3" />}
+ <p
+ key={crumb.name}
+ className={`truncate text-sm ${crumb.name !== ellipsis ? 'cursor-pointer' : ''}`}
+ style={{ maxWidth: '6rem' }}
+ onClick={() => (crumb.name !== ellipsis ? selectBreadcrumb(crumb.index) : {})}
+ >
+ {crumb.name}
+ </p>
</div>
))}
</div>
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/MoveItemsModal.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/MoveItemsModal.js
index 6a299d44c5e..d538bd603cb 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/MoveItemsModal.js
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/MoveItemsModal.js
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react'
-import { Modal, Button, Input, Space, Typography } from '@supabase/ui'
+import { Modal, Button, Input, Space } from '@supabase/ui'
const MoveItemsModal = ({
bucketName = '',
diff --git a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePolicies.js b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePolicies.js
index f25cca91a06..460f0f941c1 100644
--- a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePolicies.js
+++ b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePolicies.js
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'
import { observer } from 'mobx-react-lite'
-import { IconLoader, Typography } from '@supabase/ui'
+import { IconLoader } from '@supabase/ui'
import { find, get, isEmpty, filter } from 'lodash'
import { useStore } from 'hooks'
@@ -179,10 +179,10 @@ const StoragePolicies = () => {
})}
<div className="!mb-4 w-full border-b border-gray-600" />
- <Typography.Text className="opacity-50">
+ <p className="text-scale-1000">
You may also write policies for the tables under the storage schema directly for greater
control
- </Typography.Text>
+ </p>
{/* Section for policies under storage.objects that are not tied to any buckets */}
<StoragePoliciesBucketRow
diff --git a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesBucketRow.js b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesBucketRow.js
index e426c63bee9..4a235ec3444 100644
--- a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesBucketRow.js
+++ b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesBucketRow.js
@@ -2,7 +2,6 @@ import {
Badge,
Button,
IconArchive,
- Typography,
Dropdown,
IconEdit,
IconTrash,
@@ -62,32 +61,6 @@ const PolicyRow = ({
</Panel.Content>
</div>
)
- return (
- <div className="grid grid-cols-10 p-4 px-6 group">
- <div className="col-span-4">
- <Typography.Text>{name}</Typography.Text>
- </div>
- <div className="col-span-4 flex flex-col">
- <div>
- <Badge color="green">{command}</Badge>
- </div>
- </div>
- <div className="col-span-2 flex items-center justify-end opacity-0 transition group-hover:opacity-100">
- <div name="flex">
- <Button
- type="outline"
- className="mr-2"
- onClick={() => onSelectPolicyEdit(policy, bucketName, table)}
- >
- Edit
- </Button>
- <Button type="outline" onClick={() => onSelectPolicyDelete(policy)}>
- Delete
- </Button>
- </div>
- </div>
- </div>
- )
}
const StoragePoliciesBucketRow = ({
@@ -114,12 +87,10 @@ const StoragePoliciesBucketRow = ({
title={[
<div key={label} className="flex items-center justify-between w-full">
<div className="flex items-center space-x-4">
- <Typography.Text type="secondary">
- <IconArchive size="small" />
- </Typography.Text>
- <Typography.Title level={4} className="m-0">
+ <IconArchive className="text-scale-1000" size="small" />
+ <h4 className="text-lg m-0">
<span>{label}</span>
- </Typography.Title>
+ </h4>
{bucket.public && <Badge color="yellow">Public</Badge>}
</div>
<Button type="outline" onClick={() => onSelectPolicyAdd(bucket.name, table)}>
diff --git a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.js b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.js
index ee6c75e5813..a0d94825192 100644
--- a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.js
+++ b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.js
@@ -1,4 +1,4 @@
-import { Modal, Typography, IconChevronLeft } from '@supabase/ui'
+import { Modal, IconChevronLeft } from '@supabase/ui'
import { pull } from 'lodash'
import { useState, useEffect } from 'react'
@@ -177,18 +177,14 @@ const StoragePoliciesEditPolicyModal = ({
>
<IconChevronLeft strokeWidth={2} size={14} />
</span>
- <Typography.Title level={4} className="m-0">
- Select a template to use for your new policy
- </Typography.Title>
+ <h4 className="textlg m-0">Select a template to use for your new policy</h4>
</div>
</div>
)
}
return (
<div className="flex items-center space-x-3">
- <Typography.Title level={4} className="m-0">
- {getTitle()}
- </Typography.Title>
+ <h4 className="text-lg m-0">{getTitle()}</h4>
</div>
)
}
diff --git a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesReview.js b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesReview.js
index cfbc2cb0f45..52739f936a1 100644
--- a/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesReview.js
+++ b/studio/components/to-be-cleaned/Storage/StoragePolicies/StoragePoliciesReview.js
@@ -1,11 +1,11 @@
-import { Button, Typography, Modal } from '@supabase/ui'
+import { Button, Modal } from '@supabase/ui'
import { useState } from 'react'
import SqlEditor from 'components/ui/SqlEditor'
const ReviewEmptyState = () => {
return (
<div className="flex items-center justify-center my-10 opacity-50 space-x-2">
- <Typography.Text>There are no changes made to this policy</Typography.Text>
+ <p>There are no changes made to this policy</p>
</div>
)
}
diff --git a/studio/components/to-be-cleaned/Table.tsx b/studio/components/to-be-cleaned/Table.tsx
index 23ec56b1fa1..dc3c37f83ce 100644
--- a/studio/components/to-be-cleaned/Table.tsx
+++ b/studio/components/to-be-cleaned/Table.tsx
@@ -1,5 +1,4 @@
import * as React from 'react'
-import { Typography } from '@supabase/ui'
type TableProps = {
body: JSX.Element | JSX.Element[]
diff --git a/studio/components/to-be-cleaned/forms/SchemaFormPanel.js b/studio/components/to-be-cleaned/forms/SchemaFormPanel.js
index c6298df20aa..4b116f477bb 100644
--- a/studio/components/to-be-cleaned/forms/SchemaFormPanel.js
+++ b/studio/components/to-be-cleaned/forms/SchemaFormPanel.js
@@ -1,6 +1,6 @@
import SchemaForm from './SchemaForm'
import React, { useState } from 'react'
-import { Button, Typography } from '@supabase/ui'
+import { Button } from '@supabase/ui'
export default function SchemaFormPanel({
schema,
@@ -46,7 +46,7 @@ export default function SchemaFormPanel({
flex overflow-hidden items-center"
>
<div className="flex-1 text-left">
- <Typography.Title level={6}>{title || ''}</Typography.Title>
+ <h6>{title || ''}</h6>
</div>
<div
className={`flex transition duration-150 ${
diff --git a/studio/components/ui/CardButton.tsx b/studio/components/ui/CardButton.tsx
index afeeff659fd..203639c3a72 100644
--- a/studio/components/ui/CardButton.tsx
+++ b/studio/components/ui/CardButton.tsx
@@ -83,11 +83,13 @@ const CardButton: FC<Props> = ({
{icon && <ImageContainer>{icon}</ImageContainer>}
<div className="flex h-full w-full flex-col space-y-2">
<h5 className="text-scale-1200">{title}</h5>
- <div className="flex w-full flex-1 flex-col">
- <p className="text-scale-1100 text-sm">{description}</p>
- <div className="w-full">{children && children}</div>
- </div>
- <div className="w-full">{footer && footer}</div>
+ {(children || description) && (
+ <div className="flex w-full flex-1 flex-col">
+ <p className="text-scale-1100 text-sm">{description}</p>
+ <div className="w-full">{children && children}</div>
+ </div>
+ )}
+ {footer && <div className="w-full">{footer}</div>}
</div>
{isLink && (
<div
diff --git a/studio/components/ui/Charts/EmptyState.tsx b/studio/components/ui/Charts/EmptyState.tsx
index e329be770f7..5c2528afc32 100644
--- a/studio/components/ui/Charts/EmptyState.tsx
+++ b/studio/components/ui/Charts/EmptyState.tsx
@@ -1,5 +1,5 @@
import { FC } from 'react'
-import { Typography, IconBarChart2 } from '@supabase/ui'
+import { IconBarChart2 } from '@supabase/ui'
interface Props {}
@@ -11,10 +11,10 @@ const EmptyState: FC<Props> = () => (
flex flex-col items-center justify-center
"
>
- <Typography.Text className="mb-2">
+ <div className="mb-2">
<IconBarChart2 />
- </Typography.Text>
- <Typography.Text>No data to show</Typography.Text>
+ </div>
+ <p>No data to show</p>
</div>
)
diff --git a/studio/components/ui/Error.tsx b/studio/components/ui/Error.tsx
index 575c1504196..28605550e8b 100644
--- a/studio/components/ui/Error.tsx
+++ b/studio/components/ui/Error.tsx
@@ -1,6 +1,6 @@
import { useEffect } from 'react'
import Link from 'next/link'
-import { Button, Typography } from '@supabase/ui'
+import { Button } from '@supabase/ui'
export default function EmptyPageState({ error }: any) {
useEffect(() => {
@@ -10,7 +10,7 @@ export default function EmptyPageState({ error }: any) {
return (
<div className="mx-auto flex h-full w-full flex-col items-center justify-center space-y-6">
<div className="flex w-[320px] flex-col items-center justify-center space-y-3">
- <Typography.Title level={3}>Something went wrong 🤕</Typography.Title>
+ <h4 className="text-lg">Something went wrong 🤕</h4>
<p className="text-scale-1100 text-center text-sm">
Sorry about that, please try again later or feel free to reach out to us if the problem
persists.
diff --git a/studio/components/ui/FormBoxEmpty.tsx b/studio/components/ui/FormBoxEmpty.tsx
index e9d7ec3eee3..a1016e2bf54 100644
--- a/studio/components/ui/FormBoxEmpty.tsx
+++ b/studio/components/ui/FormBoxEmpty.tsx
@@ -1,5 +1,4 @@
import { ReactText } from 'react'
-import { Typography } from '@supabase/ui'
interface Props {
icon: JSX.Element
@@ -12,7 +11,7 @@ const FormBoxEmpty = ({ icon, text }: Props) => {
<div className="relative bg-scale-300 text-scale-900 w-6 h-6 rounded-full flex items-center justify-center">
{icon}
</div>
- <Typography.Text type="secondary">{text}</Typography.Text>
+ <p className="text-scale-1000">{text}</p>
</div>
)
}
diff --git a/studio/components/ui/Modals/TextConfirmModal.tsx b/studio/components/ui/Modals/TextConfirmModal.tsx
index cea2309c277..1d3e43ca9bd 100644
--- a/studio/components/ui/Modals/TextConfirmModal.tsx
+++ b/studio/components/ui/Modals/TextConfirmModal.tsx
@@ -1,5 +1,5 @@
import { FC, ReactNode } from 'react'
-import { Modal, Button, Typography, Input, Alert, Form } from '@supabase/ui'
+import { Modal, Button, Input, Alert, Form } from '@supabase/ui'
interface Props {
loading: boolean
@@ -58,9 +58,7 @@ const TextConfirmModal: FC<Props> = ({
</Modal.Content>
)}
<Modal.Content>
- <Typography.Text className="block">
- <p className="mb-2 text-sm">{text}</p>
- </Typography.Text>
+ <p className="mb-2 text-sm block">{text}</p>
</Modal.Content>
<Modal.Seperator />
<Modal.Content>
diff --git a/studio/components/ui/PasswordStrengthBar.tsx b/studio/components/ui/PasswordStrengthBar.tsx
index 2658cc5a74f..f6f0e9a6c05 100644
--- a/studio/components/ui/PasswordStrengthBar.tsx
+++ b/studio/components/ui/PasswordStrengthBar.tsx
@@ -3,7 +3,6 @@ import {
PASSWORD_STRENGTH_COLOR,
PASSWORD_STRENGTH_PERCENTAGE,
} from 'lib/constants'
-import { Typography } from '@supabase/ui'
interface Props {
passwordStrengthScore: number
@@ -39,7 +38,7 @@ const PasswordStrengthBar = ({
></div>
</div>
)}
- <Typography.Text
+ <p
className={
passwordStrengthScore >= DEFAULT_MINIMUM_PASSWORD_STRENGTH ? 'text-green-600' : ''
}
@@ -47,10 +46,13 @@ const PasswordStrengthBar = ({
{passwordStrengthMessage
? passwordStrengthMessage
: 'This is the password to your postgres database, so it must be a strong password and hard to guess.'}{' '}
- <button className="underline hover:decoration-2" onClick={generateStrongPassword}>
+ <span
+ className="text-brand-800 underline hover:text-brand-900 transition cursor-pointer"
+ onClick={generateStrongPassword}
+ >
Generate a password
- </button>
- </Typography.Text>
+ </span>
+ </p>
</>
)
}
diff --git a/studio/components/ui/SqlEditor.tsx b/studio/components/ui/SqlEditor.tsx
index 77ac9a755bf..c711a4f6c65 100644
--- a/studio/components/ui/SqlEditor.tsx
+++ b/studio/components/ui/SqlEditor.tsx
@@ -1,6 +1,5 @@
import Editor, { OnChange, useMonaco } from '@monaco-editor/react'
import { FC, useEffect, useRef } from 'react'
-import { Typography } from '@supabase/ui'
import { useStore } from 'hooks'
interface Props {
@@ -96,7 +95,7 @@ const SqlEditor: FC<Props> = ({
})
}
- const Loading = () => <Typography.Title level={4}>Loading</Typography.Title>
+ const Loading = () => <h4 className="text-lg">Loading</h4>
return (
<Editor
diff --git a/studio/components/ui/Usage.tsx b/studio/components/ui/Usage.tsx
index 0d5970162b2..bea17616b0b 100644
--- a/studio/components/ui/Usage.tsx
+++ b/studio/components/ui/Usage.tsx
@@ -1,6 +1,6 @@
import React, { FC, useEffect } from 'react'
import useSWR from 'swr'
-import { Loading, Typography } from '@supabase/ui'
+import { Loading } from '@supabase/ui'
import { useProjectSubscription, useStore } from 'hooks'
import { API_URL, PRICING_TIER_PRODUCT_IDS } from 'lib/constants'
@@ -183,9 +183,7 @@ const ProjectUsage: FC<ProjectUsageProps> = ({ projectRef, subscription_id }) =>
<div className="flex h-8 w-8 items-center justify-center rounded bg-white">
<img width={'16'} src={product.icon_src} />
</div>
- <Typography.Title level={5} className="mb-0">
- {product.title}
- </Typography.Title>
+ <h5 className="mb-0">{product.title}</h5>
</div>
</th>
<th className="hidden p-3 text-left text-xs font-medium leading-4 text-gray-400 lg:table-cell">
diff --git a/studio/pages/500.tsx b/studio/pages/500.tsx
index 03ac6231660..60b3413e139 100644
--- a/studio/pages/500.tsx
+++ b/studio/pages/500.tsx
@@ -1,7 +1,7 @@
import { NextPage } from 'next'
import Link from 'next/link'
import Image from 'next/image'
-import { Button, Typography } from '@supabase/ui'
+import { Button } from '@supabase/ui'
import { observer } from 'mobx-react-lite'
import { useStore } from 'hooks'
@@ -29,11 +29,11 @@ const Error500: NextPage = ({}) => {
</nav>
</div>
<div className="w-[320px] flex flex-col items-center justify-center space-y-3">
- <Typography.Title level={3}>Something went wrong 🤕</Typography.Title>
- <Typography.Text className="text-center">
+ <h4 className="text-lg">Something went wrong 🤕</h4>
+ <p className="text-center">
Sorry about that, please try again later or feel free to reach out to us if the problem
persists.
- </Typography.Text>
+ </p>
</div>
<div className="flex items-center space-x-4">
<Link href="/">
diff --git a/studio/pages/account/me.tsx b/studio/pages/account/me.tsx
index 8da31cf3466..32b8e63640f 100644
--- a/studio/pages/account/me.tsx
+++ b/studio/pages/account/me.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { observer } from 'mobx-react-lite'
-import { IconMoon, IconSun, Typography, Input, Listbox } from '@supabase/ui'
+import { IconMoon, IconSun, Input, Listbox } from '@supabase/ui'
import { useProfile, useStore } from 'hooks'
import { post } from 'lib/common/fetch'
@@ -91,9 +91,9 @@ const GithubProfile = observer(() => {
return (
<Panel
title={
- <Typography.Title key="panel-title" level={5} className="mb-0">
+ <h5 key="panel-title" className="mb-0">
Account Information
- </Typography.Title>
+ </h5>
}
>
<Panel.Content>
@@ -122,13 +122,7 @@ const ThemeSettings = observer(() => {
const { ui } = useStore()
return (
- <Panel
- title={
- <Typography.Title key="panel-title" level={5}>
- Theme
- </Typography.Title>
- }
- >
+ <Panel title={<h5 key="panel-title">Theme</h5>}>
<Panel.Content>
<Listbox
value={ui.themeOption}
diff --git a/studio/pages/project/[ref]/api/index.tsx b/studio/pages/project/[ref]/api/index.tsx
index c9d4ebb3382..7fb5b053e97 100644
--- a/studio/pages/project/[ref]/api/index.tsx
+++ b/studio/pages/project/[ref]/api/index.tsx
@@ -1,6 +1,6 @@
import useSWR, { mutate } from 'swr'
import { useRouter } from 'next/router'
-import { Button, Dropdown, IconKey, Typography } from '@supabase/ui'
+import { Button, Dropdown, IconKey } from '@supabase/ui'
import { FC, createContext, useContext, useEffect, useState } from 'react'
import { observer, useLocalObservable } from 'mobx-react-lite'
@@ -101,16 +101,16 @@ const DocView: FC<any> = observer(({}) => {
if (error || jsonSchemaError)
return (
<div className="mx-auto p-6 text-center sm:w-full md:w-3/4">
- <Typography.Text type="danger">
+ <p className="text-scale-1000">
<p>Error connecting to API</p>
<p>{`${error || jsonSchemaError}`}</p>
- </Typography.Text>
+ </p>
</div>
)
if (!data || !jsonSchema || !PageState.jsonSchema)
return (
<div className="mx-auto p-6 text-center sm:w-full md:w-3/4">
- <Typography.Title level={3}>Building docs ...</Typography.Title>
+ <h3 className="text-xl">Building docs ...</h3>
</div>
)
diff --git a/studio/pages/project/[ref]/database/hooks/[id]/logs.tsx b/studio/pages/project/[ref]/database/hooks/[id]/logs.tsx
index 84a98736f00..85e8adc49d8 100644
--- a/studio/pages/project/[ref]/database/hooks/[id]/logs.tsx
+++ b/studio/pages/project/[ref]/database/hooks/[id]/logs.tsx
@@ -3,10 +3,10 @@ import dayjs from 'dayjs'
import { useRouter } from 'next/router'
import { uniqBy, map as lodashMap } from 'lodash'
import { FC, useState, useEffect } from 'react'
-import { Button, Typography } from '@supabase/ui'
+import { Button } from '@supabase/ui'
import { observer } from 'mobx-react-lite'
-import { useStore, withAuth } from 'hooks'
+import { useStore } from 'hooks'
import { get } from 'lib/common/fetch'
import { API_URL } from 'lib/constants'
import { DatabaseLayout } from 'components/layouts'
@@ -49,31 +49,31 @@ const HookLogs: FC<any> = observer(() => {
if (meta.hooks.hasError) {
return (
- <Typography.Text type="danger">
+ <p className="text-scale-1000">
<p>Error connecting to API</p>
<p>{`${meta.hooks.error}`}</p>
- </Typography.Text>
+ </p>
)
}
if (logsError) {
return (
- <Typography.Text type="danger">
+ <p className="text-scale-1000">
<p>Error connecting to API</p>
<p>{`${logsError.error}`}</p>
- </Typography.Text>
+ </p>
)
}
if (meta.hooks.isLoading || !logsData) {
- return <Typography.Text className="px-6 py-4">Loading hook logs...</Typography.Text>
+ return <p className="px-6 py-4">Loading hook logs...</p>
}
return (
<div className="space-y-8">
{/* <CreateHook /> */}
<div className="px-6">
- <Typography.Title level={4}>{hooksData.name} logs</Typography.Title>
+ <h4 className="text-lg">{hooksData.name} logs</h4>
<div className="space-x-3">
<Button>All</Button>
<Button>Errors</Button>
@@ -87,22 +87,13 @@ const HookLogs: FC<any> = observer(() => {
<div className="flex flex-col space-y-1 py-4 px-6">
<div className="flex items-center justify-between">
<div className="space-x-3">
- <Typography.Text className="font-mono" type="secondary">
- [{log.method}]
- </Typography.Text>
- <Typography.Text className="font-mono" type="default">
- {log.url}
- </Typography.Text>
+ <p className="font-mono text-scale-1000">[{log.method}]</p>
+ <p className="font-mono">{log.url}</p>
</div>
- <Typography.Text className="font-mono" type="secondary">
+ <p className="font-mono text-scale-1000">
{dayjs(log.created_at).format('DDMMYYY')}
- </Typography.Text>
+ </p>
</div>
- {/* <Typography.Text className="font-mono">created at: {log.created_at}</Typography.Text>
- <Typography.Text className="font-mono">headers: {log.headers}</Typography.Text>
- <Typography.Text className="font-mono">args: {log.args}</Typography.Text>
- <Typography.Text className="font-mono">method: {log.method}</Typography.Text>
- <Typography.Text className="font-mono">status: {log.status}</Typography.Text> */}
</div>
)
})}
diff --git a/studio/pages/project/[ref]/index.tsx b/studio/pages/project/[ref]/index.tsx
index b62411ce8c8..ebba0297e76 100644
--- a/studio/pages/project/[ref]/index.tsx
+++ b/studio/pages/project/[ref]/index.tsx
@@ -1,5 +1,4 @@
import { observer } from 'mobx-react-lite'
-import { Typography } from '@supabase/ui'
import { useStore } from 'hooks'
import { NextPageWithLayout } from 'types'
@@ -31,7 +30,7 @@ const Home: NextPageWithLayout = () => {
<div className="space-y-8">
<div className="mx-6">
- <Typography.Title level={4}>Client libraries</Typography.Title>
+ <h4 className="text-lg">Client libraries</h4>
</div>
<div className="mx-6 mb-12 grid gap-12 md:grid-cols-3">
{CLIENT_LIBRARIES.map((library) => (
@@ -41,7 +40,7 @@ const Home: NextPageWithLayout = () => {
</div>
<div className="space-y-8">
<div className="mx-6">
- <Typography.Title level={4}>Example projects</Typography.Title>
+ <h4 className="text-lg">Example projects</h4>
</div>
<div className="mx-6 grid gap-8 md:grid-cols-2 lg:grid-cols-3">
{EXAMPLE_PROJECTS.sort((a, b) => a.title.localeCompare(b.title)).map((project) => (
diff --git a/studio/pages/project/[ref]/settings/billing/index.tsx b/studio/pages/project/[ref]/settings/billing/index.tsx
index af343ba0a7c..b64a4403f95 100644
--- a/studio/pages/project/[ref]/settings/billing/index.tsx
+++ b/studio/pages/project/[ref]/settings/billing/index.tsx
@@ -1,7 +1,7 @@
import dayjs from 'dayjs'
import { FC, useEffect, useState } from 'react'
import { observer } from 'mobx-react-lite'
-import { Typography, Loading, IconArrowRight } from '@supabase/ui'
+import { Loading, IconArrowRight } from '@supabase/ui'
import { Project, NextPageWithLayout } from 'types'
import { useProjectPaygStatistics, useProjectSubscription, useStore } from 'hooks'
@@ -79,7 +79,7 @@ const Settings: FC<SettingsProps> = ({ project }) => {
<Loading active={loading}>
<div className="border-panel-border-light dark:border-panel-border-dark mb-8 w-full overflow-hidden rounded border">
<div className="bg-panel-body-light dark:bg-panel-body-dark flex items-center justify-center px-6 py-6">
- <Typography.Text>Loading usage breakdown</Typography.Text>
+ <p>Loading usage breakdown</p>
</div>
</div>
</Loading>
@@ -95,15 +95,15 @@ const Settings: FC<SettingsProps> = ({ project }) => {
/>
{dateRange && (
<div className="flex items-center space-x-2">
- <Typography.Text type="secondary">
+ <p className="text-scale-1000">
{dayjs(dateRange.period_start.date).format('MMM D, YYYY')}
- </Typography.Text>
- <Typography.Text type="secondary" className="opacity-50">
+ </p>
+ <p className="text-scale-1000">
<IconArrowRight size={12} />
- </Typography.Text>
- <Typography.Text type="secondary">
+ </p>
+ <p className="text-scale-1000">
{dayjs(dateRange.period_end.date).format('MMM D, YYYY')}
- </Typography.Text>
+ </p>
</div>
)}
</div>
diff --git a/studio/pages/project/[ref]/settings/database.tsx b/studio/pages/project/[ref]/settings/database.tsx
index 7c1a611aeaf..6275feba13e 100644
--- a/studio/pages/project/[ref]/settings/database.tsx
+++ b/studio/pages/project/[ref]/settings/database.tsx
@@ -7,7 +7,7 @@ import { observer } from 'mobx-react-lite'
import { useRouter } from 'next/router'
import { debounce } from 'lodash'
import generator from 'generate-password'
-import { Typography, Input, Button, IconDownload, IconArrowRight, Tabs, Modal } from '@supabase/ui'
+import { Input, Button, IconDownload, IconArrowRight, Tabs, Modal } from '@supabase/ui'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { checkPermissions, useFlag, useStore } from 'hooks'
@@ -59,9 +59,9 @@ const Usage: FC<any> = ({ project }) => {
<section className="">
<Panel
title={
- <Typography.Title key="panel-title" level={5} className="mb-0">
+ <h5 key="panel-title" className="mb-0">
Database health
- </Typography.Title>
+ </h5>
}
>
<Panel.Content>
@@ -75,15 +75,15 @@ const Usage: FC<any> = ({ project }) => {
/>
{dateRange && (
<div className="flex items-center space-x-2">
- <Typography.Text type="secondary">
+ <p className="text-scale-1000">
{dayjs(dateRange.period_start.date).format('MMMM D, hh:mma')}
- </Typography.Text>
- <Typography.Text type="secondary" className="opacity-50">
+ </p>
+ <p className="text-scale-1000">
<IconArrowRight size={12} />
- </Typography.Text>
- <Typography.Text type="secondary">
+ </p>
+ <p className="text-scale-1000">
{dayjs(dateRange.period_end.date).format('MMMM D, hh:mma')}
- </Typography.Text>
+ </p>
</div>
)}
</div>
@@ -129,9 +129,9 @@ const Usage: FC<any> = ({ project }) => {
<section className="mt-6">
<Panel
title={
- <Typography.Title key="panel-title" level={5} className="mb-0">
+ <h5 key="panel-title" className="mb-0">
Database storage
- </Typography.Title>
+ </h5>
}
>
<Panel.Content>
@@ -225,7 +225,7 @@ const ResetDbPassword: FC<any> = () => {
<Panel.Content>
<div className="grid grid-cols-1 items-center lg:grid-cols-2">
<div>
- <Typography.Text className="block">Database password</Typography.Text>
+ <p className="block">Database password</p>
<div style={{ maxWidth: '420px' }}>
<p className="text-sm opacity-50">
You can use this password to connect directly to your Postgres database.
@@ -323,7 +323,7 @@ const DownloadCertificate: FC<any> = ({ createdAt }) => {
<Panel.Content>
<div className="grid grid-cols-1 items-center lg:grid-cols-2">
<div>
- <Typography.Text className="block">SSL Connection</Typography.Text>
+ <p className="block">SSL Connection</p>
<div style={{ maxWidth: '420px' }}>
<p className="text-sm opacity-50">
Use this certificate when connecting to your database to prevent snooping and
@@ -352,7 +352,7 @@ const GeneralSettings: FC<any> = ({ projectRef }) => {
if (data?.error || error) {
return (
<div className="mx-auto p-6 text-center sm:w-full md:w-3/4">
- <Typography.Title level={3}>Error loading database settings</Typography.Title>
+ <p className="text-scale-1000">Error loading database settings</p>
</div>
)
}
@@ -360,7 +360,7 @@ const GeneralSettings: FC<any> = ({ projectRef }) => {
if (!data) {
return (
<div className="mx-auto p-6 text-center sm:w-full md:w-3/4">
- <Typography.Title level={3}>Loading...</Typography.Title>
+ <p className="text-scale-1000">Loading...</p>
</div>
)
}
@@ -390,10 +390,9 @@ const GeneralSettings: FC<any> = ({ projectRef }) => {
<section className="mt-6 space-y-6">
<Panel
title={
- <Typography.Title key="panel-title" level={5} className="mb-0">
+ <h5 key="panel-title" className="mb-0">
Connection info
- </Typography.Title>
- // <Title level={4}>Connection info</Title>
+ </h5>
}
>
<Panel.Content className="space-y-6">
@@ -455,9 +454,9 @@ const GeneralSettings: FC<any> = ({ projectRef }) => {
<section className="mt-6 space-y-6">
<Panel
title={
- <Typography.Title key="panel-title" level={5} className="mb-0">
+ <h5 key="panel-title" className="mb-0">
Connection string
- </Typography.Title>
+ </h5>
}
>
<Panel.Content>
diff --git a/studio/pages/project/[ref]/sql/sql-new.tsx b/studio/pages/project/[ref]/sql/sql-new.tsx
deleted file mode 100644
index 995b0787d75..00000000000
--- a/studio/pages/project/[ref]/sql/sql-new.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { NextPage } from 'next'
-import { useRouter } from 'next/router'
-import { observer } from 'mobx-react-lite'
-import { isUndefined } from 'lodash'
-
-import { withAuth } from 'hooks'
-import { SQLEditorLayout } from 'components/layouts'
-import { SQLEditor } from 'components/interfaces'
-
-// [Joshen] This is the mid re-written SQL which will replace index.tsx
-
-const Sql: NextPage = () => {
- const router = useRouter()
- const { queryId, templateId } = router.query
-
- return (
- <SQLEditorLayout title="SQL">
- <SQLEditor
- queryId={!isUndefined(queryId) ? (queryId as string) : undefined}
- templateId={!isUndefined(templateId) ? Number(templateId) : undefined}
- />
- </SQLEditorLayout>
- )
-}
-
-export default withAuth(observer(Sql))
diff --git a/studio/pages/vercel/integrate.tsx b/studio/pages/vercel/integrate.tsx
index 4b33d73deea..6a9282e741d 100644
--- a/studio/pages/vercel/integrate.tsx
+++ b/studio/pages/vercel/integrate.tsx
@@ -1,17 +1,10 @@
+import Link from 'next/link'
import { ChangeEvent, createContext, FC, useContext, useEffect, useState } from 'react'
import { toast } from 'react-hot-toast'
import { useRouter } from 'next/router'
import { observer, useLocalObservable } from 'mobx-react-lite'
import { makeAutoObservable, runInAction } from 'mobx'
-import {
- Button,
- Select,
- Typography,
- IconPlusCircle,
- IconX,
- IconChevronRight,
- Listbox,
-} from '@supabase/ui'
+import { Button, Select, IconPlusCircle, IconX, IconChevronRight, Listbox } from '@supabase/ui'
import Divider from 'components/ui/Divider'
import { Dictionary } from 'components/grid'
@@ -215,19 +208,21 @@ const Connecting = () => (
<div className="flex w-32 items-center justify-center">
<Loading />
</div>
- <Typography.Text>Connecting...</Typography.Text>
+ <p>Connecting...</p>
</div>
)
const ProjectLinksEmptyState = () => (
<div className="flex flex-col space-y-4">
- <Typography.Text>
+ <p>
You haven't created a Supabase project yet. Get started by creating a new Supabase project,
then close this window and retry adding integration.
- </Typography.Text>
- <Typography.Link href="https://app.supabase.com">
- Start a new Supabase project<span aria-hidden="true"> &rarr;</span>
- </Typography.Link>
+ </p>
+ <Link href="https://app.supabase.com">
+ <a className="text-brand-900">
+ Start a new Supabase project<span aria-hidden="true"> &rarr;</span>
+ </a>
+ </Link>
</div>
)
@@ -289,19 +284,13 @@ const IntegrationProject: FC = observer(() => {
w-full rounded-sm border"
>
<div className="flex items-center justify-between p-6">
- <Typography.Title level={4} className="my-auto mr-8 capitalize">
- {name}
- </Typography.Title>
+ <h4 className="text-lg my-auto mr-8 capitalize">{name}</h4>
<Button disabled={loading || !!errorMsg} loading={loading} onClick={onClick}>
Deploy
</Button>
</div>
</div>
- {errorMsg && (
- <Typography.Text className="py-4" type="danger">
- {errorMsg}
- </Typography.Text>
- )}
+ {errorMsg && <p className="py-4 text-scale-1000">{errorMsg}</p>}
</div>
)
})
@@ -451,21 +440,15 @@ const ProjectLinks: FC = observer(() => {
return (
<div className="flex w-full flex-col space-y-6">
<div>
- <Typography.Title level={4}>Link Vercel to Supabase</Typography.Title>
- <Typography.Text>
- Choose which of your Vercel projects to link to your existing Supabase projects.
- </Typography.Text>
+ <h4 className="text-lg">Link Vercel to Supabase</h4>
+ <p>Choose which of your Vercel projects to link to your existing Supabase projects.</p>
</div>
<Divider light />
<div className="space-y-2">
<div className="flex justify-between">
- <Typography.Text className="" type="secondary">
- Vercel Projects
- </Typography.Text>
+ <p className="text-scale-1000">Vercel Projects</p>
<div />
- <Typography.Text className="" type="secondary">
- Supabase Projects
- </Typography.Text>
+ <p className="text-scale-1000">Supabase Projects</p>
</div>
<ProjectLinkList />
<Divider light />
@@ -502,9 +485,9 @@ const ProjectLinkList: FC = observer(() => {
</ul>
<div className="py-2">
{_store.projectLinkRemaining == 0 ? (
- <Typography.Text type="secondary" small>
+ <p className="text-scale-1000 text-sm">
All Vercel projects for selected scope have been added
- </Typography.Text>
+ </p>
) : (
<div className="flex items-center space-x-2">
<Button
@@ -515,9 +498,9 @@ const ProjectLinkList: FC = observer(() => {
>
{`Add another Vercel Project`}
</Button>
- <Typography.Text type="secondary" small>
+ <p className="text-scale-1000 text-sm">
{_store.projectLinkRemaining} project(s) remaining
- </Typography.Text>
+ </p>
</div>
)}
</div>
@@ -596,9 +579,7 @@ const ProjectLinkItem: FC<ProjectLinkItemProps> = observer(
</Listbox>
</div>
<div className="flex flex-shrink items-center">
- <Typography.Text type="secondary">
- <IconChevronRight />
- </Typography.Text>
+ <IconChevronRight className="text-scale-1000" />
</div>
<div className="w-1/2 flex-grow">
<Listbox
@@ -631,24 +612,19 @@ const ProjectLinkItem: FC<ProjectLinkItemProps> = observer(
</div>
)}
</div>
- {error && (
- <Typography.Text type="danger" small>
- {error}
- </Typography.Text>
- )}
+ {error && <p className="text-scale-1000 text-sm">{error}</p>}
{_store.waitingIntegration && result && (
- <Typography.Text
- type={
- result.status == 'waiting'
- ? 'default'
- : result.status == 'fail'
- ? 'danger'
- : 'success'
- }
- small
+ <p
+ className={`text-sm ${
+ result.status === 'waiting'
+ ? 'text-scale-1000'
+ : result.status === 'fail'
+ ? 'text-scale-1000'
+ : 'text-scale-1200'
+ }`}
>
{result?.message ?? 'Processing...'}
- </Typography.Text>
+ </p>
)}
</li>
)
diff --git a/studio/pages/vercel/setupProject.tsx b/studio/pages/vercel/setupProject.tsx
index dd32f82c54f..56401efd3a9 100644
--- a/studio/pages/vercel/setupProject.tsx
+++ b/studio/pages/vercel/setupProject.tsx
@@ -4,7 +4,7 @@ import { useRouter } from 'next/router'
import { observer, useLocalObservable } from 'mobx-react-lite'
import { makeAutoObservable } from 'mobx'
import { debounce } from 'lodash'
-import { Button, Input, Listbox, Typography } from '@supabase/ui'
+import { Button, Input, Listbox } from '@supabase/ui'
import { Dictionary } from 'components/grid'
import generator from 'generate-password'
@@ -141,9 +141,7 @@ const Connecting = () => (
<div className="flex w-32 items-center justify-center">
<Loading />
</div>
- <Typography.Text>
- <p>Connecting...</p>
- </Typography.Text>
+ <p>Connecting...</p>
</div>
)