fulldev-ui 0.25.1 → 0.25.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +4 -5
  3. package/liquid/assets/ui-manifest.json +2 -2
  4. package/liquid/snippets/ui-alert.liquid +2 -1
  5. package/liquid/snippets/ui-button.liquid +2 -2
  6. package/package.json +12 -11
  7. package/public/r/liquid/alert.json +1 -1
  8. package/public/r/liquid/button.json +1 -1
  9. package/public/r/liquid/components.json +1 -1
  10. package/public/r/styles/base-luma/alert.json +1 -1
  11. package/public/r/styles/base-luma/attachment-examples.json +1 -1
  12. package/public/r/styles/base-luma/attachment.json +2 -2
  13. package/public/r/styles/base-luma/button-examples.json +2 -2
  14. package/public/r/styles/base-luma/button.json +1 -1
  15. package/public/r/styles/base-luma/collapsible-examples.json +1 -1
  16. package/public/r/styles/base-luma/combobox-examples.json +1 -1
  17. package/public/r/styles/base-luma/combobox.json +1 -1
  18. package/public/r/styles/base-luma/input-group-examples.json +2 -2
  19. package/public/r/styles/base-luma/item-examples.json +1 -1
  20. package/public/r/styles/base-luma/select.json +1 -1
  21. package/public/r/styles/base-luma/tabs.json +1 -1
  22. package/public/r/styles/base-luma/tooltip-examples.json +1 -1
  23. package/public/r/styles/base-lyra/alert.json +1 -1
  24. package/public/r/styles/base-lyra/attachment-examples.json +1 -1
  25. package/public/r/styles/base-lyra/attachment.json +2 -2
  26. package/public/r/styles/base-lyra/button-examples.json +2 -2
  27. package/public/r/styles/base-lyra/button.json +1 -1
  28. package/public/r/styles/base-lyra/collapsible-examples.json +1 -1
  29. package/public/r/styles/base-lyra/combobox-examples.json +1 -1
  30. package/public/r/styles/base-lyra/combobox.json +1 -1
  31. package/public/r/styles/base-lyra/input-group-examples.json +2 -2
  32. package/public/r/styles/base-lyra/item-examples.json +1 -1
  33. package/public/r/styles/base-lyra/select.json +1 -1
  34. package/public/r/styles/base-lyra/tabs.json +1 -1
  35. package/public/r/styles/base-lyra/tooltip-examples.json +1 -1
  36. package/public/r/styles/base-maia/alert.json +1 -1
  37. package/public/r/styles/base-maia/attachment-examples.json +1 -1
  38. package/public/r/styles/base-maia/attachment.json +2 -2
  39. package/public/r/styles/base-maia/button-examples.json +2 -2
  40. package/public/r/styles/base-maia/button.json +1 -1
  41. package/public/r/styles/base-maia/collapsible-examples.json +1 -1
  42. package/public/r/styles/base-maia/combobox-examples.json +1 -1
  43. package/public/r/styles/base-maia/combobox.json +1 -1
  44. package/public/r/styles/base-maia/input-group-examples.json +2 -2
  45. package/public/r/styles/base-maia/item-examples.json +1 -1
  46. package/public/r/styles/base-maia/select.json +1 -1
  47. package/public/r/styles/base-maia/tabs.json +1 -1
  48. package/public/r/styles/base-maia/tooltip-examples.json +1 -1
  49. package/public/r/styles/base-mira/alert.json +1 -1
  50. package/public/r/styles/base-mira/attachment-examples.json +1 -1
  51. package/public/r/styles/base-mira/attachment.json +2 -2
  52. package/public/r/styles/base-mira/button-examples.json +2 -2
  53. package/public/r/styles/base-mira/button.json +1 -1
  54. package/public/r/styles/base-mira/collapsible-examples.json +1 -1
  55. package/public/r/styles/base-mira/combobox-examples.json +1 -1
  56. package/public/r/styles/base-mira/combobox.json +1 -1
  57. package/public/r/styles/base-mira/input-group-examples.json +2 -2
  58. package/public/r/styles/base-mira/item-examples.json +1 -1
  59. package/public/r/styles/base-mira/select.json +1 -1
  60. package/public/r/styles/base-mira/tabs.json +1 -1
  61. package/public/r/styles/base-mira/tooltip-examples.json +1 -1
  62. package/public/r/styles/base-nova/alert.json +1 -1
  63. package/public/r/styles/base-nova/attachment-examples.json +1 -1
  64. package/public/r/styles/base-nova/attachment.json +2 -2
  65. package/public/r/styles/base-nova/button-examples.json +2 -2
  66. package/public/r/styles/base-nova/button.json +1 -1
  67. package/public/r/styles/base-nova/collapsible-examples.json +1 -1
  68. package/public/r/styles/base-nova/combobox-examples.json +1 -1
  69. package/public/r/styles/base-nova/combobox.json +1 -1
  70. package/public/r/styles/base-nova/input-group-examples.json +2 -2
  71. package/public/r/styles/base-nova/item-examples.json +1 -1
  72. package/public/r/styles/base-nova/select.json +1 -1
  73. package/public/r/styles/base-nova/tabs.json +1 -1
  74. package/public/r/styles/base-nova/tooltip-examples.json +1 -1
  75. package/public/r/styles/base-rhea/alert.json +1 -1
  76. package/public/r/styles/base-rhea/attachment-examples.json +1 -1
  77. package/public/r/styles/base-rhea/attachment.json +2 -2
  78. package/public/r/styles/base-rhea/button-examples.json +2 -2
  79. package/public/r/styles/base-rhea/button.json +1 -1
  80. package/public/r/styles/base-rhea/collapsible-examples.json +1 -1
  81. package/public/r/styles/base-rhea/combobox-examples.json +1 -1
  82. package/public/r/styles/base-rhea/combobox.json +1 -1
  83. package/public/r/styles/base-rhea/input-group-examples.json +2 -2
  84. package/public/r/styles/base-rhea/item-examples.json +1 -1
  85. package/public/r/styles/base-rhea/select.json +1 -1
  86. package/public/r/styles/base-rhea/tabs.json +1 -1
  87. package/public/r/styles/base-rhea/tooltip-examples.json +1 -1
  88. package/public/r/styles/base-sera/alert.json +1 -1
  89. package/public/r/styles/base-sera/attachment-examples.json +1 -1
  90. package/public/r/styles/base-sera/attachment.json +2 -2
  91. package/public/r/styles/base-sera/button-examples.json +2 -2
  92. package/public/r/styles/base-sera/button.json +1 -1
  93. package/public/r/styles/base-sera/collapsible-examples.json +1 -1
  94. package/public/r/styles/base-sera/combobox-examples.json +1 -1
  95. package/public/r/styles/base-sera/combobox.json +1 -1
  96. package/public/r/styles/base-sera/input-group-examples.json +2 -2
  97. package/public/r/styles/base-sera/item-examples.json +1 -1
  98. package/public/r/styles/base-sera/select.json +1 -1
  99. package/public/r/styles/base-sera/tabs.json +1 -1
  100. package/public/r/styles/base-sera/tooltip-examples.json +1 -1
  101. package/public/r/styles/base-vega/alert.json +1 -1
  102. package/public/r/styles/base-vega/attachment-examples.json +1 -1
  103. package/public/r/styles/base-vega/attachment.json +2 -2
  104. package/public/r/styles/base-vega/button-examples.json +2 -2
  105. package/public/r/styles/base-vega/button.json +1 -1
  106. package/public/r/styles/base-vega/collapsible-examples.json +1 -1
  107. package/public/r/styles/base-vega/combobox-examples.json +1 -1
  108. package/public/r/styles/base-vega/combobox.json +1 -1
  109. package/public/r/styles/base-vega/input-group-examples.json +2 -2
  110. package/public/r/styles/base-vega/item-examples.json +1 -1
  111. package/public/r/styles/base-vega/select.json +1 -1
  112. package/public/r/styles/base-vega/tabs.json +1 -1
  113. package/public/r/styles/base-vega/tooltip-examples.json +1 -1
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/tabs/tabs.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"tabs\"\n data-default-value={defaultValue}\n data-orientation={orientation}\n data-activation-mode={activationMode}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n class={cn(\"gap-2 group/tabs flex data-horizontal:flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/tabs\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n<div\n data-slot=\"tabs\"\n data-default-value={defaultValue}\n data-orientation={orientation}\n data-activation-mode={activationMode}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n class={cn(\"gap-2 group/tabs flex data-horizontal:flex-col\", className)}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/tabs\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "path": "src/components/examples/tooltip/tooltip-keyboard.astro",
27
- "content": "---\nimport SaveIcon from \"@lucide/astro/icons/save\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport { Kbd } from \"@/components/ui/kbd\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n---\n\n<Tooltip>\n <TooltipTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon-sm\" })}\n >\n <SaveIcon />\n </TooltipTrigger>\n <TooltipContent>\n Save Changes <Kbd>S</Kbd>\n </TooltipContent>\n</Tooltip>\n",
27
+ "content": "---\nimport SaveIcon from \"@lucide/astro/icons/save\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport { Kbd } from \"@/components/ui/kbd\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n---\n\n<Tooltip>\n <TooltipTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon-sm\" })}\n aria-label=\"Save\"\n >\n <SaveIcon />\n </TooltipTrigger>\n <TooltipContent>\n Save Changes <Kbd>S</Kbd>\n </TooltipContent>\n</Tooltip>\n",
28
28
  "type": "registry:component"
