mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
This PR migrates the whole monorepo to use Tailwind v4: - Removed `@tailwindcss/container-queries` plugin since it's included by default in v4, - Bump all instances of Tailwind to v4. Made minimal changes to the shared config to remove non-supported features (`alpha` mentions), - Migrate all apps to be compatible with v4 configs, - Fix the `typography.css` import in 3 apps, - Add missing rules which were included by default in v3, - Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot of classes - Rename all misnamed classes according to https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all apps. --------- Co-authored-by: Jordi Enric <jordi.err@gmail.com>
80 lines
2.7 KiB
TypeScript
80 lines
2.7 KiB
TypeScript
'use client'
|
|
|
|
import { Calculator, Calendar, CreditCard, Settings, Smile, User } from 'lucide-react'
|
|
import * as React from 'react'
|
|
import {
|
|
CommandDialog,
|
|
CommandEmpty_Shadcn_,
|
|
CommandGroup_Shadcn_,
|
|
CommandInput_Shadcn_,
|
|
CommandItem_Shadcn_,
|
|
CommandList_Shadcn_,
|
|
CommandSeparator_Shadcn_,
|
|
CommandShortcut_Shadcn_,
|
|
} from 'ui'
|
|
|
|
export default function CommandDialogDemo() {
|
|
const [open, setOpen] = React.useState(false)
|
|
|
|
React.useEffect(() => {
|
|
const down = (e: KeyboardEvent) => {
|
|
if (e.key === 'j' && (e.metaKey || e.ctrlKey)) {
|
|
e.preventDefault()
|
|
setOpen((open) => !open)
|
|
}
|
|
}
|
|
|
|
document.addEventListener('keydown', down)
|
|
return () => document.removeEventListener('keydown', down)
|
|
}, [])
|
|
|
|
return (
|
|
<>
|
|
<p className="text-sm text-muted-foreground">
|
|
Press{' '}
|
|
<kbd className="pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-sm border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100">
|
|
<span className="text-xs">⌘</span>J
|
|
</kbd>
|
|
</p>
|
|
<CommandDialog open={open} onOpenChange={setOpen}>
|
|
<CommandInput_Shadcn_ placeholder="Type a command or search..." />
|
|
<CommandList_Shadcn_>
|
|
<CommandEmpty_Shadcn_>No results found.</CommandEmpty_Shadcn_>
|
|
<CommandGroup_Shadcn_ heading="Suggestions">
|
|
<CommandItem_Shadcn_>
|
|
<Calendar className="mr-2 h-4 w-4" />
|
|
<span>Calendar</span>
|
|
</CommandItem_Shadcn_>
|
|
<CommandItem_Shadcn_>
|
|
<Smile className="mr-2 h-4 w-4" />
|
|
<span>Search Emoji</span>
|
|
</CommandItem_Shadcn_>
|
|
<CommandItem_Shadcn_>
|
|
<Calculator className="mr-2 h-4 w-4" />
|
|
<span>Calculator</span>
|
|
</CommandItem_Shadcn_>
|
|
</CommandGroup_Shadcn_>
|
|
<CommandSeparator_Shadcn_ />
|
|
<CommandGroup_Shadcn_ heading="Settings">
|
|
<CommandItem_Shadcn_>
|
|
<User className="mr-2 h-4 w-4" />
|
|
<span>Profile</span>
|
|
<CommandShortcut_Shadcn_>⌘P</CommandShortcut_Shadcn_>
|
|
</CommandItem_Shadcn_>
|
|
<CommandItem_Shadcn_>
|
|
<CreditCard className="mr-2 h-4 w-4" />
|
|
<span>Billing</span>
|
|
<CommandShortcut_Shadcn_>⌘B</CommandShortcut_Shadcn_>
|
|
</CommandItem_Shadcn_>
|
|
<CommandItem_Shadcn_>
|
|
<Settings className="mr-2 h-4 w-4" />
|
|
<span>Settings</span>
|
|
<CommandShortcut_Shadcn_>⌘S</CommandShortcut_Shadcn_>
|
|
</CommandItem_Shadcn_>
|
|
</CommandGroup_Shadcn_>
|
|
</CommandList_Shadcn_>
|
|
</CommandDialog>
|
|
</>
|
|
)
|
|
}
|