From 4baa9e9dfaeb2c9a7f0555ed7b4151780c9e01d9 Mon Sep 17 00:00:00 2001 From: stabldev <114811070+stabldev@users.noreply.github.com> Date: Fri, 1 May 2026 10:28:43 +0530 Subject: [PATCH 1/3] feat: add AGENTS.md file with instructions --- AGENTS.md | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e7c0ce2 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,149 @@ +# AGENTS.md + +## Project + +This repo is `headcn/ui`: a shadcn-inspired React UI component system built on top of `@headlessui/react`. + +The goal is to provide: + +- copyable, editable components +- shadcn-like CLI + registry architecture +- `components.json` support +- Tailwind-first styling +- accessible behavior powered by Headless UI + +Headless UI is unstyled and exposes state through render props/data attributes, so components in this repo must provide the visual/styling layer while preserving Headless UI accessibility behavior. + +## Current component coverage + +Implemented: + +- Button +- Checkbox +- Combobox +- Fieldset +- Input +- Listbox +- Radio Group +- Textarea + +Missing / planned: + +- Dropdown Menu +- Disclosure +- Dialog +- Popover +- Tabs +- Transition +- Select +- Switch + +Use Headless UI React docs as the source of truth for APIs and accessibility behavior. + +## Design principles + +1. Follow shadcn-style architecture. + - Components are copied into user apps, not hidden inside an opaque package. + - Code should be readable, editable, and idiomatic. + - Prefer composition over configuration-heavy APIs. + +2. Use Headless UI primitives. + - Import primitives from `@headlessui/react`. + - Do not replace Headless UI behavior with custom keyboard/focus logic unless absolutely necessary. + - Preserve accessibility semantics. + +3. Tailwind-first styling. + - Use Tailwind classes. + - Use `cn(...)` for className merging. + - Support user-provided `className`. + - Prefer Headless UI `data-*` attributes for state styling. + +4. Match existing repo conventions. + - Before adding a component, inspect nearby implemented components. + - Follow existing file names, exports, class patterns, registry format, docs format, and tests. + +## Component rules + +When creating or editing a component: + +- Use TypeScript. +- Use React `forwardRef` where appropriate. +- Export all public subcomponents. +- Preserve native props where possible. +- Keep APIs close to Headless UI naming unless the repo already has a different convention. +- Add `"use client"` when the component requires client interactivity. +- Do not over-abstract. +- Do not introduce new dependencies unless clearly justified. +- Do not hardcode app-specific copy, icons, routes, or business logic. +- Use accessible defaults. +- Ensure keyboard interaction is delegated to Headless UI. + +## Styling rules + +- Use `cn()` for conditional class names. +- Keep default styling consistent with existing components. +- Use `data-[state]`, `data-focus`, `data-hover`, `data-open`, `data-checked`, `data-disabled`, etc. where Headless UI exposes them. +- Do not use Radix-specific attributes like `data-state="open"` unless this repo already maps them intentionally. +- Avoid global CSS unless the component pattern requires it. +- Do not add animation libraries for basic transitions. + +## Registry / CLI rules + +When adding a component, update every required registry/CLI artifact used by the repo. + +Likely files to inspect: + +- registry files +- component metadata +- CLI add/init logic +- docs navigation +- examples +- package exports +- tests + +The component should be installable through the same path as existing components. + +## Quality checklist + +Before finishing a task, verify: + +- Typecheck passes. +- Lint passes. +- Build passes. +- Component exports are correct. +- Registry entry exists. +- Docs/example exists. +- Component works with keyboard navigation. +- `className` overrides work. +- Disabled/error/focus/open/checked states are styled where relevant. +- No Radix imports were added. + +## Commands + +Use the repo’s package manager. Detect it from lockfiles. + +Common commands to try: + +- `pnpm install` +- `pnpm lint` +- `pnpm typecheck` +- `pnpm build` +- `pnpm test` + +Do not invent scripts. Check `package.json` first. + +## Pull request expectations + +Every component PR should include: + +- component implementation +- registry metadata +- docs/example +- export updates +- validation notes + +Use concise PR summaries: + +- What component was added/changed +- Which Headless UI primitives it wraps +- Which commands passed From f5babdaf841749ad8e38a29ab3ffa621759ce634 Mon Sep 17 00:00:00 2001 From: stabldev <114811070+stabldev@users.noreply.github.com> Date: Fri, 1 May 2026 12:54:55 +0530 Subject: [PATCH 2/3] feat(www): switch component docs --- apps/www/content/docs/components/switch.mdx | 31 +++++++++++++++++++ apps/www/public/r/components/button-demo.json | 2 +- .../r/components/button-destructive.json | 2 +- .../www/public/r/components/button-ghost.json | 2 +- apps/www/public/r/components/button-icon.json | 2 +- apps/www/public/r/components/button-link.json | 2 +- .../public/r/components/button-secondary.json | 2 +- .../public/r/components/button-with-icon.json | 2 +- apps/www/public/r/components/button.json | 2 +- .../public/r/components/checkbox-demo.json | 2 +- apps/www/public/r/components/checkbox.json | 2 +- .../public/r/components/combobox-demo.json | 2 +- apps/www/public/r/components/combobox.json | 2 +- apps/www/public/r/components/description.json | 2 +- apps/www/public/r/components/field.json | 2 +- .../public/r/components/fieldset-demo.json | 2 +- apps/www/public/r/components/fieldset.json | 2 +- apps/www/public/r/components/input-demo.json | 2 +- .../public/r/components/input-disabled.json | 2 +- .../r/components/input-with-button.json | 2 +- .../public/r/components/input-with-label.json | 2 +- apps/www/public/r/components/input.json | 2 +- apps/www/public/r/components/label.json | 2 +- apps/www/public/r/components/legend.json | 2 +- .../www/public/r/components/listbox-demo.json | 2 +- apps/www/public/r/components/listbox.json | 2 +- .../public/r/components/radio-group-demo.json | 2 +- apps/www/public/r/components/radio-group.json | 2 +- apps/www/public/r/components/registry.json | 11 +++++++ apps/www/public/r/components/select.json | 2 +- apps/www/public/r/components/switch-demo.json | 12 +++++++ apps/www/public/r/components/switch.json | 2 +- .../public/r/components/textarea-demo.json | 2 +- .../r/components/textarea-disabled.json | 2 +- .../r/components/textarea-with-button.json | 2 +- .../r/components/textarea-with-label.json | 2 +- apps/www/public/r/components/textarea.json | 2 +- apps/www/public/r/components/utils.json | 2 +- apps/www/registry.json | 11 +++++++ apps/www/registry/__index__.tsx | 20 ++++++++++++ apps/www/registry/examples/switch-demo.tsx | 26 ++++++++++++++++ apps/www/registry/registry-examples.ts | 11 +++++++ apps/www/scripts/build-registry.mts | 3 +- 43 files changed, 159 insertions(+), 36 deletions(-) create mode 100644 apps/www/content/docs/components/switch.mdx create mode 100644 apps/www/public/r/components/switch-demo.json create mode 100644 apps/www/registry/examples/switch-demo.tsx diff --git a/apps/www/content/docs/components/switch.mdx b/apps/www/content/docs/components/switch.mdx new file mode 100644 index 0000000..15533b1 --- /dev/null +++ b/apps/www/content/docs/components/switch.mdx @@ -0,0 +1,31 @@ +--- +title: Switch +description: Switches are used to toggle between two states, usually representing on and off. +links: + doc: https://headlessui.com/react/switch + api: https://headlessui.com/react/switch#component-api +catetory: form +--- + + + +## Installation + + + +## Usage + +Switches are built using the `Switch` component. You can toggle your switch by clicking directly on the component, or by pressing the spacebar while it's focused. + +Toggling the switch calls the `onChange` function with a negated version of the `checked` value. + +```tsx +import { useState } from "react" +import { Switch } from "@/components/ui/switch" + +export default function Example() { + const [enabled, setEnabled] = useState(false) + + return +} +``` diff --git a/apps/www/public/r/components/button-demo.json b/apps/www/public/r/components/button-demo.json index b6730d6..5c73feb 100644 --- a/apps/www/public/r/components/button-demo.json +++ b/apps/www/public/r/components/button-demo.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/button-demo.tsx", - "content": "import { Button } from \"@/registry/ui/button\"\n\nexport default function ButtonDemo() {\n return \n}\n", + "content": "import { Button } from \"@/registry/ui/button\"\r\n\r\nexport default function ButtonDemo() {\r\n return \r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/button-destructive.json b/apps/www/public/r/components/button-destructive.json index 949e8d3..ca1ee3c 100644 --- a/apps/www/public/r/components/button-destructive.json +++ b/apps/www/public/r/components/button-destructive.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/button-destructive.tsx", - "content": "import { Button } from \"@/registry/ui/button\"\n\nexport default function ButtonDestructive() {\n return \n}\n", + "content": "import { Button } from \"@/registry/ui/button\"\r\n\r\nexport default function ButtonDestructive() {\r\n return \r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/button-ghost.json b/apps/www/public/r/components/button-ghost.json index 72e2f03..fb41dff 100644 --- a/apps/www/public/r/components/button-ghost.json +++ b/apps/www/public/r/components/button-ghost.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/button-ghost.tsx", - "content": "import { Button } from \"@/registry/ui/button\"\n\nexport default function ButtonGhost() {\n return \n}\n", + "content": "import { Button } from \"@/registry/ui/button\"\r\n\r\nexport default function ButtonGhost() {\r\n return \r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/button-icon.json b/apps/www/public/r/components/button-icon.json index f0e4538..cf90f86 100644 --- a/apps/www/public/r/components/button-icon.json +++ b/apps/www/public/r/components/button-icon.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/button-icon.tsx", - "content": "import { Button } from \"@/registry/ui/button\"\nimport { StarIcon } from \"@heroicons/react/16/solid\"\n\nexport default function ButtonIcon() {\n return (\n \n )\n}\n", + "content": "import { Button } from \"@/registry/ui/button\"\r\nimport { StarIcon } from \"@heroicons/react/16/solid\"\r\n\r\nexport default function ButtonIcon() {\r\n return (\r\n \r\n )\r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/button-link.json b/apps/www/public/r/components/button-link.json index 9361264..a89b174 100644 --- a/apps/www/public/r/components/button-link.json +++ b/apps/www/public/r/components/button-link.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/button-link.tsx", - "content": "import { Button } from \"@/registry/ui/button\"\n\nexport default function ButtonLink() {\n return \n}\n", + "content": "import { Button } from \"@/registry/ui/button\"\r\n\r\nexport default function ButtonLink() {\r\n return \r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/button-secondary.json b/apps/www/public/r/components/button-secondary.json index 4177ea2..52d01b7 100644 --- a/apps/www/public/r/components/button-secondary.json +++ b/apps/www/public/r/components/button-secondary.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/button-secondary.tsx", - "content": "import { Button } from \"@/registry/ui/button\"\n\nexport default function ButtonSecondary() {\n return \n}\n", + "content": "import { Button } from \"@/registry/ui/button\"\r\n\r\nexport default function ButtonSecondary() {\r\n return \r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/button-with-icon.json b/apps/www/public/r/components/button-with-icon.json index ee28b36..7f56cc2 100644 --- a/apps/www/public/r/components/button-with-icon.json +++ b/apps/www/public/r/components/button-with-icon.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/button-with-icon.tsx", - "content": "import { Button } from \"@/registry/ui/button\"\nimport { CloudArrowUpIcon } from \"@heroicons/react/16/solid\"\n\nexport default function ButtonWithIcon() {\n return (\n \n )\n}\n", + "content": "import { Button } from \"@/registry/ui/button\"\r\nimport { CloudArrowUpIcon } from \"@heroicons/react/16/solid\"\r\n\r\nexport default function ButtonWithIcon() {\r\n return (\r\n \r\n )\r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/button.json b/apps/www/public/r/components/button.json index 15809ea..4343d32 100644 --- a/apps/www/public/r/components/button.json +++ b/apps/www/public/r/components/button.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/ui/button.tsx", - "content": "import {\n Button as HeadlessButton,\n type ButtonProps as HeadlessButtonProps,\n} from \"@headlessui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center gap-1.5 rounded-md text-sm font-semibold whitespace-nowrap transition data-active:translate-y-0.5 data-disabled:pointer-events-none data-disabled:opacity-50\",\n {\n variants: {\n variant: {\n primary: \"bg-primary text-primary-foreground data-hover:bg-primary/90\",\n secondary:\n \"bg-secondary text-secondary-foreground data-hover:bg-secondary/90\",\n destructive:\n \"bg-destructive text-foreground data-hover:bg-destructive/90\",\n outline:\n \"bg-accent/50 text-accent-foreground data-hover:bg-accent border\",\n ghost: \"data-hover:bg-accent text-accent-foreground\",\n link: \"text-primary underline-offset-4 data-hover:underline\",\n },\n size: {\n xs: \"h-7 px-2.5 text-xs has-[>svg]:px-2\",\n sm: \"h-8 px-3 has-[>svg]:px-2.5\",\n md: \"h-9 px-4 has-[>svg]:px-3\",\n lg: \"h-10 px-5 has-[>svg]:px-4\",\n \"icon-xs\": \"size-7\",\n \"icon-sm\": \"size-8\",\n \"icon-md\": \"size-9\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n }\n)\n\nfunction Button({\n children,\n className,\n variant,\n size,\n ...props\n}: HeadlessButtonProps & VariantProps) {\n return (\n \n {children}\n \n )\n}\n\nexport { Button, buttonVariants }\n", + "content": "import {\r\n Button as HeadlessButton,\r\n type ButtonProps as HeadlessButtonProps,\r\n} from \"@headlessui/react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst buttonVariants = cva(\r\n \"inline-flex shrink-0 items-center justify-center gap-1.5 rounded-md text-sm font-semibold whitespace-nowrap transition data-active:translate-y-0.5 data-disabled:pointer-events-none data-disabled:opacity-50\",\r\n {\r\n variants: {\r\n variant: {\r\n primary: \"bg-primary text-primary-foreground data-hover:bg-primary/90\",\r\n secondary:\r\n \"bg-secondary text-secondary-foreground data-hover:bg-secondary/90\",\r\n destructive:\r\n \"bg-destructive text-foreground data-hover:bg-destructive/90\",\r\n outline:\r\n \"bg-accent/50 text-accent-foreground data-hover:bg-accent border\",\r\n ghost: \"data-hover:bg-accent text-accent-foreground\",\r\n link: \"text-primary underline-offset-4 data-hover:underline\",\r\n },\r\n size: {\r\n xs: \"h-7 px-2.5 text-xs has-[>svg]:px-2\",\r\n sm: \"h-8 px-3 has-[>svg]:px-2.5\",\r\n md: \"h-9 px-4 has-[>svg]:px-3\",\r\n lg: \"h-10 px-5 has-[>svg]:px-4\",\r\n \"icon-xs\": \"size-7\",\r\n \"icon-sm\": \"size-8\",\r\n \"icon-md\": \"size-9\",\r\n \"icon-lg\": \"size-10\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"primary\",\r\n size: \"md\",\r\n },\r\n }\r\n)\r\n\r\nfunction Button({\r\n children,\r\n className,\r\n variant,\r\n size,\r\n ...props\r\n}: HeadlessButtonProps & VariantProps) {\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport { Button, buttonVariants }\r\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/components/checkbox-demo.json b/apps/www/public/r/components/checkbox-demo.json index b5c4b4a..5709e0d 100644 --- a/apps/www/public/r/components/checkbox-demo.json +++ b/apps/www/public/r/components/checkbox-demo.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/checkbox-demo.tsx", - "content": "import { Checkbox } from \"@/registry/ui/checkbox\"\nimport { Description } from \"@/registry/ui/description\"\nimport { Field } from \"@/registry/ui/field\"\nimport { Label } from \"@/registry/ui/label\"\n\nexport default function CheckboxDemo() {\n return (\n
\n \n \n \n \n \n \n
\n \n \n This will give you early access to new features we're\n developing.\n \n
\n
\n \n \n \n \n \n \n \n
\n )\n}\n", + "content": "import { Checkbox } from \"@/registry/ui/checkbox\"\r\nimport { Description } from \"@/registry/ui/description\"\r\nimport { Field } from \"@/registry/ui/field\"\r\nimport { Label } from \"@/registry/ui/label\"\r\n\r\nexport default function CheckboxDemo() {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n This will give you early access to new features we're\r\n developing.\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )\r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/checkbox.json b/apps/www/public/r/components/checkbox.json index 499eeca..0dbdd7d 100644 --- a/apps/www/public/r/components/checkbox.json +++ b/apps/www/public/r/components/checkbox.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/ui/checkbox.tsx", - "content": "import {\n Checkbox as HeadlessCheckbox,\n type CheckboxProps as HeadlessCheckboxProps,\n} from \"@headlessui/react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Checkbox({ className, ...props }: HeadlessCheckboxProps) {\n return (\n \n \n \n \n \n )\n}\n\nexport { Checkbox }\n", + "content": "import {\r\n Checkbox as HeadlessCheckbox,\r\n type CheckboxProps as HeadlessCheckboxProps,\r\n} from \"@headlessui/react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nfunction Checkbox({ className, ...props }: HeadlessCheckboxProps) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport { Checkbox }\r\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/components/combobox-demo.json b/apps/www/public/r/components/combobox-demo.json index 32cf013..2dc258d 100644 --- a/apps/www/public/r/components/combobox-demo.json +++ b/apps/www/public/r/components/combobox-demo.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/combobox-demo.tsx", - "content": "\"use client\"\n\nimport {\n Combobox,\n ComboboxButton,\n ComboboxInput,\n ComboboxOption,\n ComboboxOptions,\n} from \"@/registry/ui/combobox\"\nimport { CheckIcon, ChevronDownIcon } from \"@heroicons/react/20/solid\"\nimport { useState } from \"react\"\n\ninterface Person {\n id: number\n name: string\n}\n\nconst people: Person[] = [\n { id: 1, name: \"Tom Cook\" },\n { id: 2, name: \"Wade Cooper\" },\n { id: 3, name: \"Tanya Fox\" },\n]\n\nexport default function ComboboxDemo() {\n const [query, setQuery] = useState(\"\")\n const [selected, setSelected] = useState(people[0].id)\n\n const selectedPerson = people.find((p) => p.id === selected)\n const filteredPeople =\n query === \"\"\n ? people\n : people.filter((person) => {\n return person.name.toLowerCase().includes(query.toLowerCase())\n })\n\n return (\n \n value={selectedPerson}\n onChange={(value) => value && setSelected(value.id)}\n onClose={() => setQuery(\"\")}\n __demoMode\n >\n
\n \n displayValue={(person) => person.name}\n onChange={(event) => setQuery(event.target.value)}\n />\n \n \n \n
\n\n \n {filteredPeople.map((person) => (\n key={person.id} value={person}>\n
{person.name}
\n \n \n ))}\n
\n \n )\n}\n", + "content": "\"use client\"\r\n\r\nimport {\r\n Combobox,\r\n ComboboxButton,\r\n ComboboxInput,\r\n ComboboxOption,\r\n ComboboxOptions,\r\n} from \"@/registry/ui/combobox\"\r\nimport { CheckIcon, ChevronDownIcon } from \"@heroicons/react/20/solid\"\r\nimport { useState } from \"react\"\r\n\r\ninterface Person {\r\n id: number\r\n name: string\r\n}\r\n\r\nconst people: Person[] = [\r\n { id: 1, name: \"Tom Cook\" },\r\n { id: 2, name: \"Wade Cooper\" },\r\n { id: 3, name: \"Tanya Fox\" },\r\n]\r\n\r\nexport default function ComboboxDemo() {\r\n const [query, setQuery] = useState(\"\")\r\n const [selected, setSelected] = useState(people[0].id)\r\n\r\n const selectedPerson = people.find((p) => p.id === selected)\r\n const filteredPeople =\r\n query === \"\"\r\n ? people\r\n : people.filter((person) => {\r\n return person.name.toLowerCase().includes(query.toLowerCase())\r\n })\r\n\r\n return (\r\n \r\n value={selectedPerson}\r\n onChange={(value) => value && setSelected(value.id)}\r\n onClose={() => setQuery(\"\")}\r\n __demoMode\r\n >\r\n
\r\n \r\n displayValue={(person) => person.name}\r\n onChange={(event) => setQuery(event.target.value)}\r\n />\r\n \r\n \r\n \r\n
\r\n\r\n \r\n {filteredPeople.map((person) => (\r\n key={person.id} value={person}>\r\n
{person.name}
\r\n \r\n \r\n ))}\r\n
\r\n \r\n )\r\n}\r\n", "type": "registry:example" } ] diff --git a/apps/www/public/r/components/combobox.json b/apps/www/public/r/components/combobox.json index 7bb0c26..d903c36 100644 --- a/apps/www/public/r/components/combobox.json +++ b/apps/www/public/r/components/combobox.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/ui/combobox.tsx", - "content": "import {\n Combobox as HeadlessCombobox,\n ComboboxButton as HeadlessComboboxButton,\n ComboboxInput as HeadlessComboboxInput,\n ComboboxOption as HeadlessComboboxOption,\n ComboboxOptions as HeadlessComboboxOptions,\n type ComboboxButtonProps as HeadlessComboboxButtonProps,\n type ComboboxInputProps as HeadlessComboboxInputProps,\n type ComboboxOptionProps as HeadlessComboboxOptionProps,\n type ComboboxOptionsProps as HeadlessComboboxOptionsProps,\n type ComboboxProps as HeadlessComboboxProps,\n} from \"@headlessui/react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Combobox<\n TValue = Array,\n TMultiple extends boolean | undefined = false,\n>(props: HeadlessComboboxProps) {\n return \n}\n\nfunction ComboboxButton({ className, ...props }: HeadlessComboboxButtonProps) {\n return (\n \n )\n}\n\nfunction ComboboxInput({\n className,\n ...props\n}: HeadlessComboboxInputProps) {\n return (\n \n )\n}\n\nfunction ComboboxOptions({\n className,\n ...props\n}: HeadlessComboboxOptionsProps) {\n return (\n \n )\n}\n\nfunction ComboboxOption({\n className,\n ...props\n}: HeadlessComboboxOptionProps) {\n return (\n \n )\n}\n\nexport {\n Combobox,\n ComboboxButton,\n ComboboxInput,\n ComboboxOption,\n ComboboxOptions,\n}\n", + "content": "import {\r\n Combobox as HeadlessCombobox,\r\n ComboboxButton as HeadlessComboboxButton,\r\n ComboboxInput as HeadlessComboboxInput,\r\n ComboboxOption as HeadlessComboboxOption,\r\n ComboboxOptions as HeadlessComboboxOptions,\r\n type ComboboxButtonProps as HeadlessComboboxButtonProps,\r\n type ComboboxInputProps as HeadlessComboboxInputProps,\r\n type ComboboxOptionProps as HeadlessComboboxOptionProps,\r\n type ComboboxOptionsProps as HeadlessComboboxOptionsProps,\r\n type ComboboxProps as HeadlessComboboxProps,\r\n} from \"@headlessui/react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nfunction Combobox<\r\n TValue = Array,\r\n TMultiple extends boolean | undefined = false,\r\n>(props: HeadlessComboboxProps) {\r\n return \r\n}\r\n\r\nfunction ComboboxButton({ className, ...props }: HeadlessComboboxButtonProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nfunction ComboboxInput({\r\n className,\r\n ...props\r\n}: HeadlessComboboxInputProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nfunction ComboboxOptions({\r\n className,\r\n ...props\r\n}: HeadlessComboboxOptionsProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nfunction ComboboxOption({\r\n className,\r\n ...props\r\n}: HeadlessComboboxOptionProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport {\r\n Combobox,\r\n ComboboxButton,\r\n ComboboxInput,\r\n ComboboxOption,\r\n ComboboxOptions,\r\n}\r\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/components/description.json b/apps/www/public/r/components/description.json index dea55ab..96466b0 100644 --- a/apps/www/public/r/components/description.json +++ b/apps/www/public/r/components/description.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/ui/description.tsx", - "content": "import {\n Description as HeadlessDescription,\n type DescriptionProps as HeadlessDescriptionProps,\n} from \"@headlessui/react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Description({ className, ...props }: HeadlessDescriptionProps) {\n return (\n \n )\n}\n\nexport { Description }\n", + "content": "import {\r\n Description as HeadlessDescription,\r\n type DescriptionProps as HeadlessDescriptionProps,\r\n} from \"@headlessui/react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nfunction Description({ className, ...props }: HeadlessDescriptionProps) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport { Description }\r\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/components/field.json b/apps/www/public/r/components/field.json index d4ae0cc..99466ec 100644 --- a/apps/www/public/r/components/field.json +++ b/apps/www/public/r/components/field.json @@ -4,7 +4,7 @@ "files": [ { "path": "registry/ui/field.tsx", - "content": "import {\n Field as HeadlessField,\n type FieldProps as HeadlessFieldProps,\n} from \"@headlessui/react\"\n\nfunction Field(props: HeadlessFieldProps) {\n return \n}\n\nexport { Field }\n", + "content": "import {\r\n Field as HeadlessField,\r\n type FieldProps as HeadlessFieldProps,\r\n} from \"@headlessui/react\"\r\n\r\nfunction Field(props: HeadlessFieldProps) {\r\n return \r\n}\r\n\r\nexport { Field }\r\n", "type": "registry:ui" } ] diff --git a/apps/www/public/r/components/fieldset-demo.json b/apps/www/public/r/components/fieldset-demo.json index 54f32b3..f6769ff 100644 --- a/apps/www/public/r/components/fieldset-demo.json +++ b/apps/www/public/r/components/fieldset-demo.json @@ -5,7 +5,7 @@ "files": [ { "path": "registry/examples/fieldset-demo.tsx", - "content": "import { Description } from \"@/registry/ui/description\"\nimport { Field } from \"@/registry/ui/field\"\nimport { Fieldset } from \"@/registry/ui/fieldset\"\nimport { Input } from \"@/registry/ui/input\"\nimport { Label } from \"@/registry/ui/label\"\nimport { Legend } from \"@/registry/ui/legend\"\nimport { Textarea } from \"@/registry/ui/textarea\"\n\nexport default function FieldsetDemo() {\n return (\n
\n Shipping details\n \n \n \n \n \n \n \n If you have a tiger, we'd like to know about it.\n \n