29
29
  },
30
30
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/alert/alert.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = VariantProps<typeof variants> & HTMLAttributes<\"div\">\n\nconst variants = cva(\"grid gap-0.5 rounded-none border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full\", {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive: \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst { class: className, variant, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert\"\n role=\"alert\"\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = VariantProps<typeof variants> & HTMLAttributes<\"div\">\n\nconst variants = cva(\"grid gap-0.5 rounded-none border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full\", {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n // shadcn/ui shows the description at text-destructive/90. Like its\n // FieldError, this uses the full destructive color, for 4.5:1 contrast.\n destructive: \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst { class: className, variant, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert\"\n role=\"alert\"\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -14,7 +14,7 @@
14
14
  "files": [
15
15
  {
16
16
  "path": "src/components/examples/attachment/attachment-demo.astro",
17
- "content": "---\nimport FileCodeIcon from \"@lucide/astro/icons/file-code\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport {\n Attachment,\n AttachmentAction,\n AttachmentActions,\n AttachmentContent,\n AttachmentDescription,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentTitle,\n} from \"@/components/ui/attachment\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\nconst images = [\n {\n name: \"workspace.png\",\n meta: \"PNG · 820 KB\",\n src: \"https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=900&auto=format&fit=crop&q=80\",\n alt: \"Workspace\",\n },\n {\n name: \"desk-reference.jpg\",\n meta: \"JPG · 1.1 MB\",\n src: \"https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=900&auto=format&fit=crop&q=80\",\n alt: \"Desk\",\n },\n {\n name: \"office-reference.jpg\",\n meta: \"JPG · 940 KB\",\n src: \"https://images.unsplash.com/photo-1497366811353-6870744d04b2?w=900&auto=format&fit=crop&q=80\",\n alt: \"Office\",\n },\n]\n---\n\n<div class=\"mx-auto flex w-full max-w-sm flex-col gap-3 py-12\">\n <AttachmentGroup>\n {images.map((image) => (\n <Attachment orientation=\"vertical\">\n <AttachmentMedia variant=\"image\">\n <img src={image.src} alt={image.alt} />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>{image.name}</AttachmentTitle>\n <AttachmentDescription>{image.meta}</AttachmentDescription>\n </AttachmentContent>\n </Attachment>\n ))}\n </AttachmentGroup>\n <Attachment state=\"uploading\" class=\"w-full\">\n <AttachmentMedia>\n <Spinner />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>sales-dashboard.pdf</AttachmentTitle>\n <AttachmentDescription>Uploading · 64%</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Cancel upload\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n <Attachment class=\"w-full\">\n <AttachmentMedia>\n <FileCodeIcon />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>message-renderer.tsx</AttachmentTitle>\n <AttachmentDescription>TypeScript · 12 KB</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Remove message-renderer.tsx\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n</div>\n",
17
+ "content": "---\nimport FileCodeIcon from \"@lucide/astro/icons/file-code\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport {\n Attachment,\n AttachmentAction,\n AttachmentActions,\n AttachmentContent,\n AttachmentDescription,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentTitle,\n} from \"@/components/ui/attachment\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\nconst images = [\n {\n name: \"workspace.png\",\n meta: \"PNG · 820 KB\",\n src: \"https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=900&auto=format&fit=crop&q=80\",\n alt: \"Workspace\",\n },\n {\n name: \"desk-reference.jpg\",\n meta: \"JPG · 1.1 MB\",\n src: \"https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=900&auto=format&fit=crop&q=80\",\n alt: \"Desk\",\n },\n {\n name: \"office-reference.jpg\",\n meta: \"JPG · 940 KB\",\n src: \"https://images.unsplash.com/photo-1497366811353-6870744d04b2?w=900&auto=format&fit=crop&q=80\",\n alt: \"Office\",\n },\n]\n---\n\n<div class=\"mx-auto flex w-full max-w-sm flex-col gap-3 py-12\">\n {/* Unlike shadcn/ui's demo, the group takes focus: its attachments have no\n controls, so a keyboard could not scroll it otherwise. */}\n <AttachmentGroup tabindex=\"0\">\n {images.map((image) => (\n <Attachment orientation=\"vertical\">\n <AttachmentMedia variant=\"image\">\n <img src={image.src} alt={image.alt} />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>{image.name}</AttachmentTitle>\n <AttachmentDescription>{image.meta}</AttachmentDescription>\n </AttachmentContent>\n </Attachment>\n ))}\n </AttachmentGroup>\n <Attachment state=\"uploading\" class=\"w-full\">\n <AttachmentMedia>\n <Spinner />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>sales-dashboard.pdf</AttachmentTitle>\n <AttachmentDescription>Uploading · 64%</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Cancel upload\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n <Attachment class=\"w-full\">\n <AttachmentMedia>\n <FileCodeIcon />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>message-renderer.tsx</AttachmentTitle>\n <AttachmentDescription>TypeScript · 12 KB</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Remove message-renderer.tsx\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n</div>\n",
18
18
  "type": "registry:component"
19
19
  },
20
20
  {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "path": "src/components/ui/attachment/attachment-description.astro",
27
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-description\"\n class={cn(\n \"mt-0.5 text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80 block max-w-full min-w-0 truncate\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
27
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n// shadcn/ui uses text-destructive/80 for the error description. Like its\n// FieldError, this uses the full destructive color, so the small text keeps a\n// 4.5:1 contrast.\n---\n\n<span\n data-slot=\"attachment-description\"\n class={cn(\n \"mt-0.5 text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive block max-w-full min-w-0 truncate\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
28
28
  "type": "registry:ui"
29
29
  },
30
30
  {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  {
41
41
  "path": "src/components/ui/attachment/attachment-title.astro",
42
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-title\"\n class={cn(\n \"font-medium block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:animate-pulse group-data-[state=uploading]/attachment:animate-pulse\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
42
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-title\"\n class={cn(\n \"font-medium block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
43
43
  "type": "registry:ui"
44
44
  },
45
45
  {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  {
35
35
  "path": "src/components/examples/button/button-icon.astro",
36
- "content": "---\nimport CircleFadingArrowUpIcon from \"@lucide/astro/icons/circle-fading-arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<Button variant=\"outline\" size=\"icon\">\n <CircleFadingArrowUpIcon />\n</Button>\n",
36
+ "content": "---\nimport CircleFadingArrowUpIcon from \"@lucide/astro/icons/circle-fading-arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<Button variant=\"outline\" size=\"icon\" aria-label=\"Upgrade\">\n <CircleFadingArrowUpIcon />\n</Button>\n",
37
37
  "type": "registry:component"
38
38
  },
39
39
  {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  {
55
55
  "path": "src/components/examples/button/button-rounded.astro",
56
- "content": "---\nimport ArrowUpIcon from \"@lucide/astro/icons/arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<div class=\"flex gap-2\">\n <Button class=\"rounded-full\">Get Started</Button>\n <Button variant=\"outline\" size=\"icon\" class=\"rounded-full\">\n <ArrowUpIcon />\n </Button>\n</div>\n",
56
+ "content": "---\nimport ArrowUpIcon from \"@lucide/astro/icons/arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<div class=\"flex gap-2\">\n <Button class=\"rounded-full\">Get Started</Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n class=\"rounded-full\"\n aria-label=\"Submit\"\n >\n <ArrowUpIcon />\n </Button>\n</div>\n",
57
57
  "type": "registry:component"
58
58
  },
59
59
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/button/button-variants.ts",
9
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline: \"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost: \"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n destructive: \"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n xs: \"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n icon: \"size-8\",\n \"icon-xs\": \"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-7 rounded-none\",\n \"icon-lg\": \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>\n",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline: \"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost: \"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n // shadcn/ui uses text-destructive, about 4:1 on the button's tint.\n // Mixing in a fifth of the foreground keeps 4.5:1, as the native Liquid\n // button does.\n destructive: \"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))] focus-visible:border-destructive/40 dark:hover:bg-destructive/30\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n xs: \"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n icon: \"size-8\",\n \"icon-xs\": \"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-7 rounded-none\",\n \"icon-lg\": \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  {
44
44
  "path": "src/components/examples/collapsible/collapsible-settings.astro",
45
- "content": "---\nimport MaximizeIcon from \"@lucide/astro/icons/maximize\"\nimport MinimizeIcon from \"@lucide/astro/icons/minimize\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Input } from \"@/components/ui/input\"\n---\n\n<Card class=\"mx-auto w-full max-w-xs\" size=\"sm\">\n <CardHeader>\n <CardTitle>Radius</CardTitle>\n <CardDescription>Set the corner radius of the element.</CardDescription>\n </CardHeader>\n <CardContent>\n <Collapsible class=\"flex items-start gap-2\">\n <FieldGroup class=\"grid w-full grid-cols-2 gap-2\">\n <Field>\n <FieldLabel for=\"radius-x\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y\" placeholder=\"0\" value=\"0\" />\n </Field>\n <CollapsibleContent class=\"col-span-full grid grid-cols-subgrid gap-2\">\n <Field>\n <FieldLabel for=\"radius-x-2\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y-2\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n </CollapsibleContent>\n </FieldGroup>\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon\" })}\n >\n <MaximizeIcon class=\"group-aria-expanded/button:hidden\" />\n <MinimizeIcon class=\"hidden group-aria-expanded/button:block\" />\n </CollapsibleTrigger>\n </Collapsible>\n </CardContent>\n</Card>\n",
45
+ "content": "---\nimport MaximizeIcon from \"@lucide/astro/icons/maximize\"\nimport MinimizeIcon from \"@lucide/astro/icons/minimize\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Input } from \"@/components/ui/input\"\n---\n\n<Card class=\"mx-auto w-full max-w-xs\" size=\"sm\">\n <CardHeader>\n <CardTitle>Radius</CardTitle>\n <CardDescription>Set the corner radius of the element.</CardDescription>\n </CardHeader>\n <CardContent>\n <Collapsible class=\"flex items-start gap-2\">\n <FieldGroup class=\"grid w-full grid-cols-2 gap-2\">\n <Field>\n <FieldLabel for=\"radius-x\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y\" placeholder=\"0\" value=\"0\" />\n </Field>\n <CollapsibleContent class=\"col-span-full grid grid-cols-subgrid gap-2\">\n <Field>\n <FieldLabel for=\"radius-x-2\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y-2\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n </CollapsibleContent>\n </FieldGroup>\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon\" })}\n >\n <MaximizeIcon class=\"group-aria-expanded/button:hidden\" />\n <MinimizeIcon class=\"hidden group-aria-expanded/button:block\" />\n <span class=\"sr-only\">Toggle details</span>\n </CollapsibleTrigger>\n </Collapsible>\n </CardContent>\n</Card>\n",
46
46
  "type": "registry:component"
47
47
  }
48
48
  ],
@@ -60,7 +60,7 @@
60
60
  },
61
61
  {
62
62
  "path": "src/components/examples/combobox/combobox-popup.astro",
63
- "content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n} from \"@/components/ui/combobox\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North 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: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", 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: \"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---\n\n<Combobox defaultValue={countries[0].value}>\n <Button\n variant=\"outline\"\n data-slot=\"combobox-trigger\"\n class=\"[&_svg:not([class*='size-'])]:size-4 w-64 justify-between font-normal\"\n >\n <ComboboxValue />\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n </Button>\n <ComboboxContent>\n <ComboboxInput showTrigger={false} placeholder=\"Search\" />\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {countries.map((item) => (\n <ComboboxItem value={item.value}>{item.label}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
63
+ "content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n} from \"@/components/ui/combobox\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North 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: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", 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: \"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---\n\n<Combobox defaultValue={countries[0].value}>\n <Button\n variant=\"outline\"\n data-slot=\"combobox-trigger\"\n class=\"[&_svg:not([class*='size-'])]:size-4 w-64 justify-between font-normal\"\n >\n <ComboboxValue>{countries[0].label}</ComboboxValue>\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n </Button>\n <ComboboxContent>\n <ComboboxInput showTrigger={false} placeholder=\"Search\" />\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {countries.map((item) => (\n <ComboboxItem value={item.value}>{item.label}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
64
64
  "type": "registry:component"
65
65
  }
66
66
  ],
