diff --git a/.changeset/whole-beans-arrive.md b/.changeset/whole-beans-arrive.md new file mode 100644 index 0000000000..c97004ce90 --- /dev/null +++ b/.changeset/whole-beans-arrive.md @@ -0,0 +1,5 @@ +--- +"shadcn": patch +--- + +add phosphor icons diff --git a/apps/v4/app/(create)/components/icon-library-picker.tsx b/apps/v4/app/(create)/components/icon-library-picker.tsx index 9b543fdf54..9d2f334f3d 100644 --- a/apps/v4/app/(create)/components/icon-library-picker.tsx +++ b/apps/v4/app/(create)/components/icon-library-picker.tsx @@ -39,6 +39,12 @@ const IconHugeicons = lazy(() => })) ) +const IconPhosphor = lazy(() => + import("@/registry/icons/icon-phosphor").then((mod) => ({ + default: mod.IconPhosphor, + })) +) + const PREVIEW_ICONS = { lucide: [ "CopyIcon", @@ -88,6 +94,22 @@ const PREVIEW_ICONS = { "ArrowDown01Icon", "ArrowRight01Icon", ], + phosphor: [ + "CopyIcon", + "WarningCircleIcon", + "TrashIcon", + "ShareIcon", + "BagIcon", + "DotsThreeIcon", + "SpinnerIcon", + "PlusIcon", + "MinusIcon", + "ArrowLeftIcon", + "ArrowRightIcon", + "CheckIcon", + "CaretDownIcon", + "CaretRightIcon", + ], } const logos = { @@ -154,6 +176,24 @@ const logos = { > ), + phosphor: ( + + + + + ), } export function IconLibraryPicker({ @@ -259,7 +299,9 @@ const IconLibraryPreview = memo(function IconLibraryPreview({ ? IconLucide : iconLibrary === "tabler" ? IconTabler - : IconHugeicons + : iconLibrary === "hugeicons" + ? IconHugeicons + : IconPhosphor return ( })) ) +const IconPhosphor = lazy(() => + import("@/registry/icons/icon-phosphor").then((mod) => ({ + default: mod.IconPhosphor, + })) +) + export function IconPlaceholder({ ...props }: { @@ -43,6 +49,9 @@ export function IconPlaceholder({ {iconLibrary === "hugeicons" && ( )} + {iconLibrary === "phosphor" && ( + + )} ) } diff --git a/apps/v4/app/(create)/components/picker.tsx b/apps/v4/app/(create)/components/picker.tsx index d680388222..45ac0591c3 100644 --- a/apps/v4/app/(create)/components/picker.tsx +++ b/apps/v4/app/(create)/components/picker.tsx @@ -138,6 +138,7 @@ function PickerSubTrigger({ lucide="ChevronRightIcon" tabler="IconChevronRight" hugeicons="ArrowRight01Icon" + phosphor="CaretRightIcon" className="ml-auto" /> @@ -190,6 +191,7 @@ function PickerCheckboxItem({ lucide="CheckIcon" tabler="IconCheck" hugeicons="Tick02Icon" + phosphor="CheckIcon" /> @@ -230,6 +232,7 @@ function PickerRadioItem({ lucide="CheckIcon" tabler="IconCheck" hugeicons="Tick02Icon" + phosphor="CheckIcon" className="size-4 pointer-coarse:size-5" /> diff --git a/apps/v4/app/(internal)/sink/components/dropdown-menu-demo.tsx b/apps/v4/app/(internal)/sink/components/dropdown-menu-demo.tsx index ca922b654a..0aa2250e40 100644 --- a/apps/v4/app/(internal)/sink/components/dropdown-menu-demo.tsx +++ b/apps/v4/app/(internal)/sink/components/dropdown-menu-demo.tsx @@ -117,6 +117,7 @@ function DropdownMenuCheckboxes() { lucide="UserIcon" tabler="IconUser" hugeicons="UserIcon" + phosphor="UserIcon" /> Profile @@ -125,6 +126,7 @@ function DropdownMenuCheckboxes() { lucide="CreditCardIcon" tabler="IconCreditCard" hugeicons="CreditCardIcon" + phosphor="CreditCardIcon" /> Billing @@ -133,6 +135,7 @@ function DropdownMenuCheckboxes() { lucide="SettingsIcon" tabler="IconSettings" hugeicons="SettingsIcon" + phosphor="GearIcon" /> Settings @@ -167,6 +170,7 @@ function DropdownMenuCheckboxes() { lucide="LogOutIcon" tabler="IconLogout" hugeicons="LogoutIcon" + phosphor="SignOutIcon" /> Sign Out @@ -222,6 +226,7 @@ function DropdownMenuWithAvatar() { lucide="ChevronsUpDownIcon" tabler="IconChevronsUpDown" hugeicons="ChevronUpDownIcon" + phosphor="CaretUpDownIcon" className="text-muted-foreground ml-auto" /> @@ -251,6 +256,7 @@ function DropdownMenuWithAvatar() { lucide="SparklesIcon" tabler="IconSparkles" hugeicons="SparklesIcon" + phosphor="SparklesIcon" /> Upgrade to Pro @@ -262,6 +268,7 @@ function DropdownMenuWithAvatar() { lucide="BadgeCheckIcon" tabler="IconBadgeCheck" hugeicons="BadgeCheckIcon" + phosphor="CheckCircleIcon" /> Account @@ -270,6 +277,7 @@ function DropdownMenuWithAvatar() { lucide="CreditCardIcon" tabler="IconCreditCard" hugeicons="CreditCardIcon" + phosphor="CreditCardIcon" /> Billing @@ -278,6 +286,7 @@ function DropdownMenuWithAvatar() { lucide="BellIcon" tabler="IconBell" hugeicons="BellIcon" + phosphor="BellIcon" /> Notifications @@ -288,6 +297,7 @@ function DropdownMenuWithAvatar() { lucide="LogOutIcon" tabler="IconLogout" hugeicons="LogoutIcon" + phosphor="SignOutIcon" /> Sign Out @@ -341,6 +351,7 @@ function DropdownMenuAvatarOnly() { lucide="SparklesIcon" tabler="IconSparkles" hugeicons="SparklesIcon" + phosphor="SparklesIcon" /> Upgrade to Pro @@ -352,6 +363,7 @@ function DropdownMenuAvatarOnly() { lucide="BadgeCheckIcon" tabler="IconBadgeCheck" hugeicons="BadgeCheckIcon" + phosphor="CheckCircleIcon" /> Account @@ -360,6 +372,7 @@ function DropdownMenuAvatarOnly() { lucide="CreditCardIcon" tabler="IconCreditCard" hugeicons="CreditCardIcon" + phosphor="CreditCardIcon" /> Billing @@ -368,6 +381,7 @@ function DropdownMenuAvatarOnly() { lucide="BellIcon" tabler="IconBell" hugeicons="BellIcon" + phosphor="BellIcon" /> Notifications @@ -378,6 +392,7 @@ function DropdownMenuAvatarOnly() { lucide="LogOutIcon" tabler="IconLogout" hugeicons="LogoutIcon" + phosphor="SignOutIcon" /> Sign Out @@ -395,6 +410,7 @@ function DropdownMenuIconColor() { lucide="MoreHorizontalIcon" tabler="IconDots" hugeicons="MoreHorizontalCircle01Icon" + phosphor="DotsThreeOutlineIcon" /> Toggle menu @@ -406,6 +422,7 @@ function DropdownMenuIconColor() { lucide="PencilIcon" tabler="IconPencil" hugeicons="EditIcon" + phosphor="PencilIcon" /> Edit @@ -414,6 +431,7 @@ function DropdownMenuIconColor() { lucide="ShareIcon" tabler="IconShare" hugeicons="ShareIcon" + phosphor="ShareIcon" /> Share @@ -423,6 +441,7 @@ function DropdownMenuIconColor() { lucide="TrashIcon" tabler="IconTrash" hugeicons="DeleteIcon" + phosphor="TrashIcon" /> Delete diff --git a/apps/v4/package.json b/apps/v4/package.json index dcd7599827..7b2ad9168a 100644 --- a/apps/v4/package.json +++ b/apps/v4/package.json @@ -30,6 +30,7 @@ "@hookform/resolvers": "^3.10.0", "@hugeicons/core-free-icons": "^1.2.1", "@hugeicons/react": "^1.1.1", + "@phosphor-icons/react": "^2.1.10", "@radix-ui/react-accessible-icon": "^1.1.1", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-alert-dialog": "^1.1.5", diff --git a/apps/v4/public/r/styles/base-lyra/accordion-example.json b/apps/v4/public/r/styles/base-lyra/accordion-example.json index 984683abc8..b10b004647 100644 --- a/apps/v4/public/r/styles/base-lyra/accordion-example.json +++ b/apps/v4/public/r/styles/base-lyra/accordion-example.json @@ -11,7 +11,7 @@ "files": [ { "path": "registry/base-lyra/examples/accordion-example.tsx", - "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from \"@/registry/bases/base/ui/accordion\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AccordionExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction AccordionBasic() {\n const items = [\n {\n value: \"item-1\",\n trigger: \"Is it accessible?\",\n content: \"Yes. It adheres to the WAI-ARIA design pattern.\",\n },\n {\n value: \"item-2\",\n trigger: \"Is it styled?\",\n content:\n \"Yes. It comes with default styles that matches the other components' aesthetic.\",\n },\n {\n value: \"item-3\",\n trigger: \"Is it animated?\",\n content:\n \"Yes. It's animated by default, but you can disable it if you prefer.\",\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n {item.trigger}\n {item.content}\n \n ))}\n \n \n )\n}\n\nfunction AccordionMultiple() {\n const items = [\n {\n value: \"item-1\",\n trigger:\n \"What are the key considerations when implementing a comprehensive enterprise-level authentication system?\",\n content:\n \"Implementing a robust enterprise authentication system requires careful consideration of multiple factors. This includes secure password hashing and storage, multi-factor authentication (MFA) implementation, session management, OAuth2 and SSO integration, regular security audits, rate limiting to prevent brute force attacks, and maintaining detailed audit logs. Additionally, you'll need to consider scalability, performance impact, and compliance with relevant data protection regulations such as GDPR or HIPAA.\",\n },\n {\n value: \"item-2\",\n trigger:\n \"How does modern distributed system architecture handle eventual consistency and data synchronization across multiple regions?\",\n content:\n \"Modern distributed systems employ various strategies to maintain data consistency across regions. This often involves using techniques like CRDT (Conflict-Free Replicated Data Types), vector clocks, and gossip protocols. Systems might implement event sourcing patterns, utilize message queues for asynchronous updates, and employ sophisticated conflict resolution strategies. Popular solutions like Amazon's DynamoDB and Google's Spanner demonstrate different approaches to solving these challenges, balancing between consistency, availability, and partition tolerance as described in the CAP theorem.\",\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n {item.trigger}\n {item.content}\n \n ))}\n \n \n )\n}\n\nfunction AccordionWithBorders() {\n const items = [\n {\n value: \"billing\",\n trigger: \"How does billing work?\",\n content:\n \"We offer monthly and annual subscription plans. Billing is charged at the beginning of each cycle, and you can cancel anytime. All plans include automatic backups, 24/7 support, and unlimited team members. There are no hidden fees or setup costs.\",\n },\n {\n value: \"security\",\n trigger: \"Is my data secure?\",\n content:\n \"Yes. We use end-to-end encryption, SOC 2 Type II compliance, and regular third-party security audits. All data is encrypted at rest and in transit using industry-standard protocols. We also offer optional two-factor authentication and single sign-on for enterprise customers.\",\n },\n {\n value: \"integration\",\n trigger: \"What integrations do you support?\",\n content: (\n <>\n

\n We integrate with 500+ popular tools including Slack, Zapier,\n Salesforce, HubSpot, and more. You can also build custom\n integrations using our REST API and webhooks.{\" \"}\n

\n

\n Our API documentation includes code examples in 10+ programming\n languages.\n

\n \n ),\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n \n {item.trigger}\n \n \n {item.content}\n \n \n ))}\n \n \n )\n}\n\nfunction AccordionInCard() {\n const items = [\n {\n value: \"plans\",\n trigger: \"What subscription plans do you offer?\",\n content: (\n <>\n

\n We offer three subscription tiers: Starter ($9/month), Professional\n ($29/month), and Enterprise ($99/month). Each plan includes\n increasing storage limits, API access, priority support, and team\n collaboration features.\n

\n

\n Annual billing is available with a 20% discount. All\n plans include a 14-day free trial with no credit card required.\n

\n \n \n ),\n },\n {\n value: \"billing\",\n trigger: \"How does billing work?\",\n content: (\n <>\n

\n Billing occurs automatically at the start of each billing cycle. We\n accept all major credit cards, PayPal, and ACH transfers for\n enterprise customers.\n

\n

\n You'll receive an invoice via email after each payment. You can\n update your payment method or billing information anytime in your\n account settings. Failed payments will trigger automated retry\n attempts and email notifications.\n

\n \n ),\n },\n {\n value: \"upgrade\",\n trigger: \"Can I upgrade or downgrade my plan?\",\n content: (\n <>\n

\n Yes, you can change your plan at any time. When upgrading,\n you'll be charged a prorated amount for the remainder of your\n billing cycle and immediately gain access to new features.\n

\n

\n When downgrading, the change takes effect at the end of your current\n billing period, and you'll retain access to premium features\n until then. No refunds are provided for downgrades.\n

\n \n ),\n },\n {\n value: \"cancel\",\n trigger: \"How do I cancel my subscription?\",\n content: (\n <>\n

\n You can cancel your subscription anytime from your account settings.\n There are no cancellation fees or penalties. Your access will\n continue until the end of your current billing period.\n

\n

\n After cancellation, your data is retained for 30 days in case you\n want to reactivate. You can export all your data before or after\n canceling. We'd love to hear your feedback about why\n you're leaving.\n

\n \n ),\n },\n {\n value: \"refund\",\n trigger: \"What is your refund policy?\",\n content: (\n <>\n

\n We offer a 30-day money-back guarantee for new subscriptions. If\n you're not satisfied within the first 30 days, contact our\n support team for a full refund.\n

\n

\n After 30 days, we don't provide refunds for partial billing\n periods, but you can cancel anytime to avoid future charges.\n Enterprise customers have custom refund terms outlined in their\n contracts.\n

\n \n ),\n },\n ]\n\n return (\n \n \n \n Subscription & Billing\n \n Common questions about your account, plans, and payments\n \n \n \n \n {items.map((item) => (\n \n {item.trigger}\n {item.content}\n \n ))}\n \n \n \n \n )\n}\n\nfunction AccordionWithDisabled() {\n const items = [\n {\n value: \"item-1\",\n trigger: \"Can I access my account history?\",\n content:\n \"Yes, you can view your complete account history including all transactions, plan changes, and support tickets in the Account History section of your dashboard.\",\n disabled: false,\n },\n {\n value: \"item-2\",\n trigger: \"Premium feature information\",\n content:\n \"This section contains information about premium features. Upgrade your plan to access this content.\",\n disabled: true,\n },\n {\n value: \"item-3\",\n trigger: \"How do I update my email address?\",\n content:\n \"You can update your email address in your account settings. You'll receive a verification email at your new address to confirm the change.\",\n disabled: false,\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n \n {item.trigger}\n \n \n {item.content}\n \n \n ))}\n \n \n )\n}\n", + "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from \"@/registry/bases/base/ui/accordion\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AccordionExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction AccordionBasic() {\n const items = [\n {\n value: \"item-1\",\n trigger: \"Is it accessible?\",\n content: \"Yes. It adheres to the WAI-ARIA design pattern.\",\n },\n {\n value: \"item-2\",\n trigger: \"Is it styled?\",\n content:\n \"Yes. It comes with default styles that matches the other components' aesthetic.\",\n },\n {\n value: \"item-3\",\n trigger: \"Is it animated?\",\n content:\n \"Yes. It's animated by default, but you can disable it if you prefer.\",\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n {item.trigger}\n {item.content}\n \n ))}\n \n \n )\n}\n\nfunction AccordionMultiple() {\n const items = [\n {\n value: \"item-1\",\n trigger:\n \"What are the key considerations when implementing a comprehensive enterprise-level authentication system?\",\n content:\n \"Implementing a robust enterprise authentication system requires careful consideration of multiple factors. This includes secure password hashing and storage, multi-factor authentication (MFA) implementation, session management, OAuth2 and SSO integration, regular security audits, rate limiting to prevent brute force attacks, and maintaining detailed audit logs. Additionally, you'll need to consider scalability, performance impact, and compliance with relevant data protection regulations such as GDPR or HIPAA.\",\n },\n {\n value: \"item-2\",\n trigger:\n \"How does modern distributed system architecture handle eventual consistency and data synchronization across multiple regions?\",\n content:\n \"Modern distributed systems employ various strategies to maintain data consistency across regions. This often involves using techniques like CRDT (Conflict-Free Replicated Data Types), vector clocks, and gossip protocols. Systems might implement event sourcing patterns, utilize message queues for asynchronous updates, and employ sophisticated conflict resolution strategies. Popular solutions like Amazon's DynamoDB and Google's Spanner demonstrate different approaches to solving these challenges, balancing between consistency, availability, and partition tolerance as described in the CAP theorem.\",\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n {item.trigger}\n {item.content}\n \n ))}\n \n \n )\n}\n\nfunction AccordionWithBorders() {\n const items = [\n {\n value: \"billing\",\n trigger: \"How does billing work?\",\n content:\n \"We offer monthly and annual subscription plans. Billing is charged at the beginning of each cycle, and you can cancel anytime. All plans include automatic backups, 24/7 support, and unlimited team members. There are no hidden fees or setup costs.\",\n },\n {\n value: \"security\",\n trigger: \"Is my data secure?\",\n content:\n \"Yes. We use end-to-end encryption, SOC 2 Type II compliance, and regular third-party security audits. All data is encrypted at rest and in transit using industry-standard protocols. We also offer optional two-factor authentication and single sign-on for enterprise customers.\",\n },\n {\n value: \"integration\",\n trigger: \"What integrations do you support?\",\n content: (\n <>\n

\n We integrate with 500+ popular tools including Slack, Zapier,\n Salesforce, HubSpot, and more. You can also build custom\n integrations using our REST API and webhooks.{\" \"}\n

\n

\n Our API documentation includes code examples in 10+ programming\n languages.\n

\n \n ),\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n \n {item.trigger}\n \n \n {item.content}\n \n \n ))}\n \n \n )\n}\n\nfunction AccordionInCard() {\n const items = [\n {\n value: \"plans\",\n trigger: \"What subscription plans do you offer?\",\n content: (\n <>\n

\n We offer three subscription tiers: Starter ($9/month), Professional\n ($29/month), and Enterprise ($99/month). Each plan includes\n increasing storage limits, API access, priority support, and team\n collaboration features.\n

\n

\n Annual billing is available with a 20% discount. All\n plans include a 14-day free trial with no credit card required.\n

\n \n \n ),\n },\n {\n value: \"billing\",\n trigger: \"How does billing work?\",\n content: (\n <>\n

\n Billing occurs automatically at the start of each billing cycle. We\n accept all major credit cards, PayPal, and ACH transfers for\n enterprise customers.\n

\n

\n You'll receive an invoice via email after each payment. You can\n update your payment method or billing information anytime in your\n account settings. Failed payments will trigger automated retry\n attempts and email notifications.\n

\n \n ),\n },\n {\n value: \"upgrade\",\n trigger: \"Can I upgrade or downgrade my plan?\",\n content: (\n <>\n

\n Yes, you can change your plan at any time. When upgrading,\n you'll be charged a prorated amount for the remainder of your\n billing cycle and immediately gain access to new features.\n

\n

\n When downgrading, the change takes effect at the end of your current\n billing period, and you'll retain access to premium features\n until then. No refunds are provided for downgrades.\n

\n \n ),\n },\n {\n value: \"cancel\",\n trigger: \"How do I cancel my subscription?\",\n content: (\n <>\n

\n You can cancel your subscription anytime from your account settings.\n There are no cancellation fees or penalties. Your access will\n continue until the end of your current billing period.\n

\n

\n After cancellation, your data is retained for 30 days in case you\n want to reactivate. You can export all your data before or after\n canceling. We'd love to hear your feedback about why\n you're leaving.\n

\n \n ),\n },\n {\n value: \"refund\",\n trigger: \"What is your refund policy?\",\n content: (\n <>\n

\n We offer a 30-day money-back guarantee for new subscriptions. If\n you're not satisfied within the first 30 days, contact our\n support team for a full refund.\n

\n

\n After 30 days, we don't provide refunds for partial billing\n periods, but you can cancel anytime to avoid future charges.\n Enterprise customers have custom refund terms outlined in their\n contracts.\n

\n \n ),\n },\n ]\n\n return (\n \n \n \n Subscription & Billing\n \n Common questions about your account, plans, and payments\n \n \n \n \n {items.map((item) => (\n \n {item.trigger}\n {item.content}\n \n ))}\n \n \n \n \n )\n}\n\nfunction AccordionWithDisabled() {\n const items = [\n {\n value: \"item-1\",\n trigger: \"Can I access my account history?\",\n content:\n \"Yes, you can view your complete account history including all transactions, plan changes, and support tickets in the Account History section of your dashboard.\",\n disabled: false,\n },\n {\n value: \"item-2\",\n trigger: \"Premium feature information\",\n content:\n \"This section contains information about premium features. Upgrade your plan to access this content.\",\n disabled: true,\n },\n {\n value: \"item-3\",\n trigger: \"How do I update my email address?\",\n content:\n \"You can update your email address in your account settings. You'll receive a verification email at your new address to confirm the change.\",\n disabled: false,\n },\n ]\n\n return (\n \n \n {items.map((item) => (\n \n \n {item.trigger}\n \n \n {item.content}\n \n \n ))}\n \n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/accordion.json b/apps/v4/public/r/styles/base-lyra/accordion.json index 575ae8a7e2..beef25c92e 100644 --- a/apps/v4/public/r/styles/base-lyra/accordion.json +++ b/apps/v4/public/r/styles/base-lyra/accordion.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/base-lyra/ui/accordion.tsx", - "content": "\"use client\"\n\nimport { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\"\n\nimport { cn } from \"@/registry/bases/base/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\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": "\"use client\"\n\nimport { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\"\n\nimport { cn } from \"@/registry/bases/base/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\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-lyra/alert-dialog-example.json b/apps/v4/public/r/styles/base-lyra/alert-dialog-example.json index 1570298266..9c1043e479 100644 --- a/apps/v4/public/r/styles/base-lyra/alert-dialog-example.json +++ b/apps/v4/public/r/styles/base-lyra/alert-dialog-example.json @@ -11,7 +11,7 @@ "files": [ { "path": "registry/base-lyra/examples/alert-dialog-example.tsx", - "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"@/registry/bases/base/ui/alert-dialog\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/bases/base/ui/dialog\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AlertDialogExample() {\n return (\n \n \n \n \n \n \n \n \n )\n}\n\nfunction AlertDialogBasic() {\n return (\n \n \n Default}\n />\n \n \n Are you absolutely sure?\n \n This action cannot be undone. This will permanently delete your\n account and remove your data from our servers.\n \n \n \n Cancel\n Continue\n \n \n \n \n )\n}\n\nfunction AlertDialogSmall() {\n return (\n \n \n Small} />\n \n \n Allow accessory to connect?\n \n Do you want to allow the USB accessory to connect to this device?\n \n \n \n Don't allow\n Allow\n \n \n \n \n )\n}\n\nfunction AlertDialogWithMedia() {\n return (\n \n \n Default (Media)}\n />\n \n \n \n \n \n Are you absolutely sure?\n \n This will permanently delete your account and remove your data\n from our servers.\n \n \n \n Cancel\n Continue\n \n \n \n \n )\n}\n\nfunction AlertDialogSmallWithMedia() {\n return (\n \n \n Small (Media)}\n />\n\n \n \n \n \n \n Allow accessory to connect?\n \n Do you want to allow the USB accessory to connect to this device?\n \n \n \n Don't allow\n Allow\n \n \n \n \n )\n}\n\nfunction AlertDialogDestructive() {\n return (\n \n \n Delete Chat}\n />\n \n \n \n \n \n Delete chat?\n \n This will permanently delete this chat conversation. View{\" \"}\n Settings delete any memories saved during this\n chat.\n \n \n \n Cancel\n Delete\n \n \n \n \n )\n}\n\nfunction AlertDialogInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Alert Dialog Example\n \n Click the button below to open an alert dialog.\n \n \n \n \n }>\n Open Alert Dialog\n \n \n \n Are you absolutely sure?\n \n This action cannot be undone. This will permanently delete\n your account and remove your data from our servers.\n \n \n \n Cancel\n Continue\n \n \n \n \n \n \n \n )\n}\n", + "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"@/registry/bases/base/ui/alert-dialog\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/bases/base/ui/dialog\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AlertDialogExample() {\n return (\n \n \n \n \n \n \n \n \n )\n}\n\nfunction AlertDialogBasic() {\n return (\n \n \n Default}\n />\n \n \n Are you absolutely sure?\n \n This action cannot be undone. This will permanently delete your\n account and remove your data from our servers.\n \n \n \n Cancel\n Continue\n \n \n \n \n )\n}\n\nfunction AlertDialogSmall() {\n return (\n \n \n Small} />\n \n \n Allow accessory to connect?\n \n Do you want to allow the USB accessory to connect to this device?\n \n \n \n Don't allow\n Allow\n \n \n \n \n )\n}\n\nfunction AlertDialogWithMedia() {\n return (\n \n \n Default (Media)}\n />\n \n \n \n \n \n Are you absolutely sure?\n \n This will permanently delete your account and remove your data\n from our servers.\n \n \n \n Cancel\n Continue\n \n \n \n \n )\n}\n\nfunction AlertDialogSmallWithMedia() {\n return (\n \n \n Small (Media)}\n />\n\n \n \n \n \n \n Allow accessory to connect?\n \n Do you want to allow the USB accessory to connect to this device?\n \n \n \n Don't allow\n Allow\n \n \n \n \n )\n}\n\nfunction AlertDialogDestructive() {\n return (\n \n \n Delete Chat}\n />\n \n \n \n \n \n Delete chat?\n \n This will permanently delete this chat conversation. View{\" \"}\n Settings delete any memories saved during this\n chat.\n \n \n \n Cancel\n Delete\n \n \n \n \n )\n}\n\nfunction AlertDialogInDialog() {\n return (\n \n \n }>\n Open Dialog\n \n \n \n Alert Dialog Example\n \n Click the button below to open an alert dialog.\n \n \n \n \n }>\n Open Alert Dialog\n \n \n \n Are you absolutely sure?\n \n This action cannot be undone. This will permanently delete\n your account and remove your data from our servers.\n \n \n \n Cancel\n Continue\n \n \n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/alert-example.json b/apps/v4/public/r/styles/base-lyra/alert-example.json index 3e0f5c3e06..a373268410 100644 --- a/apps/v4/public/r/styles/base-lyra/alert-example.json +++ b/apps/v4/public/r/styles/base-lyra/alert-example.json @@ -10,7 +10,7 @@ "files": [ { "path": "registry/base-lyra/examples/alert-example.tsx", - "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Alert,\n AlertAction,\n AlertDescription,\n AlertTitle,\n} from \"@/registry/bases/base/ui/alert\"\nimport { Badge } from \"@/registry/bases/base/ui/badge\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AlertExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction AlertExample1() {\n return (\n \n
\n \n Success! Your changes have been saved.\n \n \n Success! Your changes have been saved.\n \n This is an alert with title and description.\n \n \n \n \n This one has a description only. No title. No icon.\n \n \n
\n
\n )\n}\n\nfunction AlertExample2() {\n return (\n \n
\n \n \n \n Let's try one with icon, title and a link.\n \n \n \n \n \n This one has an icon and a description only. No title.{\" \"}\n But it has a link and a second link.\n \n \n\n \n \n Success! Your changes have been saved\n \n This is an alert with icon, title and description.\n \n \n \n \n \n This is a very long alert title that demonstrates how the component\n handles extended text content and potentially wraps across multiple\n lines\n \n \n \n \n \n This is a very long alert description that demonstrates how the\n component handles extended text content and potentially wraps across\n multiple lines\n \n \n \n \n \n This is an extremely long alert title that spans multiple lines to\n demonstrate how the component handles very lengthy headings while\n maintaining readability and proper text wrapping behavior\n \n \n This is an equally long description that contains detailed\n information about the alert. It shows how the component can\n accommodate extensive content while preserving proper spacing,\n alignment, and readability across different screen sizes and\n viewport widths. This helps ensure the user experience remains\n consistent regardless of the content length.\n \n \n
\n
\n )\n}\n\nfunction AlertExample3() {\n return (\n \n
\n \n \n Something went wrong!\n \n Your session has expired. Please log in again.\n \n \n \n \n Unable to process your payment.\n \n

\n Please verify your billing information and try\n again.\n

\n
    \n
  • Check your card details
  • \n
  • Ensure sufficient funds
  • \n
  • Verify billing address
  • \n
\n
\n
\n
\n
\n )\n}\n\nfunction AlertExample4() {\n return (\n \n
\n \n \n The selected emails have been marked as spam.\n \n \n \n \n \n \n The selected emails have been marked as spam.\n \n This is a very long alert title that demonstrates how the component\n handles extended text content.\n \n \n Badge\n \n \n
\n
\n )\n}\n", + "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Alert,\n AlertAction,\n AlertDescription,\n AlertTitle,\n} from \"@/registry/bases/base/ui/alert\"\nimport { Badge } from \"@/registry/bases/base/ui/badge\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AlertExample() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction AlertExample1() {\n return (\n \n
\n \n Success! Your changes have been saved.\n \n \n Success! Your changes have been saved.\n \n This is an alert with title and description.\n \n \n \n \n This one has a description only. No title. No icon.\n \n \n
\n
\n )\n}\n\nfunction AlertExample2() {\n return (\n \n
\n \n \n \n Let's try one with icon, title and a link.\n \n \n \n \n \n This one has an icon and a description only. No title.{\" \"}\n But it has a link and a second link.\n \n \n\n \n \n Success! Your changes have been saved\n \n This is an alert with icon, title and description.\n \n \n \n \n \n This is a very long alert title that demonstrates how the component\n handles extended text content and potentially wraps across multiple\n lines\n \n \n \n \n \n This is a very long alert description that demonstrates how the\n component handles extended text content and potentially wraps across\n multiple lines\n \n \n \n \n \n This is an extremely long alert title that spans multiple lines to\n demonstrate how the component handles very lengthy headings while\n maintaining readability and proper text wrapping behavior\n \n \n This is an equally long description that contains detailed\n information about the alert. It shows how the component can\n accommodate extensive content while preserving proper spacing,\n alignment, and readability across different screen sizes and\n viewport widths. This helps ensure the user experience remains\n consistent regardless of the content length.\n \n \n
\n
\n )\n}\n\nfunction AlertExample3() {\n return (\n \n
\n \n \n Something went wrong!\n \n Your session has expired. Please log in again.\n \n \n \n \n Unable to process your payment.\n \n

\n Please verify your billing information and try\n again.\n

\n
    \n
  • Check your card details
  • \n
  • Ensure sufficient funds
  • \n
  • Verify billing address
  • \n
\n
\n
\n
\n
\n )\n}\n\nfunction AlertExample4() {\n return (\n \n
\n \n \n The selected emails have been marked as spam.\n \n \n \n \n \n \n The selected emails have been marked as spam.\n \n This is a very long alert title that demonstrates how the component\n handles extended text content.\n \n \n Badge\n \n \n
\n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/avatar-example.json b/apps/v4/public/r/styles/base-lyra/avatar-example.json index 2009c3b694..0ee1fdc80d 100644 --- a/apps/v4/public/r/styles/base-lyra/avatar-example.json +++ b/apps/v4/public/r/styles/base-lyra/avatar-example.json @@ -11,7 +11,7 @@ "files": [ { "path": "registry/base-lyra/examples/avatar-example.tsx", - "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Avatar,\n AvatarBadge,\n AvatarFallback,\n AvatarGroup,\n AvatarGroupCount,\n AvatarImage,\n} from \"@/registry/bases/base/ui/avatar\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from \"@/registry/bases/base/ui/empty\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AvatarExample() {\n return (\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction AvatarSizes() {\n return (\n \n
\n \n \n CN\n \n \n \n CN\n \n \n \n CN\n \n
\n
\n \n CN\n \n \n CN\n \n \n CN\n \n
\n
\n )\n}\n\nfunction AvatarWithBadge() {\n return (\n \n
\n \n \n JZ\n \n \n \n \n JZ\n \n \n \n \n JZ\n \n \n
\n
\n \n JZ\n \n \n \n JZ\n \n \n \n JZ\n \n \n
\n
\n )\n}\n\nfunction AvatarWithBadgeIcon() {\n return (\n \n
\n \n \n PP\n \n \n \n \n \n \n PP\n \n \n \n \n \n \n PP\n \n \n \n \n
\n
\n \n PP\n \n \n \n \n \n PP\n \n \n \n \n \n PP\n \n \n \n \n
\n
\n )\n}\n\nfunction AvatarGroupExample() {\n return (\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n )\n}\n\nfunction AvatarGroupWithCount() {\n return (\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +3\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +3\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +3\n \n \n )\n}\n\nfunction AvatarGroupWithIconCount() {\n return (\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n )\n}\n\nfunction AvatarInEmpty() {\n return (\n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n No Team Members\n \n Invite your team to collaborate on this project.\n \n \n \n \n \n \n \n )\n}\n", + "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Avatar,\n AvatarBadge,\n AvatarFallback,\n AvatarGroup,\n AvatarGroupCount,\n AvatarImage,\n} from \"@/registry/bases/base/ui/avatar\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from \"@/registry/bases/base/ui/empty\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AvatarExample() {\n return (\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction AvatarSizes() {\n return (\n \n
\n \n \n CN\n \n \n \n CN\n \n \n \n CN\n \n
\n
\n \n CN\n \n \n CN\n \n \n CN\n \n
\n
\n )\n}\n\nfunction AvatarWithBadge() {\n return (\n \n
\n \n \n JZ\n \n \n \n \n JZ\n \n \n \n \n JZ\n \n \n
\n
\n \n JZ\n \n \n \n JZ\n \n \n \n JZ\n \n \n
\n
\n )\n}\n\nfunction AvatarWithBadgeIcon() {\n return (\n \n
\n \n \n PP\n \n \n \n \n \n \n PP\n \n \n \n \n \n \n PP\n \n \n \n \n
\n
\n \n PP\n \n \n \n \n \n PP\n \n \n \n \n \n PP\n \n \n \n \n
\n
\n )\n}\n\nfunction AvatarGroupExample() {\n return (\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n )\n}\n\nfunction AvatarGroupWithCount() {\n return (\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +3\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +3\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +3\n \n \n )\n}\n\nfunction AvatarGroupWithIconCount() {\n return (\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n )\n}\n\nfunction AvatarInEmpty() {\n return (\n \n \n \n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n \n \n \n \n \n No Team Members\n \n Invite your team to collaborate on this project.\n \n \n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/badge-example.json b/apps/v4/public/r/styles/base-lyra/badge-example.json index db2667aa1e..9667dc1755 100644 --- a/apps/v4/public/r/styles/base-lyra/badge-example.json +++ b/apps/v4/public/r/styles/base-lyra/badge-example.json @@ -10,7 +10,7 @@ "files": [ { "path": "registry/base-lyra/examples/badge-example.tsx", - "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Badge } from \"@/registry/bases/base/ui/badge\"\nimport { Spinner } from \"@/registry/bases/base/ui/spinner\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function BadgeExample() {\n return (\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction BadgeVariants() {\n return (\n \n
\n Default\n Secondary\n Destructive\n Outline\n Ghost\n Link\n
\n
\n )\n}\n\nfunction BadgeWithIconLeft() {\n return (\n \n
\n \n \n Default\n \n \n \n Secondary\n \n \n \n Destructive\n \n \n \n Outline\n \n \n \n Ghost\n \n \n \n Link\n \n
\n
\n )\n}\n\nfunction BadgeWithIconRight() {\n return (\n \n
\n \n Default\n \n \n \n Secondary\n \n \n \n Destructive\n \n \n \n Outline\n \n \n \n Ghost\n \n \n \n Link\n \n \n
\n
\n )\n}\n\nfunction BadgeWithSpinner() {\n return (\n \n
\n \n \n Default\n \n \n \n Secondary\n \n \n \n Destructive\n \n \n \n Outline\n \n \n \n Ghost\n \n \n \n Link\n \n
\n
\n )\n}\n\nfunction BadgeAsLink() {\n return (\n \n
\n \n Link{\" \"}\n \n \n }\n />\n \n Link{\" \"}\n \n \n }\n />\n \n Link{\" \"}\n \n \n }\n />\n \n Link{\" \"}\n \n \n }\n />\n
\n
\n )\n}\n\nfunction BadgeLongText() {\n return (\n \n
\n \n A badge with a lot of text to see how it wraps\n \n
\n
\n )\n}\n\nfunction BadgeCustomColors() {\n return (\n \n
\n \n Blue\n \n \n Green\n \n \n Sky\n \n \n Purple\n \n \n Blue\n \n \n Green\n \n \n Sky\n \n \n Purple\n \n \n Red\n \n
\n
\n )\n}\n", + "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Badge } from \"@/registry/bases/base/ui/badge\"\nimport { Spinner } from \"@/registry/bases/base/ui/spinner\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function BadgeExample() {\n return (\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction BadgeVariants() {\n return (\n \n
\n Default\n Secondary\n Destructive\n Outline\n Ghost\n Link\n
\n
\n )\n}\n\nfunction BadgeWithIconLeft() {\n return (\n \n
\n \n \n Default\n \n \n \n Secondary\n \n \n \n Destructive\n \n \n \n Outline\n \n \n \n Ghost\n \n \n \n Link\n \n
\n
\n )\n}\n\nfunction BadgeWithIconRight() {\n return (\n \n
\n \n Default\n \n \n \n Secondary\n \n \n \n Destructive\n \n \n \n Outline\n \n \n \n Ghost\n \n \n \n Link\n \n \n
\n
\n )\n}\n\nfunction BadgeWithSpinner() {\n return (\n \n
\n \n \n Default\n \n \n \n Secondary\n \n \n \n Destructive\n \n \n \n Outline\n \n \n \n Ghost\n \n \n \n Link\n \n
\n
\n )\n}\n\nfunction BadgeAsLink() {\n return (\n \n
\n \n Link{\" \"}\n \n \n }\n />\n \n Link{\" \"}\n \n \n }\n />\n \n Link{\" \"}\n \n \n }\n />\n \n Link{\" \"}\n \n \n }\n />\n
\n
\n )\n}\n\nfunction BadgeLongText() {\n return (\n \n
\n \n A badge with a lot of text to see how it wraps\n \n
\n
\n )\n}\n\nfunction BadgeCustomColors() {\n return (\n \n
\n \n Blue\n \n \n Green\n \n \n Sky\n \n \n Purple\n \n \n Blue\n \n \n Green\n \n \n Sky\n \n \n Purple\n \n \n Red\n \n
\n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/breadcrumb.json b/apps/v4/public/r/styles/base-lyra/breadcrumb.json index 1bf3f87f42..d903abfeba 100644 --- a/apps/v4/public/r/styles/base-lyra/breadcrumb.json +++ b/apps/v4/public/r/styles/base-lyra/breadcrumb.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/base-lyra/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/bases/base/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(\"hover:text-foreground transition-colors\", 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 flex items-center justify-center\",\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/bases/base/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(\"hover:text-foreground transition-colors\", 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 flex items-center justify-center\",\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-lyra/button-example.json b/apps/v4/public/r/styles/base-lyra/button-example.json index 07bbd6cf65..50e7773318 100644 --- a/apps/v4/public/r/styles/base-lyra/button-example.json +++ b/apps/v4/public/r/styles/base-lyra/button-example.json @@ -9,7 +9,7 @@ "files": [ { "path": "registry/base-lyra/examples/button-example.tsx", - "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonExample() {\n return (\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonVariantsAndSizes() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonIconRight() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonIconLeft() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonIconOnly() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonExamples() {\n return (\n \n
\n
\n \n \n
\n
\n \n \n
\n \n
\n
\n )\n}\n\nfunction ButtonInvalidStates() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n", + "content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonExample() {\n return (\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonVariantsAndSizes() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonIconRight() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonIconLeft() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonIconOnly() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonExamples() {\n return (\n \n
\n
\n \n \n
\n
\n \n \n
\n \n
\n
\n )\n}\n\nfunction ButtonInvalidStates() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/button-group-example.json b/apps/v4/public/r/styles/base-lyra/button-group-example.json index 8969972199..2e4ad5e00a 100644 --- a/apps/v4/public/r/styles/base-lyra/button-group-example.json +++ b/apps/v4/public/r/styles/base-lyra/button-group-example.json @@ -18,7 +18,7 @@ "files": [ { "path": "registry/base-lyra/examples/button-group-example.tsx", - "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/bases/base/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/bases/base/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/bases/base/ui/input-group\"\nimport { Label } from \"@/registry/bases/base/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/bases/base/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/bases/base/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n
\n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n
\n \n \n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n
\n \n Text\n \n \n \n }>\n GPU Size\n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n
\n \n \n \n }\n >\n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n }\n >\n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n
\n )\n}\n\nconst currencyItems = [\n { label: \"$\", value: \"$\" },\n { label: \"€\", value: \"€\" },\n { label: \"£\", value: \"£\" },\n]\n\nfunction ButtonGroupWithSelect() {\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n
\n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n }\n nativeButton={false}\n >\n 1.2K\n \n \n \n )\n}\n\nconst durationItems = [\n { label: \"Hours\", value: \"hours\" },\n { label: \"Days\", value: \"days\" },\n { label: \"Weeks\", value: \"weeks\" },\n]\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n }>\n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n
\n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n", + "content": "\"use client\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n ButtonGroup,\n ButtonGroupText,\n} from \"@/registry/bases/base/ui/button-group\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/registry/bases/base/ui/dropdown-menu\"\nimport { Field, FieldGroup } from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/bases/base/ui/input-group\"\nimport { Label } from \"@/registry/bases/base/ui/label\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/bases/base/ui/select\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/bases/base/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ButtonGroupExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupBasic() {\n return (\n \n
\n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithInput() {\n return (\n \n
\n \n \n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithText() {\n return (\n \n
\n \n Text\n \n \n \n }>\n GPU Size\n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithDropdown() {\n return (\n \n
\n \n \n \n }\n >\n \n \n \n Disable\n \n Uninstall\n \n \n \n \n \n \n \n }\n >\n \n \n \n \n \n \n Mute Conversation\n \n \n \n Mark as Read\n \n \n \n Report Conversation\n \n \n \n Block User\n \n \n \n Share Conversation\n \n \n \n Copy Conversation\n \n \n \n \n \n \n Delete Conversation\n \n \n \n \n \n
\n
\n )\n}\n\nconst currencyItems = [\n { label: \"$\", value: \"$\" },\n { label: \"€\", value: \"€\" },\n { label: \"£\", value: \"£\" },\n]\n\nfunction ButtonGroupWithSelect() {\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithIcons() {\n return (\n \n
\n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithInputGroup() {\n return (\n \n
\n \n \n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupWithFields() {\n return (\n \n \n \n \n \n \n \n \n W\n \n \n px\n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupWithLike() {\n return (\n \n \n \n }\n nativeButton={false}\n >\n 1.2K\n \n \n \n )\n}\n\nconst durationItems = [\n { label: \"Hours\", value: \"hours\" },\n { label: \"Days\", value: \"days\" },\n { label: \"Weeks\", value: \"weeks\" },\n]\n\nfunction ButtonGroupWithSelectAndInput() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNested() {\n return (\n \n \n \n \n \n \n \n \n \n }>\n \n \n Voice Mode\n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPagination() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupPaginationSplit() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupNavigation() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupTextAlignment() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ButtonGroupVertical() {\n return (\n \n
\n \n \n \n \n
\n
\n )\n}\n\nfunction ButtonGroupVerticalNested() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/calendar-example.json b/apps/v4/public/r/styles/base-lyra/calendar-example.json index 594830b142..ccab7c5e65 100644 --- a/apps/v4/public/r/styles/base-lyra/calendar-example.json +++ b/apps/v4/public/r/styles/base-lyra/calendar-example.json @@ -15,7 +15,7 @@ "files": [ { "path": "registry/base-lyra/examples/calendar-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { addDays, format } from \"date-fns\"\nimport { type DateRange } from \"react-day-picker\"\nimport { es } from \"react-day-picker/locale\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { Calendar, CalendarDayButton } from \"@/registry/bases/base/ui/calendar\"\nimport { Card, CardContent, CardFooter } from \"@/registry/bases/base/ui/card\"\nimport { Field, FieldGroup, FieldLabel } from \"@/registry/bases/base/ui/field\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/bases/base/ui/input-group\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"@/registry/bases/base/ui/popover\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CalendarExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarSingle() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), new Date().getMonth(), 12)\n )\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarMultiple() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarRange() {\n const [dateRange, setDateRange] = React.useState({\n from: new Date(new Date().getFullYear(), 0, 12),\n to: addDays(new Date(new Date().getFullYear(), 0, 12), 30),\n })\n\n return (\n \n \n \n \n date > new Date() || date < new Date(\"1900-01-01\")\n }\n />\n \n \n \n )\n}\n\nfunction CalendarRangeMultipleMonths() {\n const [range, setRange] = React.useState({\n from: new Date(new Date().getFullYear(), 3, 12),\n to: addDays(new Date(new Date().getFullYear(), 3, 12), 60),\n })\n\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarBookedDates() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), 1, 3)\n )\n const bookedDates = Array.from(\n { length: 15 },\n (_, i) => new Date(new Date().getFullYear(), 1, 12 + i)\n )\n\n return (\n \n \n \n button]:line-through opacity-100\",\n }}\n />\n \n \n \n )\n}\n\nfunction CalendarWithTime() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), new Date().getMonth(), 12)\n )\n\n return (\n \n \n \n \n \n \n \n \n Start Time\n \n \n \n \n \n \n \n \n End Time\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarCustomDays() {\n const [range, setRange] = React.useState({\n from: new Date(new Date().getFullYear(), 11, 8),\n to: addDays(new Date(new Date().getFullYear(), 11, 8), 10),\n })\n\n return (\n \n \n \n {\n return date.toLocaleString(\"default\", { month: \"long\" })\n },\n }}\n components={{\n DayButton: ({ children, modifiers, day, ...props }) => {\n const isWeekend =\n day.date.getDay() === 0 || day.date.getDay() === 6\n\n return (\n \n {children}\n {!modifiers.outside && (\n {isWeekend ? \"$120\" : \"$100\"}\n )}\n \n )\n },\n }}\n />\n \n \n \n )\n}\n\nfunction CalendarWithPresets() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), 1, 12)\n )\n const [currentMonth, setCurrentMonth] = React.useState(\n new Date(new Date().getFullYear(), new Date().getMonth(), 1)\n )\n\n return (\n \n \n \n \n \n \n {[\n { label: \"Today\", value: 0 },\n { label: \"Tomorrow\", value: 1 },\n { label: \"In 3 days\", value: 3 },\n { label: \"In a week\", value: 7 },\n { label: \"In 2 weeks\", value: 14 },\n ].map((preset) => (\n {\n const newDate = addDays(new Date(), preset.value)\n setDate(newDate)\n setCurrentMonth(\n new Date(newDate.getFullYear(), newDate.getMonth(), 1)\n )\n }}\n >\n {preset.label}\n \n ))}\n \n \n \n )\n}\n\nfunction DatePickerSimple() {\n const [date, setDate] = React.useState()\n\n return (\n \n \n Date\n \n \n }\n >\n \n {date ? format(date, \"PPP\") : Pick a date}\n \n \n \n \n \n \n \n )\n}\n\nfunction DatePickerWithRange() {\n const [date, setDate] = React.useState({\n from: new Date(new Date().getFullYear(), 0, 20),\n to: addDays(new Date(new Date().getFullYear(), 0, 20), 20),\n })\n\n return (\n \n \n Date Picker Range\n \n \n }\n >\n \n {date?.from ? (\n date.to ? (\n <>\n {format(date.from, \"LLL dd, y\")} -{\" \"}\n {format(date.to, \"LLL dd, y\")}\n \n ) : (\n format(date.from, \"LLL dd, y\")\n )\n ) : (\n Pick a date\n )}\n \n \n \n \n \n \n \n )\n}\n\nfunction DataPickerWithDropdowns() {\n const [date, setDate] = React.useState()\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n Date\n \n \n }\n >\n \n {date ? format(date, \"PPP\") : Pick a date}\n \n \n \n
\n setOpen(false)}\n >\n Done\n \n
\n
\n
\n
\n
\n )\n}\n\nfunction CalendarWeekNumbers() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), 1, 3)\n )\n\n return (\n \n \n \n \n \n \n \n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { addDays, format } from \"date-fns\"\nimport { type DateRange } from \"react-day-picker\"\nimport { es } from \"react-day-picker/locale\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { Calendar, CalendarDayButton } from \"@/registry/bases/base/ui/calendar\"\nimport { Card, CardContent, CardFooter } from \"@/registry/bases/base/ui/card\"\nimport { Field, FieldGroup, FieldLabel } from \"@/registry/bases/base/ui/field\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/bases/base/ui/input-group\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"@/registry/bases/base/ui/popover\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CalendarExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarSingle() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), new Date().getMonth(), 12)\n )\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarMultiple() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarRange() {\n const [dateRange, setDateRange] = React.useState({\n from: new Date(new Date().getFullYear(), 0, 12),\n to: addDays(new Date(new Date().getFullYear(), 0, 12), 30),\n })\n\n return (\n \n \n \n \n date > new Date() || date < new Date(\"1900-01-01\")\n }\n />\n \n \n \n )\n}\n\nfunction CalendarRangeMultipleMonths() {\n const [range, setRange] = React.useState({\n from: new Date(new Date().getFullYear(), 3, 12),\n to: addDays(new Date(new Date().getFullYear(), 3, 12), 60),\n })\n\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarBookedDates() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), 1, 3)\n )\n const bookedDates = Array.from(\n { length: 15 },\n (_, i) => new Date(new Date().getFullYear(), 1, 12 + i)\n )\n\n return (\n \n \n \n button]:line-through opacity-100\",\n }}\n />\n \n \n \n )\n}\n\nfunction CalendarWithTime() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), new Date().getMonth(), 12)\n )\n\n return (\n \n \n \n \n \n \n \n \n Start Time\n \n \n \n \n \n \n \n \n End Time\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction CalendarCustomDays() {\n const [range, setRange] = React.useState({\n from: new Date(new Date().getFullYear(), 11, 8),\n to: addDays(new Date(new Date().getFullYear(), 11, 8), 10),\n })\n\n return (\n \n \n \n {\n return date.toLocaleString(\"default\", { month: \"long\" })\n },\n }}\n components={{\n DayButton: ({ children, modifiers, day, ...props }) => {\n const isWeekend =\n day.date.getDay() === 0 || day.date.getDay() === 6\n\n return (\n \n {children}\n {!modifiers.outside && (\n {isWeekend ? \"$120\" : \"$100\"}\n )}\n \n )\n },\n }}\n />\n \n \n \n )\n}\n\nfunction CalendarWithPresets() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), 1, 12)\n )\n const [currentMonth, setCurrentMonth] = React.useState(\n new Date(new Date().getFullYear(), new Date().getMonth(), 1)\n )\n\n return (\n \n \n \n \n \n \n {[\n { label: \"Today\", value: 0 },\n { label: \"Tomorrow\", value: 1 },\n { label: \"In 3 days\", value: 3 },\n { label: \"In a week\", value: 7 },\n { label: \"In 2 weeks\", value: 14 },\n ].map((preset) => (\n {\n const newDate = addDays(new Date(), preset.value)\n setDate(newDate)\n setCurrentMonth(\n new Date(newDate.getFullYear(), newDate.getMonth(), 1)\n )\n }}\n >\n {preset.label}\n \n ))}\n \n \n \n )\n}\n\nfunction DatePickerSimple() {\n const [date, setDate] = React.useState()\n\n return (\n \n \n Date\n \n \n }\n >\n \n {date ? format(date, \"PPP\") : Pick a date}\n \n \n \n \n \n \n \n )\n}\n\nfunction DatePickerWithRange() {\n const [date, setDate] = React.useState({\n from: new Date(new Date().getFullYear(), 0, 20),\n to: addDays(new Date(new Date().getFullYear(), 0, 20), 20),\n })\n\n return (\n \n \n Date Picker Range\n \n \n }\n >\n \n {date?.from ? (\n date.to ? (\n <>\n {format(date.from, \"LLL dd, y\")} -{\" \"}\n {format(date.to, \"LLL dd, y\")}\n \n ) : (\n format(date.from, \"LLL dd, y\")\n )\n ) : (\n Pick a date\n )}\n \n \n \n \n \n \n \n )\n}\n\nfunction DataPickerWithDropdowns() {\n const [date, setDate] = React.useState()\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n Date\n \n \n }\n >\n \n {date ? format(date, \"PPP\") : Pick a date}\n \n \n \n
\n setOpen(false)}\n >\n Done\n \n
\n
\n
\n
\n
\n )\n}\n\nfunction CalendarWeekNumbers() {\n const [date, setDate] = React.useState(\n new Date(new Date().getFullYear(), 1, 3)\n )\n\n return (\n \n \n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/calendar.json b/apps/v4/public/r/styles/base-lyra/calendar.json index 2e296880ee..5de2511806 100644 --- a/apps/v4/public/r/styles/base-lyra/calendar.json +++ b/apps/v4/public/r/styles/base-lyra/calendar.json @@ -11,7 +11,7 @@ "files": [ { "path": "registry/base-lyra/ui/calendar.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n DayPicker,\n getDefaultClassNames,\n type DayButton,\n} from \"react-day-picker\"\n\nimport { cn } from \"@/registry/bases/base/lib/utils\"\nimport { Button, buttonVariants } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps & {\n buttonVariant?: React.ComponentProps[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"flex gap-4 flex-col md:flex-row relative\",\n defaultClassNames.months\n ),\n month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n nav: cn(\n \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"relative cn-calendar-dropdown-root rounded-(--cell-radius)\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"absolute bg-popover inset-0 opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"cn-calendar-caption-label rounded-(--cell-radius) flex items-center gap-1 text-sm [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n defaultClassNames.caption_label\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-muted-foreground rounded-(--cell-radius) flex-1 font-normal text-[0.8rem] select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n week_number_header: cn(\n \"select-none w-(--cell-size)\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-[0.8rem] select-none text-muted-foreground\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"rounded-l-(--cell-radius) bg-muted elative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\n \"rounded-r-(--cell-radius) bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate\",\n defaultClassNames.range_end\n ),\n today: cn(\n \"bg-muted text-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n \n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return (\n \n )\n }\n\n if (orientation === \"right\") {\n return (\n \n )\n }\n\n return (\n \n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n \n
\n {children}\n
\n \n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n DayPicker,\n getDefaultClassNames,\n type DayButton,\n} from \"react-day-picker\"\n\nimport { cn } from \"@/registry/bases/base/lib/utils\"\nimport { Button, buttonVariants } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps & {\n buttonVariant?: React.ComponentProps[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"flex gap-4 flex-col md:flex-row relative\",\n defaultClassNames.months\n ),\n month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n nav: cn(\n \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"relative cn-calendar-dropdown-root rounded-(--cell-radius)\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"absolute bg-popover inset-0 opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"cn-calendar-caption-label rounded-(--cell-radius) flex items-center gap-1 text-sm [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n defaultClassNames.caption_label\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-muted-foreground rounded-(--cell-radius) flex-1 font-normal text-[0.8rem] select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n week_number_header: cn(\n \"select-none w-(--cell-size)\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-[0.8rem] select-none text-muted-foreground\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none\",\n props.showWeekNumber\n ? \"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)\"\n : \"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"rounded-l-(--cell-radius) bg-muted elative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n range_end: cn(\n \"rounded-r-(--cell-radius) bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate\",\n defaultClassNames.range_end\n ),\n today: cn(\n \"bg-muted text-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground aria-selected:text-muted-foreground\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n \n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === \"left\") {\n return (\n \n )\n }\n\n if (orientation === \"right\") {\n return (\n \n )\n }\n\n return (\n \n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n \n
\n {children}\n
\n \n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/base-lyra/card-example.json b/apps/v4/public/r/styles/base-lyra/card-example.json index 40d4c04424..c2251de459 100644 --- a/apps/v4/public/r/styles/base-lyra/card-example.json +++ b/apps/v4/public/r/styles/base-lyra/card-example.json @@ -13,7 +13,7 @@ "files": [ { "path": "registry/base-lyra/examples/card-example.tsx", - "content": "import Image from \"next/image\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarGroupCount,\n AvatarImage,\n} from \"@/registry/bases/base/ui/avatar\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport { Field, FieldGroup, FieldLabel } from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CardExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction CardLogin() {\n return (\n \n \n \n Login to your account\n \n Enter your email below to login to your account\n \n \n \n
\n \n \n Email\n \n \n \n
\n Password\n \n Forgot your password?\n \n
\n \n
\n
\n
\n
\n \n \n \n
\n Don't have an account?{\" \"}\n \n Sign up\n \n
\n
\n
\n
\n )\n}\n\nfunction CardMeetingNotes() {\n return (\n \n \n \n Meeting Notes\n \n Transcript from the meeting with the client.\n \n \n \n \n \n \n

\n Client requested dashboard redesign with focus on mobile\n responsiveness.\n

\n
    \n
  1. New analytics widgets for daily/weekly metrics
  2. \n
  3. Simplified navigation menu
  4. \n
  5. Dark mode support
  6. \n
  7. Timeline: 6 weeks
  8. \n
  9. Follow-up meeting scheduled for next Tuesday
  10. \n
\n
\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +8\n \n \n
\n
\n )\n}\n\nfunction CardWithImage() {\n return (\n \n \n
\n \n \n Beautiful Landscape\n \n A stunning view that captures the essence of natural beauty.\n \n \n \n \n \n \n \n )\n}\n\nfunction CardWithImageSmall() {\n return (\n \n \n
\n \n \n Beautiful Landscape\n \n A stunning view that captures the essence of natural beauty.\n \n \n \n \n \n \n \n )\n}\n\nfunction CardHeaderWithBorder() {\n return (\n \n \n \n Header with Border\n \n This is a card with a header that has a bottom border.\n \n \n \n

\n The header has a border-b class applied, creating a visual\n separation between the header and content sections.\n

\n
\n
\n
\n )\n}\n\nfunction CardFooterWithBorder() {\n return (\n \n \n \n

\n The footer has a border-t class applied, creating a visual\n separation between the content and footer sections.\n

\n
\n \n \n \n
\n
\n )\n}\n\nfunction CardDefault() {\n return (\n \n \n \n Default Card\n \n This card uses the default size variant.\n \n \n \n

\n The card component supports a size prop that defaults to\n "default" for standard spacing and sizing.\n

\n
\n \n \n \n
\n
\n )\n}\n\nfunction CardSmall() {\n return (\n \n \n \n Small Card\n \n This card uses the small size variant.\n \n \n \n

\n The card component supports a size prop that can be set to\n "sm" for a more compact appearance.\n

\n
\n \n \n \n
\n
\n )\n}\n\nfunction CardHeaderWithBorderSmall() {\n return (\n \n \n \n Header with Border\n \n This is a small card with a header that has a bottom border.\n \n \n \n

\n The header has a border-b class applied, creating a visual\n separation between the header and content sections.\n

\n
\n
\n
\n )\n}\n\nfunction CardFooterWithBorderSmall() {\n return (\n \n \n \n

\n The footer has a border-t class applied, creating a visual\n separation between the content and footer sections.\n

\n
\n \n \n \n
\n
\n )\n}\n", + "content": "import Image from \"next/image\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarGroupCount,\n AvatarImage,\n} from \"@/registry/bases/base/ui/avatar\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport { Field, FieldGroup, FieldLabel } from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CardExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction CardLogin() {\n return (\n \n \n \n Login to your account\n \n Enter your email below to login to your account\n \n \n \n
\n \n \n Email\n \n \n \n
\n Password\n \n Forgot your password?\n \n
\n \n
\n
\n
\n
\n \n \n \n
\n Don't have an account?{\" \"}\n \n Sign up\n \n
\n
\n
\n
\n )\n}\n\nfunction CardMeetingNotes() {\n return (\n \n \n \n Meeting Notes\n \n Transcript from the meeting with the client.\n \n \n \n \n \n \n

\n Client requested dashboard redesign with focus on mobile\n responsiveness.\n

\n
    \n
  1. New analytics widgets for daily/weekly metrics
  2. \n
  3. Simplified navigation menu
  4. \n
  5. Dark mode support
  6. \n
  7. Timeline: 6 weeks
  8. \n
  9. Follow-up meeting scheduled for next Tuesday
  10. \n
\n
\n \n \n \n \n CN\n \n \n \n LR\n \n \n \n ER\n \n +8\n \n \n
\n
\n )\n}\n\nfunction CardWithImage() {\n return (\n \n \n
\n \n \n Beautiful Landscape\n \n A stunning view that captures the essence of natural beauty.\n \n \n \n \n \n \n \n )\n}\n\nfunction CardWithImageSmall() {\n return (\n \n \n
\n \n \n Beautiful Landscape\n \n A stunning view that captures the essence of natural beauty.\n \n \n \n \n \n \n \n )\n}\n\nfunction CardHeaderWithBorder() {\n return (\n \n \n \n Header with Border\n \n This is a card with a header that has a bottom border.\n \n \n \n

\n The header has a border-b class applied, creating a visual\n separation between the header and content sections.\n

\n
\n
\n
\n )\n}\n\nfunction CardFooterWithBorder() {\n return (\n \n \n \n

\n The footer has a border-t class applied, creating a visual\n separation between the content and footer sections.\n

\n
\n \n \n \n
\n
\n )\n}\n\nfunction CardDefault() {\n return (\n \n \n \n Default Card\n \n This card uses the default size variant.\n \n \n \n

\n The card component supports a size prop that defaults to\n "default" for standard spacing and sizing.\n

\n
\n \n \n \n
\n
\n )\n}\n\nfunction CardSmall() {\n return (\n \n \n \n Small Card\n \n This card uses the small size variant.\n \n \n \n

\n The card component supports a size prop that can be set to\n "sm" for a more compact appearance.\n

\n
\n \n \n \n
\n
\n )\n}\n\nfunction CardHeaderWithBorderSmall() {\n return (\n \n \n \n Header with Border\n \n This is a small card with a header that has a bottom border.\n \n \n \n

\n The header has a border-b class applied, creating a visual\n separation between the header and content sections.\n

\n
\n
\n
\n )\n}\n\nfunction CardFooterWithBorderSmall() {\n return (\n \n \n \n

\n The footer has a border-t class applied, creating a visual\n separation between the content and footer sections.\n

\n
\n \n \n \n
\n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/carousel.json b/apps/v4/public/r/styles/base-lyra/carousel.json index 765eb9b561..4de2f3f7aa 100644 --- a/apps/v4/public/r/styles/base-lyra/carousel.json +++ b/apps/v4/public/r/styles/base-lyra/carousel.json @@ -10,7 +10,7 @@ "files": [ { "path": "registry/base-lyra/ui/carousel.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\"\n\nimport { cn } from \"@/registry/bases/base/lib/utils\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: \"horizontal\" | \"vertical\"\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType[0]\n api: ReturnType[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a \")\n }\n\n return context\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) return\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) return\n onSelect(api)\n api.on(\"reInit\", onSelect)\n api.on(\"select\", onSelect)\n\n return () => {\n api?.off(\"select\", onSelect)\n }\n }, [api, onSelect])\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n \n \n
\n )\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel()\n\n return (\n \n )\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n}: React.ComponentProps) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n \n \n Previous slide\n \n )\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n}: React.ComponentProps) {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n \n \n Next slide\n \n )\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n useCarousel,\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\"\n\nimport { cn } from \"@/registry/bases/base/lib/utils\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: \"horizontal\" | \"vertical\"\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType[0]\n api: ReturnType[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a \")\n }\n\n return context\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) return\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) return\n onSelect(api)\n api.on(\"reInit\", onSelect)\n api.on(\"select\", onSelect)\n\n return () => {\n api?.off(\"select\", onSelect)\n }\n }, [api, onSelect])\n\n return (\n \n \n {children}\n
\n \n )\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n \n \n
\n )\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel()\n\n return (\n \n )\n}\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n}: React.ComponentProps) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n \n \n Previous slide\n \n )\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n}: React.ComponentProps) {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n \n \n Next slide\n \n )\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n useCarousel,\n}\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/base-lyra/chart-example.json b/apps/v4/public/r/styles/base-lyra/chart-example.json index 0a523932af..de9c9f80c2 100644 --- a/apps/v4/public/r/styles/base-lyra/chart-example.json +++ b/apps/v4/public/r/styles/base-lyra/chart-example.json @@ -10,7 +10,7 @@ "files": [ { "path": "registry/base-lyra/examples/chart-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n Area,\n AreaChart,\n Bar,\n BarChart,\n CartesianGrid,\n Label,\n Line,\n LineChart,\n Pie,\n PieChart,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadarChart,\n RadialBar,\n RadialBarChart,\n XAxis,\n} from \"recharts\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/registry/bases/base/ui/chart\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst areaChartData = [\n { month: \"January\", desktop: 186 },\n { month: \"February\", desktop: 305 },\n { month: \"March\", desktop: 237 },\n { month: \"April\", desktop: 73 },\n { month: \"May\", desktop: 209 },\n { month: \"June\", desktop: 214 },\n]\n\nconst areaChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n} satisfies ChartConfig\n\nexport default function ChartExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ChartAreaExample() {\n return (\n \n \n \n Area Chart\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n \n value.slice(0, 3)}\n />\n }\n />\n \n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n
\n )\n}\n\nconst barChartData = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst barChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartBarExample() {\n return (\n \n \n \n Bar Chart - Multiple\n January - June 2024\n \n \n \n \n \n value.slice(0, 3)}\n />\n }\n />\n \n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n )\n}\n\nconst lineChartData = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst lineChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartLineExample() {\n return (\n \n \n \n Line Chart - Multiple\n January - June 2024\n \n \n \n \n \n value.slice(0, 3)}\n />\n } />\n \n \n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n
\n )\n}\n\nconst pieChartData = [\n { browser: \"chrome\", visitors: 275, fill: \"var(--color-chrome)\" },\n { browser: \"safari\", visitors: 200, fill: \"var(--color-safari)\" },\n { browser: \"firefox\", visitors: 287, fill: \"var(--color-firefox)\" },\n { browser: \"edge\", visitors: 173, fill: \"var(--color-edge)\" },\n { browser: \"other\", visitors: 190, fill: \"var(--color-other)\" },\n]\n\nconst pieChartConfig = {\n visitors: {\n label: \"Visitors\",\n },\n chrome: {\n label: \"Chrome\",\n color: \"var(--chart-1)\",\n },\n safari: {\n label: \"Safari\",\n color: \"var(--chart-2)\",\n },\n firefox: {\n label: \"Firefox\",\n color: \"var(--chart-3)\",\n },\n edge: {\n label: \"Edge\",\n color: \"var(--chart-4)\",\n },\n other: {\n label: \"Other\",\n color: \"var(--chart-5)\",\n },\n} satisfies ChartConfig\n\nfunction ChartPieExample() {\n const totalVisitors = React.useMemo(() => {\n return pieChartData.reduce((acc, curr) => acc + curr.visitors, 0)\n }, [])\n\n return (\n \n \n \n Pie Chart - Donut with Text\n January - June 2024\n \n \n \n \n }\n />\n \n {\n if (viewBox && \"cx\" in viewBox && \"cy\" in viewBox) {\n return (\n \n \n {totalVisitors.toLocaleString()}\n \n \n Visitors\n \n \n )\n }\n }}\n />\n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n )\n}\n\nconst radarChartData = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst radarChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartRadarExample() {\n return (\n \n \n \n Radar Chart - Multiple\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n }\n />\n \n \n \n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n January - June 2024\n
\n
\n
\n
\n )\n}\n\nconst radialChartData = [\n { browser: \"safari\", visitors: 1260, fill: \"var(--color-safari)\" },\n]\n\nconst radialChartConfig = {\n visitors: {\n label: \"Visitors\",\n },\n safari: {\n label: \"Safari\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartRadialExample() {\n return (\n \n \n \n Radial Chart - Shape\n January - June 2024\n \n \n \n \n \n \n \n {\n if (viewBox && \"cx\" in viewBox && \"cy\" in viewBox) {\n return (\n \n \n {radialChartData[0].visitors.toLocaleString()}\n \n \n Visitors\n \n \n )\n }\n }}\n />\n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n Area,\n AreaChart,\n Bar,\n BarChart,\n CartesianGrid,\n Label,\n Line,\n LineChart,\n Pie,\n PieChart,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadarChart,\n RadialBar,\n RadialBarChart,\n XAxis,\n} from \"recharts\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from \"@/registry/bases/base/ui/chart\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nconst areaChartData = [\n { month: \"January\", desktop: 186 },\n { month: \"February\", desktop: 305 },\n { month: \"March\", desktop: 237 },\n { month: \"April\", desktop: 73 },\n { month: \"May\", desktop: 209 },\n { month: \"June\", desktop: 214 },\n]\n\nconst areaChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n} satisfies ChartConfig\n\nexport default function ChartExample() {\n return (\n \n \n \n \n \n \n \n )\n}\n\nfunction ChartAreaExample() {\n return (\n \n \n \n Area Chart\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n \n value.slice(0, 3)}\n />\n }\n />\n \n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n January - June 2024\n
\n
\n
\n
\n
\n
\n )\n}\n\nconst barChartData = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst barChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartBarExample() {\n return (\n \n \n \n Bar Chart - Multiple\n January - June 2024\n \n \n \n \n \n value.slice(0, 3)}\n />\n }\n />\n \n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n )\n}\n\nconst lineChartData = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst lineChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartLineExample() {\n return (\n \n \n \n Line Chart - Multiple\n January - June 2024\n \n \n \n \n \n value.slice(0, 3)}\n />\n } />\n \n \n \n \n \n \n
\n
\n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n
\n
\n )\n}\n\nconst pieChartData = [\n { browser: \"chrome\", visitors: 275, fill: \"var(--color-chrome)\" },\n { browser: \"safari\", visitors: 200, fill: \"var(--color-safari)\" },\n { browser: \"firefox\", visitors: 287, fill: \"var(--color-firefox)\" },\n { browser: \"edge\", visitors: 173, fill: \"var(--color-edge)\" },\n { browser: \"other\", visitors: 190, fill: \"var(--color-other)\" },\n]\n\nconst pieChartConfig = {\n visitors: {\n label: \"Visitors\",\n },\n chrome: {\n label: \"Chrome\",\n color: \"var(--chart-1)\",\n },\n safari: {\n label: \"Safari\",\n color: \"var(--chart-2)\",\n },\n firefox: {\n label: \"Firefox\",\n color: \"var(--chart-3)\",\n },\n edge: {\n label: \"Edge\",\n color: \"var(--chart-4)\",\n },\n other: {\n label: \"Other\",\n color: \"var(--chart-5)\",\n },\n} satisfies ChartConfig\n\nfunction ChartPieExample() {\n const totalVisitors = React.useMemo(() => {\n return pieChartData.reduce((acc, curr) => acc + curr.visitors, 0)\n }, [])\n\n return (\n \n \n \n Pie Chart - Donut with Text\n January - June 2024\n \n \n \n \n }\n />\n \n {\n if (viewBox && \"cx\" in viewBox && \"cy\" in viewBox) {\n return (\n \n \n {totalVisitors.toLocaleString()}\n \n \n Visitors\n \n \n )\n }\n }}\n />\n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n )\n}\n\nconst radarChartData = [\n { month: \"January\", desktop: 186, mobile: 80 },\n { month: \"February\", desktop: 305, mobile: 200 },\n { month: \"March\", desktop: 237, mobile: 120 },\n { month: \"April\", desktop: 73, mobile: 190 },\n { month: \"May\", desktop: 209, mobile: 130 },\n { month: \"June\", desktop: 214, mobile: 140 },\n]\n\nconst radarChartConfig = {\n desktop: {\n label: \"Desktop\",\n color: \"var(--chart-1)\",\n },\n mobile: {\n label: \"Mobile\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartRadarExample() {\n return (\n \n \n \n Radar Chart - Multiple\n \n Showing total visitors for the last 6 months\n \n \n \n \n \n }\n />\n \n \n \n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n January - June 2024\n
\n
\n
\n
\n )\n}\n\nconst radialChartData = [\n { browser: \"safari\", visitors: 1260, fill: \"var(--color-safari)\" },\n]\n\nconst radialChartConfig = {\n visitors: {\n label: \"Visitors\",\n },\n safari: {\n label: \"Safari\",\n color: \"var(--chart-2)\",\n },\n} satisfies ChartConfig\n\nfunction ChartRadialExample() {\n return (\n \n \n \n Radial Chart - Shape\n January - June 2024\n \n \n \n \n \n \n \n {\n if (viewBox && \"cx\" in viewBox && \"cy\" in viewBox) {\n return (\n \n \n {radialChartData[0].visitors.toLocaleString()}\n \n \n Visitors\n \n \n )\n }\n }}\n />\n \n \n \n \n \n
\n Trending up by 5.2% this month{\" \"}\n \n
\n
\n Showing total visitors for the last 6 months\n
\n
\n
\n
\n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/chatgpt.json b/apps/v4/public/r/styles/base-lyra/chatgpt.json index a636e31be4..cd24da9e2d 100644 --- a/apps/v4/public/r/styles/base-lyra/chatgpt.json +++ b/apps/v4/public/r/styles/base-lyra/chatgpt.json @@ -20,7 +20,7 @@ "files": [ { "path": "registry/base-lyra/blocks/chatgpt.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Alert, AlertDescription } from \"@/registry/bases/base/ui/alert\"\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"@/registry/bases/base/ui/alert-dialog\"\nimport { Badge } from \"@/registry/bases/base/ui/badge\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/bases/base/ui/dropdown-menu\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/bases/base/ui/field\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n InputGroupTextarea,\n} from \"@/registry/bases/base/ui/input-group\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/bases/base/ui/item\"\nimport { Kbd } from \"@/registry/bases/base/ui/kbd\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"@/registry/bases/base/ui/popover\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/bases/base/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ChatGPTBlock() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction PromptForm() {\n const [dictateEnabled, setDictateEnabled] = React.useState(false)\n\n return (\n \n \n \n Prompt\n \n \n \n \n \n \n setDictateEnabled(!dictateEnabled)}\n className=\"rounded-4xl\"\n />\n }\n />\n }\n >\n \n \n \n Add files and more /\n \n \n \n \n \n \n Add photos & files\n \n \n \n Deep research\n \n \n \n Shopping research\n \n \n \n Create image\n \n \n \n \n Agent mode\n \n }\n />\n \n
35 left
\n
\n More available for purchase\n
\n
\n
\n
\n \n \n \n More\n \n \n \n \n \n \n Add sources\n \n \n \n Study and learn\n \n \n \n Web search\n \n \n \n Canvas\n \n \n \n \n \n
\n
\n \n setDictateEnabled(!dictateEnabled)}\n className=\"ml-auto rounded-4xl\"\n />\n }\n >\n \n \n Dictate\n \n \n \n \n
\n
\n
\n
\n )\n}\n\nfunction ModelSelector() {\n const [mode, setMode] = React.useState(\"auto\")\n const [model, setModel] = React.useState(\"gpt-5.1\")\n\n return (\n \n \n }\n >\n ChatGPT 5.1\n \n \n \n \n \n GPT-5.1\n \n \n \n \n \n Auto\n \n Decides how long to think\n \n \n \n \n \n \n \n Instant\n \n Answers right away\n \n \n \n \n \n \n \n Thinking\n \n Thinks longer for better answers\n \n \n \n \n \n \n \n \n \n Legacy models\n \n \n \n \n \n \n GPT-4\n \n \n GPT-4 Turbo\n \n \n GPT-3.5\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction GroupChatDialog() {\n return (\n \n \n }>\n Start Group Chat\n \n \n \n Use ChatGPT together\n \n Add people to your chats to plan, share ideas, and get creative.\n \n \n \n \n Learn more\n \n
\n Cancel\n Start group chat\n
\n
\n
\n
\n
\n )\n}\n\nconst categories = [\n {\n id: \"homework\",\n label: \"Homework\",\n },\n {\n id: \"writing\",\n label: \"Writing\",\n },\n {\n id: \"health\",\n label: \"Health\",\n },\n {\n id: \"travel\",\n label: \"Travel\",\n },\n]\n\nfunction CreateProjectForm() {\n const [projectName, setProjectName] = React.useState(\"\")\n const [selectedCategory, setSelectedCategory] = React.useState(\n categories[0].id\n )\n const [memorySetting, setMemorySetting] = React.useState<\n \"default\" | \"project-only\"\n >(\"default\")\n const [selectedColor, setSelectedColor] = React.useState(\n \"var(--foreground)\"\n )\n\n return (\n \n \n \n Create Project\n \n Start a new project to keep chats, files, and custom instructions in\n one place.\n \n \n \n }\n >\n \n Memory\n \n \n \n {\n setMemorySetting(value as \"default\" | \"project-only\")\n }}\n >\n \n \n \n Default\n \n Project can access memories from outside chats, and\n vice versa.\n \n \n \n \n \n \n \n Project Only\n \n Project can only access its own memories. Its\n memories are hidden from outside chats.\n \n \n \n \n \n \n \n \n \n Note that this setting can't be changed later.\n \n \n \n \n \n \n \n \n \n \n Project Name\n \n \n {\n setProjectName(e.target.value)\n }}\n />\n \n \n \n }\n >\n \n \n \n
\n {[\n \"var(--foreground)\",\n \"#fa423e\",\n \"#f59e0b\",\n \"#8b5cf6\",\n \"#ec4899\",\n \"#10b981\",\n \"#6366f1\",\n \"#14b8a6\",\n \"#f97316\",\n \"#fbbc04\",\n ].map((color) => (\n {\n setSelectedColor(color)\n }}\n >\n \n {color}\n \n ))}\n
\n
\n
\n
\n
\n \n {categories.map((category) => (\n {\n setSelectedCategory(\n selectedCategory === category.id\n ? null\n : category.id\n )\n }}\n />\n }\n >\n \n {category.label}\n \n ))}\n \n
\n \n \n \n \n Projects keep chats, files, and custom instructions in one\n place. Use them for ongoing work, or just to keep things tidy.\n \n \n \n
\n
\n
\n
\n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Alert, AlertDescription } from \"@/registry/bases/base/ui/alert\"\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"@/registry/bases/base/ui/alert-dialog\"\nimport { Badge } from \"@/registry/bases/base/ui/badge\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/bases/base/ui/dropdown-menu\"\nimport {\n Field,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/bases/base/ui/field\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n InputGroupTextarea,\n} from \"@/registry/bases/base/ui/input-group\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/bases/base/ui/item\"\nimport { Kbd } from \"@/registry/bases/base/ui/kbd\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"@/registry/bases/base/ui/popover\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/registry/bases/base/ui/tooltip\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ChatGPTBlock() {\n return (\n \n \n \n \n \n \n )\n}\n\nfunction PromptForm() {\n const [dictateEnabled, setDictateEnabled] = React.useState(false)\n\n return (\n \n \n \n Prompt\n \n \n \n \n \n \n setDictateEnabled(!dictateEnabled)}\n className=\"rounded-4xl\"\n />\n }\n />\n }\n >\n \n \n \n Add files and more /\n \n \n \n \n \n \n Add photos & files\n \n \n \n Deep research\n \n \n \n Shopping research\n \n \n \n Create image\n \n \n \n \n Agent mode\n \n }\n />\n \n
35 left
\n
\n More available for purchase\n
\n
\n
\n
\n \n \n \n More\n \n \n \n \n \n \n Add sources\n \n \n \n Study and learn\n \n \n \n Web search\n \n \n \n Canvas\n \n \n \n \n \n
\n
\n \n setDictateEnabled(!dictateEnabled)}\n className=\"ml-auto rounded-4xl\"\n />\n }\n >\n \n \n Dictate\n \n \n \n \n
\n
\n
\n
\n )\n}\n\nfunction ModelSelector() {\n const [mode, setMode] = React.useState(\"auto\")\n const [model, setModel] = React.useState(\"gpt-5.1\")\n\n return (\n \n \n }\n >\n ChatGPT 5.1\n \n \n \n \n \n GPT-5.1\n \n \n \n \n \n Auto\n \n Decides how long to think\n \n \n \n \n \n \n \n Instant\n \n Answers right away\n \n \n \n \n \n \n \n Thinking\n \n Thinks longer for better answers\n \n \n \n \n \n \n \n \n \n Legacy models\n \n \n \n \n \n \n GPT-4\n \n \n GPT-4 Turbo\n \n \n GPT-3.5\n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction GroupChatDialog() {\n return (\n \n \n }>\n Start Group Chat\n \n \n \n Use ChatGPT together\n \n Add people to your chats to plan, share ideas, and get creative.\n \n \n \n \n Learn more\n \n
\n Cancel\n Start group chat\n
\n
\n
\n
\n
\n )\n}\n\nconst categories = [\n {\n id: \"homework\",\n label: \"Homework\",\n },\n {\n id: \"writing\",\n label: \"Writing\",\n },\n {\n id: \"health\",\n label: \"Health\",\n },\n {\n id: \"travel\",\n label: \"Travel\",\n },\n]\n\nfunction CreateProjectForm() {\n const [projectName, setProjectName] = React.useState(\"\")\n const [selectedCategory, setSelectedCategory] = React.useState(\n categories[0].id\n )\n const [memorySetting, setMemorySetting] = React.useState<\n \"default\" | \"project-only\"\n >(\"default\")\n const [selectedColor, setSelectedColor] = React.useState(\n \"var(--foreground)\"\n )\n\n return (\n \n \n \n Create Project\n \n Start a new project to keep chats, files, and custom instructions in\n one place.\n \n \n \n }\n >\n \n Memory\n \n \n \n {\n setMemorySetting(value as \"default\" | \"project-only\")\n }}\n >\n \n \n \n Default\n \n Project can access memories from outside chats, and\n vice versa.\n \n \n \n \n \n \n \n Project Only\n \n Project can only access its own memories. Its\n memories are hidden from outside chats.\n \n \n \n \n \n \n \n \n \n Note that this setting can't be changed later.\n \n \n \n \n \n \n \n \n \n \n Project Name\n \n \n {\n setProjectName(e.target.value)\n }}\n />\n \n \n \n }\n >\n \n \n \n
\n {[\n \"var(--foreground)\",\n \"#fa423e\",\n \"#f59e0b\",\n \"#8b5cf6\",\n \"#ec4899\",\n \"#10b981\",\n \"#6366f1\",\n \"#14b8a6\",\n \"#f97316\",\n \"#fbbc04\",\n ].map((color) => (\n {\n setSelectedColor(color)\n }}\n >\n \n {color}\n \n ))}\n
\n
\n
\n
\n
\n \n {categories.map((category) => (\n {\n setSelectedCategory(\n selectedCategory === category.id\n ? null\n : category.id\n )\n }}\n />\n }\n >\n \n {category.label}\n \n ))}\n \n
\n \n \n \n \n Projects keep chats, files, and custom instructions in one\n place. Use them for ongoing work, or just to keep things tidy.\n \n \n \n
\n
\n
\n
\n )\n}\n", "type": "registry:block" } ], diff --git a/apps/v4/public/r/styles/base-lyra/checkbox.json b/apps/v4/public/r/styles/base-lyra/checkbox.json index 87912e27b3..6c89458e9f 100644 --- a/apps/v4/public/r/styles/base-lyra/checkbox.json +++ b/apps/v4/public/r/styles/base-lyra/checkbox.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/base-lyra/ui/checkbox.tsx", - "content": "\"use client\"\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\n\nimport { cn } from \"@/registry/bases/base/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {\n return (\n \n svg]:size-3.5 grid place-content-center text-current transition-none\"\n >\n \n \n \n )\n}\n\nexport { Checkbox }\n", + "content": "\"use client\"\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\n\nimport { cn } from \"@/registry/bases/base/lib/utils\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nfunction Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {\n return (\n \n svg]:size-3.5 grid place-content-center text-current transition-none\"\n >\n \n \n \n )\n}\n\nexport { Checkbox }\n", "type": "registry:ui" } ], diff --git a/apps/v4/public/r/styles/base-lyra/collapsible-example.json b/apps/v4/public/r/styles/base-lyra/collapsible-example.json index d7f0bb605c..209ae3808b 100644 --- a/apps/v4/public/r/styles/base-lyra/collapsible-example.json +++ b/apps/v4/public/r/styles/base-lyra/collapsible-example.json @@ -14,7 +14,7 @@ "files": [ { "path": "registry/base-lyra/examples/collapsible-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/registry/bases/base/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport { Tabs, TabsList, TabsTrigger } from \"@/registry/bases/base/ui/tabs\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CollapsibleExample() {\n return (\n \n \n \n \n )\n}\n\ntype FileTreeItem = { name: string } | { name: string; items: FileTreeItem[] }\n\nfunction CollapsibleFileTree() {\n const fileTree: FileTreeItem[] = [\n {\n name: \"components\",\n items: [\n {\n name: \"ui\",\n items: [\n { name: \"button.tsx\" },\n { name: \"card.tsx\" },\n { name: \"dialog.tsx\" },\n { name: \"input.tsx\" },\n { name: \"select.tsx\" },\n { name: \"table.tsx\" },\n ],\n },\n { name: \"login-form.tsx\" },\n { name: \"register-form.tsx\" },\n ],\n },\n {\n name: \"lib\",\n items: [{ name: \"utils.ts\" }, { name: \"cn.ts\" }, { name: \"api.ts\" }],\n },\n {\n name: \"hooks\",\n items: [\n { name: \"use-media-query.ts\" },\n { name: \"use-debounce.ts\" },\n { name: \"use-local-storage.ts\" },\n ],\n },\n {\n name: \"types\",\n items: [{ name: \"index.d.ts\" }, { name: \"api.d.ts\" }],\n },\n {\n name: \"public\",\n items: [\n { name: \"favicon.ico\" },\n { name: \"logo.svg\" },\n { name: \"images\" },\n ],\n },\n { name: \"app.tsx\" },\n { name: \"layout.tsx\" },\n { name: \"globals.css\" },\n { name: \"package.json\" },\n { name: \"tsconfig.json\" },\n { name: \"README.md\" },\n { name: \".gitignore\" },\n ]\n\n const renderItem = (fileItem: FileTreeItem) => {\n if (\"items\" in fileItem) {\n return (\n \n \n }\n >\n \n \n {fileItem.name}\n \n \n
\n {fileItem.items.map((child) => renderItem(child))}\n
\n
\n
\n )\n }\n return (\n \n \n {fileItem.name}\n \n )\n }\n\n return (\n \n \n \n \n \n Explorer\n Outline\n \n \n \n \n
\n {fileTree.map((item) => renderItem(item))}\n
\n
\n
\n
\n )\n}\n\nfunction CollapsibleSettings() {\n const [isOpen, setIsOpen] = React.useState(false)\n\n return (\n \n \n \n Radius\n \n Set the corner radius of the element.\n \n \n \n \n \n \n \n Radius X\n \n \n \n \n \n Radius Y\n \n \n \n \n \n \n Radius X\n \n \n \n \n \n Radius Y\n \n \n \n \n \n }\n >\n {isOpen ? (\n \n ) : (\n \n )}\n \n \n \n \n \n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/bases/base/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/registry/bases/base/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport { Tabs, TabsList, TabsTrigger } from \"@/registry/bases/base/ui/tabs\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function CollapsibleExample() {\n return (\n \n \n \n \n )\n}\n\ntype FileTreeItem = { name: string } | { name: string; items: FileTreeItem[] }\n\nfunction CollapsibleFileTree() {\n const fileTree: FileTreeItem[] = [\n {\n name: \"components\",\n items: [\n {\n name: \"ui\",\n items: [\n { name: \"button.tsx\" },\n { name: \"card.tsx\" },\n { name: \"dialog.tsx\" },\n { name: \"input.tsx\" },\n { name: \"select.tsx\" },\n { name: \"table.tsx\" },\n ],\n },\n { name: \"login-form.tsx\" },\n { name: \"register-form.tsx\" },\n ],\n },\n {\n name: \"lib\",\n items: [{ name: \"utils.ts\" }, { name: \"cn.ts\" }, { name: \"api.ts\" }],\n },\n {\n name: \"hooks\",\n items: [\n { name: \"use-media-query.ts\" },\n { name: \"use-debounce.ts\" },\n { name: \"use-local-storage.ts\" },\n ],\n },\n {\n name: \"types\",\n items: [{ name: \"index.d.ts\" }, { name: \"api.d.ts\" }],\n },\n {\n name: \"public\",\n items: [\n { name: \"favicon.ico\" },\n { name: \"logo.svg\" },\n { name: \"images\" },\n ],\n },\n { name: \"app.tsx\" },\n { name: \"layout.tsx\" },\n { name: \"globals.css\" },\n { name: \"package.json\" },\n { name: \"tsconfig.json\" },\n { name: \"README.md\" },\n { name: \".gitignore\" },\n ]\n\n const renderItem = (fileItem: FileTreeItem) => {\n if (\"items\" in fileItem) {\n return (\n \n \n }\n >\n \n \n {fileItem.name}\n \n \n
\n {fileItem.items.map((child) => renderItem(child))}\n
\n
\n
\n )\n }\n return (\n \n \n {fileItem.name}\n \n )\n }\n\n return (\n \n \n \n \n \n Explorer\n Outline\n \n \n \n \n
\n {fileTree.map((item) => renderItem(item))}\n
\n
\n
\n
\n )\n}\n\nfunction CollapsibleSettings() {\n const [isOpen, setIsOpen] = React.useState(false)\n\n return (\n \n \n \n Radius\n \n Set the corner radius of the element.\n \n \n \n \n \n \n \n Radius X\n \n \n \n \n \n Radius Y\n \n \n \n \n \n \n Radius X\n \n \n \n \n \n Radius Y\n \n \n \n \n \n }\n >\n {isOpen ? (\n \n ) : (\n \n )}\n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/combobox-example.json b/apps/v4/public/r/styles/base-lyra/combobox-example.json index a87118ed52..0e4f09d128 100644 --- a/apps/v4/public/r/styles/base-lyra/combobox-example.json +++ b/apps/v4/public/r/styles/base-lyra/combobox-example.json @@ -17,7 +17,7 @@ "files": [ { "path": "registry/base-lyra/examples/combobox-example.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { toast } from \"sonner\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { Card, CardContent, CardFooter } from \"@/registry/bases/base/ui/card\"\nimport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n} from \"@/registry/bases/base/ui/combobox\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/bases/base/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/bases/base/ui/input-group\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/bases/base/ui/item\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/bases/base/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ComboboxExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nconst frameworks = [\n \"Next.js\",\n \"SvelteKit\",\n \"Nuxt.js\",\n \"Remix\",\n \"Astro\",\n] as const\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n { code: \"af\", value: \"afghanistan\", label: \"Afghanistan\", continent: \"Asia\" },\n { code: \"al\", value: \"albania\", label: \"Albania\", continent: \"Europe\" },\n { code: \"dz\", value: \"algeria\", label: \"Algeria\", continent: \"Africa\" },\n { code: \"ad\", value: \"andorra\", label: \"Andorra\", continent: \"Europe\" },\n { code: \"ao\", value: \"angola\", label: \"Angola\", continent: \"Africa\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"am\", value: \"armenia\", label: \"Armenia\", continent: \"Asia\" },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"at\", value: \"austria\", label: \"Austria\", continent: \"Europe\" },\n { code: \"az\", value: \"azerbaijan\", label: \"Azerbaijan\", continent: \"Asia\" },\n {\n code: \"bs\",\n value: \"bahamas\",\n label: \"Bahamas\",\n continent: \"North America\",\n },\n { code: \"bh\", value: \"bahrain\", label: \"Bahrain\", continent: \"Asia\" },\n { code: \"bd\", value: \"bangladesh\", label: \"Bangladesh\", continent: \"Asia\" },\n {\n code: \"bb\",\n value: \"barbados\",\n label: \"Barbados\",\n continent: \"North America\",\n },\n { code: \"by\", value: \"belarus\", label: \"Belarus\", continent: \"Europe\" },\n { code: \"be\", value: \"belgium\", label: \"Belgium\", continent: \"Europe\" },\n { code: \"bz\", value: \"belize\", label: \"Belize\", continent: \"North America\" },\n { code: \"bj\", value: \"benin\", label: \"Benin\", continent: \"Africa\" },\n { code: \"bt\", value: \"bhutan\", label: \"Bhutan\", continent: \"Asia\" },\n {\n code: \"bo\",\n value: \"bolivia\",\n label: \"Bolivia\",\n continent: \"South America\",\n },\n {\n code: \"ba\",\n value: \"bosnia-and-herzegovina\",\n label: \"Bosnia and Herzegovina\",\n continent: \"Europe\",\n },\n { code: \"bw\", value: \"botswana\", label: \"Botswana\", continent: \"Africa\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"bn\", value: \"brunei\", label: \"Brunei\", continent: \"Asia\" },\n { code: \"bg\", value: \"bulgaria\", label: \"Bulgaria\", continent: \"Europe\" },\n {\n code: \"bf\",\n value: \"burkina-faso\",\n label: \"Burkina Faso\",\n continent: \"Africa\",\n },\n { code: \"bi\", value: \"burundi\", label: \"Burundi\", continent: \"Africa\" },\n { code: \"kh\", value: \"cambodia\", label: \"Cambodia\", continent: \"Asia\" },\n { code: \"cm\", value: \"cameroon\", label: \"Cameroon\", continent: \"Africa\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North America\" },\n { code: \"cv\", value: \"cape-verde\", label: \"Cape Verde\", continent: \"Africa\" },\n {\n code: \"cf\",\n value: \"central-african-republic\",\n label: \"Central African Republic\",\n continent: \"Africa\",\n },\n { code: \"td\", value: \"chad\", label: \"Chad\", continent: \"Africa\" },\n { code: \"cl\", value: \"chile\", label: \"Chile\", continent: \"South America\" },\n { code: \"cn\", value: \"china\", label: \"China\", continent: \"Asia\" },\n {\n code: \"co\",\n value: \"colombia\",\n label: \"Colombia\",\n continent: \"South America\",\n },\n { code: \"km\", value: \"comoros\", label: \"Comoros\", continent: \"Africa\" },\n { code: \"cg\", value: \"congo\", label: \"Congo\", continent: \"Africa\" },\n {\n code: \"cr\",\n value: \"costa-rica\",\n label: \"Costa Rica\",\n continent: \"North America\",\n },\n { code: \"hr\", value: \"croatia\", label: \"Croatia\", continent: \"Europe\" },\n { code: \"cu\", value: \"cuba\", label: \"Cuba\", continent: \"North America\" },\n { code: \"cy\", value: \"cyprus\", label: \"Cyprus\", continent: \"Asia\" },\n {\n code: \"cz\",\n value: \"czech-republic\",\n label: \"Czech Republic\",\n continent: \"Europe\",\n },\n { code: \"dk\", value: \"denmark\", label: \"Denmark\", continent: \"Europe\" },\n { code: \"dj\", value: \"djibouti\", label: \"Djibouti\", continent: \"Africa\" },\n {\n code: \"dm\",\n value: \"dominica\",\n label: \"Dominica\",\n continent: \"North America\",\n },\n {\n code: \"do\",\n value: \"dominican-republic\",\n label: \"Dominican Republic\",\n continent: \"North America\",\n },\n {\n code: \"ec\",\n value: \"ecuador\",\n label: \"Ecuador\",\n continent: \"South America\",\n },\n { code: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n {\n code: \"sv\",\n value: \"el-salvador\",\n label: \"El Salvador\",\n continent: \"North America\",\n },\n {\n code: \"gq\",\n value: \"equatorial-guinea\",\n label: \"Equatorial Guinea\",\n continent: \"Africa\",\n },\n { code: \"er\", value: \"eritrea\", label: \"Eritrea\", continent: \"Africa\" },\n { code: \"ee\", value: \"estonia\", label: \"Estonia\", continent: \"Europe\" },\n { code: \"et\", value: \"ethiopia\", label: \"Ethiopia\", continent: \"Africa\" },\n { code: \"fj\", value: \"fiji\", label: \"Fiji\", continent: \"Oceania\" },\n { code: \"fi\", value: \"finland\", label: \"Finland\", continent: \"Europe\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"ga\", value: \"gabon\", label: \"Gabon\", continent: \"Africa\" },\n { code: \"gm\", value: \"gambia\", label: \"Gambia\", continent: \"Africa\" },\n { code: \"ge\", value: \"georgia\", label: \"Georgia\", continent: \"Asia\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"gh\", value: \"ghana\", label: \"Ghana\", continent: \"Africa\" },\n { code: \"gr\", value: \"greece\", label: \"Greece\", continent: \"Europe\" },\n {\n code: \"gd\",\n value: \"grenada\",\n label: \"Grenada\",\n continent: \"North America\",\n },\n {\n code: \"gt\",\n value: \"guatemala\",\n label: \"Guatemala\",\n continent: \"North America\",\n },\n { code: \"gn\", value: \"guinea\", label: \"Guinea\", continent: \"Africa\" },\n {\n code: \"gw\",\n value: \"guinea-bissau\",\n label: \"Guinea-Bissau\",\n continent: \"Africa\",\n },\n { code: \"gy\", value: \"guyana\", label: \"Guyana\", continent: \"South America\" },\n { code: \"ht\", value: \"haiti\", label: \"Haiti\", continent: \"North America\" },\n {\n code: \"hn\",\n value: \"honduras\",\n label: \"Honduras\",\n continent: \"North America\",\n },\n { code: \"hu\", value: \"hungary\", label: \"Hungary\", continent: \"Europe\" },\n { code: \"is\", value: \"iceland\", label: \"Iceland\", continent: \"Europe\" },\n { code: \"in\", value: \"india\", label: \"India\", continent: \"Asia\" },\n { code: \"id\", value: \"indonesia\", label: \"Indonesia\", continent: \"Asia\" },\n { code: \"ir\", value: \"iran\", label: \"Iran\", continent: \"Asia\" },\n { code: \"iq\", value: \"iraq\", label: \"Iraq\", continent: \"Asia\" },\n { code: \"ie\", value: \"ireland\", label: \"Ireland\", continent: \"Europe\" },\n { code: \"il\", value: \"israel\", label: \"Israel\", continent: \"Asia\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n {\n code: \"jm\",\n value: \"jamaica\",\n label: \"Jamaica\",\n continent: \"North America\",\n },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"jo\", value: \"jordan\", label: \"Jordan\", continent: \"Asia\" },\n { code: \"kz\", value: \"kazakhstan\", label: \"Kazakhstan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"kw\", value: \"kuwait\", label: \"Kuwait\", continent: \"Asia\" },\n { code: \"kg\", value: \"kyrgyzstan\", label: \"Kyrgyzstan\", continent: \"Asia\" },\n { code: \"la\", value: \"laos\", label: \"Laos\", continent: \"Asia\" },\n { code: \"lv\", value: \"latvia\", label: \"Latvia\", continent: \"Europe\" },\n { code: \"lb\", value: \"lebanon\", label: \"Lebanon\", continent: \"Asia\" },\n { code: \"ls\", value: \"lesotho\", label: \"Lesotho\", continent: \"Africa\" },\n { code: \"lr\", value: \"liberia\", label: \"Liberia\", continent: \"Africa\" },\n { code: \"ly\", value: \"libya\", label: \"Libya\", continent: \"Africa\" },\n {\n code: \"li\",\n value: \"liechtenstein\",\n label: \"Liechtenstein\",\n continent: \"Europe\",\n },\n { code: \"lt\", value: \"lithuania\", label: \"Lithuania\", continent: \"Europe\" },\n { code: \"lu\", value: \"luxembourg\", label: \"Luxembourg\", continent: \"Europe\" },\n { code: \"mg\", value: \"madagascar\", label: \"Madagascar\", continent: \"Africa\" },\n { code: \"mw\", value: \"malawi\", label: \"Malawi\", continent: \"Africa\" },\n { code: \"my\", value: \"malaysia\", label: \"Malaysia\", continent: \"Asia\" },\n { code: \"mv\", value: \"maldives\", label: \"Maldives\", continent: \"Asia\" },\n { code: \"ml\", value: \"mali\", label: \"Mali\", continent: \"Africa\" },\n { code: \"mt\", value: \"malta\", label: \"Malta\", continent: \"Europe\" },\n {\n code: \"mh\",\n value: \"marshall-islands\",\n label: \"Marshall Islands\",\n continent: \"Oceania\",\n },\n { code: \"mr\", value: \"mauritania\", label: \"Mauritania\", continent: \"Africa\" },\n { code: \"mu\", value: \"mauritius\", label: \"Mauritius\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"fm\",\n value: \"micronesia\",\n label: \"Micronesia\",\n continent: \"Oceania\",\n },\n { code: \"md\", value: \"moldova\", label: \"Moldova\", continent: \"Europe\" },\n { code: \"mc\", value: \"monaco\", label: \"Monaco\", continent: \"Europe\" },\n { code: \"mn\", value: \"mongolia\", label: \"Mongolia\", continent: \"Asia\" },\n { code: \"me\", value: \"montenegro\", label: \"Montenegro\", continent: \"Europe\" },\n { code: \"ma\", value: \"morocco\", label: \"Morocco\", continent: \"Africa\" },\n { code: \"mz\", value: \"mozambique\", label: \"Mozambique\", continent: \"Africa\" },\n { code: \"mm\", value: \"myanmar\", label: \"Myanmar\", continent: \"Asia\" },\n { code: \"na\", value: \"namibia\", label: \"Namibia\", continent: \"Africa\" },\n { code: \"nr\", value: \"nauru\", label: \"Nauru\", continent: \"Oceania\" },\n { code: \"np\", value: \"nepal\", label: \"Nepal\", continent: \"Asia\" },\n {\n code: \"nl\",\n value: \"netherlands\",\n label: \"Netherlands\",\n continent: \"Europe\",\n },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n {\n code: \"ni\",\n value: \"nicaragua\",\n label: \"Nicaragua\",\n continent: \"North America\",\n },\n { code: \"ne\", value: \"niger\", label: \"Niger\", continent: \"Africa\" },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", continent: \"Africa\" },\n { code: \"kp\", value: \"north-korea\", label: \"North Korea\", continent: \"Asia\" },\n {\n code: \"mk\",\n value: \"north-macedonia\",\n label: \"North Macedonia\",\n continent: \"Europe\",\n },\n { code: \"no\", value: \"norway\", label: \"Norway\", continent: \"Europe\" },\n { code: \"om\", value: \"oman\", label: \"Oman\", continent: \"Asia\" },\n { code: \"pk\", value: \"pakistan\", label: \"Pakistan\", continent: \"Asia\" },\n { code: \"pw\", value: \"palau\", label: \"Palau\", continent: \"Oceania\" },\n { code: \"ps\", value: \"palestine\", label: \"Palestine\", continent: \"Asia\" },\n { code: \"pa\", value: \"panama\", label: \"Panama\", continent: \"North America\" },\n {\n code: \"pg\",\n value: \"papua-new-guinea\",\n label: \"Papua New Guinea\",\n continent: \"Oceania\",\n },\n {\n code: \"py\",\n value: \"paraguay\",\n label: \"Paraguay\",\n continent: \"South America\",\n },\n { code: \"pe\", value: \"peru\", label: \"Peru\", continent: \"South America\" },\n { code: \"ph\", value: \"philippines\", label: \"Philippines\", continent: \"Asia\" },\n { code: \"pl\", value: \"poland\", label: \"Poland\", continent: \"Europe\" },\n { code: \"pt\", value: \"portugal\", label: \"Portugal\", continent: \"Europe\" },\n { code: \"qa\", value: \"qatar\", label: \"Qatar\", continent: \"Asia\" },\n { code: \"ro\", value: \"romania\", label: \"Romania\", continent: \"Europe\" },\n { code: \"ru\", value: \"russia\", label: \"Russia\", continent: \"Europe\" },\n { code: \"rw\", value: \"rwanda\", label: \"Rwanda\", continent: \"Africa\" },\n { code: \"ws\", value: \"samoa\", label: \"Samoa\", continent: \"Oceania\" },\n { code: \"sm\", value: \"san-marino\", label: \"San Marino\", continent: \"Europe\" },\n {\n code: \"sa\",\n value: \"saudi-arabia\",\n label: \"Saudi Arabia\",\n continent: \"Asia\",\n },\n { code: \"sn\", value: \"senegal\", label: \"Senegal\", continent: \"Africa\" },\n { code: \"rs\", value: \"serbia\", label: \"Serbia\", continent: \"Europe\" },\n { code: \"sc\", value: \"seychelles\", label: \"Seychelles\", continent: \"Africa\" },\n {\n code: \"sl\",\n value: \"sierra-leone\",\n label: \"Sierra Leone\",\n continent: \"Africa\",\n },\n { code: \"sg\", value: \"singapore\", label: \"Singapore\", continent: \"Asia\" },\n { code: \"sk\", value: \"slovakia\", label: \"Slovakia\", continent: \"Europe\" },\n { code: \"si\", value: \"slovenia\", label: \"Slovenia\", continent: \"Europe\" },\n {\n code: \"sb\",\n value: \"solomon-islands\",\n label: \"Solomon Islands\",\n continent: \"Oceania\",\n },\n { code: \"so\", value: \"somalia\", label: \"Somalia\", continent: \"Africa\" },\n {\n code: \"za\",\n value: \"south-africa\",\n label: \"South Africa\",\n continent: \"Africa\",\n },\n { code: \"kr\", value: \"south-korea\", label: \"South Korea\", continent: \"Asia\" },\n {\n code: \"ss\",\n value: \"south-sudan\",\n label: \"South Sudan\",\n continent: \"Africa\",\n },\n { code: \"es\", value: \"spain\", label: \"Spain\", continent: \"Europe\" },\n { code: \"lk\", value: \"sri-lanka\", label: \"Sri Lanka\", continent: \"Asia\" },\n { code: \"sd\", value: \"sudan\", label: \"Sudan\", continent: \"Africa\" },\n {\n code: \"sr\",\n value: \"suriname\",\n label: \"Suriname\",\n continent: \"South America\",\n },\n { code: \"se\", value: \"sweden\", label: \"Sweden\", continent: \"Europe\" },\n {\n code: \"ch\",\n value: \"switzerland\",\n label: \"Switzerland\",\n continent: \"Europe\",\n },\n { code: \"sy\", value: \"syria\", label: \"Syria\", continent: \"Asia\" },\n { code: \"tw\", value: \"taiwan\", label: \"Taiwan\", continent: \"Asia\" },\n { code: \"tj\", value: \"tajikistan\", label: \"Tajikistan\", continent: \"Asia\" },\n { code: \"tz\", value: \"tanzania\", label: \"Tanzania\", continent: \"Africa\" },\n { code: \"th\", value: \"thailand\", label: \"Thailand\", continent: \"Asia\" },\n { code: \"tl\", value: \"timor-leste\", label: \"Timor-Leste\", continent: \"Asia\" },\n { code: \"tg\", value: \"togo\", label: \"Togo\", continent: \"Africa\" },\n { code: \"to\", value: \"tonga\", label: \"Tonga\", continent: \"Oceania\" },\n {\n code: \"tt\",\n value: \"trinidad-and-tobago\",\n label: \"Trinidad and Tobago\",\n continent: \"North America\",\n },\n { code: \"tn\", value: \"tunisia\", label: \"Tunisia\", continent: \"Africa\" },\n { code: \"tr\", value: \"turkey\", label: \"Turkey\", continent: \"Asia\" },\n {\n code: \"tm\",\n value: \"turkmenistan\",\n label: \"Turkmenistan\",\n continent: \"Asia\",\n },\n { code: \"tv\", value: \"tuvalu\", label: \"Tuvalu\", continent: \"Oceania\" },\n { code: \"ug\", value: \"uganda\", label: \"Uganda\", continent: \"Africa\" },\n { code: \"ua\", value: \"ukraine\", label: \"Ukraine\", continent: \"Europe\" },\n {\n code: \"ae\",\n value: \"united-arab-emirates\",\n label: \"United Arab Emirates\",\n continent: \"Asia\",\n },\n {\n code: \"gb\",\n value: \"united-kingdom\",\n label: \"United Kingdom\",\n continent: \"Europe\",\n },\n {\n code: \"us\",\n value: \"united-states\",\n label: \"United States\",\n continent: \"North America\",\n },\n {\n code: \"uy\",\n value: \"uruguay\",\n label: \"Uruguay\",\n continent: \"South America\",\n },\n { code: \"uz\", value: \"uzbekistan\", label: \"Uzbekistan\", continent: \"Asia\" },\n { code: \"vu\", value: \"vanuatu\", label: \"Vanuatu\", continent: \"Oceania\" },\n {\n code: \"va\",\n value: \"vatican-city\",\n label: \"Vatican City\",\n continent: \"Europe\",\n },\n {\n code: \"ve\",\n value: \"venezuela\",\n label: \"Venezuela\",\n continent: \"South America\",\n },\n { code: \"vn\", value: \"vietnam\", label: \"Vietnam\", continent: \"Asia\" },\n { code: \"ye\", value: \"yemen\", label: \"Yemen\", continent: \"Asia\" },\n { code: \"zm\", value: \"zambia\", label: \"Zambia\", continent: \"Africa\" },\n { code: \"zw\", value: \"zimbabwe\", label: \"Zimbabwe\", continent: \"Africa\" },\n]\n\nconst timezones = [\n {\n value: \"Americas\",\n items: [\n \"(GMT-5) New York\",\n \"(GMT-8) Los Angeles\",\n \"(GMT-6) Chicago\",\n \"(GMT-5) Toronto\",\n \"(GMT-8) Vancouver\",\n \"(GMT-3) São Paulo\",\n ],\n },\n {\n value: \"Europe\",\n items: [\n \"(GMT+0) London\",\n \"(GMT+1) Paris\",\n \"(GMT+1) Berlin\",\n \"(GMT+1) Rome\",\n \"(GMT+1) Madrid\",\n \"(GMT+1) Amsterdam\",\n ],\n },\n {\n value: \"Asia/Pacific\",\n items: [\n \"(GMT+9) Tokyo\",\n \"(GMT+8) Shanghai\",\n \"(GMT+8) Singapore\",\n \"(GMT+4) Dubai\",\n \"(GMT+11) Sydney\",\n \"(GMT+9) Seoul\",\n ],\n },\n] as const\n\nfunction ComboboxBasic() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxDisabled() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxInvalid() {\n return (\n \n
\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n Framework\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n Please select a valid framework.\n \n \n
\n
\n )\n}\n\nfunction ComboboxWithClear() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithGroups() {\n return (\n \n \n \n \n No timezones found.\n \n {(group) => (\n \n {group.value}\n \n {(item) => (\n \n {item}\n \n )}\n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithGroupsAndSeparator() {\n return (\n \n \n \n \n No timezones found.\n \n {(group) => (\n \n {group.value}\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithForm() {\n const handleSubmit = (event: React.FormEvent) => {\n event.preventDefault()\n const formData = new FormData(event.target as HTMLFormElement)\n const framework = formData.get(\"framework\") as string\n toast(`You selected ${framework} as your framework.`)\n }\n\n return (\n \n \n \n \n \n \n Framework\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nconst largeListItems = Array.from({ length: 100 }, (_, i) => `Item ${i + 1}`)\n\nfunction ComboboxLargeList() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxAutoHighlight() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboxboxInputAddon() {\n return (\n \n \n \n \n \n \n \n \n No timezones found.\n \n {(group) => (\n \n {group.value}\n \n {(item) => (\n \n {item}\n \n )}\n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxInPopup() {\n return (\n \n \n \n }\n >\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item.label}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxMultiple() {\n const anchor = useComboboxAnchor()\n\n return (\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxMultipleDisabled() {\n const anchor = useComboboxAnchor()\n\n return (\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxMultipleInvalid() {\n const anchor1 = useComboboxAnchor()\n const anchor2 = useComboboxAnchor()\n\n return (\n \n
\n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n Frameworks\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n Please select at least one framework.\n \n \n \n
\n
\n )\n}\n\nfunction ComboboxMultipleNoRemove() {\n const anchor = useComboboxAnchor()\n\n return (\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n \n {value}\n \n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithCustomItems() {\n return (\n \n country.code !== \"\")}\n itemToStringValue={(country: (typeof countries)[number]) =>\n country.label\n }\n >\n \n \n No countries found.\n \n {(country) => (\n \n \n \n \n {country.label}\n \n \n {country.continent} ({country.code})\n \n \n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxInDialog() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Framework\n \n Choose your preferred framework from the list below.\n \n \n \n \n Framework\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n setOpen(false)}\n >\n Cancel\n \n {\n toast(\"Framework selected.\")\n setOpen(false)\n }}\n >\n Confirm\n \n \n \n \n \n )\n}\n\nconst items = [\n {\n label: \"Select a framework\",\n value: null,\n },\n {\n label: \"React\",\n value: \"react\",\n },\n {\n label: \"Vue\",\n value: \"vue\",\n },\n {\n label: \"Angular\",\n value: \"angular\",\n },\n {\n label: \"Svelte\",\n value: \"svelte\",\n },\n {\n label: \"Solid\",\n value: \"solid\",\n },\n {\n label: \"Preact\",\n value: \"preact\",\n },\n {\n label: \"Next.js\",\n value: \"next.js\",\n },\n]\n\nfunction ComboboxWithOtherInputs() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n Select a framework\n \n \n \n \n \n \n \n \n \n \n )\n}\n", + "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { toast } from \"sonner\"\n\nimport {\n Example,\n ExampleWrapper,\n} from \"@/registry/bases/base/components/example\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport { Card, CardContent, CardFooter } from \"@/registry/bases/base/ui/card\"\nimport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n} from \"@/registry/bases/base/ui/combobox\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/bases/base/ui/dialog\"\nimport {\n Field,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n} from \"@/registry/bases/base/ui/field\"\nimport { Input } from \"@/registry/bases/base/ui/input\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/registry/bases/base/ui/input-group\"\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from \"@/registry/bases/base/ui/item\"\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/registry/bases/base/ui/select\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function ComboboxExample() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nconst frameworks = [\n \"Next.js\",\n \"SvelteKit\",\n \"Nuxt.js\",\n \"Remix\",\n \"Astro\",\n] as const\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n { code: \"af\", value: \"afghanistan\", label: \"Afghanistan\", continent: \"Asia\" },\n { code: \"al\", value: \"albania\", label: \"Albania\", continent: \"Europe\" },\n { code: \"dz\", value: \"algeria\", label: \"Algeria\", continent: \"Africa\" },\n { code: \"ad\", value: \"andorra\", label: \"Andorra\", continent: \"Europe\" },\n { code: \"ao\", value: \"angola\", label: \"Angola\", continent: \"Africa\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"am\", value: \"armenia\", label: \"Armenia\", continent: \"Asia\" },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"at\", value: \"austria\", label: \"Austria\", continent: \"Europe\" },\n { code: \"az\", value: \"azerbaijan\", label: \"Azerbaijan\", continent: \"Asia\" },\n {\n code: \"bs\",\n value: \"bahamas\",\n label: \"Bahamas\",\n continent: \"North America\",\n },\n { code: \"bh\", value: \"bahrain\", label: \"Bahrain\", continent: \"Asia\" },\n { code: \"bd\", value: \"bangladesh\", label: \"Bangladesh\", continent: \"Asia\" },\n {\n code: \"bb\",\n value: \"barbados\",\n label: \"Barbados\",\n continent: \"North America\",\n },\n { code: \"by\", value: \"belarus\", label: \"Belarus\", continent: \"Europe\" },\n { code: \"be\", value: \"belgium\", label: \"Belgium\", continent: \"Europe\" },\n { code: \"bz\", value: \"belize\", label: \"Belize\", continent: \"North America\" },\n { code: \"bj\", value: \"benin\", label: \"Benin\", continent: \"Africa\" },\n { code: \"bt\", value: \"bhutan\", label: \"Bhutan\", continent: \"Asia\" },\n {\n code: \"bo\",\n value: \"bolivia\",\n label: \"Bolivia\",\n continent: \"South America\",\n },\n {\n code: \"ba\",\n value: \"bosnia-and-herzegovina\",\n label: \"Bosnia and Herzegovina\",\n continent: \"Europe\",\n },\n { code: \"bw\", value: \"botswana\", label: \"Botswana\", continent: \"Africa\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"bn\", value: \"brunei\", label: \"Brunei\", continent: \"Asia\" },\n { code: \"bg\", value: \"bulgaria\", label: \"Bulgaria\", continent: \"Europe\" },\n {\n code: \"bf\",\n value: \"burkina-faso\",\n label: \"Burkina Faso\",\n continent: \"Africa\",\n },\n { code: \"bi\", value: \"burundi\", label: \"Burundi\", continent: \"Africa\" },\n { code: \"kh\", value: \"cambodia\", label: \"Cambodia\", continent: \"Asia\" },\n { code: \"cm\", value: \"cameroon\", label: \"Cameroon\", continent: \"Africa\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North America\" },\n { code: \"cv\", value: \"cape-verde\", label: \"Cape Verde\", continent: \"Africa\" },\n {\n code: \"cf\",\n value: \"central-african-republic\",\n label: \"Central African Republic\",\n continent: \"Africa\",\n },\n { code: \"td\", value: \"chad\", label: \"Chad\", continent: \"Africa\" },\n { code: \"cl\", value: \"chile\", label: \"Chile\", continent: \"South America\" },\n { code: \"cn\", value: \"china\", label: \"China\", continent: \"Asia\" },\n {\n code: \"co\",\n value: \"colombia\",\n label: \"Colombia\",\n continent: \"South America\",\n },\n { code: \"km\", value: \"comoros\", label: \"Comoros\", continent: \"Africa\" },\n { code: \"cg\", value: \"congo\", label: \"Congo\", continent: \"Africa\" },\n {\n code: \"cr\",\n value: \"costa-rica\",\n label: \"Costa Rica\",\n continent: \"North America\",\n },\n { code: \"hr\", value: \"croatia\", label: \"Croatia\", continent: \"Europe\" },\n { code: \"cu\", value: \"cuba\", label: \"Cuba\", continent: \"North America\" },\n { code: \"cy\", value: \"cyprus\", label: \"Cyprus\", continent: \"Asia\" },\n {\n code: \"cz\",\n value: \"czech-republic\",\n label: \"Czech Republic\",\n continent: \"Europe\",\n },\n { code: \"dk\", value: \"denmark\", label: \"Denmark\", continent: \"Europe\" },\n { code: \"dj\", value: \"djibouti\", label: \"Djibouti\", continent: \"Africa\" },\n {\n code: \"dm\",\n value: \"dominica\",\n label: \"Dominica\",\n continent: \"North America\",\n },\n {\n code: \"do\",\n value: \"dominican-republic\",\n label: \"Dominican Republic\",\n continent: \"North America\",\n },\n {\n code: \"ec\",\n value: \"ecuador\",\n label: \"Ecuador\",\n continent: \"South America\",\n },\n { code: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n {\n code: \"sv\",\n value: \"el-salvador\",\n label: \"El Salvador\",\n continent: \"North America\",\n },\n {\n code: \"gq\",\n value: \"equatorial-guinea\",\n label: \"Equatorial Guinea\",\n continent: \"Africa\",\n },\n { code: \"er\", value: \"eritrea\", label: \"Eritrea\", continent: \"Africa\" },\n { code: \"ee\", value: \"estonia\", label: \"Estonia\", continent: \"Europe\" },\n { code: \"et\", value: \"ethiopia\", label: \"Ethiopia\", continent: \"Africa\" },\n { code: \"fj\", value: \"fiji\", label: \"Fiji\", continent: \"Oceania\" },\n { code: \"fi\", value: \"finland\", label: \"Finland\", continent: \"Europe\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"ga\", value: \"gabon\", label: \"Gabon\", continent: \"Africa\" },\n { code: \"gm\", value: \"gambia\", label: \"Gambia\", continent: \"Africa\" },\n { code: \"ge\", value: \"georgia\", label: \"Georgia\", continent: \"Asia\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"gh\", value: \"ghana\", label: \"Ghana\", continent: \"Africa\" },\n { code: \"gr\", value: \"greece\", label: \"Greece\", continent: \"Europe\" },\n {\n code: \"gd\",\n value: \"grenada\",\n label: \"Grenada\",\n continent: \"North America\",\n },\n {\n code: \"gt\",\n value: \"guatemala\",\n label: \"Guatemala\",\n continent: \"North America\",\n },\n { code: \"gn\", value: \"guinea\", label: \"Guinea\", continent: \"Africa\" },\n {\n code: \"gw\",\n value: \"guinea-bissau\",\n label: \"Guinea-Bissau\",\n continent: \"Africa\",\n },\n { code: \"gy\", value: \"guyana\", label: \"Guyana\", continent: \"South America\" },\n { code: \"ht\", value: \"haiti\", label: \"Haiti\", continent: \"North America\" },\n {\n code: \"hn\",\n value: \"honduras\",\n label: \"Honduras\",\n continent: \"North America\",\n },\n { code: \"hu\", value: \"hungary\", label: \"Hungary\", continent: \"Europe\" },\n { code: \"is\", value: \"iceland\", label: \"Iceland\", continent: \"Europe\" },\n { code: \"in\", value: \"india\", label: \"India\", continent: \"Asia\" },\n { code: \"id\", value: \"indonesia\", label: \"Indonesia\", continent: \"Asia\" },\n { code: \"ir\", value: \"iran\", label: \"Iran\", continent: \"Asia\" },\n { code: \"iq\", value: \"iraq\", label: \"Iraq\", continent: \"Asia\" },\n { code: \"ie\", value: \"ireland\", label: \"Ireland\", continent: \"Europe\" },\n { code: \"il\", value: \"israel\", label: \"Israel\", continent: \"Asia\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n {\n code: \"jm\",\n value: \"jamaica\",\n label: \"Jamaica\",\n continent: \"North America\",\n },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"jo\", value: \"jordan\", label: \"Jordan\", continent: \"Asia\" },\n { code: \"kz\", value: \"kazakhstan\", label: \"Kazakhstan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"kw\", value: \"kuwait\", label: \"Kuwait\", continent: \"Asia\" },\n { code: \"kg\", value: \"kyrgyzstan\", label: \"Kyrgyzstan\", continent: \"Asia\" },\n { code: \"la\", value: \"laos\", label: \"Laos\", continent: \"Asia\" },\n { code: \"lv\", value: \"latvia\", label: \"Latvia\", continent: \"Europe\" },\n { code: \"lb\", value: \"lebanon\", label: \"Lebanon\", continent: \"Asia\" },\n { code: \"ls\", value: \"lesotho\", label: \"Lesotho\", continent: \"Africa\" },\n { code: \"lr\", value: \"liberia\", label: \"Liberia\", continent: \"Africa\" },\n { code: \"ly\", value: \"libya\", label: \"Libya\", continent: \"Africa\" },\n {\n code: \"li\",\n value: \"liechtenstein\",\n label: \"Liechtenstein\",\n continent: \"Europe\",\n },\n { code: \"lt\", value: \"lithuania\", label: \"Lithuania\", continent: \"Europe\" },\n { code: \"lu\", value: \"luxembourg\", label: \"Luxembourg\", continent: \"Europe\" },\n { code: \"mg\", value: \"madagascar\", label: \"Madagascar\", continent: \"Africa\" },\n { code: \"mw\", value: \"malawi\", label: \"Malawi\", continent: \"Africa\" },\n { code: \"my\", value: \"malaysia\", label: \"Malaysia\", continent: \"Asia\" },\n { code: \"mv\", value: \"maldives\", label: \"Maldives\", continent: \"Asia\" },\n { code: \"ml\", value: \"mali\", label: \"Mali\", continent: \"Africa\" },\n { code: \"mt\", value: \"malta\", label: \"Malta\", continent: \"Europe\" },\n {\n code: \"mh\",\n value: \"marshall-islands\",\n label: \"Marshall Islands\",\n continent: \"Oceania\",\n },\n { code: \"mr\", value: \"mauritania\", label: \"Mauritania\", continent: \"Africa\" },\n { code: \"mu\", value: \"mauritius\", label: \"Mauritius\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"fm\",\n value: \"micronesia\",\n label: \"Micronesia\",\n continent: \"Oceania\",\n },\n { code: \"md\", value: \"moldova\", label: \"Moldova\", continent: \"Europe\" },\n { code: \"mc\", value: \"monaco\", label: \"Monaco\", continent: \"Europe\" },\n { code: \"mn\", value: \"mongolia\", label: \"Mongolia\", continent: \"Asia\" },\n { code: \"me\", value: \"montenegro\", label: \"Montenegro\", continent: \"Europe\" },\n { code: \"ma\", value: \"morocco\", label: \"Morocco\", continent: \"Africa\" },\n { code: \"mz\", value: \"mozambique\", label: \"Mozambique\", continent: \"Africa\" },\n { code: \"mm\", value: \"myanmar\", label: \"Myanmar\", continent: \"Asia\" },\n { code: \"na\", value: \"namibia\", label: \"Namibia\", continent: \"Africa\" },\n { code: \"nr\", value: \"nauru\", label: \"Nauru\", continent: \"Oceania\" },\n { code: \"np\", value: \"nepal\", label: \"Nepal\", continent: \"Asia\" },\n {\n code: \"nl\",\n value: \"netherlands\",\n label: \"Netherlands\",\n continent: \"Europe\",\n },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n {\n code: \"ni\",\n value: \"nicaragua\",\n label: \"Nicaragua\",\n continent: \"North America\",\n },\n { code: \"ne\", value: \"niger\", label: \"Niger\", continent: \"Africa\" },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", continent: \"Africa\" },\n { code: \"kp\", value: \"north-korea\", label: \"North Korea\", continent: \"Asia\" },\n {\n code: \"mk\",\n value: \"north-macedonia\",\n label: \"North Macedonia\",\n continent: \"Europe\",\n },\n { code: \"no\", value: \"norway\", label: \"Norway\", continent: \"Europe\" },\n { code: \"om\", value: \"oman\", label: \"Oman\", continent: \"Asia\" },\n { code: \"pk\", value: \"pakistan\", label: \"Pakistan\", continent: \"Asia\" },\n { code: \"pw\", value: \"palau\", label: \"Palau\", continent: \"Oceania\" },\n { code: \"ps\", value: \"palestine\", label: \"Palestine\", continent: \"Asia\" },\n { code: \"pa\", value: \"panama\", label: \"Panama\", continent: \"North America\" },\n {\n code: \"pg\",\n value: \"papua-new-guinea\",\n label: \"Papua New Guinea\",\n continent: \"Oceania\",\n },\n {\n code: \"py\",\n value: \"paraguay\",\n label: \"Paraguay\",\n continent: \"South America\",\n },\n { code: \"pe\", value: \"peru\", label: \"Peru\", continent: \"South America\" },\n { code: \"ph\", value: \"philippines\", label: \"Philippines\", continent: \"Asia\" },\n { code: \"pl\", value: \"poland\", label: \"Poland\", continent: \"Europe\" },\n { code: \"pt\", value: \"portugal\", label: \"Portugal\", continent: \"Europe\" },\n { code: \"qa\", value: \"qatar\", label: \"Qatar\", continent: \"Asia\" },\n { code: \"ro\", value: \"romania\", label: \"Romania\", continent: \"Europe\" },\n { code: \"ru\", value: \"russia\", label: \"Russia\", continent: \"Europe\" },\n { code: \"rw\", value: \"rwanda\", label: \"Rwanda\", continent: \"Africa\" },\n { code: \"ws\", value: \"samoa\", label: \"Samoa\", continent: \"Oceania\" },\n { code: \"sm\", value: \"san-marino\", label: \"San Marino\", continent: \"Europe\" },\n {\n code: \"sa\",\n value: \"saudi-arabia\",\n label: \"Saudi Arabia\",\n continent: \"Asia\",\n },\n { code: \"sn\", value: \"senegal\", label: \"Senegal\", continent: \"Africa\" },\n { code: \"rs\", value: \"serbia\", label: \"Serbia\", continent: \"Europe\" },\n { code: \"sc\", value: \"seychelles\", label: \"Seychelles\", continent: \"Africa\" },\n {\n code: \"sl\",\n value: \"sierra-leone\",\n label: \"Sierra Leone\",\n continent: \"Africa\",\n },\n { code: \"sg\", value: \"singapore\", label: \"Singapore\", continent: \"Asia\" },\n { code: \"sk\", value: \"slovakia\", label: \"Slovakia\", continent: \"Europe\" },\n { code: \"si\", value: \"slovenia\", label: \"Slovenia\", continent: \"Europe\" },\n {\n code: \"sb\",\n value: \"solomon-islands\",\n label: \"Solomon Islands\",\n continent: \"Oceania\",\n },\n { code: \"so\", value: \"somalia\", label: \"Somalia\", continent: \"Africa\" },\n {\n code: \"za\",\n value: \"south-africa\",\n label: \"South Africa\",\n continent: \"Africa\",\n },\n { code: \"kr\", value: \"south-korea\", label: \"South Korea\", continent: \"Asia\" },\n {\n code: \"ss\",\n value: \"south-sudan\",\n label: \"South Sudan\",\n continent: \"Africa\",\n },\n { code: \"es\", value: \"spain\", label: \"Spain\", continent: \"Europe\" },\n { code: \"lk\", value: \"sri-lanka\", label: \"Sri Lanka\", continent: \"Asia\" },\n { code: \"sd\", value: \"sudan\", label: \"Sudan\", continent: \"Africa\" },\n {\n code: \"sr\",\n value: \"suriname\",\n label: \"Suriname\",\n continent: \"South America\",\n },\n { code: \"se\", value: \"sweden\", label: \"Sweden\", continent: \"Europe\" },\n {\n code: \"ch\",\n value: \"switzerland\",\n label: \"Switzerland\",\n continent: \"Europe\",\n },\n { code: \"sy\", value: \"syria\", label: \"Syria\", continent: \"Asia\" },\n { code: \"tw\", value: \"taiwan\", label: \"Taiwan\", continent: \"Asia\" },\n { code: \"tj\", value: \"tajikistan\", label: \"Tajikistan\", continent: \"Asia\" },\n { code: \"tz\", value: \"tanzania\", label: \"Tanzania\", continent: \"Africa\" },\n { code: \"th\", value: \"thailand\", label: \"Thailand\", continent: \"Asia\" },\n { code: \"tl\", value: \"timor-leste\", label: \"Timor-Leste\", continent: \"Asia\" },\n { code: \"tg\", value: \"togo\", label: \"Togo\", continent: \"Africa\" },\n { code: \"to\", value: \"tonga\", label: \"Tonga\", continent: \"Oceania\" },\n {\n code: \"tt\",\n value: \"trinidad-and-tobago\",\n label: \"Trinidad and Tobago\",\n continent: \"North America\",\n },\n { code: \"tn\", value: \"tunisia\", label: \"Tunisia\", continent: \"Africa\" },\n { code: \"tr\", value: \"turkey\", label: \"Turkey\", continent: \"Asia\" },\n {\n code: \"tm\",\n value: \"turkmenistan\",\n label: \"Turkmenistan\",\n continent: \"Asia\",\n },\n { code: \"tv\", value: \"tuvalu\", label: \"Tuvalu\", continent: \"Oceania\" },\n { code: \"ug\", value: \"uganda\", label: \"Uganda\", continent: \"Africa\" },\n { code: \"ua\", value: \"ukraine\", label: \"Ukraine\", continent: \"Europe\" },\n {\n code: \"ae\",\n value: \"united-arab-emirates\",\n label: \"United Arab Emirates\",\n continent: \"Asia\",\n },\n {\n code: \"gb\",\n value: \"united-kingdom\",\n label: \"United Kingdom\",\n continent: \"Europe\",\n },\n {\n code: \"us\",\n value: \"united-states\",\n label: \"United States\",\n continent: \"North America\",\n },\n {\n code: \"uy\",\n value: \"uruguay\",\n label: \"Uruguay\",\n continent: \"South America\",\n },\n { code: \"uz\", value: \"uzbekistan\", label: \"Uzbekistan\", continent: \"Asia\" },\n { code: \"vu\", value: \"vanuatu\", label: \"Vanuatu\", continent: \"Oceania\" },\n {\n code: \"va\",\n value: \"vatican-city\",\n label: \"Vatican City\",\n continent: \"Europe\",\n },\n {\n code: \"ve\",\n value: \"venezuela\",\n label: \"Venezuela\",\n continent: \"South America\",\n },\n { code: \"vn\", value: \"vietnam\", label: \"Vietnam\", continent: \"Asia\" },\n { code: \"ye\", value: \"yemen\", label: \"Yemen\", continent: \"Asia\" },\n { code: \"zm\", value: \"zambia\", label: \"Zambia\", continent: \"Africa\" },\n { code: \"zw\", value: \"zimbabwe\", label: \"Zimbabwe\", continent: \"Africa\" },\n]\n\nconst timezones = [\n {\n value: \"Americas\",\n items: [\n \"(GMT-5) New York\",\n \"(GMT-8) Los Angeles\",\n \"(GMT-6) Chicago\",\n \"(GMT-5) Toronto\",\n \"(GMT-8) Vancouver\",\n \"(GMT-3) São Paulo\",\n ],\n },\n {\n value: \"Europe\",\n items: [\n \"(GMT+0) London\",\n \"(GMT+1) Paris\",\n \"(GMT+1) Berlin\",\n \"(GMT+1) Rome\",\n \"(GMT+1) Madrid\",\n \"(GMT+1) Amsterdam\",\n ],\n },\n {\n value: \"Asia/Pacific\",\n items: [\n \"(GMT+9) Tokyo\",\n \"(GMT+8) Shanghai\",\n \"(GMT+8) Singapore\",\n \"(GMT+4) Dubai\",\n \"(GMT+11) Sydney\",\n \"(GMT+9) Seoul\",\n ],\n },\n] as const\n\nfunction ComboboxBasic() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxDisabled() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxInvalid() {\n return (\n \n
\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n Framework\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n Please select a valid framework.\n \n \n
\n
\n )\n}\n\nfunction ComboboxWithClear() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithGroups() {\n return (\n \n \n \n \n No timezones found.\n \n {(group) => (\n \n {group.value}\n \n {(item) => (\n \n {item}\n \n )}\n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithGroupsAndSeparator() {\n return (\n \n \n \n \n No timezones found.\n \n {(group) => (\n \n {group.value}\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithForm() {\n const handleSubmit = (event: React.FormEvent) => {\n event.preventDefault()\n const formData = new FormData(event.target as HTMLFormElement)\n const framework = formData.get(\"framework\") as string\n toast(`You selected ${framework} as your framework.`)\n }\n\n return (\n \n \n \n \n \n \n Framework\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nconst largeListItems = Array.from({ length: 100 }, (_, i) => `Item ${i + 1}`)\n\nfunction ComboboxLargeList() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxAutoHighlight() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboxboxInputAddon() {\n return (\n \n \n \n \n \n \n \n \n No timezones found.\n \n {(group) => (\n \n {group.value}\n \n {(item) => (\n \n {item}\n \n )}\n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxInPopup() {\n return (\n \n \n \n }\n >\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item.label}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxMultiple() {\n const anchor = useComboboxAnchor()\n\n return (\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxMultipleDisabled() {\n const anchor = useComboboxAnchor()\n\n return (\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxMultipleInvalid() {\n const anchor1 = useComboboxAnchor()\n const anchor2 = useComboboxAnchor()\n\n return (\n \n
\n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n Frameworks\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n {value}\n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n Please select at least one framework.\n \n \n \n
\n
\n )\n}\n\nfunction ComboboxMultipleNoRemove() {\n const anchor = useComboboxAnchor()\n\n return (\n \n \n \n \n {(values) => (\n \n {values.map((value: string) => (\n \n {value}\n \n ))}\n \n \n )}\n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxWithCustomItems() {\n return (\n \n country.code !== \"\")}\n itemToStringValue={(country: (typeof countries)[number]) =>\n country.label\n }\n >\n \n \n No countries found.\n \n {(country) => (\n \n \n \n \n {country.label}\n \n \n {country.continent} ({country.code})\n \n \n \n \n )}\n \n \n \n \n )\n}\n\nfunction ComboboxInDialog() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n }>\n Open Dialog\n \n \n \n Select Framework\n \n Choose your preferred framework from the list below.\n \n \n \n \n Framework\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n setOpen(false)}\n >\n Cancel\n \n {\n toast(\"Framework selected.\")\n setOpen(false)\n }}\n >\n Confirm\n \n \n \n \n \n )\n}\n\nconst items = [\n {\n label: \"Select a framework\",\n value: null,\n },\n {\n label: \"React\",\n value: \"react\",\n },\n {\n label: \"Vue\",\n value: \"vue\",\n },\n {\n label: \"Angular\",\n value: \"angular\",\n },\n {\n label: \"Svelte\",\n value: \"svelte\",\n },\n {\n label: \"Solid\",\n value: \"solid\",\n },\n {\n label: \"Preact\",\n value: \"preact\",\n },\n {\n label: \"Next.js\",\n value: \"next.js\",\n },\n]\n\nfunction ComboboxWithOtherInputs() {\n return (\n \n \n \n \n No items found.\n \n {(item) => (\n \n {item}\n \n )}\n \n \n \n \n \n Select a framework\n \n \n \n \n \n \n \n \n \n \n )\n}\n", "type": "registry:example" } ], diff --git a/apps/v4/public/r/styles/base-lyra/combobox.json b/apps/v4/public/r/styles/base-lyra/combobox.json index dcf6bf7364..63851fa9b3 100644 --- a/apps/v4/public/r/styles/base-lyra/combobox.json +++ b/apps/v4/public/r/styles/base-lyra/combobox.json @@ -11,7 +11,7 @@ "files": [ { "path": "registry/base-lyra/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/bases/base/lib/utils\"\nimport { Button } from \"@/registry/bases/base/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/registry/bases/base/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\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