mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-03 03:18:52 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
31 lines
3.6 KiB
JSON
31 lines
3.6 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "otp-03",
|
|
"title": "OTP 03",
|
|
"description": "An OTP page with a muted background color.",
|
|
"registryDependencies": [
|
|
"button",
|
|
"card",
|
|
"input-otp",
|
|
"label",
|
|
"field"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/base-nova/blocks/otp-03/page.tsx",
|
|
"content": "\"use client\"\n\nimport { OTPForm } from \"@/registry/base-nova/blocks/otp-03/components/otp-form\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function OTPPage() {\n return (\n <div className=\"bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10\">\n <div className=\"flex w-full max-w-xs flex-col gap-6\">\n <a href=\"#\" className=\"flex items-center gap-2 self-center font-medium\">\n <div className=\"bg-primary text-primary-foreground flex size-6 items-center justify-center rounded-md\">\n <IconPlaceholder\n lucide=\"GalleryVerticalEndIcon\"\n tabler=\"IconLayoutRows\"\n hugeicons=\"LayoutBottomIcon\"\n phosphor=\"RowsIcon\"\n remixicon=\"RiGalleryLine\"\n className=\"size-4\"\n />\n </div>\n Acme Inc.\n </a>\n <OTPForm />\n </div>\n </div>\n )\n}\n",
|
|
"type": "registry:page",
|
|
"target": "app/otp/page.tsx"
|
|
},
|
|
{
|
|
"path": "registry/base-nova/blocks/otp-03/components/otp-form.tsx",
|
|
"content": "import { Button } from \"@/registry/base-nova/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/base-nova/ui/card\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/base-nova/ui/field\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n} from \"@/registry/base-nova/ui/input-otp\"\n\nexport function OTPForm({ ...props }: React.ComponentProps<typeof Card>) {\n return (\n <Card {...props}>\n <CardHeader className=\"text-center\">\n <CardTitle className=\"text-xl\">Enter verification code</CardTitle>\n <CardDescription>We sent a 6-digit code to your email.</CardDescription>\n </CardHeader>\n <CardContent>\n <form>\n <FieldGroup>\n <Field>\n <FieldLabel htmlFor=\"otp\" className=\"sr-only\">\n Verification code\n </FieldLabel>\n <InputOTP maxLength={6} id=\"otp\" required>\n <InputOTPGroup className=\"gap-2.5 *:data-[slot=input-otp-slot]:rounded-md *:data-[slot=input-otp-slot]:border\">\n <InputOTPSlot index={0} />\n <InputOTPSlot index={1} />\n <InputOTPSlot index={2} />\n <InputOTPSlot index={3} />\n <InputOTPSlot index={4} />\n <InputOTPSlot index={5} />\n </InputOTPGroup>\n </InputOTP>\n <FieldDescription className=\"text-center\">\n Enter the 6-digit code sent to your email.\n </FieldDescription>\n </Field>\n <Button type=\"submit\">Verify</Button>\n <FieldDescription className=\"text-center\">\n Didn't receive the code? <a href=\"#\">Resend</a>\n </FieldDescription>\n </FieldGroup>\n </form>\n </CardContent>\n </Card>\n )\n}\n",
|
|
"type": "registry:component"
|
|
}
|
|
],
|
|
"categories": [
|
|
"authentication",
|
|
"otp"
|
|
],
|
|
"type": "registry:block"
|
|
} |