{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "preview", "title": "Home", "registryDependencies": [ "alert-dialog", "avatar", "badge", "button", "button-group", "card", "checkbox", "combobox", "dropdown-menu", "empty", "field", "input", "input-group", "item", "label", "popover", "radio-group", "select", "separator", "sheet", "slider", "spinner", "switch", "textarea", "tooltip", "example" ], "files": [ { "path": "registry/radix-vega/blocks/preview.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"@/registry/radix-vega/ui/alert-dialog\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarImage,\n} from \"@/registry/radix-vega/ui/avatar\"\nimport { Badge } from \"@/registry/radix-vega/ui/badge\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport { ButtonGroup } from \"@/registry/radix-vega/ui/button-group\"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/radix-vega/ui/card\"\nimport { Checkbox } from \"@/registry/radix-vega/ui/checkbox\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n} from \"@/registry/radix-vega/ui/combobox\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-vega/ui/dropdown-menu\"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from \"@/registry/radix-vega/ui/empty\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n InputGroupText,\n InputGroupTextarea,\n} from \"@/registry/radix-vega/ui/input-group\"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemMedia,\n ItemTitle,\n} from \"@/registry/radix-vega/ui/item\"\nimport { Label } from \"@/registry/radix-vega/ui/label\"\nimport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n} from \"@/registry/radix-vega/ui/popover\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-vega/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\nimport { Separator } from \"@/registry/radix-vega/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/registry/radix-vega/ui/sheet\"\nimport { Slider } from \"@/registry/radix-vega/ui/slider\"\nimport { Spinner } from \"@/registry/radix-vega/ui/spinner\"\nimport { Switch } from \"@/registry/radix-vega/ui/switch\"\nimport { Textarea } from \"@/registry/radix-vega/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-vega/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CoverExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction FieldExamples() {\n const [gpuCount, setGpuCount] = React.useState(8)\n const [value, setValue] = useState([200, 800])\n const handleGpuAdjustment = React.useCallback((adjustment: number) => {\n setGpuCount((prevCount) =>\n Math.max(1, Math.min(99, prevCount + adjustment))\n )\n }, [])\n\n const handleGpuInputChange = React.useCallback(\n (e: React.ChangeEvent) => {\n const value = parseInt(e.target.value, 10)\n if (!isNaN(value) && value >= 1 && value <= 99) {\n setGpuCount(value)\n }\n },\n []\n )\n\n return (\n \n
\n \n
\n Compute Environment\n \n Select the compute environment for your cluster.\n \n \n \n \n \n Kubernetes\n \n Run GPU workloads on a K8s configured cluster. This is the\n default.\n \n \n \n \n \n \n \n \n Virtual Machine\n \n Access a VM configured cluster to run workloads. (Coming\n soon)\n \n \n \n \n \n \n
\n \n \n \n \n Number of GPUs\n \n You can add more later.\n \n \n \n handleGpuAdjustment(-1)}\n disabled={gpuCount <= 1}\n >\n \n \n handleGpuAdjustment(1)}\n disabled={gpuCount >= 99}\n >\n \n \n \n \n \n \n \n Wallpaper Tinting\n \n Allow the wallpaper to be tinted.\n \n \n \n \n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n \n Price Range\n \n Set your budget range ($\n \n {value[0]}\n -{\" \"}\n {value[1]}).\n \n setValue(val as number[])}\n max={1000}\n min={0}\n step={10}\n className=\"mt-2 w-full\"\n aria-label=\"Price Range\"\n />\n \n \n \n \n \n
\n
\n
\n )\n}\n\nfunction ButtonGroupExamples() {\n const [label, setLabel] = React.useState(\"personal\")\n\n return (\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mark as Read\n \n \n \n Archive\n \n \n \n \n \n \n Snooze\n \n \n \n Add to Calendar\n \n \n \n Add to List\n \n \n \n \n Label As...\n \n \n \n \n Personal\n \n \n Work\n \n \n Other\n \n \n \n \n \n \n \n \n \n Trash\n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Quick Actions\n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Block User\n \n \n \n \n Conversation\n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n Report Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Agent Tasks\n \n Describe your task in natural language. Copilot will work\n in the background and open a pull request.\n \n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n )\n}\n\nfunction InputGroupExamples() {\n const [isFavorite, setIsFavorite] = React.useState(false)\n const [voiceEnabled, setVoiceEnabled] = React.useState(false)\n\n return (\n \n
\n \n \n \n \n \n 12 results\n \n \n \n \n https://\n \n \n \n \n \n \n \n \n This is content in a tooltip.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

Your connection is not secure.

\n

\n You should not enter any sensitive information on this site.\n

\n \n
\n \n https://\n \n \n setIsFavorite(!isFavorite)}\n size=\"icon-xs\"\n aria-label=\"Favorite\"\n >\n \n \n \n
\n
\n \n \n \n \n \n \n \n \n \n \n setVoiceEnabled(!voiceEnabled)}\n data-active={voiceEnabled}\n className=\"data-[active=true]:bg-primary data-[active=true]:text-primary-foreground\"\n aria-pressed={voiceEnabled}\n size=\"icon-xs\"\n aria-label=\"Voice Mode\"\n >\n \n \n \n Voice Mode\n \n \n \n \n \n \n \n \n \n \n \n \n \n Auto\n \n \n Auto\n Agent\n Manual\n \n \n 52% used\n \n \n \n Send\n \n \n \n
\n
\n )\n}\n\nfunction EmptyAvatarGroup() {\n return (\n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n No Team Members\n \n Invite your team to collaborate on this project.\n \n \n \n
\n \n \n \n \n \n \n Are you absolutely sure?\n \n This action cannot be undone. This will permanently delete\n your account and remove your data from our servers.\n \n \n \n Cancel\n Continue\n \n \n \n \n \n \n \n \n \n \n \n \n \n Allow accessory to connect?\n \n \n Do you want to allow the USB accessory to connect to this\n device?\n \n \n \n Don't allow\n Allow\n \n \n \n
\n
\n
\n
\n )\n}\n\nfunction FormExample() {\n return (\n \n \n \n Payment Method\n \n All transactions are secure and encrypted\n \n \n \n
\n \n
\n \n \n \n Name on Card\n \n \n \n
\n \n \n Card Number\n \n \n \n Enter your 16-digit number.\n \n \n \n CVV\n \n \n
\n
\n \n \n Month\n \n \n \n \n \n Year\n \n \n \n
\n
\n
\n \n
\n Billing Address\n \n The billing address associated with your payment.\n \n \n \n \n \n Same as shipping address\n \n \n \n
\n \n
\n \n \n \n Comments\n \n \n \n \n
\n \n \n \n \n
\n
\n
\n
\n
\n )\n}\n\nconst frameworks = [\n \"Next.js\",\n \"SvelteKit\",\n \"Nuxt.js\",\n \"Remix\",\n \"Astro\",\n] as const\n\nfunction SmallFormExample() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n const [theme, setTheme] = React.useState(\"light\")\n\n return (\n \n \n \n User Information\n Please fill in your details below\n \n \n \n \n \n \n \n File\n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n \n Open Recent\n \n \n \n \n Recent Projects\n \n \n Project Alpha\n \n \n \n Project Beta\n \n \n \n \n More Projects\n \n \n \n \n \n Project Gamma\n \n \n \n Project Delta\n \n \n \n \n \n \n \n \n \n Browse...\n \n \n \n \n \n \n \n \n Save\n ⌘S\n \n \n \n Export\n ⇧⌘E\n \n \n \n \n View\n \n setNotifications({\n ...notifications,\n email: checked === true,\n })\n }\n >\n \n Show Sidebar\n \n \n setNotifications({\n ...notifications,\n sms: checked === true,\n })\n }\n >\n \n Show Status Bar\n \n \n \n \n Theme\n \n \n \n \n Appearance\n \n \n \n Light\n \n \n \n Dark\n \n \n \n System\n \n \n \n \n \n \n \n \n \n \n \n Help & Support\n \n \n \n Documentation\n \n \n \n \n \n \n Sign Out\n ⇧⌘Q\n \n \n \n \n \n \n \n
\n \n
\n \n Name\n \n \n \n Role\n \n \n
\n \n \n Framework\n \n \n \n \n No frameworks found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n Comments\n \n \n \n \n \n \n
\n
\n
\n
\n
\n )\n}\n\nfunction ObservabilityCard() {\n return (\n \n \n
\n \n \n Observability Plus is replacing Monitoring\n \n Switch to the improved way to explore your data, with natural\n language. Monitoring will no longer be available on the Pro plan in\n November, 2025\n \n \n \n \n \n Warning\n \n \n \n \n )\n}\n\nfunction FieldSlider() {\n const [value, setValue] = useState([200, 800])\n return (\n \n
\n \n Price Range\n \n Set your budget range ($\n {value[0]} -{\" \"}\n {value[1]}).\n \n \n \n
\n
\n )\n}\n\nfunction ItemExample() {\n return (\n \n
\n \n \n Two-factor authentication\n \n Verify via email or phone number.\n \n \n \n \n \n \n \n \n \n \n \n \n Your order has been shipped.\n \n \n \n
\n
\n )\n}\n\nfunction BadgeExamples() {\n return (\n \n
\n \n \n Syncing\n \n \n \n Updating\n \n \n \n Loading\n \n \n \n Link\n \n
\n
\n )\n}\n\nfunction EmptyWithSpinner() {\n return (\n \n \n \n \n \n \n Processing your request\n \n Please wait while we process your request. Do not refresh the page.\n \n \n \n
\n \n \n
\n
\n
\n
\n )\n}\n\nconst SHEET_SIDES = [\"top\", \"right\", \"bottom\", \"left\"] as const\n\nfunction SheetExample() {\n return (\n \n
\n {SHEET_SIDES.map((side) => (\n \n \n \n \n \n \n Edit profile\n \n Make changes to your profile here. Click save when you're\n done.\n \n \n
\n {Array.from({ length: 10 }).map((_, index) => (\n \n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed\n do eiusmod tempor incididunt ut labore et dolore magna\n aliqua. Ut enim ad minim veniam, quis nostrud exercitation\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n Duis aute irure dolor in reprehenderit in voluptate velit\n esse cillum dolore eu fugiat nulla pariatur. Excepteur sint\n occaecat cupidatat non proident, sunt in culpa qui officia\n deserunt mollit anim id est laborum.\n

\n ))}\n
\n \n \n \n \n \n \n \n
\n ))}\n
\n
\n )\n}\n", "type": "registry:block" } ], "type": "registry:block" }