From d4130fd2e82552e918a2fc9ab693262d69959d7e Mon Sep 17 00:00:00 2001 From: pasqualevitiello Date: Mon, 23 Mar 2026 11:31:39 +0100 Subject: [PATCH] fix: use HTMLTextAreaElement for Textarea ref --- apps/ui/public/r/textarea.json | 2 +- apps/ui/registry/default/ui/textarea.tsx | 2 +- packages/ui/src/components/textarea.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ui/public/r/textarea.json b/apps/ui/public/r/textarea.json index b9668e010..8188d2334 100644 --- a/apps/ui/public/r/textarea.json +++ b/apps/ui/public/r/textarea.json @@ -7,7 +7,7 @@ "files": [ { "path": "registry/default/ui/textarea.tsx", - "content": "\"use client\";\n\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport type * as React from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<\"textarea\"> &\n React.RefAttributes & {\n size?: \"sm\" | \"default\" | \"lg\" | number;\n unstyled?: boolean;\n };\n\nexport function Textarea({\n className,\n size = \"default\",\n unstyled = false,\n ref,\n ...props\n}: TextareaProps): React.ReactElement {\n return (\n \n ) => (\n \n )}\n />\n \n );\n}\n\nexport { FieldPrimitive };\n", + "content": "\"use client\";\n\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport type * as React from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<\"textarea\"> &\n React.RefAttributes & {\n size?: \"sm\" | \"default\" | \"lg\" | number;\n unstyled?: boolean;\n };\n\nexport function Textarea({\n className,\n size = \"default\",\n unstyled = false,\n ref,\n ...props\n}: TextareaProps): React.ReactElement {\n return (\n \n ) => (\n \n )}\n />\n \n );\n}\n\nexport { FieldPrimitive };\n", "type": "registry:ui" } ], diff --git a/apps/ui/registry/default/ui/textarea.tsx b/apps/ui/registry/default/ui/textarea.tsx index 4608332a9..0d0a52221 100644 --- a/apps/ui/registry/default/ui/textarea.tsx +++ b/apps/ui/registry/default/ui/textarea.tsx @@ -6,7 +6,7 @@ import type * as React from "react"; import { cn } from "@/registry/default/lib/utils"; export type TextareaProps = React.ComponentPropsWithoutRef<"textarea"> & - React.RefAttributes & { + React.RefAttributes & { size?: "sm" | "default" | "lg" | number; unstyled?: boolean; }; diff --git a/packages/ui/src/components/textarea.tsx b/packages/ui/src/components/textarea.tsx index cb65f873e..36c7e737a 100644 --- a/packages/ui/src/components/textarea.tsx +++ b/packages/ui/src/components/textarea.tsx @@ -6,7 +6,7 @@ import { cn } from "@coss/ui/lib/utils"; import type * as React from "react"; export type TextareaProps = React.ComponentPropsWithoutRef<"textarea"> & - React.RefAttributes & { + React.RefAttributes & { size?: "sm" | "default" | "lg" | number; unstyled?: boolean; };