@@ -59,7 +59,7 @@
59
59
  },
60
60
  {
61
61
  "path": "src/components/ui/combobox/combobox-trigger.astro",
62
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n---\n\n<InputGroupButton\n type={type ?? \"button\"}\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-trigger\"\n class={cn(\"[&_svg]:text-muted-foreground\", className)}\n {...props}\n>\n <slot />\n {showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n )}\n</InputGroupButton>\n",
62
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n\n// Data Slot names the trigger \"Toggle\" when it starts. Name it the same in the\n// HTML, so it has a name before the script runs.\n---\n\n<InputGroupButton\n type={type ?? \"button\"}\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-trigger\"\n class={cn(\"[&_svg]:text-muted-foreground\", className)}\n aria-label=\"Toggle\"\n {...props}\n>\n <slot />\n {showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n )}\n</InputGroupButton>\n",
63
63
  "type": "registry:ui"
64
64
  },
65
65
  {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  {
29
29
  "path": "src/components/examples/input-group/input-group-button.astro",
30
- "content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { Popover, PopoverContent } from \"@/components/ui/popover\"\n---\n\n<div class=\"grid w-full max-w-sm gap-6\" data-input-group-button-example>\n <InputGroup>\n <InputGroupInput placeholder=\"https://x.com/shadcn\" readonly />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n aria-label=\"Copy\"\n title=\"Copy\"\n size=\"icon-xs\"\n data-copy-value=\"https://x.com/shadcn\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-check hidden\"\n data-copied-icon\n >\n <path d=\"M5 12l5 5l10 -10\"></path>\n </svg>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n data-copy-icon\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n <InputGroup class=\"[--radius:9999px]\">\n <InputGroupAddon>\n <Popover>\n <InputGroupButton\n data-slot=\"popover-trigger\"\n variant=\"secondary\"\n size=\"icon-xs\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-info-circle\"\n >\n <path d=\"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0\"></path>\n <path d=\"M12 9h.01\"></path>\n <path d=\"M11 12h1v4h1\"></path>\n </svg>\n </InputGroupButton>\n <PopoverContent\n align=\"start\"\n class=\"flex flex-col gap-1 rounded-xl text-sm\"\n >\n <p class=\"font-medium\">Your connection is not secure.</p>\n <p>You should not enter any sensitive information on this site.</p>\n </PopoverContent>\n </Popover>\n </InputGroupAddon>\n <InputGroupAddon class=\"pl-1.5 text-muted-foreground\">\n https://\n </InputGroupAddon>\n <InputGroupInput id=\"input-secure-19\" />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton size=\"icon-xs\" data-favorite-toggle>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-star data-[favorite=true]:fill-blue-600 data-[favorite=true]:stroke-blue-600\"\n data-favorite=\"false\"\n >\n <path d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n <InputGroup>\n <InputGroupInput placeholder=\"Type to search...\" />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton variant=\"secondary\">Search</InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n\n<script>\n const initialize = () => {\n for (const root of document.querySelectorAll<HTMLElement>(\n \"[data-input-group-button-example]\"\n )) {\n if (root.hasAttribute(\"data-bound\")) continue\n root.setAttribute(\"data-bound\", \"\")\n\n const copy = root.querySelector<HTMLElement>(\"[data-copy-value]\")!\n const copyIcon = copy.querySelector(\"[data-copy-icon]\")!\n const copiedIcon = copy.querySelector(\"[data-copied-icon]\")!\n let timeout: ReturnType<typeof setTimeout> | undefined\n const setCopied = (copied: boolean) => {\n copiedIcon.classList.toggle(\"hidden\", !copied)\n copyIcon.classList.toggle(\"hidden\", copied)\n }\n copy.addEventListener(\"click\", async () => {\n try {\n await navigator.clipboard.writeText(copy.dataset.copyValue!)\n } catch {\n return\n }\n setCopied(true)\n clearTimeout(timeout)\n timeout = setTimeout(() => setCopied(false), 2000)\n })\n\n const favorite = root.querySelector(\"[data-favorite-toggle]\")!\n const star = favorite.querySelector<SVGElement>(\"[data-favorite]\")!\n favorite.addEventListener(\"click\", () => {\n star.dataset.favorite = String(star.dataset.favorite !== \"true\")\n })\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
30
+ "content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\"\nimport { Popover, PopoverContent } from \"@/components/ui/popover\"\n---\n\n<div class=\"grid w-full max-w-sm gap-6\" data-input-group-button-example>\n <InputGroup>\n <InputGroupInput placeholder=\"https://x.com/shadcn\" readonly />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n aria-label=\"Copy\"\n title=\"Copy\"\n size=\"icon-xs\"\n data-copy-value=\"https://x.com/shadcn\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-check hidden\"\n data-copied-icon\n >\n <path d=\"M5 12l5 5l10 -10\"></path>\n </svg>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n data-copy-icon\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n <InputGroup class=\"[--radius:9999px]\">\n <InputGroupAddon>\n <Popover>\n <InputGroupButton\n data-slot=\"popover-trigger\"\n variant=\"secondary\"\n size=\"icon-xs\"\n aria-label=\"Info\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-info-circle\"\n >\n <path d=\"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0\"></path>\n <path d=\"M12 9h.01\"></path>\n <path d=\"M11 12h1v4h1\"></path>\n </svg>\n </InputGroupButton>\n <PopoverContent\n align=\"start\"\n class=\"flex flex-col gap-1 rounded-xl text-sm\"\n >\n <p class=\"font-medium\">Your connection is not secure.</p>\n <p>You should not enter any sensitive information on this site.</p>\n </PopoverContent>\n </Popover>\n </InputGroupAddon>\n <InputGroupAddon class=\"pl-1.5 text-muted-foreground\">\n https://\n </InputGroupAddon>\n <InputGroupInput id=\"input-secure-19\" />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n size=\"icon-xs\"\n aria-label=\"Favorite\"\n data-favorite-toggle\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-star data-[favorite=true]:fill-blue-600 data-[favorite=true]:stroke-blue-600\"\n data-favorite=\"false\"\n >\n <path d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n <InputGroup>\n <InputGroupInput placeholder=\"Type to search...\" />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton variant=\"secondary\">Search</InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n\n<script>\n const initialize = () => {\n for (const root of document.querySelectorAll<HTMLElement>(\n \"[data-input-group-button-example]\"\n )) {\n if (root.hasAttribute(\"data-bound\")) continue\n root.setAttribute(\"data-bound\", \"\")\n\n const copy = root.querySelector<HTMLElement>(\"[data-copy-value]\")!\n const copyIcon = copy.querySelector(\"[data-copy-icon]\")!\n const copiedIcon = copy.querySelector(\"[data-copied-icon]\")!\n let timeout: ReturnType<typeof setTimeout> | undefined\n const setCopied = (copied: boolean) => {\n copiedIcon.classList.toggle(\"hidden\", !copied)\n copyIcon.classList.toggle(\"hidden\", copied)\n }\n copy.addEventListener(\"click\", async () => {\n try {\n await navigator.clipboard.writeText(copy.dataset.copyValue!)\n } catch {\n return\n }\n setCopied(true)\n clearTimeout(timeout)\n timeout = setTimeout(() => setCopied(false), 2000)\n })\n\n const favorite = root.querySelector(\"[data-favorite-toggle]\")!\n const star = favorite.querySelector<SVGElement>(\"[data-favorite]\")!\n favorite.addEventListener(\"click\", () => {\n star.dataset.favorite = String(star.dataset.favorite !== \"true\")\n })\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
31
31
  "type": "registry:component"
32
32
  },
33
33
  {
@@ -82,7 +82,7 @@
82
82
  },
83
83
  {
84
84
  "path": "src/components/examples/input-group/input-group-textarea.astro",
85
- "content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupTextarea,\n} from \"@/components/ui/input-group\"\n---\n\n<div class=\"grid w-full max-w-md gap-4\">\n <InputGroup>\n <InputGroupTextarea\n id=\"textarea-code-32\"\n placeholder=\"console.log('Hello, world!');\"\n class=\"min-h-[200px]\"\n />\n <InputGroupAddon align=\"block-end\" class=\"border-t\">\n <InputGroupText>Line 1, Column 1</InputGroupText>\n <InputGroupButton size=\"sm\" class=\"ml-auto\" variant=\"default\">\n Run\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-corner-down-left\"\n >\n <path d=\"M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n <InputGroupAddon align=\"block-start\" class=\"border-b\">\n <InputGroupText class=\"font-mono font-medium\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-brand-javascript\"\n >\n <path d=\"M20 4l-2 14.5l-6 2l-6 -2l-2 -14.5l16 0\"></path>\n <path d=\"M7.5 8h3v8l-2 -1\"></path>\n <path d=\"M16.5 8h-2.5a.5 .5 0 0 0 -.5 .5v3a.5 .5 0 0 0 .5 .5h1.423a.5 .5 0 0 1 .495 .57l-.418 2.93l-2 .5\"></path>\n </svg>\n script.js\n </InputGroupText>\n <InputGroupButton class=\"ml-auto\" size=\"icon-xs\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-refresh\"\n >\n <path d=\"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4\"></path>\n <path d=\"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4\"></path>\n </svg>\n </InputGroupButton>\n <InputGroupButton variant=\"ghost\" size=\"icon-xs\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n",
85
+ "content": "---\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupTextarea,\n} from \"@/components/ui/input-group\"\n---\n\n<div class=\"grid w-full max-w-md gap-4\">\n <InputGroup>\n <InputGroupTextarea\n id=\"textarea-code-32\"\n placeholder=\"console.log('Hello, world!');\"\n class=\"min-h-[200px]\"\n />\n <InputGroupAddon align=\"block-end\" class=\"border-t\">\n <InputGroupText>Line 1, Column 1</InputGroupText>\n <InputGroupButton size=\"sm\" class=\"ml-auto\" variant=\"default\">\n Run\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-corner-down-left\"\n >\n <path d=\"M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n <InputGroupAddon align=\"block-start\" class=\"border-b\">\n <InputGroupText class=\"font-mono font-medium\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-brand-javascript\"\n >\n <path d=\"M20 4l-2 14.5l-6 2l-6 -2l-2 -14.5l16 0\"></path>\n <path d=\"M7.5 8h3v8l-2 -1\"></path>\n <path d=\"M16.5 8h-2.5a.5 .5 0 0 0 -.5 .5v3a.5 .5 0 0 0 .5 .5h1.423a.5 .5 0 0 1 .495 .57l-.418 2.93l-2 .5\"></path>\n </svg>\n script.js\n </InputGroupText>\n <InputGroupButton class=\"ml-auto\" size=\"icon-xs\" aria-label=\"Refresh\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-refresh\"\n >\n <path d=\"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4\"></path>\n <path d=\"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4\"></path>\n </svg>\n </InputGroupButton>\n <InputGroupButton variant=\"ghost\" size=\"icon-xs\" aria-label=\"Copy\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"tabler-icon tabler-icon-copy\"\n >\n <path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\"></path>\n <path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\"></path>\n </svg>\n </InputGroupButton>\n </InputGroupAddon>\n </InputGroup>\n</div>\n",
86
86
  "type": "registry:component"
87
87
  }
88
88
  ],
@@ -30,7 +30,7 @@
30
30
  },
