diff --git a/apps/ui/public/r/field.json b/apps/ui/public/r/field.json index 11ec34b19..b94c302e5 100644 --- a/apps/ui/public/r/field.json +++ b/apps/ui/public/r/field.json @@ -8,7 +8,7 @@ "files": [ { "path": "registry/default/ui/field.tsx", - "content": "\"use client\";\n\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\";\n\nimport { cn } from \"@/registry/default/lib/utils\";\n\nfunction Field({ className, ...props }: FieldPrimitive.Root.Props) {\n return (\n \n );\n}\n\nfunction FieldLabel({ className, ...props }: FieldPrimitive.Label.Props) {\n return (\n \n );\n}\n\nfunction FieldDescription({\n className,\n ...props\n}: FieldPrimitive.Description.Props) {\n return (\n \n );\n}\n\nfunction FieldError({ className, ...props }: FieldPrimitive.Error.Props) {\n return (\n \n );\n}\n\nconst FieldControl = FieldPrimitive.Control;\nconst FieldValidity = FieldPrimitive.Validity;\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldControl,\n FieldValidity,\n};\n", + "content": "\"use client\";\n\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\";\n\nimport { cn } from \"@/registry/default/lib/utils\";\n\nfunction Field({ className, ...props }: FieldPrimitive.Root.Props) {\n return (\n \n );\n}\n\nfunction FieldItem({ className, ...props }: FieldPrimitive.Item.Props) {\n return (\n \n );\n}\n\nfunction FieldLabel({ className, ...props }: FieldPrimitive.Label.Props) {\n return (\n \n );\n}\n\nfunction FieldDescription({\n className,\n ...props\n}: FieldPrimitive.Description.Props) {\n return (\n \n );\n}\n\nfunction FieldError({ className, ...props }: FieldPrimitive.Error.Props) {\n return (\n \n );\n}\n\nconst FieldControl = FieldPrimitive.Control;\nconst FieldValidity = FieldPrimitive.Validity;\n\nexport {\n Field,\n FieldItem,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldControl,\n FieldValidity,\n};\n", "type": "registry:ui" } ], diff --git a/apps/ui/public/r/p-checkbox-group-5.json b/apps/ui/public/r/p-checkbox-group-5.json index 43a9fa666..f22811748 100644 --- a/apps/ui/public/r/p-checkbox-group-5.json +++ b/apps/ui/public/r/p-checkbox-group-5.json @@ -15,7 +15,7 @@ "files": [ { "path": "registry/default/particles/p-checkbox-group-5.tsx", - "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Button } from \"@/registry/default/ui/button\";\nimport { Checkbox } from \"@/registry/default/ui/checkbox\";\nimport { CheckboxGroup } from \"@/registry/default/ui/checkbox-group\";\nimport { Field, FieldLabel } from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\nimport { Form } from \"@/registry/default/ui/form\";\nimport { Label } from \"@/registry/default/ui/label\";\n\nexport default function Particle() {\n const [loading, setLoading] = React.useState(false);\n const onSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n const formData = new FormData(e.currentTarget);\n setLoading(true);\n await new Promise((r) => setTimeout(r, 800));\n setLoading(false);\n const frameworks = formData.getAll(\"frameworks\") as string[];\n alert(`Selected: ${frameworks.join(\", \") || \"none\"}`);\n };\n\n return (\n \n }\n >\n }>\n Frameworks\n \n \n \n \n Next.js\n \n \n \n Vite\n \n \n \n Astro\n \n \n \n \n Submit\n \n \n );\n}\n", + "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Button } from \"@/registry/default/ui/button\";\nimport { Checkbox } from \"@/registry/default/ui/checkbox\";\nimport { CheckboxGroup } from \"@/registry/default/ui/checkbox-group\";\nimport {\n Field,\n FieldDescription,\n FieldItem,\n FieldLabel,\n} from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\nimport { Form } from \"@/registry/default/ui/form\";\n\nexport default function Particle() {\n const [loading, setLoading] = React.useState(false);\n const onSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n const formData = new FormData(e.currentTarget);\n setLoading(true);\n await new Promise((r) => setTimeout(r, 800));\n setLoading(false);\n const frameworks = formData.getAll(\"frameworks\") as string[];\n alert(`Selected: ${frameworks.join(\", \") || \"none\"}`);\n };\n\n return (\n \n \n }\n >\n \n Frameworks\n \n \n \n \n Next.js\n \n Next.js is a React framework for building web applications.\n \n \n \n \n \n Vite\n \n \n \n Astro\n \n \n \n \n Submit\n \n \n );\n}\n", "type": "registry:block" } ], diff --git a/apps/ui/public/r/p-field-13.json b/apps/ui/public/r/p-field-13.json index 18c63945a..f52dfcf11 100644 --- a/apps/ui/public/r/p-field-13.json +++ b/apps/ui/public/r/p-field-13.json @@ -12,7 +12,7 @@ "files": [ { "path": "registry/default/particles/p-field-13.tsx", - "content": "\"use client\";\n\nimport { Checkbox } from \"@/registry/default/ui/checkbox\";\nimport { CheckboxGroup } from \"@/registry/default/ui/checkbox-group\";\nimport { Field, FieldLabel } from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\n\nexport default function Particle() {\n return (\n \n \n Frameworks\n \n \n \n \n React\n \n \n \n \n Vue\n \n \n \n \n Svelte\n \n \n \n \n );\n}\n", + "content": "\"use client\";\n\nimport { Checkbox } from \"@/registry/default/ui/checkbox\";\nimport { CheckboxGroup } from \"@/registry/default/ui/checkbox-group\";\nimport { Field, FieldItem, FieldLabel } from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\n\nexport default function Particle() {\n return (\n \n }\n >\n \n Frameworks\n \n \n \n React\n \n \n \n Vue\n \n \n \n Svelte\n \n \n \n );\n}\n", "type": "registry:block" } ], diff --git a/apps/ui/public/r/p-field-14.json b/apps/ui/public/r/p-field-14.json index b044ae5e9..b933bba82 100644 --- a/apps/ui/public/r/p-field-14.json +++ b/apps/ui/public/r/p-field-14.json @@ -11,7 +11,7 @@ "files": [ { "path": "registry/default/particles/p-field-14.tsx", - "content": "\"use client\";\n\nimport {\n Field,\n FieldDescription,\n FieldLabel,\n} from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\";\n\nexport default function Particle() {\n return (\n }\n >\n \n Choose Plan\n \n \n \n Free\n \n \n Pro\n \n \n Enterprise\n \n \n Select the plan that fits your needs.\n \n );\n}\n", + "content": "\"use client\";\n\nimport {\n Field,\n FieldDescription,\n FieldItem,\n FieldLabel,\n} from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\";\n\nexport default function Particle() {\n return (\n \n }>\n \n Choose Plan\n \n \n \n Free\n \n \n \n Pro\n \n \n \n Enterprise\n \n \n Select the plan that fits your needs.\n \n );\n}\n", "type": "registry:block" } ], diff --git a/apps/ui/public/r/p-radio-group-5.json b/apps/ui/public/r/p-radio-group-5.json index f3509a741..90963ae42 100644 --- a/apps/ui/public/r/p-radio-group-5.json +++ b/apps/ui/public/r/p-radio-group-5.json @@ -13,7 +13,7 @@ "files": [ { "path": "registry/default/particles/p-radio-group-5.tsx", - "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Button } from \"@/registry/default/ui/button\";\nimport { Field, FieldLabel } from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\nimport { Form } from \"@/registry/default/ui/form\";\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\";\n\nexport default function Particle() {\n const [loading, setLoading] = React.useState(false);\n\n const onSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n const formData = new FormData(e.currentTarget);\n setLoading(true);\n await new Promise((r) => setTimeout(r, 800));\n setLoading(false);\n alert(`Selected: ${formData.get(\"frameworks\")}`);\n };\n\n return (\n \n }\n >\n \n Frameworks\n \n \n \n Next.js\n \n \n Vite\n \n \n Astro\n \n \n \n \n Submit\n \n \n );\n}\n", + "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Button } from \"@/registry/default/ui/button\";\nimport {\n Field,\n FieldDescription,\n FieldItem,\n FieldLabel,\n} from \"@/registry/default/ui/field\";\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\";\nimport { Form } from \"@/registry/default/ui/form\";\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\";\n\nexport default function Particle() {\n const [loading, setLoading] = React.useState(false);\n\n const onSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n const formData = new FormData(e.currentTarget);\n setLoading(true);\n await new Promise((r) => setTimeout(r, 800));\n setLoading(false);\n alert(`Selected: ${formData.get(\"frameworks\")}`);\n };\n\n return (\n \n \n }>\n \n Frameworks\n \n \n \n \n Next.js\n \n Next.js is a React framework for building web applications.\n \n \n \n \n \n Vite\n \n \n \n Astro\n \n \n \n \n Submit\n \n \n );\n}\n", "type": "registry:block" } ], diff --git a/apps/ui/registry/default/particles/p-checkbox-group-5.tsx b/apps/ui/registry/default/particles/p-checkbox-group-5.tsx index 1784c63ad..0d02ed58e 100644 --- a/apps/ui/registry/default/particles/p-checkbox-group-5.tsx +++ b/apps/ui/registry/default/particles/p-checkbox-group-5.tsx @@ -5,10 +5,14 @@ import * as React from "react"; import { Button } from "@/registry/default/ui/button"; import { Checkbox } from "@/registry/default/ui/checkbox"; import { CheckboxGroup } from "@/registry/default/ui/checkbox-group"; -import { Field, FieldLabel } from "@/registry/default/ui/field"; +import { + Field, + FieldDescription, + FieldItem, + FieldLabel, +} from "@/registry/default/ui/field"; import { Fieldset, FieldsetLegend } from "@/registry/default/ui/fieldset"; import { Form } from "@/registry/default/ui/form"; -import { Label } from "@/registry/default/ui/label"; export default function Particle() { const [loading, setLoading] = React.useState(false); @@ -23,29 +27,33 @@ export default function Particle() { }; return ( - - } - > - }> - Frameworks - - - + + + } + > + + Frameworks + + - Next.js - - + + Next.js + + Next.js is a React framework for building web applications. + + + + - Vite - - + Vite + + - Astro - - + Astro + + Submit diff --git a/apps/ui/registry/default/particles/p-field-13.tsx b/apps/ui/registry/default/particles/p-field-13.tsx index 389dd782b..1842c2f3f 100644 --- a/apps/ui/registry/default/particles/p-field-13.tsx +++ b/apps/ui/registry/default/particles/p-field-13.tsx @@ -2,32 +2,32 @@ import { Checkbox } from "@/registry/default/ui/checkbox"; import { CheckboxGroup } from "@/registry/default/ui/checkbox-group"; -import { Field, FieldLabel } from "@/registry/default/ui/field"; +import { Field, FieldItem, FieldLabel } from "@/registry/default/ui/field"; import { Fieldset, FieldsetLegend } from "@/registry/default/ui/fieldset"; export default function Particle() { return ( - - - Frameworks - - - - - React - - - - - Vue - - - - - Svelte - - - - + + } + > + + Frameworks + + + + React + + + + Vue + + + + Svelte + + + ); } diff --git a/apps/ui/registry/default/particles/p-field-14.tsx b/apps/ui/registry/default/particles/p-field-14.tsx index 6ce8e9697..49e027960 100644 --- a/apps/ui/registry/default/particles/p-field-14.tsx +++ b/apps/ui/registry/default/particles/p-field-14.tsx @@ -3,6 +3,7 @@ import { Field, FieldDescription, + FieldItem, FieldLabel, } from "@/registry/default/ui/field"; import { Fieldset, FieldsetLegend } from "@/registry/default/ui/fieldset"; @@ -10,25 +11,24 @@ import { Radio, RadioGroup } from "@/registry/default/ui/radio-group"; export default function Particle() { return ( - } - > - - Choose Plan - - - - Free - - - Pro - - - Enterprise - - + + }> + + Choose Plan + + + + Free + + + + Pro + + + + Enterprise + + Select the plan that fits your needs. ); diff --git a/apps/ui/registry/default/particles/p-radio-group-5.tsx b/apps/ui/registry/default/particles/p-radio-group-5.tsx index dfd919d92..5d365c4aa 100644 --- a/apps/ui/registry/default/particles/p-radio-group-5.tsx +++ b/apps/ui/registry/default/particles/p-radio-group-5.tsx @@ -3,7 +3,12 @@ import * as React from "react"; import { Button } from "@/registry/default/ui/button"; -import { Field, FieldLabel } from "@/registry/default/ui/field"; +import { + Field, + FieldDescription, + FieldItem, + FieldLabel, +} from "@/registry/default/ui/field"; import { Fieldset, FieldsetLegend } from "@/registry/default/ui/fieldset"; import { Form } from "@/registry/default/ui/form"; import { Radio, RadioGroup } from "@/registry/default/ui/radio-group"; @@ -21,26 +26,30 @@ export default function Particle() { }; return ( - - } - > - - Frameworks - - - - Next.js - - - Vite - - - Astro - - + + + }> + + Frameworks + + + + + Next.js + + Next.js is a React framework for building web applications. + + + + + + Vite + + + + Astro + + Submit diff --git a/apps/ui/registry/default/ui/field.tsx b/apps/ui/registry/default/ui/field.tsx index 96ad5487b..f62ec521c 100644 --- a/apps/ui/registry/default/ui/field.tsx +++ b/apps/ui/registry/default/ui/field.tsx @@ -14,6 +14,16 @@ function Field({ className, ...props }: FieldPrimitive.Root.Props) { ); } +function FieldItem({ className, ...props }: FieldPrimitive.Item.Props) { + return ( + + ); +} + function FieldLabel({ className, ...props }: FieldPrimitive.Label.Props) { return ( + ); +} + function FieldLabel({ className, ...props }: FieldPrimitive.Label.Props) { return (