Skip to content

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

chore: remove `<Select>` `_Shadcn_` suffix (#45988)

Gildas Garcia5d97339d4177
diff --git a/apps/design-system/components/sonner-expand-position.tsx b/apps/design-system/components/sonner-expand-position.tsx
index db1b6d026a6..fb11e02ed0b 100644
--- a/apps/design-system/components/sonner-expand-position.tsx
+++ b/apps/design-system/components/sonner-expand-position.tsx
@@ -1,12 +1,12 @@
import { ComponentProps } from 'react'
import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectLabel_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectTrigger,
+ SelectValue,
SonnerToaster,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -38,7 +38,7 @@ function SonnerPositionConfig() {
description="You will need to fire a few Sonner toasts first"
layout="flex"
>
- <Select_Shadcn_
+ <Select
value={config.sonnerPosition}
defaultValue={config.sonnerPosition}
onValueChange={(e: Position) => {
@@ -48,20 +48,20 @@ function SonnerPositionConfig() {
})
}}
>
- <SelectTrigger_Shadcn_ className="w-[180px]">
- <SelectValue_Shadcn_ placeholder="Select a position" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Positions available</SelectLabel_Shadcn_>
+ <SelectTrigger className="w-[180px]">
+ <SelectValue placeholder="Select a position" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectLabel>Positions available</SelectLabel>
{positions.map((position) => (
- <SelectItem_Shadcn_ key={position} value={position}>
+ <SelectItem key={position} value={position}>
{position}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
</form>
</div>
diff --git a/apps/design-system/registry/default/example/confirmation-modal-demo.tsx b/apps/design-system/registry/default/example/confirmation-modal-demo.tsx
index e3d46a8e84f..49268e20a35 100644
--- a/apps/design-system/registry/default/example/confirmation-modal-demo.tsx
+++ b/apps/design-system/registry/default/example/confirmation-modal-demo.tsx
@@ -5,11 +5,11 @@ import {
Form,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -53,15 +53,15 @@ export default function ConfirmationModalDemo() {
render={({ field }) => (
<FormItemLayout layout="vertical" label="Postgres version">
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="17.6.1.054">17.6.1.054</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="17.6.1.055">17.6.1.055</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="17.6.1.054">17.6.1.054</SelectItem>
+ <SelectItem value="17.6.1.055">17.6.1.055</SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/design-system/registry/default/example/date-picker-with-presets.tsx b/apps/design-system/registry/default/example/date-picker-with-presets.tsx
index eb142bbad83..0641cad33b1 100644
--- a/apps/design-system/registry/default/example/date-picker-with-presets.tsx
+++ b/apps/design-system/registry/default/example/date-picker-with-presets.tsx
@@ -9,11 +9,11 @@ import {
Popover,
PopoverContent,
PopoverTrigger,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { cn } from '@/lib/utils'
@@ -36,17 +36,17 @@ export default function DatePickerWithPresets() {
</Button>
</PopoverTrigger>
<PopoverContent className="flex w-auto flex-col space-y-2 p-2">
- <Select_Shadcn_ onValueChange={(value) => setDate(addDays(new Date(), parseInt(value)))}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ position="popper">
- <SelectItem_Shadcn_ value="0">Today</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="1">Tomorrow</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="3">In 3 days</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="7">In a week</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select onValueChange={(value) => setDate(addDays(new Date(), parseInt(value)))}>
+ <SelectTrigger>
+ <SelectValue placeholder="Select" />
+ </SelectTrigger>
+ <SelectContent position="popper">
+ <SelectItem value="0">Today</SelectItem>
+ <SelectItem value="1">Tomorrow</SelectItem>
+ <SelectItem value="3">In 3 days</SelectItem>
+ <SelectItem value="7">In a week</SelectItem>
+ </SelectContent>
+ </Select>
<div className="rounded-md border">
<Calendar mode="single" selected={date} onSelect={setDate} />
</div>
diff --git a/apps/design-system/registry/default/example/form-item-layout-with-select.tsx b/apps/design-system/registry/default/example/form-item-layout-with-select.tsx
index 21ec9642742..171cff0daf9 100644
--- a/apps/design-system/registry/default/example/form-item-layout-with-select.tsx
+++ b/apps/design-system/registry/default/example/form-item-layout-with-select.tsx
@@ -5,11 +5,11 @@ import {
Form,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { z } from 'zod'
@@ -47,18 +47,18 @@ export default function FormItemLayoutDemo() {
description="Choose preferred email"
labelOptional="Optional"
>
- <Select_Shadcn_ onValueChange={field.onChange} defaultValue={field.value}>
+ <Select onValueChange={field.onChange} defaultValue={field.value}>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a verified email to display" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a verified email to display" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]">[email protected]</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]">[email protected]</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]">[email protected]</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectContent>
+ <SelectItem value="[email protected]">[email protected]</SelectItem>
+ <SelectItem value="[email protected]">[email protected]</SelectItem>
+ <SelectItem value="[email protected]">[email protected]</SelectItem>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/design-system/registry/default/example/form-patterns-pagelayout.tsx b/apps/design-system/registry/default/example/form-patterns-pagelayout.tsx
index fc26fb664a7..5fa534c4054 100644
--- a/apps/design-system/registry/default/example/form-patterns-pagelayout.tsx
+++ b/apps/design-system/registry/default/example/form-patterns-pagelayout.tsx
@@ -24,11 +24,11 @@ import {
PopoverTrigger,
RadioGroupStacked,
RadioGroupStackedItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
Textarea,
} from 'ui'
@@ -572,22 +572,16 @@ export default function FormPatternsPageLayout() {
description="Single selection from a list of options"
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select an option" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="us-east-1">
- US East (N. Virginia)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="us-west-2">
- US West (Oregon)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="eu-west-1">
- EU West (Ireland)
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue placeholder="Select an option" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="us-east-1">US East (N. Virginia)</SelectItem>
+ <SelectItem value="us-west-2">US West (Oregon)</SelectItem>
+ <SelectItem value="eu-west-1">EU West (Ireland)</SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/design-system/registry/default/example/form-patterns-sidepanel.tsx b/apps/design-system/registry/default/example/form-patterns-sidepanel.tsx
index f71fe6bc00e..41e6c2c18a3 100644
--- a/apps/design-system/registry/default/example/form-patterns-sidepanel.tsx
+++ b/apps/design-system/registry/default/example/form-patterns-sidepanel.tsx
@@ -21,11 +21,11 @@ import {
PopoverTrigger,
RadioGroupStacked,
RadioGroupStackedItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
Sheet,
SheetContent,
@@ -559,22 +559,16 @@ export default function FormPatternsSidePanel() {
description="Single selection from a list of options"
>
<FormControl className="col-span-6">
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select an option" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="us-east-1">
- US East (N. Virginia)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="us-west-2">
- US West (Oregon)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="eu-west-1">
- EU West (Ireland)
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue placeholder="Select an option" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="us-east-1">US East (N. Virginia)</SelectItem>
+ <SelectItem value="us-west-2">US West (Oregon)</SelectItem>
+ <SelectItem value="eu-west-1">EU West (Ireland)</SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/design-system/registry/default/example/select-demo.tsx b/apps/design-system/registry/default/example/select-demo.tsx
index 1792e32151f..0c92ddd1946 100644
--- a/apps/design-system/registry/default/example/select-demo.tsx
+++ b/apps/design-system/registry/default/example/select-demo.tsx
@@ -1,30 +1,30 @@
import * as React from 'react'
import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectLabel_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
export default function SelectDemo() {
return (
- <Select_Shadcn_>
- <SelectTrigger_Shadcn_ className="w-[180px]">
- <SelectValue_Shadcn_ placeholder="Select a fruit" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Fruits</SelectLabel_Shadcn_>
- <SelectItem_Shadcn_ value="apple">Apple</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="banana">Banana</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="blueberry">Blueberry</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="grapes">Grapes</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="pineapple">Pineapple</SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select>
+ <SelectTrigger className="w-[180px]">
+ <SelectValue placeholder="Select a fruit" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectLabel>Fruits</SelectLabel>
+ <SelectItem value="apple">Apple</SelectItem>
+ <SelectItem value="banana">Banana</SelectItem>
+ <SelectItem value="blueberry">Blueberry</SelectItem>
+ <SelectItem value="grapes">Grapes</SelectItem>
+ <SelectItem value="pineapple">Pineapple</SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)
}
diff --git a/apps/design-system/registry/default/example/select-form.tsx b/apps/design-system/registry/default/example/select-form.tsx
index b08c4a2edd2..c8089a74c3e 100644
--- a/apps/design-system/registry/default/example/select-form.tsx
+++ b/apps/design-system/registry/default/example/select-form.tsx
@@ -13,11 +13,11 @@ import {
FormItem,
FormLabel,
FormMessage,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { z } from 'zod'
@@ -53,18 +53,18 @@ export default function SelectForm() {
render={({ field }) => (
<FormItem>
<FormLabel>Email</FormLabel>
- <Select_Shadcn_ onValueChange={field.onChange} defaultValue={field.value}>
+ <Select onValueChange={field.onChange} defaultValue={field.value}>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a verified email to display" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a verified email to display" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]">[email protected]</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]">[email protected]</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]">[email protected]</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectContent>
+ <SelectItem value="[email protected]">[email protected]</SelectItem>
+ <SelectItem value="[email protected]">[email protected]</SelectItem>
+ <SelectItem value="[email protected]">[email protected]</SelectItem>
+ </SelectContent>
+ </Select>
<FormDescription>
You can manage email addresses in your{' '}
<Link href="/examples/forms">email settings</Link>.
diff --git a/apps/design-system/registry/default/example/select-scrollable.tsx b/apps/design-system/registry/default/example/select-scrollable.tsx
index 00050efa239..69199fe0152 100644
--- a/apps/design-system/registry/default/example/select-scrollable.tsx
+++ b/apps/design-system/registry/default/example/select-scrollable.tsx
@@ -1,71 +1,63 @@
import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectLabel_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
export default function SelectScrollable() {
return (
- <Select_Shadcn_>
- <SelectTrigger_Shadcn_ className="w-[280px]">
- <SelectValue_Shadcn_ placeholder="Select a timezone" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>North America</SelectLabel_Shadcn_>
- <SelectItem_Shadcn_ value="est">Eastern Standard Time (EST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="cst">Central Standard Time (CST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="mst">Mountain Standard Time (MST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="pst">Pacific Standard Time (PST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="akst">Alaska Standard Time (AKST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="hst">Hawaii Standard Time (HST)</SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Europe & Africa</SelectLabel_Shadcn_>
- <SelectItem_Shadcn_ value="gmt">Greenwich Mean Time (GMT)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="cet">Central European Time (CET)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="eet">Eastern European Time (EET)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="west">Western European Summer Time (WEST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="cat">Central Africa Time (CAT)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="eat">East Africa Time (EAT)</SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Asia</SelectLabel_Shadcn_>
- <SelectItem_Shadcn_ value="msk">Moscow Time (MSK)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="ist">India Standard Time (IST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="cst_china">China Standard Time (CST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="jst">Japan Standard Time (JST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="kst">Korea Standard Time (KST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="ist_indonesia">
- Indonesia Central Standard Time (WITA)
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Australia & Pacific</SelectLabel_Shadcn_>
- <SelectItem_Shadcn_ value="awst">
- Australian Western Standard Time (AWST)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="acst">
- Australian Central Standard Time (ACST)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="aest">
- Australian Eastern Standard Time (AEST)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="nzst">New Zealand Standard Time (NZST)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="fjt">Fiji Time (FJT)</SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>South America</SelectLabel_Shadcn_>
- <SelectItem_Shadcn_ value="art">Argentina Time (ART)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="bot">Bolivia Time (BOT)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="brt">Brasilia Time (BRT)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="clt">Chile Standard Time (CLT)</SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select>
+ <SelectTrigger className="w-[280px]">
+ <SelectValue placeholder="Select a timezone" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectLabel>North America</SelectLabel>
+ <SelectItem value="est">Eastern Standard Time (EST)</SelectItem>
+ <SelectItem value="cst">Central Standard Time (CST)</SelectItem>
+ <SelectItem value="mst">Mountain Standard Time (MST)</SelectItem>
+ <SelectItem value="pst">Pacific Standard Time (PST)</SelectItem>
+ <SelectItem value="akst">Alaska Standard Time (AKST)</SelectItem>
+ <SelectItem value="hst">Hawaii Standard Time (HST)</SelectItem>
+ </SelectGroup>
+ <SelectGroup>
+ <SelectLabel>Europe & Africa</SelectLabel>
+ <SelectItem value="gmt">Greenwich Mean Time (GMT)</SelectItem>
+ <SelectItem value="cet">Central European Time (CET)</SelectItem>
+ <SelectItem value="eet">Eastern European Time (EET)</SelectItem>
+ <SelectItem value="west">Western European Summer Time (WEST)</SelectItem>
+ <SelectItem value="cat">Central Africa Time (CAT)</SelectItem>
+ <SelectItem value="eat">East Africa Time (EAT)</SelectItem>
+ </SelectGroup>
+ <SelectGroup>
+ <SelectLabel>Asia</SelectLabel>
+ <SelectItem value="msk">Moscow Time (MSK)</SelectItem>
+ <SelectItem value="ist">India Standard Time (IST)</SelectItem>
+ <SelectItem value="cst_china">China Standard Time (CST)</SelectItem>
+ <SelectItem value="jst">Japan Standard Time (JST)</SelectItem>
+ <SelectItem value="kst">Korea Standard Time (KST)</SelectItem>
+ <SelectItem value="ist_indonesia">Indonesia Central Standard Time (WITA)</SelectItem>
+ </SelectGroup>
+ <SelectGroup>
+ <SelectLabel>Australia & Pacific</SelectLabel>
+ <SelectItem value="awst">Australian Western Standard Time (AWST)</SelectItem>
+ <SelectItem value="acst">Australian Central Standard Time (ACST)</SelectItem>
+ <SelectItem value="aest">Australian Eastern Standard Time (AEST)</SelectItem>
+ <SelectItem value="nzst">New Zealand Standard Time (NZST)</SelectItem>
+ <SelectItem value="fjt">Fiji Time (FJT)</SelectItem>
+ </SelectGroup>
+ <SelectGroup>
+ <SelectLabel>South America</SelectLabel>
+ <SelectItem value="art">Argentina Time (ART)</SelectItem>
+ <SelectItem value="bot">Bolivia Time (BOT)</SelectItem>
+ <SelectItem value="brt">Brasilia Time (BRT)</SelectItem>
+ <SelectItem value="clt">Chile Standard Time (CLT)</SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)
}
diff --git a/apps/docs/components/RealtimeLimitsEstimator/RealtimeLimitsEstimator.tsx b/apps/docs/components/RealtimeLimitsEstimator/RealtimeLimitsEstimator.tsx
index bd86ec5cf49..cef1f172a2b 100644
--- a/apps/docs/components/RealtimeLimitsEstimator/RealtimeLimitsEstimator.tsx
+++ b/apps/docs/components/RealtimeLimitsEstimator/RealtimeLimitsEstimator.tsx
@@ -7,11 +7,11 @@ import {
CollapsibleContent,
CollapsibleTrigger,
Label,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
export default function RealtimeLimitsEstimater({}) {
@@ -66,63 +66,59 @@ export default function RealtimeLimitsEstimater({}) {
<div className="grid mb-8 gap-y-8 gap-x-8 grid-cols-2 xl:grid-cols-4">
<div>
<Label htmlFor="computeAddOn">Compute:</Label>
- <Select_Shadcn_ onValueChange={handleComputeAddOnSelection} value={computeAddOn}>
- <SelectTrigger_Shadcn_ id="computeAddOn">
- <SelectValue_Shadcn_ className="font-mono" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="micro">Micro</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="small">Small to medium</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="large">Large to 16XL</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select onValueChange={handleComputeAddOnSelection} value={computeAddOn}>
+ <SelectTrigger id="computeAddOn">
+ <SelectValue className="font-mono" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="micro">Micro</SelectItem>
+ <SelectItem value="small">Small to medium</SelectItem>
+ <SelectItem value="large">Large to 16XL</SelectItem>
+ </SelectContent>
+ </Select>
</div>
<div>
<Label htmlFor="filters">Filters:</Label>
- <Select_Shadcn_
- onValueChange={handleFiltersSelection}
- value={filters.toString()}
- disabled
- >
- <SelectTrigger_Shadcn_ id="filters">
- <SelectValue_Shadcn_ className="font-mono" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="false">No</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="true">Yes</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select onValueChange={handleFiltersSelection} value={filters.toString()} disabled>
+ <SelectTrigger id="filters">
+ <SelectValue className="font-mono" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="false">No</SelectItem>
+ <SelectItem value="true">Yes</SelectItem>
+ </SelectContent>
+ </Select>
</div>
<div>
<Label htmlFor="rls">RLS:</Label>
- <Select_Shadcn_ onValueChange={handleRLSSelection} value={rls.toString()}>
- <SelectTrigger_Shadcn_ id="rls">
- <SelectValue_Shadcn_ className="font-mono" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="false">No</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="true">Yes</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select onValueChange={handleRLSSelection} value={rls.toString()}>
+ <SelectTrigger id="rls">
+ <SelectValue className="font-mono" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="false">No</SelectItem>
+ <SelectItem value="true">Yes</SelectItem>
+ </SelectContent>
+ </Select>
</div>
<div>
<Label htmlFor="concurrency">Connected clients:</Label>
- <Select_Shadcn_ onValueChange={handleConcurrencySelection} value={concurrency.toString()}>
- <SelectTrigger_Shadcn_ id="concurrency">
- <SelectValue_Shadcn_ className="font-mono" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select onValueChange={handleConcurrencySelection} value={concurrency.toString()}>
+ <SelectTrigger id="concurrency">
+ <SelectValue className="font-mono" />
+ </SelectTrigger>
+ <SelectContent>
{throughputTable
.filter(
(l) => l.computeAddOn === computeAddOn && l.filters === filters && l.rls === rls
)
.map((l) => (
- <SelectItem_Shadcn_ key={l.concurrency} value={l.concurrency.toString()}>
+ <SelectItem key={l.concurrency} value={l.concurrency.toString()}>
{Intl.NumberFormat().format(l.concurrency)}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
</div>
diff --git a/apps/docs/features/docs/Reference.ui.client.tsx b/apps/docs/features/docs/Reference.ui.client.tsx
index 0f4a8bba00b..ef64b13a7de 100644
--- a/apps/docs/features/docs/Reference.ui.client.tsx
+++ b/apps/docs/features/docs/Reference.ui.client.tsx
@@ -1,21 +1,12 @@
'use client'
+import { ReferenceContentInitiallyScrolledContext } from '~/features/docs/Reference.navigation.client'
+import { safeHistoryReplaceState } from '~/lib/historyUtils'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import { useContext, useEffect, useRef, useState } from 'react'
import { useInView } from 'react-intersection-observer'
-import { safeHistoryReplaceState } from '~/lib/historyUtils'
+import { cn, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from 'ui'
-import {
- cn,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
-
-import { ReferenceContentInitiallyScrolledContext } from '~/features/docs/Reference.navigation.client'
import { type IApiEndPoint } from './Reference.api.utils'
import { API_REFERENCE_REQUEST_BODY_SCHEMA_DATA_ATTRIBUTES } from './Reference.ui.shared'
@@ -93,25 +84,25 @@ export function ApiOperationBodySchemeSelector({
return (
<div ref={containerRef} className={cn('flex items-center justify-between gap-2', className)}>
<h3 className="text-base text-foreground">Body</h3>
- <Select_Shadcn_
+ <Select
value={selectedScheme}
onValueChange={(value) =>
setSelectedScheme(value as 'application/json' | 'application/x-www-form-urlencoded')
}
>
- <SelectTrigger_Shadcn_ className="w-48 [&>span]:w-full [&>span]:truncate">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger className="w-48 [&>span]:w-full [&>span]:truncate">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{availableSchemes.map((scheme) => (
- <SelectItem_Shadcn_ key={scheme} value={scheme}>
+ <SelectItem key={scheme} value={scheme}>
{scheme}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</div>
)
}
diff --git a/apps/studio/components/grid/components/editor/BooleanEditor.tsx b/apps/studio/components/grid/components/editor/BooleanEditor.tsx
index 72d88e5b3b2..fd33510c7eb 100644
--- a/apps/studio/components/grid/components/editor/BooleanEditor.tsx
+++ b/apps/studio/components/grid/components/editor/BooleanEditor.tsx
@@ -1,12 +1,5 @@
import type { RenderEditCellProps } from 'react-data-grid'
-import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
+import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from 'ui'
interface Props<TRow, TSummaryRow = unknown> extends RenderEditCellProps<TRow, TSummaryRow> {
isNullable?: boolean
@@ -31,21 +24,21 @@ export const BooleanEditor = <TRow, TSummaryRow = unknown>({
}
return (
- <Select_Shadcn_
+ <Select
name="boolean-editor"
defaultValue={value === null || value === undefined ? 'null' : value.toString()}
onValueChange={onChange}
>
- <SelectTrigger_Shadcn_ onBlur={onBlur} style={{ width: `${column.width}px` }}>
- <SelectValue_Shadcn_ id="boolean-editor" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="true">TRUE</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="false">FALSE</SelectItem_Shadcn_>
- {isNullable ? <SelectItem_Shadcn_ value="null">NULL</SelectItem_Shadcn_> : null}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectTrigger onBlur={onBlur} style={{ width: `${column.width}px` }}>
+ <SelectValue id="boolean-editor" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="true">TRUE</SelectItem>
+ <SelectItem value="false">FALSE</SelectItem>
+ {isNullable ? <SelectItem value="null">NULL</SelectItem> : null}
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)
}
diff --git a/apps/studio/components/grid/components/editor/SelectEditor.tsx b/apps/studio/components/grid/components/editor/SelectEditor.tsx
index 6fcd2b6db7c..0e67cf1fc4e 100644
--- a/apps/studio/components/grid/components/editor/SelectEditor.tsx
+++ b/apps/studio/components/grid/components/editor/SelectEditor.tsx
@@ -1,12 +1,5 @@
import type { RenderEditCellProps } from 'react-data-grid'
-import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
+import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from 'ui'
interface SelectEditorProps<TRow, TSummaryRow = unknown> extends RenderEditCellProps<
TRow,
@@ -39,20 +32,20 @@ export function SelectEditor<TRow, TSummaryRow = unknown>({
}
return (
- <Select_Shadcn_ name="select-editor" defaultValue={value ?? ''} onValueChange={onChange}>
- <SelectTrigger_Shadcn_ onBlur={onBlur} style={{ width: `${column.width}px` }}>
- <SelectValue_Shadcn_ id="select-editor" placeholder="NULL" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- {isNullable ? <SelectItem_Shadcn_ value={null as any}>NULL</SelectItem_Shadcn_> : null}
+ <Select name="select-editor" defaultValue={value ?? ''} onValueChange={onChange}>
+ <SelectTrigger onBlur={onBlur} style={{ width: `${column.width}px` }}>
+ <SelectValue id="select-editor" placeholder="NULL" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ {isNullable ? <SelectItem value={null as any}>NULL</SelectItem> : null}
{options.map(({ label, value }) => (
- <SelectItem_Shadcn_ key={value} value={value}>
+ <SelectItem key={value} value={value}>
{label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)
}
diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Classic/NewTokenDialog.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Classic/NewTokenDialog.tsx
index 7e8327b1949..72b1db3e997 100644
--- a/apps/studio/components/interfaces/Account/AccessTokens/Classic/NewTokenDialog.tsx
+++ b/apps/studio/components/interfaces/Account/AccessTokens/Classic/NewTokenDialog.tsx
@@ -17,11 +17,11 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
WarningIcon,
} from 'ui'
import { Admonition } from 'ui-patterns'
@@ -206,20 +206,20 @@ export const NewTokenDialog = ({
<FormItemLayout name="expiresAt" label="Expires in">
<div className="flex gap-2">
<FormControl className="grow">
- <Select_Shadcn_ value={field.value} onValueChange={handleExpiryChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Expires at" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={field.value} onValueChange={handleExpiryChange}>
+ <SelectTrigger>
+ <SelectValue placeholder="Expires at" />
+ </SelectTrigger>
+ <SelectContent>
{Object.values(EXPIRES_AT_OPTIONS).map(
(option: { value: string; label: string }) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
)}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
{isCustomExpiry && (
<DatePicker
diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/BasicInfo.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/BasicInfo.tsx
index c323d62bd43..fdf2d5aabc5 100644
--- a/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/BasicInfo.tsx
+++ b/apps/studio/components/interfaces/Account/AccessTokens/Scoped/Form/BasicInfo.tsx
@@ -5,11 +5,11 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
WarningIcon,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -86,23 +86,23 @@ export const BasicInfo = ({
<FormItemLayout name="expiresAt" label="Expires in">
<div className="flex gap-2">
<FormControl className="grow">
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={(value) => handleExpiryChange(value, field)}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Expires at" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Expires at" />
+ </SelectTrigger>
+ <SelectContent>
{Object.values(EXPIRES_AT_OPTIONS).map(
(option: { value: string; label: string }) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
)}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
{isCustomSelected && (
<DatePicker
diff --git a/apps/studio/components/interfaces/Account/Preferences/ProfileInformation.tsx b/apps/studio/components/interfaces/Account/Preferences/ProfileInformation.tsx
index 82acd1b16cd..926fcf9cbb3 100644
--- a/apps/studio/components/interfaces/Account/Preferences/ProfileInformation.tsx
+++ b/apps/studio/components/interfaces/Account/Preferences/ProfileInformation.tsx
@@ -11,11 +11,11 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import {
@@ -141,23 +141,23 @@ export const ProfileInformation = () => {
>
<FormControl className="col-span-8">
<div className="flex flex-col gap-1">
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={field.onChange}
disabled={profile?.is_sso_user}
>
- <SelectTrigger_Shadcn_ className="col-span-8 w-full">
- <SelectValue_Shadcn_ placeholder="Select primary email" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ className="col-span-8">
+ <SelectTrigger className="col-span-8 w-full">
+ <SelectValue placeholder="Select primary email" />
+ </SelectTrigger>
+ <SelectContent className="col-span-8">
{isIdentitiesSuccess &&
dedupedIdentityEmails.map((email) => (
- <SelectItem_Shadcn_ key={email} value={email}>
+ <SelectItem key={email} value={email}>
{email}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
</FormControl>
</FormItemLayout>
diff --git a/apps/studio/components/interfaces/Account/Preferences/ThemeSettings.tsx b/apps/studio/components/interfaces/Account/Preferences/ThemeSettings.tsx
index b12a5b78fdc..455dc84916e 100644
--- a/apps/studio/components/interfaces/Account/Preferences/ThemeSettings.tsx
+++ b/apps/studio/components/interfaces/Account/Preferences/ThemeSettings.tsx
@@ -8,11 +8,11 @@ import {
Label,
RadioGroup,
RadioGroupLargeItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
singleThemes,
Theme,
@@ -106,20 +106,20 @@ export const ThemeSettings = () => {
layout="flex-row-reverse"
description="Choose your preferred sidebar behavior: open, closed, or expand on hover."
>
- <Select_Shadcn_
+ <Select
value={sidebarBehaviour}
onValueChange={setSidebarBehaviour}
aria-label="Select an option"
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Choose an option" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="open">Expanded</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="closed">Collapsed</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="expandable">Expand on hover</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Choose an option" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="open">Expanded</SelectItem>
+ <SelectItem value="closed">Collapsed</SelectItem>
+ <SelectItem value="expandable">Expand on hover</SelectItem>
+ </SelectContent>
+ </Select>
</FormItemLayout>
</CardContent>
</Card>
diff --git a/apps/studio/components/interfaces/Advisors/CreateRuleSheet.tsx b/apps/studio/components/interfaces/Advisors/CreateRuleSheet.tsx
index eb7c3020b80..2de2a5c872d 100644
--- a/apps/studio/components/interfaces/Advisors/CreateRuleSheet.tsx
+++ b/apps/studio/components/interfaces/Advisors/CreateRuleSheet.tsx
@@ -9,11 +9,11 @@ import {
Form,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
Sheet,
SheetContent,
@@ -172,25 +172,25 @@ export const CreateRuleSheet = ({ lint, open, onOpenChange }: CreateRuleSheetPro
control={form.control}
render={({ field }) => (
<FormItemLayout label="Assign rule to" layout="vertical" className="px-5">
- <Select_Shadcn_
+ <Select
onValueChange={(val) => {
field.onChange(val)
if (val === 'all') form.setValue('is_disabled', true)
}}
defaultValue={field.value}
>
- <SelectTrigger_Shadcn_ className="col-span-8">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="all">All project members</SelectItem_Shadcn_>
+ <SelectTrigger className="col-span-8">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="all">All project members</SelectItem>
{members.map((m) => (
- <SelectItem_Shadcn_ key={m.gotrue_id} value={m.gotrue_id}>
+ <SelectItem key={m.gotrue_id} value={m.gotrue_id}>
{m.username || m.primary_email}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Form.tsx b/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Form.tsx
index 7d19dc70279..ddbff61db74 100644
--- a/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Form.tsx
+++ b/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Form.tsx
@@ -15,11 +15,11 @@ import {
FormControl,
FormField,
FormItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
WarningIcon,
} from 'ui'
import { ShimmeringLoader } from 'ui-patterns'
@@ -240,26 +240,26 @@ function OrganizationSelector({
isReactForm
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value || undefined}
disabled={disabled}
onValueChange={field.onChange}
>
- <SelectTrigger_Shadcn_ size="small">
- <SelectValue_Shadcn_ placeholder="Select an organization" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger size="small">
+ <SelectValue placeholder="Select an organization" />
+ </SelectTrigger>
+ <SelectContent>
{organizations.map((organization) => (
- <SelectItem_Shadcn_
+ <SelectItem
key={organization.slug}
value={organization.slug}
className="text-xs"
>
{organization.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormLayout>
</FormItem>
diff --git a/apps/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx b/apps/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx
index 61acdac26e2..5d458564f57 100644
--- a/apps/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx
+++ b/apps/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx
@@ -14,11 +14,11 @@ import {
Popover,
PopoverContent,
PopoverTrigger,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
SheetSection,
Switch,
@@ -348,17 +348,17 @@ const FormField = ({
}
>
<FormControl className="col-span-6">
- <Select_Shadcn_
+ <Select
defaultValue={properties.enum[0]?.value}
value={field.value}
onValueChange={field.onChange}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select an option" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select an option" />
+ </SelectTrigger>
+ <SelectContent>
{properties.enum.map((option: Enum) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
<span className="flex gap-2 items-center">
{option.icon ? (
<img
@@ -369,10 +369,10 @@ const FormField = ({
) : null}
{option.label}
</span>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm.tsx b/apps/studio/components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm.tsx
index 068b314e4a3..4e7ab960cc8 100644
--- a/apps/studio/components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm.tsx
+++ b/apps/studio/components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm.tsx
@@ -19,11 +19,11 @@ import {
InputGroup,
InputGroupAddon,
InputGroupText,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
WarningIcon,
} from 'ui'
@@ -365,22 +365,22 @@ export const MfaAuthSettingsForm = () => {
description="Control use of TOTP (App Authenticator) factors"
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={field.onChange}
disabled={!canUpdateConfig}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select status" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select status" />
+ </SelectTrigger>
+ <SelectContent>
{MFAFactorSelectionOptions.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -467,22 +467,22 @@ export const MfaAuthSettingsForm = () => {
description="Control use of phone factors"
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={field.onChange}
disabled={!canUpdateConfig || !hasAccessToMFA}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select status" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select status" />
+ </SelectTrigger>
+ <SelectContent>
{MFAFactorSelectionOptions.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Auth/OAuthApps/CreateOrUpdateOAuthAppSheet.tsx b/apps/studio/components/interfaces/Auth/OAuthApps/CreateOrUpdateOAuthAppSheet.tsx
index 1c4bfad927a..c9ea7e374cb 100644
--- a/apps/studio/components/interfaces/Auth/OAuthApps/CreateOrUpdateOAuthAppSheet.tsx
+++ b/apps/studio/components/interfaces/Auth/OAuthApps/CreateOrUpdateOAuthAppSheet.tsx
@@ -19,11 +19,11 @@ import {
FormField,
FormLabel,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
Sheet,
SheetClose,
@@ -492,19 +492,19 @@ export const CreateOrUpdateOAuthAppSheet = ({
className="px-5"
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="text-sm">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="client_secret_basic" className="text-sm">
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="text-sm">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="client_secret_basic" className="text-sm">
HTTP Basic Auth header (client_secret_basic)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="client_secret_post" className="text-sm">
+ </SelectItem>
+ <SelectItem value="client_secret_post" className="text-sm">
Request body (client_secret_post)
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx b/apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx
index 4f9c76c7445..52d2abcf147 100644
--- a/apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx
+++ b/apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx
@@ -15,11 +15,11 @@ import {
InputGroup,
InputGroupAddon,
InputGroupText,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { GenericSkeletonLoader, ShimmeringLoader } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -312,7 +312,7 @@ export const PerformanceSettingsForm = () => {
}
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={(value) => {
const values = databaseForm.getValues()
@@ -340,23 +340,20 @@ export const PerformanceSettingsForm = () => {
}
}}
>
- <SelectTrigger_Shadcn_
- size="small"
- disabled={!canUpdateConfig || promptUpgrade}
- >
- <SelectValue_Shadcn_>
+ <SelectTrigger size="small" disabled={!canUpdateConfig || promptUpgrade}>
+ <SelectValue>
{field.value === 'percent' ? 'Percentage' : 'Absolute'}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ align="end">
- <SelectItem_Shadcn_ value="connections" className="text-xs">
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent align="end">
+ <SelectItem value="connections" className="text-xs">
Absolute number of connections
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="percent" className="text-xs">
+ </SelectItem>
+ <SelectItem value="percent" className="text-xs">
Percent of max connections
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx
index 11547172004..ca41b17194a 100644
--- a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx
+++ b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx
@@ -29,11 +29,11 @@ import {
RadioGroup,
RadioGroupLargeItem,
ScrollArea,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
} from 'ui'
import {
MultiSelector,
@@ -239,31 +239,29 @@ export const PolicyDetailsV2 = ({
Policy Behavior <code className="text-code-inline">as</code> clause
</FormLabel>
<FormControl>
- <Select_Shadcn_
+ <Select
disabled={isEditing}
value={field.value}
onValueChange={(value) => form.setValue('behavior', value)}
>
- <SelectTrigger_Shadcn_ className="text-sm h-10 capitalize">
- {field.value}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="permissive" className="text-sm">
+ <SelectTrigger className="text-sm h-10 capitalize">{field.value}</SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="permissive" className="text-sm">
<p>Permissive</p>
<p className="text-foreground-light text-xs">
Policies are combined using the "OR" Boolean operator
</p>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="restrictive" className="text-sm">
+ </SelectItem>
+ <SelectItem value="restrictive" className="text-sm">
<p>Restrictive</p>
<p className="text-foreground-light text-xs">
Policies are combined using the "AND" Boolean operator
</p>
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
<FormMessage />
</FormItem>
diff --git a/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx b/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx
index 0fd4119635c..5ecf33fa254 100644
--- a/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx
+++ b/apps/studio/components/interfaces/Auth/ProtectionAuthSettingsForm/ProtectionAuthSettingsForm.tsx
@@ -14,11 +14,11 @@ import {
Form,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { GenericSkeletonLoader } from 'ui-patterns'
@@ -288,22 +288,22 @@ export const ProtectionAuthSettingsForm = () => {
return (
<FormItemLayout layout="flex-row-reverse" label="Choose Captcha Provider">
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={field.onChange}
disabled={!canUpdateConfig}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select provider" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ align="end">
+ <SelectTrigger>
+ <SelectValue placeholder="Select provider" />
+ </SelectTrigger>
+ <SelectContent align="end">
{CAPTCHA_PROVIDERS.map((x) => (
- <SelectItem_Shadcn_ key={x.key} value={x.key}>
+ <SelectItem key={x.key} value={x.key}>
{x.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
<InlineLink
href={
diff --git a/apps/studio/components/interfaces/Auth/Users/BanUserModal.tsx b/apps/studio/components/interfaces/Auth/Users/BanUserModal.tsx
index 1056d865d84..7ab5b0c9017 100644
--- a/apps/studio/components/interfaces/Auth/Users/BanUserModal.tsx
+++ b/apps/studio/components/interfaces/Auth/Users/BanUserModal.tsx
@@ -12,10 +12,10 @@ import {
FormField,
Input,
Modal,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
Separator,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -112,19 +112,17 @@ export const BanUserModal = ({ visible, user, onClose }: BanUserModalProps) => {
render={({ field }) => (
<FormItemLayout className="[&>div>div]:mt-0 mt-[33px]">
<FormControl>
- <Select_Shadcn_
+ <Select
{...field}
value={field.value}
onValueChange={(value) => form.setValue('unit', value as 'hours' | 'days')}
>
- <SelectTrigger_Shadcn_ className="capitalize w-24">
- {field.value}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="hours">Hours</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="days">Days</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectTrigger className="capitalize w-24">{field.value}</SelectTrigger>
+ <SelectContent>
+ <SelectItem value="hours">Hours</SelectItem>
+ <SelectItem value="days">Days</SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Auth/Users/UsersSearch.tsx b/apps/studio/components/interfaces/Auth/Users/UsersSearch.tsx
index d33de9f1015..fa9929cc50f 100644
--- a/apps/studio/components/interfaces/Auth/Users/UsersSearch.tsx
+++ b/apps/studio/components/interfaces/Auth/Users/UsersSearch.tsx
@@ -5,13 +5,13 @@ import { Dispatch, forwardRef, SetStateAction } from 'react'
import {
Button,
cn,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -112,43 +112,43 @@ export const UsersSearch = forwardRef<HTMLInputElement, UsersSearchProps>(functi
<Search size={14} />
</div>
- <Select_Shadcn_
+ <Select
value={specificFilterColumn}
onValueChange={(v) => onSelectFilterColumn(v as typeof specificFilterColumn)}
>
- <SelectTrigger_Shadcn_
+ <SelectTrigger
size="tiny"
className={cn(
'w-[130px] bg-transparent! rounded-none -ml-px',
specificFilterColumn === 'freeform' && 'text-warning'
)}
>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="id" className="text-xs">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="id" className="text-xs">
User ID
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="email" className="text-xs">
+ </SelectItem>
+ <SelectItem value="email" className="text-xs">
Email address
- </SelectItem_Shadcn_>
+ </SelectItem>
{improvedSearchEnabled && (
- <SelectItem_Shadcn_ value="name" className="text-xs">
+ <SelectItem value="name" className="text-xs">
Name
- </SelectItem_Shadcn_>
+ </SelectItem>
)}
- <SelectItem_Shadcn_ value="phone" className="text-xs">
+ <SelectItem value="phone" className="text-xs">
Phone number
- </SelectItem_Shadcn_>
+ </SelectItem>
{!improvedSearchEnabled && (
<>
- <SelectSeparator_Shadcn_ />
+ <SelectSeparator />
<Tooltip>
<TooltipTrigger>
- <SelectItem_Shadcn_ value="freeform" className="text-xs">
+ <SelectItem value="freeform" className="text-xs">
Unified search
- </SelectItem_Shadcn_>
+ </SelectItem>
</TooltipTrigger>
<TooltipContent side="right" className="w-64 text-center">
Search by all columns at once, including mid-string search. May impact database
@@ -157,9 +157,9 @@ export const UsersSearch = forwardRef<HTMLInputElement, UsersSearchProps>(functi
</Tooltip>
</>
)}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
<Input
ref={ref}
diff --git a/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx b/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx
index bc82b265a92..c096280c9d8 100644
--- a/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx
+++ b/apps/studio/components/interfaces/Auth/Users/UsersV2.tsx
@@ -27,12 +27,12 @@ import {
LoadingLine,
ResizablePanel,
ResizablePanelGroup,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -623,7 +623,7 @@ export const UsersV2 = () => {
{showUserTypeFilter &&
(specificFilterColumn === 'freeform' || improvedSearchEnabled) && (
- <Select_Shadcn_
+ <Select
value={filterUserType}
onValueChange={(val) => {
setFilterUserType(val as Filter)
@@ -638,32 +638,32 @@ export const UsersV2 = () => {
})
}}
>
- <SelectTrigger_Shadcn_
+ <SelectTrigger
size="tiny"
className={cn(
'w-[140px] bg-transparent!',
filterUserType === 'all' && 'border-dashed'
)}
>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="all" className="text-xs">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="all" className="text-xs">
All users
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="verified" className="text-xs">
+ </SelectItem>
+ <SelectItem value="verified" className="text-xs">
Verified users
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="unverified" className="text-xs">
+ </SelectItem>
+ <SelectItem value="unverified" className="text-xs">
Unverified users
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="anonymous" className="text-xs">
+ </SelectItem>
+ <SelectItem value="anonymous" className="text-xs">
Anonymous users
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)}
{showProviderFilter &&
diff --git a/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx b/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx
index 690dbc6423c..0855765f0d3 100644
--- a/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx
+++ b/apps/studio/components/interfaces/Connect/DatabaseConnectionString.tsx
@@ -10,11 +10,11 @@ import {
CollapsibleContent,
CollapsibleTrigger,
DIALOG_PADDING_X,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
} from 'ui'
import { CodeBlock } from 'ui-patterns/CodeBlock'
@@ -289,18 +289,18 @@ export const DatabaseConnectionString = () => {
<span className="w-1/2 md:w-auto flex items-center text-foreground-lighter px-3 rounded-lg rounded-r-none text-xs border border-button border-r-0">
Type
</span>
- <Select_Shadcn_ value={selectedTab} onValueChange={handleTabChange}>
- <SelectTrigger_Shadcn_ size="small" className="w-full md:w-auto rounded-l-none">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={selectedTab} onValueChange={handleTabChange}>
+ <SelectTrigger size="small" className="w-full md:w-auto rounded-l-none">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{DATABASE_CONNECTION_TYPES.map((type) => (
- <SelectItem_Shadcn_ key={type.id} value={type.id}>
+ <SelectItem key={type.id} value={type.id}>
{type.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
<DatabaseSelector
align="start"
@@ -315,13 +315,13 @@ export const DatabaseConnectionString = () => {
<span className="w-1/2 md:w-auto flex items-center text-foreground-lighter px-3 rounded-lg rounded-r-none text-xs border border-button border-r-0">
Method
</span>
- <Select_Shadcn_ value={selectedMethod} onValueChange={handleMethodChange}>
- <SelectTrigger_Shadcn_ size="small" className="w-full md:w-auto rounded-l-none">
- <SelectValue_Shadcn_ size="tiny">
+ <Select value={selectedMethod} onValueChange={handleMethodChange}>
+ <SelectTrigger size="small" className="w-full md:w-auto rounded-l-none">
+ <SelectValue size="tiny">
{connectionStringMethodOptions[selectedMethod].label}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ className="max-w-sm">
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent className="max-w-sm">
{Object.keys(connectionStringMethodOptions).map((method) => (
<ConnectionStringMethodSelectItem
key={method}
@@ -329,8 +329,8 @@ export const DatabaseConnectionString = () => {
poolerBadge={method === 'transaction' ? poolerBadge : undefined}
/>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
</div>
<p className="text-xs inline-flex items-center gap-1 text-foreground-lighter">
@@ -661,7 +661,7 @@ const ConnectionStringMethodSelectItem = ({
}
return (
- <SelectItem_Shadcn_ value={method} className="[&>span:first-child]:top-3.5">
+ <SelectItem value={method} className="[&>span:first-child]:top-3.5">
<div className="flex flex-col w-full py-1">
<div className="flex gap-x-2 items-center">
{connectionStringMethodOptions[method].label}
@@ -673,6 +673,6 @@ const ConnectionStringMethodSelectItem = ({
{badges.map((badge) => badge)}
</div>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
}
diff --git a/apps/studio/components/interfaces/ConnectSheet/ConnectConfigSection.tsx b/apps/studio/components/interfaces/ConnectSheet/ConnectConfigSection.tsx
index aa4e4a7adb6..b7b48b17bf6 100644
--- a/apps/studio/components/interfaces/ConnectSheet/ConnectConfigSection.tsx
+++ b/apps/studio/components/interfaces/ConnectSheet/ConnectConfigSection.tsx
@@ -3,11 +3,11 @@ import {
cn,
RadioGroupStacked,
RadioGroupStackedItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -135,24 +135,24 @@ export function ConnectConfigSection({
label={field.label}
description={field.description}
>
- <Select_Shadcn_
+ <Select
value={String(value ?? '')}
onValueChange={(v) => onFieldChange(field.id, v)}
>
- <SelectTrigger_Shadcn_
+ <SelectTrigger
size="small"
className="[&>span:first-child]:flex [&>span:first-child]:items-center [&>span:first-child]:gap-x-2"
>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{options.map((option) => (
- <SelectItem_Shadcn_
+ <SelectItem
key={option.value}
value={option.value}
className="[&>span:last-child]:flex [&>span:last-child]:items-center [&>span:last-child]:gap-x-2"
>
- {/*
+ {/*
[Joshen] Omitting MCP icons for now as the images are not optimized (large)
and is causing noticeably latency issues on the browser (even with the existing Connect UI)
*/}
@@ -160,10 +160,10 @@ export function ConnectConfigSection({
<ConnectionIcon icon={option.icon} />
)}
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)
diff --git a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx
index 9c71ad34c3f..5b5d15da487 100644
--- a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx
+++ b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx
@@ -15,12 +15,12 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { Admonition } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -201,23 +201,23 @@ export const EnableExtensionModal = ({
label="Select a schema to enable the extension for"
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={field.onChange}
disabled={!!defaultSchema}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a schema" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="custom">
+ <SelectTrigger>
+ <SelectValue placeholder="Select a schema" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="custom">
Create a new schema{' '}
<code className="text-code-inline">{extension.name}</code>
- </SelectItem_Shadcn_>
- <SelectSeparator_Shadcn_ />
+ </SelectItem>
+ <SelectSeparator />
{availableSchemas.map((schema) => {
return (
- <SelectItem_Shadcn_ key={schema.id} value={schema.name}>
+ <SelectItem key={schema.id} value={schema.name}>
{schema.name}
{schema.name === recommendedSchema ? (
<Badge className="ml-2" variant="success">
@@ -226,11 +226,11 @@ export const EnableExtensionModal = ({
) : !defaultSchema && schema.name === 'extensions' ? (
<Badge className="ml-2">Default</Badge>
) : null}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx b/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx
index fea6d6c6bd2..5bd889c6eaa 100644
--- a/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx
+++ b/apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx
@@ -18,11 +18,11 @@ import {
RadioGroupStacked,
RadioGroupStackedItem,
ScrollArea,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
Sheet,
SheetContent,
@@ -221,22 +221,22 @@ export const CreateFunction = ({
render={({ field }) => (
<FormItemLayout label="Return type" layout="horizontal">
{/* Form selects don't need form controls, otherwise the CSS gets weird */}
- <Select_Shadcn_ onValueChange={field.onChange} defaultValue={field.value}>
- <SelectTrigger_Shadcn_ className="col-span-8">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select onValueChange={field.onChange} defaultValue={field.value}>
+ <SelectTrigger className="col-span-8">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
<ScrollArea className="h-52">
{['void', 'record', 'trigger', 'integer', ...POSTGRES_DATA_TYPES].map(
(option) => (
- <SelectItem_Shadcn_ value={option} key={option}>
+ <SelectItem value={option} key={option}>
{option}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
)}
</ScrollArea>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
@@ -314,25 +314,22 @@ export const CreateFunction = ({
render={({ field }) => (
<FormItemLayout label="Behavior" layout="horizontal">
{/* Form selects don't need form controls, otherwise the CSS gets weird */}
- <Select_Shadcn_
- defaultValue={field.value}
- onValueChange={field.onChange}
- >
- <SelectTrigger_Shadcn_ className="col-span-8">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="IMMUTABLE" key="IMMUTABLE">
+ <Select defaultValue={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="col-span-8">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="IMMUTABLE" key="IMMUTABLE">
immutable
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="STABLE" key="STABLE">
+ </SelectItem>
+ <SelectItem value="STABLE" key="STABLE">
stable
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="VOLATILE" key="VOLATILE">
+ </SelectItem>
+ <SelectItem value="VOLATILE" key="VOLATILE">
volatile
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
@@ -455,24 +452,24 @@ const FormFieldArgs = ({ readonly }: FormFieldConfigParamsProps) => {
<Input value={field.value} disabled readOnly className="h-auto" />
) : (
<>
- <Select_Shadcn_
+ <Select
disabled={readonly}
onValueChange={field.onChange}
defaultValue={field.value}
>
- <SelectTrigger_Shadcn_ className="h-[38px]">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger className="h-[38px]">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
<ScrollArea className="h-52">
{['integer', ...POSTGRES_DATA_TYPES].map((option) => (
- <SelectItem_Shadcn_ value={option} key={option}>
+ <SelectItem value={option} key={option}>
{option}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
</ScrollArea>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</>
)}
</FormControl>
@@ -541,18 +538,18 @@ const FormFieldLanguage = () => {
render={({ field }) => (
<FormItemLayout label="Language" layout="horizontal">
{/* Form selects don't need form controls, otherwise the CSS gets weird */}
- <Select_Shadcn_ onValueChange={field.onChange} defaultValue={field.value}>
- <SelectTrigger_Shadcn_ className="col-span-8">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select onValueChange={field.onChange} defaultValue={field.value}>
+ <SelectTrigger className="col-span-8">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{allowedLanguages.map((option) => (
- <SelectItem_Shadcn_ value={option} key={option}>
+ <SelectItem value={option} key={option}>
{option}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/Database/Hooks/FormContents.tsx b/apps/studio/components/interfaces/Database/Hooks/FormContents.tsx
index da52abcca51..6e3c0bb8743 100644
--- a/apps/studio/components/interfaces/Database/Hooks/FormContents.tsx
+++ b/apps/studio/components/interfaces/Database/Hooks/FormContents.tsx
@@ -12,11 +12,11 @@ import {
Label,
RadioGroupStacked,
RadioGroupStackedItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
SidePanel,
useWatch,
} from 'ui'
@@ -147,23 +147,23 @@ export const FormContents = ({ form, selectedHook }: FormContentsProps) => {
className="gap-1"
description="This is the table the trigger will watch for changes. You can only select 1 table for a trigger."
>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
+ <Select value={field.value} onValueChange={field.onChange}>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a table" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a table" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
+ <SelectContent>
{tables.map((table) => (
- <SelectItem_Shadcn_ key={table.id} value={table.id.toString()}>
+ <SelectItem key={table.id} value={table.id.toString()}>
<div className="flex items-center space-x-2">
<span className="text-foreground-light">{table.schema}</span>
<span className="text-foreground">{table.name}</span>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/Database/Hooks/HTTPRequestConfig.tsx b/apps/studio/components/interfaces/Database/Hooks/HTTPRequestConfig.tsx
index a719f99fffd..2ff55686dbf 100644
--- a/apps/studio/components/interfaces/Database/Hooks/HTTPRequestConfig.tsx
+++ b/apps/studio/components/interfaces/Database/Hooks/HTTPRequestConfig.tsx
@@ -6,11 +6,11 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
useWatch,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -55,17 +55,17 @@ export const HTTPRequestConfig = ({ form }: HTTPRequestConfigProps) => {
name="http_method"
render={({ field }) => (
<FormItemLayout label="Method" layout="vertical" className="gap-1">
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
+ <Select value={field.value} onValueChange={field.onChange}>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="GET">GET</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="POST">POST</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectContent>
+ <SelectItem value="GET">GET</SelectItem>
+ <SelectItem value="POST">POST</SelectItem>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
@@ -107,26 +107,26 @@ export const HTTPRequestConfig = ({ form }: HTTPRequestConfigProps) => {
layout="vertical"
className="gap-1"
>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
+ <Select value={field.value} onValueChange={field.onChange}>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select an edge function" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select an edge function" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
+ <SelectContent>
{edgeFunctions.map((fn) => {
const restUrl = selectedProject?.restUrl
const restUrlTld = restUrl ? new URL(restUrl).hostname.split('.').pop() : 'co'
const functionUrl = `https://${ref}.supabase.${restUrlTld}/functions/v1/${fn.slug}`
return (
- <SelectItem_Shadcn_ key={fn.id} value={functionUrl}>
+ <SelectItem key={fn.id} value={functionUrl}>
{fn.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx b/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx
index 4949ccf6738..68e89737b64 100644
--- a/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx
+++ b/apps/studio/components/interfaces/Database/Indexes/CreateIndexSidePanel.tsx
@@ -14,12 +14,12 @@ import {
Popover,
PopoverContent,
PopoverTrigger,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
SidePanel,
} from 'ui'
import { Admonition } from 'ui-patterns'
@@ -356,21 +356,19 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp
name="selected-index-type"
isReactForm={false}
>
- <Select_Shadcn_
+ <Select
disabled={isOrioleDb}
value={selectedIndexType}
onValueChange={setSelectedIndexType}
name="selected-index-type"
>
- <SelectTrigger_Shadcn_ size={'small'}>
- <SelectValue_Shadcn_ className="font-mono">
- {selectedIndexType}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger size={'small'}>
+ <SelectValue className="font-mono">{selectedIndexType}</SelectValue>
+ </SelectTrigger>
+ <SelectContent>
{INDEX_TYPES.map((index, i) => (
<Fragment key={index.name}>
- <SelectItem_Shadcn_ value={index.value}>
+ <SelectItem value={index.value}>
<div className="flex flex-col gap-0.5">
<span>{index.name}</span>
{index.description.split('\n').map((x, idx) => (
@@ -382,12 +380,12 @@ CREATE INDEX ON "${selectedSchema}"."${selectedEntity}" USING ${selectedIndexTyp
</span>
))}
</div>
- </SelectItem_Shadcn_>
- {i < INDEX_TYPES.length - 1 && <SelectSeparator_Shadcn_ />}
+ </SelectItem>
+ {i < INDEX_TYPES.length - 1 && <SelectSeparator />}
</Fragment>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
{isOrioleDb && (
<Admonition
diff --git a/apps/studio/components/interfaces/Database/Privileges/PrivilegesHead.tsx b/apps/studio/components/interfaces/Database/Privileges/PrivilegesHead.tsx
index e2d5113f283..19f3f486416 100644
--- a/apps/studio/components/interfaces/Database/Privileges/PrivilegesHead.tsx
+++ b/apps/studio/components/interfaces/Database/Privileges/PrivilegesHead.tsx
@@ -1,11 +1,11 @@
import {
Button,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import SchemaSelector from '@/components/ui/SchemaSelector'
@@ -87,20 +87,20 @@ const RolesSelect = ({
onChangeRole: (role: string) => void
}) => {
return (
- <Select_Shadcn_ value={selectedRole} onValueChange={onChangeRole}>
- <SelectTrigger_Shadcn_ size="tiny" className="w-40">
- <SelectValue_Shadcn_ placeholder="Select a role" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <Select value={selectedRole} onValueChange={onChangeRole}>
+ <SelectTrigger size="tiny" className="w-40">
+ <SelectValue placeholder="Select a role" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{roles.map((role) => (
- <SelectItem_Shadcn_ key={role} value={role} className="text-xs">
+ <SelectItem key={role} value={role} className="text-xs">
<span className="text-foreground-light mr-1">role</span> {role}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)
}
@@ -116,25 +116,25 @@ const TablesSelect = ({
onChangeTable: (table: string) => void
}) => {
return (
- <Select_Shadcn_ value={selectedTable?.name} onValueChange={onChangeTable}>
- <SelectTrigger_Shadcn_ size="tiny" className="w-44">
- <SelectValue_Shadcn_ placeholder="Select a table" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <Select value={selectedTable?.name} onValueChange={onChangeTable}>
+ <SelectTrigger size="tiny" className="w-44">
+ <SelectValue placeholder="Select a table" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{tables.length === 0 ? (
<div className="text-xs text-foreground-light p-2">
No tables available in this schema
</div>
) : null}
{tables.map((table) => (
- <SelectItem_Shadcn_ key={table} value={table} className="text-xs">
+ <SelectItem key={table} value={table} className="text-xs">
<span className="text-foreground-light mr-1">table</span> {table}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)
}
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
index f50f37b8dc7..4cf84de138d 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
@@ -12,10 +12,10 @@ import {
InputGroup,
InputGroupAddon,
InputGroupText,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -168,25 +168,23 @@ export const AdvancedSettings = ({
description="Behavior when the replication slot is invalidated"
>
<FormControl>
- <Select_Shadcn_ value={field.value ?? 'error'} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="capitalize">
- {field.value ?? 'error'}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="error" className="[&>span]:top-2.5">
+ <Select value={field.value ?? 'error'} onValueChange={field.onChange}>
+ <SelectTrigger className="capitalize">{field.value ?? 'error'}</SelectTrigger>
+ <SelectContent>
+ <SelectItem value="error" className="[&>span]:top-2.5">
<p>Error</p>
<p className="text-foreground-lighter">
Blocks startup for manual recovery
</p>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="recreate" className="[&>span]:top-2.5">
+ </SelectItem>
+ <SelectItem value="recreate" className="[&>span]:top-2.5">
<p>Recreate</p>
<p className="text-foreground-lighter">
Rebuilds the slot and restarts replication from scratch
</p>
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx
index 9c82d349cfd..62fe93a1913 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx
@@ -8,12 +8,12 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
TextArea,
WarningIcon,
} from 'ui'
@@ -279,13 +279,13 @@ export const DuckLakeFields = ({ form }: { form: UseFormReturn<DestinationPanelS
description="Choose `path` for MinIO/Supabase-style endpoints or `vhost` for AWS-style virtual host addressing"
>
<FormControl>
- <Select_Shadcn_ value={field.value ?? 'path'} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>{field.value ?? 'path'}</SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="path">path</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="vhost">vhost</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={field.value ?? 'path'} onValueChange={field.onChange}>
+ <SelectTrigger>{field.value ?? 'path'}</SelectTrigger>
+ <SelectContent>
+ <SelectItem value="path">path</SelectItem>
+ <SelectItem value="vhost">vhost</SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -301,18 +301,16 @@ export const DuckLakeFields = ({ form }: { form: UseFormReturn<DestinationPanelS
description="Whether to use SSL when connecting to the S3-compatible endpoint"
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value === false ? 'false' : 'true'}
onValueChange={(value) => field.onChange(value === 'true')}
>
- <SelectTrigger_Shadcn_>
- {field.value === false ? 'false' : 'true'}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="true">true</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="false">false</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectTrigger>{field.value === false ? 'false' : 'true'}</SelectTrigger>
+ <SelectContent>
+ <SelectItem value="true">true</SelectItem>
+ <SelectItem value="false">false</SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -460,7 +458,7 @@ export const AnalyticsBucketFields = ({
</Button>
) : (
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={(value) => {
if (value === 'new-bucket') {
@@ -473,29 +471,25 @@ export const AnalyticsBucketFields = ({
}
}}
>
- <SelectTrigger_Shadcn_>
- {field.value || 'Select a bucket'}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger>{field.value || 'Select a bucket'}</SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{analyticsBuckets.length === 0 ? (
- <SelectItem_Shadcn_ value="__no_buckets__" disabled>
+ <SelectItem value="__no_buckets__" disabled>
No buckets available
- </SelectItem_Shadcn_>
+ </SelectItem>
) : (
analyticsBuckets.map((bucket) => (
- <SelectItem_Shadcn_ key={bucket.name} value={bucket.name}>
+ <SelectItem key={bucket.name} value={bucket.name}>
{bucket.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
))
)}
- <SelectSeparator_Shadcn_ />
- <SelectItem_Shadcn_ value="new-bucket">
- Create a new bucket
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectSeparator />
+ <SelectItem value="new-bucket">Create a new bucket</SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
)}
</FormItemLayout>
@@ -533,7 +527,7 @@ export const AnalyticsBucketFields = ({
</Button>
) : (
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={(value) => {
setIsFormInteracting(true)
@@ -541,33 +535,33 @@ export const AnalyticsBucketFields = ({
}}
disabled={!canSelectNamespace}
>
- <SelectTrigger_Shadcn_>
+ <SelectTrigger>
{!canSelectNamespace
? 'Select a warehouse first'
: field.value === CREATE_NEW_NAMESPACE
? 'Create a new namespace'
: field.value || 'Select a namespace'}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{namespaces.length === 0 ? (
- <SelectItem_Shadcn_ value="__no_namespaces__" disabled>
+ <SelectItem value="__no_namespaces__" disabled>
No namespaces available
- </SelectItem_Shadcn_>
+ </SelectItem>
) : (
namespaces.map((namespace) => (
- <SelectItem_Shadcn_ key={namespace} value={namespace}>
+ <SelectItem key={namespace} value={namespace}>
{namespace}
- </SelectItem_Shadcn_>
+ </SelectItem>
))
)}
- <SelectSeparator_Shadcn_ />
- <SelectItem_Shadcn_ key={CREATE_NEW_NAMESPACE} value={CREATE_NEW_NAMESPACE}>
+ <SelectSeparator />
+ <SelectItem key={CREATE_NEW_NAMESPACE} value={CREATE_NEW_NAMESPACE}>
Create a new namespace
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
)}
</FormItemLayout>
@@ -687,29 +681,29 @@ export const AnalyticsBucketFields = ({
</Button>
) : (
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
{field.value === CREATE_NEW_KEY
? 'Create a new key'
: (field.value ?? '').length === 0
? 'Select an access key ID'
: field.value}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{s3Keys.map((key) => (
- <SelectItem_Shadcn_ key={key.id} value={key.access_key}>
+ <SelectItem key={key.id} value={key.access_key}>
{key.access_key}
<p className="text-foreground-lighter">{key.description}</p>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- <SelectSeparator_Shadcn_ />
- <SelectItem_Shadcn_ key={CREATE_NEW_KEY} value={CREATE_NEW_KEY}>
+ <SelectSeparator />
+ <SelectItem key={CREATE_NEW_KEY} value={CREATE_NEW_KEY}>
Create a new key
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
)}
</FormItemLayout>
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/ReadReplicaForm/index.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/ReadReplicaForm/index.tsx
index cf56bea9007..44c549659f3 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/ReadReplicaForm/index.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/ReadReplicaForm/index.tsx
@@ -5,11 +5,11 @@ import { toast } from 'sonner'
import {
Button,
InfoIcon,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
SheetFooter,
SheetSection,
} from 'ui'
@@ -82,17 +82,17 @@ export const ReadReplicaForm = ({ onSuccess, onClose }: ReadReplicaFormProps) =>
label="Region"
labelOptional="Select a region to deploy your replica in"
>
- <Select_Shadcn_
+ <Select
value={selectedRegion}
onValueChange={setSelectedRegion}
disabled={!canDeployReplica}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a region" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a region" />
+ </SelectTrigger>
+ <SelectContent>
{availableRegions.map((region) => (
- <SelectItem_Shadcn_ key={region.key} value={region.key}>
+ <SelectItem key={region.key} value={region.key}>
<div className="flex gap-x-3 items-center">
<img
alt="region icon"
@@ -106,10 +106,10 @@ export const ReadReplicaForm = ({ onSuccess, onClose }: ReadReplicaFormProps) =>
</span>
</p>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
</SheetSection>
<SheetFooter className="justify-between!">
diff --git a/apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx b/apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx
index 6f17bc17770..63d9499303f 100644
--- a/apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx
+++ b/apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx
@@ -12,11 +12,11 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
Sheet,
SheetContent,
@@ -236,22 +236,22 @@ export const TriggerSheet = ({
description="Determines if a trigger should or should not fire. Can also be used to disable a trigger, but not delete it."
>
<FormControl>
- <Select_Shadcn_ defaultValue={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="col-span-8">
+ <Select defaultValue={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="col-span-8">
{
TRIGGER_ENABLED_MODES.find((option) => option.value === field.value)
?.label
}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
{TRIGGER_ENABLED_MODES.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
<p className="text-foreground">{option.label}</p>
<p className="text-foreground-lighter">{option.description}</p>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -271,7 +271,7 @@ export const TriggerSheet = ({
description="Trigger will watch for changes on this table"
>
<FormControl>
- <Select_Shadcn_
+ <Select
defaultValue={field.value}
onValueChange={(val) => {
// mark table ID as dirty to trigger validation
@@ -283,18 +283,18 @@ export const TriggerSheet = ({
}
}}
>
- <SelectTrigger_Shadcn_ className="col-span-8">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger className="col-span-8">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{tables.map((table) => (
- <SelectItem_Shadcn_ key={table.id} value={table.id.toString()}>
+ <SelectItem key={table.id} value={table.id.toString()}>
<span className="text-foreground-light">{table.schema}.</span>
<span className="text-foreground">{table.name}</span>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -354,19 +354,19 @@ export const TriggerSheet = ({
description="Determines when your trigger fires"
>
<FormControl>
- <Select_Shadcn_ defaultValue={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="col-span-8">
+ <Select defaultValue={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="col-span-8">
{TRIGGER_TYPES.find((option) => option.value === field.value)?.label}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
{TRIGGER_TYPES.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
<p className="text-foreground">{option.label}</p>
<p className="text-foreground-lighter">{option.description}</p>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -383,22 +383,22 @@ export const TriggerSheet = ({
description="Identifies whether the trigger fires once for each processed row or once for each statement"
>
<FormControl>
- <Select_Shadcn_ defaultValue={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="col-span-8">
+ <Select defaultValue={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="col-span-8">
{
TRIGGER_ORIENTATIONS.find((option) => option.value === field.value)
?.label
}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
{TRIGGER_ORIENTATIONS.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
<p className="text-foreground">{option.label}</p>
<p className="text-foreground-lighter">{option.description}</p>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx b/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx
index fc376c2a43e..dbd30360c2b 100644
--- a/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx
+++ b/apps/studio/components/interfaces/DiskManagement/fields/StorageTypeField.tsx
@@ -6,11 +6,11 @@ import {
cn,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Skeleton,
Tooltip,
TooltipContent,
@@ -46,7 +46,7 @@ export function StorageTypeField({ form, disableInput }: StorageTypeFieldProps)
control={control}
render={({ field }) => (
<FormItemLayout layout="horizontal" label="Storage type">
- <Select_Shadcn_
+ <Select
{...field}
onValueChange={async (e: DiskType) => {
field.onChange(e)
@@ -91,19 +91,19 @@ export function StorageTypeField({ form, disableInput }: StorageTypeFieldProps)
/>
) : (
<FormControl>
- <SelectTrigger_Shadcn_ className="h-14 max-w-[420px]">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger className="h-14 max-w-[420px]">
+ <SelectValue />
+ </SelectTrigger>
</FormControl>
)}
- <SelectContent_Shadcn_>
+ <SelectContent>
<>
{DISK_TYPE_OPTIONS.map((item) => {
const disableIo2 = item.type === 'io2' && !isIo2Supported
return (
<Tooltip key={item.type}>
<TooltipTrigger asChild>
- <SelectItem_Shadcn_
+ <SelectItem
key={item.type}
disabled={disableInput || disableIo2}
value={item.type}
@@ -118,7 +118,7 @@ export function StorageTypeField({ form, disableInput }: StorageTypeFieldProps)
</div>
<p className="text-foreground-light">{item.description}</p>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
</TooltipTrigger>
{disableIo2 && (
<TooltipContent side="right" className="w-64">
@@ -134,8 +134,8 @@ export function StorageTypeField({ form, disableInput }: StorageTypeFieldProps)
)
})}
</>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
{error && <FormMessage type="error" message={error.message} />}
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionTesterSheet.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionTesterSheet.tsx
index d94f82a8afe..7f91e044fa9 100644
--- a/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionTesterSheet.tsx
+++ b/apps/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionTesterSheet.tsx
@@ -15,11 +15,11 @@ import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
- Select_Shadcn_ as Select,
- SelectContent_Shadcn_ as SelectContent,
- SelectItem_Shadcn_ as SelectItem,
- SelectTrigger_Shadcn_ as SelectTrigger,
- SelectValue_Shadcn_ as SelectValue,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Sheet,
SheetContent,
SheetFooter,
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.CleanupNotice.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.CleanupNotice.tsx
index bbdd7ecdf38..ba7a6a30ffe 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.CleanupNotice.tsx
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.CleanupNotice.tsx
@@ -10,11 +10,11 @@ import {
DialogTitle,
DialogTrigger,
Progress,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -139,22 +139,22 @@ const CronJobRunDetailsOverflowDialog = ({
) : (
<div className="flex flex-col gap-2 sm:flex-row sm:items-center">
<div className="sm:w-64">
- <Select_Shadcn_
+ <Select
disabled={isBusy}
value={cleanupInterval}
onValueChange={setCleanupInterval}
>
- <SelectTrigger_Shadcn_ className="w-full">
- <SelectValue_Shadcn_ placeholder="Select an interval" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger className="w-full">
+ <SelectValue placeholder="Select an interval" />
+ </SelectTrigger>
+ <SelectContent>
{CLEANUP_INTERVALS.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
<Button
type="default"
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx
index 3c11ea3e4bc..774959c9006 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx
@@ -25,11 +25,11 @@ import {
PopoverContent,
PopoverTrigger,
ScrollArea,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
SheetSection,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -83,17 +83,17 @@ export const EdgeFunctionSection = ({ form }: HTTPRequestFieldsProps) => {
render={({ field }) => (
<FormItem>
<FormLabel>Method</FormLabel>
- <Select_Shadcn_ onValueChange={field.onChange} value={field.value}>
+ <Select onValueChange={field.onChange} value={field.value}>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a method for the API call" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a method for the API call" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="GET">GET</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="POST">POST</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectContent>
+ <SelectItem value="GET">GET</SelectItem>
+ <SelectItem value="POST">POST</SelectItem>
+ </SelectContent>
+ </Select>
<FormMessage />
</FormItem>
)}
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/HttpRequestSection.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/HttpRequestSection.tsx
index 44d8665f5a6..788872911bb 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/HttpRequestSection.tsx
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/HttpRequestSection.tsx
@@ -10,11 +10,11 @@ import {
InputGroupAddon,
InputGroupInput,
InputGroupText,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
SheetSection,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -34,17 +34,17 @@ export const HttpRequestSection = ({ form }: HttpRequestSectionProps) => {
render={({ field }) => (
<FormItem>
<FormLabel>Method</FormLabel>
- <Select_Shadcn_ onValueChange={field.onChange} value={field.value}>
+ <Select onValueChange={field.onChange} value={field.value}>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a method for the HTTP request" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a method for the HTTP request" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="GET">GET</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="POST">POST</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectContent>
+ <SelectItem value="GET">GET</SelectItem>
+ <SelectItem value="POST">POST</SelectItem>
+ </SelectContent>
+ </Select>
<FormMessage />
</FormItem>
)}
diff --git a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/InstallIntegrationSheet/AdvancedSettings.tsx b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/InstallIntegrationSheet/AdvancedSettings.tsx
index 8bed19901e5..e94db75c218 100644
--- a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/InstallIntegrationSheet/AdvancedSettings.tsx
+++ b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/InstallIntegrationSheet/AdvancedSettings.tsx
@@ -5,12 +5,12 @@ import {
AccordionItem_Shadcn_,
AccordionTrigger_Shadcn_,
Badge,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
SheetSection,
} from 'ui'
import { Input } from 'ui-patterns/DataInputs/Input'
@@ -94,7 +94,7 @@ export const AdvancedSettings = ({
) : undefined
}
>
- <Select_Shadcn_
+ <Select
disabled={!!defaultSchema || !!ext?.installed_version}
value={schema}
onValueChange={(schema) =>
@@ -107,15 +107,15 @@ export const AdvancedSettings = ({
}))
}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a schema" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="custom">Create a new schema</SelectItem_Shadcn_>
- <SelectSeparator_Shadcn_ />
+ <SelectTrigger>
+ <SelectValue placeholder="Select a schema" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="custom">Create a new schema</SelectItem>
+ <SelectSeparator />
{availableSchemas.map((schema) => {
return (
- <SelectItem_Shadcn_ key={schema.id} value={schema.name}>
+ <SelectItem key={schema.id} value={schema.name}>
{schema.name}
{schema.name === recommendedSchema ? (
<Badge className="ml-2" variant="success">
@@ -124,18 +124,18 @@ export const AdvancedSettings = ({
) : schema.name === 'extensions' ? (
<Badge className="ml-2">Default</Badge>
) : null}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
{defaultSchema &&
!availableSchemas.some((schema) => schema.name === defaultSchema) ? (
- <SelectItem_Shadcn_ key={defaultSchema} value={defaultSchema}>
+ <SelectItem key={defaultSchema} value={defaultSchema}>
{defaultSchema}
<Badge className="ml-2">Default</Badge>
- </SelectItem_Shadcn_>
+ </SelectItem>
) : null}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
{schema === 'custom' && (
<FormItemLayout
diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx
index ad67c02f479..3b3c47e5436 100644
--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx
+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/SecretsManagement.tsx
@@ -9,11 +9,11 @@ import {
Button,
cn,
LoadingLine,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { Input } from 'ui-patterns/DataInputs/Input'
@@ -105,21 +105,21 @@ export const SecretsManagement = () => {
]}
/>
- <Select_Shadcn_ value={selectedSort} onValueChange={(v) => setSelectedSort(v as any)}>
- <SelectTrigger_Shadcn_ size="tiny" className="w-44">
- <SelectValue_Shadcn_ asChild>
+ <Select value={selectedSort} onValueChange={(v) => setSelectedSort(v as any)}>
+ <SelectTrigger size="tiny" className="w-44">
+ <SelectValue asChild>
<>Sort by {selectedSort}</>
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="updated_at" className="text-xs">
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="updated_at" className="text-xs">
Updated at
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="name" className="text-xs">
+ </SelectItem>
+ <SelectItem value="name" className="text-xs">
Name
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</div>
<div className="flex items-center gap-x-2">
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx
index e415d01354e..12afee25856 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTableEditor.tsx
@@ -27,12 +27,12 @@ import {
PopoverContent,
PopoverTrigger,
ScrollArea,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
SidePanel,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -193,19 +193,19 @@ const Option = ({ option, control }: { option: TableOption; control: Control<Fie
render={({ field }) => (
<FormItemLayout layout="vertical" label={option.label} name={option.name}>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select an option" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectSeparator_Shadcn_ />
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue placeholder="Select an option" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectSeparator />
{option.options.map((subOption) => (
- <SelectItem_Shadcn_ key={subOption.value} value={subOption.value}>
+ <SelectItem key={subOption.value} value={subOption.value}>
{subOption.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -346,7 +346,7 @@ const TableForm = ({
render={({ field }) => (
<FormItemLayout layout="vertical" label="Select a schema for the foreign table">
<FormControl>
- <Select_Shadcn_
+ <Select
name="schema"
value={field.value}
onValueChange={(schema) => {
@@ -354,21 +354,21 @@ const TableForm = ({
form.resetField('schema_name')
}}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select an option" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="custom">Create a new schema</SelectItem_Shadcn_>
- <SelectSeparator_Shadcn_ />
+ <SelectTrigger>
+ <SelectValue placeholder="Select an option" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="custom">Create a new schema</SelectItem>
+ <SelectSeparator />
{(schemas ?? [])?.map((schema) => {
return (
- <SelectItem_Shadcn_ key={schema.name} value={schema.name}>
+ <SelectItem key={schema.name} value={schema.name}>
{schema.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.tsx b/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.tsx
index 8e7e6b002b2..11bc74966b9 100644
--- a/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.tsx
+++ b/apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/create-key-dialog.tsx
@@ -11,11 +11,11 @@ import {
DialogSectionSeparator,
DialogTitle,
Label,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Textarea,
} from 'ui'
@@ -165,25 +165,25 @@ export const CreateKeyDialog = ({
<DialogSection className="flex flex-col gap-4">
<div className="flex flex-col gap-4">
<Label htmlFor="algorithm">Choose signing algorithm:</Label>
- <Select_Shadcn_
+ <Select
name="algorithm"
value={newKeyAlgorithm}
onValueChange={(value: JWTAlgorithm) => setNewKeyAlgorithm(value)}
>
- <SelectTrigger_Shadcn_ id="algorithm">
- <SelectValue_Shadcn_ placeholder="Select algorithm" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="ES256">
+ <SelectTrigger id="algorithm">
+ <SelectValue placeholder="Select algorithm" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="ES256">
<span>ES256 (ECC)</span>
<Badge variant="success" className="ml-2">
Recommended
</Badge>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="RS256">RS256 (RSA)</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="HS256">HS256 (Shared Secret)</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ <SelectItem value="RS256">RS256 (RSA)</SelectItem>
+ <SelectItem value="HS256">HS256 (Shared Secret)</SelectItem>
+ </SelectContent>
+ </Select>
</div>
<div className="flex flex-col gap-4">
<Label htmlFor="byok" className="flex items-center gap-x-2">
diff --git a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx
index 37630e40738..f7143e9dd19 100644
--- a/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx
+++ b/apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx
@@ -15,13 +15,13 @@ import {
Input,
RadioGroupCard,
RadioGroupCardItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectLabel_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectTrigger,
+ SelectValue,
Sheet,
SheetContent,
SheetFooter,
@@ -470,15 +470,15 @@ export function LogDrainDestinationSheetForm({
label="Type"
description={LOG_DRAIN_TYPES.find((t) => t.value === type)?.description || ''}
>
- <Select_Shadcn_
+ <Select
defaultValue={defaultType}
value={form.getValues('type')}
onValueChange={(v: LogDrainType) => form.setValue('type', v)}
>
- <SelectTrigger_Shadcn_>
+ <SelectTrigger>
{LOG_DRAIN_TYPES.find((t) => t.value === type)?.name}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
{LOG_DRAIN_TYPES.filter((t) => {
if (t.value === 'sentry') return sentryEnabled
if (t.value === 's3') return s3Enabled
@@ -488,17 +488,17 @@ export function LogDrainDestinationSheetForm({
if (t.value === 'syslog') return syslogEnabled
return true
}).map((type) => (
- <SelectItem_Shadcn_
+ <SelectItem
value={type.value}
key={type.value}
id={type.value}
className="text-left"
>
{type.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
</div>
@@ -604,21 +604,21 @@ export function LogDrainDestinationSheetForm({
}
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="col-span-3">
- <SelectValue_Shadcn_ placeholder="Select a region" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Region</SelectLabel_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="col-span-3">
+ <SelectValue placeholder="Select a region" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectLabel>Region</SelectLabel>
{DATADOG_REGIONS.map((reg) => (
- <SelectItem_Shadcn_ key={reg.value} value={reg.value}>
+ <SelectItem key={reg.value} value={reg.value}>
{reg.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -759,21 +759,21 @@ export function LogDrainDestinationSheetForm({
description="Only HTTP with Protocol Buffers is currently supported"
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="col-span-3">
- <SelectValue_Shadcn_ placeholder="Select protocol" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Protocol</SelectLabel_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="col-span-3">
+ <SelectValue placeholder="Select protocol" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectLabel>Protocol</SelectLabel>
{OTLP_PROTOCOLS.map((proto) => (
- <SelectItem_Shadcn_ key={proto.value} value={proto.value}>
+ <SelectItem key={proto.value} value={proto.value}>
{proto.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -816,21 +816,21 @@ export function LogDrainDestinationSheetForm({
}
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="col-span-3">
- <SelectValue_Shadcn_ placeholder="Select a region" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Region</SelectLabel_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="col-span-3">
+ <SelectValue placeholder="Select a region" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectLabel>Region</SelectLabel>
{LAST9_REGIONS.map((reg) => (
- <SelectItem_Shadcn_ key={reg.value} value={reg.value}>
+ <SelectItem key={reg.value} value={reg.value}>
{reg.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PaymentMethodSelection.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PaymentMethodSelection.tsx
index 1d733e470af..f6e2ff0b60f 100644
--- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PaymentMethodSelection.tsx
+++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PaymentMethodSelection.tsx
@@ -14,14 +14,7 @@ import {
useState,
} from 'react'
import { toast } from 'sonner'
-import {
- Checkbox,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
+import { Checkbox, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader'
@@ -305,7 +298,7 @@ const PaymentMethodSelection = forwardRef(function PaymentMethodSelection(
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
+ <Select
value={selectedPaymentMethod}
onValueChange={(value) => {
if (value === 'new') {
@@ -315,14 +308,14 @@ const PaymentMethodSelection = forwardRef(function PaymentMethodSelection(
onSelectPaymentMethod(value)
}}
>
- <SelectTrigger_Shadcn_ id="payment-method">
- <SelectValue_Shadcn_ className="flex gap-2" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger id="payment-method">
+ <SelectValue className="flex gap-2" />
+ </SelectTrigger>
+ <SelectContent>
{paymentMethods?.data.map((method) => {
const label = `•••• •••• •••• ${method.card?.last4}`
return (
- <SelectItem_Shadcn_ key={method.id} value={method.id}>
+ <SelectItem key={method.id} value={method.id}>
<div className="flex gap-2">
<img
alt="Credit Card Brand"
@@ -333,19 +326,19 @@ const PaymentMethodSelection = forwardRef(function PaymentMethodSelection(
/>
{label}
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- <SelectItem_Shadcn_ value="new">
+ <SelectItem value="new">
<div className="flex gap-2">
<Plus size={16} />
<p className="transition text-foreground-light group-hover:text-foreground">
Add new payment method
</p>
</div>
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</FormItemLayout>
) : null}
diff --git a/apps/studio/components/interfaces/Organization/CloudMarketplace/NewAwsMarketplaceOrgForm.tsx b/apps/studio/components/interfaces/Organization/CloudMarketplace/NewAwsMarketplaceOrgForm.tsx
index 626d7552238..d68c9275e35 100644
--- a/apps/studio/components/interfaces/Organization/CloudMarketplace/NewAwsMarketplaceOrgForm.tsx
+++ b/apps/studio/components/interfaces/Organization/CloudMarketplace/NewAwsMarketplaceOrgForm.tsx
@@ -6,11 +6,11 @@ import {
FormField,
Input,
Label,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { z } from 'zod'
@@ -91,18 +91,18 @@ const NewAwsMarketplaceOrgForm = ({ onSubmit }: Props) => {
<FormItemLayout label="Type" layout="horizontal">
<FormControl>
<>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{Object.entries(ORG_KIND_TYPES).map(([k, v]) => (
- <SelectItem_Shadcn_ key={k} value={k}>
+ <SelectItem key={k} value={k}>
{v}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
<div className="mt-1">
<Label
htmlFor="kind"
@@ -124,18 +124,18 @@ const NewAwsMarketplaceOrgForm = ({ onSubmit }: Props) => {
<FormItemLayout label="Company size" layout="horizontal">
<FormControl>
<>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="How many people are in your company?" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue placeholder="How many people are in your company?" />
+ </SelectTrigger>
+ <SelectContent>
{Object.entries(ORG_SIZE_TYPES).map(([k, v]) => (
- <SelectItem_Shadcn_ key={k} value={k}>
+ <SelectItem key={k} value={k}>
{v}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
<div className="mt-1">
<Label
htmlFor="size"
diff --git a/apps/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsx b/apps/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsx
index 3fba92ee488..451ccbfa0af 100644
--- a/apps/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsx
+++ b/apps/studio/components/interfaces/Organization/NewOrg/NewOrgForm.tsx
@@ -18,11 +18,11 @@ import {
FormControl,
FormField,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -457,19 +457,19 @@ export const NewOrgForm = ({
description="What best describes your organization?"
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="w-full">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="w-full">
+ <SelectValue />
+ </SelectTrigger>
- <SelectContent_Shadcn_>
+ <SelectContent>
{Object.entries(ORG_KIND_TYPES).map(([k, v]) => (
- <SelectItem_Shadcn_ key={k} value={k}>
+ <SelectItem key={k} value={k}>
{v}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -488,19 +488,19 @@ export const NewOrgForm = ({
description="How many people are in your company?"
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="w-full">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="w-full">
+ <SelectValue />
+ </SelectTrigger>
- <SelectContent_Shadcn_>
+ <SelectContent>
{Object.entries(ORG_SIZE_TYPES).map(([k, v]) => (
- <SelectItem_Shadcn_ key={k} value={k}>
+ <SelectItem key={k} value={k}>
{v}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -525,25 +525,25 @@ export const NewOrgForm = ({
}
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={(value) => {
field.onChange(value)
onPlanSelected(value)
}}
>
- <SelectTrigger_Shadcn_ className="w-full">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger className="w-full">
+ <SelectValue />
+ </SelectTrigger>
- <SelectContent_Shadcn_>
+ <SelectContent>
{Object.entries(PRICING_TIER_LABELS_ORG).map(([k, v]) => (
- <SelectItem_Shadcn_ key={k} value={k} translate="no">
+ <SelectItem key={k} value={k} translate="no">
{v}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Organization/SSO/JoinOrganizationOnSignup.tsx b/apps/studio/components/interfaces/Organization/SSO/JoinOrganizationOnSignup.tsx
index fa53d038565..a862eba674d 100644
--- a/apps/studio/components/interfaces/Organization/SSO/JoinOrganizationOnSignup.tsx
+++ b/apps/studio/components/interfaces/Organization/SSO/JoinOrganizationOnSignup.tsx
@@ -2,12 +2,12 @@ import { useForm } from 'react-hook-form'
import {
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -50,19 +50,19 @@ export const JoinOrganizationOnSignup = ({
className="justify-between"
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={(val) => field.onChange(val)}>
- <SelectTrigger_Shadcn_ className="w-52">
- <SelectValue_Shadcn_ placeholder="Select a role" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="Owner">Owner</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="Administrator">Administrator</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="Developer">Developer</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="Read-only">Read-only</SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={field.value} onValueChange={(val) => field.onChange(val)}>
+ <SelectTrigger className="w-52">
+ <SelectValue placeholder="Select a role" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="Owner">Owner</SelectItem>
+ <SelectItem value="Administrator">Administrator</SelectItem>
+ <SelectItem value="Developer">Developer</SelectItem>
+ <SelectItem value="Read-only">Read-only</SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx b/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx
index f0a74b255d0..cb74bb90a7c 100644
--- a/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx
+++ b/apps/studio/components/interfaces/Organization/TeamSettings/InviteMemberButton.tsx
@@ -19,12 +19,12 @@ import {
Form,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { Admonition } from 'ui-patterns/admonition'
@@ -302,13 +302,13 @@ export const InviteMemberButton = () => {
render={({ field }) => (
<FormItemLayout label="Role">
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="text-sm capitalize">
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="text-sm capitalize">
{orgScopedRoles.find((role) => role.id === Number(field.value))?.name ??
'Unknown'}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{orgScopedRoles.map((role) => {
const canAssignRole = rolesAddable.includes(role.id)
const isOwnerRole = role.name === 'Owner'
@@ -321,7 +321,7 @@ export const InviteMemberButton = () => {
: undefined
return (
- <SelectItem_Shadcn_
+ <SelectItem
key={role.id}
value={role.id.toString()}
className="text-sm"
@@ -335,12 +335,12 @@ export const InviteMemberButton = () => {
</span>
)}
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -355,24 +355,20 @@ export const InviteMemberButton = () => {
description="Choose how the invitee should authenticate"
>
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Automatic (based on your account)" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="auto">
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue placeholder="Automatic (based on your account)" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="auto">
Automatic (based on your account)
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="sso">
- Require SSO authentication
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="non-sso">
- Email/password authentication
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ <SelectItem value="sso">Require SSO authentication</SelectItem>
+ <SelectItem value="non-sso">Email/password authentication</SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Organization/TeamSettings/UpdateRolesPanel/UpdateRolesPanel.tsx b/apps/studio/components/interfaces/Organization/TeamSettings/UpdateRolesPanel/UpdateRolesPanel.tsx
index 0242574451c..127157cd7a1 100644
--- a/apps/studio/components/interfaces/Organization/TeamSettings/UpdateRolesPanel/UpdateRolesPanel.tsx
+++ b/apps/studio/components/interfaces/Organization/TeamSettings/UpdateRolesPanel/UpdateRolesPanel.tsx
@@ -11,11 +11,11 @@ import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
Sheet,
SheetContent,
SheetFooter,
@@ -263,20 +263,20 @@ export const UpdateRolesPanel = ({ visible, member, onClose }: UpdateRolesPanelP
</TooltipContent>
</Tooltip>
) : (
- <Select_Shadcn_
+ <Select
value={(project?.baseRoleId ?? project.roleId).toString()}
onValueChange={(value) => onSelectRole(value, project)}
>
- <SelectTrigger_Shadcn_
+ <SelectTrigger
className={cn(
' w-40',
role?.name === undefined && 'text-foreground-light'
)}
>
{role?.name ?? 'Please select a role'}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ align="end">
- <SelectGroup_Shadcn_>
+ </SelectTrigger>
+ <SelectContent align="end">
+ <SelectGroup>
{(orgScopedRoles ?? []).map((role) => {
const canAssignRole = rolesAddable.includes(role.id)
const isOwnerRole = role.name === 'Owner'
@@ -289,7 +289,7 @@ export const UpdateRolesPanel = ({ visible, member, onClose }: UpdateRolesPanelP
: undefined
return (
- <SelectItem_Shadcn_
+ <SelectItem
key={role.id}
value={role.id.toString()}
className="text-sm hover:bg-selection cursor-pointer"
@@ -303,12 +303,12 @@ export const UpdateRolesPanel = ({ visible, member, onClose }: UpdateRolesPanelP
</span>
)}
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)}
{!isApplyingRoleToAllProjects && (
diff --git a/apps/studio/components/interfaces/ProjectCreation/CloudProviderSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/CloudProviderSelector.tsx
index bab18391655..845d28c95b2 100644
--- a/apps/studio/components/interfaces/ProjectCreation/CloudProviderSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/CloudProviderSelector.tsx
@@ -2,12 +2,12 @@ import { UseFormReturn } from 'react-hook-form'
import {
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
useWatch,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -42,18 +42,18 @@ export const CloudProviderSelector = ({ form }: CloudProviderSelectorProps) => {
)
}
>
- <Select_Shadcn_
+ <Select
onValueChange={(value) => field.onChange(value)}
defaultValue={field.value}
value={field.value}
>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a cloud provider" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a cloud provider" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectContent>
+ <SelectGroup>
{Object.values(PROVIDERS)
.filter((provider) => validCloudProviders?.includes(provider.id) ?? true)
.map((providerObj) => {
@@ -61,14 +61,14 @@ export const CloudProviderSelector = ({ form }: CloudProviderSelectorProps) => {
const value = providerObj['id']
const isDisabled = highAvailability && !HA_SUPPORTED_PROVIDERS.includes(value)
return (
- <SelectItem_Shadcn_ key={value} value={value} disabled={isDisabled}>
+ <SelectItem key={value} value={value} disabled={isDisabled}>
{label}
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx
index 00acbb914ea..036bf2a6633 100644
--- a/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/ComputeSizeSelector.tsx
@@ -2,12 +2,12 @@ import { UseFormReturn } from 'react-hook-form'
import { CloudProvider } from 'shared-data'
import {
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { ComputeBadge } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -50,12 +50,12 @@ export const ComputeSizeSelector = ({ form }: ComputeSizeSelectorProps) => {
</>
}
>
- <Select_Shadcn_ value={field.value} onValueChange={(value) => field.onChange(value)}>
- <SelectTrigger_Shadcn_ className="[&>span>div>div>[data-field=instance-details]]:hidden">
- <SelectValue_Shadcn_ placeholder="Select a compute size" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <Select value={field.value} onValueChange={(value) => field.onChange(value)}>
+ <SelectTrigger className="[&>span>div>div>[data-field=instance-details]]:hidden">
+ <SelectValue placeholder="Select a compute size" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{sizes
.filter((option) =>
instanceSizeSpecs[option].cloud_providers.includes(
@@ -64,7 +64,7 @@ export const ComputeSizeSelector = ({ form }: ComputeSizeSelectorProps) => {
)
.map((option) => {
return (
- <SelectItem_Shadcn_ key={option} value={option}>
+ <SelectItem key={option} value={option}>
<div className="flex flex-row gap-4 items-center">
<div className="w-14 flex items-center">
<ComputeBadge infraComputeSize={option} />
@@ -89,17 +89,17 @@ export const ComputeSizeSelector = ({ form }: ComputeSizeSelectorProps) => {
</p>
</div>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- <SelectItem_Shadcn_ key={'disabled'} value={'disabled'} disabled>
+ <SelectItem key={'disabled'} value={'disabled'} disabled>
<div className="flex items-center justify-center w-full">
<span>Larger instance sizes available after creation</span>
</div>
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/ProjectCreation/OrganizationSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/OrganizationSelector.tsx
index 77de7ec585f..4175d6df8a2 100644
--- a/apps/studio/components/interfaces/ProjectCreation/OrganizationSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/OrganizationSelector.tsx
@@ -8,12 +8,12 @@ import {
Badge,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -56,7 +56,7 @@ export const OrganizationSelector = ({ form }: OrganizationSelectorProps) => {
render={({ field }) => (
<FormItemLayout label="Organization" layout="horizontal">
{(organizations?.length ?? 0) > 0 && (
- <Select_Shadcn_
+ <Select
onValueChange={(slug) => {
field.onChange(slug)
router.push(`/new/${slug}`)
@@ -65,23 +65,23 @@ export const OrganizationSelector = ({ form }: OrganizationSelectorProps) => {
defaultValue={field.value}
>
<FormControl>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select an organization" />
- </SelectTrigger_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select an organization" />
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectContent>
+ <SelectGroup>
{organizations?.map((x) => (
- <SelectItem_Shadcn_ key={x.id} value={x.slug}>
+ <SelectItem key={x.id} value={x.slug}>
<div className="flex justify-between items-center gap-2 w-full">
<span>{x.name}</span>
<Badge className="mt-px">{x.plan.name}</Badge>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)}
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/ProjectCreation/PostgresVersionSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/PostgresVersionSelector.tsx
index c7f99a211c8..0812c472a68 100644
--- a/apps/studio/components/interfaces/ProjectCreation/PostgresVersionSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/PostgresVersionSelector.tsx
@@ -3,12 +3,12 @@ import { ControllerRenderProps, UseFormReturn } from 'react-hook-form'
import type { CloudProvider } from 'shared-data'
import {
Badge,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -103,7 +103,7 @@ export const PostgresVersionSelector = ({
return (
<FormItemLayout label={label} layout={layout}>
- <Select_Shadcn_
+ <Select
value={postgresVersionSelection}
onValueChange={field.onChange}
disabled={
@@ -112,17 +112,17 @@ export const PostgresVersionSelector = ({
(type === 'unpause' && isLoadingProjectUnpauseVersions)
}
>
- <SelectTrigger_Shadcn_ className="[&>:nth-child(1)]:w-full [&>:nth-child(1)]:flex [&>:nth-child(1)]:items-start">
- <SelectValue_Shadcn_ placeholder="Select a Postgres version for your project" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger className="[&>:nth-child(1)]:w-full [&>:nth-child(1)]:flex [&>:nth-child(1)]:items-start">
+ <SelectValue placeholder="Select a Postgres version for your project" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{availableVersions.map((value) => {
const postgresVersion = value.version
.split('supabase-postgres-')[1]
.replace('-orioledb', '')
return (
- <SelectItem_Shadcn_
+ <SelectItem
key={formatValue(value)}
value={formatValue(value)}
className="w-full [&>:nth-child(2)]:w-full"
@@ -138,12 +138,12 @@ export const PostgresVersionSelector = ({
)}
</div>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)
}
diff --git a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
index d846ef42247..d10212ebbba 100644
--- a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx
@@ -5,14 +5,14 @@ import {
Badge,
cn,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectLabel_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -166,13 +166,9 @@ export const RegionSelector = ({
</>
}
>
- <Select_Shadcn_
- value={field.value}
- onValueChange={field.onChange}
- disabled={isLoading}
- >
- <SelectTrigger_Shadcn_ className="[&>:nth-child(1)]:w-full [&>:nth-child(1)]:flex [&>:nth-child(1)]:items-start">
- <SelectValue_Shadcn_
+ <Select value={field.value} onValueChange={field.onChange} disabled={isLoading}>
+ <SelectTrigger className="[&>:nth-child(1)]:w-full [&>:nth-child(1)]:flex [&>:nth-child(1)]:items-start">
+ <SelectValue
placeholder={
isLoading
? 'Loading available regions...'
@@ -195,16 +191,16 @@ export const RegionSelector = ({
</span>
</div>
)}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
{smartRegionEnabled && (
<>
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>General regions</SelectLabel_Shadcn_>
+ <SelectGroup>
+ <SelectLabel>General regions</SelectLabel>
{smartRegions.map((value) => {
return (
- <SelectItem_Shadcn_
+ <SelectItem
key={value.code}
value={value.name}
className="w-full [&>:nth-child(2)]:w-full"
@@ -229,19 +225,19 @@ export const RegionSelector = ({
)}
</div>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectGroup_Shadcn_>
- <SelectSeparator_Shadcn_ />
+ </SelectGroup>
+ <SelectSeparator />
</>
)}
- <SelectGroup_Shadcn_>
- <SelectLabel_Shadcn_>Specific regions</SelectLabel_Shadcn_>
+ <SelectGroup>
+ <SelectLabel>Specific regions</SelectLabel>
{regionOptions.map((value) => {
return (
- <SelectItem_Shadcn_
+ <SelectItem
key={value.code}
value={value.name}
className={cn(
@@ -283,12 +279,12 @@ export const RegionSelector = ({
</Tooltip>
)}
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
{affectingIncidents.length > 0 && (
diff --git a/apps/studio/components/interfaces/Reports/ReportFilterBar.tsx b/apps/studio/components/interfaces/Reports/ReportFilterBar.tsx
index f51343fda5e..2cf6e9fd91f 100644
--- a/apps/studio/components/interfaces/Reports/ReportFilterBar.tsx
+++ b/apps/studio/components/interfaces/Reports/ReportFilterBar.tsx
@@ -13,12 +13,12 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -304,25 +304,25 @@ const ReportFilterBar = ({
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
+ <Select
value={addFilterValues.key}
onValueChange={(value: string) =>
setAddFilterValues((prev) => ({ ...prev, key: value }))
}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="---" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="---" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{filterKeys.map((key) => (
- <SelectItem_Shadcn_ key={key} value={key}>
+ <SelectItem key={key} value={key}>
{key}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
<FormItemLayout
isReactForm={false}
@@ -331,7 +331,7 @@ const ReportFilterBar = ({
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
+ <Select
value={addFilterValues.compare}
onValueChange={(value: string) =>
setAddFilterValues((prev) => ({
@@ -340,19 +340,19 @@ const ReportFilterBar = ({
}))
}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="---" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="---" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{['is', 'matches'].map((value) => (
- <SelectItem_Shadcn_ key={value} value={value}>
+ <SelectItem key={value} value={value}>
{value}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
<FormItemLayout
isReactForm={false}
diff --git a/apps/studio/components/interfaces/SQLEditor/UtilityPanel/ChartConfig.tsx b/apps/studio/components/interfaces/SQLEditor/UtilityPanel/ChartConfig.tsx
index cfbc1c76104..9e99e9d7ced 100644
--- a/apps/studio/components/interfaces/SQLEditor/UtilityPanel/ChartConfig.tsx
+++ b/apps/studio/components/interfaces/SQLEditor/UtilityPanel/ChartConfig.tsx
@@ -11,11 +11,11 @@ import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -228,44 +228,44 @@ export const ChartConfig = ({
<div>
<Label className="text-xs text-foreground-light">X Axis</Label>
- <Select_Shadcn_
+ <Select
value={config.xKey}
onValueChange={(value) => {
onConfigChange({ ...config, xKey: value })
}}
>
- <SelectTrigger_Shadcn_>{config.xKey || 'Select X Axis'}</SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger>{config.xKey || 'Select X Axis'}</SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{resultKeys.map((key) => (
- <SelectItem_Shadcn_ value={key} key={key}>
+ <SelectItem value={key} key={key}>
{key}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</div>
<div>
<Label className="text-xs text-foreground-light">Y Axis</Label>
- <Select_Shadcn_
+ <Select
value={config.yKey}
onValueChange={(value) => {
onConfigChange({ ...config, yKey: value })
}}
>
- <SelectTrigger_Shadcn_>{config.yKey || 'Select Y Axis'}</SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger>{config.yKey || 'Select Y Axis'}</SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{yAxisKeys.map((key) => (
- <SelectItem_Shadcn_ value={key} key={key}>
+ <SelectItem value={key} key={key}>
{key}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</div>
<div className="*:flex *:gap-2 *:items-center grid gap-2 *:text-foreground-light *:p-1.5 *:pl-0">
<Label className="" htmlFor="cumulative">
diff --git a/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRoleGrantFields.tsx b/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRoleGrantFields.tsx
index 504e12e7cc4..8e57e816604 100644
--- a/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRoleGrantFields.tsx
+++ b/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRoleGrantFields.tsx
@@ -3,11 +3,11 @@ import type { Control } from 'react-hook-form'
import {
Checkbox,
cn,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
WarningIcon,
} from 'ui'
import { TimestampInfo } from 'ui-patterns'
@@ -141,7 +141,7 @@ export function JitDbAccessRoleGrantFields({
<p className="text-sm text-foreground">Expires in</p>
<div className="flex gap-2">
<div className="flex-1">
- <Select_Shadcn_
+ <Select
value={grant.expiryMode}
onValueChange={(value) => {
const nextMode = value as JitRoleGrantDraft['expiryMode']
@@ -172,17 +172,17 @@ export function JitDbAccessRoleGrantFields({
})
}}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Expires in" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Expires in" />
+ </SelectTrigger>
+ <SelectContent>
{EXPIRY_MODE_OPTIONS.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
{grant.expiryMode === 'custom' && (
diff --git a/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsx b/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsx
index 80b0dd8236f..2ddd5041460 100644
--- a/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsx
+++ b/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsx
@@ -10,11 +10,11 @@ import {
FormControl,
FormField,
ScrollArea,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Sheet,
SheetContent,
SheetDescription,
@@ -243,19 +243,19 @@ export function JitDbAccessRuleSheet({
render={({ field }) => (
<FormItemLayout layout="vertical" label="Member">
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
disabled={
mode === 'edit' || (mode === 'add' && availableMembersForAddCount === 0)
}
onValueChange={field.onChange}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a member" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a member" />
+ </SelectTrigger>
+ <SelectContent>
{memberOptions.map((member) => (
- <SelectItem_Shadcn_ key={member.id} value={member.id}>
+ <SelectItem key={member.id} value={member.id}>
{member.name ? (
<>
{member.name}{' '}
@@ -266,10 +266,10 @@ export function JitDbAccessRuleSheet({
) : (
member.email
)}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
{mode === 'add' && availableMembersForAddCount === 0 && (
diff --git a/apps/studio/components/interfaces/Settings/General/Infrastructure/ProjectUpgradeAlert.tsx b/apps/studio/components/interfaces/Settings/General/Infrastructure/ProjectUpgradeAlert.tsx
index 38ebb7cc942..e859bef7545 100644
--- a/apps/studio/components/interfaces/Settings/General/Infrastructure/ProjectUpgradeAlert.tsx
+++ b/apps/studio/components/interfaces/Settings/General/Infrastructure/ProjectUpgradeAlert.tsx
@@ -16,12 +16,12 @@ import {
FormControl,
FormField,
Modal,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -242,32 +242,29 @@ export const ProjectUpgradeAlert = () => {
render={({ field }) => (
<FormItemLayout label="Select the version of Postgres to upgrade to">
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a Postgres version" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a Postgres version" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{(data?.target_upgrade_versions || [])?.map((value) => {
const postgresVersion =
value.app_version.split('supabase-postgres-')[1]
return (
- <SelectItem_Shadcn_
- key={formatValue(value)}
- value={formatValue(value)}
- >
+ <SelectItem key={formatValue(value)} value={formatValue(value)}>
<div className="flex items-center gap-3">
<span className="text-foreground">{postgresVersion}</span>
{value.release_channel !== 'ga' && (
<Badge variant="warning">{value.release_channel}</Badge>
)}
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx b/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx
index 8332ce063de..c8760daabef 100644
--- a/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx
+++ b/apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectButton.tsx
@@ -9,11 +9,11 @@ import {
InfoIcon,
Loading,
Modal,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
WarningIcon,
} from 'ui'
import { Admonition } from 'ui-patterns'
@@ -205,21 +205,18 @@ export const TransferProjectButton = () => {
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
- onValueChange={(slug) => setSelectedOrg(slug)}
- value={selectedOrg}
- >
- <SelectTrigger_Shadcn_ id="organization">
- <SelectValue_Shadcn_ placeholder="Select Organization" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select onValueChange={(slug) => setSelectedOrg(slug)} value={selectedOrg}>
+ <SelectTrigger id="organization">
+ <SelectValue placeholder="Select Organization" />
+ </SelectTrigger>
+ <SelectContent>
{organizations.map((x) => (
- <SelectItem_Shadcn_ key={x.id} value={x.slug}>
+ <SelectItem key={x.id} value={x.slug}>
{x.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
</div>
diff --git a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/CreateTable/CreateTableSheet.tsx b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/CreateTable/CreateTableSheet.tsx
index 5a22ab3106f..9ac38b11473 100644
--- a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/CreateTable/CreateTableSheet.tsx
+++ b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/CreateTable/CreateTableSheet.tsx
@@ -14,12 +14,12 @@ import {
Input,
InputGroup,
InputGroupAddon,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectSeparator_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
Sheet,
SheetContent,
SheetFooter,
@@ -157,31 +157,31 @@ export const CreateTableSheet = ({ open, onOpenChange }: CreateTableSheetProps)
label="Select a namespace to create your table in"
>
<FormControl>
- <Select_Shadcn_
+ <Select
value={field.value}
onValueChange={(value) => {
field.onChange(value)
form.resetField('newNamespace')
}}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a namespace" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a namespace" />
+ </SelectTrigger>
+ <SelectContent>
{namespaces.map((x) => (
- <SelectItem_Shadcn_ key={x} value={x}>
+ <SelectItem key={x} value={x}>
{x}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- {namespaces.length > 0 && <SelectSeparator_Shadcn_ />}
- <SelectItem_Shadcn_ value={NEW_NAMESPACE_MARKER}>
+ {namespaces.length > 0 && <SelectSeparator />}
+ <SelectItem value={NEW_NAMESPACE_MARKER}>
<div className="flex items-center gap-x-2">
<Plus size={14} />
<p>Create a new namespace</p>
</div>
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
@@ -267,21 +267,18 @@ export const CreateTableSheet = ({ open, onOpenChange }: CreateTableSheetProps)
name={`columns.${idx}.type`}
render={({ field }) => (
<FormControl>
- <Select_Shadcn_
- value={field.value}
- onValueChange={field.onChange}
- >
- <SelectTrigger_Shadcn_ className="h-auto">
- <SelectValue_Shadcn_ placeholder="Select a type" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="h-auto">
+ <SelectValue placeholder="Select a type" />
+ </SelectTrigger>
+ <SelectContent>
{COLUMN_TYPES.map((x) => (
- <SelectItem_Shadcn_ key={x} value={x}>
+ <SelectItem key={x} value={x}>
{x}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormControl>
)}
/>
diff --git a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/UpdateForeignSchemaDialog.tsx b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/UpdateForeignSchemaDialog.tsx
index 524a90d143c..f5bb0b7a495 100644
--- a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/UpdateForeignSchemaDialog.tsx
+++ b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/UpdateForeignSchemaDialog.tsx
@@ -15,11 +15,11 @@ import {
DialogTrigger,
Form,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -131,21 +131,18 @@ export const UpdateForeignSchemaDialog = ({
layout="vertical"
label="Select which Postgres schema to update"
>
- <Select_Shadcn_
- value={field.value}
- onValueChange={(val) => field.onChange(val)}
- >
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={field.value} onValueChange={(val) => field.onChange(val)}>
+ <SelectTrigger>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{schemasAssociatedWithNamespace.map((x) => (
- <SelectItem_Shadcn_ key={x} value={x}>
+ <SelectItem key={x} value={x}>
{x}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx b/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx
index 027a9634093..c45aa113503 100644
--- a/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx
+++ b/apps/studio/components/interfaces/Storage/CreateBucketModal.tsx
@@ -17,11 +17,11 @@ import {
FormField,
FormMessage,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { Admonition } from 'ui-patterns/admonition'
@@ -312,18 +312,18 @@ export const CreateBucketModal = ({ open, onOpenChange }: CreateBucketModalProps
</FormControl>
</div>
<div className="col-span-4">
- <Select_Shadcn_ value={selectedUnit} onValueChange={setSelectedUnit}>
- <SelectTrigger_Shadcn_ aria-label="File size limit unit" size="small">
- <SelectValue_Shadcn_>{selectedUnit}</SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={selectedUnit} onValueChange={setSelectedUnit}>
+ <SelectTrigger aria-label="File size limit unit" size="small">
+ <SelectValue>{selectedUnit}</SelectValue>
+ </SelectTrigger>
+ <SelectContent>
{Object.values(StorageSizeUnits).map((unit: string) => (
- <SelectItem_Shadcn_ key={unit} value={unit} className="text-xs">
+ <SelectItem key={unit} value={unit} className="text-xs">
{unit}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
</div>
</FormItemLayout>
diff --git a/apps/studio/components/interfaces/Storage/EditBucketModal.tsx b/apps/studio/components/interfaces/Storage/EditBucketModal.tsx
index e183308d9ff..a51cf1e49d7 100644
--- a/apps/studio/components/interfaces/Storage/EditBucketModal.tsx
+++ b/apps/studio/components/interfaces/Storage/EditBucketModal.tsx
@@ -17,11 +17,11 @@ import {
FormField,
FormMessage,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { Admonition } from 'ui-patterns'
@@ -334,18 +334,18 @@ export const EditBucketModal = ({ visible, bucket, onClose }: EditBucketModalPro
</FormControl>
</div>
<div className="col-span-4">
- <Select_Shadcn_ value={selectedUnit} onValueChange={setSelectedUnit}>
- <SelectTrigger_Shadcn_ aria-label="File size limit unit" size="small">
- <SelectValue_Shadcn_>{selectedUnit}</SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={selectedUnit} onValueChange={setSelectedUnit}>
+ <SelectTrigger aria-label="File size limit unit" size="small">
+ <SelectValue>{selectedUnit}</SelectValue>
+ </SelectTrigger>
+ <SelectContent>
{Object.values(StorageSizeUnits).map((unit: string) => (
- <SelectItem_Shadcn_ key={unit} value={unit} className="text-xs">
+ <SelectItem key={unit} value={unit} className="text-xs">
{unit}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
</div>
</FormItemLayout>
diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/CustomExpiryModal.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/CustomExpiryModal.tsx
index 0f05c381ea4..853105d66ec 100644
--- a/apps/studio/components/interfaces/Storage/StorageExplorer/CustomExpiryModal.tsx
+++ b/apps/studio/components/interfaces/Storage/StorageExplorer/CustomExpiryModal.tsx
@@ -8,11 +8,11 @@ import {
FormField,
Input,
Modal,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import * as z from 'zod'
@@ -120,17 +120,17 @@ export const CustomExpiryModal = () => {
render={({ field }) => (
<FormItemLayout layout="vertical" label="Units">
<FormControl>
- <Select_Shadcn_ value={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ aria-label="Units" placeholder="Select an option" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="days">days</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="weeks">weeks</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="months">months</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="years">years</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger>
+ <SelectValue aria-label="Units" placeholder="Select an option" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="days">days</SelectItem>
+ <SelectItem value="weeks">weeks</SelectItem>
+ <SelectItem value="months">months</SelectItem>
+ <SelectItem value="years">years</SelectItem>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx b/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx
index f1cf774c371..036484755bb 100644
--- a/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx
+++ b/apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.tsx
@@ -14,11 +14,11 @@ import {
FormField,
FormMessage,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Switch,
} from 'ui'
import { Admonition } from 'ui-patterns/admonition'
@@ -373,7 +373,7 @@ export const StorageSettings = () => {
control={form.control}
name="unit"
render={({ field: unitField }) => (
- <Select_Shadcn_
+ <Select
value={unitField.value}
onValueChange={(val) => {
unitField.onChange(val)
@@ -384,23 +384,23 @@ export const StorageSettings = () => {
!canUpdateStorageSettings
}
>
- <SelectTrigger_Shadcn_ className="w-[90px] text-xs font-mono rounded-l-none bg-surface-300">
- <SelectValue_Shadcn_ placeholder="Choose a prefix">
+ <SelectTrigger className="w-[90px] text-xs font-mono rounded-l-none bg-surface-300">
+ <SelectValue placeholder="Choose a prefix">
{storageUnit}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
{Object.values(StorageSizeUnits).map((unit: string) => (
- <SelectItem_Shadcn_
+ <SelectItem
key={unit}
disabled={!hasAccessToFileSizeConfiguration}
value={unit}
>
{unit}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
)}
/>
</div>
diff --git a/apps/studio/components/interfaces/Support/CategoryAndSeverityInfo.tsx b/apps/studio/components/interfaces/Support/CategoryAndSeverityInfo.tsx
index 878999fee14..c0c3aa926c1 100644
--- a/apps/studio/components/interfaces/Support/CategoryAndSeverityInfo.tsx
+++ b/apps/studio/components/interfaces/Support/CategoryAndSeverityInfo.tsx
@@ -5,12 +5,12 @@ import {
cn,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { Admonition } from 'ui-patterns/admonition'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -90,31 +90,27 @@ function CategorySelector({ form }: CategorySelectorProps) {
return (
<FormItemLayout hideMessage layout="vertical" label="What are you having issues with?">
<FormControl>
- <Select_Shadcn_
- {...fieldWithoutRef}
- defaultValue={field.value}
- onValueChange={onValueChange}
- >
- <SelectTrigger_Shadcn_ aria-label="Select an issue" className="w-full">
- <SelectValue_Shadcn_ placeholder="Select an issue">
+ <Select {...fieldWithoutRef} defaultValue={field.value} onValueChange={onValueChange}>
+ <SelectTrigger aria-label="Select an issue" className="w-full">
+ <SelectValue placeholder="Select an issue">
{field.value
? CATEGORY_OPTIONS.find((o) => o.value === field.value)?.label
: null}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{CATEGORY_OPTIONS.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
<span className="block text-xs text-foreground-lighter">
{option.description}
</span>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)
@@ -137,29 +133,27 @@ function SeveritySelector({ form }: SeveritySelectorProps) {
return (
<FormItemLayout hideMessage layout="vertical" label="Severity">
<FormControl>
- <Select_Shadcn_
+ <Select
{...fieldWithoutRef}
defaultValue={field.value}
onValueChange={field.onChange}
>
- <SelectTrigger_Shadcn_ aria-label="Select a severity" className="w-full">
- <SelectValue_Shadcn_ placeholder="Select a severity">
- {field.value}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger aria-label="Select a severity" className="w-full">
+ <SelectValue placeholder="Select a severity">{field.value}</SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{SEVERITY_OPTIONS.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
<span className="block text-xs text-foreground-lighter">
{option.description}
</span>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)
diff --git a/apps/studio/components/interfaces/Support/ClientLibraryInfo.tsx b/apps/studio/components/interfaces/Support/ClientLibraryInfo.tsx
index ed35afe26b4..4c59fe8fc2a 100644
--- a/apps/studio/components/interfaces/Support/ClientLibraryInfo.tsx
+++ b/apps/studio/components/interfaces/Support/ClientLibraryInfo.tsx
@@ -9,12 +9,12 @@ import {
cn,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -42,20 +42,20 @@ export function ClientLibraryInfo({ form, category, library }: ClientLibraryInfo
render={({ field }) => (
<FormItemLayout layout="vertical" label="Which library are you having issues with">
<FormControl>
- <Select_Shadcn_ {...field} defaultValue={field.value} onValueChange={field.onChange}>
- <SelectTrigger_Shadcn_ className="w-full" aria-label="Select a library">
- <SelectValue_Shadcn_ placeholder="Select a library" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <Select {...field} defaultValue={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="w-full" aria-label="Select a library">
+ <SelectValue placeholder="Select a library" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{CLIENT_LIBRARIES.map((option) => (
- <SelectItem_Shadcn_ key={option.language} value={option.language}>
+ <SelectItem key={option.language} value={option.language}>
{option.language}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)}
diff --git a/apps/studio/components/interfaces/Support/OrganizationSelector.tsx b/apps/studio/components/interfaces/Support/OrganizationSelector.tsx
index 9e4869c65c6..7f2e71b5611 100644
--- a/apps/studio/components/interfaces/Support/OrganizationSelector.tsx
+++ b/apps/studio/components/interfaces/Support/OrganizationSelector.tsx
@@ -3,12 +3,12 @@ import {
Badge,
FormControl,
FormField,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -36,7 +36,7 @@ export function OrganizationSelector({ form, orgSlug }: OrganizationSelectorProp
return (
<FormItemLayout hideMessage layout="vertical" label="Which organization is affected?">
<FormControl>
- <Select_Shadcn_
+ <Select
{...fieldWithoutRef}
disabled={!isSuccessOrganizations}
defaultValue={field.value}
@@ -48,8 +48,8 @@ export function OrganizationSelector({ form, orgSlug }: OrganizationSelectorProp
}
}}
>
- <SelectTrigger_Shadcn_ className="w-full" aria-label="Select an organization">
- <SelectValue_Shadcn_ asChild placeholder="Select an organization">
+ <SelectTrigger className="w-full" aria-label="Select an organization">
+ <SelectValue asChild placeholder="Select an organization">
<div className="flex items-center gap-x-2">
{orgSlug === NO_ORG_MARKER ? (
<span>No specific organization</span>
@@ -58,23 +58,21 @@ export function OrganizationSelector({ form, orgSlug }: OrganizationSelectorProp
)}
{subscriptionPlanId && <Badge variant="default">{subscriptionPlanId}</Badge>}
</div>
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{organizations?.map((org) => (
- <SelectItem_Shadcn_ key={org.slug} value={org.slug}>
+ <SelectItem key={org.slug} value={org.slug}>
{org.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
{isSuccessOrganizations && (organizations ?? []).length === 0 && (
- <SelectItem_Shadcn_ value={NO_ORG_MARKER}>
- No specific organization
- </SelectItem_Shadcn_>
+ <SelectItem value={NO_ORG_MARKER}>No specific organization</SelectItem>
)}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormControl>
</FormItemLayout>
)
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnDefaultValue.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnDefaultValue.tsx
index 1212ade34ae..d05901e00b0 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnDefaultValue.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnDefaultValue.tsx
@@ -1,12 +1,5 @@
import { noop } from 'lodash'
-import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
+import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from 'ui'
import { POSTGRES_DATA_TYPES } from '../SidePanelEditor.constants'
import type { ColumnField } from '../SidePanelEditor.types'
@@ -45,25 +38,25 @@ const ColumnDefaultValue = ({
return (
<>
<label className="block text-foreground-light">Default Value</label>
- <Select_Shadcn_
+ <Select
name="select-editor"
value={formattedValue}
onValueChange={(value) => onUpdateField({ defaultValue: value })}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ id="select-editor" placeholder="NULL" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value={null as any}>NULL</SelectItem_Shadcn_>
+ <SelectTrigger>
+ <SelectValue id="select-editor" placeholder="NULL" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value={null as any}>NULL</SelectItem>
{enumValues.map((value) => (
- <SelectItem_Shadcn_ key={value} value={value}>
+ <SelectItem key={value} value={value}>
{value}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</>
)
}
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
index a123ab4b51d..d70c34c316b 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
@@ -8,11 +8,11 @@ import {
AlertDescription,
AlertTitle,
Button,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
SidePanel,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -327,21 +327,18 @@ export const ForeignKeySelector = ({
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
- value={fk.schema}
- onValueChange={(value) => updateSelectedSchema(value)}
- >
- <SelectTrigger_Shadcn_ id="schema">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={fk.schema} onValueChange={(value) => updateSelectedSchema(value)}>
+ <SelectTrigger id="schema">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{sortedSchemas.map((schema) => (
- <SelectItem_Shadcn_ key={schema.id} value={schema.name} className="min-w-96">
+ <SelectItem key={schema.id} value={schema.name} className="min-w-96">
{schema.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
<FormItemLayout
id="table"
@@ -351,31 +348,27 @@ export const ForeignKeySelector = ({
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
+ <Select
value={selectedTable?.id !== undefined ? String(selectedTable.id) : undefined}
onValueChange={(value) => updateSelectedTable(Number(value))}
disabled={isLoadingSelectedTable}
>
- <SelectTrigger_Shadcn_ id="table">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger id="table">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{sortBy(tables, ['schema']).map((table) => (
- <SelectItem_Shadcn_
- key={table.id}
- value={table.id.toString()}
- className="min-w-96"
- >
+ <SelectItem key={table.id} value={table.id.toString()} className="min-w-96">
<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-foreground-lighter">{table.schema}</span>
<span className="text-foreground">{table.name}</span>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
{fk.schema && fk.table && (
@@ -411,20 +404,20 @@ export const ForeignKeySelector = ({
{fk.columns.map((_, idx) => (
<Fragment key={`${fk.schema}-${fk.table}-${idx}`}>
<div className="col-span-4">
- <Select_Shadcn_
+ <Select
value={fk.columns[idx].source}
onValueChange={(value) => updateSelectedColumn(idx, 'source', value)}
>
- <SelectTrigger_Shadcn_
+ <SelectTrigger
aria-label={`Column from ${selectedSchema}.${table.name.length > 0 ? table.name : '[unnamed table]'}`}
>
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{(table?.columns ?? [])
.filter((x) => x.name.length !== 0)
.map((column) => (
- <SelectItem_Shadcn_ key={column.id} value={column.name}>
+ <SelectItem key={column.id} value={column.name}>
<div className="flex items-center gap-2">
<span className="text-foreground">{column.name}</span>
<span className="text-foreground-lighter">
@@ -437,27 +430,25 @@ export const ForeignKeySelector = ({
)}
</span>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
<div className="col-span-1 flex justify-center items-center">
<ArrowRight />
</div>
<div className="col-span-4">
- <Select_Shadcn_
+ <Select
value={fk.columns[idx].target}
onValueChange={(value) => updateSelectedColumn(idx, 'target', value)}
>
- <SelectTrigger_Shadcn_
- aria-label={`Column from ${fk.schema}.${fk.table}`}
- >
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger aria-label={`Column from ${fk.schema}.${fk.table}`}>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{(selectedTable?.columns ?? []).map((column) => (
- <SelectItem_Shadcn_ key={column.id} value={column.name}>
+ <SelectItem key={column.id} value={column.name}>
<div className="flex items-center gap-2">
<span className="text-foreground">{column.name}</span>
<span className="text-foreground-lighter">
@@ -470,10 +461,10 @@ export const ForeignKeySelector = ({
)}
</span>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
<div className="col-span-1 flex justify-end items-center">
<Button
@@ -611,23 +602,23 @@ export const ForeignKeySelector = ({
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
+ <Select
value={fk.updateAction}
onValueChange={(value) => updateCascadeAction('updateAction', value)}
>
- <SelectTrigger_Shadcn_ id="updateAction">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger id="updateAction">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{FOREIGN_KEY_CASCADE_OPTIONS.filter((option) =>
['no-action', 'cascade', 'restrict'].includes(option.key)
).map((option) => (
- <SelectItem_Shadcn_ key={option.key} value={option.value}>
+ <SelectItem key={option.key} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
<FormItemLayout
id="deletionAction"
@@ -646,21 +637,21 @@ export const ForeignKeySelector = ({
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_
+ <Select
value={fk.deletionAction}
onValueChange={(value) => updateCascadeAction('deletionAction', value)}
>
- <SelectTrigger_Shadcn_ id="deletionAction">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <SelectTrigger id="deletionAction">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{FOREIGN_KEY_CASCADE_OPTIONS.map((option) => (
- <SelectItem_Shadcn_ key={option.key} value={option.value}>
+ <SelectItem key={option.key} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
</>
)}
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx
index 95d379af4df..1843f4937df 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/InputField.tsx
@@ -12,12 +12,12 @@ import {
InputGroupButton,
InputGroupInput,
InputGroupTextarea,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
TextArea,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -91,25 +91,25 @@ export const InputField = ({
description={field.comment}
className="[&>div:first-child>span]:text-foreground-lighter"
>
- <Select_Shadcn_
+ <Select
value={field.value ?? ''}
onValueChange={(value: string) => onUpdateField({ [field.name]: value })}
disabled={!isEditable}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="---" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value={null as any}>---</SelectItem_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="---" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value={null as any}>---</SelectItem>
{field.enums.map((value) => (
- <SelectItem_Shadcn_ key={value} value={value}>
+ <SelectItem key={value} value={value}>
{value}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)
}
@@ -325,24 +325,24 @@ export const InputField = ({
labelOptional={field.format}
description={field.comment}
>
- <Select_Shadcn_
+ <Select
value={defaultValue === null ? 'null' : defaultValue}
onValueChange={(value) => onUpdateField({ [field.name]: value })}
disabled={!isEditable}
>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder="Select a value" />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <SelectTrigger>
+ <SelectValue placeholder="Select a value" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{options.map((option) => (
- <SelectItem_Shadcn_ key={option.value} value={option.value}>
+ <SelectItem key={option.value} value={option.value}>
{option.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)
}
diff --git a/apps/studio/components/interfaces/UnifiedLogs/components/DownloadLogsButton.tsx b/apps/studio/components/interfaces/UnifiedLogs/components/DownloadLogsButton.tsx
index bc2b0bca1f8..121ecba4471 100644
--- a/apps/studio/components/interfaces/UnifiedLogs/components/DownloadLogsButton.tsx
+++ b/apps/studio/components/interfaces/UnifiedLogs/components/DownloadLogsButton.tsx
@@ -19,11 +19,11 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { QuerySearchParamsType } from '../UnifiedLogs.types'
@@ -137,30 +137,30 @@ export const DownloadLogsButton = ({ searchParameters }: DownloadLogsButtonProps
<DialogSection className="flex flex-col gap-y-2">
<div className="flex justify-between gap-x-2">
<p className="text-sm mb-2">Result limit for export</p>
- <Select_Shadcn_ value={numRows} onValueChange={setNumRows}>
- <SelectTrigger_Shadcn_ className="w-24">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="100">100</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="500">500</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="1000">1000</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={numRows} onValueChange={setNumRows}>
+ <SelectTrigger className="w-24">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="100">100</SelectItem>
+ <SelectItem value="500">500</SelectItem>
+ <SelectItem value="1000">1000</SelectItem>
+ </SelectContent>
+ </Select>
</div>
{!('date' in searchParameters) && (
<div className="flex justify-between gap-x-2">
<p className="text-sm mb-2">Duration to retrieve</p>
- <Select_Shadcn_ value={numHours} onValueChange={setNumHours}>
- <SelectTrigger_Shadcn_ className="w-36">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="1">1 hour ago</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="12">12 hours ago</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="24">24 hours ago</SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <Select value={numHours} onValueChange={setNumHours}>
+ <SelectTrigger className="w-36">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="1">1 hour ago</SelectItem>
+ <SelectItem value="12">12 hours ago</SelectItem>
+ <SelectItem value="24">24 hours ago</SelectItem>
+ </SelectContent>
+ </Select>
</div>
)}
</DialogSection>
diff --git a/apps/studio/components/ui/QueryBlock/BlockViewConfiguration.tsx b/apps/studio/components/ui/QueryBlock/BlockViewConfiguration.tsx
index b710af1019a..245671c6f54 100644
--- a/apps/studio/components/ui/QueryBlock/BlockViewConfiguration.tsx
+++ b/apps/studio/components/ui/QueryBlock/BlockViewConfiguration.tsx
@@ -5,11 +5,11 @@ import {
Popover,
PopoverContent,
PopoverTrigger,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
ToggleGroup,
ToggleGroupItem,
} from 'ui'
@@ -69,43 +69,43 @@ export const BlockViewConfiguration = ({
{isChart && chartConfig && (
<>
- <Select_Shadcn_
+ <Select
disabled={lockColumns}
value={chartConfig?.xKey}
onValueChange={(value) => updateChartConfig({ ...chartConfig, xKey: value })}
>
- <SelectTrigger_Shadcn_ className="text-left">
+ <SelectTrigger className="text-left">
X Axis {chartConfig?.xKey && `- ${chartConfig.xKey}`}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{columns.map((key) => (
- <SelectItem_Shadcn_ value={key} key={key}>
+ <SelectItem value={key} key={key}>
{key}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
- <Select_Shadcn_
+ <Select
disabled={lockColumns}
value={chartConfig?.yKey}
onValueChange={(value) => updateChartConfig({ ...chartConfig, yKey: value })}
>
- <SelectTrigger_Shadcn_ className="text-left">
+ <SelectTrigger className="text-left">
Y Axis {chartConfig?.yKey && `- ${chartConfig.yKey}`}
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{columns.map((key) => (
- <SelectItem_Shadcn_ value={key} key={key}>
+ <SelectItem value={key} key={key}>
{key}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
<div className="*:flex *:gap-2 *:items-center grid gap-2 *:text-foreground-light *:p-1.5 *:pl-0">
<Label htmlFor="cumulative">
diff --git a/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx b/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx
index 21639073241..37ab0a6306d 100644
--- a/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx
+++ b/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx
@@ -6,11 +6,11 @@ import {
Button,
Checkbox,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { Admonition } from 'ui-patterns/admonition'
import { Input as PasswordInput } from 'ui-patterns/DataInputs/Input'
@@ -309,15 +309,15 @@ const CreateProject = () => {
className="gap-[2px]"
size="tiny"
>
- <Select_Shadcn_ value={dbRegion} onValueChange={(region) => setDbRegion(region)}>
- <SelectTrigger_Shadcn_ id="region">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={dbRegion} onValueChange={(region) => setDbRegion(region)}>
+ <SelectTrigger id="region">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{Object.keys(AWS_REGIONS).map((option: string, i) => {
const label = Object.values(AWS_REGIONS)[i].displayName
return (
- <SelectItem_Shadcn_ key={option} value={label}>
+ <SelectItem key={option} value={label}>
<div className="flex gap-2">
<img
alt="region icon"
@@ -326,11 +326,11 @@ const CreateProject = () => {
/>
<span>{label}</span>
</div>
- </SelectItem_Shadcn_>
+ </SelectItem>
)
})}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</FormItemLayout>
</div>
</div>
diff --git a/apps/studio/pages/project/[ref]/observability/query-insights.tsx b/apps/studio/pages/project/[ref]/observability/query-insights.tsx
index bf22ec0a849..3308e53ea85 100644
--- a/apps/studio/pages/project/[ref]/observability/query-insights.tsx
+++ b/apps/studio/pages/project/[ref]/observability/query-insights.tsx
@@ -1,10 +1,4 @@
-import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from 'ui'
import { QueryInsights } from '@/components/interfaces/QueryInsights/QueryInsights'
import { REPORT_DATERANGE_HELPER_LABELS } from '@/components/interfaces/Reports/Reports.constants'
@@ -42,21 +36,21 @@ const QueryInsightsReport: NextPageWithLayout = () => {
href={`${DOCS_URL}/guides/platform/performance#examining-query-performance`}
/>
<DatabaseSelector />
- <Select_Shadcn_
+ <Select
value={datePickerValue.isHelper ? datePickerValue.text : undefined}
onValueChange={handleSelect}
>
- <SelectTrigger_Shadcn_ size="tiny" className="w-[150px]">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ align="end">
+ <SelectTrigger size="tiny" className="w-[150px]">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent align="end">
{PRESETS.map((label) => (
- <SelectItem_Shadcn_ key={label} value={label}>
+ <SelectItem key={label} value={label}>
{label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
</div>
<QueryInsights dateRange={selectedDateRange} />
diff --git a/apps/studio/pages/project/_/[[...routeSlug]].tsx b/apps/studio/pages/project/_/[[...routeSlug]].tsx
index 36509491046..7f59242f587 100644
--- a/apps/studio/pages/project/_/[[...routeSlug]].tsx
+++ b/apps/studio/pages/project/_/[[...routeSlug]].tsx
@@ -7,11 +7,11 @@ import {
Alert,
AlertDescription,
AlertTitle,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { ShimmeringLoader } from 'ui-patterns'
@@ -92,21 +92,21 @@ const GenericProjectPage: NextPage = () => {
{isLoadingOrganizations ? (
<ShimmeringLoader className="w-60 py-0 h-[26px]" />
) : (
- <Select_Shadcn_ value={selectedSlug} onValueChange={setSlug}>
- <SelectTrigger_Shadcn_ size="tiny" className="w-60 truncate">
+ <Select value={selectedSlug} onValueChange={setSlug}>
+ <SelectTrigger size="tiny" className="w-60 truncate">
<div className="flex items-center gap-x-2">
<p className="text-xs text-foreground-light">Organization:</p>
- <SelectValue_Shadcn_ placeholder="Select an organization" />
+ <SelectValue placeholder="Select an organization" />
</div>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_ className="col-span-8">
+ </SelectTrigger>
+ <SelectContent className="col-span-8">
{organizations.map((org) => (
- <SelectItem_Shadcn_ key={org.slug} value={org.slug} className="text-xs">
+ <SelectItem key={org.slug} value={org.slug} className="text-xs">
{org.name}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
)}
<HomePageActions hideNewProject />
</div>
diff --git a/apps/ui-library/components/framework-selector.tsx b/apps/ui-library/components/framework-selector.tsx
index b67897c3ee6..13bfa5655ba 100644
--- a/apps/ui-library/components/framework-selector.tsx
+++ b/apps/ui-library/components/framework-selector.tsx
@@ -1,14 +1,7 @@
'use client'
import { usePathname, useRouter } from 'next/navigation'
-import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
+import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from 'ui'
import { componentPages, frameworkTitles } from '@/config/docs'
import { useFramework } from '@/context/framework-context'
@@ -69,19 +62,19 @@ export function FrameworkSelector() {
})) || []
return (
- <Select_Shadcn_ value={selectedFramework} onValueChange={onSelect}>
- <SelectTrigger_Shadcn_ className="w-[180px] mt-4 lg:mt-0">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
+ <Select value={selectedFramework} onValueChange={onSelect}>
+ <SelectTrigger className="w-[180px] mt-4 lg:mt-0">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
{options.map((f) => (
- <SelectItem_Shadcn_ key={f.value} value={f.value}>
+ <SelectItem key={f.value} value={f.value}>
{f.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
)
}
diff --git a/apps/www/components/Contribute/Leaderboard.tsx b/apps/www/components/Contribute/Leaderboard.tsx
index c912b867943..3c154b59847 100644
--- a/apps/www/components/Contribute/Leaderboard.tsx
+++ b/apps/www/components/Contribute/Leaderboard.tsx
@@ -1,18 +1,13 @@
'use client'
-import Link from 'next/link'
+import { LEADERBOARD_PERIODS } from '~/data/contribute'
import { ArrowLeft } from 'lucide-react'
+import Link from 'next/link'
import { parseAsString, useQueryState } from 'nuqs'
-import {
- Select_Shadcn_ as Select,
- SelectContent_Shadcn_ as SelectContent,
- SelectItem_Shadcn_ as SelectItem,
- SelectTrigger_Shadcn_ as SelectTrigger,
- SelectValue_Shadcn_ as SelectValue,
-} from 'ui'
-import { LeaderboardContent } from './LeaderboardContent'
-import { LEADERBOARD_PERIODS } from '~/data/contribute'
import { use } from 'react'
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from 'ui'
+
+import { LeaderboardContent } from './LeaderboardContent'
export function LeaderboardClient({
initialLeaderboardPromise,
diff --git a/apps/www/components/Legal/LegalDocVersions.tsx b/apps/www/components/Legal/LegalDocVersions.tsx
index 7cb5c2fb795..adfaa743239 100644
--- a/apps/www/components/Legal/LegalDocVersions.tsx
+++ b/apps/www/components/Legal/LegalDocVersions.tsx
@@ -1,13 +1,7 @@
import { useStaticEffectEvent } from '~/hooks/useStaticEffectEvent'
import { useRouter } from 'next/router'
import { ComponentType, useEffect, useState } from 'react'
-import {
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
-} from 'ui'
+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from 'ui'
export type LegalDocVersion = {
id: string
@@ -55,18 +49,18 @@ const LegalDocVersions = ({ versions }: Props) => {
<label htmlFor="legal-doc-version" className="text-foreground-lighter text-sm">
Version
</label>
- <Select_Shadcn_ value={activeId} onValueChange={handleChange}>
- <SelectTrigger_Shadcn_ id="legal-doc-version" className="w-auto min-w-[260px]">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={activeId} onValueChange={handleChange}>
+ <SelectTrigger id="legal-doc-version" className="w-auto min-w-[260px]">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
{versions.map((v) => (
- <SelectItem_Shadcn_ key={v.id} value={v.id}>
+ <SelectItem key={v.id} value={v.id}>
{v.label} — {v.effectiveDate}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
</div>
<ActiveComponent />
</>
diff --git a/apps/www/components/Pricing/PricingComparisonTable.tsx b/apps/www/components/Pricing/PricingComparisonTable.tsx
index 62dfeaeae3f..ff6d7d425a7 100644
--- a/apps/www/components/Pricing/PricingComparisonTable.tsx
+++ b/apps/www/components/Pricing/PricingComparisonTable.tsx
@@ -11,12 +11,12 @@ import { pricing } from 'shared-data/pricing'
import {
Button,
cn,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import UpgradePlan from './UpgradePlan'
@@ -127,23 +127,23 @@ const PricingComparisonTable = ({
<div className="bg-background p-2 sticky top-14 z-10 pt-4">
<div className="bg-surface-100 rounded-lg border py-2 px-4 flex justify-between items-center">
<label className="text-foreground-lighter grow">Change plan</label>
- <Select_Shadcn_
+ <Select
name="Change plan"
value={activeMobilePlan}
onValueChange={(value) => setActiveMobilePlan(value)}
>
- <SelectTrigger_Shadcn_ id="change-plan" className="w-auto min-w-[120px]">
- <SelectValue_Shadcn_ />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="Free">Free</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="Pro">Pro</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="Team">Team</SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="Enterprise">Enterprise</SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ <SelectTrigger id="change-plan" className="w-auto min-w-[120px]">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="Free">Free</SelectItem>
+ <SelectItem value="Pro">Pro</SelectItem>
+ <SelectItem value="Team">Team</SelectItem>
+ <SelectItem value="Enterprise">Enterprise</SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</div>
</div>
{activeMobilePlan === 'Free' && (
diff --git a/apps/www/components/Supasquad/CountrySelector.tsx b/apps/www/components/Supasquad/CountrySelector.tsx
index 8420f1ddd24..c736a9c18f6 100644
--- a/apps/www/components/Supasquad/CountrySelector.tsx
+++ b/apps/www/components/Supasquad/CountrySelector.tsx
@@ -1,9 +1,9 @@
import {
- Select_Shadcn_ as Select,
- SelectContent_Shadcn_ as SelectContent,
- SelectItem_Shadcn_ as SelectItem,
- SelectTrigger_Shadcn_ as SelectTrigger,
- SelectValue_Shadcn_ as SelectValue,
+ Select as Select,
+ SelectContent as SelectContent,
+ SelectItem as SelectItem,
+ SelectTrigger as SelectTrigger,
+ SelectValue as SelectValue,
} from 'ui'
// Country data with flags and names (alphabetically sorted)
diff --git a/apps/www/pages/opt-out/[ref].tsx b/apps/www/pages/opt-out/[ref].tsx
index eaf5dce9c3b..286fdb4d6a7 100644
--- a/apps/www/pages/opt-out/[ref].tsx
+++ b/apps/www/pages/opt-out/[ref].tsx
@@ -12,12 +12,12 @@ import {
Form,
FormField,
FormMessage,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectGroup_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
} from 'ui'
import { Admonition } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
@@ -154,57 +154,57 @@ export default function OptOutPage() {
control={form.control}
render={({ field }) => (
<FormItemLayout label="Choose reason for reporting" labelOptional="Optional">
- <Select_Shadcn_ onValueChange={field.onChange} defaultValue={field.value}>
- <SelectTrigger_Shadcn_ size="medium">
- <SelectValue_Shadcn_ placeholder="Select a reason (optional)">
+ <Select onValueChange={field.onChange} defaultValue={field.value}>
+ <SelectTrigger size="medium">
+ <SelectValue placeholder="Select a reason (optional)">
{field.value}
- </SelectValue_Shadcn_>
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
- <SelectGroup_Shadcn_>
- <SelectItem_Shadcn_ value="phishing">
+ </SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ <SelectGroup>
+ <SelectItem value="phishing">
<div className={SelectItemContainerClasses}>
<span>Phishing</span>
<span className="text-foreground-light text-xs">
Attempt to obtain sensitive information
</span>
</div>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="advertisement">
+ </SelectItem>
+ <SelectItem value="advertisement">
<div className={SelectItemContainerClasses}>
<span>Advertisement</span>
<span className="text-foreground-light text-xs">
Unwanted promotional content
</span>
</div>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="malware">
+ </SelectItem>
+ <SelectItem value="malware">
<div className={SelectItemContainerClasses}>
<span>Malware</span>
<span className="text-foreground-light text-xs">
Contains harmful software
</span>
</div>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="scam">
+ </SelectItem>
+ <SelectItem value="scam">
<div className={SelectItemContainerClasses}>
<span>Scam</span>
<span className="text-foreground-light text-xs">
Fraudulent or deceptive content
</span>
</div>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="other">
+ </SelectItem>
+ <SelectItem value="other">
<div className={SelectItemContainerClasses}>
<span>Other</span>
<span className="text-foreground-light text-xs">
Any other type of spam
</span>
</div>
- </SelectItem_Shadcn_>
- </SelectGroup_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectGroup>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/packages/marketing/src/forms/MarketingForm.tsx b/packages/marketing/src/forms/MarketingForm.tsx
index 47fdee98658..10022734a36 100644
--- a/packages/marketing/src/forms/MarketingForm.tsx
+++ b/packages/marketing/src/forms/MarketingForm.tsx
@@ -6,11 +6,11 @@ import {
Button,
Checkbox,
Input,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
TextArea,
} from 'ui'
import type { z } from 'zod'
@@ -103,18 +103,18 @@ function FieldInput({
)
case 'select':
return (
- <Select_Shadcn_ value={value} onValueChange={onChange} required={field.required}>
- <SelectTrigger_Shadcn_>
- <SelectValue_Shadcn_ placeholder={field.placeholder} />
- </SelectTrigger_Shadcn_>
- <SelectContent_Shadcn_>
+ <Select value={value} onValueChange={onChange} required={field.required}>
+ <SelectTrigger>
+ <SelectValue placeholder={field.placeholder} />
+ </SelectTrigger>
+ <SelectContent>
{field.options.map((opt) => (
- <SelectItem_Shadcn_ key={opt.value} value={opt.value}>
+ <SelectItem key={opt.value} value={opt.value}>
{opt.label}
- </SelectItem_Shadcn_>
+ </SelectItem>
))}
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectContent>
+ </Select>
)
case 'checkbox':
return null
diff --git a/packages/ui-patterns/src/form/FormLayout2.tsx b/packages/ui-patterns/src/form/FormLayout2.tsx
index c48d77abde9..3d799aede83 100644
--- a/packages/ui-patterns/src/form/FormLayout2.tsx
+++ b/packages/ui-patterns/src/form/FormLayout2.tsx
@@ -10,11 +10,11 @@ import {
FormField,
RadioGroup,
RadioGroupItem,
- Select_Shadcn_,
- SelectContent_Shadcn_,
- SelectItem_Shadcn_,
- SelectTrigger_Shadcn_,
- SelectValue_Shadcn_,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Separator,
Sheet,
SheetContent,
@@ -222,36 +222,36 @@ export const Page = () => {
description="This is your public display name."
layout="horizontal"
>
- <Select_Shadcn_ onValueChange={field.onChange} defaultValue={field.value}>
+ <Select onValueChange={field.onChange} defaultValue={field.value}>
<FormControl className="w-full">
- <SelectTrigger_Shadcn_ className="w-full">
- <SelectValue_Shadcn_
+ <SelectTrigger className="w-full">
+ <SelectValue
placeholder="Select a verified email"
className="flex gap-2"
/>
- </SelectTrigger_Shadcn_>
+ </SelectTrigger>
</FormControl>
- <SelectContent_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]">
+ <SelectContent>
+ <SelectItem value="[email protected]">
<div className="flex gap-2 items-center">
<UserIcon />
<span>[email protected]</span>
</div>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]" className="flex gap-2">
+ </SelectItem>
+ <SelectItem value="[email protected]" className="flex gap-2">
<div className="flex gap-2 items-center">
<UserIcon />
</div>
- </SelectItem_Shadcn_>
- <SelectItem_Shadcn_ value="[email protected]" className="flex gap-2">
+ </SelectItem>
+ <SelectItem value="[email protected]" className="flex gap-2">
<div className="flex gap-2 items-center">
<UserIcon />
</div>
- </SelectItem_Shadcn_>
- </SelectContent_Shadcn_>
- </Select_Shadcn_>
+ </SelectItem>
+ </SelectContent>
+ </Select>
</FormItemLayout>
)}
/>
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index c2f5d41dea4..bb7ada6081f 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -95,18 +95,7 @@ export {
AccordionContent as AccordionContent_Shadcn_,
} from './src/components/shadcn/ui/accordion'
-export {
- Select as Select_Shadcn_,
- SelectContent as SelectContent_Shadcn_,
- SelectGroup as SelectGroup_Shadcn_,
- SelectItem as SelectItem_Shadcn_,
- SelectLabel as SelectLabel_Shadcn_,
- SelectSeparator as SelectSeparator_Shadcn_,
- SelectTrigger as SelectTrigger_Shadcn_,
- SelectValue as SelectValue_Shadcn_,
- SelectScrollUpButton as SelectScrollUpButton_Shadcn_,
- SelectScrollDownButton as SelectScrollDownButton_Shadcn_,
-} from './src/components/shadcn/ui/select'
+export * from './src/components/shadcn/ui/select'
export * from './src/components/shadcn/ui/radio-group'