31
31
  {
32
32
  "path": "src/components/examples/item/item-group.astro",
33
- "content": "---\nimport PlusIcon from \"@lucide/astro/icons/plus\"\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from \"@/components/ui/item\"\n\nconst people = [\n {\n username: \"shadcn\",\n avatar: \"https://github.com/shadcn.png\",\n email: \"shadcn@vercel.com\",\n },\n {\n username: \"maxleiter\",\n avatar: \"https://github.com/maxleiter.png\",\n email: \"maxleiter@vercel.com\",\n },\n {\n username: \"evilrabbit\",\n avatar: \"https://github.com/evilrabbit.png\",\n email: \"evilrabbit@vercel.com\",\n },\n]\n---\n\n<ItemGroup class=\"max-w-sm\">\n {people.map((person) => (\n <Item variant=\"outline\">\n <ItemMedia>\n <Avatar>\n <AvatarImage src={person.avatar} class=\"grayscale\" />\n <AvatarFallback>{person.username.charAt(0)}</AvatarFallback>\n </Avatar>\n </ItemMedia>\n <ItemContent class=\"gap-1\">\n <ItemTitle>{person.username}</ItemTitle>\n <ItemDescription>{person.email}</ItemDescription>\n </ItemContent>\n <ItemActions>\n <Button variant=\"ghost\" size=\"icon\" class=\"rounded-full\">\n <PlusIcon />\n </Button>\n </ItemActions>\n </Item>\n ))}\n</ItemGroup>\n",
33
+ "content": "---\nimport PlusIcon from \"@lucide/astro/icons/plus\"\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from \"@/components/ui/item\"\n\nconst people = [\n {\n username: \"shadcn\",\n avatar: \"https://github.com/shadcn.png\",\n email: \"shadcn@vercel.com\",\n },\n {\n username: \"maxleiter\",\n avatar: \"https://github.com/maxleiter.png\",\n email: \"maxleiter@vercel.com\",\n },\n {\n username: \"evilrabbit\",\n avatar: \"https://github.com/evilrabbit.png\",\n email: \"evilrabbit@vercel.com\",\n },\n]\n---\n\n<ItemGroup class=\"max-w-sm\">\n {people.map((person) => (\n <Item variant=\"outline\">\n <ItemMedia>\n <Avatar>\n <AvatarImage src={person.avatar} class=\"grayscale\" />\n <AvatarFallback>{person.username.charAt(0)}</AvatarFallback>\n </Avatar>\n </ItemMedia>\n <ItemContent class=\"gap-1\">\n <ItemTitle>{person.username}</ItemTitle>\n <ItemDescription>{person.email}</ItemDescription>\n </ItemContent>\n <ItemActions>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"rounded-full\"\n aria-label=\"Invite\"\n >\n <PlusIcon />\n </Button>\n </ItemActions>\n </Item>\n ))}\n</ItemGroup>\n",
34
34
  "type": "registry:component"
35
35
  },
