["variant"] {
- if (status === "active") {
- return "outline"
- }
-
- if (status === "draft") {
- return "secondary"
- }
-
- return "ghost"
-}
-
-function getAlertStyles(tone: AlertTone): { className: string; icon: React.JSX.Element } {
- if (tone === "warning") {
- return {
- className: "border-l border-l-destructive/80 bg-muted/30",
- icon: ,
- }
- }
-
- return {
- className: "border-l border-l-foreground/80 bg-muted/30",
- icon: ,
- }
-}
-
-export function EditorialPipelineBoard() {
- return (
-
-
-
-
-
-
- {PIPELINE_COLUMNS.map((column) => (
-
-
-
- {column.title}
-
-
- {column.count}
-
-
-
-
- {column.cards.map((card) => {
- const statusVariant = getBadgeVariant(card.status)
-
- return (
-
-
-
-
- {card.title}
-
-
- {card.volume}
-
-
-
- {card.status}
-
-
-
- {card.alert ? (
-
-
- {getAlertStyles(card.alert.tone).icon}
- {card.alert.title}
-
-
{card.alert.message}
-
- ) : null}
-
-
-
-
- {card.dueLabel}
-
-
-
- {card.articleCount} Articles
-
-
-
-
-
-
- Editorial Progress
-
-
- {(value) => `${value}%`}
-
-
-
-
-
-
-
- {card.assignees.map((assignee) => (
-
-
- {assignee}
-
-
- ))}
-
-
- View
-
-
-
- )
- })}
-
-
- ))}
-
-
- )
-}
diff --git a/apps/v4/app/(app)/(styles)/sera/preview-05/index.tsx b/apps/v4/app/(app)/(styles)/sera/preview-05/index.tsx
deleted file mode 100644
index 009f46240d..0000000000
--- a/apps/v4/app/(app)/(styles)/sera/preview-05/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { EditorialPipelineBoard } from "./components/editorial-pipeline-board"
-
-export function Preview05() {
- return (
-
- )
-}
diff --git a/apps/v4/public/r/styles/base-luma/dropdown-menu-example.json b/apps/v4/public/r/styles/base-luma/dropdown-menu-example.json
index 6f327c9541..f2a7112525 100644
--- a/apps/v4/public/r/styles/base-luma/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/base-luma/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/base-luma/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-luma/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-luma/ui/avatar\"\nimport { Button } from \"@/registry/base-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-luma/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-luma/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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/base-luma/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-luma/ui/avatar\"\nimport { Button } from \"@/registry/base-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-luma/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-luma/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-luma/field-example.json b/apps/v4/public/r/styles/base-luma/field-example.json
index 1368bb4a42..3218cede0c 100644
--- a/apps/v4/public/r/styles/base-luma/field-example.json
+++ b/apps/v4/public/r/styles/base-luma/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/base-luma/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/base-luma/components/example\"\nimport { Badge } from \"@/registry/base-luma/ui/badge\"\nimport { Checkbox } from \"@/registry/base-luma/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-luma/ui/field\"\nimport { Input } from \"@/registry/base-luma/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-luma/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-luma/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-luma/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-luma/ui/select\"\nimport { Slider } from \"@/registry/base-luma/ui/slider\"\nimport { Switch } from \"@/registry/base-luma/ui/switch\"\nimport { Textarea } from \"@/registry/base-luma/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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-luma/components/example\"\nimport { Badge } from \"@/registry/base-luma/ui/badge\"\nimport { Checkbox } from \"@/registry/base-luma/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-luma/ui/field\"\nimport { Input } from \"@/registry/base-luma/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-luma/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-luma/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-luma/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-luma/ui/select\"\nimport { Slider } from \"@/registry/base-luma/ui/slider\"\nimport { Switch } from \"@/registry/base-luma/ui/switch\"\nimport { Textarea } from \"@/registry/base-luma/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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-luma/select-example.json b/apps/v4/public/r/styles/base-luma/select-example.json
index a3edb28a31..04465a24b7 100644
--- a/apps/v4/public/r/styles/base-luma/select-example.json
+++ b/apps/v4/public/r/styles/base-luma/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/base-luma/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-luma/components/example\"\nimport { Button } from \"@/registry/base-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-luma/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-luma/ui/field\"\nimport { Input } from \"@/registry/base-luma/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-luma/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-luma/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-luma/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-luma/components/example\"\nimport { Button } from \"@/registry/base-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-luma/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-luma/ui/field\"\nimport { Input } from \"@/registry/base-luma/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-luma/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-luma/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-luma/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-luma/switch-example.json b/apps/v4/public/r/styles/base-luma/switch-example.json
index 912e5b3437..e4619b3304 100644
--- a/apps/v4/public/r/styles/base-luma/switch-example.json
+++ b/apps/v4/public/r/styles/base-luma/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-luma/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-luma/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-luma/ui/field\"\nimport { Label } from \"@/registry/base-luma/ui/label\"\nimport { Switch } from \"@/registry/base-luma/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-luma/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-luma/ui/field\"\nimport { Label } from \"@/registry/base-luma/ui/label\"\nimport { Switch } from \"@/registry/base-luma/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-lyra/dropdown-menu-example.json b/apps/v4/public/r/styles/base-lyra/dropdown-menu-example.json
index d5c687ed61..53b3517dac 100644
--- a/apps/v4/public/r/styles/base-lyra/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/base-lyra/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/base-lyra/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-lyra/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-lyra/ui/avatar\"\nimport { Button } from \"@/registry/base-lyra/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-lyra/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-lyra/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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/base-lyra/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-lyra/ui/avatar\"\nimport { Button } from \"@/registry/base-lyra/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-lyra/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-lyra/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-lyra/field-example.json b/apps/v4/public/r/styles/base-lyra/field-example.json
index 4e5125ff4e..0ca06281a8 100644
--- a/apps/v4/public/r/styles/base-lyra/field-example.json
+++ b/apps/v4/public/r/styles/base-lyra/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/base-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/base-lyra/components/example\"\nimport { Badge } from \"@/registry/base-lyra/ui/badge\"\nimport { Checkbox } from \"@/registry/base-lyra/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-lyra/ui/field\"\nimport { Input } from \"@/registry/base-lyra/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-lyra/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-lyra/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-lyra/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-lyra/ui/select\"\nimport { Slider } from \"@/registry/base-lyra/ui/slider\"\nimport { Switch } from \"@/registry/base-lyra/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-lyra/components/example\"\nimport { Badge } from \"@/registry/base-lyra/ui/badge\"\nimport { Checkbox } from \"@/registry/base-lyra/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-lyra/ui/field\"\nimport { Input } from \"@/registry/base-lyra/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-lyra/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-lyra/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-lyra/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-lyra/ui/select\"\nimport { Slider } from \"@/registry/base-lyra/ui/slider\"\nimport { Switch } from \"@/registry/base-lyra/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-lyra/select-example.json b/apps/v4/public/r/styles/base-lyra/select-example.json
index 90e8fc3707..8374182832 100644
--- a/apps/v4/public/r/styles/base-lyra/select-example.json
+++ b/apps/v4/public/r/styles/base-lyra/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/base-lyra/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-lyra/components/example\"\nimport { Button } from \"@/registry/base-lyra/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-lyra/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-lyra/ui/field\"\nimport { Input } from \"@/registry/base-lyra/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-lyra/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-lyra/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-lyra/components/example\"\nimport { Button } from \"@/registry/base-lyra/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-lyra/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-lyra/ui/field\"\nimport { Input } from \"@/registry/base-lyra/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-lyra/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-lyra/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-lyra/switch-example.json b/apps/v4/public/r/styles/base-lyra/switch-example.json
index f2f82984c2..5b816d373a 100644
--- a/apps/v4/public/r/styles/base-lyra/switch-example.json
+++ b/apps/v4/public/r/styles/base-lyra/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-lyra/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-lyra/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-lyra/ui/field\"\nimport { Label } from \"@/registry/base-lyra/ui/label\"\nimport { Switch } from \"@/registry/base-lyra/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-lyra/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-lyra/ui/field\"\nimport { Label } from \"@/registry/base-lyra/ui/label\"\nimport { Switch } from \"@/registry/base-lyra/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-maia/dropdown-menu-example.json b/apps/v4/public/r/styles/base-maia/dropdown-menu-example.json
index 4f1f1c2b02..6240a1cd5c 100644
--- a/apps/v4/public/r/styles/base-maia/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/base-maia/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/base-maia/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-maia/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-maia/ui/avatar\"\nimport { Button } from \"@/registry/base-maia/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-maia/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-maia/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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/base-maia/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-maia/ui/avatar\"\nimport { Button } from \"@/registry/base-maia/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-maia/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-maia/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-maia/field-example.json b/apps/v4/public/r/styles/base-maia/field-example.json
index 9d0a006f50..02dd139d37 100644
--- a/apps/v4/public/r/styles/base-maia/field-example.json
+++ b/apps/v4/public/r/styles/base-maia/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/base-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/base-maia/components/example\"\nimport { Badge } from \"@/registry/base-maia/ui/badge\"\nimport { Checkbox } from \"@/registry/base-maia/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-maia/ui/field\"\nimport { Input } from \"@/registry/base-maia/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-maia/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-maia/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-maia/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-maia/ui/select\"\nimport { Slider } from \"@/registry/base-maia/ui/slider\"\nimport { Switch } from \"@/registry/base-maia/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-maia/components/example\"\nimport { Badge } from \"@/registry/base-maia/ui/badge\"\nimport { Checkbox } from \"@/registry/base-maia/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-maia/ui/field\"\nimport { Input } from \"@/registry/base-maia/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-maia/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-maia/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-maia/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-maia/ui/select\"\nimport { Slider } from \"@/registry/base-maia/ui/slider\"\nimport { Switch } from \"@/registry/base-maia/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-maia/select-example.json b/apps/v4/public/r/styles/base-maia/select-example.json
index a32349482e..9d0d8c50db 100644
--- a/apps/v4/public/r/styles/base-maia/select-example.json
+++ b/apps/v4/public/r/styles/base-maia/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/base-maia/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-maia/components/example\"\nimport { Button } from \"@/registry/base-maia/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-maia/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-maia/ui/field\"\nimport { Input } from \"@/registry/base-maia/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-maia/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-maia/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-maia/components/example\"\nimport { Button } from \"@/registry/base-maia/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-maia/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-maia/ui/field\"\nimport { Input } from \"@/registry/base-maia/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-maia/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-maia/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-maia/switch-example.json b/apps/v4/public/r/styles/base-maia/switch-example.json
index b672cda735..35023809ec 100644
--- a/apps/v4/public/r/styles/base-maia/switch-example.json
+++ b/apps/v4/public/r/styles/base-maia/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-maia/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-maia/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-maia/ui/field\"\nimport { Label } from \"@/registry/base-maia/ui/label\"\nimport { Switch } from \"@/registry/base-maia/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-maia/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-maia/ui/field\"\nimport { Label } from \"@/registry/base-maia/ui/label\"\nimport { Switch } from \"@/registry/base-maia/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-mira/dropdown-menu-example.json b/apps/v4/public/r/styles/base-mira/dropdown-menu-example.json
index f33ff0adc6..3adeee54bc 100644
--- a/apps/v4/public/r/styles/base-mira/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/base-mira/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/base-mira/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-mira/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-mira/ui/avatar\"\nimport { Button } from \"@/registry/base-mira/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-mira/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-mira/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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/base-mira/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-mira/ui/avatar\"\nimport { Button } from \"@/registry/base-mira/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-mira/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-mira/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-mira/field-example.json b/apps/v4/public/r/styles/base-mira/field-example.json
index f39cf7f651..65c3f43eac 100644
--- a/apps/v4/public/r/styles/base-mira/field-example.json
+++ b/apps/v4/public/r/styles/base-mira/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/base-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/base-mira/components/example\"\nimport { Badge } from \"@/registry/base-mira/ui/badge\"\nimport { Checkbox } from \"@/registry/base-mira/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-mira/ui/field\"\nimport { Input } from \"@/registry/base-mira/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-mira/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-mira/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-mira/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-mira/ui/select\"\nimport { Slider } from \"@/registry/base-mira/ui/slider\"\nimport { Switch } from \"@/registry/base-mira/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-mira/components/example\"\nimport { Badge } from \"@/registry/base-mira/ui/badge\"\nimport { Checkbox } from \"@/registry/base-mira/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-mira/ui/field\"\nimport { Input } from \"@/registry/base-mira/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-mira/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-mira/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-mira/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-mira/ui/select\"\nimport { Slider } from \"@/registry/base-mira/ui/slider\"\nimport { Switch } from \"@/registry/base-mira/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-mira/select-example.json b/apps/v4/public/r/styles/base-mira/select-example.json
index 7304503416..7cb56b9bc2 100644
--- a/apps/v4/public/r/styles/base-mira/select-example.json
+++ b/apps/v4/public/r/styles/base-mira/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/base-mira/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-mira/components/example\"\nimport { Button } from \"@/registry/base-mira/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-mira/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-mira/ui/field\"\nimport { Input } from \"@/registry/base-mira/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-mira/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-mira/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-mira/components/example\"\nimport { Button } from \"@/registry/base-mira/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-mira/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-mira/ui/field\"\nimport { Input } from \"@/registry/base-mira/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-mira/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-mira/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-mira/switch-example.json b/apps/v4/public/r/styles/base-mira/switch-example.json
index 61bdcc5e15..0978a78ef2 100644
--- a/apps/v4/public/r/styles/base-mira/switch-example.json
+++ b/apps/v4/public/r/styles/base-mira/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-mira/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-mira/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-mira/ui/field\"\nimport { Label } from \"@/registry/base-mira/ui/label\"\nimport { Switch } from \"@/registry/base-mira/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-mira/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-mira/ui/field\"\nimport { Label } from \"@/registry/base-mira/ui/label\"\nimport { Switch } from \"@/registry/base-mira/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-nova/dropdown-menu-example.json b/apps/v4/public/r/styles/base-nova/dropdown-menu-example.json
index 75e86ac8e7..b84b89378c 100644
--- a/apps/v4/public/r/styles/base-nova/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/base-nova/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/base-nova/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-nova/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-nova/ui/avatar\"\nimport { Button } from \"@/registry/base-nova/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-nova/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-nova/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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/base-nova/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-nova/ui/avatar\"\nimport { Button } from \"@/registry/base-nova/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-nova/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-nova/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-nova/field-example.json b/apps/v4/public/r/styles/base-nova/field-example.json
index 63c41ca947..badc4cbc04 100644
--- a/apps/v4/public/r/styles/base-nova/field-example.json
+++ b/apps/v4/public/r/styles/base-nova/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/base-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/base-nova/components/example\"\nimport { Badge } from \"@/registry/base-nova/ui/badge\"\nimport { Checkbox } from \"@/registry/base-nova/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-nova/ui/field\"\nimport { Input } from \"@/registry/base-nova/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-nova/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-nova/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-nova/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-nova/ui/select\"\nimport { Slider } from \"@/registry/base-nova/ui/slider\"\nimport { Switch } from \"@/registry/base-nova/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-nova/components/example\"\nimport { Badge } from \"@/registry/base-nova/ui/badge\"\nimport { Checkbox } from \"@/registry/base-nova/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-nova/ui/field\"\nimport { Input } from \"@/registry/base-nova/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-nova/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-nova/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-nova/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-nova/ui/select\"\nimport { Slider } from \"@/registry/base-nova/ui/slider\"\nimport { Switch } from \"@/registry/base-nova/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-nova/select-example.json b/apps/v4/public/r/styles/base-nova/select-example.json
index 0c26dfd394..747003aa96 100644
--- a/apps/v4/public/r/styles/base-nova/select-example.json
+++ b/apps/v4/public/r/styles/base-nova/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/base-nova/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-nova/components/example\"\nimport { Button } from \"@/registry/base-nova/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-nova/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-nova/ui/field\"\nimport { Input } from \"@/registry/base-nova/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-nova/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-nova/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-nova/components/example\"\nimport { Button } from \"@/registry/base-nova/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-nova/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-nova/ui/field\"\nimport { Input } from \"@/registry/base-nova/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-nova/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-nova/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-nova/switch-example.json b/apps/v4/public/r/styles/base-nova/switch-example.json
index a37bef889b..2b1a4fd0ae 100644
--- a/apps/v4/public/r/styles/base-nova/switch-example.json
+++ b/apps/v4/public/r/styles/base-nova/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-nova/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-nova/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-nova/ui/field\"\nimport { Label } from \"@/registry/base-nova/ui/label\"\nimport { Switch } from \"@/registry/base-nova/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-nova/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-nova/ui/field\"\nimport { Label } from \"@/registry/base-nova/ui/label\"\nimport { Switch } from \"@/registry/base-nova/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/accordion.json b/apps/v4/public/r/styles/base-sera/accordion.json
index 8d4615b611..a50754e735 100644
--- a/apps/v4/public/r/styles/base-sera/accordion.json
+++ b/apps/v4/public/r/styles/base-sera/accordion.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/accordion.tsx",
- "content": "import { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n return (\n \n )\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n return (\n \n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: AccordionPrimitive.Trigger.Props) {\n return (\n \n \n {children}\n \n \n \n \n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: AccordionPrimitive.Panel.Props) {\n return (\n \n \n {children}\n
\n \n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n",
+ "content": "import { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n return (\n \n )\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n return (\n \n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: AccordionPrimitive.Trigger.Props) {\n return (\n \n \n {children}\n \n \n \n \n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: AccordionPrimitive.Panel.Props) {\n return (\n \n \n {children}\n
\n \n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/breadcrumb.json b/apps/v4/public/r/styles/base-sera/breadcrumb.json
index 187d48a499..84a9bfae7d 100644
--- a/apps/v4/public/r/styles/base-sera/breadcrumb.json
+++ b/apps/v4/public/r/styles/base-sera/breadcrumb.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/breadcrumb.tsx",
- "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Breadcrumb({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbLink({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"a\">) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\"transition-colors hover:text-foreground\", className),\n },\n props\n ),\n render,\n state: {\n slot: \"breadcrumb-link\",\n },\n })\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? (\n \n )}\n \n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n svg]:size-4\",\n className\n )}\n {...props}\n >\n \n More \n \n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n",
+ "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Breadcrumb({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbLink({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"a\">) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\"transition-colors hover:text-foreground\", className),\n },\n props\n ),\n render,\n state: {\n slot: \"breadcrumb-link\",\n },\n })\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? (\n \n )}\n \n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n svg]:size-4\",\n className\n )}\n {...props}\n >\n \n More \n \n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/button-group.json b/apps/v4/public/r/styles/base-sera/button-group.json
index dfe43e95b0..0aa153ce08 100644
--- a/apps/v4/public/r/styles/base-sera/button-group.json
+++ b/apps/v4/public/r/styles/base-sera/button-group.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/base-sera/ui/button-group.tsx",
- "content": "import { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Separator } from \"@/registry/base-sera/ui/separator\"\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 *:data-[slot=input]:px-4 has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-border has-[>[data-variant=outline]]:*:data-[slot=input-group]:px-2.5 has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-border has-[>[data-variant=outline]]:*:[[role=combobox]]:px-2.5 has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-ring has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-ring has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-variant=outline]]:[&>input]:border-border has-[>[data-variant=outline]]:[&>input:focus-visible]:border-ring\",\n {\n variants: {\n orientation: {\n horizontal:\n \"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0\",\n vertical:\n \"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction ButtonGroupText({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex items-center gap-2 border border-transparent border-b-input bg-transparent px-2.5 text-xs font-semibold uppercase group-has-[>[data-variant=outline]]/button-group:border-border [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"button-group-text\",\n },\n })\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n",
+ "content": "import { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Separator } from \"@/registry/base-sera/ui/separator\"\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 *:data-[slot=input]:px-4 has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-border has-[>[data-variant=outline]]:*:data-[slot=input-group]:px-2.5 has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-border has-[>[data-variant=outline]]:*:[[role=combobox]]:px-2.5 has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-ring has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-ring has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-variant=outline]]:[&>input]:border-border has-[>[data-variant=outline]]:[&>input:focus-visible]:border-ring\",\n {\n variants: {\n orientation: {\n horizontal:\n \"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0\",\n vertical:\n \"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction ButtonGroupText({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex items-center gap-2 border border-transparent border-b-input bg-transparent px-2.5 text-xs font-semibold uppercase group-has-[>[data-variant=outline]]/button-group:border-border [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"button-group-text\",\n },\n })\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/button.json b/apps/v4/public/r/styles/base-sera/button.json
index 82d3f27695..f0c4a2371b 100644
--- a/apps/v4/public/r/styles/base-sera/button.json
+++ b/apps/v4/public/r/styles/base-sera/button.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/button.tsx",
- "content": "import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-semibold tracking-widest whitespace-nowrap uppercase transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-transparent hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-input/30\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-10 gap-1.5 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n xs: \"h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-9 gap-1 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n lg: \"h-11 gap-1.5 px-8 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5\",\n icon: \"size-10\",\n \"icon-xs\": \"size-7 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-9\",\n \"icon-lg\": \"size-11\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: ButtonPrimitive.Props & VariantProps) {\n return (\n \n )\n}\n\nexport { Button, buttonVariants }\n",
+ "content": "import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-semibold tracking-widest whitespace-nowrap uppercase transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-transparent hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-input/30\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-10 gap-1.5 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n xs: \"h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-9 gap-1 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n lg: \"h-11 gap-1.5 px-8 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5\",\n icon: \"size-10\",\n \"icon-xs\": \"size-7 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-9\",\n \"icon-lg\": \"size-11\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: ButtonPrimitive.Props & VariantProps) {\n return (\n \n )\n}\n\nexport { Button, buttonVariants }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/combobox.json b/apps/v4/public/r/styles/base-sera/combobox.json
index b1cff7c2cc..6b0d0253b6 100644
--- a/apps/v4/public/r/styles/base-sera/combobox.json
+++ b/apps/v4/public/r/styles/base-sera/combobox.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-sera/ui/combobox.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/base-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return \n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n }\n className={cn(className)}\n {...props}\n >\n \n \n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n \n }\n {...props}\n />\n \n {showTrigger && (\n }\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )}\n {showClear && }\n \n {children}\n \n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n \n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n \n {children}\n \n }\n >\n \n \n \n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n \n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n \n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n \n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef &\n ComboboxPrimitive.Chips.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n \n {children}\n {showRemove && (\n }\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n \n \n )}\n \n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n \n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/base-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return \n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n }\n className={cn(className)}\n {...props}\n >\n \n \n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n \n }\n {...props}\n />\n \n {showTrigger && (\n }\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )}\n {showClear && }\n \n {children}\n \n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n \n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n \n {children}\n \n }\n >\n \n \n \n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n \n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n \n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n \n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef &\n ComboboxPrimitive.Chips.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n \n {children}\n {showRemove && (\n }\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n \n \n )}\n \n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n \n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/command.json b/apps/v4/public/r/styles/base-sera/command.json
index 03de305b3e..700a52f998 100644
--- a/apps/v4/public/r/styles/base-sera/command.json
+++ b/apps/v4/public/r/styles/base-sera/command.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-sera/ui/command.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/registry/base-sera/ui/dialog\"\nimport {\n InputGroup,\n InputGroupAddon,\n} from \"@/registry/base-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: Omit, \"children\"> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n children: React.ReactNode\n}) {\n return (\n \n \n {title} \n {description} \n \n \n {children}\n \n \n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n \n \n \n
\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/registry/base-sera/ui/dialog\"\nimport {\n InputGroup,\n InputGroupAddon,\n} from \"@/registry/base-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: Omit, \"children\"> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n children: React.ReactNode\n}) {\n return (\n \n \n {title} \n {description} \n \n \n {children}\n \n \n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n \n \n \n
\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/context-menu.json b/apps/v4/public/r/styles/base-sera/context-menu.json
index 2e06947ebc..16d94d8b50 100644
--- a/apps/v4/public/r/styles/base-sera/context-menu.json
+++ b/apps/v4/public/r/styles/base-sera/context-menu.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/context-menu.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ContextMenu as ContextMenuPrimitive } from \"@base-ui/react/context-menu\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {\n return \n}\n\nfunction ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuTrigger({\n className,\n ...props\n}: ContextMenuPrimitive.Trigger.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuContent({\n className,\n align = \"start\",\n alignOffset = 4,\n side = \"right\",\n sideOffset = 0,\n ...props\n}: ContextMenuPrimitive.Popup.Props &\n Pick<\n ContextMenuPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: ContextMenuPrimitive.GroupLabel.Props & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: ContextMenuPrimitive.Item.Props & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: ContextMenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ContextMenuSubContent({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: ContextMenuPrimitive.CheckboxItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuRadioGroup({\n ...props\n}: ContextMenuPrimitive.RadioGroup.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: ContextMenuPrimitive.RadioItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: ContextMenuPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ContextMenu as ContextMenuPrimitive } from \"@base-ui/react/context-menu\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {\n return \n}\n\nfunction ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuTrigger({\n className,\n ...props\n}: ContextMenuPrimitive.Trigger.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuContent({\n className,\n align = \"start\",\n alignOffset = 4,\n side = \"right\",\n sideOffset = 0,\n ...props\n}: ContextMenuPrimitive.Popup.Props &\n Pick<\n ContextMenuPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: ContextMenuPrimitive.GroupLabel.Props & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: ContextMenuPrimitive.Item.Props & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: ContextMenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ContextMenuSubContent({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: ContextMenuPrimitive.CheckboxItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuRadioGroup({\n ...props\n}: ContextMenuPrimitive.RadioGroup.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: ContextMenuPrimitive.RadioItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: ContextMenuPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/dropdown-menu-example.json b/apps/v4/public/r/styles/base-sera/dropdown-menu-example.json
index ef038a1807..12d8d1772b 100644
--- a/apps/v4/public/r/styles/base-sera/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/base-sera/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/base-sera/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-sera/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-sera/ui/avatar\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-sera/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-sera/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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/base-sera/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-sera/ui/avatar\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-sera/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-sera/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/dropdown-menu.json b/apps/v4/public/r/styles/base-sera/dropdown-menu.json
index afa284dc77..366abcae76 100644
--- a/apps/v4/public/r/styles/base-sera/dropdown-menu.json
+++ b/apps/v4/public/r/styles/base-sera/dropdown-menu.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/dropdown-menu.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {\n return \n}\n\nfunction DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {\n return \n}\n\nfunction DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {\n return \n}\n\nfunction DropdownMenuContent({\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n className,\n ...props\n}: MenuPrimitive.Popup.Props &\n Pick<\n MenuPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {\n return \n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: MenuPrimitive.GroupLabel.Props & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: MenuPrimitive.Item.Props & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {\n return \n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction DropdownMenuSubContent({\n align = \"start\",\n alignOffset = -3,\n side = \"right\",\n sideOffset = 0,\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {\n return (\n \n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: MenuPrimitive.RadioItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: MenuPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {\n return \n}\n\nfunction DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {\n return \n}\n\nfunction DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {\n return \n}\n\nfunction DropdownMenuContent({\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n className,\n ...props\n}: MenuPrimitive.Popup.Props &\n Pick<\n MenuPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {\n return \n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: MenuPrimitive.GroupLabel.Props & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: MenuPrimitive.Item.Props & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {\n return \n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction DropdownMenuSubContent({\n align = \"start\",\n alignOffset = -3,\n side = \"right\",\n sideOffset = 0,\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {\n return (\n \n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: MenuPrimitive.RadioItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: MenuPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/field-example.json b/apps/v4/public/r/styles/base-sera/field-example.json
index e7ad9ea655..1d7436e9f2 100644
--- a/apps/v4/public/r/styles/base-sera/field-example.json
+++ b/apps/v4/public/r/styles/base-sera/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/base-sera/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/base-sera/components/example\"\nimport { Badge } from \"@/registry/base-sera/ui/badge\"\nimport { Checkbox } from \"@/registry/base-sera/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-sera/ui/field\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-sera/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-sera/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-sera/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-sera/ui/select\"\nimport { Slider } from \"@/registry/base-sera/ui/slider\"\nimport { Switch } from \"@/registry/base-sera/ui/switch\"\nimport { Textarea } from \"@/registry/base-sera/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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-sera/components/example\"\nimport { Badge } from \"@/registry/base-sera/ui/badge\"\nimport { Checkbox } from \"@/registry/base-sera/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-sera/ui/field\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-sera/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-sera/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-sera/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-sera/ui/select\"\nimport { Slider } from \"@/registry/base-sera/ui/slider\"\nimport { Switch } from \"@/registry/base-sera/ui/switch\"\nimport { Textarea } from \"@/registry/base-sera/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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-sera/field.json b/apps/v4/public/r/styles/base-sera/field.json
index cfd59349d2..beb15f8bec 100644
--- a/apps/v4/public/r/styles/base-sera/field.json
+++ b/apps/v4/public/r/styles/base-sera/field.json
@@ -8,7 +8,7 @@
"files": [
{
"path": "registry/base-sera/ui/field.tsx",
- "content": "\"use client\"\n\nimport { useMemo } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Label } from \"@/registry/base-sera/ui/label\"\nimport { Separator } from \"@/registry/base-sera/ui/separator\"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n return (\n [data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n return (\n \n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nconst fieldVariants = cva(\n \"group/field flex w-full gap-3 data-[invalid=true]:text-destructive\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col *:w-full [&>.sr-only]:w-auto\",\n horizontal:\n \"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n responsive:\n \"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n)\n\nfunction Field({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n [data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n children?: React.ReactNode\n}) {\n return (\n
\n \n {children && (\n \n {children}\n \n )}\n
\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n \n {uniqueErrors.map(\n (error, index) =>\n error?.message && {error.message} \n )}\n \n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n \n {content}\n
\n )\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n}\n",
+ "content": "\"use client\"\n\nimport { useMemo } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Label } from \"@/registry/base-sera/ui/label\"\nimport { Separator } from \"@/registry/base-sera/ui/separator\"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n return (\n [data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n return (\n \n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nconst fieldVariants = cva(\n \"group/field flex w-full gap-3 data-[invalid=true]:text-destructive\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col *:w-full [&>.sr-only]:w-auto\",\n horizontal:\n \"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n responsive:\n \"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n)\n\nfunction Field({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n [data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n children?: React.ReactNode\n}) {\n return (\n
\n \n {children && (\n \n {children}\n \n )}\n
\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n \n {uniqueErrors.map(\n (error, index) =>\n error?.message && {error.message} \n )}\n \n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n \n {content}\n
\n )\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/input-group.json b/apps/v4/public/r/styles/base-sera/input-group.json
index 74625dd3f7..be63672534 100644
--- a/apps/v4/public/r/styles/base-sera/input-group.json
+++ b/apps/v4/public/r/styles/base-sera/input-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "registry/base-sera/ui/input-group.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport { Textarea } from \"@/registry/base-sera/ui/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n [data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-b-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first\",\n \"inline-end\": \"order-last\",\n \"block-start\":\n \"order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5\",\n \"block-end\":\n \"order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps
) {\n return (\n {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 rounded-none text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\": \"size-6 p-0 text-xs has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit
, \"size\" | \"type\"> &\n VariantProps & {\n type?: \"button\" | \"submit\" | \"reset\"\n }) {\n return (\n \n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n [data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n \n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport { Textarea } from \"@/registry/base-sera/ui/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n [data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-b-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first\",\n \"inline-end\": \"order-last\",\n \"block-start\":\n \"order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5\",\n \"block-end\":\n \"order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps
) {\n return (\n {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 rounded-none text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\": \"size-6 p-0 text-xs has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit
, \"size\" | \"type\"> &\n VariantProps & {\n type?: \"button\" | \"submit\" | \"reset\"\n }) {\n return (\n \n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n [data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n \n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/input-otp.json b/apps/v4/public/r/styles/base-sera/input-otp.json
index ddfc770a7a..dc8273df8e 100644
--- a/apps/v4/public/r/styles/base-sera/input-otp.json
+++ b/apps/v4/public/r/styles/base-sera/input-otp.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/base-sera/ui/input-otp.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps & {\n containerClassName?: string\n}) {\n return (\n \n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n \n {char}\n {hasFakeCaret && (\n
\n )}\n
\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n \n \n
\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps & {\n containerClassName?: string\n}) {\n return (\n \n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n \n {char}\n {hasFakeCaret && (\n
\n )}\n
\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n \n \n
\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/label.json b/apps/v4/public/r/styles/base-sera/label.json
index deb5b17cbb..5da42a6b12 100644
--- a/apps/v4/public/r/styles/base-sera/label.json
+++ b/apps/v4/public/r/styles/base-sera/label.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/label.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nfunction Label({ className, ...props }: React.ComponentProps<\"label\">) {\n return (\n \n )\n}\n\nexport { Label }\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nfunction Label({ className, ...props }: React.ComponentProps<\"label\">) {\n return (\n \n )\n}\n\nexport { Label }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/menubar.json b/apps/v4/public/r/styles/base-sera/menubar.json
index b5f0d7eb64..b610fdcf9c 100644
--- a/apps/v4/public/r/styles/base-sera/menubar.json
+++ b/apps/v4/public/r/styles/base-sera/menubar.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/base-sera/ui/menubar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\"\nimport { Menubar as MenubarPrimitive } from \"@base-ui/react/menubar\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-sera/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Menubar({ className, ...props }: MenubarPrimitive.Props) {\n return (\n \n )\n}\n\nfunction MenubarMenu({ ...props }: React.ComponentProps) {\n return \n}\n\nfunction MenubarGroup({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarPortal({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarTrigger({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarContent({\n className,\n align = \"start\",\n alignOffset = -4,\n sideOffset = 8,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction MenubarRadioGroup({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarRadioItem({\n className,\n children,\n inset,\n ...props\n}: MenuPrimitive.RadioItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction MenubarLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction MenubarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarShortcut({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarSub({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarSubTrigger({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction MenubarSubContent({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n Menubar,\n MenubarPortal,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarGroup,\n MenubarSeparator,\n MenubarLabel,\n MenubarItem,\n MenubarShortcut,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\"\nimport { Menubar as MenubarPrimitive } from \"@base-ui/react/menubar\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-sera/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Menubar({ className, ...props }: MenubarPrimitive.Props) {\n return (\n \n )\n}\n\nfunction MenubarMenu({ ...props }: React.ComponentProps) {\n return \n}\n\nfunction MenubarGroup({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarPortal({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarTrigger({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarContent({\n className,\n align = \"start\",\n alignOffset = -4,\n sideOffset = 8,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction MenubarRadioGroup({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarRadioItem({\n className,\n children,\n inset,\n ...props\n}: MenuPrimitive.RadioItem.Props & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction MenubarLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction MenubarSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarShortcut({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarSub({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarSubTrigger({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction MenubarSubContent({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n Menubar,\n MenubarPortal,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarGroup,\n MenubarSeparator,\n MenubarLabel,\n MenubarItem,\n MenubarShortcut,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/native-select.json b/apps/v4/public/r/styles/base-sera/native-select.json
index c39cafcc4c..82e9bd2471 100644
--- a/apps/v4/public/r/styles/base-sera/native-select.json
+++ b/apps/v4/public/r/styles/base-sera/native-select.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/native-select.tsx",
- "content": "import * as React from \"react\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\ntype NativeSelectProps = Omit, \"size\"> & {\n size?: \"sm\" | \"default\"\n}\n\nfunction NativeSelect({\n className,\n size = \"default\",\n ...props\n}: NativeSelectProps) {\n return (\n \n \n \n
\n )\n}\n\nfunction NativeSelectOption({\n className,\n ...props\n}: React.ComponentProps<\"option\">) {\n return (\n \n )\n}\n\nfunction NativeSelectOptGroup({\n className,\n ...props\n}: React.ComponentProps<\"optgroup\">) {\n return (\n \n )\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n",
+ "content": "import * as React from \"react\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\ntype NativeSelectProps = Omit, \"size\"> & {\n size?: \"sm\" | \"default\"\n}\n\nfunction NativeSelect({\n className,\n size = \"default\",\n ...props\n}: NativeSelectProps) {\n return (\n \n \n \n
\n )\n}\n\nfunction NativeSelectOption({\n className,\n ...props\n}: React.ComponentProps<\"option\">) {\n return (\n \n )\n}\n\nfunction NativeSelectOptGroup({\n className,\n ...props\n}: React.ComponentProps<\"optgroup\">) {\n return (\n \n )\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/navigation-menu.json b/apps/v4/public/r/styles/base-sera/navigation-menu.json
index 2e837b8ad1..b1c8e87fc5 100644
--- a/apps/v4/public/r/styles/base-sera/navigation-menu.json
+++ b/apps/v4/public/r/styles/base-sera/navigation-menu.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/navigation-menu.tsx",
- "content": "import { NavigationMenu as NavigationMenuPrimitive } from \"@base-ui/react/navigation-menu\"\nimport { cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction NavigationMenu({\n align = \"start\",\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props &\n Pick) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction NavigationMenuList({\n className,\n ...props\n}: React.ComponentPropsWithRef) {\n return (\n \n )\n}\n\nfunction NavigationMenuItem({\n className,\n ...props\n}: React.ComponentPropsWithRef) {\n return (\n \n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n \"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-none px-4.5 py-2.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted\"\n)\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Trigger.Props) {\n return (\n \n {children}{\" \"}\n \n \n )\n}\n\nfunction NavigationMenuContent({\n className,\n ...props\n}: NavigationMenuPrimitive.Content.Props) {\n return (\n \n )\n}\n\nfunction NavigationMenuPositioner({\n className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction NavigationMenuLink({\n className,\n ...props\n}: NavigationMenuPrimitive.Link.Props) {\n return (\n \n )\n}\n\nfunction NavigationMenuIndicator({\n className,\n ...props\n}: React.ComponentPropsWithRef) {\n return (\n \n
\n \n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n NavigationMenuPositioner,\n}\n",
+ "content": "import { NavigationMenu as NavigationMenuPrimitive } from \"@base-ui/react/navigation-menu\"\nimport { cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction NavigationMenu({\n align = \"start\",\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props &\n Pick) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction NavigationMenuList({\n className,\n ...props\n}: React.ComponentPropsWithRef) {\n return (\n \n )\n}\n\nfunction NavigationMenuItem({\n className,\n ...props\n}: React.ComponentPropsWithRef) {\n return (\n \n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n \"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-none px-4.5 py-2.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted\"\n)\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Trigger.Props) {\n return (\n \n {children}{\" \"}\n \n \n )\n}\n\nfunction NavigationMenuContent({\n className,\n ...props\n}: NavigationMenuPrimitive.Content.Props) {\n return (\n \n )\n}\n\nfunction NavigationMenuPositioner({\n className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction NavigationMenuLink({\n className,\n ...props\n}: NavigationMenuPrimitive.Link.Props) {\n return (\n \n )\n}\n\nfunction NavigationMenuIndicator({\n className,\n ...props\n}: React.ComponentPropsWithRef) {\n return (\n \n
\n \n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n NavigationMenuPositioner,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/select-example.json b/apps/v4/public/r/styles/base-sera/select-example.json
index 630b92cb10..de51f4dc0e 100644
--- a/apps/v4/public/r/styles/base-sera/select-example.json
+++ b/apps/v4/public/r/styles/base-sera/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/base-sera/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-sera/components/example\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-sera/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-sera/ui/field\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-sera/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-sera/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-sera/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-sera/components/example\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-sera/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-sera/ui/field\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-sera/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-sera/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-sera/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/select.json b/apps/v4/public/r/styles/base-sera/select.json
index f1ca66b4d0..4c9948d92a 100644
--- a/apps/v4/public/r/styles/base-sera/select.json
+++ b/apps/v4/public/r/styles/base-sera/select.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/select.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n \n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n \n {children}\n \n }\n />\n \n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n >) {\n return (\n \n \n \n \n {children} \n \n \n \n \n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props) {\n return (\n \n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props) {\n return (\n \n \n {children}\n \n \n }\n >\n \n \n \n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n \n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n \n {children}\n \n }\n />\n \n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n >) {\n return (\n \n \n \n \n {children} \n \n \n \n \n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props) {\n return (\n \n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props) {\n return (\n \n \n {children}\n \n \n }\n >\n \n \n \n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/sidebar.json b/apps/v4/public/r/styles/base-sera/sidebar.json
index 490a6e0d7c..000bf58b37 100644
--- a/apps/v4/public/r/styles/base-sera/sidebar.json
+++ b/apps/v4/public/r/styles/base-sera/sidebar.json
@@ -13,7 +13,7 @@
"files": [
{
"path": "registry/base-sera/ui/sidebar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { useIsMobile } from \"@/registry/base-sera/hooks/use-mobile\"\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport { Separator } from \"@/registry/base-sera/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/base-sera/ui/sheet\"\nimport { Skeleton } from \"@/registry/base-sera/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/base-sera/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 onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n \n Toggle Sidebar \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 render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex h-8 shrink-0 items-center rounded-none px-3 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n })\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-none p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\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 \"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none px-3 py-2 text-left text-sm ring-sidebar-ring outline-hidden 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! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground 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-14 px-3 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 render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n } & VariantProps) {\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 : ,\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 \"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-none p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-2 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded: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 \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-none px-3 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\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",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { useIsMobile } from \"@/registry/base-sera/hooks/use-mobile\"\nimport { cn } from \"@/registry/base-sera/lib/utils\"\nimport { Button } from \"@/registry/base-sera/ui/button\"\nimport { Input } from \"@/registry/base-sera/ui/input\"\nimport { Separator } from \"@/registry/base-sera/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/registry/base-sera/ui/sheet\"\nimport { Skeleton } from \"@/registry/base-sera/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/base-sera/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 onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n \n Toggle Sidebar \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 render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex h-8 shrink-0 items-center rounded-none px-3 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-3.5 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n })\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-none p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-3.5 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\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 \"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none px-3 py-2 text-left text-sm ring-sidebar-ring outline-hidden 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! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground 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-14 px-3 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 render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean\n tooltip?: string | React.ComponentProps\n } & VariantProps) {\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 : ,\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 \"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-none p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-2 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-3.5 [&>svg]:shrink-0\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded: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 \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-none px-3 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\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/base-sera/switch-example.json b/apps/v4/public/r/styles/base-sera/switch-example.json
index f4e9b07919..000f88a299 100644
--- a/apps/v4/public/r/styles/base-sera/switch-example.json
+++ b/apps/v4/public/r/styles/base-sera/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-sera/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-sera/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-sera/ui/field\"\nimport { Label } from \"@/registry/base-sera/ui/label\"\nimport { Switch } from \"@/registry/base-sera/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-sera/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-sera/ui/field\"\nimport { Label } from \"@/registry/base-sera/ui/label\"\nimport { Switch } from \"@/registry/base-sera/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/tabs.json b/apps/v4/public/r/styles/base-sera/tabs.json
index 34b4e82aea..2df85630bc 100644
--- a/apps/v4/public/r/styles/base-sera/tabs.json
+++ b/apps/v4/public/r/styles/base-sera/tabs.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/tabs.tsx",
- "content": "\"use client\"\n\nimport { Tabs as TabsPrimitive } from \"@base-ui/react/tabs\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nfunction Tabs({\n className,\n orientation = \"horizontal\",\n ...props\n}: TabsPrimitive.Root.Props) {\n return (\n \n )\n}\n\nconst tabsListVariants = cva(\n \"group/tabs-list inline-flex w-fit items-center justify-center p-1 text-muted-foreground group-data-horizontal/tabs:h-10 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col\",\n {\n variants: {\n variant: {\n default: \"bg-muted\",\n line: \"gap-1 bg-transparent\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction TabsList({\n className,\n variant = \"default\",\n ...props\n}: TabsPrimitive.List.Props & VariantProps) {\n return (\n \n )\n}\n\nfunction TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n return (\n \n )\n}\n\nfunction TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n return (\n \n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }\n",
+ "content": "\"use client\"\n\nimport { Tabs as TabsPrimitive } from \"@base-ui/react/tabs\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nfunction Tabs({\n className,\n orientation = \"horizontal\",\n ...props\n}: TabsPrimitive.Root.Props) {\n return (\n \n )\n}\n\nconst tabsListVariants = cva(\n \"group/tabs-list inline-flex w-fit items-center justify-center p-1 text-muted-foreground group-data-horizontal/tabs:h-10 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col\",\n {\n variants: {\n variant: {\n default: \"bg-muted\",\n line: \"gap-1 bg-transparent\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction TabsList({\n className,\n variant = \"default\",\n ...props\n}: TabsPrimitive.List.Props & VariantProps) {\n return (\n \n )\n}\n\nfunction TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n return (\n \n )\n}\n\nfunction TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n return (\n \n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-sera/toggle.json b/apps/v4/public/r/styles/base-sera/toggle.json
index 80a2afd5d2..07949be508 100644
--- a/apps/v4/public/r/styles/base-sera/toggle.json
+++ b/apps/v4/public/r/styles/base-sera/toggle.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/base-sera/ui/toggle.tsx",
- "content": "\"use client\"\n\nimport { Toggle as TogglePrimitive } from \"@base-ui/react/toggle\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nconst toggleVariants = cva(\n \"group/toggle inline-flex items-center justify-center gap-1.5 rounded-none text-xs font-semibold tracking-widest whitespace-nowrap uppercase transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border border-input bg-transparent hover:bg-muted\",\n },\n size: {\n default:\n \"h-10 min-w-10 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n sm: \"h-9 min-w-9 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n lg: \"h-11 min-w-11 px-8 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Toggle({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: TogglePrimitive.Props & VariantProps) {\n return (\n \n )\n}\n\nexport { Toggle, toggleVariants }\n",
+ "content": "\"use client\"\n\nimport { Toggle as TogglePrimitive } from \"@base-ui/react/toggle\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/base-sera/lib/utils\"\n\nconst toggleVariants = cva(\n \"group/toggle inline-flex items-center justify-center gap-1.5 rounded-none text-xs font-semibold tracking-widest whitespace-nowrap uppercase transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border border-input bg-transparent hover:bg-muted\",\n },\n size: {\n default:\n \"h-10 min-w-10 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n sm: \"h-9 min-w-9 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n lg: \"h-11 min-w-11 px-8 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Toggle({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: TogglePrimitive.Props & VariantProps) {\n return (\n \n )\n}\n\nexport { Toggle, toggleVariants }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/base-vega/dropdown-menu-example.json b/apps/v4/public/r/styles/base-vega/dropdown-menu-example.json
index 2ad7018467..9d1f038357 100644
--- a/apps/v4/public/r/styles/base-vega/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/base-vega/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/base-vega/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-vega/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-vega/ui/avatar\"\nimport { Button } from \"@/registry/base-vega/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-vega/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-vega/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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/base-vega/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/base-vega/ui/avatar\"\nimport { Button } from \"@/registry/base-vega/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-vega/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/base-vega/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n GitHub \n Support \n API \n \n \n \n )\n}\n\nfunction DropdownMenuSides() {\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n }\n >\n {side.replace(\"-\", \" \")}\n \n \n \n Profile \n Billing \n Settings \n \n \n \n ))}\n
\n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n }\n >\n Open\n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n }\n >\n Open\n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n }\n >\n Open\n \n \n \n Team \n \n Invite users \n \n \n Email \n Message \n \n More... \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n }\n >\n Checkboxes\n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n }\n >\n Radio Group\n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n }\n >\n Notifications\n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n }\n >\n Payment Method\n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n }\n >\n Actions\n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n Sign Out\n \n >\n )\n\n return (\n \n \n
\n \n }\n >\n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n {menuContent}\n \n \n
\n \n }\n >\n \n \n LR \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n }\n >\n Open Menu\n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n More Options \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n Developer Tools \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n }\n >\n Open\n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n }\n >\n Complex Menu\n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-vega/field-example.json b/apps/v4/public/r/styles/base-vega/field-example.json
index 7ef794637d..8e18537fe6 100644
--- a/apps/v4/public/r/styles/base-vega/field-example.json
+++ b/apps/v4/public/r/styles/base-vega/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/base-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/base-vega/components/example\"\nimport { Badge } from \"@/registry/base-vega/ui/badge\"\nimport { Checkbox } from \"@/registry/base-vega/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-vega/ui/field\"\nimport { Input } from \"@/registry/base-vega/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-vega/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-vega/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-vega/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-vega/ui/select\"\nimport { Slider } from \"@/registry/base-vega/ui/slider\"\nimport { Switch } from \"@/registry/base-vega/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-vega/components/example\"\nimport { Badge } from \"@/registry/base-vega/ui/badge\"\nimport { Checkbox } from \"@/registry/base-vega/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/base-vega/ui/field\"\nimport { Input } from \"@/registry/base-vega/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/base-vega/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/base-vega/ui/native-select\"\nimport { RadioGroup, RadioGroupItem } from \"@/registry/base-vega/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-vega/ui/select\"\nimport { Slider } from \"@/registry/base-vega/ui/slider\"\nimport { Switch } from \"@/registry/base-vega/ui/switch\"\nimport { Textarea } from \"@/registry/base-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 const basicItems = [\n { label: \"Choose an option\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const countryItems = [\n { label: \"Select your country\", value: null },\n { label: \"United States\", value: \"us\" },\n { label: \"United Kingdom\", value: \"uk\" },\n { label: \"Canada\", value: \"ca\" },\n ]\n const timezoneItems = [\n { label: \"Select timezone\", value: null },\n { label: \"UTC\", value: \"utc\" },\n { label: \"Eastern Time\", value: \"est\" },\n { label: \"Pacific Time\", value: \"pst\" },\n ]\n const invalidItems = [\n { label: \"This field has an error\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n const disabledItems = [\n { label: \"Cannot select\", value: null },\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n ]\n\n return (\n \n \n \n Basic Select \n \n \n \n \n \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Country \n \n \n \n \n \n \n {countryItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \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 \n \n \n {timezoneItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n {invalidItems.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n {disabledItems.map((item) => (\n \n {item.label}\n \n ))}\n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 setVolume(value as number[])}\n max={100}\n step={1}\n />\n \n \n Screen Brightness \n setBrightness(value as number[])}\n max={100}\n step={5}\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 setTemperature(value as number[])}\n min={0}\n max={1}\n step={0.1}\n />\n \n Range: {temperature[0].toFixed(1)} - {temperature[1].toFixed(1)}\n \n \n \n Price Range \n setPriceRange(value as number[])}\n max={100}\n step={5}\n />\n \n ${priceRange[0]} - ${priceRange[1]}\n \n \n \n Color Balance \n setColorBalance(value as number[])}\n max={100}\n step={10}\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 const basicItems = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Orange\", value: \"orange\" },\n ]\n\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 \n \n {basicItems.map((item) => (\n \n {item.label}\n \n ))}\n \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/base-vega/select-example.json b/apps/v4/public/r/styles/base-vega/select-example.json
index 7a7865d3c5..a3519dc9c3 100644
--- a/apps/v4/public/r/styles/base-vega/select-example.json
+++ b/apps/v4/public/r/styles/base-vega/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/base-vega/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-vega/components/example\"\nimport { Button } from \"@/registry/base-vega/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-vega/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-vega/ui/field\"\nimport { Input } from \"@/registry/base-vega/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-vega/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-vega/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-vega/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
+ "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-vega/components/example\"\nimport { Button } from \"@/registry/base-vega/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/base-vega/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/base-vega/ui/field\"\nimport { Input } from \"@/registry/base-vega/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/base-vega/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/base-vega/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/base-vega/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSides() {\n const items = [\n { label: \"Select\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n {(\n [\n \"inline-start\",\n \"left\",\n \"top\",\n \"bottom\",\n \"right\",\n \"inline-end\",\n ] as const\n ).map((side) => (\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n ))}\n
\n \n )\n}\n\nfunction SelectWithIcons() {\n const items = [\n {\n label: (\n <>\n \n Chart Type\n >\n ),\n value: null,\n },\n {\n label: (\n <>\n \n Line\n >\n ),\n value: \"line\",\n },\n {\n label: (\n <>\n \n Bar\n >\n ),\n value: \"bar\",\n },\n {\n label: (\n <>\n \n Pie\n >\n ),\n value: \"pie\",\n },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n const fruits = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n const vegetables = [\n { label: \"Carrot\", value: \"carrot\" },\n { label: \"Broccoli\", value: \"broccoli\" },\n { label: \"Spinach\", value: \"spinach\" },\n ]\n const allItems = [\n { label: \"Select a fruit\", value: null },\n ...fruits,\n ...vegetables,\n ]\n return (\n \n \n \n \n \n \n \n Fruits \n {fruits.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Vegetables \n {vegetables.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n const items = [\n { label: \"Select an item\", value: null },\n ...Array.from({ length: 100 }).map((_, i) => ({\n label: `Item ${i}`,\n value: `item-${i}`,\n })),\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n ]\n return (\n \n \n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n const items = [\n { label: \"Filter\", value: null },\n { label: \"All\", value: \"all\" },\n { label: \"Active\", value: \"active\" },\n { label: \"Inactive\", value: \"inactive\" },\n ]\n return (\n \n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\", disabled: true },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n return (\n \n plan.name}\n >\n \n \n {(value: (typeof plans)[number]) => }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectMultiple() {\n const items = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n ]\n return (\n \n \n \n \n {(value: string[]) => {\n if (value.length === 0) {\n return \"Select fruits\"\n }\n if (value.length === 1) {\n return items.find((item) => item.value === value[0])?.label\n }\n return `${value.length} fruits selected`\n }}\n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectInDialog() {\n const items = [\n { label: \"Select a fruit\", value: null },\n { label: \"Apple\", value: \"apple\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Grapes\", value: \"grapes\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n ]\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n {items.map((item) => (\n \n {item.label}\n \n ))}\n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/base-vega/switch-example.json b/apps/v4/public/r/styles/base-vega/switch-example.json
index 9425429111..906958d435 100644
--- a/apps/v4/public/r/styles/base-vega/switch-example.json
+++ b/apps/v4/public/r/styles/base-vega/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/base-vega/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-vega/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-vega/ui/field\"\nimport { Label } from \"@/registry/base-vega/ui/label\"\nimport { Switch } from \"@/registry/base-vega/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/base-vega/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/base-vega/ui/field\"\nimport { Label } from \"@/registry/base-vega/ui/label\"\nimport { Switch } from \"@/registry/base-vega/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-luma/dropdown-menu-example.json b/apps/v4/public/r/styles/radix-luma/dropdown-menu-example.json
index d55811519c..774c647b4b 100644
--- a/apps/v4/public/r/styles/radix-luma/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/radix-luma/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/radix-luma/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-luma/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-luma/ui/avatar\"\nimport { Button } from \"@/registry/radix-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-luma/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-luma/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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-luma/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-luma/ui/avatar\"\nimport { Button } from \"@/registry/radix-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-luma/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-luma/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-luma/field-example.json b/apps/v4/public/r/styles/radix-luma/field-example.json
index 44f1f9122a..6c465c52f2 100644
--- a/apps/v4/public/r/styles/radix-luma/field-example.json
+++ b/apps/v4/public/r/styles/radix-luma/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/radix-luma/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-luma/components/example\"\nimport { Badge } from \"@/registry/radix-luma/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-luma/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-luma/ui/field\"\nimport { Input } from \"@/registry/radix-luma/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-luma/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-luma/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-luma/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-luma/ui/select\"\nimport { Slider } from \"@/registry/radix-luma/ui/slider\"\nimport { Switch } from \"@/registry/radix-luma/ui/switch\"\nimport { Textarea } from \"@/registry/radix-luma/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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 \n \n Apple \n Banana \n Orange \n \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-luma/components/example\"\nimport { Badge } from \"@/registry/radix-luma/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-luma/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-luma/ui/field\"\nimport { Input } from \"@/registry/radix-luma/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-luma/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-luma/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-luma/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-luma/ui/select\"\nimport { Slider } from \"@/registry/radix-luma/ui/slider\"\nimport { Switch } from \"@/registry/radix-luma/ui/switch\"\nimport { Textarea } from \"@/registry/radix-luma/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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 \n \n Apple \n Banana \n Orange \n \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-luma/select-example.json b/apps/v4/public/r/styles/radix-luma/select-example.json
index 7280a093f2..a3fbb04ffa 100644
--- a/apps/v4/public/r/styles/radix-luma/select-example.json
+++ b/apps/v4/public/r/styles/radix-luma/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/radix-luma/examples/select-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-luma/components/example\"\nimport { Button } from \"@/registry/radix-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-luma/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-luma/ui/field\"\nimport { Input } from \"@/registry/radix-luma/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-luma/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-luma/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-luma/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \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-luma/components/example\"\nimport { Button } from \"@/registry/radix-luma/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-luma/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-luma/ui/field\"\nimport { Input } from \"@/registry/radix-luma/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-luma/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-luma/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-luma/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-luma/switch-example.json b/apps/v4/public/r/styles/radix-luma/switch-example.json
index 563421ba61..81c6cc5e35 100644
--- a/apps/v4/public/r/styles/radix-luma/switch-example.json
+++ b/apps/v4/public/r/styles/radix-luma/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/radix-luma/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-luma/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-luma/ui/field\"\nimport { Label } from \"@/registry/radix-luma/ui/label\"\nimport { Switch } from \"@/registry/radix-luma/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-luma/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-luma/ui/field\"\nimport { Label } from \"@/registry/radix-luma/ui/label\"\nimport { Switch } from \"@/registry/radix-luma/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/dropdown-menu-example.json b/apps/v4/public/r/styles/radix-lyra/dropdown-menu-example.json
index 8ce5d6f968..1fdff44f7f 100644
--- a/apps/v4/public/r/styles/radix-lyra/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/dropdown-menu-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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-lyra/ui/avatar\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-lyra/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-lyra/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-lyra/ui/avatar\"\nimport { Button } from \"@/registry/radix-lyra/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-lyra/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-lyra/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \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 d2a5f57992..b7a9ba8ffe 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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 \n \n Apple \n Banana \n Orange \n \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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 \n \n Apple \n Banana \n Orange \n \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/select-example.json b/apps/v4/public/r/styles/radix-lyra/select-example.json
index ce2e67f436..37dae43d05 100644
--- a/apps/v4/public/r/styles/radix-lyra/select-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/select-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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-lyra/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-lyra/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-lyra/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Input } from \"@/registry/radix-lyra/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-lyra/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-lyra/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-lyra/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-lyra/switch-example.json b/apps/v4/public/r/styles/radix-lyra/switch-example.json
index 34e7f52455..0efe2c1030 100644
--- a/apps/v4/public/r/styles/radix-lyra/switch-example.json
+++ b/apps/v4/public/r/styles/radix-lyra/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/radix-lyra/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Label } from \"@/registry/radix-lyra/ui/label\"\nimport { Switch } from \"@/registry/radix-lyra/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-lyra/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-lyra/ui/field\"\nimport { Label } from \"@/registry/radix-lyra/ui/label\"\nimport { Switch } from \"@/registry/radix-lyra/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/dropdown-menu-example.json b/apps/v4/public/r/styles/radix-maia/dropdown-menu-example.json
index 4b4e587e5d..5be714f8cf 100644
--- a/apps/v4/public/r/styles/radix-maia/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/radix-maia/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/radix-maia/examples/dropdown-menu-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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-maia/ui/avatar\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-maia/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-maia/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-maia/ui/avatar\"\nimport { Button } from \"@/registry/radix-maia/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-maia/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-maia/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
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 2f5f52ac7b..2f01947019 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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 \n \n Apple \n Banana \n Orange \n \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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 \n \n Apple \n Banana \n Orange \n \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/select-example.json b/apps/v4/public/r/styles/radix-maia/select-example.json
index 6f56c6cd74..f5a10e4b1b 100644
--- a/apps/v4/public/r/styles/radix-maia/select-example.json
+++ b/apps/v4/public/r/styles/radix-maia/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/radix-maia/examples/select-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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-maia/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-maia/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-maia/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Input } from \"@/registry/radix-maia/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-maia/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-maia/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-maia/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-maia/switch-example.json b/apps/v4/public/r/styles/radix-maia/switch-example.json
index 51d93019d9..ad2720cf6d 100644
--- a/apps/v4/public/r/styles/radix-maia/switch-example.json
+++ b/apps/v4/public/r/styles/radix-maia/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/radix-maia/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Label } from \"@/registry/radix-maia/ui/label\"\nimport { Switch } from \"@/registry/radix-maia/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-maia/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-maia/ui/field\"\nimport { Label } from \"@/registry/radix-maia/ui/label\"\nimport { Switch } from \"@/registry/radix-maia/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/dropdown-menu-example.json b/apps/v4/public/r/styles/radix-mira/dropdown-menu-example.json
index 7d7ddd6457..8f2d23ccf0 100644
--- a/apps/v4/public/r/styles/radix-mira/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/radix-mira/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/radix-mira/examples/dropdown-menu-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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-mira/ui/avatar\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-mira/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-mira/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-mira/ui/avatar\"\nimport { Button } from \"@/registry/radix-mira/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-mira/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-mira/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
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 3e275e0714..83d35d79d4 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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 \n \n Apple \n Banana \n Orange \n \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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 \n \n Apple \n Banana \n Orange \n \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/select-example.json b/apps/v4/public/r/styles/radix-mira/select-example.json
index 09a7a5cc33..f466bf8516 100644
--- a/apps/v4/public/r/styles/radix-mira/select-example.json
+++ b/apps/v4/public/r/styles/radix-mira/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/radix-mira/examples/select-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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-mira/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-mira/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-mira/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Input } from \"@/registry/radix-mira/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-mira/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-mira/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-mira/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-mira/switch-example.json b/apps/v4/public/r/styles/radix-mira/switch-example.json
index fd55441a29..750625c5d2 100644
--- a/apps/v4/public/r/styles/radix-mira/switch-example.json
+++ b/apps/v4/public/r/styles/radix-mira/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/radix-mira/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Label } from \"@/registry/radix-mira/ui/label\"\nimport { Switch } from \"@/registry/radix-mira/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-mira/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-mira/ui/field\"\nimport { Label } from \"@/registry/radix-mira/ui/label\"\nimport { Switch } from \"@/registry/radix-mira/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/dropdown-menu-example.json b/apps/v4/public/r/styles/radix-nova/dropdown-menu-example.json
index 7b33b749da..893636a5a7 100644
--- a/apps/v4/public/r/styles/radix-nova/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/radix-nova/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/radix-nova/examples/dropdown-menu-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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-nova/ui/avatar\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-nova/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-nova/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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 {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-nova/ui/avatar\"\nimport { Button } from \"@/registry/radix-nova/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-nova/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-nova/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \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 b136b72aaa..2e07ca691b 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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 \n \n Apple \n Banana \n Orange \n \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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 \n \n Apple \n Banana \n Orange \n \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/select-example.json b/apps/v4/public/r/styles/radix-nova/select-example.json
index 79ff3079c2..00eaa34017 100644
--- a/apps/v4/public/r/styles/radix-nova/select-example.json
+++ b/apps/v4/public/r/styles/radix-nova/select-example.json
@@ -15,7 +15,7 @@
"files": [
{
"path": "registry/radix-nova/examples/select-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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-nova/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-nova/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \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 {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-nova/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Input } from \"@/registry/radix-nova/ui/input\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/radix-nova/ui/item\"\nimport {\n NativeSelect,\n NativeSelectOption,\n} from \"@/registry/radix-nova/ui/native-select\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-nova/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function SelectExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction SelectBasic() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithIcons() {\n return (\n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n \n \n \n \n Chart Type\n >\n }\n />\n \n \n \n \n \n Line\n \n \n \n Bar\n \n \n \n Pie\n \n \n \n \n
\n \n )\n}\n\nfunction SelectWithGroups() {\n return (\n \n \n \n \n \n \n \n Fruits \n Apple \n Banana \n Blueberry \n \n \n \n Vegetables \n Carrot \n Broccoli \n Spinach \n \n \n \n \n )\n}\n\nfunction SelectLargeList() {\n return (\n \n \n \n \n \n \n \n {Array.from({ length: 100 }).map((_, i) => (\n \n Item {i}\n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectSizes() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n
\n \n )\n}\n\nfunction SelectWithButton() {\n return (\n \n \n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n \n Submit\n \n
\n
\n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n \n \n Submit \n
\n
\n \n )\n}\n\nfunction SelectItemAligned() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nfunction SelectWithField() {\n return (\n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Choose your favorite fruit from the list.\n \n \n \n )\n}\n\nfunction SelectInvalid() {\n return (\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n Favorite Fruit \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n
\n \n )\n}\n\nfunction SelectInline() {\n return (\n \n \n \n \n \n \n \n \n \n All \n Active \n Inactive \n \n \n \n \n Sort by \n Name \n Date \n Status \n \n
\n \n )\n}\n\nfunction SelectDisabled() {\n return (\n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n \n Grapes\n \n Pineapple \n \n \n \n \n )\n}\n\nconst plans = [\n {\n name: \"Starter\",\n description: \"Perfect for individuals getting started.\",\n },\n {\n name: \"Professional\",\n description: \"Ideal for growing teams and businesses.\",\n },\n {\n name: \"Enterprise\",\n description: \"Advanced features for large organizations.\",\n },\n]\n\nfunction SelectPlan() {\n const [plan, setPlan] = React.useState(plans[0].name)\n\n const selectedPlan = plans.find((p) => p.name === plan)\n\n return (\n \n \n \n \n {selectedPlan && }\n \n \n \n \n {plans.map((plan) => (\n \n \n \n ))}\n \n \n \n \n )\n}\n\nfunction SelectPlanItem({ plan }: { plan: (typeof plans)[number] }) {\n return (\n - \n
\n {plan.name} \n \n {plan.description}\n \n \n \n )\n}\n\nfunction SelectInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Select Example \n \n Use the select below to choose a fruit.\n \n \n \n \n \n \n \n \n Apple \n Banana \n Blueberry \n Grapes \n Pineapple \n \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-nova/switch-example.json b/apps/v4/public/r/styles/radix-nova/switch-example.json
index 5155b154f2..260ce7683a 100644
--- a/apps/v4/public/r/styles/radix-nova/switch-example.json
+++ b/apps/v4/public/r/styles/radix-nova/switch-example.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/radix-nova/examples/switch-example.tsx",
- "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Label } from \"@/registry/radix-nova/ui/label\"\nimport { Switch } from \"@/registry/radix-nova/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
+ "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-nova/components/example\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldLabel,\n FieldTitle,\n} from \"@/registry/radix-nova/ui/field\"\nimport { Label } from \"@/registry/radix-nova/ui/label\"\nimport { Switch } from \"@/registry/radix-nova/ui/switch\"\n\nexport default function SwitchExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction SwitchBasic() {\n return (\n \n \n \n Airplane Mode \n \n \n )\n}\n\nfunction SwitchWithLabel() {\n return (\n \n \n \n Bluetooth \n
\n \n )\n}\n\nfunction SwitchWithDescription() {\n return (\n \n \n \n \n Share across devices \n \n Focus is shared across devices, and turns off when you leave the\n app.\n \n \n \n \n \n \n )\n}\n\nfunction SwitchDisabled() {\n return (\n \n \n
\n \n \n Disabled (Unchecked)\n \n
\n
\n \n Disabled (Checked) \n
\n
\n \n )\n}\n\nfunction SwitchSizes() {\n return (\n \n \n
\n \n Small \n
\n
\n \n Default \n
\n
\n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/accordion.json b/apps/v4/public/r/styles/radix-sera/accordion.json
index 397f2d0258..27520cb7aa 100644
--- a/apps/v4/public/r/styles/radix-sera/accordion.json
+++ b/apps/v4/public/r/styles/radix-sera/accordion.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/radix-sera/ui/accordion.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Accordion({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n {children}\n \n \n \n \n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n {children}\n
\n \n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Accordion({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n {children}\n \n \n \n \n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n {children}\n
\n \n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/breadcrumb.json b/apps/v4/public/r/styles/radix-sera/breadcrumb.json
index e68b1470cb..f0d6549871 100644
--- a/apps/v4/public/r/styles/radix-sera/breadcrumb.json
+++ b/apps/v4/public/r/styles/radix-sera/breadcrumb.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/radix-sera/ui/breadcrumb.tsx",
- "content": "import * as React from \"react\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Breadcrumb({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbLink({\n asChild,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n \n )\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? (\n \n )}\n \n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n svg]:size-4\",\n className\n )}\n {...props}\n >\n \n More \n \n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n",
+ "content": "import * as React from \"react\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Breadcrumb({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbLink({\n asChild,\n className,\n ...props\n}: React.ComponentProps<\"a\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"a\"\n\n return (\n \n )\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? (\n \n )}\n \n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n svg]:size-4\",\n className\n )}\n {...props}\n >\n \n More \n \n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/button-group.json b/apps/v4/public/r/styles/radix-sera/button-group.json
index 34f6030bba..94b22dbdea 100644
--- a/apps/v4/public/r/styles/radix-sera/button-group.json
+++ b/apps/v4/public/r/styles/radix-sera/button-group.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/radix-sera/ui/button-group.tsx",
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Separator } from \"@/registry/radix-sera/ui/separator\"\n\nconst buttonGroupVariants = cva(\n \"group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 *:data-[slot=input]:px-4 has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-border has-[>[data-variant=outline]]:*:data-[slot=input-group]:px-2.5 has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-border has-[>[data-variant=outline]]:*:[[role=combobox]]:px-2.5 has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-ring has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-ring has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-variant=outline]]:[&>input]:border-border has-[>[data-variant=outline]]:[&>input:focus-visible]:border-ring\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none!\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none!\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n [data-variant=outline]]/button-group:border-border [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n",
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Separator } from \"@/registry/radix-sera/ui/separator\"\n\nconst buttonGroupVariants = cva(\n \"group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 *:data-[slot=input]:px-4 has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-border has-[>[data-variant=outline]]:*:data-[slot=input-group]:px-2.5 has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-border has-[>[data-variant=outline]]:*:[[role=combobox]]:px-2.5 has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-ring has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-ring has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-variant=outline]]:[&>input]:border-border has-[>[data-variant=outline]]:[&>input:focus-visible]:border-ring\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none!\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-none!\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot.Root : \"div\"\n\n return (\n [data-variant=outline]]/button-group:border-border [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/button.json b/apps/v4/public/r/styles/radix-sera/button.json
index 282f07f0cf..bee2c5178d 100644
--- a/apps/v4/public/r/styles/radix-sera/button.json
+++ b/apps/v4/public/r/styles/radix-sera/button.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/radix-sera/ui/button.tsx",
- "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-semibold tracking-widest whitespace-nowrap uppercase transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-transparent hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-input/30\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-10 gap-1.5 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n xs: \"h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-9 gap-1 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n lg: \"h-11 gap-1.5 px-8 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5\",\n icon: \"size-10\",\n \"icon-xs\": \"size-7 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-9\",\n \"icon-lg\": \"size-11\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n \n )\n}\n\nexport { Button, buttonVariants }\n",
+ "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-semibold tracking-widest whitespace-nowrap uppercase transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-transparent hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-input/30\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-10 gap-1.5 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n xs: \"h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-9 gap-1 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n lg: \"h-11 gap-1.5 px-8 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5\",\n icon: \"size-10\",\n \"icon-xs\": \"size-7 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-9\",\n \"icon-lg\": \"size-11\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n \n )\n}\n\nexport { Button, buttonVariants }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/combobox.json b/apps/v4/public/r/styles/radix-sera/combobox.json
index 82f8de0236..5ffe8fe15c 100644
--- a/apps/v4/public/r/styles/radix-sera/combobox.json
+++ b/apps/v4/public/r/styles/radix-sera/combobox.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/radix-sera/ui/combobox.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Button } from \"@/registry/radix-sera/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return \n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n }\n className={cn(className)}\n {...props}\n >\n \n \n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n \n }\n {...props}\n />\n \n {showTrigger && (\n \n \n \n )}\n {showClear && }\n \n {children}\n \n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n \n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n \n {children}\n \n }\n >\n \n \n \n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n \n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n \n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n \n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef &\n ComboboxPrimitive.Chips.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n \n {children}\n {showRemove && (\n }\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n \n \n )}\n \n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n \n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Button } from \"@/registry/radix-sera/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/radix-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return \n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n }\n className={cn(className)}\n {...props}\n >\n \n \n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n \n }\n {...props}\n />\n \n {showTrigger && (\n \n \n \n )}\n {showClear && }\n \n {children}\n \n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n \n \n \n \n \n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n \n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n \n {children}\n \n }\n >\n \n \n \n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n \n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n \n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n \n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n \n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef &\n ComboboxPrimitive.Chips.Props) {\n return (\n \n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n \n {children}\n {showRemove && (\n }\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n \n \n )}\n \n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n \n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/command.json b/apps/v4/public/r/styles/radix-sera/command.json
index 709633e436..5d6a9feaa1 100644
--- a/apps/v4/public/r/styles/radix-sera/command.json
+++ b/apps/v4/public/r/styles/radix-sera/command.json
@@ -11,7 +11,7 @@
"files": [
{
"path": "registry/radix-sera/ui/command.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/registry/radix-sera/ui/dialog\"\nimport {\n InputGroup,\n InputGroupAddon,\n} from \"@/registry/radix-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}) {\n return (\n \n \n {title} \n {description} \n \n \n {children}\n \n \n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n \n \n \n
\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/registry/radix-sera/ui/dialog\"\nimport {\n InputGroup,\n InputGroupAddon,\n} from \"@/registry/radix-sera/ui/input-group\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}) {\n return (\n \n \n {title} \n {description} \n \n \n {children}\n \n \n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n \n \n \n \n
\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/context-menu.json b/apps/v4/public/r/styles/radix-sera/context-menu.json
index 56ce4c82ce..559a7c2591 100644
--- a/apps/v4/public/r/styles/radix-sera/context-menu.json
+++ b/apps/v4/public/r/styles/radix-sera/context-menu.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/radix-sera/ui/context-menu.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ContextMenu as ContextMenuPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction ContextMenu({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ContextMenuTrigger({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuPortal({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuSub({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ContextMenuRadioGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n}) {\n return (\n \n \n \n )\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ContextMenuSubContent({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ContextMenu as ContextMenuPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction ContextMenu({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ContextMenuTrigger({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuPortal({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuSub({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction ContextMenuRadioGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n}) {\n return (\n \n \n \n )\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction ContextMenuSubContent({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/dropdown-menu-example.json b/apps/v4/public/r/styles/radix-sera/dropdown-menu-example.json
index 1951b95425..50d302ad0c 100644
--- a/apps/v4/public/r/styles/radix-sera/dropdown-menu-example.json
+++ b/apps/v4/public/r/styles/radix-sera/dropdown-menu-example.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "registry/radix-sera/examples/dropdown-menu-example.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-sera/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-sera/ui/avatar\"\nimport { Button } from \"@/registry/radix-sera/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-sera/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-sera/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Keyboard shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \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-sera/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@/registry/radix-sera/ui/avatar\"\nimport { Button } from \"@/registry/radix-sera/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-sera/ui/dialog\"\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/radix-sera/ui/dropdown-menu\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function DropdownMenuExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuBasic() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n Profile \n Billing \n Settings \n \n \n \n GitHub \n API \n Support \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithIcons() {\n return (\n \n \n \n \n Open\n \n \n \n \n \n \n Profile\n \n \n \n Billing\n \n \n \n Settings\n \n \n \n \n \n \n Log out\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithShortcuts() {\n return (\n \n \n \n \n Open\n \n \n \n \n My Account \n \n Profile\n ⇧⌘P \n \n \n Billing\n ⌘B \n \n \n Settings\n ⌘S \n \n \n Shortcuts\n ⌘K \n \n \n \n \n \n Log out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithSubmenu() {\n return (\n \n \n \n \n Open\n \n \n \n \n Team \n \n Invite users \n \n \n \n Email \n Message \n \n \n \n More... \n \n \n \n \n \n New Team\n ⌘+T \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxes() {\n const [showStatusBar, setShowStatusBar] = React.useState(true)\n const [showActivityBar, setShowActivityBar] = React.useState(false)\n const [showPanel, setShowPanel] = React.useState(false)\n\n return (\n \n \n \n \n Checkboxes\n \n \n \n \n Appearance \n \n \n Status Bar\n \n \n \n Activity Bar\n \n \n \n Panel\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadio() {\n const [position, setPosition] = React.useState(\"bottom\")\n\n return (\n \n \n \n \n Radio Group\n \n \n \n \n Panel Position \n \n \n \n Top\n \n \n \n Bottom\n \n \n \n Right\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithCheckboxesIcons() {\n const [notifications, setNotifications] = React.useState({\n email: true,\n sms: false,\n push: true,\n })\n\n return (\n \n \n \n \n Notifications\n \n \n \n \n Notification Preferences \n \n setNotifications({ ...notifications, email: checked === true })\n }\n >\n \n Email notifications\n \n \n setNotifications({ ...notifications, sms: checked === true })\n }\n >\n \n SMS notifications\n \n \n setNotifications({ ...notifications, push: checked === true })\n }\n >\n \n Push notifications\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithRadioIcons() {\n const [paymentMethod, setPaymentMethod] = React.useState(\"card\")\n\n return (\n \n \n \n Payment Method \n \n \n \n Select Payment Method \n \n \n \n Credit Card\n \n \n \n PayPal\n \n \n \n Bank Transfer\n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithDestructive() {\n return (\n \n \n \n \n Actions\n \n \n \n \n \n \n Edit\n \n \n \n Share\n \n \n \n \n \n \n Archive\n \n \n \n Delete\n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithAvatar() {\n const menuContent = (\n <>\n \n \n \n Account\n \n \n \n Billing\n \n \n \n Notifications\n \n \n \n \n \n \n Sign Out\n \n \n >\n )\n\n return (\n \n \n
\n \n \n \n \n CN \n \n \n shadcn \n \n shadcn@example.com\n \n
\n \n \n \n \n {menuContent}\n \n \n
\n \n \n \n \n LR \n \n \n \n \n {menuContent}\n \n \n
\n \n )\n}\n\nfunction DropdownMenuInDialog() {\n return (\n \n \n \n Open Dialog \n \n \n \n Dropdown Menu Example \n \n Click the button below to see the dropdown menu.\n \n \n \n \n \n Open Menu\n \n \n \n \n \n \n Copy\n \n \n \n Cut\n \n \n \n Paste\n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n Name Window... \n \n \n \n Developer Tools \n \n \n \n \n \n \n \n \n Delete\n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuWithInset() {\n const [showBookmarks, setShowBookmarks] = React.useState(true)\n const [showUrls, setShowUrls] = React.useState(false)\n const [theme, setTheme] = React.useState(\"system\")\n\n return (\n \n \n \n \n Open\n \n \n \n \n Actions \n \n \n Copy\n \n \n \n Cut\n \n Paste \n \n \n \n Appearance \n \n Bookmarks\n \n \n Full URLs\n \n \n \n \n Theme \n \n \n Light\n \n \n Dark\n \n \n System\n \n \n \n \n \n More Options \n \n \n \n Save Page... \n Create Shortcut... \n \n \n \n \n \n \n \n )\n}\n\nfunction DropdownMenuComplex() {\n const [showSidebar, setShowSidebar] = React.useState(true)\n const [showStatusBar, setShowStatusBar] = React.useState(false)\n\n return (\n \n \n \n \n Complex Menu\n \n \n \n \n My Account \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 View \n \n \n Sidebar\n \n \n \n Status Bar\n \n \n \n \n \n \n \n Invite Users\n \n \n \n \n \n \n Email\n \n \n \n Message\n \n \n \n \n \n \n More...\n \n \n \n \n \n \n \n \n \n \n Support\n \n \n \n Sign Out\n ⇧⌘Q \n \n \n \n \n \n )\n}\n",
"type": "registry:example"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/dropdown-menu.json b/apps/v4/public/r/styles/radix-sera/dropdown-menu.json
index e53926da66..d255f36a3c 100644
--- a/apps/v4/public/r/styles/radix-sera/dropdown-menu.json
+++ b/apps/v4/public/r/styles/radix-sera/dropdown-menu.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/radix-sera/ui/dropdown-menu.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuContent({\n className,\n align = \"start\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuContent({\n className,\n align = \"start\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps) {\n return (\n \n \n \n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n \n \n \n \n \n {children}\n \n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps & {\n inset?: boolean\n}) {\n return (\n \n {children}\n \n \n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/field-example.json b/apps/v4/public/r/styles/radix-sera/field-example.json
index c1dcd9ddf2..5e5bd226b0 100644
--- a/apps/v4/public/r/styles/radix-sera/field-example.json
+++ b/apps/v4/public/r/styles/radix-sera/field-example.json
@@ -19,7 +19,7 @@
"files": [
{
"path": "registry/radix-sera/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-sera/components/example\"\nimport { Badge } from \"@/registry/radix-sera/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-sera/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-sera/ui/field\"\nimport { Input } from \"@/registry/radix-sera/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-sera/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-sera/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-sera/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-sera/ui/select\"\nimport { Slider } from \"@/registry/radix-sera/ui/slider\"\nimport { Switch } from \"@/registry/radix-sera/ui/switch\"\nimport { Textarea } from \"@/registry/radix-sera/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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n \n Dark mode\n \n \n \n \n \n Compact view\n \n \n \n \n \n Enable notifications\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 Subscription Plan \n \n \n \n \n Free Plan\n \n \n \n \n \n Pro Plan\n \n \n \n \n \n Enterprise\n \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 \n \n Apple \n Banana \n Orange \n \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-sera/components/example\"\nimport { Badge } from \"@/registry/radix-sera/ui/badge\"\nimport { Checkbox } from \"@/registry/radix-sera/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSet,\n FieldTitle,\n} from \"@/registry/radix-sera/ui/field\"\nimport { Input } from \"@/registry/radix-sera/ui/input\"\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/radix-sera/ui/input-otp\"\nimport {\n NativeSelect,\n NativeSelectOptGroup,\n NativeSelectOption,\n} from \"@/registry/radix-sera/ui/native-select\"\nimport {\n RadioGroup,\n RadioGroupItem,\n} from \"@/registry/radix-sera/ui/radio-group\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/radix-sera/ui/select\"\nimport { Slider } from \"@/registry/radix-sera/ui/slider\"\nimport { Switch } from \"@/registry/radix-sera/ui/switch\"\nimport { Textarea } from \"@/registry/radix-sera/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 \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n \n Country \n \n \n \n \n \n \n United States \n United Kingdom \n Canada \n \n \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 \n \n \n UTC \n Eastern Time \n Pacific Time \n \n \n \n \n \n Invalid Select \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \n \n \n \n This field contains validation errors.\n \n \n \n \n Disabled Field\n \n \n \n \n \n \n \n Option 1 \n Option 2 \n Option 3 \n \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 Preferences \n \n Select all that apply to customize your experience.\n \n \n \n \n Dark mode \n \n \n \n Compact view \n \n \n \n \n Enable notifications\n \n \n \n \n \n \n Invalid checkbox \n \n \n \n \n Disabled checkbox\n \n \n \n \n )\n}\n\nfunction RadioFields() {\n return (\n \n \n \n Subscription Plan \n \n \n \n Free Plan \n \n \n \n Pro Plan \n \n \n \n Enterprise \n \n \n \n \n Battery Level \n \n Choose your preferred battery level.\n \n \n \n \n High \n \n \n \n Medium \n \n \n \n Low \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 \n \n Enable Touch ID to quickly unlock your device.\n \n \n \n \n \n \n Invalid Radio Group \n \n \n \n \n Invalid Option 1\n \n \n \n \n \n Invalid Option 2\n \n \n \n \n \n Disabled Radio Group \n \n \n \n \n Disabled Option 1\n \n \n \n \n \n Disabled Option 2\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 Make profile visible to others\n \n \n \n \n \n Show email on profile\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 \n \n Apple \n Banana \n Orange \n \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-sera/field.json b/apps/v4/public/r/styles/radix-sera/field.json
index 4ebce45213..38049398ed 100644
--- a/apps/v4/public/r/styles/radix-sera/field.json
+++ b/apps/v4/public/r/styles/radix-sera/field.json
@@ -8,7 +8,7 @@
"files": [
{
"path": "registry/radix-sera/ui/field.tsx",
- "content": "\"use client\"\n\nimport { useMemo } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Label } from \"@/registry/radix-sera/ui/label\"\nimport { Separator } from \"@/registry/radix-sera/ui/separator\"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n return (\n [data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n return (\n \n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nconst fieldVariants = cva(\n \"group/field flex w-full gap-3 data-[invalid=true]:text-destructive\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col *:w-full [&>.sr-only]:w-auto\",\n horizontal:\n \"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n responsive:\n \"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n)\n\nfunction Field({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n [data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n children?: React.ReactNode\n}) {\n return (\n
\n \n {children && (\n \n {children}\n \n )}\n
\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n \n {uniqueErrors.map(\n (error, index) =>\n error?.message && {error.message} \n )}\n \n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n \n {content}\n
\n )\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n}\n",
+ "content": "\"use client\"\n\nimport { useMemo } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Label } from \"@/registry/radix-sera/ui/label\"\nimport { Separator } from \"@/registry/radix-sera/ui/separator\"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n return (\n [data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n return (\n \n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nconst fieldVariants = cva(\n \"group/field flex w-full gap-3 data-[invalid=true]:text-destructive\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col *:w-full [&>.sr-only]:w-auto\",\n horizontal:\n \"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n responsive:\n \"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n }\n)\n\nfunction Field({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps) {\n return (\n
\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n [data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n children?: React.ReactNode\n}) {\n return (\n
\n \n {children && (\n \n {children}\n \n )}\n
\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n \n {uniqueErrors.map(\n (error, index) =>\n error?.message && {error.message} \n )}\n \n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n \n {content}\n
\n )\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/input-group.json b/apps/v4/public/r/styles/radix-sera/input-group.json
index b0442de02c..c2748ed518 100644
--- a/apps/v4/public/r/styles/radix-sera/input-group.json
+++ b/apps/v4/public/r/styles/radix-sera/input-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "registry/radix-sera/ui/input-group.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Button } from \"@/registry/radix-sera/ui/button\"\nimport { Input } from \"@/registry/radix-sera/ui/input\"\nimport { Textarea } from \"@/registry/radix-sera/ui/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n [data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-b-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first\",\n \"inline-end\": \"order-last\",\n \"block-start\":\n \"order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5\",\n \"block-end\":\n \"order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps
) {\n return (\n {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 rounded-none text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\": \"size-6 p-0 text-xs has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit
, \"size\"> &\n VariantProps) {\n return (\n \n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n [data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n \n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { Button } from \"@/registry/radix-sera/ui/button\"\nimport { Input } from \"@/registry/radix-sera/ui/input\"\nimport { Textarea } from \"@/registry/radix-sera/ui/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n [data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-b-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n align: {\n \"inline-start\": \"order-first\",\n \"inline-end\": \"order-last\",\n \"block-start\":\n \"order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5\",\n \"block-end\":\n \"order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps
) {\n return (\n {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 rounded-none text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\": \"size-6 p-0 text-xs has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit
, \"size\"> &\n VariantProps) {\n return (\n \n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n \n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n [data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n \n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/input-otp.json b/apps/v4/public/r/styles/radix-sera/input-otp.json
index 20e86668ae..9b76157ec8 100644
--- a/apps/v4/public/r/styles/radix-sera/input-otp.json
+++ b/apps/v4/public/r/styles/radix-sera/input-otp.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/radix-sera/ui/input-otp.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps & {\n containerClassName?: string\n}) {\n return (\n \n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n \n {char}\n {hasFakeCaret && (\n
\n )}\n
\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n \n \n
\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps & {\n containerClassName?: string\n}) {\n return (\n \n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n
\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n \n {char}\n {hasFakeCaret && (\n
\n )}\n
\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n \n \n
\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/label.json b/apps/v4/public/r/styles/radix-sera/label.json
index 829bf23cd3..5dab525253 100644
--- a/apps/v4/public/r/styles/radix-sera/label.json
+++ b/apps/v4/public/r/styles/radix-sera/label.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/radix-sera/ui/label.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Label as LabelPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport { Label }\n",
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Label as LabelPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nexport { Label }\n",
"type": "registry:ui"
}
],
diff --git a/apps/v4/public/r/styles/radix-sera/menubar.json b/apps/v4/public/r/styles/radix-sera/menubar.json
index 4daa069357..d14f958369 100644
--- a/apps/v4/public/r/styles/radix-sera/menubar.json
+++ b/apps/v4/public/r/styles/radix-sera/menubar.json
@@ -4,7 +4,7 @@
"files": [
{
"path": "registry/radix-sera/ui/menubar.tsx",
- "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Menubar as MenubarPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-sera/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Menubar({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n )\n}\n\nfunction MenubarMenu({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarGroup({\n ...props\n}: React.ComponentProps) {\n return \n}\n\nfunction MenubarPortal({\n ...props\n}: React.ComponentProps) {\n return