Skip to content

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

chore: updated SidePanels. replaced more text. updated Grid. updated Menus

Jonathan Summers-Muir7d2a8bcee0b2
diff --git a/studio/components/interfaces/Home/ClientLibrary.tsx b/studio/components/interfaces/Home/ClientLibrary.tsx
index fa85781ee08..00c357279d1 100644
--- a/studio/components/interfaces/Home/ClientLibrary.tsx
+++ b/studio/components/interfaces/Home/ClientLibrary.tsx
@@ -19,25 +19,25 @@ const ClientLibrary: FC<Props> = ({ language, releaseState, officialSupport, doc
/>
<div className="space-y-4">
<div>
- <Typography.Title level={5}>
+ <h5 className="text-scale-1200 text-base flex items-center gap-2">
{language} {releaseState && <Badge color="yellow">{`Public ${releaseState}`}</Badge>}
- </Typography.Title>
- <Typography.Text>
+ </h5>
+ <p className="text-scale-1000 text-sm">
{officialSupport
? 'This library is officially supported'
: 'This library is community supported'}
- </Typography.Text>
+ </p>
</div>
<div className="space-x-1">
{docsUrl && (
<a href={docsUrl} target="_blank">
- <Button icon={<IconBookOpen />} type="outline">
+ <Button icon={<IconBookOpen />} type="default">
Docs
</Button>
</a>
)}
<a href={gitUrl} target="_blank">
- <Button icon={<IconGitHub />} type="outline">
+ <Button icon={<IconGitHub />} type="default">
See GitHub
</Button>
</a>
diff --git a/studio/components/interfaces/Home/ExampleProject.tsx b/studio/components/interfaces/Home/ExampleProject.tsx
index 88f5c64f6e3..39227ed3c47 100644
--- a/studio/components/interfaces/Home/ExampleProject.tsx
+++ b/studio/components/interfaces/Home/ExampleProject.tsx
@@ -13,26 +13,40 @@ const ExampleProject: FC<Props> = ({ framework, title, description, url }) => {
<a href={url}>
<div
className={[
- 'bg-panel-header-light dark:bg-panel-header-dark hover:bg-bg-alt-light dark:hover:bg-bg-alt-dark border',
- 'border-border-secondary-light dark:border-border-secondary-dark hover:border-border-secondary-hover-light',
- 'dark:hover:border-border-secondary-hover-dark rounded-md p-4 flex flex-row h-32 hover:border-gray-300',
+ 'group relative',
+ 'bg-panel-header-light dark:bg-panel-header-dark hover:bg-panel-border-light dark:hover:bg-panel-border-dark border',
+ 'border-panel-border-light dark:border-panel-border-dark hover:border-panel-border-hover-light',
+ 'dark:hover:border-panel-border-hover-dark rounded-md p-4 flex flex-row h-32 hover:border-gray-300',
'transition ease-in-out duration-150',
].join(' ')}
>
<div className="flex flex-col mr-4">
<img
+ className="
+ transition-all
+ group-hover:scale-110
+ "
src={`/img/libraries/${framework.toLowerCase()}-icon.svg`}
alt={`${framework} logo`}
width="26"
/>
</div>
- <div className="space-y-4 w-4/5">
- <div>
- <Typography.Title level={5}>{title}</Typography.Title>
- <Typography.Text type="secondary">{description}</Typography.Text>
- </div>
+ <div className="space-y-2 w-4/5">
+ <h5 className="text-scale-1200">{title}</h5>
+ <p className="text-scale-1000 text-sm">{description}</p>
</div>
- <div>
+ <div
+ className="
+ absolute
+ right-4
+ top-3
+ text-scale-900
+ transition-all
+ duration-200
+ group-hover:right-3
+ group-hover:text-scale-1200
+ "
+ >
<IconChevronRight />
</div>
</div>
diff --git a/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx b/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx
index c5e6ca9c722..30dfe8bd910 100644
--- a/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx
+++ b/studio/components/interfaces/Home/NewProjectPanel/GetStartedPanel.tsx
@@ -15,17 +15,11 @@ const GetStartedPanel: FC<Props> = ({}) => {
<div>
<div className="flex flex-col justify-between h-full space-y-6">
<div className="space-y-2">
- <Typography.Title level={4} className="m-0">
- Welcome to your new project
- </Typography.Title>
- <div className="lg:max-w-lg">
- <Typography.Text className="block" type="secondary">
- <p>
- Your project has been deployed on its own instance, with its own url and API all
- set up and ready to use.
- </p>
- </Typography.Text>
- </div>
+ <h3 className="text-xl text-scale-1200">Welcome to your new project</h3>
+ <p className="lg:max-w-lg text-base text-scale-1000">
+ Your project has been deployed on its own instance, with its own url and API all set
+ up and ready to use.
+ </p>
</div>
</div>
</div>
@@ -34,17 +28,15 @@ const GetStartedPanel: FC<Props> = ({}) => {
<Panel>
<Panel.Content className=" flex flex-col space-y-4 lg:h-40">
<div className="flex items-center space-x-3">
- <Typography.Text>
- <IconDatabase size="medium" />
- </Typography.Text>
- <Typography.Title level={5} className="mb-0">
- Database
- </Typography.Title>
+ <div className="bg-scale-600 text-scale-1000 shadow-sm rounded p-1.5">
+ <IconDatabase strokeWidth={2} size={16} />
+ </div>
+ <h5>Database</h5>
</div>
<div className="flex flex-grow">
- <Typography.Text type="secondary" className="opacity-50">
+ <p className="text-scale-1000 text-sm">
Supabase is built on top of Postgres, an extremely scalable Relational Database.
- </Typography.Text>
+ </p>
</div>
<div className="space-x-2">
<Link href={`/project/${ref}/editor`}>
@@ -67,17 +59,15 @@ const GetStartedPanel: FC<Props> = ({}) => {
<Panel className="">
<Panel.Content className=" flex flex-col space-y-4 lg:h-40">
<div className="flex items-center space-x-3">
- <Typography.Text>
- <IconKey size="medium" />
- </Typography.Text>
- <Typography.Title level={5} className="mb-0">
- Auth
- </Typography.Title>
+ <div className="bg-scale-600 text-scale-1000 shadow-sm rounded p-1.5">
+ <IconKey strokeWidth={2} size={16} />
+ </div>
+ <h5>Auth</h5>
</div>
<div className="flex flex-grow">
- <Typography.Text type="secondary" className="opacity-50">
+ <p className="text-scale-1000 text-sm">
Supabase makes it simple to manage your users.
- </Typography.Text>
+ </p>
</div>
<div className="space-x-2">
<Link href={`/project/${ref}/auth/users`}>
@@ -95,17 +85,15 @@ const GetStartedPanel: FC<Props> = ({}) => {
<Panel>
<Panel.Content className=" flex flex-col space-y-4 lg:h-40">
<div className="flex items-center space-x-3">
- <Typography.Text>
- <IconArchive size="medium" />
- </Typography.Text>
- <Typography.Title level={5} className="mb-0">
- Storage
- </Typography.Title>
+ <div className="bg-scale-600 text-scale-1000 shadow-sm rounded p-1.5">
+ <IconArchive strokeWidth={2} size={16} />
+ </div>
+ <h5>Storage</h5>
</div>
<div className="flex flex-grow">
- <Typography.Text type="secondary" className="opacity-50">
+ <p className="text-scale-1000 text-sm">
Store and serve large files from multiple buckets.
- </Typography.Text>
+ </p>
</div>
<div className="space-x-2">
<Link href={`/project/${ref}/storage/buckets`}>
diff --git a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
index 9703431f573..fba67f8d2b9 100644
--- a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
+++ b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
@@ -16,17 +16,11 @@ const NewProjectPanel: FC<Props> = ({}) => (
</div>
<div className="col-span-4">
<div className="space-y-2">
- <Typography.Title level={4} className="m-0">
- Connecting to your new project
- </Typography.Title>
- <div className="lg:max-w-sm">
- <Typography.Text className="block" type="secondary">
- <p>
- Your project has API keys for interacting with the database via Supabase client
- libraries.
- </p>
- </Typography.Text>
- </div>
+ <h3 className="text-xl text-scale-1200">Connecting to your new project</h3>
+
+ <p className="lg:max-w-sm text-scale-1000">
+ Your project has API keys for interacting with the database via Supabase client libraries.
+ </p>
</div>
</div>
<div className="col-span-8">
diff --git a/studio/components/interfaces/Home/ProjectUsage.tsx b/studio/components/interfaces/Home/ProjectUsage.tsx
index 559e8ac45f5..c516ff1e434 100644
--- a/studio/components/interfaces/Home/ProjectUsage.tsx
+++ b/studio/components/interfaces/Home/ProjectUsage.tsx
@@ -84,37 +84,42 @@ const ProjectUsage: FC<Props> = ({ project }) => {
}
return (
<div className="mx-6 space-y-6">
- <div className="flex flex-row justify-between align-center w-full">
- <Typography.Title level={4}>Statistics for past {selectedInterval.label}</Typography.Title>
-
+ <div className="flex flex-row items-center gap-2">
{logsUsageChartIntervals && (
<Dropdown
side="bottom"
- align="end"
+ align="start"
overlay={
<Dropdown.RadioGroup value={interval} onChange={setInterval}>
{CHART_INTERVALS.map((i) => (
<Dropdown.Radio key={i.key} value={i.key}>
- <Typography.Text>{i.label}</Typography.Text>
+ {i.label}
</Dropdown.Radio>
))}
</Dropdown.RadioGroup>
}
>
- <Button type="text" iconRight={<IconChevronDown />}>
+ <Button as="span" type="default" iconRight={<IconChevronDown />}>
{selectedInterval.label}
</Button>
</Dropdown>
)}
+ <span className="text-scale-1000 text-xs">
+ Statistics for past {selectedInterval.label}
+ </span>
</div>
<div className="">
{startDate && endDate && (
<>
- <div className="grid lg:grid-cols-4 lg:gap-8">
+ <div className="grid lg:grid-cols-2 lg:gap-8">
<Panel key="database-chart">
<Panel.Content className="space-y-4">
<PanelHeader
- icon={<IconDatabase size="small" />}
+ icon={
+ <div className="bg-scale-600 text-scale-1000 shadow-sm rounded p-1.5">
+ <IconDatabase strokeWidth={2} size={16} />
+ </div>
+ }
title="Database"
href={`/project/${ref}/editor`}
/>
@@ -129,7 +134,6 @@ const ProjectUsage: FC<Props> = ({ project }) => {
customDateFormat={datetimeFormat}
data={charts}
isLoading={!charts && !error ? true : false}
- onBarClick={(v) => handleBarClick(v, '/rest')}
/>
<ProjectUsageMinimal
projectRef={project.ref}
@@ -141,7 +145,11 @@ const ProjectUsage: FC<Props> = ({ project }) => {
<Panel key="auth-chart">
<Panel.Content className="space-y-4">
<PanelHeader
- icon={<IconKey size="small" />}
+ icon={
+ <div className="bg-scale-600 text-scale-1000 shadow-sm rounded p-1.5">
+ <IconKey strokeWidth={2} size={16} />
+ </div>
+ }
title="Auth"
href={`/project/${ref}/auth/users`}
/>
@@ -156,7 +164,6 @@ const ProjectUsage: FC<Props> = ({ project }) => {
customDateFormat={datetimeFormat}
data={charts}
isLoading={!charts && !error ? true : false}
- onBarClick={(v) => handleBarClick(v, '/auth')}
/>
<ProjectUsageMinimal
projectRef={project.ref}
@@ -165,10 +172,16 @@ const ProjectUsage: FC<Props> = ({ project }) => {
/>
</Panel.Content>
</Panel>
+ </div>
+ <div className="grid lg:grid-cols-2 lg:gap-8">
<Panel key="storage-chart">
<Panel.Content className="space-y-4">
<PanelHeader
- icon={<IconArchive size="small" />}
+ icon={
+ <div className="bg-scale-600 text-scale-1000 shadow-sm rounded p-1.5">
+ <IconArchive strokeWidth={2} size={16} />
+ </div>
+ }
title="Storage"
href={`/project/${ref}/storage/buckets`}
/>
@@ -183,7 +196,6 @@ const ProjectUsage: FC<Props> = ({ project }) => {
customDateFormat={datetimeFormat}
data={charts}
isLoading={!charts && !error ? true : false}
- onBarClick={(v) => handleBarClick(v, '/storage')}
/>
<ProjectUsageMinimal
projectRef={project.ref}
@@ -194,7 +206,14 @@ const ProjectUsage: FC<Props> = ({ project }) => {
</Panel>
<Panel key="realtime-chart">
<Panel.Content className="space-y-4">
- <PanelHeader icon={<IconZap size="small" />} title="Realtime" />
+ <PanelHeader
+ icon={
+ <div className="bg-scale-600 text-scale-1000 shadow-sm rounded p-1.5">
+ <IconZap strokeWidth={2} size={16} />
+ </div>
+ }
+ title="Realtime"
+ />
<ChartHandler
startDate={startDate}
endDate={endDate}
@@ -210,86 +229,10 @@ const ProjectUsage: FC<Props> = ({ project }) => {
isLoading={!charts && !error ? true : false}
onBarClick={(v) => handleBarClick(v, '/realtime')}
/>
- {/* Empty space just so the cards are of the same height */}
- <div className="py-[26px]" />
- {/* <ProjectUsageMinimal
- projectRef={project.ref}
- subscription_id={project.subscription_id}
- filter="Connection requests"
- /> */}
+ <div className="py-[1.64rem]" />
</Panel.Content>
</Panel>
</div>
- {logsUsageCodesPaths && (
- <div className="grid lg:grid-cols-4 lg:gap-8">
- <Panel
- key="api-status-codes"
- className="col-start-1 col-span-2"
- wrapWithLoading={false}
- >
- <Panel.Content className="space-y-4">
- <PanelHeader title="API Status Codes" />
- <StackedAreaChart
- dateFormat={datetimeFormat}
- data={codesData?.result}
- stackKey="status_code"
- xAxisKey="timestamp"
- yAxisKey="count"
- isLoading={!codesData && !codesFetchError ? true : false}
- xAxisFormatAsDate
- size="large"
- styleMap={{
- 200: { stroke: USAGE_COLORS['200'], fill: USAGE_COLORS['200'] },
- 201: { stroke: USAGE_COLORS['201'], fill: USAGE_COLORS['201'] },
- 400: { stroke: USAGE_COLORS['400'], fill: USAGE_COLORS['400'] },
- 401: { stroke: USAGE_COLORS['401'], fill: USAGE_COLORS['401'] },
- 404: { stroke: USAGE_COLORS['404'], fill: USAGE_COLORS['404'] },
- 500: { stroke: USAGE_COLORS['500'], fill: USAGE_COLORS['500'] },
- }}
- />
- </Panel.Content>
- </Panel>
- <Panel
- key="top-routes"
- className="col-start-3 col-span-2 pb-0"
- bodyClassName="h-full"
- wrapWithLoading={false}
- >
- <Panel.Content className="space-y-4">
- <PanelHeader title="Top Routes" />
- <Table
- head={
- <>
- <Table.th>Path</Table.th>
- <Table.th>Count</Table.th>
- <Table.th>Avg. Latency (ms)</Table.th>
- </>
- }
- body={
- <>
- {(pathsData?.result ?? []).map((row: PathsDatum) => (
- <Table.tr>
- <Table.td className="flex items-center">
- <div className="w-[60px]">
- <Typography.Text code small>
- {row.method}
- </Typography.Text>
- </div>
- <Typography.Text className="font-mono" small>
- {row.path}
- </Typography.Text>
- </Table.td>
- <Table.td>{row.count}</Table.td>
- <Table.td>{Number(row.avg_origin_time).toFixed(2)}</Table.td>
- </Table.tr>
- ))}
- </>
- }
- />
- </Panel.Content>
- </Panel>
- </div>
- )}
</>
)}
</div>
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
index 0ce938a7653..ee224857ed3 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
@@ -128,11 +128,11 @@ const ColumnEditor: FC<Props> = ({
return (
<SidePanel
- wide
+ size="large"
key="ColumnEditor"
visible={visible}
// @ts-ignore
- title={<HeaderTitle table={selectedTable} column={column} />}
+ header={<HeaderTitle table={selectedTable} column={column} />}
onCancel={closePanel}
onConfirm={(resolve: () => void) => onSaveChanges(resolve)}
customFooter={
@@ -144,117 +144,131 @@ const ColumnEditor: FC<Props> = ({
/>
}
>
- <Space direction="vertical" size={6} style={{ width: '100%' }}>
- <Input
- label="Name"
- layout="horizontal"
- type="text"
- error={errors.name}
- value={columnFields?.name ?? ''}
- onChange={(event: any) => onUpdateField({ name: event.target.value })}
- />
- <Input
- label="Description"
- placeholder="Optional"
- layout="horizontal"
- type="text"
- value={columnFields?.comment ?? ''}
- onChange={(event: any) => onUpdateField({ comment: event.target.value })}
- />
- {isNewRecord && !hasPrimaryKey && (
- <div className="grid grid-cols-12 gap-4">
- <div className="col-span-12 md:col-span-8 md:col-start-5">
- <Checkbox
- label={hasPrimaryKey ? 'Add to composite primary key' : 'Is Primary Key'}
- description="A primary key indicates that a column or group of columns can be used as a unique identifier for rows in the table."
- checked={columnFields?.isPrimaryKey ?? false}
- onChange={() => onUpdateField({ isPrimaryKey: !columnFields?.isPrimaryKey })}
- />
- </div>
- </div>
- )}
- <ColumnForeignKey
- column={columnFields}
- originalForeignKey={foreignKey}
- onSelectEditRelation={() => setIsEditingRelation(true)}
- onSelectRemoveRelation={() => onUpdateField({ foreignKey: undefined })}
- />
- <Divider />
- <ColumnType
- value={columnFields?.format ?? ''}
- enumTypes={enumTypes}
- error={errors.format}
- disabled={!isUndefined(columnFields?.foreignKey)}
- onOptionSelect={(format: string) => onUpdateField({ format, defaultValue: '' })}
- />
- {isUndefined(columnFields.foreignKey) && (
- <div className="grid grid-cols-12 gap-4">
- {columnFields.format.includes('int') && (
- <div className="col-span-12 md:col-span-8 md:col-start-5">
- <Checkbox
- label="Is Identity"
- description="Automatically assign a sequential unique number to the column"
- checked={columnFields.isIdentity}
- onChange={() => {
- const isIdentity = !columnFields.isIdentity
- const isArray = isIdentity ? false : columnFields.isArray
- onUpdateField({ isIdentity, isArray })
- }}
- />
- </div>
- )}
- {!columnFields.isPrimaryKey && (
- <div className="col-span-12 md:col-span-8 md:col-start-5">
- <Checkbox
- label="Define as Array"
- description="Allow column to be defined as variable-length multidimensional arrays"
- checked={columnFields.isArray}
- onChange={() => {
- const isArray = !columnFields.isArray
- const isIdentity = isArray ? false : columnFields.isIdentity
- onUpdateField({ isArray, isIdentity })
- }}
- />
- </div>
- )}
- </div>
- )}
- <ColumnDefaultValue
- columnFields={columnFields}
- enumTypes={enumTypes}
- onUpdateField={onUpdateField}
- />
- {!columnFields.isPrimaryKey && (
- <>
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
+ <Input
+ label="Name"
+ layout="horizontal"
+ type="text"
+ error={errors.name}
+ value={columnFields?.name ?? ''}
+ onChange={(event: any) => onUpdateField({ name: event.target.value })}
+ />
+ <Input
+ label="Description"
+ placeholder="Optional"
+ layout="horizontal"
+ type="text"
+ value={columnFields?.comment ?? ''}
+ onChange={(event: any) => onUpdateField({ comment: event.target.value })}
+ />
+ </div>
+ </SidePanel.Content>
+
+ <SidePanel.Seperator />
+
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
+ {isNewRecord && !hasPrimaryKey && (
<div className="grid grid-cols-12 gap-4">
<div className="col-span-12 md:col-span-8 md:col-start-5">
<Checkbox
- label="Allow Nullable"
- description="Allow the column to assume a NULL value if no value is provided"
- checked={columnFields.isNullable}
- onChange={() => onUpdateField({ isNullable: !columnFields.isNullable })}
- />
- </div>
- <div className="col-span-12 md:col-span-8 md:col-start-5">
- <Checkbox
- label="Is Unique"
- description="Enforce values in the column to be unique across rows"
- checked={columnFields.isUnique}
- onChange={() => onUpdateField({ isUnique: !columnFields.isUnique })}
+ label={hasPrimaryKey ? 'Add to composite primary key' : 'Is Primary Key'}
+ description="A primary key indicates that a column or group of columns can be used as a unique identifier for rows in the table."
+ checked={columnFields?.isPrimaryKey ?? false}
+ onChange={() => onUpdateField({ isPrimaryKey: !columnFields?.isPrimaryKey })}
/>
</div>
</div>
- </>
- )}
- </Space>
- <ForeignKeySelector
- tables={tables}
- column={columnFields}
- foreignKey={foreignKey}
- visible={isEditingRelation}
- closePanel={() => setIsEditingRelation(false)}
- saveChanges={saveColumnForeignKey}
- />
+ )}
+ <ColumnForeignKey
+ column={columnFields}
+ originalForeignKey={foreignKey}
+ onSelectEditRelation={() => setIsEditingRelation(true)}
+ onSelectRemoveRelation={() => onUpdateField({ foreignKey: undefined })}
+ />
+ </div>
+ </SidePanel.Content>
+ <SidePanel.Seperator />
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
+ <ColumnType
+ value={columnFields?.format ?? ''}
+ enumTypes={enumTypes}
+ error={errors.format}
+ disabled={!isUndefined(columnFields?.foreignKey)}
+ onOptionSelect={(format: string) => onUpdateField({ format, defaultValue: '' })}
+ />
+ {isUndefined(columnFields.foreignKey) && (
+ <div className="grid grid-cols-12 gap-4">
+ {columnFields.format.includes('int') && (
+ <div className="col-span-12 md:col-span-8 md:col-start-5">
+ <Checkbox
+ label="Is Identity"
+ description="Automatically assign a sequential unique number to the column"
+ checked={columnFields.isIdentity}
+ onChange={() => {
+ const isIdentity = !columnFields.isIdentity
+ const isArray = isIdentity ? false : columnFields.isArray
+ onUpdateField({ isIdentity, isArray })
+ }}
+ />
+ </div>
+ )}
+ {!columnFields.isPrimaryKey && (
+ <div className="col-span-12 md:col-span-8 md:col-start-5">
+ <Checkbox
+ label="Define as Array"
+ description="Allow column to be defined as variable-length multidimensional arrays"
+ checked={columnFields.isArray}
+ onChange={() => {
+ const isArray = !columnFields.isArray
+ const isIdentity = isArray ? false : columnFields.isIdentity
+ onUpdateField({ isArray, isIdentity })
+ }}
+ />
+ </div>
+ )}
+ </div>
+ )}
+ <ColumnDefaultValue
+ columnFields={columnFields}
+ enumTypes={enumTypes}
+ onUpdateField={onUpdateField}
+ />
+ {!columnFields.isPrimaryKey && (
+ <>
+ <div className="grid grid-cols-12 gap-4">
+ <div className="col-span-12 md:col-span-8 md:col-start-5">
+ <Checkbox
+ label="Allow Nullable"
+ description="Allow the column to assume a NULL value if no value is provided"
+ checked={columnFields.isNullable}
+ onChange={() => onUpdateField({ isNullable: !columnFields.isNullable })}
+ />
+ </div>
+ <div className="col-span-12 md:col-span-8 md:col-start-5">
+ <Checkbox
+ label="Is Unique"
+ description="Enforce values in the column to be unique across rows"
+ checked={columnFields.isUnique}
+ onChange={() => onUpdateField({ isUnique: !columnFields.isUnique })}
+ />
+ </div>
+ </div>
+ </>
+ )}
+
+ <ForeignKeySelector
+ tables={tables}
+ column={columnFields}
+ foreignKey={foreignKey}
+ visible={isEditingRelation}
+ closePanel={() => setIsEditingRelation(false)}
+ saveChanges={saveColumnForeignKey}
+ />
+ </div>
+ </SidePanel.Content>
</SidePanel>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx
index e36cfe5186f..6bf4daddea2 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnForeignKey.tsx
@@ -23,11 +23,9 @@ const ColumnForeignKey: FC<Props> = ({
const hasNoForeignKey = isUndefined(originalForeignKey) && isUndefined(column?.foreignKey)
if (hasNoForeignKey) {
return (
- <div>
- <Button type="secondary" onClick={onSelectEditRelation}>
- Add foreign key relation
- </Button>
- </div>
+ <Button type="default" onClick={onSelectEditRelation}>
+ Add foreign key relation
+ </Button>
)
}
@@ -90,18 +88,16 @@ const ColumnForeignKeyInformation: FC<{
block
icon={<IconLink />}
title={
- <div className="flex items-center justify-between">
+ <div className="flex items-center justify-between text-scale-900">
<div className="space-y-2">
- <Typography.Text>This column has the following foreign key relation:</Typography.Text>
+ <span>This column has the following foreign key relation:</span>
<div className="flex items-center space-x-2">
- <Typography.Text code small>
- {columnName}
- </Typography.Text>
+ <span className="text-code">{columnName}</span>
<IconArrowRight size={14} strokeWidth={2} />
- <Typography.Text code small>
+ <span className="text-code">
{foreignKey?.target_table_schema}.{foreignKey?.target_table_name}.
{foreignKey?.target_column_name}
- </Typography.Text>
+ </span>
</div>
</div>
<div className="flex items-center space-x-2">
@@ -129,21 +125,19 @@ const ColumnForeignKeyAdded: FC<{
block
icon={<IconLink />}
title={
- <div className="flex items-center justify-between">
+ <div className="flex items-center justify-between text-scale-1100">
<div className="space-y-2">
- <Typography.Text>
+ <span>
The following foreign key relation will be{' '}
- <span className="text-green-500">added</span>:
- </Typography.Text>
- <div className="flex items-center space-x-2">
- <Typography.Text code small>
- {columnName}
- </Typography.Text>
+ <span className="text-green-900">added</span>:
+ </span>
+ <div className="flex items-center space-x-2 text-scale-1200">
+ <span className="text-code">{columnName}</span>
<IconArrowRight size={14} strokeWidth={2} />
- <Typography.Text code small>
+ <span className="text-code">
{foreignKey?.target_table_schema}.{foreignKey?.target_table_name}.
{foreignKey?.target_column_name}
- </Typography.Text>
+ </span>
</div>
</div>
<div className="flex items-center space-x-2">
@@ -174,7 +168,7 @@ const ColumnForeignKeyRemoved: FC<{
<div className="space-y-2">
<Typography.Text>
The following foreign key relation will be{' '}
- <span className="text-yellow-500">removed</span> from this column:
+ <span className="text-amber-900">removed</span> from this column:
</Typography.Text>
<div className="flex items-center space-x-2">
<Typography.Text code small>
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
index 4918a3d3b2c..601dd0a745a 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
@@ -34,19 +34,19 @@ const ColumnType: FC<Props> = ({
const inferIcon = (type: string) => {
switch (type) {
case 'number':
- return <IconHash size={16} className="text-green-600" strokeWidth={2} />
+ return <IconHash size={16} className="text-scale-1200" strokeWidth={1.5} />
case 'time':
- return <IconCalendar size={16} className="text-green-600" strokeWidth={2} />
+ return <IconCalendar size={16} className="text-scale-1200" strokeWidth={1.5} />
case 'text':
- return <IconType size={16} className="text-green-600" strokeWidth={2} />
+ return <IconType size={16} className="text-scale-1200" strokeWidth={1.5} />
case 'json':
return (
- <div className="text-green-600" style={{ padding: '0px 1px' }}>
+ <div className="text-scale-1200" style={{ padding: '0px 1px' }}>
{'{ }'}
</div>
)
case 'bool':
- return <IconToggleRight size={16} className="text-green-600" strokeWidth={2} />
+ return <IconToggleRight size={16} className="text-scale-1200" strokeWidth={1.5} />
default:
return <div />
}
@@ -61,6 +61,7 @@ const ColumnType: FC<Props> = ({
error={error}
className={`${className} ${disabled ? 'column-type-disabled' : ''}`}
onChange={(value: string) => onOptionSelect(value)}
+ optionsWidth={480}
>
<Listbox.Option key="empty" value="" label="---">
---
@@ -77,7 +78,7 @@ const ColumnType: FC<Props> = ({
value={enumType.name}
label={enumType.name}
addOnBefore={() => {
- return <div className="mx-1 w-2 h-2 rounded-full bg-green-700" />
+ return <div className="mx-1 w-2 h-2 rounded-full bg-scale-1200" />
}}
>
<div className="flex items-center space-x-4">
@@ -113,14 +114,8 @@ const ColumnType: FC<Props> = ({
addOnBefore={() => inferIcon(option.type)}
>
<div className="flex items-center space-x-4">
- <Typography.Text>
- <p>{option.name}</p>
- </Typography.Text>
- <p>
- <Typography.Text small className="opacity-50">
- {option.description}
- </Typography.Text>
- </p>
+ <span className="text-scale-1200">{option.name}</span>
+ <span className="text-scale-900">{option.description}</span>
</div>
</Listbox.Option>
))}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
index 6437ecfbaa8..8e97f235a4e 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
@@ -6,9 +6,8 @@
// the component over to the UI library
import { FC, useEffect, useRef, useState } from 'react'
-import { Input, Typography } from '@supabase/ui'
+import { Button, Dropdown, IconList, Input } from '@supabase/ui'
import { Suggestion } from './ColumnEditor.types'
-import { timeout } from 'lib/helpers'
const MAX_SUGGESTIONS = 3
const DEFAULT_SUGGESTIONS_WIDTH = 400
@@ -45,21 +44,8 @@ const InputWithSuggestions: FC<Props> = ({
onSelectSuggestion = () => {},
}) => {
const ref = useRef(null)
- const [isFocused, setIsFocused] = useState<boolean>(false)
- const [derviedSuggestionsWidth, setDerivedSuggestionsWidth] =
- useState<number>(DEFAULT_SUGGESTIONS_WIDTH)
const [filteredSuggestions, setFilteredSuggestions] = useState<Suggestion[]>(suggestions)
- const showSuggestions = isFocused && filteredSuggestions.length > 0
-
- useEffect(() => {
- // This is super hacky but will go away when we bring it into the UI library
- // It's mainly cause I can't pass a ref into Input
- const parentInputFieldWidth = (ref?.current as any).children[0]?.children[0]?.children[
- layout === 'horizontal' ? 1 : 0
- ]?.offsetWidth
- const width = suggestionsWidth || parentInputFieldWidth || DEFAULT_SUGGESTIONS_WIDTH
- setDerivedSuggestionsWidth(width)
- }, [ref.current])
+ const showSuggestions = filteredSuggestions.length > 0
useEffect(() => {
setFilteredSuggestions(suggestions.slice(0, MAX_SUGGESTIONS))
@@ -92,45 +78,34 @@ const InputWithSuggestions: FC<Props> = ({
className={className}
type="text"
value={value}
- onFocus={() => setIsFocused(true)}
- onBlur={async () => {
- await timeout(100)
- setIsFocused(false)
- }}
onChange={onInputChange}
+ actions={
+ showSuggestions && (
+ <Dropdown
+ size={'medium'}
+ align="end"
+ side="bottom"
+ overlay={
+ <>
+ <Dropdown.Label>Suggestions</Dropdown.Label>
+ <Dropdown.Seperator />
+ {filteredSuggestions.map((suggestion: Suggestion) => (
+ <Dropdown.Item
+ key={suggestion.name}
+ onClick={() => onSelectSuggestion(suggestion)}
+ >
+ <div className="text-sm">{suggestion.name}</div>
+ <div className="text-xs text-scale-900">{suggestion.description}</div>
+ </Dropdown.Item>
+ ))}
+ </>
+ }
+ >
+ <Button as="span" type="default" icon={<IconList strokeWidth={1.5} />}></Button>
+ </Dropdown>
+ )
+ }
/>
- {showSuggestions && (
- <div
- className="z-10 absolute top-11 right-0"
- style={{ width: `calc(${derviedSuggestionsWidth}px)` }}
- >
- <div className="bg-gray-800 border border-gray-600 shadow rounded-md py-1">
- <p className="px-4">
- <Typography.Text small className="opacity-50">
- {suggestionsHeader}
- </Typography.Text>
- </p>
- <div className="flex flex-col mt-2">
- {filteredSuggestions.map((suggestion: Suggestion) => (
- <div
- key={suggestion.name}
- className="px-4 py-2 cursor-pointer flex grid grid-cols-12 gap-2 hover:bg-green-600 !bg-opacity-40"
- onClick={() => onSelectSuggestion(suggestion)}
- >
- <div className="col-span-6">
- <Typography.Text>{suggestion.name}</Typography.Text>
- </div>
- <div className="col-span-6">
- <Typography.Text small className="opacity-50">
- {suggestion.description}
- </Typography.Text>
- </div>
- </div>
- ))}
- </div>
- </div>
- </div>
- )}
</div>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
index 7716ddf3b0a..d21b5db0d54 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
@@ -105,15 +105,16 @@ const ForeignKeySelector: FC<Props> = ({
return (
<SidePanel
- key="ColumnConfiguration"
+ key="ForeignKeySelector"
+ size="medium"
visible={visible}
onCancel={closePanel}
// @ts-ignore
- title={
- <div>
+ header={
+ <span>
Edit foreign key relation for{' '}
- <Typography.Text code>{get(column, ['name'], '')}</Typography.Text>
- </div>
+ <span className="text-code">{get(column, ['name'], '')}</span>
+ </span>
}
customFooter={
<ActionBar
@@ -124,72 +125,67 @@ const ForeignKeySelector: FC<Props> = ({
/>
}
>
- <div className="space-y-6">
- <InformationBox
- block
- icon={<IconHelpCircle size="large" strokeWidth={1.5} />}
- title="What are foreign keys?"
- description={
- <p>
- Foreign keys help maintain referential integrity of your data by ensuring that no one
- can insert rows into the table that do not have a matching entry to another table
- </p>
- }
- url="https://www.postgresql.org/docs/current/tutorial-fk.html"
- urlLabel="Postgres Foreign Key Documentation"
- />
-
- <Listbox
- label="Select a table to reference to"
- value={selectedTable?.id}
- error={errors.table}
- onChange={(value: string) => updateSelectedTable(Number(value))}
- >
- <Listbox.Option key="empty" value="" label="---">
- ---
- </Listbox.Option>
- {sortBy(tables, ['schema']).map((table: PostgresTable) => {
- return (
- <Listbox.Option key={table.id} value={table.id} label={table.name}>
- <div className="flex items-center">
- {/* For aria searching to target the table name instead of schema */}
- <Typography.Text className="hidden">{table.name}</Typography.Text>
- <Typography.Text small className="opacity-50 mr-2">
- {table.schema}
- </Typography.Text>
- {table.name}
- </div>
- </Listbox.Option>
- )
- })}
- </Listbox>
+ <SidePanel.Content>
+ <div className="space-y-6">
+ <InformationBox
+ icon={<IconHelpCircle size="large" strokeWidth={1.5} />}
+ title="What are foreign keys?"
+ description={`Foreign keys help maintain referential integrity of your data by ensuring that no
+ one can insert rows into the table that do not have a matching entry to another
+ table.`}
+ url="https://www.postgresql.org/docs/current/tutorial-fk.html"
+ urlLabel="Postgres Foreign Key Documentation"
+ />
- {selectedForeignKey?.table && (
<Listbox
- value={selectedColumn?.id}
- // @ts-ignore
- label={
- <div>
- Select a column from{' '}
- <Typography.Text code>{selectedForeignKey?.table}</Typography.Text> to reference to
- </div>
- }
- error={errors.column}
- onChange={(value: string) => updateSelectedColumn(value)}
+ label="Select a table to reference to"
+ value={selectedTable?.id}
+ error={errors.table}
+ onChange={(value: string) => updateSelectedTable(Number(value))}
>
- {(selectedTable?.columns ?? []).map((column: PostgresColumn) => (
- <Listbox.Option key={column.id} value={column.id} label={column.name}>
- <div className="flex items-center">
- {column.name}
- <Typography.Text small className="opacity-50 ml-2">
- {column.format}
- </Typography.Text>
- </div>
- </Listbox.Option>
- ))}
+ <Listbox.Option key="empty" value="" label="---">
+ ---
+ </Listbox.Option>
+ {sortBy(tables, ['schema']).map((table: PostgresTable) => {
+ return (
+ <Listbox.Option key={table.id} value={table.id} label={table.name}>
+ <div className="flex items-center gap-2">
+ {/* For aria searching to target the table name instead of schema */}
+ <span className="hidden">{table.name}</span>
+ <span className="text-scale-900">{table.schema}</span>
+ <span className="text-scale-1200">{table.name}</span>
+ </div>
+ </Listbox.Option>
+ )
+ })}
</Listbox>
- )}
- </div>
+
+ {selectedForeignKey?.table && (
+ <Listbox
+ value={selectedColumn?.id}
+ // @ts-ignore
+ label={
+ <div>
+ Select a column from{' '}
+ <Typography.Text code>{selectedForeignKey?.table}</Typography.Text> to reference
+ to
+ </div>
+ }
+ error={errors.column}
+ onChange={(value: string) => updateSelectedColumn(value)}
+ >
+ {(selectedTable?.columns ?? []).map((column: PostgresColumn) => (
+ <Listbox.Option key={column.id} value={column.id} label={column.name}>
+ <div className="flex items-center gap-2">
+ <span className="text-scale-1200">{column.name}</span>
+ <span className="text-scale-900">{column.format}</span>
+ </div>
+ </Listbox.Option>
+ ))}
+ </Listbox>
+ )}
+ </div>
+ </SidePanel.Content>
</SidePanel>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx
index 9797a89a723..e1032242a70 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/HeaderTitle.tsx
@@ -12,7 +12,7 @@ const HeaderTitle: FC<Props> = ({ isNewRecord, tableName }) => {
return (
<>
{header}
- {tableName && <Typography.Text code>{tableName}</Typography.Text>}
+ {tableName && <span className="text-code">{tableName}</span>}
</>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.tsx
index 69904ca008f..56e800633ec 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.tsx
@@ -142,7 +142,7 @@ const RowEditor: FC<Props> = ({
key="RowEditor"
visible={visible}
// @ts-ignore
- title={<HeaderTitle isNewRecord={isNewRecord} tableName={selectedTable.name} />}
+ header={<HeaderTitle isNewRecord={isNewRecord} tableName={selectedTable.name} />}
className={`transition-all ease-in duration-100 ${
isEditingJson || isViewingReferenceRow ? ' mr-32' : ''
}`}
@@ -157,45 +157,49 @@ const RowEditor: FC<Props> = ({
/>
}
>
- <Space direction="vertical" size={6} style={{ width: '100%', marginBottom: '2rem' }}>
- {requiredFields.map((field: RowField) => {
- return (
- <InputField
- key={field.id}
- field={field}
- errors={errors}
- onUpdateField={onUpdateField}
- onEditJson={setSelectedValueForJsonEdit}
- onViewForeignKey={() => onViewForeignKey(field)}
- />
- )
- })}
- {optionalFields.length > 0 && (
- <>
- <Divider light className="mb-4" />
- <div>
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
+ {requiredFields.map((field: RowField) => {
+ return (
+ <InputField
+ key={field.id}
+ field={field}
+ errors={errors}
+ onUpdateField={onUpdateField}
+ onEditJson={setSelectedValueForJsonEdit}
+ onViewForeignKey={() => onViewForeignKey(field)}
+ />
+ )
+ })}
+ </div>
+ </SidePanel.Content>
+ {optionalFields.length > 0 && (
+ <>
+ <SidePanel.Seperator />
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
<div>
- <Typography.Text>Optional Fields</Typography.Text>
+ <h3 className="text-base text-scale-1200">Optional Fields</h3>
+ <p className="text-sm text-scale-900">
+ These are columns that do not need any value
+ </p>
</div>
- <Typography.Text type="secondary">
- These are columns that do not need any value
- </Typography.Text>
+ {optionalFields.map((field: RowField) => {
+ return (
+ <InputField
+ key={field.id}
+ field={field}
+ errors={errors}
+ onUpdateField={onUpdateField}
+ onEditJson={setSelectedValueForJsonEdit}
+ onViewForeignKey={() => onViewForeignKey(field)}
+ />
+ )
+ })}
</div>
- </>
- )}
- {optionalFields.map((field: RowField) => {
- return (
- <InputField
- key={field.id}
- field={field}
- errors={errors}
- onUpdateField={onUpdateField}
- onEditJson={setSelectedValueForJsonEdit}
- onViewForeignKey={() => onViewForeignKey(field)}
- />
- )
- })}
- </Space>
+ </SidePanel.Content>
+ </>
+ )}
<JsonEdit
visible={isEditingJson}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
index 69b0ec47064..0cddda4b493 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
@@ -9,6 +9,8 @@ import { ImportContent } from './TableEditor/TableEditor.types'
import { ColumnField, CreateColumnPayload, UpdateColumnPayload } from './SidePanelEditor.types'
import ConfirmationModal from 'components/ui/ConfirmationModal'
+import { Modal } from '@supabase/ui'
+
interface Props {
selectedSchema: string
selectedTable?: PostgresTable
@@ -259,7 +261,6 @@ const SidePanelEditor: FC<Props> = ({
<ConfirmationModal
visible={isClosingPanel}
title="Confirm to close"
- description="There are unsaved changes. Are you sure you want to close the panel? Your changes will be lost."
buttonLabel="Confirm"
onSelectCancel={() => setIsClosingPanel(false)}
onSelectConfirm={() => {
@@ -267,6 +268,14 @@ const SidePanelEditor: FC<Props> = ({
setIsEdited(false)
closePanel()
}}
+ children={
+ <Modal.Content>
+ <p className="py-4 text-sm text-scale-1100">
+ There are unsaved changes. Are you sure you want to close the panel? Your changes will
+ be lost.
+ </p>
+ </Modal.Content>
+ }
/>
</>
)
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
index 09531b487a2..390a1575586 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
@@ -9,13 +9,16 @@ import {
Popover,
IconLink,
IconSettings,
+ Button,
+ Listbox,
} from '@supabase/ui'
-import { ColumnField, EnumType } from '../SidePanelEditor.types'
+import { ColumnField, EnumType, PostgresDataTypeOption } from '../SidePanelEditor.types'
import ColumnType from '../ColumnEditor/ColumnType'
import InputWithSuggestions from '../ColumnEditor/InputWithSuggestions'
import { Suggestion } from '../ColumnEditor/ColumnEditor.types'
import { typeExpressionSuggestions } from '../ColumnEditor/ColumnEditor.constants'
+import { POSTGRES_DATA_TYPE_OPTIONS } from '../SidePanelEditor.constants'
/**
* [Joshen] For context:
@@ -58,6 +61,13 @@ const Column: FC<Props> = ({
}) => {
const suggestions: Suggestion[] = typeExpressionSuggestions?.[column.format] ?? []
+ let settingsCount = 0
+
+ column.isNullable ? (settingsCount += 1) : null
+ column.isIdentity ? (settingsCount += 1) : null
+ column.isUnique ? (settingsCount += 1) : null
+ column.isArray ? (settingsCount += 1) : null
+
return (
<div className="w-full flex items-center">
<div className={`w-[5%] ${!isNewRecord ? 'hidden' : ''}`}>
@@ -68,39 +78,60 @@ const Column: FC<Props> = ({
</div>
</div>
<div className="w-[25%]">
- <div className="flex items-center justify-between w-[95%] border border-gray-500 rounded-md">
+ <div className="flex items-center justify-between w-[95%]">
<Input
value={column.name}
size="small"
disabled={hasImportContent}
- className={`table-editor-columns-input bg-white dark:bg-transparent rounded ${
+ className={`table-editor-columns-input bg-white dark:bg-transparent lg:gap-0 ${
hasImportContent ? 'opacity-50' : ''
}`}
+ actions={
+ <Button
+ type={!isUndefined(column.foreignKey) ? 'secondary' : 'default'}
+ onClick={() => onEditRelation(column)}
+ >
+ <IconLink size={14} strokeWidth={!isUndefined(column.foreignKey) ? 2 : 1} />
+ </Button>
+ }
onChange={(event: any) => onUpdateColumn({ name: event.target.value })}
/>
- <div
- className={`
- border-l p-[9px] rounded-r border-gray-500 cursor-pointer transition
- ${column.isPrimaryKey ? 'hover:bg-gray-500' : 'hover:bg-gray-600'}
- `}
- onClick={() => onEditRelation(column)}
- >
- <IconLink
- className={!isUndefined(column.foreignKey) ? 'text-green-400' : ''}
- size={14}
- strokeWidth={!isUndefined(column.foreignKey) ? 2 : 1}
- />
- </div>
</div>
</div>
<div className="w-[25%]">
<div className="w-[95%]">
+ {/* <Listbox onChange={() => console.log('foo')} defaultValue={1} className="lg:gap-0 ">
+ {POSTGRES_DATA_TYPE_OPTIONS.map((option: PostgresDataTypeOption, i) => {
+ if (i > 8) return
+
+ return (
+ <Listbox.Option
+ key={option.name}
+ value={option.name}
+ label={option.name}
+
+ // addOnBefore={() => inferIcon(option.type)}
+ >
+ <div className="flex items-center space-x-4">
+ <Typography.Text>
+ <p>{option.name}</p>
+ </Typography.Text>
+ <p>
+ <Typography.Text small className="opacity-50">
+ {option.description}
+ </Typography.Text>
+ </p>
+ </div>
+ </Listbox.Option>
+ )
+ })}
+ </Listbox> */}
<ColumnType
value={column.format}
enumTypes={enumTypes}
size="small"
showLabel={false}
- className="table-editor-column-type"
+ className="table-editor-column-type lg:gap-0 "
disabled={!isUndefined(column.foreignKey)}
onOptionSelect={(format: string) => {
onUpdateColumn({ format, defaultValue: '' })
@@ -115,7 +146,7 @@ const Column: FC<Props> = ({
size="small"
value={column.defaultValue}
disabled={column.format.includes('int') && column.isIdentity}
- className={`bg-white dark:bg-transparent rounded ${
+ className={`bg-white dark:bg-transparent rounded lg:gap-0 ${
column.format.includes('int') && column.isIdentity ? 'opacity-50' : ''
}`}
suggestions={suggestions}
@@ -138,58 +169,87 @@ const Column: FC<Props> = ({
<div className={`${hasImportContent ? 'w-[10%]' : 'w-[0%]'}`} />
<div className="w-[5%] flex justify-end">
{(!column.isPrimaryKey || column.format.includes('int')) && (
- <Popover
- portalled
- className="w-80 pointer-events-auto"
- overlay={[
- <div className="p-4" key={`${column.id}_configuration`}>
- {!column.isPrimaryKey && (
- <Checkbox
- label="Is Nullable"
- description="Specify if the column can assume a NULL value if no value is provided"
- checked={column.isNullable}
- onChange={() => onUpdateColumn({ isNullable: !column.isNullable })}
- />
- )}
- {isNewRecord && (
- <Checkbox
- label="Is Unique"
- description="Enforce if values in the column should be unique across rows"
- checked={column.isUnique}
- onChange={() => onUpdateColumn({ isUnique: !column.isUnique })}
- />
- )}
- {column.format.includes('int') && (
- <Checkbox
- label="Is Identity"
- description="Automatically assign a sequential unique number to the column"
- checked={column.isIdentity}
- onChange={() => {
- const isIdentity = !column.isIdentity
- const isArray = isIdentity ? false : column.isArray
- onUpdateColumn({ isIdentity, isArray })
- }}
- />
- )}
- {!column.isPrimaryKey && (
- <Checkbox
- label="Define as Array"
- description="Define your column as a variable-length multidimensional array"
- checked={column.isArray}
- onChange={() => {
- const isArray = !column.isArray
- const isIdentity = isArray ? false : column.isIdentity
- onUpdateColumn({ isArray, isIdentity })
- }}
- />
+ <>
+ <Popover
+ size="xlarge"
+ className="pointer-events-auto"
+ header={
+ <div className="flex items-center justify-center">
+ <h5 className="text-sm text-scale-1200">Extra options</h5>
+ </div>
+ }
+ overlay={[
+ <div className="flex flex-col space-y-1" key={`${column.id}_configuration`}>
+ {!column.isPrimaryKey && (
+ <>
+ <Checkbox
+ label="Is Nullable"
+ description="Specify if the column can assume a NULL value if no value is provided"
+ checked={column.isNullable}
+ className="p-4"
+ onChange={() => onUpdateColumn({ isNullable: !column.isNullable })}
+ />
+ <Popover.Seperator />
+ </>
+ )}
+
+ {isNewRecord && (
+ <>
+ <Checkbox
+ label="Is Unique"
+ description="Enforce if values in the column should be unique across rows"
+ checked={column.isUnique}
+ className="p-4"
+ onChange={() => onUpdateColumn({ isUnique: !column.isUnique })}
+ />
+ <Popover.Seperator />
+ </>
+ )}
+ {column.format.includes('int') && (
+ <>
+ <Checkbox
+ label="Is Identity"
+ description="Automatically assign a sequential unique number to the column"
+ checked={column.isIdentity}
+ className="p-4"
+ onChange={() => {
+ const isIdentity = !column.isIdentity
+ const isArray = isIdentity ? false : column.isArray
+ onUpdateColumn({ isIdentity, isArray })
+ }}
+ />
+ <Popover.Seperator />
+ </>
+ )}
+
+ {!column.isPrimaryKey && (
+ <Checkbox
+ label="Define as Array"
+ description="Define your column as a variable-length multidimensional array"
+ checked={column.isArray}
+ className="p-4"
+ onChange={() => {
+ const isArray = !column.isArray
+ const isIdentity = isArray ? false : column.isIdentity
+ onUpdateColumn({ isArray, isIdentity })
+ }}
+ />
+ )}
+ </div>,
+ ]}
+ >
+ <div className="group flex -space-x-1 items-center">
+ {settingsCount > 0 && (
+ <div className="py-0.5 px-2 text-xs rounded-full bg-scale-1200 dark:bg-scale-100 text-scale-100 dark:text-scale-1100">
+ {settingsCount}
+ </div>
)}
- </div>,
- ]}
- >
- <Typography>
- <IconSettings size={18} strokeWidth={1} />
- </Typography>
- </Popover>
+ <div className="text-scale-900 transition-colors group-hover:text-scale-1200">
+ <IconSettings size={18} strokeWidth={1} />
+ </div>
+ </div>
+ </Popover>
+ </>
)}
</div>
{!hasImportContent && (
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
index ca91431ae4b..bd348f6f356 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
@@ -192,21 +192,29 @@ const ColumnManagement: FC<Props> = ({
{/* Drag handle */}
{isNewRecord && <div className="w-[5%]" />}
<div className="w-[25%]">
- <Typography.Text small>Name</Typography.Text>
+ <h5 className="text-xs text-scale-900" small>
+ Name
+ </h5>
</div>
<div className="w-[25%]">
- <Typography.Text small>Type</Typography.Text>
+ <h5 className="text-xs text-scale-900" small>
+ Type
+ </h5>
</div>
<div className={`${isNewRecord ? 'w-[25%]' : 'w-[30%]'} flex items-center space-x-2`}>
- <Typography.Text small>Default Value</Typography.Text>
+ <h5 className="text-xs text-scale-900" small>
+ Default Value
+ </h5>
<div>
- <Typography.Text>
+ <h5 className="text-xs text-scale-900">
<IconHelpCircle size={15} strokeWidth={1.5} />
- </Typography.Text>
+ </h5>
</div>
</div>
<div className="w-[10%]">
- <Typography.Text small>Primary</Typography.Text>
+ <h5 className="text-xs text-scale-900" small>
+ Primary
+ </h5>
</div>
{/* Empty space */}
<div className={`${hasImportContent ? 'w-[10%]' : 'w-0'}`} />
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx
index 319a1f68d3e..92e9f830473 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetFileUpload.tsx
@@ -32,20 +32,18 @@ const SpreadSheetFileUpload: FC<Props> = ({
}
return (
- <>
- <Typography.Text>
- <p className="mb-3">
+ <div className="space-y-10">
+ <div>
+ <p className="text-sm text-scale-1100 mb-2">
Upload a CSV or TSV file. 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>).
+ <span className="text-code">-</span>) or underscores (<span className="text-code">_</span>
+ ).
</p>
- <Typography.Text type="secondary">
- <p className="text-sm opacity-50 mb-3">
- Tip: Datetime columns should be formatted as YYYY-MM-DD HH:mm:ss
- </p>
- </Typography.Text>
- </Typography.Text>
+ <p className="text-xs text-scale-900">
+ Tip: Datetime columns should be formatted as YYYY-MM-DD HH:mm:ss
+ </p>
+ </div>
{!uploadedFile ? (
<div
className={`flex items-center justify-center border dark:border-gray-500 border-dashed rounded-md h-48 ${
@@ -64,8 +62,8 @@ const SpreadSheetFileUpload: FC<Props> = ({
) : (
<div className="flex flex-col items-center justify-center border dark:border-gray-500 border-dashed rounded-md h-32 space-y-2">
<div className="flex items-center space-x-2">
- <IconFileText size={16} strokeWidth={2} />
- <Typography.Title level={4}>{uploadedFile.name}</Typography.Title>
+ <IconFileText size={14} strokeWidth={1.5} />
+ <h3 className="text-scale-1200 text-base">{uploadedFile.name}</h3>
</div>
{parseProgress === 100 ? (
<Button type="outline" onClick={removeUploadedFile}>
@@ -87,7 +85,7 @@ const SpreadSheetFileUpload: FC<Props> = ({
</div>
)}
<input ref={uploadButtonRef} className="hidden" type="file" onChange={onFileUpload} />
- </>
+ </div>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetTextInput.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadSheetTextInput.tsx
index 8c0bb6a1840..62ac20dc83b 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 { Typography } from '@supabase/ui'
+import { Input, Typography } from '@supabase/ui'
interface Props {
input: string
@@ -7,26 +7,27 @@ interface Props {
}
const SpreadSheetTextInput: FC<Props> = ({ input, onInputChange }) => (
- <>
- <Typography.Text>
- <p className="mb-3">
+ <div className="space-y-10">
+ <div>
+ <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>).
</p>
- <p className="text-sm opacity-50 mb-3">
+ <p className="text-xs text-scale-900">
Tip: Datetime columns should be formatted as YYYY-MM-DD HH:mm:ss
</p>
- </Typography.Text>
- <textarea
- className="font-mono w-full rounded-md bg-gray-700 text-white p-4 text-sm"
+ </div>
+ <Input.TextArea
+ size="tiny"
+ className="font-mono"
rows={15}
style={{ resize: 'none' }}
value={input}
onChange={onInputChange}
- ></textarea>
- </>
+ />
+ </div>
)
export default SpreadSheetTextInput
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx
index df36c3807b4..ac20f3d5b75 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/SpreadsheetImport/SpreadsheetImport.tsx
@@ -126,7 +126,7 @@ const SpreadsheetImport: FC<Props> = ({
wide
visible={visible}
align="right"
- title="Add content to new table"
+ header="Add content to new table"
onCancel={(event: any) => {
// Only close if specifically hit the X button, this is to have the
// side panel work with toast messages (clicking on toast will close the panel)
@@ -146,81 +146,85 @@ const SpreadsheetImport: FC<Props> = ({
/>
}
>
- <div className="flex flex-col">
- <Tabs block>
- {/* @ts-ignore */}
- <Tabs.Panel id="fileUpload" label="Upload CSV">
- <SpreadSheetFileUpload
- parseProgress={parseProgress}
- uploadedFile={uploadedFile}
- onFileUpload={onFileUpload}
- removeUploadedFile={resetSpreadsheetImport}
- />
- </Tabs.Panel>
- {/* @ts-ignore */}
- <Tabs.Panel id="pasteText" label="Paste text">
- <SpreadSheetTextInput input={input} onInputChange={onInputChange} />
- </Tabs.Panel>
- </Tabs>
- </div>
+ <SidePanel.Content>
+ <div className="flex flex-col">
+ <Tabs block type="pills">
+ <Tabs.Panel id="fileUpload" label="Upload CSV">
+ <SpreadSheetFileUpload
+ parseProgress={parseProgress}
+ uploadedFile={uploadedFile}
+ onFileUpload={onFileUpload}
+ removeUploadedFile={resetSpreadsheetImport}
+ />
+ </Tabs.Panel>
+ <Tabs.Panel id="pasteText" label="Paste text">
+ <SpreadSheetTextInput input={input} onInputChange={onInputChange} />
+ </Tabs.Panel>
+ </Tabs>
+ </div>
- {spreadsheetData.headers.length > 0 && (
- <div className="py-5 space-y-5">
- <div className="space-y-2">
- <div className="flex flex-col space-y-1">
- <Typography.Text>Content Preview</Typography.Text>
- <Typography.Text type="secondary">
- Your table will have {spreadsheetData.rowCount.toLocaleString()} rows and the
- following {spreadsheetData.headers.length} columns.
- </Typography.Text>
- </div>
- <SpreadsheetPreview headers={spreadsheetData.headers} />
- </div>
- {errors.length > 0 && (
+ {spreadsheetData.headers.length > 0 && (
+ <div className="py-5 space-y-5">
<div className="space-y-2">
<div className="flex flex-col space-y-1">
- <Typography.Text>Issues found in spreadsheet</Typography.Text>
+ <Typography.Text>Content Preview</Typography.Text>
<Typography.Text type="secondary">
- Your table can still be created nonetheless despite issues in the following rows.
+ Your table will have {spreadsheetData.rowCount.toLocaleString()} rows and the
+ following {spreadsheetData.headers.length} columns.
</Typography.Text>
</div>
+ <SpreadsheetPreview headers={spreadsheetData.headers} />
+ </div>
+ {errors.length > 0 && (
<div className="space-y-2">
- {errors.map((error: any, idx: number) => {
- const key = `import-error-${idx}`
- const isExpanded = expandedErrors.includes(key)
- return (
- <div key={key} className="space-y-2">
- <div className="flex items-center space-x-2">
- <IconChevronRight
- className={`cursor-pointer transform ${isExpanded ? 'rotate-90' : ''}`}
- size={14}
- onClick={() => onSelectExpandError(key)}
- />
- <Typography.Text className="w-14">Row: {error.row}</Typography.Text>
- <Typography.Text>{error.message}</Typography.Text>
- {error.data?.__parsed_extra && (
- <>
- <IconArrowRight size={14} />
- <Typography.Text>Extra field(s):</Typography.Text>
- {error.data?.__parsed_extra.map((value: any) => (
- <Typography.Text code small>
- {value}
- </Typography.Text>
- ))}
- </>
+ <div className="flex flex-col space-y-1">
+ <Typography.Text>Issues found in spreadsheet</Typography.Text>
+ <Typography.Text type="secondary">
+ Your table can still be created nonetheless despite issues in the following
+ rows.
+ </Typography.Text>
+ </div>
+ <div className="space-y-2">
+ {errors.map((error: any, idx: number) => {
+ const key = `import-error-${idx}`
+ const isExpanded = expandedErrors.includes(key)
+ return (
+ <div key={key} className="space-y-2">
+ <div className="flex items-center space-x-2">
+ <IconChevronRight
+ className={`cursor-pointer transform ${isExpanded ? 'rotate-90' : ''}`}
+ size={14}
+ onClick={() => onSelectExpandError(key)}
+ />
+ <Typography.Text className="w-14">Row: {error.row}</Typography.Text>
+ <Typography.Text>{error.message}</Typography.Text>
+ {error.data?.__parsed_extra && (
+ <>
+ <IconArrowRight size={14} />
+ <Typography.Text>Extra field(s):</Typography.Text>
+ {error.data?.__parsed_extra.map((value: any) => (
+ <Typography.Text code small>
+ {value}
+ </Typography.Text>
+ ))}
+ </>
+ )}
+ </div>
+ {isExpanded && (
+ <SpreadsheetPreview
+ headers={spreadsheetData.headers}
+ rows={[error.data]}
+ />
)}
</div>
- {isExpanded && (
- <SpreadsheetPreview headers={spreadsheetData.headers} rows={[error.data]} />
- )}
- </div>
- )
- })}
+ )
+ })}
+ </div>
</div>
- </div>
- )}
- </div>
- )}
+ )}
+ </div>
+ )}
+ </SidePanel.Content>
</SidePanel>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
index b803a7a10fc..9a32b3f4cc9 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
@@ -1,6 +1,6 @@
import { FC, useEffect, useState } from 'react'
import { isUndefined, isEmpty } from 'lodash'
-import { Badge, Checkbox, Divider, SidePanel, Space, Input, Typography } from '@supabase/ui'
+import { Badge, Checkbox, SidePanel, Input } from '@supabase/ui'
import { PostgresTable } from '@supabase/postgres-meta'
import { useStore } from 'hooks'
@@ -22,6 +22,7 @@ import {
generateTableFieldFromPostgresTable,
formatImportedContentToColumnFields,
} from './TableEditor.utils'
+import SidePanelEditor from '..'
interface Props {
table?: PostgresTable
@@ -148,78 +149,91 @@ const TableEditor: FC<Props> = ({
/>
}
>
- <div className="space-y-10 py-6">
- <Input
- label="Name"
- layout="horizontal"
- type="text"
- error={errors.name}
- value={tableFields?.name}
- onChange={(event: any) => onUpdateField({ name: event.target.value })}
- />
- <Input
- label="Description"
- placeholder="Optional"
- layout="horizontal"
- type="text"
- value={tableFields?.comment ?? ''}
- onChange={(event: any) => onUpdateField({ comment: event.target.value })}
- />
- <div />
- <Checkbox
- id="enable-rls"
- // @ts-ignore
- label={
- <div className="flex items-center space-x-2">
- <Typography.Text>Enable Row Level Security (RLS)</Typography.Text>
- <Badge color="green">Recommended</Badge>
- </div>
- }
- description="Restrict access to your table by enabling RLS and writing Postgres policies. If RLS is not enabled, anyone with the anon key can modify and delete your data."
- checked={tableFields?.isRLSEnabled}
- onChange={() => onUpdateField({ isRLSEnabled: !tableFields?.isRLSEnabled })}
- size="medium"
- />
- <Divider light />
- {!isDuplicating && (
- <ColumnManagement
- table={{ name: tableFields.name, schema: selectedSchema }}
- tables={tables}
- columns={tableFields?.columns}
- enumTypes={enumTypes}
- isNewRecord={isNewRecord}
- importContent={importContent}
- onColumnsUpdated={(columns) => onUpdateField({ columns })}
- onSelectImportData={() => setIsImportingSpreadsheet(true)}
- onClearImportContent={() => {
- onUpdateField({ columns: DEFAULT_COLUMNS })
- setImportContent(undefined)
- }}
- />
- )}
- {isDuplicating && (
- <>
+ <>
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
+ <Input
+ label="Name"
+ layout="horizontal"
+ type="text"
+ error={errors.name}
+ value={tableFields?.name}
+ onChange={(event: any) => onUpdateField({ name: event.target.value })}
+ />
+ <Input
+ label="Description"
+ placeholder="Optional"
+ layout="horizontal"
+ type="text"
+ value={tableFields?.comment ?? ''}
+ onChange={(event: any) => onUpdateField({ comment: event.target.value })}
+ />
+ </div>
+ </SidePanel.Content>
+ <SidePanel.Seperator />
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
<Checkbox
- id="duplicate-rows"
- label="Duplicate table entries"
- description="This will copy all the data in the table into the new table"
- checked={isDuplicateRows}
- onChange={() => setIsDuplicateRows(!isDuplicateRows)}
+ id="enable-rls"
+ // @ts-ignore
+ label={
+ <div className="flex items-center space-x-2">
+ <span>Enable Row Level Security (RLS)</span>
+ <Badge color="gray">Recommended</Badge>
+ </div>
+ }
+ description="Restrict access to your table by enabling RLS and writing Postgres policies"
+ checked={tableFields?.isRLSEnabled}
+ onChange={() => onUpdateField({ isRLSEnabled: !tableFields?.isRLSEnabled })}
size="medium"
/>
- </>
- )}
- </div>
- <SpreadsheetImport
- visible={isImportingSpreadsheet}
- headers={importContent?.headers}
- rows={importContent?.rows}
- saveContent={(prefillData: ImportContent) => {
- setImportContent(prefillData)
- setIsImportingSpreadsheet(false)
- }}
- closePanel={() => setIsImportingSpreadsheet(false)}
- />
+ </div>
+ </SidePanel.Content>
+ <SidePanel.Seperator />
+ <SidePanel.Content>
+ <div className="space-y-10 py-6">
+ {!isDuplicating && (
+ <ColumnManagement
+ table={{ name: tableFields.name, schema: selectedSchema }}
+ tables={tables}
+ columns={tableFields?.columns}
+ enumTypes={enumTypes}
+ isNewRecord={isNewRecord}
+ importContent={importContent}
+ onColumnsUpdated={(columns) => onUpdateField({ columns })}
+ onSelectImportData={() => setIsImportingSpreadsheet(true)}
+ onClearImportContent={() => {
+ onUpdateField({ columns: DEFAULT_COLUMNS })
+ setImportContent(undefined)
+ }}
+ />
+ )}
+ {isDuplicating && (
+ <>
+ <Checkbox
+ id="duplicate-rows"
+ label="Duplicate table entries"
+ description="This will copy all the data in the table into the new table"
+ checked={isDuplicateRows}
+ onChange={() => setIsDuplicateRows(!isDuplicateRows)}
+ size="medium"
+ />
+ </>
+ )}
+
+ <SpreadsheetImport
+ visible={isImportingSpreadsheet}
+ headers={importContent?.headers}
+ rows={importContent?.rows}
+ saveContent={(prefillData: ImportContent) => {
+ setImportContent(prefillData)
+ setIsImportingSpreadsheet(false)
+ }}
+ closePanel={() => setIsImportingSpreadsheet(false)}
+ />
+ </div>
+ </SidePanel.Content>
+ </>
</SidePanel>
)
}
diff --git a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx
index 9cc9e837410..9f0fdc40345 100644
--- a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx
@@ -10,6 +10,7 @@ import NotFoundState from './NotFoundState'
import GridHeaderActions from './GridHeaderActions'
import SidePanelEditor from './SidePanelEditor'
import { SchemaView } from 'components/layouts/TableEditorLayout/TableEditorLayout.types'
+import { SidePanel } from '@supabase/ui'
interface Props {
/** Theme for the editor */
@@ -148,21 +149,19 @@ const TableGridEditor: FC<Props> = ({
onError={onError}
onSqlQuery={onSqlQuery}
/>
- {!isUndefined(selectedSchema) && (
- <SidePanelEditor
- selectedSchema={selectedSchema}
- isDuplicating={isDuplicating}
- selectedTable={selectedTable as PostgresTable}
- selectedRowToEdit={selectedRowToEdit}
- selectedColumnToEdit={selectedColumnToEdit}
- selectedTableToEdit={selectedTableToEdit}
- sidePanelKey={sidePanelKey}
- onRowCreated={onRowCreated}
- onRowUpdated={onRowUpdated}
- onTableCreated={onTableCreated}
- closePanel={onClosePanel}
- />
- )}
+ <SidePanelEditor
+ selectedSchema={selectedSchema}
+ isDuplicating={isDuplicating}
+ selectedTable={selectedTable as PostgresTable}
+ selectedRowToEdit={selectedRowToEdit}
+ selectedColumnToEdit={selectedColumnToEdit}
+ selectedTableToEdit={selectedTableToEdit}
+ sidePanelKey={sidePanelKey}
+ onRowCreated={onRowCreated}
+ onRowUpdated={onRowUpdated}
+ onTableCreated={onTableCreated}
+ closePanel={onClosePanel}
+ />
</>
)
}
diff --git a/studio/components/to-be-cleaned/BuildingState.tsx b/studio/components/to-be-cleaned/BuildingState.tsx
index e6ab914e968..66217a829f1 100644
--- a/studio/components/to-be-cleaned/BuildingState.tsx
+++ b/studio/components/to-be-cleaned/BuildingState.tsx
@@ -109,7 +109,7 @@ const ProjectBuildingState: React.FC<ProjectBuildingState> = () => {
<div className="max-w-7xl mx-auto w-full my-16 space-y-16">
<div className="space-y-8">
<div className="mx-6">
- <Typography.Title level={4}>Client libraries</Typography.Title>
+ <h5>Client libraries</h5>
</div>
<div className="mx-6 grid md:grid-cols-3 gap-12 mb-12">
{CLIENT_LIBRARIES.map((library) => (
@@ -119,7 +119,7 @@ const ProjectBuildingState: React.FC<ProjectBuildingState> = () => {
</div>
<div className="space-y-8">
<div className="mx-6">
- <Typography.Title level={4}>Example projects</Typography.Title>
+ <h5>Example projects</h5>
</div>
<div className="mx-6 grid md:grid-cols-2 lg:grid-cols-3 gap-8">
{EXAMPLE_PROJECTS.map((project) => (
diff --git a/studio/components/to-be-cleaned/Charts/ChartHandler.tsx b/studio/components/to-be-cleaned/Charts/ChartHandler.tsx
index eb57b34a3e6..f6f76315dba 100644
--- a/studio/components/to-be-cleaned/Charts/ChartHandler.tsx
+++ b/studio/components/to-be-cleaned/Charts/ChartHandler.tsx
@@ -124,12 +124,8 @@ const ChartHandler: FC<Props> = ({
if (loading) {
return (
<div className="w-full h-52 flex flex-col space-y-4 items-center justify-center">
- <Typography.Text className="animate-spin">
- <IconLoader />
- </Typography.Text>
- <Typography.Text type="secondary" small>
- Loading data for {label}
- </Typography.Text>
+ <IconLoader className="animate-spin text-scale-700" />
+ <p className="text-xs text-scale-900">Loading data for {label}</p>
</div>
)
}
@@ -137,12 +133,8 @@ const ChartHandler: FC<Props> = ({
if (isUndefined(chartData)) {
return (
<div className="w-full h-52 flex flex-col space-y-4 items-center justify-center">
- <Typography.Text>
- <IconAlertCircle />
- </Typography.Text>
- <Typography.Text type="secondary" small>
- Unable to load data for {label}
- </Typography.Text>
+ <IconAlertCircle className="text-scale-700" />
+ <p className="text-scale-900 text-xs">Unable to load data for {label}</p>
</div>
)
}
diff --git a/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx b/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx
index 4f6c36e69df..caaf4291d1f 100644
--- a/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx
+++ b/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx
@@ -1,4 +1,4 @@
-import { IconBarChart2, Loading, Typography } from '@supabase/ui'
+import { IconBarChart2, Loading } from '@supabase/ui'
import { useState } from 'react'
import {
BarChart as RechartBarChart,
@@ -88,24 +88,28 @@ const Header = ({
const day = (value: number | string) => (displayDateInUtc ? dayjs(value).utc() : dayjs(value))
const chartTitle = (
- <Typography.Text small={minimalHeader ? true : false} className="mb-0" type="secondary">
+ <h3 className={'text-scale-900 ' + (minimalHeader ? 'text-xs' : 'text-sm')}>
{label ?? attribute}
- </Typography.Text>
+ </h3>
)
const highlighted = (
- <Typography.Title level={minimalHeader ? 5 : 3} className="my-0 font-normal">
+ <h5
+ className={
+ 'text-xl text-scale-1200 font-normal ' + (minimalHeader ? 'text-base' : 'text-2xl')
+ }
+ >
{title}
<span className="text-lg">{format}</span>
- </Typography.Title>
+ </h5>
)
const date = (
- <Typography.Text type="secondary" className="opacity-50" small>
+ <h5 className="text-xs text-scale-900">
{focus ? (
data && data[focus] && day(data[focus].period_start).format(FOCUS_FORMAT)
) : (
<span className="opacity-0">x</span>
)}
- </Typography.Text>
+ </h5>
)
if (minimalHeader) {
@@ -133,16 +137,32 @@ const NoData = () => (
<div
className="
h-full w-full
- border border-dashed dark:border-dark
+ border border-dashed border-scale-600
flex flex-col items-center justify-center
+ space-y-2 text-center
"
>
- <Typography.Text className="mb-2">
- <IconBarChart2 />
- </Typography.Text>
- <Typography.Text>No data to show</Typography.Text>
+ <IconBarChart2 className="text-scale-800" />
+ <div>
+ <p className="text-scale-1100 text-xs">No data to show</p>
+ <p className="text-scale-900 text-xs">May take 24 hours for data to show</p>
+ </div>
</div>
)
+const total = (data: any, format: any, attribute: any) => {
+ let total = 0
+ data?.map((item: any) => {
+ total = total + Number(item[attribute])
+ })
+ if (format === '%') {
+ return Number(total).toFixed(2)
+ }
+ return numberWithCommas(total)
+}
+
+function numberWithCommas(x: any) {
+ return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
+}
export function BarChart({
data,
@@ -253,17 +273,17 @@ export function BarChart({
</RechartBarChart>
</ResponsiveContainer>
{data && (
- <div className="flex items-center justify-between -mt-5">
- <Typography.Text type="secondary" className="opacity-50" small>
+ <div className="text-xs text-scale-900 flex items-center justify-between -mt-5">
+ <span>
{day(data[0].period_start).format(
customDateFormat ? customDateFormat : DATE_FORMAT__WITH_TIME
)}
- </Typography.Text>
- <Typography.Text type="secondary" className="opacity-50" small>
+ </span>
+ <span>
{day(data[data?.length - 1]?.period_start).format(
customDateFormat ? customDateFormat : DATE_FORMAT__WITH_TIME
)}
- </Typography.Text>
+ </span>
</div>
)}
</>
@@ -372,17 +392,17 @@ export function AreaChart({
</RechartAreaChart>
</ResponsiveContainer>
{data && (
- <div className="flex items-center justify-between -mt-5">
- <Typography.Text type="secondary" className="opacity-50" small>
+ <div className="text-scale-900 text-xs flex items-center justify-between -mt-5">
+ <span>
{dayjs(data[0].period_start).format(
customDateFormat ? customDateFormat : DATE_FORMAT__WITH_TIME
)}
- </Typography.Text>
- <Typography.Text type="secondary" className="opacity-50" small>
+ </span>
+ <span>
{dayjs(data[data?.length - 1]?.period_start).format(
customDateFormat ? customDateFormat : DATE_FORMAT__WITH_TIME
)}
- </Typography.Text>
+ </span>
</div>
)}
</>
diff --git a/studio/components/to-be-cleaned/DisplayProjectSettings.tsx b/studio/components/to-be-cleaned/DisplayProjectSettings.tsx
index 3b3617c4eb0..d44d2715005 100644
--- a/studio/components/to-be-cleaned/DisplayProjectSettings.tsx
+++ b/studio/components/to-be-cleaned/DisplayProjectSettings.tsx
@@ -201,12 +201,12 @@ const ApiContentWrapper: FC<any> = ({ children }) => {
<Panel
title={
<div className="space-y-3">
- <Title level={5}>Project API keys</Title>
- <Text className="block" type="secondary">
+ <h5 className="text-base">Project API keys</h5>
+ <p className="text-sm text-scale-1000">
Your API is secured behind an API gateway which requires an API Key for every request.
<br />
You can use the keys below to use Supabase client libraries.
- </Text>
+ </p>
</div>
}
>
@@ -220,7 +220,7 @@ const ConfigContentWrapper: FC<any> = ({ children }) => {
<Panel
title={
<div className="space-y-3">
- <Title level={5}>Project Configuration</Title>
+ <h5 className="text-base">Project Configuration</h5>
</div>
}
>
diff --git a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js b/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js
index 2bf7f82c94b..37a908a55d5 100644
--- a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js
+++ b/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js
@@ -2,7 +2,13 @@ import React, { useState } from 'react'
import { Modal } from '@supabase/ui'
import { render, unmountComponentAtNode } from 'react-dom'
-function ConfirmModal({ title, message, onConfirm, onAsyncConfirm, variant = 'danger' }) {
+function ConfirmModal({
+ title,
+ message: description,
+ onConfirm,
+ onAsyncConfirm,
+ variant = 'danger',
+}) {
const [loading, setLoading] = useState(false)
function onCancelClick() {
@@ -29,12 +35,7 @@ function ConfirmModal({ title, message, onConfirm, onAsyncConfirm, variant = 'da
<Modal
variant={variant}
visible={true}
- title={title}
- description={message}
- showIcon={false}
size="small"
- onConfirmText="OK"
- onCancelText="Cancel"
onCancel={onCancelClick}
onConfirm={onConfirmClick}
loading={loading}
diff --git a/studio/components/to-be-cleaned/Panel.tsx b/studio/components/to-be-cleaned/Panel.tsx
index 6ae39c52c7e..4c44e3a7d02 100644
--- a/studio/components/to-be-cleaned/Panel.tsx
+++ b/studio/components/to-be-cleaned/Panel.tsx
@@ -20,18 +20,19 @@ function Panel(props: any) {
const content = (
<div
className={`
- border border-panel-border-light dark:border-panel-border-dark
- rounded ${props.noMargin ? '' : 'mb-8'} ${props.className}`}
+ border border-panel-border-light dark:border-panel-border-dark
+ shadow-sm overflow-hidden
+ rounded rounded-md ${props.noMargin ? '' : 'mb-8'} ${props.className}`}
>
{props.title && (
<div className={headerClasses.join(' ')}>
<div className="px-6 py-4 flex items-center">{props.title}</div>
</div>
)}
-
<div className={`bg-panel-body-light dark:bg-panel-body-dark ${props.bodyClassName || ''}`}>
{props.children}
</div>
+
{props.footer && (
<div
className="
diff --git a/studio/components/to-be-cleaned/Usage.tsx b/studio/components/to-be-cleaned/Usage.tsx
index 7f3d35de7b6..e1357b0f4d0 100644
--- a/studio/components/to-be-cleaned/Usage.tsx
+++ b/studio/components/to-be-cleaned/Usage.tsx
@@ -344,9 +344,7 @@ export const ProjectUsageMinimal: FC<any> = ({ projectRef, subscription_id, filt
return (
<div key={feature.title}>
{feature.tiers[tier]?.render && feature.title !== 'Transfer limits' ? (
- <Typography.Text type="secondary" className="opacity-50">
- {feature.title}
- </Typography.Text>
+ <h5 className="text-scale-900 text-sm">{feature.title}</h5>
) : null}
<div className="text-sm text-typography-body-light dark:text-typography-body-dark">
{/* @ts-ignore */}
diff --git a/studio/components/ui/ConfirmationModal.tsx b/studio/components/ui/ConfirmationModal.tsx
index 06152eefa12..89726092cd1 100644
--- a/studio/components/ui/ConfirmationModal.tsx
+++ b/studio/components/ui/ConfirmationModal.tsx
@@ -43,7 +43,7 @@ const ConfirmationModal: FC<Props> = ({
<Modal
layout="vertical"
visible={visible}
- title={title}
+ header={title}
description={description}
size={size}
onCancel={onSelectCancel}
diff --git a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModalV2.js b/studio/components/ui/Dialogs/ConfirmDialog.js
similarity index 58%
rename from studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModalV2.js
rename to studio/components/ui/Dialogs/ConfirmDialog.js
index 36c2ec955ec..0e4263b154e 100644
--- a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModalV2.js
+++ b/studio/components/ui/Dialogs/ConfirmDialog.js
@@ -1,4 +1,4 @@
-import { Modal, Button, Space } from '@supabase/ui'
+import { Modal, Button, Form } from '@supabase/ui'
import { useState, useEffect } from 'react'
// [Joshen] I feel like having the confirm modal as a component to import is better than firing
@@ -29,22 +29,12 @@ const ConfirmModal = ({
}
return (
- <Modal
- visible={visible}
- title={title}
- description={description}
- size={size}
- customFooter={
- <Space>
- <Button type="secondary" onClick={onSelectCancel}>
- Cancel
- </Button>
- <Button type="primary" danger={danger} loading={loading} onClick={onConfirm}>
- {loading ? buttonLoadingLabel : buttonLabel}
- </Button>
- </Space>
- }
- />
+ <Modal visible={visible} title={title} description={description} size={size}>
+ <Form onSubmit={() => console.log('submitting confirm dialog')}>
+ <p>Hello</p>
+ <Button htmlType="submit">Confirm</Button>
+ </Form>
+ </Modal>
)
}
diff --git a/studio/components/ui/InformationBox.tsx b/studio/components/ui/InformationBox.tsx
index accf153a641..d9a69fc5f2c 100644
--- a/studio/components/ui/InformationBox.tsx
+++ b/studio/components/ui/InformationBox.tsx
@@ -1,5 +1,5 @@
import { FC, ReactNode, useState } from 'react'
-import { IconMaximize2, IconMinimize2, Typography } from '@supabase/ui'
+import { IconMaximize2, IconMinimize2 } from '@supabase/ui'
interface Props {
icon?: ReactNode
@@ -9,6 +9,7 @@ interface Props {
urlLabel?: string
defaultVisibility?: boolean
hideCollapse?: boolean
+ button?: React.ReactNode
className?: string
block?: boolean
size?: 'tiny' | 'small' | 'normal' | 'large'
@@ -22,6 +23,7 @@ const InformationBox: FC<Props> = ({
urlLabel = 'Read more',
defaultVisibility = false,
hideCollapse = false,
+ button,
className = '',
block = false,
size = 'normal',
@@ -29,29 +31,30 @@ const InformationBox: FC<Props> = ({
const [isExpanded, setIsExpanded] = useState<boolean>(defaultVisibility)
const padding = { tiny: 'py-1', small: 'py-2', normal: 'py-3', large: 'py-4' }[size]
+
return (
<div
- className={`${
- block ? 'block w-full' : ''
- } bg-gray-100 dark:bg-gray-600 ${padding} border border-gray-600 dark:border-gray-500 border-opacity-20 rounded ${className}`}
+ className={`${block ? 'block w-full' : ''}
+ block w-full bg-scale-100 dark:bg-scale-400 py-3 border border-scale-600 dark:border-scale-500 rounded ${className}`}
>
- <div className="flex flex-col">
- <div className="flex items-center justify-between px-3">
+ <div className="flex flex-col px-4">
+ <div className="flex items-center justify-between">
<div className="flex space-x-3 w-full lg:items-center">
- <Typography.Text>{icon}</Typography.Text>
+ <span className="text-scale-900">{icon}</span>
<div className="flex-grow">
- <Typography.Text>{title}</Typography.Text>
+ <h5 className="text-sm text-scale-1200">{title}</h5>
</div>
</div>
{description && !hideCollapse ? (
- <div className="cursor-pointer" onClick={() => setIsExpanded(!isExpanded)}>
- <Typography>
- {isExpanded ? (
- <IconMinimize2 size={14} strokeWidth={1.5} />
- ) : (
- <IconMaximize2 size={14} strokeWidth={1.5} />
- )}
- </Typography>
+ <div
+ className="cursor-pointer text-scale-900"
+ onClick={() => setIsExpanded(!isExpanded)}
+ >
+ {isExpanded ? (
+ <IconMinimize2 size={14} strokeWidth={1.5} />
+ ) : (
+ <IconMaximize2 size={14} strokeWidth={1.5} />
+ )}
</div>
) : null}
</div>
@@ -61,18 +64,19 @@ const InformationBox: FC<Props> = ({
}`}
style={{ maxHeight: isExpanded ? 500 : 0 }}
>
- <div className="px-3">
- <Typography.Text type="secondary" small>
- {description}
- </Typography.Text>
- </div>
+ <p className="text-sm text-scale-1100">{description}</p>
+
{url && (
- <div className="px-3">
- <a href={url} target="_blank">
- <Typography.Text small>{urlLabel}</Typography.Text>
- </a>
- </div>
+ <a
+ href={url}
+ target="_blank"
+ className="text-sm transition-colors underline text-scale-1100 hover:text-scale-1200"
+ >
+ {urlLabel}
+ </a>
)}
+
+ {button && <div>{button}</div>}
</div>
</div>
</div>
diff --git a/studio/components/ui/ProductMenu/ProductMenu.tsx b/studio/components/ui/ProductMenu/ProductMenu.tsx
index 94a81dd0196..7256bf868e1 100644
--- a/studio/components/ui/ProductMenu/ProductMenu.tsx
+++ b/studio/components/ui/ProductMenu/ProductMenu.tsx
@@ -10,33 +10,36 @@ interface Props {
const ProductMenu: FC<Props> = ({ page, menu }) => {
return (
- <div className="my-6 flex flex-col flex-grow space-y-4 overflow-y-auto">
- <Menu>
+ <div className="my-3 flex flex-col space-y-8 overflow-y-auto">
+ <Menu type="pills">
{menu.map((group: ProductMenuGroup, idx: number) => (
- <div key={group.title} className="space-y-4">
- <div className="mx-4 space-y-2">
- <div className="w-full flex">
- <h5 className="text-sm text-scale-1200">{group.title}</h5>
- </div>
- {group.isPreview && (
- <div className="mx-2">
- <Badge color="yellow">Not production ready</Badge>
+ <>
+ <div key={group.title} className="space-y-8 mb-4">
+ <div className="mx-4">
+ <Menu.Group
+ //@ts-ignore
+ title={
+ <div className="flex flex-col space-y-2">
+ <span>{group.title}</span>
+ {group.isPreview && <Badge color="amber">Not production ready</Badge>}
+ </div>
+ }
+ />
+ <div className="dash-product-menu">
+ {group.items.map((item: ProductMenuItem) => (
+ <Link key={item.key} href={item.url}>
+ <a className="block" target={item.isExternal ? '_blank' : '_self'}>
+ <Menu.Item icon={item.icon} rounded active={page === item.key}>
+ <Typography.Text className="truncate">{item.name}</Typography.Text>
+ </Menu.Item>
+ </a>
+ </Link>
+ ))}
</div>
- )}
- <div className="dash-product-menu">
- {group.items.map((item: ProductMenuItem) => (
- <Link key={item.key} href={item.url}>
- <a className="block" target={item.isExternal ? '_blank' : '_self'}>
- <Menu.Item icon={item.icon} rounded active={page === item.key}>
- <Typography.Text className="truncate">{item.name}</Typography.Text>
- </Menu.Item>
- </a>
- </Link>
- ))}
</div>
</div>
- {idx !== menu.length - 1 && <Divider light />}
- </div>
+ {idx !== menu.length - 1 && <div className="bg-scale-500 h-px w-full"></div>}
+ </>
))}
</Menu>
</div>
diff --git a/studio/components/ui/SparkBar.tsx b/studio/components/ui/SparkBar.tsx
index e6b6e43665c..27cdb882dd3 100644
--- a/studio/components/ui/SparkBar.tsx
+++ b/studio/components/ui/SparkBar.tsx
@@ -29,13 +29,9 @@ const SparkBar: FC<Props> = ({
return (
<div className="flex flex-col w-full">
{hasLabels && (
- <div className="flex justify-between pb-1 space-x-8">
- <span className="text-typography-body-light dark:text-typography-body-dark text-sm truncate">
- {labelBottom}
- </span>
- <span className="text-typography-body-light dark:text-typography-body-dark text-sm tabular-nums">
- {labelTop}
- </span>
+ <div className="flex align-baseline justify-between pb-1 space-x-8">
+ <span className="text-scale-1200 text-base truncate">{labelBottom}</span>
+ <span className="text-scale-900 text-sm tabular-nums">{labelTop}</span>
</div>
)}
<div
diff --git a/studio/pages/org/[slug]/settings.tsx b/studio/pages/org/[slug]/settings.tsx
index 5034bf26b41..65a76d434c7 100644
--- a/studio/pages/org/[slug]/settings.tsx
+++ b/studio/pages/org/[slug]/settings.tsx
@@ -31,6 +31,7 @@ import { BillingSettings, InvoicesSettings } from 'components/interfaces/Organiz
import Table from 'components/to-be-cleaned/Table'
import Panel from 'components/to-be-cleaned/Panel'
import { confirmAlert } from 'components/to-be-cleaned/ModalsDeprecated/ConfirmModal'
+import ConfirmDialog from 'components/ui/Dialogs/ConfirmDialog'
import InviteMemberModal from 'components/to-be-cleaned/ModalsDeprecated/InviteMemberModal'
import TextConfirmModal from 'components/to-be-cleaned/ModalsDeprecated/TextConfirmModal'
import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'
@@ -607,6 +608,7 @@ const OwnerDropdown = observer(({ members, member }: any) => {
<Dropdown.Item onClick={handleMemberDelete} icon={<IconTrash size="tiny" />}>
Remove member
</Dropdown.Item>
+ <Dropdown.Item icon={<IconTrash size="tiny" />}>Remove Member</Dropdown.Item>
</>
}
>
diff --git a/studio/pages/project/[ref]/auth/policies.tsx b/studio/pages/project/[ref]/auth/policies.tsx
index 8f9116d5653..abeedd20362 100644
--- a/studio/pages/project/[ref]/auth/policies.tsx
+++ b/studio/pages/project/[ref]/auth/policies.tsx
@@ -6,7 +6,7 @@ import { observer, useLocalObservable } from 'mobx-react-lite'
import { withAuth, useStore } from 'hooks'
import { AuthLayout } from 'components/layouts'
import NoSearchResults from 'components/to-be-cleaned/NoSearchResults'
-import ConfirmModal from 'components/to-be-cleaned/ModalsDeprecated/ConfirmModalV2'
+import ConfirmModal from 'components/ui/Dialogs/ConfirmDialog'
import PolicyTableRow from 'components/to-be-cleaned/Auth/PolicyTableRow'
import PolicyEditorModal from 'components/to-be-cleaned/Auth/PolicyEditorModal'
diff --git a/studio/pages/project/[ref]/editor/[id].tsx b/studio/pages/project/[ref]/editor/[id].tsx
index 123807c444d..fe04aa0f67d 100644
--- a/studio/pages/project/[ref]/editor/[id].tsx
+++ b/studio/pages/project/[ref]/editor/[id].tsx
@@ -12,6 +12,7 @@ import { useStore, withAuth } from 'hooks'
import { TableEditorLayout } from 'components/layouts'
import { TableGridEditor } from 'components/interfaces'
import ConfirmationModal from 'components/ui/ConfirmationModal'
+import { Modal, SidePanel } from '@supabase/ui'
const TableEditorPage: NextPage = () => {
const router = useRouter()
@@ -170,7 +171,13 @@ const TableEditorPage: NextPage = () => {
danger
visible={isDeleting && !isUndefined(selectedColumnToDelete)}
title={`Confirm deletion of column "${selectedColumnToDelete?.name}"`}
- description={`Are you sure you want to delete the selected column? This action cannot be undone`}
+ children={
+ <Modal.Content>
+ <p className="py-4 text-sm text-scale-1100">
+ Are you sure you want to delete the selected column? This action cannot be undone.
+ </p>
+ </Modal.Content>
+ }
buttonLabel="Delete"
buttonLoadingLabel="Deleting"
onSelectCancel={() => setIsDeleting(false)}
@@ -180,7 +187,13 @@ const TableEditorPage: NextPage = () => {
danger
visible={isDeleting && !isUndefined(selectedTableToDelete)}
title={`Confirm deletion of table "${selectedTableToDelete?.name}"`}
- description={`Are you sure you want to delete the selected table? This action cannot be undone`}
+ children={
+ <Modal.Content>
+ <p className="py-4 text-sm text-scale-1100">
+ Are you sure you want to delete the selected table? This action cannot be undone.
+ </p>
+ </Modal.Content>
+ }
buttonLabel="Delete"
buttonLoadingLabel="Deleting"
onSelectCancel={() => setIsDeleting(false)}
diff --git a/studio/pages/project/[ref]/editor/index.tsx b/studio/pages/project/[ref]/editor/index.tsx
index 5f433675cfb..a5d27e7221e 100644
--- a/studio/pages/project/[ref]/editor/index.tsx
+++ b/studio/pages/project/[ref]/editor/index.tsx
@@ -9,6 +9,7 @@ import { TableEditorLayout } from 'components/layouts'
import { EmptyState, SidePanelEditor } from 'components/interfaces/TableGridEditor'
import ConfirmationModal from 'components/ui/ConfirmationModal'
import router from 'next/router'
+import { SidePanel } from '@supabase/ui'
const Editor: NextPage = () => {
const { meta, ui } = useStore()
@@ -74,14 +75,6 @@ const Editor: NextPage = () => {
>
<EmptyState selectedSchema={selectedSchema} onAddTable={onAddTable} />
{/* On this page it'll only handle tables */}
- <SidePanelEditor
- selectedSchema={selectedSchema}
- isDuplicating={isDuplicating}
- selectedTableToEdit={selectedTableToEdit}
- sidePanelKey={sidePanelKey}
- closePanel={onClosePanel}
- onTableCreated={(table: any) => router.push(`/project/${projectRef}/editor/${table.id}`)}
- />
<ConfirmationModal
danger
visible={isDeleting && !isUndefined(selectedTableToDelete)}
@@ -92,6 +85,14 @@ const Editor: NextPage = () => {
onSelectCancel={() => setIsDeleting(false)}
onSelectConfirm={onConfirmDeleteTable}
/>
+ <SidePanelEditor
+ selectedSchema={selectedSchema}
+ isDuplicating={isDuplicating}
+ selectedTableToEdit={selectedTableToEdit}
+ sidePanelKey={sidePanelKey}
+ closePanel={onClosePanel}
+ onTableCreated={(table: any) => router.push(`/project/${projectRef}/editor/${table.id}`)}
+ />
</TableEditorLayout>
)
}
diff --git a/studio/pages/project/[ref]/index.tsx b/studio/pages/project/[ref]/index.tsx
index f694cb0754b..e265233b566 100644
--- a/studio/pages/project/[ref]/index.tsx
+++ b/studio/pages/project/[ref]/index.tsx
@@ -43,9 +43,7 @@ const Home: NextPage = () => {
<BaseLayout>
<div className="max-w-7xl mx-auto w-full my-16 space-y-16">
<div className="mx-6 flex space-x-6 items-center">
- <Typography.Title level={2} className="m-0">
- {projectName}
- </Typography.Title>
+ <h1 className="text-3xl">{projectName}</h1>
</div>
{IS_PLATFORM && project && (
<>
diff --git a/studio/pages/project/[ref]/settings/general.tsx b/studio/pages/project/[ref]/settings/general.tsx
index 3b8f330b4df..84414de3ab3 100644
--- a/studio/pages/project/[ref]/settings/general.tsx
+++ b/studio/pages/project/[ref]/settings/general.tsx
@@ -21,7 +21,7 @@ import { useStore, withAuth } from 'hooks'
import { SettingsLayout } from 'components/layouts'
import Panel from 'components/to-be-cleaned/Panel'
import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'
-import ConfirmModal from 'components/to-be-cleaned/ModalsDeprecated/ConfirmModalV2'
+import ConfirmModal from 'components/ui/Dialogs/ConfirmDialog'
const ProjectSettings = () => {
return (
diff --git a/studio/public/img/regions/CENTRAL_CANADA.svg b/studio/public/img/regions/CENTRAL_CANADA.svg
new file mode 100644
index 00000000000..496f1a1dac4
--- /dev/null
+++ b/studio/public/img/regions/CENTRAL_CANADA.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-ca" viewBox="0 0 640 480">
+ <path fill="#fff" d="M81.1 0h362.3v512H81.1z" transform="translate(74.1) scale(.9375)"/>
+ <path fill="#d52b1e" d="M-100 0H81.1v512H-100zm543.4 0h181.1v512h-181zm-308 247.4-14.2 4.8 65.5 57.5c5 14.7-1.7 19-6 26.8l71-9L250 399l14.8-.4-3.3-71 71.2 8.5c-4.4-9.3-8.3-14.2-4.3-29l65.4-54.5-11.4-4.2c-9.4-7.2 4-34.7 6-52.1 0 0-38.1 13.1-40.6 6.2l-9.8-18.7-34.7 38.2c-3.8.9-5.4-.6-6.3-3.8l16-79.8-25.4 14.3c-2.1 1-4.2.2-5.6-2.3l-24.5-49-25.2 50.9c-1.9 1.8-3.8 2-5.4.8l-24.2-13.6 14.6 79.1c-1.2 3.2-4 4-7.2 2.3l-33.3-37.7c-4.3 7-7.2 18.3-13 20.9-5.7 2.4-25-4.8-37.9-7.6 4.4 15.9 18.2 42.3 9.5 51z" transform="translate(74.1) scale(.9375)"/>
+</svg>
diff --git a/studio/public/img/regions/CENTRAL_EU.svg b/studio/public/img/regions/CENTRAL_EU.svg
new file mode 100644
index 00000000000..b08334b62e2
--- /dev/null
+++ b/studio/public/img/regions/CENTRAL_EU.svg
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-de" viewBox="0 0 640 480">
+ <path fill="#ffce00" d="M0 320h640v160H0z"/>
+ <path d="M0 0h640v160H0z"/>
+ <path fill="#d00" d="M0 160h640v160H0z"/>
+</svg>
diff --git a/studio/public/img/regions/EAST_US.svg b/studio/public/img/regions/EAST_US.svg
new file mode 100644
index 00000000000..3189d8e2dc3
--- /dev/null
+++ b/studio/public/img/regions/EAST_US.svg
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-us" viewBox="0 0 640 480">
+ <g fill-rule="evenodd">
+ <g stroke-width="1pt">
+ <path fill="#bd3d44" d="M0 0h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.7h972.8V197H0zm0 78.8h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.7h972.8v39.4H0zm0 78.8h972.8V512H0z" transform="scale(.9375)"/>
+ <path fill="#fff" d="M0 39.4h972.8v39.4H0zm0 78.8h972.8v39.3H0zm0 78.7h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.7h972.8v39.4H0z" transform="scale(.9375)"/>
+ </g>
+ <path fill="#192f5d" d="M0 0h389.1v275.7H0z" transform="scale(.9375)"/>
+ <path fill="#fff" d="M32.4 11.8 36 22.7h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H29zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9H177l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9H242l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.2-6.7h11.4zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zM64.9 39.4l3.5 10.9h11.5L70.6 57 74 67.9l-9-6.7-9.3 6.7L59 57l-9-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 10.9-9.3-6.7-9.3 6.7L124 57l-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 10.9-9.3-6.7-9.2 6.7 3.5-10.9-9.3-6.7H256zm64.9 0 3.5 10.9h11.5L330 57l3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7h11.4zM32.4 66.9 36 78h11.4l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.3-6.7H29zm64.9 0 3.5 11h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7h11.4zm64.8 0 3.6 11H177l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.3-6.7h11.5zm64.9 0 3.5 11H242l-9.3 6.7 3.6 10.9-9.3-6.8-9.3 6.8 3.6-11-9.3-6.7h11.4zm64.8 0 3.6 11h11.4l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.2-6.7h11.4zm64.9 0 3.5 11h11.5l-9.3 6.7 3.6 10.9-9.3-6.8-9.3 6.8 3.6-11-9.3-6.7h11.5zM64.9 94.5l3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H256zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zM32.4 122.1 36 133h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H29zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9H177l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9H242l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.2-6.7h11.4zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zM64.9 149.7l3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 10.9-9.3-6.8-9.3 6.8 3.6-11-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.3-6.7H256zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7h11.4zM32.4 177.2l3.6 11h11.4l-9.2 6.7 3.5 10.8-9.3-6.7-9.2 6.7 3.5-10.9-9.3-6.7H29zm64.9 0 3.5 11h11.5l-9.3 6.7 3.6 10.8-9.3-6.7-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 11H177l-9.2 6.7 3.5 10.8-9.3-6.7-9.2 6.7 3.5-10.9-9.3-6.7h11.5zm64.9 0 3.5 11H242l-9.3 6.7 3.6 10.8-9.3-6.7-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 11h11.4l-9.2 6.7 3.5 10.8-9.3-6.7-9.2 6.7 3.5-10.9-9.2-6.7h11.4zm64.9 0 3.5 11h11.5l-9.3 6.7 3.6 10.8-9.3-6.7-9.3 6.7 3.6-10.9-9.3-6.7h11.5zM64.9 204.8l3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H256zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zM32.4 232.4l3.6 10.9h11.4l-9.2 6.7 3.5 10.9-9.3-6.7-9.2 6.7 3.5-11-9.3-6.7H29zm64.9 0 3.5 10.9h11.5L103 250l3.6 10.9-9.3-6.7-9.3 6.7 3.6-11-9.3-6.7h11.4zm64.8 0 3.6 10.9H177l-9 6.7 3.5 10.9-9.3-6.7-9.2 6.7 3.5-11-9.3-6.7h11.5zm64.9 0 3.5 10.9H242l-9.3 6.7 3.6 10.9-9.3-6.7-9.3 6.7 3.6-11-9.3-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 10.9-9.3-6.7-9.2 6.7 3.5-11-9.2-6.7h11.4zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.6 10.9-9.3-6.7-9.3 6.7 3.6-11-9.3-6.7h11.5z" transform="scale(.9375)"/>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/NORTHEAST_ASIA.svg b/studio/public/img/regions/NORTHEAST_ASIA.svg
new file mode 100644
index 00000000000..a0a67911590
--- /dev/null
+++ b/studio/public/img/regions/NORTHEAST_ASIA.svg
@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-jp" viewBox="0 0 640 480">
+ <defs>
+ <clipPath id="jp-a">
+ <path fill-opacity=".7" d="M-88 32h640v480H-88z"/>
+ </clipPath>
+ </defs>
+ <g fill-rule="evenodd" stroke-width="1pt" clip-path="url(#jp-a)" transform="translate(88 -32)">
+ <path fill="#fff" d="M-128 32h720v480h-720z"/>
+ <circle cx="523.1" cy="344.1" r="194.9" fill="#d30000" transform="translate(-168.4 8.6) scale(.76554)"/>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/NORTHEAST_ASIA_2.svg b/studio/public/img/regions/NORTHEAST_ASIA_2.svg
new file mode 100644
index 00000000000..cd1aa611acf
--- /dev/null
+++ b/studio/public/img/regions/NORTHEAST_ASIA_2.svg
@@ -0,0 +1,24 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="flag-icons-kr" viewBox="0 0 640 480">
+ <defs id="defs87">
+ <clipPath id="kr-a">
+ <path id="path84" fill-opacity=".7" d="M-95.8-.4h682.7v512H-95.8z"/>
+ </clipPath>
+ </defs>
+ <g id="g119" fill-rule="evenodd" clip-path="url(#kr-a)" transform="translate(89.8 .4) scale(.9375)">
+ <path id="path526" fill="#fff" d="M-95.8-.4H587v512H-95.8Z" style="stroke-width:10.0567"/>
+ <g id="g540" transform="scale(10.66667) rotate(-56.3 33.9 -9.5)">
+ <g id="b2">
+ <path id="b" d="M-6-26H6v2H-6Zm0 3H6v2H-6Zm0 3H6v2H-6Z"/>
+ <use xlink:href="#b" id="use529" width="100%" height="100%" x="0" y="44"/>
+ </g>
+ <path id="path532" stroke="#fff" d="M0 17v10"/>
+ <path id="path534" fill="#cd2e3a" d="M0-12a12 12 0 0 1 0 24Z"/>
+ <path id="path536" fill="#0047a0" d="M0-12a12 12 0 0 0 0 24A6 6 0 0 0 0 0Z"/>
+ <circle id="circle538" cx="0" cy="-6" r="6" fill="#cd2e3a"/>
+ </g>
+ <g id="g546" transform="scale(-10.66667) rotate(56.3 10.9 -33.5)">
+ <use xlink:href="#b2" id="use542" width="100%" height="100%" x="0" y="0"/>
+ <path id="path544" stroke="#fff" d="M0-23.5v3M0 17v3.5m0 3v3"/>
+ </g>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/OCEANIA.svg b/studio/public/img/regions/OCEANIA.svg
new file mode 100644
index 00000000000..aa33c9382dd
--- /dev/null
+++ b/studio/public/img/regions/OCEANIA.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-au" viewBox="0 0 640 480">
+ <path id="path617" fill="#006" stroke-width="1.3" d="M0 0h640v480H0z"/>
+ <path id="path625" fill="#fff" fill-rule="evenodd" stroke-width="1.3" d="m299.8 392.5-43.7 3.8 6 43.4L232 408l-30.1 31.7 6-43.4-43.7-3.8 37.7-22.3-24.3-36.5 41 15.5 13.4-41.7 13.5 41.7 41-15.5-24.3 36.5m224.4 62.3L476 416.7l17.8 6.7 5.8-18.1 5.8 18.1 17.8-6.7-10.5 15.8 16.4 9.7-19 1.7 2.6 18.9-13-13.9-13.2 13.9 2.6-18.9-19-1.6m16.4-291.9L476 134.6l17.8 6.7 5.8-18.1 5.8 18.1 17.8-6.7-10.5 15.8 16.4 9.8-19 1.6 2.6 18.9-13-13.8-13.2 13.7 2.6-18.8-19-1.6M380.8 265l-10.5-15.8 17.8 6.7 5.8-18.1 5.9 18.1 17.8-6.7L407 265l16.4 9.7-19 1.7 2.7 18.9-13.2-13.9-13 13.9 2.5-18.9-19-1.6m216.3-38L570 221l17.8 6.7 5.8-18.1 5.9 18.1 17.8-6.7-10.5 15.8 16.3 9.7-19 1.7 2.6 18.8-13-13.8-13.2 13.8 2.6-18.8-19-1.7M542 320l-10.3 6.5 2.9-11.9-9.3-7.8 12.1-1 4.6-11.2 4.7 11.3 12.1.9-9.3 7.8 2.9 11.9"/>
+ <path id="path969" fill="#006" stroke-width=".5" d="M0 0h320v240H0z"/>
+ <path id="path971" fill="#fff" stroke-width=".5" d="m37.5 0 122 90.5L281 0h39v31l-120 89.5 120 89V240h-40l-120-89.5L40.5 240H0v-30l119.5-89L0 32V0z"/>
+ <path id="path973" fill="#c8102e" stroke-width=".5" d="M212 140.5 320 220v20l-135.5-99.5zm-92 10 3 17.5-96 72H0zM320 0v1.5l-124.5 94 1-22L295 0zM0 0l119.5 88h-30L0 21z"/>
+ <path id="path975" fill="#fff" stroke-width=".5" d="M120.5 0v240h80V0zM0 80v80h320V80z"/>
+ <path id="path977" fill="#c8102e" stroke-width=".5" d="M0 96.5v48h320v-48zM136.5 0v240h48V0z"/>
+</svg>
diff --git a/studio/public/img/regions/SOUTHEAST_ASIA.svg b/studio/public/img/regions/SOUTHEAST_ASIA.svg
new file mode 100644
index 00000000000..c4dd4ac9ebe
--- /dev/null
+++ b/studio/public/img/regions/SOUTHEAST_ASIA.svg
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-sg" viewBox="0 0 640 480">
+ <defs>
+ <clipPath id="sg-a">
+ <path fill-opacity=".7" d="M0 0h640v480H0z"/>
+ </clipPath>
+ </defs>
+ <g fill-rule="evenodd" clip-path="url(#sg-a)">
+ <path fill="#fff" d="M-20 0h720v480H-20z"/>
+ <path fill="#df0000" d="M-20 0h720v240H-20z"/>
+ <path fill="#fff" d="M146 40.2a84.4 84.4 0 0 0 .8 165.2 86 86 0 0 1-106.6-59 86 86 0 0 1 59-106c16-4.6 30.8-4.7 46.9-.2z"/>
+ <path fill="#fff" d="m133 110 4.9 15-13-9.2-12.8 9.4 4.7-15.2-12.8-9.3 15.9-.2 5-15 5 15h15.8zm17.5 52 5 15.1-13-9.2-12.9 9.3 4.8-15.1-12.8-9.4 15.9-.1 4.9-15.1 5 15h16zm58.5-.4 4.9 15.2-13-9.3-12.8 9.3 4.7-15.1-12.8-9.3 15.9-.2 5-15 5 15h15.8zm17.4-51.6 4.9 15.1-13-9.2-12.8 9.3 4.8-15.1-12.9-9.4 16-.1 4.8-15.1 5 15h16zm-46.3-34.3 5 15.2-13-9.3-12.9 9.4 4.8-15.2-12.8-9.4 15.8-.1 5-15.1 5 15h16z"/>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/SOUTH_AFRICA.svg b/studio/public/img/regions/SOUTH_AFRICA.svg
new file mode 100644
index 00000000000..1e0b8b23bb1
--- /dev/null
+++ b/studio/public/img/regions/SOUTH_AFRICA.svg
@@ -0,0 +1,17 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-za" viewBox="0 0 640 480">
+ <defs>
+ <clipPath id="za-a">
+ <path fill-opacity=".7" d="M-71.9 0h682.7v512H-71.9z"/>
+ </clipPath>
+ </defs>
+ <g clip-path="url(#za-a)" transform="translate(67.4) scale(.93748)">
+ <g fill-rule="evenodd" stroke-width="1pt">
+ <path d="M-71.9 407.8V104.4L154 256.1-72 407.8z"/>
+ <path fill="#00c" d="m82.2 512.1 253.6-170.6H696V512H82.2z"/>
+ <path fill="red" d="M66 0h630v170.8H335.7S69.3-1.7 66 0z"/>
+ <path fill="#fc0" d="M-71.9 64v40.4L154 256-72 407.8v40.3l284.5-192L-72 64z"/>
+ <path fill="#093" d="M-71.9 64V0h95l301.2 204h371.8v104.2H324.3L23 512h-94.9v-63.9l284.4-192L-71.8 64z"/>
+ <path fill="#fff" d="M23 0h59.2l253.6 170.7H696V204H324.3L23 .1zm0 512.1h59.2l253.6-170.6H696v-33.2H324.3L23 512z"/>
+ </g>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/SOUTH_AMERICA.svg b/studio/public/img/regions/SOUTH_AMERICA.svg
new file mode 100644
index 00000000000..354a7013f3c
--- /dev/null
+++ b/studio/public/img/regions/SOUTH_AMERICA.svg
@@ -0,0 +1,45 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-br" viewBox="0 0 640 480">
+ <g stroke-width="1pt">
+ <path fill="#229e45" fill-rule="evenodd" d="M0 0h640v480H0z"/>
+ <path fill="#f8e509" fill-rule="evenodd" d="m321.4 436 301.5-195.7L319.6 44 17.1 240.7 321.4 436z"/>
+ <path fill="#2b49a3" fill-rule="evenodd" d="M452.8 240c0 70.3-57.1 127.3-127.6 127.3A127.4 127.4 0 1 1 452.8 240z"/>
+ <path fill="#ffffef" fill-rule="evenodd" d="m283.3 316.3-4-2.3-4 2 .9-4.5-3.2-3.4 4.5-.5 2.2-4 1.9 4.2 4.4.8-3.3 3m86 26.3-3.9-2.3-4 2 .8-4.5-3.1-3.3 4.5-.5 2.1-4.1 2 4.2 4.4.8-3.4 3.1m-36.2-30-3.4-2-3.5 1.8.8-3.9-2.8-2.9 4-.4 1.8-3.6 1.6 3.7 3.9.7-3 2.7m87-8.5-3.4-2-3.5 1.8.8-3.9-2.7-2.8 3.9-.4 1.8-3.5 1.6 3.6 3.8.7-2.9 2.6m-87.3-22-4-2.2-4 2 .8-4.6-3.1-3.3 4.5-.5 2.1-4.1 2 4.2 4.4.8-3.4 3.2m-104.6-35-4-2.2-4 2 1-4.6-3.3-3.3 4.6-.5 2-4.1 2 4.2 4.4.8-3.3 3.1m13.3 57.2-4-2.3-4 2 .9-4.5-3.2-3.3 4.5-.6 2.1-4 2 4.2 4.4.8-3.3 3.1m132-67.3-3.6-2-3.6 1.8.8-4-2.8-3 4-.5 1.9-3.6 1.7 3.8 4 .7-3 2.7m-6.7 38.3-2.7-1.6-2.9 1.4.6-3.2-2.2-2.3 3.2-.4 1.5-2.8 1.3 3 3 .5-2.2 2.2m-142.2 50.4-2.7-1.5-2.7 1.3.6-3-2.1-2.2 3-.4 1.4-2.7 1.3 2.8 3 .6-2.3 2M419 299.8l-2.2-1.1-2.2 1 .5-2.3-1.7-1.6 2.4-.3 1.2-2 1 2 2.5.5-1.9 1.5"/>
+ <path fill="#ffffef" fill-rule="evenodd" d="m219.3 287.6-2.7-1.5-2.7 1.3.6-3-2.1-2.2 3-.4 1.4-2.7 1.3 2.8 3 .6-2.3 2"/>
+ <path fill="#ffffef" fill-rule="evenodd" d="m219.3 287.6-2.7-1.5-2.7 1.3.6-3-2.1-2.2 3-.4 1.4-2.7 1.3 2.8 3 .6-2.3 2m42.3 3-2.6-1.4-2.7 1.3.6-3-2.1-2.2 3-.4 1.4-2.7 1.3 2.8 3 .5-2.3 2.1m-4.8 17-2.6-1.5-2.7 1.4.6-3-2.1-2.3 3-.4 1.4-2.7 1.3 2.8 3 .6-2.3 2m87.4-22.2-2.6-1.6-2.8 1.4.6-3-2-2.3 3-.3 1.4-2.7 1.2 2.8 3 .5-2.2 2.1m-25.1 3-2.7-1.5-2.7 1.4.6-3-2-2.3 3-.3 1.4-2.8 1.2 2.9 3 .5-2.2 2.1m-68.8-5.8-1.7-1-1.7.8.4-1.9-1.3-1.4 1.9-.2.8-1.7.8 1.8 1.9.3-1.4 1.3m167.8 45.4-2.6-1.5-2.7 1.4.6-3-2.1-2.3 3-.4 1.4-2.7 1.3 2.8 3 .6-2.3 2m-20.8 6-2.2-1.4-2.3 1.2.5-2.6-1.7-1.8 2.5-.3 1.2-2.3 1 2.4 2.5.4-1.9 1.8m10.4 2.3-2-1.2-2.1 1 .4-2.3-1.6-1.7 2.3-.3 1.1-2 1 2 2.3.5-1.7 1.6m29.1-22.8-2-1-2 1 .5-2.3-1.6-1.7 2.3-.3 1-2 1 2.1 2.1.4-1.6 1.6m-38.8 41.8-2.5-1.4-2.7 1.2.6-2.8-2-2 3-.3 1.3-2.5 1.2 2.6 3 .5-2.3 1.9m.6 14.2-2.4-1.4-2.4 1.3.6-2.8-1.9-2 2.7-.4 1.2-2.5 1.1 2.6 2.7.5-2 2m-19-23.1-1.9-1.2-2 1 .4-2.2-1.5-1.7 2.2-.2 1-2 1 2 2.2.4-1.6 1.6m-17.8 2.3-2-1.2-2 1 .5-2.2-1.6-1.7 2.3-.2 1-2 1 2 2.1.4-1.6 1.6m-30.4-24.6-2-1.1-2 1 .5-2.3-1.6-1.6 2.2-.3 1-2 1 2 2.2.5-1.6 1.5m3.7 57-1.6-.9-1.8.9.4-2-1.3-1.4 1.9-.2.9-1.7.8 1.8 1.9.3-1.4 1.3m-46.2-86.6-4-2.3-4 2 .9-4.5-3.2-3.3 4.5-.6 2.2-4 1.9 4.2 4.4.8-3.3 3.1"/>
+ <path fill="#fff" fill-rule="evenodd" d="M444.4 285.8a124.6 124.6 0 0 0 5.8-19.8c-67.8-59.5-143.3-90-238.7-83.7a124.5 124.5 0 0 0-8.5 20.9c113-10.8 196 39.2 241.4 82.6z"/>
+ <path fill="#309e3a" d="m414 252.4 2.3 1.3a3.4 3.4 0 0 0-.3 2.2 3 3 0 0 0 1.4 1.7c.7.5 1.4.8 2 .7.6 0 1-.3 1.3-.7a1.3 1.3 0 0 0 .2-.9 2.3 2.3 0 0 0-.5-1c-.2-.3-.7-1-1.5-1.8a7.7 7.7 0 0 1-1.8-3 3.7 3.7 0 0 1 2-4.4 3.8 3.8 0 0 1 2.3-.2 7 7 0 0 1 2.6 1.2c1.4 1 2.3 2 2.6 3.2a4.1 4.1 0 0 1-.6 3.3l-2.4-1.5c.3-.6.4-1.2.2-1.7-.1-.5-.5-1-1.2-1.4a3.2 3.2 0 0 0-1.8-.7 1 1 0 0 0-.9.5c-.2.3-.2.6-.1 1s.6 1.2 1.6 2.2c1 1 1.6 1.9 2 2.5a3.9 3.9 0 0 1-.3 4.2 4.1 4.1 0 0 1-1.9 1.5 4 4 0 0 1-2.4.3c-.9-.2-1.8-.6-2.8-1.3-1.5-1-2.4-2.1-2.7-3.3a5.4 5.4 0 0 1 .6-4zm-11.6-7.6 2.5 1.3a3.4 3.4 0 0 0-.2 2.2 3 3 0 0 0 1.4 1.6c.8.5 1.4.7 2 .6.6 0 1-.3 1.3-.8a1.3 1.3 0 0 0 .2-.8c0-.3-.2-.7-.5-1a34.6 34.6 0 0 0-1.6-1.8c-1.1-1.1-1.8-2-2-2.8a3.7 3.7 0 0 1 .4-3.1 3.6 3.6 0 0 1 1.6-1.4 3.8 3.8 0 0 1 2.2-.3 7 7 0 0 1 2.6 1c1.5 1 2.4 2 2.7 3.1a4.1 4.1 0 0 1-.4 3.4l-2.5-1.4c.3-.7.4-1.2.2-1.7s-.6-1-1.3-1.4a3.2 3.2 0 0 0-1.9-.6 1 1 0 0 0-.8.5c-.2.3-.2.6-.1 1s.7 1.2 1.7 2.2c1 1 1.7 1.8 2 2.4a3.9 3.9 0 0 1 0 4.2 4.2 4.2 0 0 1-1.8 1.6 4 4 0 0 1-2.4.3 8 8 0 0 1-2.9-1.1 6 6 0 0 1-2.8-3.2 5.4 5.4 0 0 1 .4-4zm-14.2-3.8 7.3-12 8.8 5.5-1.2 2-6.4-4-1.6 2.7 6 3.7-1.3 2-6-3.7-2 3.3 6.7 4-1.2 2-9-5.5zm-20.7-17 1.1-2 5.4 2.7-2.5 5c-.8.2-1.8.3-3 .2a9.4 9.4 0 0 1-3.3-1 7.7 7.7 0 0 1-3-2.6 6 6 0 0 1-1-3.5 8.6 8.6 0 0 1 1-3.7 8 8 0 0 1 2.6-3 6.2 6.2 0 0 1 3.6-1.1c1 0 2 .3 3.2 1 1.6.7 2.6 1.7 3.1 2.8a5 5 0 0 1 .3 3.5l-2.7-.8a3 3 0 0 0-.2-2c-.3-.6-.8-1-1.6-1.4a3.8 3.8 0 0 0-3.1-.3c-1 .3-1.9 1.2-2.6 2.6-.7 1.4-1 2.7-.7 3.8a3.7 3.7 0 0 0 2 2.4c.5.3 1.1.5 1.7.5a6 6 0 0 0 1.8 0l.8-1.6-2.9-1.5zm-90.2-22.3 2-14 4.2.7 1.1 9.8 3.9-9 4.2.6-2 13.8-2.7-.4 1.7-10.9-4.4 10.5-2.7-.4-1.1-11.3-1.6 11-2.6-.4zm-14.1-1.7 1.3-14 10.3 1-.2 2.4-7.5-.7-.3 3 7 .7-.3 2.4-7-.7-.3 3.8 7.8.7-.2 2.4-10.6-1z"/>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="M216.5 191.3c0-1.5.3-2.6.7-3.6a6.7 6.7 0 0 1 1.4-1.9 5.4 5.4 0 0 1 1.8-1.2c1-.3 2-.5 3-.5 2.1 0 3.7.8 5 2a7.4 7.4 0 0 1 1.6 5.5c0 2.2-.7 4-2 5.3a6.5 6.5 0 0 1-5 1.7 6.6 6.6 0 0 1-4.8-2 7.3 7.3 0 0 1-1.7-5.3z"/>
+ <path fill="#f7ffff" d="M219.4 191.3c0 1.5.3 2.7 1 3.6.7.8 1.6 1.3 2.8 1.3a3.5 3.5 0 0 0 2.8-1.1c.7-.8 1-2 1.1-3.7 0-1.6-.2-2.8-1-3.6a3.5 3.5 0 0 0-2.7-1.3 3.6 3.6 0 0 0-2.8 1.2c-.8.8-1.1 2-1.2 3.6z"/>
+ </g>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="m233 198.5.2-14h6c1.5 0 2.5.2 3.2.5.7.2 1.2.7 1.6 1.3s.6 1.4.6 2.3a3.8 3.8 0 0 1-1 2.6 4.5 4.5 0 0 1-2.7 1.2l1.5 1.2c.4.4.9 1.2 1.5 2.3l1.7 2.8h-3.4l-2-3.2-1.4-2a2.1 2.1 0 0 0-.9-.6 5 5 0 0 0-1.4-.2h-.6v5.8H233z"/>
+ <path fill="#fff" d="M236 190.5h2c1.4 0 2.3 0 2.6-.2.3 0 .6-.3.8-.5s.3-.7.3-1c0-.6-.1-1-.4-1.2-.2-.3-.6-.5-1-.6h-2l-2.3-.1v3.5z"/>
+ </g>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="m249 185.2 5.2.3c1.1 0 2 .1 2.6.3a4.7 4.7 0 0 1 2 1.4 6 6 0 0 1 1.2 2.4c.3.9.4 2 .3 3.3a9.3 9.3 0 0 1-.5 3c-.4 1-1 1.8-1.7 2.4a5 5 0 0 1-2 1c-.6.2-1.5.2-2.5.2l-5.3-.3.7-14z"/>
+ <path fill="#fff" d="m251.7 187.7-.5 9.3h3.8c.5 0 .9-.2 1.2-.5.3-.3.6-.7.8-1.3.2-.6.4-1.5.4-2.6l-.1-2.5a3.2 3.2 0 0 0-.8-1.4 2.7 2.7 0 0 0-1.2-.7 13 13 0 0 0-2.3-.3h-1.3z"/>
+ </g>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="m317.6 210.2 3.3-13.6 4.4 1 3.2 1c.7.4 1.3 1 1.6 1.9.4.8.4 1.7.2 2.8-.2.8-.5 1.5-1 2a3.9 3.9 0 0 1-3 1.4c-.7 0-1.7-.2-3-.5l-1.7-.5-1.2 5.2-2.8-.7z"/>
+ <path fill="#fff" d="m323 199.6-.8 3.8 1.5.4c1 .2 1.8.4 2.2.3a1.9 1.9 0 0 0 1.6-1.5c0-.5 0-.9-.2-1.3a2 2 0 0 0-1-.9l-1.9-.5-1.3-.3z"/>
+ </g>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="m330.6 214.1 4.7-13.2 5.5 2c1.5.5 2.4 1 3 1.4.5.5.9 1 1 1.8s.2 1.5 0 2.3c-.4 1-1 1.7-1.8 2.2-.8.4-1.8.5-3 .3.4.5.8 1 1 1.6l.8 2.7.6 3.1-3.1-1.1-1-3.6a19.5 19.5 0 0 0-.7-2.4 2.1 2.1 0 0 0-.6-.8c-.2-.3-.6-.5-1.3-.7l-.5-.2-2 5.6-2.6-1z"/>
+ <path fill="#fff" d="m336 207.4 1.9.7c1.3.5 2.1.7 2.5.7.3 0 .6 0 .9-.3.3-.2.5-.5.6-.9.2-.4.2-.8 0-1.2a1.7 1.7 0 0 0-.8-.9l-2-.7-2-.7-1.2 3.3z"/>
+ </g>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="M347 213.6a9 9 0 0 1 1.7-3.2 6.6 6.6 0 0 1 1.8-1.5 6 6 0 0 1 2-.7c1 0 2 0 3.1.4a6.5 6.5 0 0 1 4.2 3.3c.8 1.6.8 3.5.2 5.7a7.4 7.4 0 0 1-3.4 4.5c-1.5.9-3.3 1-5.2.4a6.6 6.6 0 0 1-4.2-3.3 7.3 7.3 0 0 1-.2-5.6z"/>
+ <path fill="#fff" d="M349.8 214.4c-.4 1.5-.5 2.8 0 3.8s1.2 1.6 2.3 2c1 .3 2 .2 3-.4 1-.5 1.6-1.6 2.1-3.2.5-1.5.5-2.7 0-3.7a3.5 3.5 0 0 0-2.2-2 3.6 3.6 0 0 0-3 .3c-1 .6-1.7 1.6-2.2 3.2z"/>
+ </g>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="m374.3 233.1 6.4-12.4 5.3 2.7a10 10 0 0 1 2.7 1.9c.5.5.8 1.1.8 1.9s0 1.5-.4 2.2a3.8 3.8 0 0 1-2 2c-1 .2-2 .2-3.1-.2.4.6.6 1.2.8 1.7.2.6.3 1.5.4 2.8l.2 3.2-3-1.5-.4-3.7a20 20 0 0 0-.3-2.5 2 2 0 0 0-.5-1l-1.2-.7-.5-.3-2.7 5.2-2.5-1.3z"/>
+ <path fill="#fff" d="m380.5 227.2 1.9 1c1.2.6 2 1 2.3 1 .3 0 .7 0 1-.2.3-.1.5-.4.7-.8.2-.4.3-.8.2-1.2a2 2 0 0 0-.7-1 23.7 23.7 0 0 0-1.8-1l-2-1-1.6 3.2z"/>
+ </g>
+ <g stroke-opacity=".5">
+ <path fill="#309e3a" d="M426.1 258.7a8.9 8.9 0 0 1 2.5-2.6 6.6 6.6 0 0 1 2.2-.9 5.5 5.5 0 0 1 2.2 0c1 .2 1.9.6 2.8 1.2a6.6 6.6 0 0 1 3 4.4c.3 1.7-.2 3.6-1.4 5.5a7.3 7.3 0 0 1-4.5 3.3 6.5 6.5 0 0 1-5.2-1.1 6.6 6.6 0 0 1-3-4.4c-.3-1.8.2-3.6 1.4-5.4z"/>
+ <path fill="#fff" d="M428.6 260.3c-1 1.3-1.3 2.5-1.1 3.6a3.6 3.6 0 0 0 1.6 2.5c1 .7 2 .9 3 .6 1-.3 2-1 2.9-2.4.9-1.4 1.3-2.6 1.1-3.6-.1-1-.7-1.9-1.6-2.6s-2-.8-3-.5c-1 .2-2 1-3 2.4z"/>
+ </g>
+ <path fill="#309e3a" d="m301.8 204.5 2.3-9.8 7.2 1.7-.3 1.6-5.3-1.2-.5 2.2 4.9 1.1-.4 1.7-4.9-1.2-.6 2.7 5.5 1.3-.4 1.6-7.5-1.7z"/>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/SOUTH_ASIA.svg b/studio/public/img/regions/SOUTH_ASIA.svg
new file mode 100644
index 00000000000..53c29b3a967
--- /dev/null
+++ b/studio/public/img/regions/SOUTH_ASIA.svg
@@ -0,0 +1,25 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="flag-icons-in" viewBox="0 0 640 480">
+ <path fill="#f93" d="M0 0h640v160H0z"/>
+ <path fill="#fff" d="M0 160h640v160H0z"/>
+ <path fill="#128807" d="M0 320h640v160H0z"/>
+ <g transform="matrix(3.2 0 0 3.2 320 240)">
+ <circle r="20" fill="#008"/>
+ <circle r="17.5" fill="#fff"/>
+ <circle r="3.5" fill="#008"/>
+ <g id="d">
+ <g id="c">
+ <g id="b">
+ <g id="a" fill="#008">
+ <circle r=".9" transform="rotate(7.5 -8.8 133.5)"/>
+ <path d="M0 17.5.6 7 0 2l-.6 5L0 17.5z"/>
+ </g>
+ <use xlink:href="#a" width="100%" height="100%" transform="rotate(15)"/>
+ </g>
+ <use xlink:href="#b" width="100%" height="100%" transform="rotate(30)"/>
+ </g>
+ <use xlink:href="#c" width="100%" height="100%" transform="rotate(60)"/>
+ </g>
+ <use xlink:href="#d" width="100%" height="100%" transform="rotate(120)"/>
+ <use xlink:href="#d" width="100%" height="100%" transform="rotate(-120)"/>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/WEST_EU.svg b/studio/public/img/regions/WEST_EU.svg
new file mode 100644
index 00000000000..049be14de14
--- /dev/null
+++ b/studio/public/img/regions/WEST_EU.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-ie" viewBox="0 0 640 480">
+ <g fill-rule="evenodd" stroke-width="1pt">
+ <path fill="#fff" d="M0 0h640v480H0z"/>
+ <path fill="#009A49" d="M0 0h213.3v480H0z"/>
+ <path fill="#FF7900" d="M426.7 0H640v480H426.7z"/>
+ </g>
+</svg>
diff --git a/studio/public/img/regions/WEST_EU_2.svg b/studio/public/img/regions/WEST_EU_2.svg
new file mode 100644
index 00000000000..dbac25eae4c
--- /dev/null
+++ b/studio/public/img/regions/WEST_EU_2.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-gb" viewBox="0 0 640 480">
+ <path fill="#012169" d="M0 0h640v480H0z"/>
+ <path fill="#FFF" d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0h75z"/>
+ <path fill="#C8102E" d="m424 281 216 159v40L369 281h55zm-184 20 6 35L54 480H0l240-179zM640 0v3L391 191l2-44L590 0h50zM0 0l239 176h-60L0 42V0z"/>
+ <path fill="#FFF" d="M241 0v480h160V0H241zM0 160v160h640V160H0z"/>
+ <path fill="#C8102E" d="M0 193v96h640v-96H0zM273 0v480h96V0h-96z"/>
+</svg>
diff --git a/studio/public/img/regions/WEST_US.svg b/studio/public/img/regions/WEST_US.svg
new file mode 100644
index 00000000000..3189d8e2dc3
--- /dev/null
+++ b/studio/public/img/regions/WEST_US.svg
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-us" viewBox="0 0 640 480">
+ <g fill-rule="evenodd">
+ <g stroke-width="1pt">
+ <path fill="#bd3d44" d="M0 0h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.7h972.8V197H0zm0 78.8h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.7h972.8v39.4H0zm0 78.8h972.8V512H0z" transform="scale(.9375)"/>
+ <path fill="#fff" d="M0 39.4h972.8v39.4H0zm0 78.8h972.8v39.3H0zm0 78.7h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.8h972.8v39.4H0zm0 78.7h972.8v39.4H0z" transform="scale(.9375)"/>
+ </g>
+ <path fill="#192f5d" d="M0 0h389.1v275.7H0z" transform="scale(.9375)"/>
+ <path fill="#fff" d="M32.4 11.8 36 22.7h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H29zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9H177l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9H242l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.2-6.7h11.4zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zM64.9 39.4l3.5 10.9h11.5L70.6 57 74 67.9l-9-6.7-9.3 6.7L59 57l-9-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 10.9-9.3-6.7-9.3 6.7L124 57l-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 10.9-9.3-6.7-9.2 6.7 3.5-10.9-9.3-6.7H256zm64.9 0 3.5 10.9h11.5L330 57l3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7h11.4zM32.4 66.9 36 78h11.4l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.3-6.7H29zm64.9 0 3.5 11h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7h11.4zm64.8 0 3.6 11H177l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.3-6.7h11.5zm64.9 0 3.5 11H242l-9.3 6.7 3.6 10.9-9.3-6.8-9.3 6.8 3.6-11-9.3-6.7h11.4zm64.8 0 3.6 11h11.4l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.2-6.7h11.4zm64.9 0 3.5 11h11.5l-9.3 6.7 3.6 10.9-9.3-6.8-9.3 6.8 3.6-11-9.3-6.7h11.5zM64.9 94.5l3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H256zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zM32.4 122.1 36 133h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H29zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9H177l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9H242l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.2-6.7h11.4zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zM64.9 149.7l3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 10.9-9.3-6.8-9.3 6.8 3.6-11-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 10.9-9.3-6.8-9.2 6.8 3.5-11-9.3-6.7H256zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.8-9.3 6.8 3.5-11-9.2-6.7h11.4zM32.4 177.2l3.6 11h11.4l-9.2 6.7 3.5 10.8-9.3-6.7-9.2 6.7 3.5-10.9-9.3-6.7H29zm64.9 0 3.5 11h11.5l-9.3 6.7 3.6 10.8-9.3-6.7-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 11H177l-9.2 6.7 3.5 10.8-9.3-6.7-9.2 6.7 3.5-10.9-9.3-6.7h11.5zm64.9 0 3.5 11H242l-9.3 6.7 3.6 10.8-9.3-6.7-9.3 6.7 3.6-10.9-9.3-6.7h11.4zm64.8 0 3.6 11h11.4l-9.2 6.7 3.5 10.8-9.3-6.7-9.2 6.7 3.5-10.9-9.2-6.7h11.4zm64.9 0 3.5 11h11.5l-9.3 6.7 3.6 10.8-9.3-6.7-9.3 6.7 3.6-10.9-9.3-6.7h11.5zM64.9 204.8l3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.3 6.7 3.6 11-9.3-6.8-9.3 6.7 3.6-10.9-9.3-6.7h11.5zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7H191zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 11-9.3-6.8-9.2 6.7 3.5-10.9-9.3-6.7H256zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.5 11-9.2-6.8-9.3 6.7 3.5-10.9-9.2-6.7h11.4zM32.4 232.4l3.6 10.9h11.4l-9.2 6.7 3.5 10.9-9.3-6.7-9.2 6.7 3.5-11-9.3-6.7H29zm64.9 0 3.5 10.9h11.5L103 250l3.6 10.9-9.3-6.7-9.3 6.7 3.6-11-9.3-6.7h11.4zm64.8 0 3.6 10.9H177l-9 6.7 3.5 10.9-9.3-6.7-9.2 6.7 3.5-11-9.3-6.7h11.5zm64.9 0 3.5 10.9H242l-9.3 6.7 3.6 10.9-9.3-6.7-9.3 6.7 3.6-11-9.3-6.7h11.4zm64.8 0 3.6 10.9h11.4l-9.2 6.7 3.5 10.9-9.3-6.7-9.2 6.7 3.5-11-9.2-6.7h11.4zm64.9 0 3.5 10.9h11.5l-9.3 6.7 3.6 10.9-9.3-6.7-9.3 6.7 3.6-11-9.3-6.7h11.5z" transform="scale(.9375)"/>
+ </g>
+</svg>
diff --git a/studio/styles/editor.scss b/studio/styles/editor.scss
index d9a0a0cd4e6..79a9780187d 100644
--- a/studio/styles/editor.scss
+++ b/studio/styles/editor.scss
@@ -2,9 +2,9 @@
gap: 0rem !important;
}
-.table-editor-columns-input .sbui-input {
- @apply border-none;
-}
+// .table-editor-columns-input .sbui-input {
+// @apply border-none;
+// }
.table-editor-column-type .sbui-listbox-option-container {
width: 400px;
diff --git a/studio/styles/ui.scss b/studio/styles/ui.scss
index fe51b6de16d..062b6145e52 100644
--- a/studio/styles/ui.scss
+++ b/studio/styles/ui.scss
@@ -45,7 +45,7 @@
}
// TO DO: REMOVE
-label:not(.sbui-formlayout__label):not(.sbui-checkbox__label-container__label):not(.sbui-radio-container):not(.checkbox-pill) {
+.form-group label {
@apply inline-block text-scale-1100 text-sm py-2;
width: 33%;
align-self: top;
diff --git a/studio/tailwind.config.js b/studio/tailwind.config.js
index 07619670ba7..f3a4c14acc4 100644
--- a/studio/tailwind.config.js
+++ b/studio/tailwind.config.js
@@ -61,10 +61,10 @@ module.exports = ui({
'./node_modules/@supabase/ui/dist/config/default-theme.js',
],
theme: {
- maxHeight: {
- 12: '3rem',
- 48: '12rem',
- },
+ // maxHeight: {
+ // 12: '3rem',
+ // 48: '12rem',
+ // },
borderColor: (theme) => ({
...theme('colors'),
DEFAULT: 'var(--colors-scale5)',
@@ -171,15 +171,15 @@ module.exports = ui({
dark: 'var(--colors-scale3)',
},
'panel-header': {
- light: 'var(--colors-scale2)',
- dark: 'var(--colors-scale4)',
+ light: 'var(--colors-scale1)',
+ dark: 'var(--colors-scale3)',
},
'panel-footer': {
light: 'var(--colors-scale1)',
dark: 'var(--colors-scale3)',
},
'panel-border': {
- light: 'var(--colors-scale2)',
+ light: 'var(--colors-scale4)',
dark: 'var(--colors-scale4)',
},
'panel-border-interior': {