36
36
  {
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "src/components/ui/select/select.astro",
13
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"select\"\n data-mount-strategy={mountStrategy}\n data-default-value={defaultValue}\n data-default-open={defaultOpen}\n data-placeholder={placeholder}\n data-disabled={disabled}\n data-required={required}\n data-name={name}\n data-position={position}\n data-side={side}\n data-align={align}\n data-side-offset={sideOffset}\n data-align-offset={alignOffset}\n data-avoid-collisions={avoidCollisions}\n data-collision-padding={collisionPadding}\n data-highlight-item-on-hover={highlightItemOnHover}\n data-lock-scroll={lockScroll}\n class={cn(\n \"group/select relative inline-flex w-fit flex-col gap-1.5\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/select\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
13
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `&#${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n<div\n data-slot=\"select\"\n data-mount-strategy={mountStrategy}\n data-default-value={defaultValue}\n data-default-open={defaultOpen}\n data-placeholder={placeholder}\n data-disabled={disabled}\n data-required={required}\n data-name={name}\n data-position={position}\n data-side={side}\n data-align={align}\n data-side-offset={sideOffset}\n data-align-offset={alignOffset}\n data-avoid-collisions={avoidCollisions}\n data-collision-padding={collisionPadding}\n data-highlight-item-on-hover={highlightItemOnHover}\n data-lock-scroll={lockScroll}\n class={cn(\n \"group/select relative inline-flex w-fit flex-col gap-1.5\",\n className\n )}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/select\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
14
14
  "type": "registry:ui"
15
15
  },
16
16
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/tabs/tabs.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"tabs\"\n data-default-value={defaultValue}\n data-orientation={orientation}\n data-activation-mode={activationMode}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n class={cn(\"gap-2 group/tabs flex data-horizontal:flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/tabs\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record<string, string> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /<!--[\\s\\S]*?-->|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n<div\n data-slot=\"tabs\"\n data-default-value={defaultValue}\n data-orientation={orientation}\n data-activation-mode={activationMode}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n class={cn(\"gap-2 group/tabs flex data-horizontal:flex-col\", className)}\n {...props}\n>\n <Fragment set:html={content} />\n</div>\n\n<script>\n import { create } from \"@data-slot/tabs\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "path": "src/components/examples/tooltip/tooltip-keyboard.astro",
27
- "content": "---\nimport SaveIcon from \"@lucide/astro/icons/save\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport { Kbd } from \"@/components/ui/kbd\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n---\n\n<Tooltip>\n <TooltipTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon-sm\" })}\n >\n <SaveIcon />\n </TooltipTrigger>\n <TooltipContent>\n Save Changes <Kbd>S</Kbd>\n </TooltipContent>\n</Tooltip>\n",
27
+ "content": "---\nimport SaveIcon from \"@lucide/astro/icons/save\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport { Kbd } from \"@/components/ui/kbd\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n---\n\n<Tooltip>\n <TooltipTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon-sm\" })}\n aria-label=\"Save\"\n >\n <SaveIcon />\n </TooltipTrigger>\n <TooltipContent>\n Save Changes <Kbd>S</Kbd>\n </TooltipContent>\n</Tooltip>\n",
28
28
  "type": "registry:component"
29
29
  },
30
30
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/alert/alert.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = VariantProps<typeof variants> & HTMLAttributes<\"div\">\n\nconst variants = cva(\"grid gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full\", {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive: \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst { class: className, variant, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert\"\n role=\"alert\"\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = VariantProps<typeof variants> & HTMLAttributes<\"div\">\n\nconst variants = cva(\"grid gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full\", {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n // shadcn/ui shows the description at text-destructive/90. Like its\n // FieldError, this uses the full destructive color, for 4.5:1 contrast.\n destructive: \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst { class: className, variant, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert\"\n role=\"alert\"\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -14,7 +14,7 @@
14
14
  "files": [
15
15
  {
16
16
  "path": "src/components/examples/attachment/attachment-demo.astro",
17
- "content": "---\nimport FileCodeIcon from \"@lucide/astro/icons/file-code\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport {\n Attachment,\n AttachmentAction,\n AttachmentActions,\n AttachmentContent,\n AttachmentDescription,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentTitle,\n} from \"@/components/ui/attachment\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\nconst images = [\n {\n name: \"workspace.png\",\n meta: \"PNG · 820 KB\",\n src: \"https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=900&auto=format&fit=crop&q=80\",\n alt: \"Workspace\",\n },\n {\n name: \"desk-reference.jpg\",\n meta: \"JPG · 1.1 MB\",\n src: \"https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=900&auto=format&fit=crop&q=80\",\n alt: \"Desk\",\n },\n {\n name: \"office-reference.jpg\",\n meta: \"JPG · 940 KB\",\n src: \"https://images.unsplash.com/photo-1497366811353-6870744d04b2?w=900&auto=format&fit=crop&q=80\",\n alt: \"Office\",\n },\n]\n---\n\n<div class=\"mx-auto flex w-full max-w-sm flex-col gap-3 py-12\">\n <AttachmentGroup>\n {images.map((image) => (\n <Attachment orientation=\"vertical\">\n <AttachmentMedia variant=\"image\">\n <img src={image.src} alt={image.alt} />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>{image.name}</AttachmentTitle>\n <AttachmentDescription>{image.meta}</AttachmentDescription>\n </AttachmentContent>\n </Attachment>\n ))}\n </AttachmentGroup>\n <Attachment state=\"uploading\" class=\"w-full\">\n <AttachmentMedia>\n <Spinner />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>sales-dashboard.pdf</AttachmentTitle>\n <AttachmentDescription>Uploading · 64%</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Cancel upload\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n <Attachment class=\"w-full\">\n <AttachmentMedia>\n <FileCodeIcon />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>message-renderer.tsx</AttachmentTitle>\n <AttachmentDescription>TypeScript · 12 KB</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Remove message-renderer.tsx\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n</div>\n",
17
+ "content": "---\nimport FileCodeIcon from \"@lucide/astro/icons/file-code\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport {\n Attachment,\n AttachmentAction,\n AttachmentActions,\n AttachmentContent,\n AttachmentDescription,\n AttachmentGroup,\n AttachmentMedia,\n AttachmentTitle,\n} from \"@/components/ui/attachment\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\nconst images = [\n {\n name: \"workspace.png\",\n meta: \"PNG · 820 KB\",\n src: \"https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=900&auto=format&fit=crop&q=80\",\n alt: \"Workspace\",\n },\n {\n name: \"desk-reference.jpg\",\n meta: \"JPG · 1.1 MB\",\n src: \"https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=900&auto=format&fit=crop&q=80\",\n alt: \"Desk\",\n },\n {\n name: \"office-reference.jpg\",\n meta: \"JPG · 940 KB\",\n src: \"https://images.unsplash.com/photo-1497366811353-6870744d04b2?w=900&auto=format&fit=crop&q=80\",\n alt: \"Office\",\n },\n]\n---\n\n<div class=\"mx-auto flex w-full max-w-sm flex-col gap-3 py-12\">\n {/* Unlike shadcn/ui's demo, the group takes focus: its attachments have no\n controls, so a keyboard could not scroll it otherwise. */}\n <AttachmentGroup tabindex=\"0\">\n {images.map((image) => (\n <Attachment orientation=\"vertical\">\n <AttachmentMedia variant=\"image\">\n <img src={image.src} alt={image.alt} />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>{image.name}</AttachmentTitle>\n <AttachmentDescription>{image.meta}</AttachmentDescription>\n </AttachmentContent>\n </Attachment>\n ))}\n </AttachmentGroup>\n <Attachment state=\"uploading\" class=\"w-full\">\n <AttachmentMedia>\n <Spinner />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>sales-dashboard.pdf</AttachmentTitle>\n <AttachmentDescription>Uploading · 64%</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Cancel upload\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n <Attachment class=\"w-full\">\n <AttachmentMedia>\n <FileCodeIcon />\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle>message-renderer.tsx</AttachmentTitle>\n <AttachmentDescription>TypeScript · 12 KB</AttachmentDescription>\n </AttachmentContent>\n <AttachmentActions>\n <AttachmentAction aria-label=\"Remove message-renderer.tsx\">\n <XIcon />\n </AttachmentAction>\n </AttachmentActions>\n </Attachment>\n</div>\n",
18
18
  "type": "registry:component"
19
19
  },
20
20
  {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "path": "src/components/ui/attachment/attachment-description.astro",
27
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-description\"\n class={cn(\n \"mt-0.5 text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80 block max-w-full min-w-0 truncate\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
27
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n// shadcn/ui uses text-destructive/80 for the error description. Like its\n// FieldError, this uses the full destructive color, so the small text keeps a\n// 4.5:1 contrast.\n---\n\n<span\n data-slot=\"attachment-description\"\n class={cn(\n \"mt-0.5 text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive block max-w-full min-w-0 truncate\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
28
28
  "type": "registry:ui"
29
29
  },
30
30
  {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  {
41
41
  "path": "src/components/ui/attachment/attachment-title.astro",
42
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-title\"\n class={cn(\n \"font-medium block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:animate-pulse group-data-[state=uploading]/attachment:animate-pulse\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
42
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-title\"\n class={cn(\n \"font-medium block max-w-full min-w-0 truncate group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
43
43
  "type": "registry:ui"
44
44
  },
45
45
  {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  {
35
35
  "path": "src/components/examples/button/button-icon.astro",
36
- "content": "---\nimport CircleFadingArrowUpIcon from \"@lucide/astro/icons/circle-fading-arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<Button variant=\"outline\" size=\"icon\">\n <CircleFadingArrowUpIcon />\n</Button>\n",
36
+ "content": "---\nimport CircleFadingArrowUpIcon from \"@lucide/astro/icons/circle-fading-arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<Button variant=\"outline\" size=\"icon\" aria-label=\"Upgrade\">\n <CircleFadingArrowUpIcon />\n</Button>\n",
37
37
  "type": "registry:component"
38
38
  },
39
39
  {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  {
55
55
  "path": "src/components/examples/button/button-rounded.astro",
56
- "content": "---\nimport ArrowUpIcon from \"@lucide/astro/icons/arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<div class=\"flex gap-2\">\n <Button class=\"rounded-full\">Get Started</Button>\n <Button variant=\"outline\" size=\"icon\" class=\"rounded-full\">\n <ArrowUpIcon />\n </Button>\n</div>\n",
56
+ "content": "---\nimport ArrowUpIcon from \"@lucide/astro/icons/arrow-up\"\n\nimport { Button } from \"@/components/ui/button\"\n---\n\n<div class=\"flex gap-2\">\n <Button class=\"rounded-full\">Get Started</Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n class=\"rounded-full\"\n aria-label=\"Submit\"\n >\n <ArrowUpIcon />\n </Button>\n</div>\n",
57
57
  "type": "registry:component"
58
58
  },
59
59
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/button/button-variants.ts",
9
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline: \"border-border bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost: \"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n destructive: \"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5\",\n xs: \"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n lg: \"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>\n",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline: \"border-border bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost: \"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground\",\n // shadcn/ui uses text-destructive, about 4:1 on the button's tint.\n // Mixing in a fifth of the foreground keeps 4.5:1, as the native Liquid\n // button does.\n destructive: \"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))] focus-visible:border-destructive/40 dark:hover:bg-destructive/30\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5\",\n xs: \"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n lg: \"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  {
44
44
  "path": "src/components/examples/collapsible/collapsible-settings.astro",
45
- "content": "---\nimport MaximizeIcon from \"@lucide/astro/icons/maximize\"\nimport MinimizeIcon from \"@lucide/astro/icons/minimize\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Input } from \"@/components/ui/input\"\n---\n\n<Card class=\"mx-auto w-full max-w-xs\" size=\"sm\">\n <CardHeader>\n <CardTitle>Radius</CardTitle>\n <CardDescription>Set the corner radius of the element.</CardDescription>\n </CardHeader>\n <CardContent>\n <Collapsible class=\"flex items-start gap-2\">\n <FieldGroup class=\"grid w-full grid-cols-2 gap-2\">\n <Field>\n <FieldLabel for=\"radius-x\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y\" placeholder=\"0\" value=\"0\" />\n </Field>\n <CollapsibleContent class=\"col-span-full grid grid-cols-subgrid gap-2\">\n <Field>\n <FieldLabel for=\"radius-x-2\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y-2\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n </CollapsibleContent>\n </FieldGroup>\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon\" })}\n >\n <MaximizeIcon class=\"group-aria-expanded/button:hidden\" />\n <MinimizeIcon class=\"hidden group-aria-expanded/button:block\" />\n </CollapsibleTrigger>\n </Collapsible>\n </CardContent>\n</Card>\n",
45
+ "content": "---\nimport MaximizeIcon from \"@lucide/astro/icons/maximize\"\nimport MinimizeIcon from \"@lucide/astro/icons/minimize\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Field, FieldGroup, FieldLabel } from \"@/components/ui/field\"\nimport { Input } from \"@/components/ui/input\"\n---\n\n<Card class=\"mx-auto w-full max-w-xs\" size=\"sm\">\n <CardHeader>\n <CardTitle>Radius</CardTitle>\n <CardDescription>Set the corner radius of the element.</CardDescription>\n </CardHeader>\n <CardContent>\n <Collapsible class=\"flex items-start gap-2\">\n <FieldGroup class=\"grid w-full grid-cols-2 gap-2\">\n <Field>\n <FieldLabel for=\"radius-x\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y\" placeholder=\"0\" value=\"0\" />\n </Field>\n <CollapsibleContent class=\"col-span-full grid grid-cols-subgrid gap-2\">\n <Field>\n <FieldLabel for=\"radius-x-2\" class=\"sr-only\">\n Radius X\n </FieldLabel>\n <Input id=\"radius-x-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n <Field>\n <FieldLabel for=\"radius-y-2\" class=\"sr-only\">\n Radius Y\n </FieldLabel>\n <Input id=\"radius-y-2\" placeholder=\"0\" value=\"0\" />\n </Field>\n </CollapsibleContent>\n </FieldGroup>\n <CollapsibleTrigger\n class={buttonVariants({ variant: \"outline\", size: \"icon\" })}\n >\n <MaximizeIcon class=\"group-aria-expanded/button:hidden\" />\n <MinimizeIcon class=\"hidden group-aria-expanded/button:block\" />\n <span class=\"sr-only\">Toggle details</span>\n </CollapsibleTrigger>\n </Collapsible>\n </CardContent>\n</Card>\n",
46
46
  "type": "registry:component"
47
47
  }
48
48
  ],
@@ -60,7 +60,7 @@
60
60
  },
61
61
  {
62
62
  "path": "src/components/examples/combobox/combobox-popup.astro",
63
- "content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n} from \"@/components/ui/combobox\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North 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: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", 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: \"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---\n\n<Combobox defaultValue={countries[0].value}>\n <Button\n variant=\"outline\"\n data-slot=\"combobox-trigger\"\n class=\"[&_svg:not([class*='size-'])]:size-4 w-64 justify-between font-normal\"\n >\n <ComboboxValue />\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n </Button>\n <ComboboxContent>\n <ComboboxInput showTrigger={false} placeholder=\"Search\" />\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {countries.map((item) => (\n <ComboboxItem value={item.value}>{item.label}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
63
+ "content": "---\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxValue,\n} from \"@/components/ui/combobox\"\n\nconst countries = [\n { code: \"\", value: \"\", continent: \"\", label: \"Select country\" },\n {\n code: \"ar\",\n value: \"argentina\",\n label: \"Argentina\",\n continent: \"South America\",\n },\n { code: \"au\", value: \"australia\", label: \"Australia\", continent: \"Oceania\" },\n { code: \"br\", value: \"brazil\", label: \"Brazil\", continent: \"South America\" },\n { code: \"ca\", value: \"canada\", label: \"Canada\", continent: \"North 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: \"eg\", value: \"egypt\", label: \"Egypt\", continent: \"Africa\" },\n { code: \"fr\", value: \"france\", label: \"France\", continent: \"Europe\" },\n { code: \"de\", value: \"germany\", label: \"Germany\", continent: \"Europe\" },\n { code: \"it\", value: \"italy\", label: \"Italy\", continent: \"Europe\" },\n { code: \"jp\", value: \"japan\", label: \"Japan\", continent: \"Asia\" },\n { code: \"ke\", value: \"kenya\", label: \"Kenya\", continent: \"Africa\" },\n { code: \"mx\", value: \"mexico\", label: \"Mexico\", continent: \"North America\" },\n {\n code: \"nz\",\n value: \"new-zealand\",\n label: \"New Zealand\",\n continent: \"Oceania\",\n },\n { code: \"ng\", value: \"nigeria\", label: \"Nigeria\", 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: \"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---\n\n<Combobox defaultValue={countries[0].value}>\n <Button\n variant=\"outline\"\n data-slot=\"combobox-trigger\"\n class=\"[&_svg:not([class*='size-'])]:size-4 w-64 justify-between font-normal\"\n >\n <ComboboxValue>{countries[0].label}</ComboboxValue>\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n </Button>\n <ComboboxContent>\n <ComboboxInput showTrigger={false} placeholder=\"Search\" />\n <ComboboxList>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n {countries.map((item) => (\n <ComboboxItem value={item.value}>{item.label}</ComboboxItem>\n ))}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>\n",
64
64
  "type": "registry:component"
65
65
  }
66
66
  ],
@@ -59,7 +59,7 @@
59
59
  },
60
60
  {
61
61
  "path": "src/components/ui/combobox/combobox-trigger.astro",
62
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n---\n\n<InputGroupButton\n type={type ?? \"button\"}\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-trigger\"\n class={cn(\"[&_svg]:text-muted-foreground\", className)}\n {...props}\n>\n <slot />\n {showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n )}\n</InputGroupButton>\n",
62
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n\n// Data Slot names the trigger \"Toggle\" when it starts. Name it the same in the\n// HTML, so it has a name before the script runs.\n---\n\n<InputGroupButton\n type={type ?? \"button\"}\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-trigger\"\n class={cn(\"[&_svg]:text-muted-foreground\", className)}\n aria-label=\"Toggle\"\n {...props}\n>\n <slot />\n {showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground size-4 pointer-events-none\" />\n )}\n</InputGroupButton>\n",
63
63
  "type": "registry:ui"
64
64
  },
65
65
  {