From 83b371c9a7b19ac82187b201eb0fcc43bd5ed8fe Mon Sep 17 00:00:00 2001 From: dinq Date: Mon, 1 Sep 2025 18:35:29 +0800 Subject: [PATCH 1/2] fix(react/ui): resolve conflicts and finalize HTMLArkProps refactor Clean up merge markers and ensure displayName on components. Update sheet footer/header, select separator, menu shortcut, input, label, dialog. Typecheck passes for @ui/react. --- packages/react/src/components/ui/badge.tsx | 9 +--- packages/react/src/components/ui/button.tsx | 9 +--- packages/react/src/components/ui/dialog.tsx | 28 ++++------ packages/react/src/components/ui/input.tsx | 51 +++++++++---------- packages/react/src/components/ui/label.tsx | 39 +++++++------- packages/react/src/components/ui/menu.tsx | 37 ++++++-------- .../react/src/components/ui/pagination.tsx | 8 +-- .../react/src/components/ui/pin-input.tsx | 10 ++-- packages/react/src/components/ui/select.tsx | 27 ++++------ packages/react/src/components/ui/sheet.tsx | 48 ++++++++--------- packages/react/src/components/ui/textarea.tsx | 8 +-- 11 files changed, 110 insertions(+), 164 deletions(-) diff --git a/packages/react/src/components/ui/badge.tsx b/packages/react/src/components/ui/badge.tsx index 0de3d2c5..186c2335 100644 --- a/packages/react/src/components/ui/badge.tsx +++ b/packages/react/src/components/ui/badge.tsx @@ -3,11 +3,7 @@ import * as React from "react" import { createAnatomy } from "@ark-ui/react/anatomy" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { type VariantProps, cva } from "class-variance-authority" import { cn } from "@/lib/utils" @@ -37,8 +33,7 @@ const badgeVariants = cva( ) export interface BadgeProps - extends PolymorphicProps, - HTMLProps<"span">, + extends HTMLArkProps<"span">, VariantProps {} const Badge = React.forwardRef( diff --git a/packages/react/src/components/ui/button.tsx b/packages/react/src/components/ui/button.tsx index b7dc1693..fca0cb1b 100644 --- a/packages/react/src/components/ui/button.tsx +++ b/packages/react/src/components/ui/button.tsx @@ -3,11 +3,7 @@ import * as React from "react" import { createAnatomy } from "@ark-ui/react/anatomy" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { type VariantProps, cva } from "class-variance-authority" import { cn } from "@/lib/utils" @@ -46,8 +42,7 @@ const buttonVariants = cva( ) export interface ButtonProps - extends PolymorphicProps, - HTMLProps<"button">, + extends HTMLArkProps<"button">, VariantProps {} const Button = React.forwardRef( diff --git a/packages/react/src/components/ui/dialog.tsx b/packages/react/src/components/ui/dialog.tsx index 039a1c7f..4da9c091 100644 --- a/packages/react/src/components/ui/dialog.tsx +++ b/packages/react/src/components/ui/dialog.tsx @@ -3,11 +3,7 @@ import * as React from "react" import { Dialog as DialogPrimitive, dialogAnatomy } from "@ark-ui/react/dialog" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { Portal } from "@ark-ui/react/portal" import { XIcon } from "lucide-react" @@ -86,18 +82,16 @@ const DialogFooter = ({ {...props} /> ) - -const DialogHeader = React.forwardRef< - HTMLDivElement, - PolymorphicProps & HTMLProps<"div"> ->(({ className, ...props }, ref) => ( - -)) +const DialogHeader = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +) DialogHeader.displayName = "DialogHeader" const DialogTitle = React.forwardRef< diff --git a/packages/react/src/components/ui/input.tsx b/packages/react/src/components/ui/input.tsx index 85252d51..4db856d4 100644 --- a/packages/react/src/components/ui/input.tsx +++ b/packages/react/src/components/ui/input.tsx @@ -3,40 +3,35 @@ import * as React from "react" import { createAnatomy } from "@ark-ui/react/anatomy" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { cn } from "@/lib/utils" const anatomy = createAnatomy("input").parts("root") const parts = anatomy.build() -const Input = React.forwardRef< - HTMLInputElement, - PolymorphicProps & HTMLProps<"input"> ->(({ className, type, ...props }, ref) => { - return ( - - ) -}) +const Input = React.forwardRef>( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) Input.displayName = "Input" export { Input } diff --git a/packages/react/src/components/ui/label.tsx b/packages/react/src/components/ui/label.tsx index dff1fa5e..63f34b39 100644 --- a/packages/react/src/components/ui/label.tsx +++ b/packages/react/src/components/ui/label.tsx @@ -3,34 +3,29 @@ import * as React from "react" import { createAnatomy } from "@ark-ui/react/anatomy" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { cn } from "@/lib/utils" const anatomy = createAnatomy("label").parts("root") const parts = anatomy.build() -const Label = React.forwardRef< - HTMLLabelElement, - PolymorphicProps & HTMLProps<"label"> ->(({ className, htmlFor, children, ...props }, ref) => ( - - {children} - -)) +const Label = React.forwardRef>( + ({ className, htmlFor, children, ...props }, ref) => ( + + {children} + + ) +) Label.displayName = "Label" export { Label } diff --git a/packages/react/src/components/ui/menu.tsx b/packages/react/src/components/ui/menu.tsx index d4b7e2e0..e59201a3 100644 --- a/packages/react/src/components/ui/menu.tsx +++ b/packages/react/src/components/ui/menu.tsx @@ -2,11 +2,7 @@ import * as React from "react" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { Menu as MenuPrimitive, menuAnatomy } from "@ark-ui/react/menu" import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react" @@ -152,22 +148,21 @@ const MenuSeparator = React.forwardRef< )) MenuSeparator.displayName = "MenuSeparator" -const MenuShortcut = React.forwardRef< - HTMLSpanElement, - PolymorphicProps & HTMLProps<"span"> ->(({ className, ...props }, ref) => { - return ( - - ) -}) +const MenuShortcut = React.forwardRef>( + ({ className, ...props }, ref) => { + return ( + + ) + } +) MenuShortcut.displayName = "MenuShortcut" const MenuTrigger = MenuPrimitive.Trigger diff --git a/packages/react/src/components/ui/pagination.tsx b/packages/react/src/components/ui/pagination.tsx index 1840789f..8603a63c 100644 --- a/packages/react/src/components/ui/pagination.tsx +++ b/packages/react/src/components/ui/pagination.tsx @@ -1,10 +1,6 @@ "use client" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { Pagination as PaginationPrimitive, paginationAnatomy, @@ -35,7 +31,7 @@ Pagination.displayName = "Pagination" const PaginationContent = React.forwardRef< HTMLUListElement, - PolymorphicProps & HTMLProps<"ul"> + HTMLArkProps<"ul"> >(({ className, ...props }, ref) => ( , - HTMLProps<"div"> & PolymorphicProps + HTMLArkProps<"div"> >(({ className, ...props }, ref) => ( , - HTMLProps<"div"> & PolymorphicProps + HTMLArkProps<"div"> >((props, ref) => ( diff --git a/packages/react/src/components/ui/select.tsx b/packages/react/src/components/ui/select.tsx index 0746f4b1..9bf163e7 100644 --- a/packages/react/src/components/ui/select.tsx +++ b/packages/react/src/components/ui/select.tsx @@ -2,11 +2,7 @@ import * as React from "react" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { Portal } from "@ark-ui/react/portal" import { Select as SelectPrimitive, selectAnatomy } from "@ark-ui/react/select" import { CheckIcon, ChevronDownIcon } from "lucide-react" @@ -165,17 +161,16 @@ SelectList.displayName = "SelectList" const SelectRootProvider = SelectPrimitive.RootProvider -const SelectSeparator = React.forwardRef< - HTMLHRElement, - PolymorphicProps & HTMLProps<"hr"> ->(({ className, ...props }, ref) => ( - -)) +const SelectSeparator = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +) SelectSeparator.displayName = "SelectSeparator" const SelectTrigger = React.forwardRef< diff --git a/packages/react/src/components/ui/sheet.tsx b/packages/react/src/components/ui/sheet.tsx index b2515600..da851300 100644 --- a/packages/react/src/components/ui/sheet.tsx +++ b/packages/react/src/components/ui/sheet.tsx @@ -3,11 +3,7 @@ import * as React from "react" import { Dialog as SheetPrimitive, dialogAnatomy } from "@ark-ui/react/dialog" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { Portal } from "@ark-ui/react/portal" import { XIcon } from "lucide-react" @@ -102,30 +98,28 @@ const SheetDescription = React.forwardRef< )) SheetDescription.displayName = "SheetDescription" -const SheetFooter = React.forwardRef< - HTMLDivElement, - PolymorphicProps & HTMLProps<"div"> ->(({ className, ...props }, ref) => ( - -)) +const SheetFooter = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +) SheetFooter.displayName = "SheetFooter" -const SheetHeader = React.forwardRef< - HTMLDivElement, - PolymorphicProps & HTMLProps<"div"> ->(({ className, ...props }, ref) => ( - -)) +const SheetHeader = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +) SheetHeader.displayName = "SheetHeader" const SheetTitle = React.forwardRef< diff --git a/packages/react/src/components/ui/textarea.tsx b/packages/react/src/components/ui/textarea.tsx index 0e6f5169..4e237bbc 100644 --- a/packages/react/src/components/ui/textarea.tsx +++ b/packages/react/src/components/ui/textarea.tsx @@ -3,11 +3,7 @@ import * as React from "react" import { createAnatomy } from "@ark-ui/react/anatomy" -import { - type HTMLProps, - type PolymorphicProps, - ark, -} from "@ark-ui/react/factory" +import { type HTMLArkProps, ark } from "@ark-ui/react/factory" import { cn } from "@/lib/utils" @@ -16,7 +12,7 @@ const parts = anatomy.build() const Textarea = React.forwardRef< HTMLTextAreaElement, - PolymorphicProps & HTMLProps<"textarea"> + HTMLArkProps<"textarea"> >(({ className, ...props }, ref) => { return ( Date: Mon, 1 Sep 2025 19:58:57 +0800 Subject: [PATCH 2/2] refactor(react): migrate registry components to HTMLArkProps\n\n- Replace HTMLProps/PolymorphicProps with HTMLArkProps from @ark-ui/react/factory\n- Update imports and types in Badge, Button, Dialog, Input, Label, Menu, Pagination, PinInput, Select, Sheet, Textarea --- apps/www/public/r/react/badge.json | 2 +- apps/www/public/r/react/button.json | 2 +- apps/www/public/r/react/dialog.json | 2 +- apps/www/public/r/react/input.json | 2 +- apps/www/public/r/react/label.json | 2 +- apps/www/public/r/react/menu.json | 2 +- apps/www/public/r/react/pagination.json | 2 +- apps/www/public/r/react/pin-input.json | 2 +- apps/www/public/r/react/select.json | 2 +- apps/www/public/r/react/sheet.json | 2 +- apps/www/public/r/react/textarea.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/www/public/r/react/badge.json b/apps/www/public/r/react/badge.json index d6a731b5..ad2df9ed 100644 --- a/apps/www/public/r/react/badge.json +++ b/apps/www/public/r/react/badge.json @@ -9,7 +9,7 @@ "files": [ { "path": "./src/components/ui/badge.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport { type VariantProps, cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"badge\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-full border px-1.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] transition-[color,box-shadow] [&>svg]:shrink-0 leading-normal\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends PolymorphicProps,\n HTMLProps<\"span\">,\n VariantProps {}\n\nconst Badge = React.forwardRef(\n ({ className, variant, ...props }, ref) => {\n return (\n \n )\n }\n)\nBadge.displayName = \"Badge\"\n\nexport { Badge, badgeVariants }\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport { type VariantProps, cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"badge\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-full border px-1.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] transition-[color,box-shadow] [&>svg]:shrink-0 leading-normal\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends HTMLArkProps<\"span\">,\n VariantProps {}\n\nconst Badge = React.forwardRef(\n ({ className, variant, ...props }, ref) => {\n return (\n \n )\n }\n)\nBadge.displayName = \"Badge\"\n\nexport { Badge, badgeVariants }\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/button.json b/apps/www/public/r/react/button.json index 44e09343..98f287ec 100644 --- a/apps/www/public/r/react/button.json +++ b/apps/www/public/r/react/button.json @@ -9,7 +9,7 @@ "files": [ { "path": "./src/components/ui/button.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport { type VariantProps, cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"button\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends PolymorphicProps,\n HTMLProps<\"button\">,\n VariantProps {}\n\nconst Button = React.forwardRef(\n ({ className, variant, size, ...props }, ref) => {\n return (\n \n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport { type VariantProps, cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"button\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends HTMLArkProps<\"button\">,\n VariantProps {}\n\nconst Button = React.forwardRef(\n ({ className, variant, size, ...props }, ref) => {\n return (\n \n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/dialog.json b/apps/www/public/r/react/dialog.json index 0516da5f..e7947107 100644 --- a/apps/www/public/r/react/dialog.json +++ b/apps/www/public/r/react/dialog.json @@ -9,7 +9,7 @@ "files": [ { "path": "./src/components/ui/dialog.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Dialog as DialogPrimitive, dialogAnatomy } from \"@ark-ui/react/dialog\"\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = dialogAnatomy.extendWith(\"header\").build()\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogBackdrop = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.BackdropProps\n>(({ className, ...props }, ref) => (\n \n))\nDialogBackdrop.displayName = \"DialogBackdrop\"\n\nconst DialogCloseTrigger = DialogPrimitive.CloseTrigger\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.ContentProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n {children}\n \n \n Close\n \n \n \n \n))\nDialogContent.displayName = \"DialogContent\"\n\nconst DialogContext = DialogPrimitive.Context\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.DescriptionProps\n>(({ className, ...props }, ref) => (\n \n))\nDialogDescription.displayName = \"DialogDescription\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\n\nconst DialogHeader = React.forwardRef<\n HTMLDivElement,\n PolymorphicProps & HTMLProps<\"div\">\n>(({ className, ...props }, ref) => (\n \n))\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.TitleProps\n>(({ className, ...props }, ref) => (\n \n))\nDialogTitle.displayName = \"DialogTitle\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nexport {\n Dialog,\n DialogBackdrop,\n DialogCloseTrigger,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Dialog as DialogPrimitive, dialogAnatomy } from \"@ark-ui/react/dialog\"\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = dialogAnatomy.extendWith(\"header\").build()\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogBackdrop = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.BackdropProps\n>(({ className, ...props }, ref) => (\n \n))\nDialogBackdrop.displayName = \"DialogBackdrop\"\n\nconst DialogCloseTrigger = DialogPrimitive.CloseTrigger\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.ContentProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n {children}\n \n \n Close\n \n \n \n \n))\nDialogContent.displayName = \"DialogContent\"\n\nconst DialogContext = DialogPrimitive.Context\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.DescriptionProps\n>(({ className, ...props }, ref) => (\n \n))\nDialogDescription.displayName = \"DialogDescription\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nconst DialogHeader = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n )\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n DialogPrimitive.TitleProps\n>(({ className, ...props }, ref) => (\n \n))\nDialogTitle.displayName = \"DialogTitle\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nexport {\n Dialog,\n DialogBackdrop,\n DialogCloseTrigger,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n}\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/input.json b/apps/www/public/r/react/input.json index 2ed8f3a1..720a7381 100644 --- a/apps/www/public/r/react/input.json +++ b/apps/www/public/r/react/input.json @@ -8,7 +8,7 @@ "files": [ { "path": "./src/components/ui/input.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"input\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst Input = React.forwardRef<\n HTMLInputElement,\n PolymorphicProps & HTMLProps<\"input\">\n>(({ className, type, ...props }, ref) => {\n return (\n \n )\n})\nInput.displayName = \"Input\"\n\nexport { Input }\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"input\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst Input = React.forwardRef>(\n ({ className, type, ...props }, ref) => {\n return (\n \n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/label.json b/apps/www/public/r/react/label.json index 78b88d48..f8f0c170 100644 --- a/apps/www/public/r/react/label.json +++ b/apps/www/public/r/react/label.json @@ -8,7 +8,7 @@ "files": [ { "path": "./src/components/ui/label.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"label\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst Label = React.forwardRef<\n HTMLLabelElement,\n PolymorphicProps & HTMLProps<\"label\">\n>(({ className, htmlFor, children, ...props }, ref) => (\n \n {children}\n \n))\nLabel.displayName = \"Label\"\n\nexport { Label }\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"label\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst Label = React.forwardRef>(\n ({ className, htmlFor, children, ...props }, ref) => (\n \n {children}\n \n )\n)\nLabel.displayName = \"Label\"\n\nexport { Label }\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/menu.json b/apps/www/public/r/react/menu.json index aa4ffaac..18f5708f 100644 --- a/apps/www/public/r/react/menu.json +++ b/apps/www/public/r/react/menu.json @@ -9,7 +9,7 @@ "files": [ { "path": "./src/components/ui/menu.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport { Menu as MenuPrimitive, menuAnatomy } from \"@ark-ui/react/menu\"\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = menuAnatomy.extendWith(\"shortcut\").build()\n\nconst Menu = MenuPrimitive.Root\n\nconst MenuArrow = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ArrowProps\n>(({ className, ...props }, ref) => (\n \n \n \n))\nMenuArrow.displayName = \"MenuArrow\"\n\nconst MenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.CheckboxItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenuCheckboxItem.displayName = \"MenuCheckboxItem\"\n\nconst MenuContent = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ContentProps\n>(({ className, ...props }, ref) => (\n \n \n \n))\nMenuContent.displayName = \"MenuContent\"\n\nconst MenuContextTrigger = MenuPrimitive.ContextTrigger\n\nconst MenuIndicator = MenuPrimitive.Indicator\n\nconst MenuItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ItemProps & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenuItem.displayName = \"MenuItem\"\n\nconst MenuItemGroup = MenuPrimitive.ItemGroup\n\nconst MenuItemGroupLabel = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ItemGroupLabelProps & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenuItemGroupLabel.displayName = \"MenuItemGroupLabel\"\n\nconst MenuItemText = MenuPrimitive.ItemText\n\nconst MenuRadioItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.RadioItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenuRadioItem.displayName = \"MenuRadioItem\"\n\nconst MenuRadioItemGroup = MenuPrimitive.RadioItemGroup\n\nconst MenuSeparator = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.SeparatorProps\n>(({ className, ...props }, ref) => (\n \n))\nMenuSeparator.displayName = \"MenuSeparator\"\n\nconst MenuShortcut = React.forwardRef<\n HTMLSpanElement,\n PolymorphicProps & HTMLProps<\"span\">\n>(({ className, ...props }, ref) => {\n return (\n \n )\n})\nMenuShortcut.displayName = \"MenuShortcut\"\n\nconst MenuTrigger = MenuPrimitive.Trigger\n\nconst MenuTriggerItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.TriggerItemProps & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nMenuTriggerItem.displayName = \"MenuTriggerItem\"\n\nexport {\n Menu,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuContextTrigger,\n MenuIndicator,\n MenuItem,\n MenuItemGroup,\n MenuItemGroupLabel,\n MenuItemText,\n MenuRadioItem,\n MenuRadioItemGroup,\n MenuSeparator,\n MenuShortcut,\n MenuTrigger,\n MenuTriggerItem,\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport { Menu as MenuPrimitive, menuAnatomy } from \"@ark-ui/react/menu\"\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = menuAnatomy.extendWith(\"shortcut\").build()\n\nconst Menu = MenuPrimitive.Root\n\nconst MenuArrow = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ArrowProps\n>(({ className, ...props }, ref) => (\n \n \n \n))\nMenuArrow.displayName = \"MenuArrow\"\n\nconst MenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.CheckboxItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenuCheckboxItem.displayName = \"MenuCheckboxItem\"\n\nconst MenuContent = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ContentProps\n>(({ className, ...props }, ref) => (\n \n \n \n))\nMenuContent.displayName = \"MenuContent\"\n\nconst MenuContextTrigger = MenuPrimitive.ContextTrigger\n\nconst MenuIndicator = MenuPrimitive.Indicator\n\nconst MenuItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ItemProps & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenuItem.displayName = \"MenuItem\"\n\nconst MenuItemGroup = MenuPrimitive.ItemGroup\n\nconst MenuItemGroupLabel = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.ItemGroupLabelProps & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenuItemGroupLabel.displayName = \"MenuItemGroupLabel\"\n\nconst MenuItemText = MenuPrimitive.ItemText\n\nconst MenuRadioItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.RadioItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenuRadioItem.displayName = \"MenuRadioItem\"\n\nconst MenuRadioItemGroup = MenuPrimitive.RadioItemGroup\n\nconst MenuSeparator = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.SeparatorProps\n>(({ className, ...props }, ref) => (\n \n))\nMenuSeparator.displayName = \"MenuSeparator\"\n\nconst MenuShortcut = React.forwardRef>(\n ({ className, ...props }, ref) => {\n return (\n \n )\n }\n)\nMenuShortcut.displayName = \"MenuShortcut\"\n\nconst MenuTrigger = MenuPrimitive.Trigger\n\nconst MenuTriggerItem = React.forwardRef<\n React.ElementRef,\n MenuPrimitive.TriggerItemProps & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nMenuTriggerItem.displayName = \"MenuTriggerItem\"\n\nexport {\n Menu,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuContextTrigger,\n MenuIndicator,\n MenuItem,\n MenuItemGroup,\n MenuItemGroupLabel,\n MenuItemText,\n MenuRadioItem,\n MenuRadioItemGroup,\n MenuSeparator,\n MenuShortcut,\n MenuTrigger,\n MenuTriggerItem,\n}\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/pagination.json b/apps/www/public/r/react/pagination.json index a6d260b1..1e16e759 100644 --- a/apps/www/public/r/react/pagination.json +++ b/apps/www/public/r/react/pagination.json @@ -13,7 +13,7 @@ "files": [ { "path": "./src/components/ui/pagination.tsx", - "content": "\"use client\"\n\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport {\n Pagination as PaginationPrimitive,\n paginationAnatomy,\n} from \"@ark-ui/react/pagination\"\nimport type { VariantProps } from \"class-variance-authority\"\nimport { MoreHorizontal } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\nconst parts = paginationAnatomy.extendWith(\"content\").build()\n\nconst Pagination = React.forwardRef<\n React.ElementRef,\n Omit\n>(({ className, ...props }, ref) => (\n \n))\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n PolymorphicProps & HTMLProps<\"ul\">\n>(({ className, ...props }, ref) => (\n \n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationContext = PaginationPrimitive.Context\n\nconst PaginationEllipsis = React.forwardRef<\n React.ElementRef,\n PaginationPrimitive.EllipsisProps\n>(({ className, ...props }, ref) => (\n \n \n \n More pages\n \n \n))\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport interface PaginationItemProps\n extends PaginationPrimitive.ItemProps,\n VariantProps {}\n\nconst PaginationItem = React.forwardRef<\n React.ElementRef,\n PaginationItemProps\n>(({ className, variant = \"outline\", size, ...props }, ref) => (\n \n \n \n))\nPaginationItem.displayName = \"PaginationItem\"\n\nexport interface PaginationNextTriggerProps\n extends PaginationPrimitive.NextTriggerProps,\n VariantProps {}\n\nconst PaginationNextTrigger = React.forwardRef<\n React.ElementRef,\n PaginationNextTriggerProps\n>(({ className, variant = \"outline\", size, ...props }, ref) => (\n \n \n \n))\nPaginationNextTrigger.displayName = \"PaginationNextTrigger\"\n\nexport interface PaginationPrevTriggerProps\n extends PaginationPrimitive.PrevTriggerProps,\n VariantProps {}\n\nconst PaginationPrevTrigger = React.forwardRef<\n React.ElementRef,\n PaginationPrevTriggerProps\n>(({ className, variant = \"outline\", size, ...props }, ref) => (\n \n \n \n))\nPaginationPrevTrigger.displayName = \"PaginationPrevTrigger\"\n\nconst PaginationRootProvider = PaginationPrimitive.RootProvider\n\nexport {\n Pagination,\n PaginationContent,\n PaginationContext,\n PaginationEllipsis,\n PaginationItem,\n PaginationNextTrigger,\n PaginationPrevTrigger,\n PaginationRootProvider,\n}\n\nexport { usePagination } from \"@ark-ui/react/pagination\"\n", + "content": "\"use client\"\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport {\n Pagination as PaginationPrimitive,\n paginationAnatomy,\n} from \"@ark-ui/react/pagination\"\nimport type { VariantProps } from \"class-variance-authority\"\nimport { MoreHorizontal } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\nconst parts = paginationAnatomy.extendWith(\"content\").build()\n\nconst Pagination = React.forwardRef<\n React.ElementRef,\n Omit\n>(({ className, ...props }, ref) => (\n \n))\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n HTMLArkProps<\"ul\">\n>(({ className, ...props }, ref) => (\n \n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationContext = PaginationPrimitive.Context\n\nconst PaginationEllipsis = React.forwardRef<\n React.ElementRef,\n PaginationPrimitive.EllipsisProps\n>(({ className, ...props }, ref) => (\n \n \n \n More pages\n \n \n))\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport interface PaginationItemProps\n extends PaginationPrimitive.ItemProps,\n VariantProps {}\n\nconst PaginationItem = React.forwardRef<\n React.ElementRef,\n PaginationItemProps\n>(({ className, variant = \"outline\", size, ...props }, ref) => (\n \n \n \n))\nPaginationItem.displayName = \"PaginationItem\"\n\nexport interface PaginationNextTriggerProps\n extends PaginationPrimitive.NextTriggerProps,\n VariantProps {}\n\nconst PaginationNextTrigger = React.forwardRef<\n React.ElementRef,\n PaginationNextTriggerProps\n>(({ className, variant = \"outline\", size, ...props }, ref) => (\n \n \n \n))\nPaginationNextTrigger.displayName = \"PaginationNextTrigger\"\n\nexport interface PaginationPrevTriggerProps\n extends PaginationPrimitive.PrevTriggerProps,\n VariantProps {}\n\nconst PaginationPrevTrigger = React.forwardRef<\n React.ElementRef,\n PaginationPrevTriggerProps\n>(({ className, variant = \"outline\", size, ...props }, ref) => (\n \n \n \n))\nPaginationPrevTrigger.displayName = \"PaginationPrevTrigger\"\n\nconst PaginationRootProvider = PaginationPrimitive.RootProvider\n\nexport {\n Pagination,\n PaginationContent,\n PaginationContext,\n PaginationEllipsis,\n PaginationItem,\n PaginationNextTrigger,\n PaginationPrevTrigger,\n PaginationRootProvider,\n}\n\nexport { usePagination } from \"@ark-ui/react/pagination\"\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/pin-input.json b/apps/www/public/r/react/pin-input.json index adf72574..513a15b9 100644 --- a/apps/www/public/r/react/pin-input.json +++ b/apps/www/public/r/react/pin-input.json @@ -9,7 +9,7 @@ "files": [ { "path": "./src/components/ui/pin-input.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport {\n PinInput as PinInputPrimitive,\n pinInputAnatomy,\n} from \"@ark-ui/react/pin-input\"\nimport { MinusIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = pinInputAnatomy.extendWith(\"group\", \"separator\").build()\n\nconst PinInput = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.RootProps\n>(({ children, ...props }, ref) => (\n \n {children}\n \n \n))\nPinInput.displayName = \"PinInput\"\n\nconst PinInputContext = PinInputPrimitive.Context\n\nconst PinInputControl = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.ControlProps\n>(({ className, ...props }, ref) => (\n \n))\nPinInputControl.displayName = \"PinInputControl\"\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n HTMLProps<\"div\"> & PolymorphicProps\n>(({ className, ...props }, ref) => (\n \n))\nPinInputGroup.displayName = \"PinInputGroup\"\n\nconst PinInputInput = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.InputProps\n>(({ className, ...props }, ref) => (\n \n))\nPinInputInput.displayName = \"PinInputInput\"\n\nconst PinInputLabel = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.LabelProps\n>(({ className, ...props }, ref) => (\n \n))\nPinInputLabel.displayName = \"PinInputLabel\"\n\nconst PinInputSeparator = React.forwardRef<\n React.ElementRef<\"div\">,\n HTMLProps<\"div\"> & PolymorphicProps\n>((props, ref) => (\n \n \n \n))\nPinInputSeparator.displayName = \"PinInputSeparator\"\n\nexport {\n PinInput,\n PinInputContext,\n PinInputControl,\n PinInputGroup,\n PinInputInput,\n PinInputLabel,\n PinInputSeparator,\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport {\n PinInput as PinInputPrimitive,\n pinInputAnatomy,\n} from \"@ark-ui/react/pin-input\"\nimport { MinusIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = pinInputAnatomy.extendWith(\"group\", \"separator\").build()\n\nconst PinInput = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.RootProps\n>(({ children, ...props }, ref) => (\n \n {children}\n \n \n))\nPinInput.displayName = \"PinInput\"\n\nconst PinInputContext = PinInputPrimitive.Context\n\nconst PinInputControl = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.ControlProps\n>(({ className, ...props }, ref) => (\n \n))\nPinInputControl.displayName = \"PinInputControl\"\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n HTMLArkProps<\"div\">\n>(({ className, ...props }, ref) => (\n \n))\nPinInputGroup.displayName = \"PinInputGroup\"\n\nconst PinInputInput = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.InputProps\n>(({ className, ...props }, ref) => (\n \n))\nPinInputInput.displayName = \"PinInputInput\"\n\nconst PinInputLabel = React.forwardRef<\n React.ElementRef,\n PinInputPrimitive.LabelProps\n>(({ className, ...props }, ref) => (\n \n))\nPinInputLabel.displayName = \"PinInputLabel\"\n\nconst PinInputSeparator = React.forwardRef<\n React.ElementRef<\"div\">,\n HTMLArkProps<\"div\">\n>((props, ref) => (\n \n \n \n))\nPinInputSeparator.displayName = \"PinInputSeparator\"\n\nexport {\n PinInput,\n PinInputContext,\n PinInputControl,\n PinInputGroup,\n PinInputInput,\n PinInputLabel,\n PinInputSeparator,\n}\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/select.json b/apps/www/public/r/react/select.json index 03d88ec2..354c9b92 100644 --- a/apps/www/public/r/react/select.json +++ b/apps/www/public/r/react/select.json @@ -9,7 +9,7 @@ "files": [ { "path": "./src/components/ui/select.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { Select as SelectPrimitive, selectAnatomy } from \"@ark-ui/react/select\"\nimport { CheckIcon, ChevronDownIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = selectAnatomy.extendWith(\"separator\").build()\n\nconst SelectComponent = React.forwardRef(\n (\n props: SelectPrimitive.RootProps,\n ref: React.Ref\n ) => \n)\nSelectComponent.displayName = \"Select\"\nconst Select = SelectComponent as (\n props: SelectPrimitive.RootProps &\n React.RefAttributes>\n) => React.JSX.Element\n\nconst SelectClearTrigger = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ClearTriggerProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectClearTrigger.displayName = \"SelectClearTrigger\"\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ContentProps\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n))\nSelectContent.displayName = \"SelectContent\"\n\nconst SelectContext = SelectPrimitive.Context\n\nconst SelectControl = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ControlProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectControl.displayName = \"SelectControl\"\n\nconst SelectIndicator = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.IndicatorProps\n>((props, ref) => (\n \n \n \n))\nSelectIndicator.displayName = \"SelectIndicator\"\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nSelectItem.displayName = \"SelectItem\"\n\nconst SelectItemContext = SelectPrimitive.ItemContext\n\nconst SelectItemGroup = SelectPrimitive.ItemGroup\n\nconst SelectItemGroupLabel = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ItemGroupLabelProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectItemGroupLabel.displayName = \"SelectItemGroupLabel\"\n\nconst SelectItemText = SelectPrimitive.ItemText\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.LabelProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectLabel.displayName = \"SelectLabel\"\n\nconst SelectList = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ListProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectList.displayName = \"SelectList\"\n\nconst SelectRootProvider = SelectPrimitive.RootProvider\n\nconst SelectSeparator = React.forwardRef<\n HTMLHRElement,\n PolymorphicProps & HTMLProps<\"hr\">\n>(({ className, ...props }, ref) => (\n \n))\nSelectSeparator.displayName = \"SelectSeparator\"\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.TriggerProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectTrigger.displayName = \"SelectTrigger\"\n\nconst SelectValueText = SelectPrimitive.ValueText\n\nexport {\n Select,\n SelectClearTrigger,\n SelectContent,\n SelectContext,\n SelectControl,\n SelectIndicator,\n SelectItem,\n SelectItemContext,\n SelectItemGroup,\n SelectItemGroupLabel,\n SelectItemText,\n SelectLabel,\n SelectList,\n SelectRootProvider,\n SelectSeparator,\n SelectTrigger,\n SelectValueText,\n}\n\nexport {\n createListCollection,\n useSelect,\n type CollectionItem,\n type ListCollection,\n type SelectHighlightChangeDetails,\n type SelectOpenChangeDetails,\n type SelectValueChangeDetails,\n} from \"@ark-ui/react/select\"\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { Select as SelectPrimitive, selectAnatomy } from \"@ark-ui/react/select\"\nimport { CheckIcon, ChevronDownIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst parts = selectAnatomy.extendWith(\"separator\").build()\n\nconst SelectComponent = React.forwardRef(\n (\n props: SelectPrimitive.RootProps,\n ref: React.Ref\n ) => \n)\nSelectComponent.displayName = \"Select\"\nconst Select = SelectComponent as (\n props: SelectPrimitive.RootProps &\n React.RefAttributes>\n) => React.JSX.Element\n\nconst SelectClearTrigger = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ClearTriggerProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectClearTrigger.displayName = \"SelectClearTrigger\"\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ContentProps\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n))\nSelectContent.displayName = \"SelectContent\"\n\nconst SelectContext = SelectPrimitive.Context\n\nconst SelectControl = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ControlProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectControl.displayName = \"SelectControl\"\n\nconst SelectIndicator = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.IndicatorProps\n>((props, ref) => (\n \n \n \n))\nSelectIndicator.displayName = \"SelectIndicator\"\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nSelectItem.displayName = \"SelectItem\"\n\nconst SelectItemContext = SelectPrimitive.ItemContext\n\nconst SelectItemGroup = SelectPrimitive.ItemGroup\n\nconst SelectItemGroupLabel = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ItemGroupLabelProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectItemGroupLabel.displayName = \"SelectItemGroupLabel\"\n\nconst SelectItemText = SelectPrimitive.ItemText\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.LabelProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectLabel.displayName = \"SelectLabel\"\n\nconst SelectList = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.ListProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectList.displayName = \"SelectList\"\n\nconst SelectRootProvider = SelectPrimitive.RootProvider\n\nconst SelectSeparator = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n )\n)\nSelectSeparator.displayName = \"SelectSeparator\"\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n SelectPrimitive.TriggerProps\n>(({ className, ...props }, ref) => (\n \n))\nSelectTrigger.displayName = \"SelectTrigger\"\n\nconst SelectValueText = SelectPrimitive.ValueText\n\nexport {\n Select,\n SelectClearTrigger,\n SelectContent,\n SelectContext,\n SelectControl,\n SelectIndicator,\n SelectItem,\n SelectItemContext,\n SelectItemGroup,\n SelectItemGroupLabel,\n SelectItemText,\n SelectLabel,\n SelectList,\n SelectRootProvider,\n SelectSeparator,\n SelectTrigger,\n SelectValueText,\n}\n\nexport {\n createListCollection,\n useSelect,\n type CollectionItem,\n type ListCollection,\n type SelectHighlightChangeDetails,\n type SelectOpenChangeDetails,\n type SelectValueChangeDetails,\n} from \"@ark-ui/react/select\"\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/sheet.json b/apps/www/public/r/react/sheet.json index dbc46a11..9cd5787c 100644 --- a/apps/www/public/r/react/sheet.json +++ b/apps/www/public/r/react/sheet.json @@ -9,7 +9,7 @@ "files": [ { "path": "./src/components/ui/sheet.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Dialog as SheetPrimitive, dialogAnatomy } from \"@ark-ui/react/dialog\"\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst sheetAnatomy = dialogAnatomy.rename(\"sheet\")\nconst parts = sheetAnatomy.extendWith(\"header\").build()\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetBackdrop = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.BackdropProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetBackdrop.displayName = \"SheetBackdrop\"\n\nconst SheetCloseTrigger = SheetPrimitive.CloseTrigger\n\nconst SheetContent = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.ContentProps & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n }\n>(({ className, children, side = \"right\", ...props }, ref) => (\n \n \n \n \n {children}\n \n \n Close\n \n \n \n \n))\nSheetContent.displayName = \"SheetContent\"\n\nconst SheetContext = SheetPrimitive.Context\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.DescriptionProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetDescription.displayName = \"SheetDescription\"\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\n\nconst SheetHeader = React.forwardRef<\n HTMLDivElement,\n PolymorphicProps & HTMLProps<\"div\">\n>(({ className, ...props }, ref) => (\n \n))\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.TitleProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetTitle.displayName = \"SheetTitle\"\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nexport {\n Sheet,\n SheetBackdrop,\n SheetCloseTrigger,\n SheetContent,\n SheetContext,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Dialog as SheetPrimitive, dialogAnatomy } from \"@ark-ui/react/dialog\"\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst sheetAnatomy = dialogAnatomy.rename(\"sheet\")\nconst parts = sheetAnatomy.extendWith(\"header\", \"footer\").build()\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetBackdrop = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.BackdropProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetBackdrop.displayName = \"SheetBackdrop\"\n\nconst SheetCloseTrigger = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.CloseTriggerProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetCloseTrigger.displayName = \"SheetCloseTrigger\"\n\nconst SheetContent = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.ContentProps & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n }\n>(({ className, children, side = \"right\", ...props }, ref) => (\n \n \n \n \n {children}\n \n \n Close\n \n \n \n \n))\nSheetContent.displayName = \"SheetContent\"\n\nconst SheetContext = SheetPrimitive.Context\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.DescriptionProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetDescription.displayName = \"SheetDescription\"\n\nconst SheetFooter = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n )\n)\nSheetFooter.displayName = \"SheetFooter\"\n\nconst SheetHeader = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n )\n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.TitleProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetTitle.displayName = \"SheetTitle\"\n\nconst SheetTrigger = React.forwardRef<\n React.ElementRef,\n SheetPrimitive.TriggerProps\n>(({ className, ...props }, ref) => (\n \n))\nSheetTrigger.displayName = \"SheetTrigger\"\n\nexport {\n Sheet,\n SheetBackdrop,\n SheetCloseTrigger,\n SheetContent,\n SheetContext,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n}\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/react/textarea.json b/apps/www/public/r/react/textarea.json index 524f1bfa..3804bbf2 100644 --- a/apps/www/public/r/react/textarea.json +++ b/apps/www/public/r/react/textarea.json @@ -8,7 +8,7 @@ "files": [ { "path": "./src/components/ui/textarea.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport {\n type HTMLProps,\n type PolymorphicProps,\n ark,\n} from \"@ark-ui/react/factory\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"textarea\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst Textarea = React.forwardRef<\n HTMLTextAreaElement,\n PolymorphicProps & HTMLProps<\"textarea\">\n>(({ className, ...props }, ref) => {\n return (\n \n )\n})\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { createAnatomy } from \"@ark-ui/react/anatomy\"\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst anatomy = createAnatomy(\"textarea\").parts(\"root\")\nconst parts = anatomy.build()\n\nconst Textarea = React.forwardRef<\n HTMLTextAreaElement,\n HTMLArkProps<\"textarea\">\n>(({ className, ...props }, ref) => {\n return (\n \n )\n})\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n", "type": "registry:ui" } ]