) {\n const { isMobile, state } = useSidebar()\n const comp = useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props\n ),\n render: !tooltip ? render : TooltipTrigger,\n state: {\n slot: \"sidebar-menu-button\",\n sidebar: \"menu-button\",\n size,\n active: isActive,\n },\n })\n\n if (!tooltip) {\n return comp\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {comp}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n showOnHover?: boolean\n }) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-action\",\n sidebar: \"menu-action\",\n },\n })\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n render,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<\"a\"> &\n React.ComponentProps<\"a\"> & {\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-sub-button\",\n sidebar: \"menu-sub-button\",\n size,\n active: isActive,\n },\n })\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/button-group-example.json b/apps/v4/public/r/styles/radix-lyra/button-group-example.json
index 0ae1c4286..d14358948 100644
--- a/apps/v4/public/r/styles/radix-lyra/button-group-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/button-group-example.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/button-group-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-lyra/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-lyra/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-lyra/ui/input-group\"\nimport { Label } from \"@/registry/radix-lyra/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-lyra/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-lyra/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-lyra/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-lyra/ui/input-group\"\nimport { Label } from \"@/registry/radix-lyra/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-lyra/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/command-example.json b/apps/v4/public/r/styles/radix-lyra/command-example.json
index 931c76783..78e4c21e7 100644
--- a/apps/v4/public/r/styles/radix-lyra/command-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/command-example.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/command-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-lyra/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-lyra/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-lyra/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-lyra/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/dialog-example.json b/apps/v4/public/r/styles/radix-lyra/dialog-example.json
index 051b495d1..d091a70e8 100644
--- a/apps/v4/public/r/styles/radix-lyra/dialog-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/dialog-example.json
@@ -21,7 +21,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/dialog-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport { Checkbox } from \"@/registry/radix-lyra/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-lyra/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-lyra/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-lyra/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport { Switch } from \"@/registry/radix-lyra/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-lyra/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-lyra/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-lyra/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport { Checkbox } from \"@/registry/radix-lyra/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-lyra/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-lyra/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-lyra/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport { Switch } from \"@/registry/radix-lyra/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-lyra/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-lyra/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-lyra/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/field-example.json b/apps/v4/public/r/styles/radix-lyra/field-example.json
index 49066d514..d2a5f5799 100644
--- a/apps/v4/public/r/styles/radix-lyra/field-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/field-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Badge } from \"@/registry/radix-lyra/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-lyra/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-lyra/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-lyra/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport { Slider } from \"@/registry/radix-lyra/ui/slider\"\nimport { Switch } from \"@/registry/radix-lyra/ui/switch\"\nimport { Textarea } from \"@/registry/radix-lyra/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Badge } from \"@/registry/radix-lyra/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-lyra/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-lyra/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-lyra/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport { Slider } from \"@/registry/radix-lyra/ui/slider\"\nimport { Switch } from \"@/registry/radix-lyra/ui/switch\"\nimport { Textarea } from \"@/registry/radix-lyra/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/input-example.json b/apps/v4/public/r/styles/radix-lyra/input-example.json
index 2a55da70d..b1f74413d 100644
--- a/apps/v4/public/r/styles/radix-lyra/input-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/input-example.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/input-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/sidebar.json b/apps/v4/public/r/styles/radix-lyra/sidebar.json
index 6a9b5e69e..3ea21d85e 100644
--- a/apps/v4/public/r/styles/radix-lyra/sidebar.json
+++ b/apps/v4/public/r/styles/radix-lyra/sidebar.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-lyra/ui/sidebar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-lyra/lib/utils\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport { Separator } from \"@/registry/radix-lyra/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-lyra/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-lyra/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-lyra/ui/tooltip\"\nimport { useIsMobile } from \"@/registry/new-york-v4/hooks/use-mobile\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-none p-2 text-left text-xs transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-xs\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-xs group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-none px-2 focus-visible:ring-2 data-[size=md]:text-xs data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { useIsMobile } from \"@/registry/radix-lyra/hooks/use-mobile\"\nimport { cn } from \"@/registry/radix-lyra/lib/utils\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport { Separator } from \"@/registry/radix-lyra/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-lyra/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-lyra/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-lyra/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-none p-2 text-left text-xs transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-xs\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-xs group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-none px-2 focus-visible:ring-2 data-[size=md]:text-xs data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/button-group-example.json b/apps/v4/public/r/styles/radix-maia/button-group-example.json
index 72472cbf1..695e0a4c7 100644
--- a/apps/v4/public/r/styles/radix-maia/button-group-example.json
+++ b/apps/v4/public/r/styles/radix-maia/button-group-example.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "registry/radix-maia/examples/button-group-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-maia/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-maia/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-maia/ui/input-group\"\nimport { Label } from \"@/registry/radix-maia/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-maia/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-maia/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-maia/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-maia/ui/input-group\"\nimport { Label } from \"@/registry/radix-maia/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-maia/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/command-example.json b/apps/v4/public/r/styles/radix-maia/command-example.json
index 5cf41ebd7..b471e402f 100644
--- a/apps/v4/public/r/styles/radix-maia/command-example.json
+++ b/apps/v4/public/r/styles/radix-maia/command-example.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "registry/radix-maia/examples/command-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-maia/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-maia/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-maia/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-maia/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/dialog-example.json b/apps/v4/public/r/styles/radix-maia/dialog-example.json
index 51f8ffde6..38476073b 100644
--- a/apps/v4/public/r/styles/radix-maia/dialog-example.json
+++ b/apps/v4/public/r/styles/radix-maia/dialog-example.json
@@ -21,7 +21,7 @@
"files": [
{
"path": "registry/radix-maia/examples/dialog-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport { Checkbox } from \"@/registry/radix-maia/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-maia/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-maia/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-maia/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport { Switch } from \"@/registry/radix-maia/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-maia/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-maia/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-maia/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport { Checkbox } from \"@/registry/radix-maia/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-maia/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-maia/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-maia/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport { Switch } from \"@/registry/radix-maia/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-maia/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-maia/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-maia/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/drawer.json b/apps/v4/public/r/styles/radix-maia/drawer.json
index d313ab58f..e51271dbb 100644
--- a/apps/v4/public/r/styles/radix-maia/drawer.json
+++ b/apps/v4/public/r/styles/radix-maia/drawer.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/radix-maia/ui/drawer.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/registry/radix-maia/lib/utils\"\n\nfunction Drawer({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n {children}\n \n \n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/registry/radix-maia/lib/utils\"\n\nfunction Drawer({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n {children}\n \n \n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/field-example.json b/apps/v4/public/r/styles/radix-maia/field-example.json
index 7f38a3973..2f5f52ac7 100644
--- a/apps/v4/public/r/styles/radix-maia/field-example.json
+++ b/apps/v4/public/r/styles/radix-maia/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/radix-maia/examples/field-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Badge } from \"@/registry/radix-maia/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-maia/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-maia/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-maia/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport { Slider } from \"@/registry/radix-maia/ui/slider\"\nimport { Switch } from \"@/registry/radix-maia/ui/switch\"\nimport { Textarea } from \"@/registry/radix-maia/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Badge } from \"@/registry/radix-maia/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-maia/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-maia/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-maia/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport { Slider } from \"@/registry/radix-maia/ui/slider\"\nimport { Switch } from \"@/registry/radix-maia/ui/switch\"\nimport { Textarea } from \"@/registry/radix-maia/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/input-example.json b/apps/v4/public/r/styles/radix-maia/input-example.json
index d58fb95ce..e3ccd3520 100644
--- a/apps/v4/public/r/styles/radix-maia/input-example.json
+++ b/apps/v4/public/r/styles/radix-maia/input-example.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-maia/examples/input-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/sidebar.json b/apps/v4/public/r/styles/radix-maia/sidebar.json
index 3cfe05851..1fd81ba2a 100644
--- a/apps/v4/public/r/styles/radix-maia/sidebar.json
+++ b/apps/v4/public/r/styles/radix-maia/sidebar.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-maia/ui/sidebar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-maia/lib/utils\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport { Separator } from \"@/registry/radix-maia/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-maia/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-maia/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-maia/ui/tooltip\"\nimport { useIsMobile } from \"@/registry/new-york-v4/hooks/use-mobile\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-lg p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-9 text-sm\",\n sm: \"h-8 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { useIsMobile } from \"@/registry/radix-maia/hooks/use-mobile\"\nimport { cn } from \"@/registry/radix-maia/lib/utils\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport { Separator } from \"@/registry/radix-maia/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-maia/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-maia/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-maia/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-lg p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-9 text-sm\",\n sm: \"h-8 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/button-group-example.json b/apps/v4/public/r/styles/radix-mira/button-group-example.json
index 0a03a3068..0cc713baa 100644
--- a/apps/v4/public/r/styles/radix-mira/button-group-example.json
+++ b/apps/v4/public/r/styles/radix-mira/button-group-example.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "registry/radix-mira/examples/button-group-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-mira/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-mira/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-mira/ui/input-group\"\nimport { Label } from \"@/registry/radix-mira/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-mira/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-mira/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-mira/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-mira/ui/input-group\"\nimport { Label } from \"@/registry/radix-mira/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-mira/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/command-example.json b/apps/v4/public/r/styles/radix-mira/command-example.json
index 7cddad98a..39c56824a 100644
--- a/apps/v4/public/r/styles/radix-mira/command-example.json
+++ b/apps/v4/public/r/styles/radix-mira/command-example.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "registry/radix-mira/examples/command-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-mira/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-mira/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-mira/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-mira/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/dialog-example.json b/apps/v4/public/r/styles/radix-mira/dialog-example.json
index 9463ea9d2..a6c04eb5e 100644
--- a/apps/v4/public/r/styles/radix-mira/dialog-example.json
+++ b/apps/v4/public/r/styles/radix-mira/dialog-example.json
@@ -21,7 +21,7 @@
"files": [
{
"path": "registry/radix-mira/examples/dialog-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport { Checkbox } from \"@/registry/radix-mira/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-mira/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-mira/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-mira/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport { Switch } from \"@/registry/radix-mira/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-mira/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-mira/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-mira/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport { Checkbox } from \"@/registry/radix-mira/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-mira/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-mira/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-mira/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport { Switch } from \"@/registry/radix-mira/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-mira/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-mira/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-mira/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/drawer.json b/apps/v4/public/r/styles/radix-mira/drawer.json
index 92a0028f5..f4bc3f9b8 100644
--- a/apps/v4/public/r/styles/radix-mira/drawer.json
+++ b/apps/v4/public/r/styles/radix-mira/drawer.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/radix-mira/ui/drawer.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/registry/radix-mira/lib/utils\"\n\nfunction Drawer({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n {children}\n \n \n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/registry/radix-mira/lib/utils\"\n\nfunction Drawer({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n {children}\n \n \n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/field-example.json b/apps/v4/public/r/styles/radix-mira/field-example.json
index dc5c90934..3e275e071 100644
--- a/apps/v4/public/r/styles/radix-mira/field-example.json
+++ b/apps/v4/public/r/styles/radix-mira/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/radix-mira/examples/field-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Badge } from \"@/registry/radix-mira/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-mira/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-mira/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-mira/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport { Slider } from \"@/registry/radix-mira/ui/slider\"\nimport { Switch } from \"@/registry/radix-mira/ui/switch\"\nimport { Textarea } from \"@/registry/radix-mira/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Badge } from \"@/registry/radix-mira/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-mira/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-mira/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-mira/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport { Slider } from \"@/registry/radix-mira/ui/slider\"\nimport { Switch } from \"@/registry/radix-mira/ui/switch\"\nimport { Textarea } from \"@/registry/radix-mira/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/input-example.json b/apps/v4/public/r/styles/radix-mira/input-example.json
index b071e1997..8eb81df74 100644
--- a/apps/v4/public/r/styles/radix-mira/input-example.json
+++ b/apps/v4/public/r/styles/radix-mira/input-example.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-mira/examples/input-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/sidebar.json b/apps/v4/public/r/styles/radix-mira/sidebar.json
index d3b8e3f9e..135604dea 100644
--- a/apps/v4/public/r/styles/radix-mira/sidebar.json
+++ b/apps/v4/public/r/styles/radix-mira/sidebar.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-mira/ui/sidebar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-mira/lib/utils\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport { Separator } from \"@/registry/radix-mira/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-mira/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-mira/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-mira/ui/tooltip\"\nimport { useIsMobile } from \"@/registry/new-york-v4/hooks/use-mobile\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-xs\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-xs group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-xs data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { useIsMobile } from \"@/registry/radix-mira/hooks/use-mobile\"\nimport { cn } from \"@/registry/radix-mira/lib/utils\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport { Separator } from \"@/registry/radix-mira/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-mira/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-mira/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-mira/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-xs\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-xs group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-xs data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/button-group-example.json b/apps/v4/public/r/styles/radix-nova/button-group-example.json
index fa5094e69..cd20b9abd 100644
--- a/apps/v4/public/r/styles/radix-nova/button-group-example.json
+++ b/apps/v4/public/r/styles/radix-nova/button-group-example.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "registry/radix-nova/examples/button-group-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-nova/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-nova/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-nova/ui/input-group\"\nimport { Label } from \"@/registry/radix-nova/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-nova/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-nova/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-nova/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-nova/ui/input-group\"\nimport { Label } from \"@/registry/radix-nova/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-nova/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/command-example.json b/apps/v4/public/r/styles/radix-nova/command-example.json
index 433dbde7c..aad2708a5 100644
--- a/apps/v4/public/r/styles/radix-nova/command-example.json
+++ b/apps/v4/public/r/styles/radix-nova/command-example.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "registry/radix-nova/examples/command-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-nova/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-nova/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-nova/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-nova/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/dialog-example.json b/apps/v4/public/r/styles/radix-nova/dialog-example.json
index 0d1e6b989..e7c576024 100644
--- a/apps/v4/public/r/styles/radix-nova/dialog-example.json
+++ b/apps/v4/public/r/styles/radix-nova/dialog-example.json
@@ -21,7 +21,7 @@
"files": [
{
"path": "registry/radix-nova/examples/dialog-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport { Checkbox } from \"@/registry/radix-nova/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-nova/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-nova/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-nova/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport { Switch } from \"@/registry/radix-nova/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-nova/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-nova/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-nova/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport { Checkbox } from \"@/registry/radix-nova/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-nova/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-nova/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-nova/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport { Switch } from \"@/registry/radix-nova/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-nova/ui/tabs\"\nimport { Textarea } from \"@/registry/radix-nova/ui/textarea\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-nova/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/field-example.json b/apps/v4/public/r/styles/radix-nova/field-example.json
index 1d82457bf..b136b72aa 100644
--- a/apps/v4/public/r/styles/radix-nova/field-example.json
+++ b/apps/v4/public/r/styles/radix-nova/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/radix-nova/examples/field-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Badge } from \"@/registry/radix-nova/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-nova/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-nova/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-nova/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport { Slider } from \"@/registry/radix-nova/ui/slider\"\nimport { Switch } from \"@/registry/radix-nova/ui/switch\"\nimport { Textarea } from \"@/registry/radix-nova/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Badge } from \"@/registry/radix-nova/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-nova/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-nova/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-nova/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport { Slider } from \"@/registry/radix-nova/ui/slider\"\nimport { Switch } from \"@/registry/radix-nova/ui/switch\"\nimport { Textarea } from \"@/registry/radix-nova/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/input-example.json b/apps/v4/public/r/styles/radix-nova/input-example.json
index 47bb2a7c0..40428e4f2 100644
--- a/apps/v4/public/r/styles/radix-nova/input-example.json
+++ b/apps/v4/public/r/styles/radix-nova/input-example.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-nova/examples/input-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/sidebar.json b/apps/v4/public/r/styles/radix-nova/sidebar.json
index 43aca4a0a..a01ea3f54 100644
--- a/apps/v4/public/r/styles/radix-nova/sidebar.json
+++ b/apps/v4/public/r/styles/radix-nova/sidebar.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-nova/ui/sidebar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-nova/lib/utils\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport { Separator } from \"@/registry/radix-nova/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-nova/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-nova/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-nova/ui/tooltip\"\nimport { useIsMobile } from \"@/registry/new-york-v4/hooks/use-mobile\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { useIsMobile } from \"@/registry/radix-nova/hooks/use-mobile\"\nimport { cn } from \"@/registry/radix-nova/lib/utils\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport { Separator } from \"@/registry/radix-nova/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-nova/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-nova/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-nova/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-vega/button-group-example.json b/apps/v4/public/r/styles/radix-vega/button-group-example.json
index e2edbd5a6..677bab2dd 100644
--- a/apps/v4/public/r/styles/radix-vega/button-group-example.json
+++ b/apps/v4/public/r/styles/radix-vega/button-group-example.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "registry/radix-vega/examples/button-group-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-vega/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-vega/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-vega/ui/input-group\"\nimport { Label } from \"@/registry/radix-vega/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\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 ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/radix-vega/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/radix-vega/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/radix-vega/ui/input-group\"\nimport { Label } from \"@/registry/radix-vega/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\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 ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n \n \n Text\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n \n \n \n \n \n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithSelect() {\n const [currency, setCurrency] = useState(\"$\")\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n \n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n \n \n \n \n \n
\n \n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-vega/command-example.json b/apps/v4/public/r/styles/radix-vega/command-example.json
index 052791b1d..9ed4324e5 100644
--- a/apps/v4/public/r/styles/radix-vega/command-example.json
+++ b/apps/v4/public/r/styles/radix-vega/command-example.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "registry/radix-vega/examples/command-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-vega/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-vega/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport { Card, CardContent } from \"@/registry/radix-vega/ui/card\"\nimport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from \"@/registry/radix-vega/ui/command\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CommandExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandInline() {\n return (\n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n \n \n )\n}\n\nfunction CommandBasic() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n Calendar\n Search Emoji\n Calculator\n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithShortcuts() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandWithGroups() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Calendar\n \n \n \n Search Emoji\n \n \n \n Calculator\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n \n \n
\n \n )\n}\n\nfunction CommandManyItems() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n No results found.\n \n \n \n Home\n ⌘H\n \n \n \n Inbox\n ⌘I\n \n \n \n Documents\n ⌘D\n \n \n \n Folders\n ⌘F\n \n \n \n \n \n \n New File\n ⌘N\n \n \n \n New Folder\n ⇧⌘N\n \n \n \n Copy\n ⌘C\n \n \n \n Cut\n ⌘X\n \n \n \n Paste\n ⌘V\n \n \n \n Delete\n ⌫\n \n \n \n \n \n \n Grid View\n \n \n \n List View\n \n \n \n Zoom In\n ⌘+\n \n \n \n Zoom Out\n ⌘-\n \n \n \n \n \n \n Profile\n ⌘P\n \n \n \n Billing\n ⌘B\n \n \n \n Settings\n ⌘S\n \n \n \n Notifications\n \n \n \n Help & Support\n \n \n \n \n \n \n Calculator\n \n \n \n Calendar\n \n \n \n Image Editor\n \n \n \n Code Editor\n \n \n \n \n \n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-vega/dialog-example.json b/apps/v4/public/r/styles/radix-vega/dialog-example.json
index d8f08e053..cce8fbd58 100644
--- a/apps/v4/public/r/styles/radix-vega/dialog-example.json
+++ b/apps/v4/public/r/styles/radix-vega/dialog-example.json
@@ -21,7 +21,7 @@
"files": [
{
"path": "registry/radix-vega/examples/dialog-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport { Checkbox } from \"@/registry/radix-vega/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-vega/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\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} from \"@/registry/radix-vega/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-vega/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-vega/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\nimport { Switch } from \"@/registry/radix-vega/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-vega/ui/tabs\"\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 DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport { Checkbox } from \"@/registry/radix-vega/ui/checkbox\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-vega/ui/dialog\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\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} from \"@/registry/radix-vega/ui/input-group\"\nimport { Kbd } from \"@/registry/radix-vega/ui/kbd\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-vega/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\nimport { Switch } from \"@/registry/radix-vega/ui/switch\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/radix-vega/ui/tabs\"\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 DialogExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction DialogWithForm() {\n return (\n \n \n \n )\n}\n\nfunction DialogScrollableContent() {\n return (\n \n \n \n )\n}\n\nfunction DialogWithStickyFooter() {\n return (\n \n \n \n )\n}\n\nfunction DialogNoCloseButton() {\n return (\n \n \n \n )\n}\n\nconst spokenLanguages = [\n { label: \"English\", value: \"en\" },\n { label: \"Spanish\", value: \"es\" },\n { label: \"French\", value: \"fr\" },\n { label: \"German\", value: \"de\" },\n { label: \"Italian\", value: \"it\" },\n { label: \"Portuguese\", value: \"pt\" },\n { label: \"Russian\", value: \"ru\" },\n { label: \"Chinese\", value: \"zh\" },\n { label: \"Japanese\", value: \"ja\" },\n { label: \"Korean\", value: \"ko\" },\n { label: \"Arabic\", value: \"ar\" },\n { label: \"Hindi\", value: \"hi\" },\n { label: \"Bengali\", value: \"bn\" },\n { label: \"Telugu\", value: \"te\" },\n { label: \"Marathi\", value: \"mr\" },\n { label: \"Kannada\", value: \"kn\" },\n { label: \"Malayalam\", value: \"ml\" },\n]\n\nconst voices = [\n { label: \"Samantha\", value: \"samantha\" },\n { label: \"Alex\", value: \"alex\" },\n { label: \"Fred\", value: \"fred\" },\n { label: \"Victoria\", value: \"victoria\" },\n { label: \"Tom\", value: \"tom\" },\n { label: \"Karen\", value: \"karen\" },\n { label: \"Sam\", value: \"sam\" },\n { label: \"Daniel\", value: \"daniel\" },\n]\n\nfunction DialogChatSettings() {\n const [tab, setTab] = React.useState(\"general\")\n const [theme, setTheme] = React.useState(\"system\")\n const [accentColor, setAccentColor] = React.useState(\"default\")\n const [spokenLanguage, setSpokenLanguage] = React.useState(\"en\")\n const [voice, setVoice] = React.useState(\"samantha\")\n\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-vega/field-example.json b/apps/v4/public/r/styles/radix-vega/field-example.json
index f6f03439c..31eb9d394 100644
--- a/apps/v4/public/r/styles/radix-vega/field-example.json
+++ b/apps/v4/public/r/styles/radix-vega/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/radix-vega/examples/field-example.tsx",
- "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Badge } from \"@/registry/radix-vega/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-vega/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-vega/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-vega/ui/native-select\"\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 { Slider } from \"@/registry/radix-vega/ui/slider\"\nimport { Switch } from \"@/registry/radix-vega/ui/switch\"\nimport { Textarea } from \"@/registry/radix-vega/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Badge } from \"@/registry/radix-vega/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-vega/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-vega/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-vega/ui/native-select\"\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 { Slider } from \"@/registry/radix-vega/ui/slider\"\nimport { Switch } from \"@/registry/radix-vega/ui/switch\"\nimport { Textarea } from \"@/registry/radix-vega/ui/textarea\"\n\nexport default function FieldExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputFields() {\n return (\n \n \n \n Basic Input\n \n \n \n \n Input with Description\n \n \n \n Choose a unique username for your account.\n \n \n \n Email Address\n \n We'll never share your email with anyone.\n \n \n \n \n \n Required Field *\n \n \n This field must be filled out.\n \n \n Disabled Input\n \n This field is currently disabled.\n \n \n \n Input with Badge{\" \"}\n \n Recommended\n \n \n \n \n \n Invalid Input\n \n \n This field contains validation errors.\n \n \n \n Disabled Field\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction TextareaFields() {\n return (\n \n \n \n Basic Textarea\n \n \n \n Comments\n \n Maximum 500 characters allowed.\n \n \n Bio\n \n Tell us about yourself in a few sentences.\n \n \n \n \n Message\n \n \n Enter your message so it is long enough to test the layout.\n \n \n \n Invalid Textarea\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction SelectFields() {\n return (\n \n \n \n Basic Select\n \n \n \n Country\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n \n \n Invalid Select\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction NativeSelectFields() {\n return (\n \n \n \n \n Basic Native Select\n \n \n Choose an option\n Option 1\n Option 2\n Option 3\n \n \n \n Country\n \n \n Select your country\n \n United States\n United Kingdom\n Canada\n \n \n Select the country where you currently reside.\n \n \n \n Timezone\n \n Choose your local timezone for accurate scheduling.\n \n \n Select timezone\n UTC\n Eastern Time\n Pacific Time\n \n \n \n \n Grouped Options\n \n \n Select a region\n \n United States\n Canada\n Mexico\n \n \n United Kingdom\n France\n Germany\n \n \n \n Native select with grouped options using optgroup.\n \n \n \n \n Invalid Native Select\n \n \n \n This field has an error\n \n Option 1\n Option 2\n Option 3\n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n Cannot select\n Option 1\n Option 2\n Option 3\n \n This field is currently disabled.\n \n \n \n )\n}\n\nfunction CheckboxFields() {\n return (\n \n \n \n \n \n I agree to the terms and conditions\n \n \n \n \n Accept terms and conditions\n \n \n \n \n \n \n \n Subscribe to newsletter\n \n \n Receive weekly updates about new features and promotions.\n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n Invalid checkbox\n \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID\n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n Enable Touch ID and Face ID to make it even faster to unlock\n your device. This is a long label to test the layout.\n \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchFields() {\n return (\n \n \n \n \n Airplane Mode\n \n Turn on airplane mode to disable all connections.\n \n \n \n \n \n Dark Mode\n \n \n \n \n \n Marketing Emails\n \n Receive emails about new products, features, and more.\n \n \n \n \n Privacy Settings\n Manage your privacy preferences.\n \n \n \n \n Make profile visible to others\n \n \n \n \n \n \n \n Show email on profile\n \n \n \n \n \n \n Invalid Switch\n \n This switch has validation errors.\n \n \n \n \n \n \n \n Disabled Switch\n \n \n This switch is currently disabled.\n \n \n \n \n \n \n )\n}\n\nfunction SliderFields() {\n const [volume, setVolume] = useState([50])\n const [brightness, setBrightness] = useState([75])\n const [temperature, setTemperature] = useState([0.3, 0.7])\n const [priceRange, setPriceRange] = useState([25, 75])\n const [colorBalance, setColorBalance] = useState([10, 20, 70])\n\n return (\n \n \n \n Volume\n \n \n \n Screen Brightness\n \n \n Current brightness: {brightness[0]}%\n \n \n \n Video Quality\n \n Higher quality uses more bandwidth.\n \n \n \n \n \n Temperature Range\n \n \n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range\n \n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance\n \n \n Red: {colorBalance[0]}%, Green: {colorBalance[1]}%, Blue:{\" \"}\n {colorBalance[2]}%\n \n \n \n Invalid Slider\n \n \n This slider has validation errors.\n \n \n \n \n Disabled Slider\n \n \n \n This slider is currently disabled.\n \n \n \n \n )\n}\n\nfunction InputOTPFields() {\n const [value, setValue] = useState(\"\")\n const [pinValue, setPinValue] = useState(\"\")\n\n return (\n \n \n \n Verification Code\n \n \n \n \n \n \n \n \n \n \n \n \n Enter OTP\n \n \n \n \n \n \n \n \n \n \n \n Enter the 6-digit code sent to your email.\n \n \n \n \n Two-Factor Authentication\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Enter the code from your authenticator app.\n \n \n \n PIN Code\n \n \n \n \n \n \n \n \n \n Enter your 4-digit PIN (numbers only).\n \n \n \n Invalid OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field contains validation errors.\n \n \n \n Disabled OTP\n \n \n \n \n \n \n \n \n \n \n \n This OTP field is currently disabled.\n \n \n \n \n )\n}\n\nfunction HorizontalFields() {\n return (\n \n \n \n \n Username\n Enter your preferred username.\n \n \n \n \n \n Bio\n \n Write a short description about yourself.\n \n \n \n \n \n \n \n Email Notifications\n \n \n Receive email updates about your account.\n \n \n \n \n \n \n Favorite Fruit\n Choose your favorite fruit.\n \n \n \n \n \n Country\n Select your country.\n \n \n Select a country\n United States\n United Kingdom\n Canada\n \n \n \n \n Volume\n Adjust the volume level.\n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-vega/input-example.json b/apps/v4/public/r/styles/radix-vega/input-example.json
index 3ba1fda66..94829ed4c 100644
--- a/apps/v4/public/r/styles/radix-vega/input-example.json
+++ b/apps/v4/public/r/styles/radix-vega/input-example.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-vega/examples/input-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-vega/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/radix-vega/ui/field\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-vega/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-vega/ui/select\"\n\nexport default function InputExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction InputBasic() {\n return (\n \n \n \n )\n}\n\nfunction InputInvalid() {\n return (\n \n \n \n )\n}\n\nfunction InputWithLabel() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputWithDescription() {\n return (\n \n \n Username\n \n \n Choose a unique username for your account.\n \n \n \n )\n}\n\nfunction InputDisabled() {\n return (\n \n \n Email\n \n \n \n )\n}\n\nfunction InputTypes() {\n return (\n \n \n \n Password\n \n \n \n Phone\n \n \n \n URL\n \n \n \n Search\n \n \n \n Number\n \n \n \n Date\n \n \n \n Time\n \n \n \n File\n \n \n
\n \n )\n}\n\nfunction InputWithSelect() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithButton() {\n return (\n \n \n \n \n
\n \n )\n}\n\nfunction InputWithNativeSelect() {\n return (\n \n \n \n \n +1\n +44\n +46\n \n
\n \n )\n}\n\nfunction InputForm() {\n return (\n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-vega/sidebar.json b/apps/v4/public/r/styles/radix-vega/sidebar.json
index 52d53ab18..54f6f7e9c 100644
--- a/apps/v4/public/r/styles/radix-vega/sidebar.json
+++ b/apps/v4/public/r/styles/radix-vega/sidebar.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/radix-vega/ui/sidebar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-vega/lib/utils\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport { Separator } from \"@/registry/radix-vega/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-vega/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-vega/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-vega/ui/tooltip\"\nimport { useIsMobile } from \"@/registry/new-york-v4/hooks/use-mobile\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { useIsMobile } from \"@/registry/radix-vega/hooks/use-mobile\"\nimport { cn } from \"@/registry/radix-vega/lib/utils\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport { Input } from \"@/registry/radix-vega/ui/input\"\nimport { Separator } from \"@/registry/radix-vega/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/radix-vega/ui/sheet\"\nimport { Skeleton } from \"@/registry/radix-vega/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/radix-vega/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n \n {children}\n
\n )\n }\n\n if (isMobile) {\n return (\n \n button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n \n Sidebar\n Displays the mobile sidebar.\n \n {children}
\n \n \n )\n }\n\n return (\n \n {/* This is what handles the sidebar gap on desktop */}\n
\n
\n
\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { toggleSidebar } = useSidebar()\n\n return (\n \n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n \n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline: \"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n} & VariantProps) {\n const Comp = asChild ? Slot.Root : \"button\"\n const { isMobile, state } = useSidebar()\n\n const button = (\n \n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n \n {button}\n \n \n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n \n {showIcon && (\n \n )}\n \n
\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/registry/bases/base/examples/command-example.tsx b/apps/v4/registry/bases/base/examples/command-example.tsx
index 6d972981e..438a3340c 100644
--- a/apps/v4/registry/bases/base/examples/command-example.tsx
+++ b/apps/v4/registry/bases/base/examples/command-example.tsx
@@ -36,7 +36,7 @@ export default function CommandExample() {
function CommandInline() {
return (
-
+
diff --git a/apps/v4/registry/bases/base/examples/input-example.tsx b/apps/v4/registry/bases/base/examples/input-example.tsx
index 328c16da8..8bc098cf5 100644
--- a/apps/v4/registry/bases/base/examples/input-example.tsx
+++ b/apps/v4/registry/bases/base/examples/input-example.tsx
@@ -17,6 +17,7 @@ import {
import {
Select,
SelectContent,
+ SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
@@ -167,9 +168,11 @@ function InputWithSelect() {
- USD
- EUR
- GBP
+
+ USD
+ EUR
+ GBP
+
@@ -239,9 +242,11 @@ function InputForm() {
- United States
- United Kingdom
- Canada
+
+ United States
+ United Kingdom
+ Canada
+
diff --git a/apps/v4/registry/bases/base/ui/sidebar.tsx b/apps/v4/registry/bases/base/ui/sidebar.tsx
index d0f0d6d07..0c21f7894 100644
--- a/apps/v4/registry/bases/base/ui/sidebar.tsx
+++ b/apps/v4/registry/bases/base/ui/sidebar.tsx
@@ -5,6 +5,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
import { useRender } from "@base-ui/react/use-render"
import { cva, type VariantProps } from "class-variance-authority"
+import { useIsMobile } from "@/registry/bases/base/hooks/use-mobile"
import { cn } from "@/registry/bases/base/lib/utils"
import { Button } from "@/registry/bases/base/ui/button"
import { Input } from "@/registry/bases/base/ui/input"
@@ -22,7 +23,6 @@ import {
TooltipContent,
TooltipTrigger,
} from "@/registry/bases/base/ui/tooltip"
-import { useIsMobile } from "@/registry/new-york-v4/hooks/use-mobile"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
const SIDEBAR_COOKIE_NAME = "sidebar_state"
diff --git a/apps/v4/registry/bases/radix/examples/button-group-example.tsx b/apps/v4/registry/bases/radix/examples/button-group-example.tsx
index 41c4c7163..e6abc4a14 100644
--- a/apps/v4/registry/bases/radix/examples/button-group-example.tsx
+++ b/apps/v4/registry/bases/radix/examples/button-group-example.tsx
@@ -30,6 +30,7 @@ import { Label } from "@/registry/bases/radix/ui/label"
import {
Select,
SelectContent,
+ SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
@@ -251,9 +252,11 @@ function ButtonGroupWithSelect() {
- $
- €
- £
+
+ $
+ €
+ £
+
@@ -410,9 +413,11 @@ function ButtonGroupWithSelectAndInput() {
- Hours
- Days
- Weeks
+
+ Hours
+ Days
+ Weeks
+
diff --git a/apps/v4/registry/bases/radix/examples/command-example.tsx b/apps/v4/registry/bases/radix/examples/command-example.tsx
index d5e486a14..cfa26cbc6 100644
--- a/apps/v4/registry/bases/radix/examples/command-example.tsx
+++ b/apps/v4/registry/bases/radix/examples/command-example.tsx
@@ -36,7 +36,7 @@ export default function CommandExample() {
function CommandInline() {
return (
-
+