Skip to content

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

Update `@deprecated` suggestions for `ui` package components (#36944)

Drake Costaad4506d89b5b
diff --git a/packages/ui/src/components/Accordion/Accordion.tsx b/packages/ui/src/components/Accordion/Accordion.tsx
index 26a1629099c..4b793744c12 100644
--- a/packages/ui/src/components/Accordion/Accordion.tsx
+++ b/packages/ui/src/components/Accordion/Accordion.tsx
@@ -39,7 +39,7 @@ export interface AccordionProps {
}
/**
- * @deprecated Use ./Accordion_Shadcn_ instead
+ * @deprecated Use `import { Accordion_Shadcn_ } from "ui"` instead
*/
function Accordion({
children,
diff --git a/packages/ui/src/components/Alert/Alert.tsx b/packages/ui/src/components/Alert/Alert.tsx
index 34f40e9d2f0..1c49c76c460 100644
--- a/packages/ui/src/components/Alert/Alert.tsx
+++ b/packages/ui/src/components/Alert/Alert.tsx
@@ -27,7 +27,7 @@ const icons: Record<AlertVariant, React.ReactElement> = {
}
/**
- * @deprecated Use Alert_Shadcn_. For studio use Admonition
+ * @deprecated Use `import { Alert_Shadcn_ } from "ui"` instead. For studio use `Admonition`
*/
export function Alert({
variant = 'neutral',
diff --git a/packages/ui/src/components/Breadcrumb/Breadcrumb.tsx b/packages/ui/src/components/Breadcrumb/Breadcrumb.tsx
index 35a06b85221..7de226f7170 100644
--- a/packages/ui/src/components/Breadcrumb/Breadcrumb.tsx
+++ b/packages/ui/src/components/Breadcrumb/Breadcrumb.tsx
@@ -10,7 +10,7 @@ interface Props {
}
/**
- * @deprecated Use ./Breadcrumb_shadcn_ instead
+ * @deprecated Use `import { Breadcrumb_shadcn_ } from "ui"` instead
*/
const Breadcrumb = ({ className, style, children, spacing = 'small' }: Props) => {
let classes = [BreadcrumbStyle['sbui-breadcrumb--container']]
diff --git a/packages/ui/src/components/Checkbox/Checkbox.tsx b/packages/ui/src/components/Checkbox/Checkbox.tsx
index 0f37e7022c2..f98fafb97ce 100644
--- a/packages/ui/src/components/Checkbox/Checkbox.tsx
+++ b/packages/ui/src/components/Checkbox/Checkbox.tsx
@@ -36,7 +36,7 @@ interface GroupProps {
}
/**
- * @deprecated Use ./Checkbox_shadcn_ instead
+ * @deprecated Use `import { Checkbox_shadcn_ } from "ui"` instead
*/
function Group({
id,
diff --git a/packages/ui/src/components/Collapsible/Collapsible.tsx b/packages/ui/src/components/Collapsible/Collapsible.tsx
index 88da35cb689..cbc4941a821 100644
--- a/packages/ui/src/components/Collapsible/Collapsible.tsx
+++ b/packages/ui/src/components/Collapsible/Collapsible.tsx
@@ -9,7 +9,7 @@ export interface CollapsibleProps extends RadixCollapsible.CollapsibleProps {
}
/**
- * @deprecated Use ./Collapsible_shadcn_ instead
+ * @deprecated Use `import { Collapsible_shadcn_ } from "ui"` instead
*/
export const Collapsible = ({
open = undefined,
diff --git a/packages/ui/src/components/Form/Form.tsx b/packages/ui/src/components/Form/Form.tsx
index 781d3da032f..47bd2c8202c 100644
--- a/packages/ui/src/components/Form/Form.tsx
+++ b/packages/ui/src/components/Form/Form.tsx
@@ -32,7 +32,7 @@ function errorReducer(state: any, action: any) {
}
/**
- * @deprecated Use ./Form_shadcn_ instead
+ * @deprecated Use `import { Form_shadcn_ } from "ui"` instead
*/
export default function Form({ validate, ...props }: Props) {
const [fieldLevelErrors, dispatchErrors] = useReducer(errorReducer, null)
diff --git a/packages/ui/src/components/Input/Input.tsx b/packages/ui/src/components/Input/Input.tsx
index d827478f87e..35f21c2aa8a 100644
--- a/packages/ui/src/components/Input/Input.tsx
+++ b/packages/ui/src/components/Input/Input.tsx
@@ -38,7 +38,7 @@ export interface Props
}
/**
- * @deprecated Use ./Input_shadcn_ instead or ./ui-patterns/data-inputs/input
+ * @deprecated Use `import { Input_shadcn_ } from "ui"` instead or ./ui-patterns/data-inputs/input
*/
function Input({
autoComplete,
diff --git a/packages/ui/src/components/InputNumber/InputNumber.tsx b/packages/ui/src/components/InputNumber/InputNumber.tsx
index 91501de58ae..e4aad0c0f75 100644
--- a/packages/ui/src/components/InputNumber/InputNumber.tsx
+++ b/packages/ui/src/components/InputNumber/InputNumber.tsx
@@ -27,7 +27,7 @@ export interface Props extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
}
/**
- * @deprecated Use ./Input_shadcn_ with type="number" instead or ./ui-patterns/data-inputs/input with type="number"
+ * @deprecated Use `import { Input_shadcn_ } from "ui"` with `type="number"` instead or ./ui-patterns/data-inputs/input with `type="number"`
*/
function InputNumber({
defaultValue,
diff --git a/packages/ui/src/components/InputOld/Input.js b/packages/ui/src/components/InputOld/Input.js
index 8ccf6b8bd46..00c287a4d64 100644
--- a/packages/ui/src/components/InputOld/Input.js
+++ b/packages/ui/src/components/InputOld/Input.js
@@ -5,7 +5,7 @@ import './Input.css'
export const SIZES = ['small', 'medium']
/**
- * @deprecated Use ./Input_shadcn_ with type="number" instead or ./ui-patterns/data-inputs/input with type="number"
+ * @deprecated Use `import { Input_shadcn_ } from "ui"` with `type="number"` instead or ./ui-patterns/data-inputs/input with `type="number"`
*/
const Input = ({
className = '',
diff --git a/packages/ui/src/components/Listbox/Listbox2.tsx b/packages/ui/src/components/Listbox/Listbox2.tsx
index f6e90ad0dcb..2b4aa34a328 100644
--- a/packages/ui/src/components/Listbox/Listbox2.tsx
+++ b/packages/ui/src/components/Listbox/Listbox2.tsx
@@ -38,7 +38,7 @@ export interface Props extends Omit<React.InputHTMLAttributes<HTMLButtonElement>
}
/**
- * @deprecated Use ./Select_shadcn_ or follow ComboBox convention or use ./ui-patterns/multi-select
+ * @deprecated Use `import { Select_shadcn_ } from "ui"` or follow ComboBox convention or use ./ui-patterns/multi-select
*/
function Listbox({
children,
diff --git a/packages/ui/src/components/Modal/Modal.tsx b/packages/ui/src/components/Modal/Modal.tsx
index ebdf78b5e22..df2b7adfd9d 100644
--- a/packages/ui/src/components/Modal/Modal.tsx
+++ b/packages/ui/src/components/Modal/Modal.tsx
@@ -62,7 +62,7 @@ interface ModalType
Separator: React.ComponentType
}
-/** @deprecated use <Dialog/> instead */
+/** @deprecated Use `import { Dialog } from "ui"` instead */
const Modal = forwardRef<
React.ElementRef<typeof DialogContent>,
React.ComponentPropsWithoutRef<typeof DialogContent> & ModalProps
diff --git a/packages/ui/src/components/Popover/Popover.tsx b/packages/ui/src/components/Popover/Popover.tsx
index faea74be735..59a3cf4aa2d 100644
--- a/packages/ui/src/components/Popover/Popover.tsx
+++ b/packages/ui/src/components/Popover/Popover.tsx
@@ -30,7 +30,7 @@ interface RootProps {
}
/**
- * @deprecated Use ./Popover_shadcn_ instead
+ * @deprecated Use `import { Popover_shadcn_ } from "ui"` instead
*/
function Popover({
align = 'center',
diff --git a/packages/ui/src/components/Radio/Radio.tsx b/packages/ui/src/components/Radio/Radio.tsx
index 7fa77a8a23b..19ecc83375c 100644
--- a/packages/ui/src/components/Radio/Radio.tsx
+++ b/packages/ui/src/components/Radio/Radio.tsx
@@ -34,7 +34,7 @@ interface GroupProps {
}
/**
- * @deprecated Use ./RadioGroup_Shadcn_ instead
+ * @deprecated Use `import { RadioGroup_Shadcn_ } from "ui"` instead
*/
function RadioGroup({
id,
diff --git a/packages/ui/src/components/RadioOld/Radio.js b/packages/ui/src/components/RadioOld/Radio.js
index bab2deab778..8601699b2f4 100644
--- a/packages/ui/src/components/RadioOld/Radio.js
+++ b/packages/ui/src/components/RadioOld/Radio.js
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import './Radio.css'
/**
- * @deprecated Use ./RadioGroupItem_Shadcn_ and ./RadioGroup_Shadcn_ instead
+ * @deprecated Use `import { RadioGroup_Shadcn_, RadioGroupItem_Shadcn_ } from "ui"` instead
*/
const Radio = ({ className = '', label = '', containerClassName = '', children, ...props }) => {
return (
diff --git a/packages/ui/src/components/Select/Select.tsx b/packages/ui/src/components/Select/Select.tsx
index d6d40e73e19..5794abf5c01 100644
--- a/packages/ui/src/components/Select/Select.tsx
+++ b/packages/ui/src/components/Select/Select.tsx
@@ -41,7 +41,7 @@ export interface Props extends Omit<React.InputHTMLAttributes<HTMLSelectElement>
export const ColLayout = (props: any) => <div>{props.children}</div>
/**
- * @deprecated Use ./Select_shadcn_ instead
+ * @deprecated Use `import { Select_shadcn_ } from "ui"` instead
*/
function Select({
autoComplete,
diff --git a/packages/ui/src/components/Tabs/Tabs.tsx b/packages/ui/src/components/Tabs/Tabs.tsx
index 7d09ba8440f..eb96b4bfa7d 100644
--- a/packages/ui/src/components/Tabs/Tabs.tsx
+++ b/packages/ui/src/components/Tabs/Tabs.tsx
@@ -38,7 +38,7 @@ interface TabsSubComponents {
}
/**
- * @deprecated Use ./Tabs_shadcn_ instead
+ * @deprecated Use `import { Tabs_shadcn_ } from "ui"` instead
*/
const Tabs: React.FC<PropsWithChildren<TabsProps>> & TabsSubComponents = ({
defaultActiveId,
diff --git a/packages/ui/src/components/Toggle/Toggle.tsx b/packages/ui/src/components/Toggle/Toggle.tsx
index 658e9e567d4..3093b267436 100644
--- a/packages/ui/src/components/Toggle/Toggle.tsx
+++ b/packages/ui/src/components/Toggle/Toggle.tsx
@@ -27,7 +27,7 @@ interface Props extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'size'> {
}
/**
- * @deprecated Use ./Switch instead
+ * @deprecated Use `import { Switch } from "ui"` instead
*/
function Toggle({
disabled,