The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: Clean dead code in `ui` package (#35093)
Ivan Vasilov8a321126ac38
diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyTemplates.tsx b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyTemplates.tsxindex 2e12c835206..5e273759dce 100644--- a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyTemplates.tsx+++ b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyTemplates.tsx@@ -4,7 +4,7 @@ import { useState } from 'react'import { Badge, HoverCard, HoverCardContent, HoverCardTrigger, Input, cn } from 'ui'import { Markdown } from 'components/interfaces/Markdown'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'import CardButton from 'components/ui/CardButton'import CopyButton from 'components/ui/CopyButton'import NoSearchResults from 'components/ui/NoSearchResults'diff --git a/apps/studio/components/interfaces/Auth/Users/UserPanel.tsx b/apps/studio/components/interfaces/Auth/Users/UserPanel.tsxindex 693f87e57e6..70713f54ee5 100644--- a/apps/studio/components/interfaces/Auth/Users/UserPanel.tsx+++ b/apps/studio/components/interfaces/Auth/Users/UserPanel.tsx@@ -1,4 +1,4 @@-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'import { User } from 'data/auth/users-infinite-query'import { X } from 'lucide-react'import { useState } from 'react'diff --git a/apps/studio/components/interfaces/Connect/content/androidkotlin/supabasekt/content.tsx b/apps/studio/components/interfaces/Connect/content/androidkotlin/supabasekt/content.tsxindex 9e1be901e59..e9bf493098a 100644--- a/apps/studio/components/interfaces/Connect/content/androidkotlin/supabasekt/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/androidkotlin/supabasekt/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/astro/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/astro/supabasejs/content.tsxindex 1ce13c63f32..e143f57c1cd 100644--- a/apps/studio/components/interfaces/Connect/content/astro/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/astro/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/drizzle/content.tsx b/apps/studio/components/interfaces/Connect/content/drizzle/content.tsxindex e07df174cdd..20e25329494 100644--- a/apps/studio/components/interfaces/Connect/content/drizzle/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/drizzle/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ connectionStringPooler }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/exporeactnative/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/exporeactnative/supabasejs/content.tsxindex fdae1dcdba1..a9b22da5633 100644--- a/apps/studio/components/interfaces/Connect/content/exporeactnative/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/exporeactnative/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/flutter/supabaseflutter/content.tsx b/apps/studio/components/interfaces/Connect/content/flutter/supabaseflutter/content.tsxindex 2eb7d6651ee..d0cf74eb53a 100644--- a/apps/studio/components/interfaces/Connect/content/flutter/supabaseflutter/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/flutter/supabaseflutter/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/ionicangular/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/ionicangular/supabasejs/content.tsxindex 3beda75cbd0..98a9f34dfb1 100644--- a/apps/studio/components/interfaces/Connect/content/ionicangular/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/ionicangular/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/ionicreact/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/ionicreact/supabasejs/content.tsxindex 0971e6979bc..4cee515aadf 100644--- a/apps/studio/components/interfaces/Connect/content/ionicreact/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/ionicreact/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/nextjs/app/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/nextjs/app/supabasejs/content.tsxindex e6d1be4fc26..0a99eaa0ac6 100644--- a/apps/studio/components/interfaces/Connect/content/nextjs/app/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/nextjs/app/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/nextjs/pages/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/nextjs/pages/supabasejs/content.tsxindex 5ad87160931..a74132d4983 100644--- a/apps/studio/components/interfaces/Connect/content/nextjs/pages/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/nextjs/pages/supabasejs/content.tsx@@ -1,6 +1,6 @@import type { ContentFileProps } from 'components/interfaces/Connect/Connect.types'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'import {ConnectTabContent,ConnectTabs,diff --git a/apps/studio/components/interfaces/Connect/content/nuxt/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/nuxt/supabasejs/content.tsxindex b07237bad6e..ed49f7d0e55 100644--- a/apps/studio/components/interfaces/Connect/content/nuxt/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/nuxt/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/prisma/content.tsx b/apps/studio/components/interfaces/Connect/content/prisma/content.tsxindex f437e9ef83f..3c097cf8968 100644--- a/apps/studio/components/interfaces/Connect/content/prisma/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/prisma/content.tsx@@ -1,6 +1,6 @@import type { ContentFileProps } from 'components/interfaces/Connect/Connect.types'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'import {ConnectTabContent,ConnectTabs,diff --git a/apps/studio/components/interfaces/Connect/content/react/create-react-app/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/react/create-react-app/supabasejs/content.tsxindex c5b84f69027..e960582f408 100644--- a/apps/studio/components/interfaces/Connect/content/react/create-react-app/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/react/create-react-app/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/react/vite/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/react/vite/supabasejs/content.tsxindex 465d8bf0978..1c334849084 100644--- a/apps/studio/components/interfaces/Connect/content/react/vite/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/react/vite/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/refine/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/refine/supabasejs/content.tsxindex c87fdff6bda..5be7b60910c 100644--- a/apps/studio/components/interfaces/Connect/content/refine/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/refine/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/remix/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/remix/supabasejs/content.tsxindex 324eac69426..0d9a97bad5f 100644--- a/apps/studio/components/interfaces/Connect/content/remix/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/remix/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/solidjs/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/solidjs/supabasejs/content.tsxindex 9cd17ddd257..3fb9adc2cc6 100644--- a/apps/studio/components/interfaces/Connect/content/solidjs/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/solidjs/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/sveltekit/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/sveltekit/supabasejs/content.tsxindex 5f326bfb8e1..f369de33918 100644--- a/apps/studio/components/interfaces/Connect/content/sveltekit/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/sveltekit/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/swift/supabaseswift/content.tsx b/apps/studio/components/interfaces/Connect/content/swift/supabaseswift/content.tsxindex 83b5c4f0a39..87ad9d3a345 100644--- a/apps/studio/components/interfaces/Connect/content/swift/supabaseswift/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/swift/supabaseswift/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTrigger,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Connect/content/vuejs/supabasejs/content.tsx b/apps/studio/components/interfaces/Connect/content/vuejs/supabasejs/content.tsxindex 9f10023c135..ec4e1e0491c 100644--- a/apps/studio/components/interfaces/Connect/content/vuejs/supabasejs/content.tsx+++ b/apps/studio/components/interfaces/Connect/content/vuejs/supabasejs/content.tsx@@ -6,7 +6,7 @@ import {ConnectTabTriggers,ConnectTabContent,} from 'components/interfaces/Connect/ConnectTabs'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'const ContentFile = ({ projectKeys }: ContentFileProps) => {return (diff --git a/apps/studio/components/interfaces/Docs/CodeSnippet.tsx b/apps/studio/components/interfaces/Docs/CodeSnippet.tsxindex 87f1850ebd6..813a346d4df 100644--- a/apps/studio/components/interfaces/Docs/CodeSnippet.tsx+++ b/apps/studio/components/interfaces/Docs/CodeSnippet.tsx@@ -1,4 +1,4 @@-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'interface CodeSnippetProps {selectedLang: 'bash' | 'js'diff --git a/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsx b/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsxindex 27faac4ea19..e6e370f7931 100644--- a/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsx+++ b/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsx@@ -4,7 +4,7 @@ import { AlertCircle, Loader } from 'lucide-react'import Link from 'next/link'import { useState } from 'react'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'import { useParams } from 'common'import Panel from 'components/ui/Panel'import { useJwtSecretUpdatingStatusQuery } from 'data/config/jwt-secret-updating-status-query'diff --git a/apps/studio/components/interfaces/ProjectAPIDocs/ContentSnippet.tsx b/apps/studio/components/interfaces/ProjectAPIDocs/ContentSnippet.tsxindex 76309d7d1fc..6a8a8cd60a5 100644--- a/apps/studio/components/interfaces/ProjectAPIDocs/ContentSnippet.tsx+++ b/apps/studio/components/interfaces/ProjectAPIDocs/ContentSnippet.tsx@@ -1,6 +1,6 @@import { useParams } from 'common'-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'import { Markdown } from '../Markdown'import { PropsWithChildren } from 'react'diff --git a/apps/studio/components/interfaces/ProjectAPIDocs/ResourceContent.tsx b/apps/studio/components/interfaces/ProjectAPIDocs/ResourceContent.tsxindex d426c546825..de50d604b47 100644--- a/apps/studio/components/interfaces/ProjectAPIDocs/ResourceContent.tsx+++ b/apps/studio/components/interfaces/ProjectAPIDocs/ResourceContent.tsx@@ -1,4 +1,4 @@-import { SimpleCodeBlock } from '@ui/components/SimpleCodeBlock'+import { SimpleCodeBlock } from 'ui'import { useParams } from 'common'import { DocsButton } from 'components/ui/DocsButton'import { Markdown } from '../Markdown'diff --git a/apps/studio/components/ui/Loading/index.ts b/apps/studio/components/ui/Loading/index.tsindex ecc66c9df96..c7260e08d48 100644--- a/apps/studio/components/ui/Loading/index.ts+++ b/apps/studio/components/ui/Loading/index.ts@@ -1 +1 @@-export { default as Loading } from 'ui/src/components/LogoLoader'+export { LogoLoader as Loading } from 'ui'diff --git a/apps/studio/pages/project/[ref]/functions/[functionSlug]/code.tsx b/apps/studio/pages/project/[ref]/functions/[functionSlug]/code.tsxindex 4c56e5b49a6..fcbdba5c5bc 100644--- a/apps/studio/pages/project/[ref]/functions/[functionSlug]/code.tsx+++ b/apps/studio/pages/project/[ref]/functions/[functionSlug]/code.tsx@@ -5,7 +5,7 @@ import { useEffect, useState } from 'react'import { toast } from 'sonner'import { PermissionAction } from '@supabase/shared-types/out/constants'-import LogoLoader from '@ui/components/LogoLoader'+import { LogoLoader } from 'ui'import { useParams } from 'common'import { DeployEdgeFunctionWarningModal } from 'components/interfaces/EdgeFunctions/DeployEdgeFunctionWarningModal'import DefaultLayout from 'components/layouts/DefaultLayout'diff --git a/apps/www/components/OpenSource/Repos.tsx b/apps/www/components/OpenSource/Repos.tsxindex 2ff69e0a1fa..526cbc82da3 100644--- a/apps/www/components/OpenSource/Repos.tsx+++ b/apps/www/components/OpenSource/Repos.tsx@@ -3,7 +3,7 @@ import Link from 'next/link'import { AnimatePresence } from 'framer-motion'import { Swiper, SwiperSlide } from 'swiper/react'import { cn } from 'ui'-import LogoLoader from 'ui/src/components/LogoLoader'+import { LogoLoader } from 'ui'import RepoCard from './RepoCard'import { Pencil, Users, Users2 } from 'lucide-react'diff --git a/packages/ui/index.tsx b/packages/ui/index.tsxindex ed2af063379..dabb4e30d6d 100644--- a/packages/ui/index.tsx+++ b/packages/ui/index.tsx@@ -5,8 +5,6 @@ export * from './src/lib/Markdown'// GENERALexport * from './src/components/Button'-export * from './src/components/Icon'-export * from './src/components/Icon/IconContext'export * from './src/components/Icon/IconBackground'export * from './src/components/Image'@@ -19,7 +17,6 @@ export * from './src/components/Accordion'export * from './src/components/Collapsible'export * from './src/components/CodeBlock'export * from './src/components/SimpleCodeBlock'-export * from './src/components/TreeView/TreeView'// NAV@@ -30,19 +27,17 @@ export * from './src/components/NavMenu'export * from './src/components/Modal'export * from './src/components/SidePanel'-export * from './src/components/ContextMenu'export * from './src/components/Popover'// HTML-export * from './src/components/CustomHTMLElements'+export { Heading } from './src/components/CustomHTMLElements'// UTILITIESexport * from './src/components/Space'export * from './src/components/Loading'export * from './src/components/LogoLoader'-export * from './src/components/Divider'export * from './src/lib/utils'// DATA ENTRY@@ -54,7 +49,6 @@ export * from './src/components/Input'export * from './src/components/InputNumber'export * from './src/components/Radio'export * from './src/components/Toggle'-export * from './src/components/Upload'export * from './src/components/Form'export * from './src/components/ExpandingTextArea'@@ -69,7 +63,6 @@ export * from './src/layout/ai-icon-animation'// theme switcherexport * from './src/components/ThemeProvider/themes'export * from './src/components/ThemeProvider/singleThemes'-export * from './src/components/ThemeProvider/prefixedThemes'// shadcnexport * from './src/components/shadcn/ui/dropdown-menu'@@ -258,18 +251,11 @@ export * from './src/components/shadcn/ui/sidebar'export * from './src/components/TextLink'+// used for LWexport * from './src/layout/banners'export * from './src/components/StatusIcon'-// config--// export { default as Config } from './../ui.config'--// AUTH--// export * from './src/components/Auth'-// ICONS// export iconsexport * from './src/components/Icon/icons/IconBriefcase2'@@ -293,6 +279,3 @@ export * from './src/components/Icon/icons/IconYoutubeSolid'// Export hooksexport * from './src/lib/Hooks'--// Shared constants/utils-export { TAB_CHANGE_EVENT_NAME } from './src/lib/events'diff --git a/packages/ui/src/components/ContextMenu/ContextMenu.module.css b/packages/ui/src/components/ContextMenu/ContextMenu.module.cssdeleted file mode 100644index 3c8a401fe73..00000000000--- a/packages/ui/src/components/ContextMenu/ContextMenu.module.css+++ /dev/null@@ -1,65 +0,0 @@-.sbui-contextmenu-item {- @apply text-xs;- @apply text-typography-body-light dark:text-typography-body-dark;- @apply px-4 py-1.5 flex items-center space-x-2;- @apply cursor-pointer;- @apply focus:bg-bg-secondary-light dark:focus:bg-bg-primary-dark border-none;- cursor: 'default';-}--.sbui-contextmenu-item svg {- /* @apply text-typography-body-secondary-light dark:text-typography-body-secondary-dark; */-}--.sbui-contextmenu-label {- /* @apply text-typography-body-secondary-light dark:text-typography-body-secondary-dark; */- /* @apply px-4 py-1.5 flex items-center space-x-2; */- /* font-size: 0.65rem; */-}--.sbui-contextmenu-misc {- /* @apply px-4 py-1.5; */-}--.sbui-contextmenu-item:focus-visible {- /* border: none; */- /* outline: none; */-}--.sbui-contextmenu-input {- /* @apply flex items-center space-x-2; */-}--.sbui-contextmenu-input__check {- /* @apply flex items-center; */-}--.sbui-contextmenu__content {- /* @apply bg-bg-primary-light dark:bg-bg-secondary-dark p-0; */- /* @apply rounded; */- /* @apply border; */- /* @apply shadow; */- /* overflow: visible; */- /* border-style: solid; */- /* border-width: 1px; */-}--@keyframes transition {- /* 0% { */- /* opacity: 0; */- /* transform: scale(0.95); */- /* } */- /* 100% { */- /* opacity: 1; */- /* transform: scale(1); */- /* } */-}--.sbui-contextmenu__content {- /* transform-origin: var(--radix-dropdown-menu-content-transform-origin); */- /* animation: transition 0.1s ease-out; */-}--.sbui-contextmenu__trigger {- /* @apply border-none bg-transparent p-0 focus:ring-0; */-}diff --git a/packages/ui/src/components/ContextMenu/ContextMenu.tsx b/packages/ui/src/components/ContextMenu/ContextMenu.tsxdeleted file mode 100644index 6cc4397225e..00000000000--- a/packages/ui/src/components/ContextMenu/ContextMenu.tsx+++ /dev/null@@ -1,208 +0,0 @@-'use client'--import React, { useState } from 'react'--import type * as RadixContextMenuTypes from '@radix-ui/react-context-menu/'--import * as RadixContextMenu from '@radix-ui/react-context-menu'-import { Check } from 'lucide-react'--const ContextMenuStyles = {}--interface RootProps {- onOpenChange?(x: boolean): void- alignOffset?: RadixContextMenuTypes.ContextMenuContentProps['alignOffset']- overlay?: React.ReactNode- children?: React.ReactNode- className?: string- style?: React.CSSProperties-}--/**- * @deprecated Use ./ContextMenu_shadcn_ instead- */-function ContextMenu({- onOpenChange,-- alignOffset = 6,- overlay,- children,- className,- style,-}: RootProps) {- // let classes = [ContextMenuStyles['sbui-contextmenu__content']]- // if (className) {- // classes.push(className)- // }- return (- <RadixContextMenu.Root onOpenChange={onOpenChange}>- <RadixContextMenu.Trigger- // className={ContextMenuStyles['sbui-contextmenu__trigger']}- >- {children}- </RadixContextMenu.Trigger>-- <RadixContextMenu.Content- alignOffset={alignOffset}- // className={classes.join(' ')}- style={style}- >- {overlay}- </RadixContextMenu.Content>- </RadixContextMenu.Root>- )-}--interface ItemProps {- children: React.ReactNode- icon?: React.ReactNode- disabled?: boolean- onClick?: (event: Event) => void-}--/**- * @deprecated Use ./ContextMenuItem_shadcn_ instead- */-export function Item({ children, icon, disabled, onClick }: ItemProps) {- return (- <RadixContextMenu.Item- // className={ContextMenuStyles['sbui-contextmenu-item']}- disabled={disabled}- onSelect={onClick}- >- {icon && icon}- <span>{children}</span>- </RadixContextMenu.Item>- )-}--/**- * @deprecated Use ./ContextMenu_shadcn_ instead- */-export function Misc({ children, icon }: ItemProps) {- return (- <div- // className={ContextMenuStyles['sbui-contextmenu-misc']}- >- {icon && icon}- {children}- </div>- )-}--interface CheckboxProps {- children: React.ReactNode- checked?: boolean- onChange?(x: boolean): void- disabled?: boolean- ItemIndicator?: React.ReactNode-}--/**- * @deprecated Use ./ContextMenuCheckboxItem_shadcn_ instead- */-export function Checkbox({- children,- checked: propsChecked,- onChange,- disabled,- ItemIndicator,-}: CheckboxProps) {- const [checked, setChecked] = useState(propsChecked ? propsChecked : false)-- const handleChange = (e: boolean) => {- if (onChange) onChange(e)- setChecked(e)- }-- return (- <RadixContextMenu.CheckboxItem- checked={checked}- onCheckedChange={handleChange}- // className={`${ContextMenuStyles['sbui-contextmenu-item']} ${ContextMenuStyles['sbui-contextmenu-input']}`}- disabled={disabled}- >- <RadixContextMenu.ItemIndicator- // className={ContextMenuStyles['sbui-contextmenu-input__check']}- >- {ItemIndicator ? ItemIndicator : <Check size={14} />}- <RadixContextMenu.CheckboxItem />- </RadixContextMenu.ItemIndicator>- <span>{children}</span>- </RadixContextMenu.CheckboxItem>- )-}--interface RadioProps {- children: React.ReactNode- value: string- ItemIndicator?: React.ReactNode-}--/**- * @deprecated Use ./ContextMenuRadioItem_shadcn_ instead- */-export function Radio({ children, value, ItemIndicator }: RadioProps) {- return (- <RadixContextMenu.RadioItem- value={value}- // className={`${ContextMenuStyles['sbui-contextmenu-item']} ${ContextMenuStyles['sbui-contextmenu-input']}`}- >- <RadixContextMenu.ItemIndicator- // className={ContextMenuStyles['sbui-contextmenu-input__check']}- >- {ItemIndicator ? ItemIndicator : <Check size={14} />}- </RadixContextMenu.ItemIndicator>- <span>{children}</span>- </RadixContextMenu.RadioItem>- )-}--interface RadioGroupProps {- children: React.ReactNode- value: string- onChange?(x: string): void-}--/**- * @deprecated Use ./ContextMenuRadioGroup_shadcn_ instead- */-export function RadioGroup({ children, value: propsValue, onChange }: RadioGroupProps) {- const [value, setValue] = useState(propsValue ? propsValue : '')-- const handleChange = (e: string) => {- if (onChange) onChange(e)- setValue(e)- }-- return (- <RadixContextMenu.RadioGroup value={value} onValueChange={handleChange}>- {children}- </RadixContextMenu.RadioGroup>- )-}--interface LabelProps {- children: React.ReactNode-}--/**- * @deprecated Use ./ContextMenuLabel_shadcn_ instead- */-export function Label({ children }: LabelProps) {- return (- <RadixContextMenu.Label- // className={ContextMenuStyles['sbui-contextmenu-label']}- >- {children}- </RadixContextMenu.Label>- )-}--ContextMenu.Item = Item-ContextMenu.Misc = Misc-ContextMenu.Checkbox = Checkbox-ContextMenu.Radio = Radio-ContextMenu.RadioGroup = RadioGroup-ContextMenu.Label = Label-export default ContextMenudiff --git a/packages/ui/src/components/ContextMenu/index.tsx b/packages/ui/src/components/ContextMenu/index.tsxdeleted file mode 100644index 9b96c831639..00000000000--- a/packages/ui/src/components/ContextMenu/index.tsx+++ /dev/null@@ -1,3 +0,0 @@-'use client'--export { default as ContextMenu } from './ContextMenu'diff --git a/packages/ui/src/components/Divider/Divider.module.css b/packages/ui/src/components/Divider/Divider.module.cssdeleted file mode 100644index d81d08e0371..00000000000--- a/packages/ui/src/components/Divider/Divider.module.css+++ /dev/null@@ -1,99 +0,0 @@-.sbui-divider {- width: 100%;- display: flex;- align-items: center;- white-space: nowrap;-}--.sbui-divider-vertical {- @apply bg-border;- width: 1px;- height: inherit;-}--.sbui-divider-vertical.sbui-divider--light {- @apply bg-border-control;-}--.sbui-divider--no-text {- @apply border-default;- border-bottom-style: solid;- border-bottom-width: 1px;-}--.sbui-divider > span {- @apply text-sm;- @apply text-background-surface-200;- display: inline-block;- padding: 0 1em;-}--.sbui-divider--left:before {- @apply border-default;- border-bottom-style: solid;- border-bottom-width: 1px;- top: 50%;- content: '';- position: relative;- display: inline-block;- width: 5%;-}--.sbui-divider--left:after {- @apply border-default;- border-bottom-style: solid;- border-bottom-width: 1px;- top: 50%;- content: '';- position: relative;- display: inline-block;- width: 95%;-}--.sbui-divider--right:before {- @apply border-default;- border-bottom-style: solid;- border-bottom-width: 1px;- top: 50%;- content: '';- position: relative;- display: inline-block;- width: 95%;-}--.sbui-divider--right:after {- @apply border-default;- border-bottom-style: solid;- border-bottom-width: 1px;- top: 50%;- content: '';- position: relative;- display: inline-block;- width: 5%;-}--.sbui-divider--center:before,-.sbui-divider--center:after {- @apply border-default;- border-bottom-style: solid;- border-bottom-width: 1px;- top: 50%;- content: '';- position: relative;- display: inline-block;- width: 50%;-}--.sbui-divider--light.sbui-divider--left:before,-.sbui-divider--light.sbui-divider--left:after,-.sbui-divider--light.sbui-divider--right:before,-.sbui-divider--light.sbui-divider--right:after,-.sbui-divider--light.sbui-divider--center:before,-.sbui-divider--light.sbui-divider--center:after,-.sbui-divider--light.sbui-divider--no-text {- @apply border-control;-}--.sbui-divider--light.sbui-divider > span {- @apply text-foreground-muted;-}diff --git a/packages/ui/src/components/Divider/Divider.tsx b/packages/ui/src/components/Divider/Divider.tsxdeleted file mode 100644index 7dde6bf5328..00000000000--- a/packages/ui/src/components/Divider/Divider.tsx+++ /dev/null@@ -1,55 +0,0 @@-import React from 'react'-// @ts-ignore-// import DividerStyles from './Divider.module.css'--interface Props {- children?: React.ReactNode- className?: string- light?: boolean- orientation?: 'left' | 'right' | 'center'- style?: React.CSSProperties- type?: 'vertical' | 'horizontal'-}--/**- * @deprecated Use ./Separator instead- */-export default function Divider({- children,- className,- light = false,- orientation = 'center',- style,- type = 'horizontal',-}: Props) {- // let classes = [- // type === 'horizontal'- // ? DividerStyles['sbui-divider']- // : DividerStyles['sbui-divider-vertical'],- // ]- // if (light) classes.push(DividerStyles['sbui-divider--light'])-- // if (children) {- // classes.push(DividerStyles[`sbui-divider--${orientation}`])- // } else if (!children && type === 'horizontal') {- // classes.push(DividerStyles[`sbui-divider--no-text`])- // }-- // if (className) classes.push(className)-- return (- <div- // className={classes.join(' ')}- role="separator"- style={style}- >- {children && (- <span- // className={DividerStyles['sbui-divider__content']}- >- {children}- </span>- )}- </div>- )-}diff --git a/packages/ui/src/components/Divider/index.tsx b/packages/ui/src/components/Divider/index.tsxdeleted file mode 100644index 644af288bc8..00000000000--- a/packages/ui/src/components/Divider/index.tsx+++ /dev/null@@ -1 +0,0 @@-export { default as Divider } from './Divider'diff --git a/packages/ui/src/components/Form/Form.css b/packages/ui/src/components/Form/Form.cssdeleted file mode 100644index e69de29bb2d..00000000000diff --git a/packages/ui/src/components/Form/examples/AuthForm.tsx b/packages/ui/src/components/Form/examples/AuthForm.tsxdeleted file mode 100644index 7015b5b4078..00000000000--- a/packages/ui/src/components/Form/examples/AuthForm.tsx+++ /dev/null@@ -1,1126 +0,0 @@-import { ArrowRight, Check, ChevronUp, Globe, Trash, X } from 'lucide-react'-import React, { useReducer, useState } from 'react'-import { Button, Input, InputNumber, Tabs, Toggle } from '../../../../'-import { Form } from './../'--import { Collapsible } from '../../Collapsible'--import { Modal } from '../../Modal'-import AuthFormSchema from './AuthFormSchema.json'--// import GoogleIcon './../../../static/icons/google-icon.svg'--const DocsButton = () => {- return (- <button- className="- bg-surface-100- border-default- hover:border-strong- group- my-6 flex- w-full items-center- gap-6- rounded-md border px-6- py-4 text-left- shadow-sm- transition- "- >- <div className="bg-brand h-10 w-10 rounded p-1 transition duration-500 group-hover:-rotate-3 group-hover:scale-110">- {/* <img- className="text-white w-12 h-12"- src="/icons/docs-illustration.svg"- /> */}- </div>- <div className="grow">- <h3 className="text-foreground">Use authentication as the backbone of your app</h3>- <p className="text-foreground-muted text-xs">- Learn how to use Supabase Auth with Auth Policies to pick and choose what users see what.- </p>- <p className="text-brand mt-2 flex items-center gap-1 text-xs">- See Documenation- <span className="transition group-hover:translate-x-1">- <ArrowRight strokeWidth={2} width={12} />- </span>- </p>- </div>- <div className="text-foreground-muted">- <X />- </div>- </button>- )-}--const CardForm = () => {- // panel- const Panel = ({- children,- header,- footer,- }: {- children: React.ReactNode- header?: React.ReactNode- footer?: React.ReactNode- }) => (- <div- className="- bg-surface-100- border-muted my-8 overflow-hidden rounded-md border shadow"- >- {header && <div className="bg-background border-muted border-b px-8 py-4">{header}</div>}- <div className="space-y-6 py-6">{children}</div>- {footer}- </div>- )-- const Section = ({- children,- header,- }: {- children: React.ReactNode- header?: React.ReactNode- }) => (- <div className="grid grid-cols-12 px-8 py-2">- {header}- {children}- </div>- )-- return (- <>- <Form- id="general_form"- initialValues={{- enable_signups: true,- jwt_expiry: 3600,- }}- onSubmit={(values: any, { setSubmitting }: any) => {- setTimeout(() => {- alert(JSON.stringify(values, null, 2))- setSubmitting(false)- }, 400)- }}- validate={(values) => {- const errors: any = {}- if (!values.jwt_expiry) {- errors.jwt_expiry = 'This is required'- }- if (values.jwt_expiry > 604800) {- errors.jwt_expiry =- 'The maxiumum allowed is 604,800 seconds. Use a smaller number of seconds.'- }- return errors- }}- >- {({ isSubmitting, handleReset }: any) => (- <Panel- footer={- <>- <div className="border-muted border-t"></div>- <div className="flex justify-end gap-2 py-3 px-6">- <Button type="default" htmlType="reset" onClick={() => handleReset()}>- Cancel- </Button>- <Button- loading={isSubmitting}- type="primary"- htmlType="submit"- form="general_form"- >- Save- </Button>- </div>- </>- }- >- <Section- header={<label className="text-foreground col-span-4 text-sm">User Signups</label>}- >- <Toggle- id="enable_signups"- className="col-span-8"- label="Allow new users to sign up"- layout="flex"- descriptionText="If this is disabled, new users will not be able to sign up to your application."- />- </Section>- <div className="border-muted border-t"></div>- <Section- header={<label className="text-foreground col-span-4 text-sm">User Sessions</label>}- >- <InputNumber- className="col-span-8"- id="jwt_expiry"- label="JWT expiry limit"- descriptionText="How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one week)."- />- </Section>- </Panel>- )}- </Form>- </>- )-}--// type to do later..-let initialState: any = {}--AuthFormSchema.map((provider) => {- initialState[`${provider.name.toLowerCase()}-active`] = provider.name == 'Email' ? true : false- initialState[`${provider.name.toLowerCase()}-app-id`] = ''- initialState[`${provider.name.toLowerCase()}-id-key`] = ''-})--console.log('form initialState', initialState)--function providersReducer(state: any, action: any) {- switch (action.type) {- case 'update':- return Object.assign(state, action.values)- // case 'decrement':- // return { count: state.count - 1 }- default:- throw new Error()- }-}--const AuthForm = () => {- const [providersFormState, dispatchProvidersForm] = useReducer(providersReducer, initialState)-- console.log('providersFormState from useState', providersFormState)-- // panel- const Panel = ({- children,- header,- footer,- }: {- children: React.ReactNode- header?: React.ReactNode- footer?: React.ReactNode- }) => (- <div className="bg-surface-100 border-overlay mx-auto my-8 w-3/4 overflow-hidden rounded-md border shadow">- {header && <div className="bg-background border-overlay border-b px-8 py-4">{header}</div>}- <div className="space-y-6 py-6">{children}</div>- {footer}- </div>- )-- const Section = ({- children,- header,- }: {- children: React.ReactNode- header?: React.ReactNode- }) => (- <div className="grid grid-cols-12 px-8 py-2">- {header}- {children}- </div>- )-- const CollapsibleContainer = ({- children,- header,- }: {- children: React.ReactNode- header?: React.ReactNode- }) => {- return (- <div- className="- bg-surface-200 border-default hover:border-strong hover:bg-overlay-hover mx-auto overflow-hidden- border shadow- transition first:rounded-tr- first:rounded-tl- last:rounded-br- last:rounded-bl- "- >- {children}- </div>- )- }-- type formObj = {- type: string- name: string- label: string- description: string- }-- interface Provider {- name: string- icon: string- form: formObj[]- }-- const ProviderForm = ({ provider }: { provider: Provider }) => {- const [open, setOpen] = useState(false)- const [active, setActive] = useState(- providersFormState[`${provider.name.toLowerCase()}-active`]- )-- console.log('panel active state', active)-- return (- // <CollapsibleContainer>- <Collapsible- open={open}- onOpenChange={setOpen}- className="- bg-surface-100- hover:bg-overlay-hover- data-open:bg-selection- border-default- hover:border-strong data-open:border-strong-- data-open:pb-px col-span-12 mx-auto- -space-y-px overflow-hidden- border shadow-- transition- first:rounded-tr-- first:rounded-tl- last:rounded-br last:rounded-bl- hover:z-50- "- >- <Collapsible.Trigger asChild>- <button- type="button"- className="-- text-foreground group- flex- w-full items-center justify-between rounded p-3 px-6"- >- <div className="flex items-center gap-3">- <ChevronUp- className="text-border-stronger data-open-parent:rotate-0 data-closed-parent:rotate-180 transition"- strokeWidth={2}- />-- <img- className="w-6 fill-red-400"- src={`/icons/${provider.icon}.svg`}- width={21}- alt={`${provider.name} auth icon`}- />-- <span className="text-base">{provider.name}</span>- </div>- <div className="flex items-center gap-3">- {active ? (- <div className="bg-brand-200 border-brand-400 text-brand flex items-center gap-1 rounded-full border py-1 px-1 text-xs">- <span className="bg-brand text-brand-200 rounded-full p-0.5 text-xs">- <Check strokeWidth={2} size={12} />- </span>- <span className="px-1">Enabled</span>- </div>- ) : (- <div className="bg-surface-100 border-strong text-foreground-muted rounded-md border py-1 px-3 text-xs">- Disabled- </div>- )}- </div>- </button>- </Collapsible.Trigger>- <Form- name={`provider-${provider.name}-form`}- initialValues={{- [`${provider.name.toLowerCase()}-active`]:- providersFormState[`${provider.name.toLowerCase()}-active`] ||- // empty form should have this as enabled for UX- true,- [`${provider.name.toLowerCase()}-app-id`]:- providersFormState[`${provider.name.toLowerCase()}-app-id`],- [`${provider.name.toLowerCase()}-id-key`]:- providersFormState[`${provider.name.toLowerCase()}-id-key`],- }}- validate={(values) => {- const errors: any = {}-- console.log('validation values', values)-- const input_active = `${provider.name.toLowerCase()}-active`- const input_app_id = `${provider.name.toLowerCase()}-app-id`- const input_id_key = `${provider.name.toLowerCase()}-id-key`-- if (values[input_app_id] && values[input_app_id].length < 10)- errors[input_app_id] = 'App ID must be at least 10 characters long'- if (values[input_app_id] && values[input_id_key].length < 10)- errors[input_id_key] = 'Secret must be at least 10 characters long'-- if (values[input_active]) {- if (!values[input_app_id])- errors[input_app_id] =- 'You need to input an application ID if you want to enable this provider.'- if (!values[input_id_key])- errors[input_id_key] =- 'You need to input an application secret if you want to enable this provider.'- }-- return errors- }}- onSubmit={(values: any, { setSubmitting }: any) => {- setTimeout(() => {- // alert(JSON.stringify(values, null, 2))- dispatchProvidersForm({ type: 'update', values: values })- setActive(values[`${provider.name.toLowerCase()}-active`])- setSubmitting(false)- setOpen(false)- }, 400)- }}- >- {({ isSubmitting, handleReset }: any) => (- <Collapsible.Content>- <div- className="- bg-surface-100- text-foreground border-default group border-t py-6 px-6- "- >- <div className="mx-auto max-w-md space-y-6">- <Toggle- id={`${provider.name.toLowerCase()}-active`}- name={`${provider.name.toLowerCase()}-active`}- label={`Enable ${provider.name} Provider`}- layout="flex"- />- <div className="border-muted border-t"></div>- {provider.form.map((x) => {- return (- <Input- id={x.name}- key={x.name}- name={x.name}- label={x.label}- descriptionText={x.description}- layout="vertical"- />- )- })}- <div className="border-muted border-t"></div>- <div className="flex items-center justify-end gap-3">- <Button- htmlType="reset"- onClick={() => {- handleReset()- setOpen(false)- }}- type="secondary"- >- Cancel- </Button>- <Button htmlType="submit" loading={isSubmitting}>- Save- </Button>- </div>- </div>- </div>- </Collapsible.Content>- )}- </Form>- </Collapsible>- // </CollapsibleContainer>- )- }-- return (- <div className="mx-auto my-8">- <div className="-space-y-px">- {AuthFormSchema.map((provider: Provider) => {- return <ProviderForm provider={provider} />- })}- </div>- </div>- )-}--// type to do later..-let domainInitialState: any = ['https://summersmuir.com', 'http://localhost:3000']--// AuthFormSchema.map((provider) => {-// domainInitialState[`${provider.name.toLowerCase()}-active`] =-// provider.name == 'Email' ? true : false-// domainInitialState[`${provider.name.toLowerCase()}-app-id`] = ''-// domainInitialState[`${provider.name.toLowerCase()}-id-key`] = ''-// })--console.log('form domainInitialState', domainInitialState)--// function domainsReducer(state, action) {-// switch (action.type) {-// case 'update':-// let _state = []-// _state.push(...state)-// _state.push(action.values.domain)-// console.log('new state', _state)-// return _state-// // case 'remove':-// // _state.push(...state)-// // _state = _state.filter((e: any) => e !== action.values)-// // console.log('new state', _state)-// // return _state-// // case 'decrement':-// // return { count: state.count - 1 }-// default:-// throw new Error()-// }-// }--function domainsReducer(state: any, action: any) {- let _state = []- switch (action.type) {- case 'update':- _state.push(...state)- _state.push(action.values.domain)- console.log('new state', _state)- return _state- case 'remove':- _state.push(...state)- _state = _state.filter((e: any) => e !== action.values)- console.log('new state', _state)- return _state- // case 'decrement':- // return { count: state.count - 1 }- default:- throw new Error()- }-}--const DomainsForm = () => {- const [domainsFormState, dispatchDomainsForm] = useReducer(domainsReducer, domainInitialState)-- const [deleteOpen, setDeleteOpen] = useState(false)- const [deleteLoading, setDeleteLoading] = useState(false)- const [selectedDomain, setSelected] = useState('')-- console.log('domainsFormState from useState', domainsFormState)-- type formObj = {- type: string- name: string- label: string- description: string- }-- interface Provider {- name: string- icon: string- form: formObj[]- }-- const DomainsForm = () => {- // const [active, setActive] = useState(- // domainsFormState[`${provider.name.toLowerCase()}-active`]- // )- const [open, setOpen] = useState(false)-- // console.log('panel active state', active)-- return (- <>- <div className="my-6 flex items-center justify-between">- <div>- <h3 className="text-foreground mb-2 text-2xl">Authorised domains</h3>- <p className="text-foreground-muted text-sm">- Turn payment methods on and off in one click – no engineering time required.- </p>- <p className="text-foreground-muted text-sm">- Use our guide to check which payment methods are compatible with your integration.- </p>- </div>- <Button onClick={() => setOpen(true)}>Add domain</Button>- <Modal- size="small"- visible={open}- onCancel={() => setOpen(!open)}- header={- <div className="text-foreground flex items-center gap-2">- <div className="flex items-baseline gap-2">- <h3 className="text-sm">Add a new domain</h3>- </div>- </div>- }- contentStyle={{ padding: 0 }}- hideFooter- >- <Form- id="new-domain-form"- initialValues={{- domain: '',- }}- validateOnBlur- onSubmit={(values: any, { setSubmitting }: any) => {- console.log('submitting domain')- setTimeout(() => {- setSubmitting(false)- dispatchDomainsForm({ type: 'update', values: values })- setOpen(false)- }, 400)- }}- validate={(values) => {- const errors: any = {}- if (!values.domain) {- errors.domain = 'A domain is required'- } else if (- !/^((https?|ftp|smtp):\/\/)?(www.)?[a-z0-9]+\.[a-z]+(\/[a-zA-Z0-9#]+\/?)*$/i.test(- values.domain- )- ) {- errors.domain = 'Not a valid URL. Please use http:// or https://'- }- return errors- }}- >- {({ isSubmitting, errors, touched }: any) => {- // console.log('errors in form', errors)- // console.log('touched in form', touched)- return (- <div className="mb-4 space-y-4 pt-4">- <div className="px-5">- <p className="text-foreground-light text-sm">- This will add a domain to a list of allowed domains that can interact with- your Authentication services for this project.- </p>- </div>- <div className="border-overlay-border border-t"></div>- <div className="px-5">- <Input- id="domain"- name="domain"- label="Domain"- placeholder="https://mydomain.com"- />- </div>- <div className="border-overlay-border border-t"></div>- <div className="px-5">- <Button- form="new-domain-form"- htmlType="submit"- block- size="medium"- loading={isSubmitting}- >- Add domain- </Button>- </div>- </div>- )- }}- </Form>- </Modal>- </div>- </>- )- }-- console.log('RENDER DOMAINS')-- return (- <div className="mx-auto my-8">- <DomainsForm />- <div className="-space-y-px">- {domainsFormState.map((domain) => {- return (- <>- <div- className="bg-surface-100 border-default text-foreground flex items-center- justify-between gap-2- border px-6- py-4 text-sm- first:rounded-tr first:rounded-tl last:rounded-br last:rounded-bl- "- >- <div className="flex items-center gap-2 font-mono">- <span className="text-foreground-muted">- <Globe strokeWidth={2} size={14} />- </span>- {domain}- </div>- <Button- type="default"- icon={<Trash />}- onClick={() => {- setSelected(domain)- setDeleteOpen(true)- }}- >- Remove- </Button>- </div>- </>- )- })}- </div>- <Modal- size="small"- visible={deleteOpen}- onCancel={() => setDeleteOpen(!open)}- header={- <div className="text-foreground flex items-center gap-2">- <div className="flex items-baseline gap-2">- <h3 className="text-sm">Remove domain</h3>- </div>- </div>- }- contentStyle={{ padding: 0 }}- hideFooter- >- <div className="mb-4 space-y-4 pt-4">- <div className="px-5">- <p className="text-foreground-light mb-2 text-sm">- Are you sure you want to remove{' '}- <span className="text-foreground">{selectedDomain}</span>?- </p>- <p className="text-foreground-muted text-sm">- This domain will no longer work with your Authentication configuration.- </p>- </div>- <div className="border-overlay-border border-t"></div>- <div className="flex gap-3 px-5">- <Button- type="secondary"- block- size="medium"- onClick={() => {- // setOpen(!open)- }}- >- Cancel- </Button>- <Button- block- size="medium"- type="warning"- loading={deleteLoading}- onClick={() => {- setDeleteLoading(true)- setTimeout(() => {- dispatchDomainsForm({- type: 'remove',- values: selectedDomain,- })- setDeleteOpen(!deleteOpen)- setDeleteLoading(false)- }, 800)- }}- >- {deleteLoading ? 'Removing...' : 'Remove domain'}- </Button>- </div>- </div>- </Modal>- </div>- )-}--const SmtpForm = () => {- const [active, setActive] = useState(true)-- // panel- const Panel = ({- children,- header,- footer,- }: {- children: React.ReactNode- header?: React.ReactNode- footer?: React.ReactNode- }) => (- <div- className="- bg-surface-100-- border-muted my-8 overflow-hidden rounded-md border shadow"- >- {header && <div className="bg-background border-muted border-b px-8 py-4">{header}</div>}- <div className="space-y-6 py-6">{children}</div>- {footer}- </div>- )-- const Section = ({- children,- header,- }: {- children: React.ReactNode- header?: React.ReactNode- }) => (- <div className="grid grid-cols-12 gap-8 px-8 py-2">- {header && <div className="col-span-4">{header}</div>}- {children}- </div>- )-- return (- <>- <Form- id="general_form"- initialValues={{- enable_smtp: false,- jwt_expiry: 3600,- }}- onSubmit={(values: any, { setSubmitting }: any) => {- setTimeout(() => {- alert(JSON.stringify(values, null, 2))- setSubmitting(false)- }, 400)- }}- validate={(values) => {- const errors: any = {}- if (!values.jwt_expiry) {- errors.jwt_expiry = 'This is required'- }- if (values.jwt_expiry > 604800) {- errors.jwt_expiry =- 'The maxiumum allowed is 604,800 seconds. Use a smaller number of seconds.'- }- return errors- }}- >- {({ isSubmitting, handleReset, values }: any) => (- <Panel- footer={- <>- <div className="border-muted border-t"></div>- <div className="flex justify-end gap-2 py-3 px-6">- <Button- loading={isSubmitting}- type="secondary"- htmlType="reset"- onClick={() => handleReset()}- >- Cancel- </Button>- <Button- loading={isSubmitting}- type="primary"- htmlType="submit"- form="general_form"- >- Save- </Button>- </div>- </>- }- >- {/* <Section- header={- <label className="text-sm text-foreground col-span-4">- Enable SMTP- </label>- }- > */}- <Toggle- // onChange={() => setActive(!active)}- // checked={active}- name="enable_smtp"- className="col-span-8 mx-8"- label="Enable Custom SMTP"- layout="flex"- descriptionText="If this is disabled, new users will not be able to sign up to your application."- />- {/* </Section> */}- <div className="border-muted border-t"></div>- <Section- header={- <div className="w-full">- <label className="text-foreground-light text-sm">SMTP details</label>- <p className="text-foreground-muted text-sm">- These settings can be found in your SMTP provider config- </p>- </div>- }- >- <div className="col-span-8 space-y-6">- <Input label="Sender address" type="url" disabled={!values.enable_smtp} />- <Input label="SMTP server host" disabled={!values.enable_smtp} />- <InputNumber label="SMTP server port" disabled={!values.enable_smtp} />- <Input label="SMTP account username" disabled={!values.enable_smtp} />- <Input- label="SMTP account password"- type="password"- disabled={!values.enable_smtp}- />- </div>- </Section>- {values.enable_smtp && (- <div className="mx-8">- <DocsButton />- </div>- )}- </Panel>- )}- </Form>- </>- )-}--const TemplatesForm = () => {- const [active, setActive] = useState(true)-- // panel- const Panel = ({- children,- header,- footer,- }: {- children: React.ReactNode- header?: React.ReactNode- footer?: React.ReactNode- }) => (- <div- className="- bg-surface-100- border-muted mb-8 overflow-hidden rounded-md border shadow"- >- {header && <div className="bg-background border-muted border-b px-8 py-4">{header}</div>}- <div className="space-y-6 py-6">{children}</div>- {footer}- </div>- )-- const Section = ({- children,- header,- }: {- children: React.ReactNode- header?: React.ReactNode- }) => (- <div className="grid grid-cols-12 gap-8 px-8 py-2">- {header && <div className="col-span-4">{header}</div>}- {children}- </div>- )-- return (- <>- <Form- id="general_form"- initialValues={{- enable_smtp: false,- jwt_expiry: 3600,- }}- onSubmit={(values: any, { setSubmitting }: any) => {- setTimeout(() => {- alert(JSON.stringify(values, null, 2))- setSubmitting(false)- }, 400)- }}- validate={(values) => {- const errors: any = {}- if (!values.jwt_expiry) {- errors.jwt_expiry = 'This is required'- }- if (values.jwt_expiry > 604800) {- errors.jwt_expiry =- 'The maxiumum allowed is 604,800 seconds. Use a smaller number of seconds.'- }- return errors- }}- >- {({ isSubmitting, handleReset, values }: any) => (- <>- <div className="my-4">- <Tabs- defaultActiveId="confirm_signup"- type="underlined"- // listClassNames="px-8"- size="medium"- >- <Tabs.Panel id={'confirm_signup'} label="Confirm Signup" />- <Tabs.Panel id={'reset_password'} label="Reset Password" />- <Tabs.Panel id={'magic_link'} label="Magic Link" />- <Tabs.Panel id={'change_email_address'} label="Change Email Address" />- <Tabs.Panel id={'invite_user'} label="Invite User" />- </Tabs>- </div>- <Panel- footer={- <>- <div className="border-muted border-t"></div>- <div className="flex justify-end gap-2 py-3 px-6">- <Button- loading={isSubmitting}- type="secondary"- htmlType="reset"- onClick={() => handleReset()}- >- Cancel- </Button>- <Button- loading={isSubmitting}- type="primary"- htmlType="submit"- form="general_form"- >- Save- </Button>- </div>- </>- }- >- {/* <Section- header={- <label className="text-sm text-foreground col-span-4">- Enable SMTP- </label>- }- > */}- {/* <Toggle- // onChange={() => setActive(!active)}- // checked={active}- name="enable_smtp"- className="col-span-8 mx-8"- label="Enable Custom SMTP"- layout="flex"- descriptionText="If this is disabled, new users will not be able to sign up to your application."- /> */}- {/* </Section> */}- {/* <div className="border-t border-muted"></div> */}- <Section- header={- <div className="w-full">- <h3 className="text-foreground mb-4 text-base">Confirm Signup</h3>- <p className="text-foreground-muted text-sm">- When a user signs up using an email address and password, you can send them a- confirmation email to verify their registered email address. Learn more- </p>- </div>- }- >- <div className="col-span-8 space-y-6">- <Input label="Sender address" type="url" />- <Input label="SMTP server host" />- <InputNumber label="SMTP server port" />- <Input label="SMTP account username" />- <Input.TextArea- label="SMTP account password"- type="password"- rows={8}- defaultValue={`<h2>Confirm your signup</h2>--<p>Follow this link to confirm your user:</p>-<p><a href="{{ .ConfirmationURL }}">Confirm your mail</a></p>- `}- />- </div>- </Section>- {values.enable_smtp && (- <div className="mx-8">- <DocsButton />- </div>- )}- </Panel>- </>- )}- </Form>- </>- )-}--export function WholeForm() {- return (- <div style={{ width: '820px' }} className="mx-auto">- <Tabs defaultActiveId="one" type="underlined" size="medium">- <Tabs.Panel id="one" label="Sign-in method">- <div className="animate-fade-in space-y-12 py-12">- <div>- <h1 className="text-foreground text-3xl">Sign-in method</h1>- </div>- <div className="border-muted border-t"></div>- <div>- <h3 className="text-foreground mb-2 text-2xl">General settings</h3>- <p className="text-foreground-muted text-sm">- Turn payment methods on and off in one click – no engineering time required.- </p>- <p className="text-foreground-muted text-sm">- Use our guide to check which payment methods are compatible with your integration.- </p>- <CardForm />- </div>- <div>- <h3 className="text-foreground mb-2 text-2xl">Providers</h3>- <p className="text-foreground-muted text-sm">- Turn payment methods on and off in one click – no engineering time required.- </p>- <p className="text-foreground-muted text-sm">- Use our guide to check which payment methods are compatible with your integration.- </p>- <AuthForm />- </div>-- <DomainsForm />- </div>- </Tabs.Panel>- <Tabs.Panel id="two" label="Emails">- <div className="animate-fade-in space-y-12 py-12">- <div>- <h1 className="text-foreground text-3xl">Emails</h1>- </div>- <button- className="- bg-surface-300- border-default- hover:border-strong- group- my-6 flex- w-full items-center- gap-6- rounded-md border px-6- py-4 text-left- shadow-sm- transition- "- >- <div className="bg-brand h-10 w-10 rounded p-1 transition duration-500 group-hover:-rotate-3 group-hover:scale-110">- {/* <img- className="text-white w-12 h-12"- src="/icons/docs-illustration.svg"- /> */}- </div>- <div className="grow">- <h3 className="text-foreground">Use authentication as the backbone of your app</h3>- <p className="text-foreground-muted text-xs">- Learn how to use Supabase Auth with Auth Policies to pick and choose what users- see what.- </p>- <p className="text-brand mt-2 flex items-center gap-1 text-xs">- See Documenation- <span className="transition group-hover:translate-x-1">- <ArrowRight strokeWidth={2} width={12} />- </span>- </p>- </div>- <div className="text-foreground-muted">- <X />- </div>- </button>- <div className="border-muted border-t"></div>- <div>- <h3 className="text-foreground mb-2 text-2xl">Custom SMTP</h3>- <p className="text-foreground-muted text-sm">- You can use your own SMTP server instead of the built-in email service.- </p>- <SmtpForm />- </div>- <div>- <h3 className="text-foreground mb-2 text-2xl">Templates</h3>- <p className="text-foreground-muted text-sm">- You can use your own SMTP server instead of the built-in email service.- </p>- <TemplatesForm />- </div>- </div>- </Tabs.Panel>- </Tabs>- </div>- )-}--export default WholeFormdiff --git a/packages/ui/src/components/Form/examples/AuthFormSchema.json b/packages/ui/src/components/Form/examples/AuthFormSchema.jsondeleted file mode 100644index faf00278cc5..00000000000--- a/packages/ui/src/components/Form/examples/AuthFormSchema.json+++ /dev/null@@ -1,281 +0,0 @@-[- {- "name": "Email",- "icon": "email-icon",- "form": [- {- "type": "text",- "name": "email-app-id",- "label": "email App Id",- "description": ""- },- {- "type": "text",- "name": "email-id-key",- "label": "email client ID",- "description": ""- },- {- "type": "text",- "name": "email-id-key",- "label": "email client ID",- "description": ""- },- {- "type": "text",- "name": "email-id-key",- "label": "email client ID",- "description": ""- }- ]- },- {- "name": "Phone",- "icon": "phone-icon",- "form": [- {- "type": "select",- "name": "phone-app-provider",- "label": "Phone service provider",- "description": "You can use a provider etc etc"- },- {- "type": "text",- "name": "phone-id-key",- "label": "phone client ID",- "description": ""- },- {- "type": "text",- "name": "phone-id-key",- "label": "phone client ID",- "description": ""- },- {- "type": "text",- "name": "phone-id-key",- "label": "phone client ID",- "description": ""- }- ]- },- {- "name": "Google",- "icon": "google-icon",- "form": [- {- "type": "text",- "name": "google-app-id",- "label": "Google App Id",- "description": ""- },- {- "type": "text",- "name": "google-id-key",- "label": "Google client ID",- "description": ""- }- ]- },- {- "name": "Facebook",- "icon": "facebook-icon",- "form": [- {- "type": "text",- "name": "facebook-app-id",- "label": "Facebook App Id",- "description": ""- },- {- "type": "text",- "name": "facebook-id-key",- "label": "Facebook client ID",- "description": ""- }- ]- },- {- "name": "Twitter",- "icon": "twitter-icon",- "form": [- {- "type": "text",- "name": "twitter-app-id",- "label": "Twitter App Id",- "description": ""- },- {- "type": "text",- "name": "twitter-id-key",- "label": "Twitter client ID",- "description": ""- }- ]- },- {- "name": "Apple",- "icon": "apple-icon",- "form": [- {- "type": "text",- "name": "apple-app-id",- "label": "Apple App Id",- "description": ""- },- {- "type": "text",- "name": "apple-id-key",- "label": "Apple client ID",- "description": ""- }- ]- },- {- "name": "Microsoft",- "icon": "microsoft-icon",- "form": [- {- "type": "text",- "name": "microsoft-app-id",- "label": "Microsoft App Id",- "description": ""- },- {- "type": "text",- "name": "microsoft-id-key",- "label": "Microsoft client ID",- "description": ""- }- ]- },- {- "name": "Gitlab",- "icon": "gitlab-icon",- "form": [- {- "type": "text",- "name": "gitlab-app-id",- "label": "Gitlab App Id",- "description": ""- },- {- "type": "text",- "name": "gitlab-id-key",- "label": "Gitlab client ID",- "description": ""- }- ]- },-- {- "name": "Bitbucket",- "icon": "bitbucket-icon",- "form": [- {- "type": "text",- "name": "bitbucket-app-id",- "label": "Bitbucket App Id",- "description": ""- },- {- "type": "text",- "name": "bitbucket-id-key",- "label": "Bitbucket client ID",- "description": ""- }- ]- },- {- "name": "Discord",- "icon": "discord-icon",- "form": [- {- "type": "text",- "name": "discord-app-id",- "label": "Discord App Id",- "description": ""- },- {- "type": "text",- "name": "discord-id-key",- "label": "Discord client ID",- "description": ""- }- ]- },-- {- "name": "Github",- "icon": "github-icon-dark",- "form": [- {- "type": "text",- "name": "github-app-id",- "label": "Github App Id",- "description": ""- },- {- "type": "text",- "name": "github-id-key",- "label": "Github client ID",- "description": ""- }- ]- },-- {- "name": "Slack",- "icon": "slack-icon",- "form": [- {- "type": "text",- "name": "slack-app-id",- "label": "Slack App Id",- "description": ""- },- {- "type": "text",- "name": "slack-id-key",- "label": "Slack client ID",- "description": ""- }- ]- },- {- "name": "Spotify",- "icon": "spotify-icon",- "form": [- {- "type": "text",- "name": "spotify-app-id",- "label": "Spotify App Id",- "description": ""- },- {- "type": "text",- "name": "spotify-id-key",- "label": "Spotify client ID",- "description": ""- }- ]- },- {- "name": "Twitch",- "icon": "twitch-icon",- "form": [- {- "type": "text",- "name": "twitch-app-id",- "label": "Twitch App Id",- "description": ""- },- {- "type": "text",- "name": "twitch-id-key",- "label": "Twitch client ID",- "description": ""- }- ]- }-]diff --git a/packages/ui/src/components/Form/examples/PhoneProvidersSchema.json b/packages/ui/src/components/Form/examples/PhoneProvidersSchema.jsondeleted file mode 100644index eb38715495a..00000000000--- a/packages/ui/src/components/Form/examples/PhoneProvidersSchema.json+++ /dev/null@@ -1,36 +0,0 @@- {- "name": "Twilio",- "icon": "twilio-icon",- "form": [- {- "type": "text",- "name": "twilio-app-id",- "label": "Enable twilio Provider",- "description": ""- },- {- "type": "text",- "name": "twilio-id-key",- "label": "twilio client ID",- "description": ""- }- ]- },- {- "name": "Messagebird",- "icon": "messagebird-icon",- "form": [- {- "type": "text",- "name": "messagebird-app-id",- "label": "Enable gitlab messagebird",- "description": ""- },- {- "type": "text",- "name": "messagebird-id-key",- "label": "messagebird client ID",- "description": ""- }- ]- }\ No newline at end of filediff --git a/packages/ui/src/components/Icon/Icon.module.css b/packages/ui/src/components/Icon/Icon.module.cssdeleted file mode 100644index 14798373b2d..00000000000--- a/packages/ui/src/components/Icon/Icon.module.css+++ /dev/null@@ -1,39 +0,0 @@-/* .sbui-icon-container {- @apply flex-shrink-0 flex items-center justify-center rounded-full p-3;-}--.sbui-icon-container--brand {- @apply bg-brand-300 bg-opacity-10 text-brand-300;-}--.sbui-icon-container--gray {- @apply bg-gray-600 bg-opacity-10 text-gray-500;-}--.sbui-icon-container--red {- @apply bg-red-600 bg-opacity-10 text-red-500;-}--.sbui-icon-container--yellow {- @apply bg-yellow-600 bg-opacity-10 text-yellow-500;-}--.sbui-icon-container--green {- @apply bg-green-600 bg-opacity-10 text-green-500;-}--.sbui-icon-container--blue {- @apply bg-blue-600 bg-opacity-10 text-blue-500;-}--.sbui-icon-container--indigo {- @apply bg-indigo-600 bg-opacity-10 text-indigo-500;-}--.sbui-icon-container--purple {- @apply bg-purple-600 bg-opacity-10 text-purple-500;-}--.sbui-icon-container--pink {- @apply bg-pink-600 bg-opacity-10 text-pink-500;-} */diff --git a/packages/ui/src/components/Icon/Icon.tsx b/packages/ui/src/components/Icon/Icon.tsxdeleted file mode 100644index f9717d9882a..00000000000--- a/packages/ui/src/components/Icon/Icon.tsx+++ /dev/null@@ -1,115 +0,0 @@-'use client'--import React from 'react'-import { IconContext } from './IconContext'--import styleHandler from '../../lib/theme/styleHandler'-// @ts-ignore-// import IconStyles from './Icon.module.css'--const IconStyles = {}--interface Props {- className?: string- size?: 'tiny' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | number- type?: string- color?: string- strokeWidth?: number- fill?: string- stroke?: string- background?: 'brand' | 'gray' | 'red' | 'yellow' | 'green' | 'blue' | 'indigo' | 'purple' | 'pink'- src: React.ReactNode-}--interface StringMap {- [key: string]: number-}--function Icon({- className,- size,- type,- color,- strokeWidth,- fill = undefined,- stroke = undefined,- background,- src,- ...props-}: Props) {- const __styles = styleHandler('icon')-- return (- <IconContext.Consumer>- {({ contextSize, className: contextClassName }) => {- const defaultSizes: StringMap = {- tiny: 14,- small: 18,- medium: 20,- large: 20,- xlarge: 24,- xxlarge: 30,- xxxlarge: 42,- }-- const defaultSize = defaultSizes['large']-- // const iconSize = typeof size === 'string' ? defaultSizes[contextSize] : 21- let iconSize: any = 21-- // use contextSize of parent (via context hook) if one exists- if (contextSize) {- iconSize = contextSize- ? typeof contextSize === 'string'- ? defaultSizes[contextSize]- : contextSize- : defaultSize- }-- // use size prop of this component if one exists- if (size) {- iconSize = size ? (typeof size === 'string' ? defaultSizes[size] : size) : defaultSize- }-- // confitional used for Icons with no color settings- // default these icons to use 'currentColor' ie, the text color- const noColor = !color && !fill && !stroke-- let classes = ['sbui-icon', className]- if (contextClassName) {- classes.push(contextClassName)- }-- const Icon = (- // custom SVG file- <svg- xmlns="http://www.w3.org/2000/svg"- color={!noColor ? color : 'currentColor'}- fill={!noColor ? (fill ? fill : 'none') : 'none'}- stroke={!noColor ? stroke : 'currentColor'}- strokeWidth={strokeWidth}- className={classes.join(' ')}- width={iconSize}- height={iconSize}- {...props}- >- {src}- </svg>- )-- return background ? (- <div- // circle coloured background- className={__styles.container}- >- {Icon}- </div>- ) : (- Icon- )- }}- </IconContext.Consumer>- )-}--export default Icondiff --git a/packages/ui/src/components/Icon/index.tsx b/packages/ui/src/components/Icon/index.tsxdeleted file mode 100644index 7aebbe9de7e..00000000000--- a/packages/ui/src/components/Icon/index.tsx+++ /dev/null@@ -1 +0,0 @@-export * from './Icon'diff --git a/packages/ui/src/components/LogoLoader/index.ts b/packages/ui/src/components/LogoLoader/index.tsindex 2a44d0cbd64..03b8ae5cfd4 100644--- a/packages/ui/src/components/LogoLoader/index.ts+++ b/packages/ui/src/components/LogoLoader/index.ts@@ -1,3 +1 @@-import LogoLoader from './LogoLoader'--export default LogoLoader+export { default as LogoLoader } from './LogoLoader'diff --git a/packages/ui/src/components/ThemeProvider/prefixedThemes.ts b/packages/ui/src/components/ThemeProvider/prefixedThemes.tsdeleted file mode 100644index cee9d1cec90..00000000000--- a/packages/ui/src/components/ThemeProvider/prefixedThemes.ts+++ /dev/null@@ -1,9 +0,0 @@-export interface ThemePrefix {- name: string- value: string- supports?: 'dark' | 'light'[]-}--export const prefixedThemes = [- { name: 'Deep dark', value: 'deep', supports: ['dark'] }, // Deep Dark Supabase dark-]diff --git a/packages/ui/src/components/Upload/Upload.module.css b/packages/ui/src/components/Upload/Upload.module.cssdeleted file mode 100644index 56056bde222..00000000000--- a/packages/ui/src/components/Upload/Upload.module.css+++ /dev/null@@ -1,7 +0,0 @@-.sbui-upload-dragger {- @apply cursor-pointer max-w-lg flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md;-}--.sbui-upload-dragger--dragged {- @apply bg-brand-100;-}diff --git a/packages/ui/src/components/Upload/Upload.tsx b/packages/ui/src/components/Upload/Upload.tsxdeleted file mode 100644index 63ec67ad8af..00000000000--- a/packages/ui/src/components/Upload/Upload.tsx+++ /dev/null@@ -1,87 +0,0 @@-'use client'--import React from 'react'-import { FormLayout } from '../../lib/Layout/FormLayout/FormLayout'-// @ts-ignore-// import UploadStyles from './Upload.module.css'--function Upload({ label, children }: any) {- return <h1>WIP</h1>-}--function Dragger({ label, afterLabel, beforeLabel, layout, children, files, setFiles }: any) {- // const [classes, setClasses] = useState([UploadStyles['sbui-upload-dragger']])-- // const draggedCssClass = UploadStyles['sbui-upload-dragger--dragged']-- const dragOver = (e: any) => {- e.preventDefault()-- // if (!classes.includes(draggedCssClass)) {- // let originalClasses = classes- // originalClasses.push(draggedCssClass)- // setClasses(originalClasses)- // }- }-- const dragEnter = (e: any) => {- e.preventDefault()- // if (!classes.includes(draggedCssClass)) {- // let originalClasses = classes- // originalClasses.push(draggedCssClass)- // setClasses(originalClasses)- // }- }-- const dragLeave = (e: any) => {- e.preventDefault()-- // if (classes.includes(draggedCssClass)) {- // let newClasses = classes-- // for (var i = 0; i < newClasses.length; i++) {- // if (newClasses[i] === draggedCssClass) {- // newClasses.splice(i, 1)- // }- // }- // setClasses(newClasses)- // }- }-- const fileDrop = (e: any) => {- e.preventDefault()- const newFiles = e.dataTransfer.files- setFiles([...files, ...newFiles])- }-- const fileUpload = (e: React.ChangeEvent<HTMLInputElement>) => {- e.preventDefault()- const newFiles = e.target.files || []- // @ts-ignore- setFiles([...files, ...newFiles])- }-- return (- <div onDragOver={dragOver} onDragEnter={dragEnter} onDragLeave={dragLeave} onDrop={fileDrop}>- <FormLayout label={label} afterLabel={afterLabel} beforeLabel={beforeLabel} layout={layout}>- <label- htmlFor="file-upload"- // className={classes.join(' ')}- >- <input- id="file-upload"- name="file-upload"- type="file"- // className="sr-only"- onChange={fileUpload}- />-- {children}- </label>- </FormLayout>- </div>- )-}--Upload.Dragger = Dragger-export default Uploaddiff --git a/packages/ui/src/components/Upload/index.tsx b/packages/ui/src/components/Upload/index.tsxdeleted file mode 100644index d261516b701..00000000000--- a/packages/ui/src/components/Upload/index.tsx+++ /dev/null@@ -1,3 +0,0 @@-import Upload from './Upload'-export default Upload-export { default as Upload } from './Upload'diff --git a/packages/ui/src/lib/events.ts b/packages/ui/src/lib/events.tsdeleted file mode 100644index 2928dfa82e1..00000000000--- a/packages/ui/src/lib/events.ts+++ /dev/null@@ -1 +0,0 @@-export const TAB_CHANGE_EVENT_NAME = 'sb_ui_component_tab_change'