fulldev-ui 0.25.3 → 0.25.4

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 (42) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/liquid/assets/ui-manifest.json +3 -3
  3. package/liquid/assets/ui-typography.css +6 -0
  4. package/liquid/snippets/ui-badge.liquid +6 -0
  5. package/liquid/snippets/ui-button.liquid +6 -0
  6. package/package.json +1 -1
  7. package/public/r/liquid/badge.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/liquid/typography.json +1 -1
  11. package/public/r/react/styles/base-luma/typography.json +1 -1
  12. package/public/r/react/styles/base-lyra/typography.json +1 -1
  13. package/public/r/react/styles/base-maia/typography.json +1 -1
  14. package/public/r/react/styles/base-mira/typography.json +1 -1
  15. package/public/r/react/styles/base-nova/typography.json +1 -1
  16. package/public/r/react/styles/base-rhea/typography.json +1 -1
  17. package/public/r/react/styles/base-sera/typography.json +1 -1
  18. package/public/r/react/styles/base-vega/typography.json +1 -1
  19. package/public/r/styles/base-luma/badge.json +1 -1
  20. package/public/r/styles/base-luma/button.json +1 -1
  21. package/public/r/styles/base-luma/typography.json +1 -1
  22. package/public/r/styles/base-lyra/badge.json +1 -1
  23. package/public/r/styles/base-lyra/button.json +1 -1
  24. package/public/r/styles/base-lyra/typography.json +1 -1
  25. package/public/r/styles/base-maia/badge.json +1 -1
  26. package/public/r/styles/base-maia/button.json +1 -1
  27. package/public/r/styles/base-maia/typography.json +1 -1
  28. package/public/r/styles/base-mira/badge.json +1 -1
  29. package/public/r/styles/base-mira/button.json +1 -1
  30. package/public/r/styles/base-mira/typography.json +1 -1
  31. package/public/r/styles/base-nova/badge.json +1 -1
  32. package/public/r/styles/base-nova/button.json +1 -1
  33. package/public/r/styles/base-nova/typography.json +1 -1
  34. package/public/r/styles/base-rhea/badge.json +1 -1
  35. package/public/r/styles/base-rhea/button.json +1 -1
  36. package/public/r/styles/base-rhea/typography.json +1 -1
  37. package/public/r/styles/base-sera/badge.json +1 -1
  38. package/public/r/styles/base-sera/button.json +1 -1
  39. package/public/r/styles/base-sera/typography.json +1 -1
  40. package/public/r/styles/base-vega/badge.json +1 -1
  41. package/public/r/styles/base-vega/button.json +1 -1
  42. package/public/r/styles/base-vega/typography.json +1 -1
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "src/components/ui/typography.tsx",
13
- "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n \"font-medium text-primary underline underline-offset-4\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-lg border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
13
+ "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n // shadcn/ui's typography link uses text-primary, below 4.5:1 in dark\n // mode with most theme colors. There a lighter step of the primary\n // keeps 4.5:1, as in the Astro Button's link variant.\n \"font-medium text-(--fd-link,var(--primary)) underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-lg border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
14
14
  "type": "registry:ui"
15
15
  },
16
16
  {
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "src/components/ui/typography.tsx",
13
- "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n \"font-medium text-primary underline underline-offset-4\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-xl border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
13
+ "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n // shadcn/ui's typography link uses text-primary, below 4.5:1 in dark\n // mode with most theme colors. There a lighter step of the primary\n // keeps 4.5:1, as in the Astro Button's link variant.\n \"font-medium text-(--fd-link,var(--primary)) underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-xl border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
14
14
  "type": "registry:ui"
15
15
  },
16
16
  {
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "src/components/ui/typography.tsx",
13
- "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n \"font-medium text-primary underline underline-offset-4\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded-md bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-2xl border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
13
+ "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-medium tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n // shadcn/ui's typography link uses text-primary, below 4.5:1 in dark\n // mode with most theme colors. There a lighter step of the primary\n // keeps 4.5:1, as in the Astro Button's link variant.\n \"font-medium text-(--fd-link,var(--primary)) underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded-md bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-2xl border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
14
14
  "type": "registry:ui"
15
15
  },
16
16
  {
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "src/components/ui/typography.tsx",
13
- "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-wider uppercase scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-wider uppercase scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n \"font-medium text-primary underline underline-offset-4\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded-none bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-none border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
13
+ "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-wider uppercase scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-wider uppercase scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n // shadcn/ui's typography link uses text-primary, below 4.5:1 in dark\n // mode with most theme colors. There a lighter step of the primary\n // keeps 4.5:1, as in the Astro Button's link variant.\n \"font-medium text-(--fd-link,var(--primary)) underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded-none bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-none border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
14
14
  "type": "registry:ui"
15
15
  },
16
16
  {
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "src/components/ui/typography.tsx",
13
- "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n \"font-medium text-primary underline underline-offset-4\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-xl border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
13
+ "content": "import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cn } from \"cn\"\n\nimport \"./typeset.css\"\n\ntype TypographySize = \"sm\" | \"default\" | \"lg\"\n\nconst sizes = (sm: string, md: string, lg: string) => ({\n sm,\n default: md,\n lg,\n})\n\nfunction Typography({\n className,\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & { size?: TypographySize }) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"typeset\",\n sizes(\n \"[--typeset-flow:1.125em] [--typeset-leading:1.7] [--typeset-size:0.875rem]\",\n \"[--typeset-flow:1.25em] [--typeset-leading:1.75] [--typeset-size:1rem]\",\n \"[--typeset-flow:1.5em] [--typeset-leading:1.8] [--typeset-size:1.125rem]\"\n )[size],\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"typography\",\n size,\n },\n })\n}\n\nconst typographyH1Sizes = sizes(\"text-3xl\", \"text-4xl\", \"text-5xl\")\n\nfunction TypographyH1({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h1\"> & { size?: TypographySize }) {\n return (\n <h1\n data-slot=\"typography-h1\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading text-balance\",\n typographyH1Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH2Sizes = sizes(\"text-2xl\", \"text-3xl\", \"text-4xl\")\n\nfunction TypographyH2({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h2\"> & { size?: TypographySize }) {\n return (\n <h2\n data-slot=\"typography-h2\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading first:mt-0\",\n typographyH2Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH3Sizes = sizes(\"text-xl\", \"text-2xl\", \"text-3xl\")\n\nfunction TypographyH3({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h3\"> & { size?: TypographySize }) {\n return (\n <h3\n data-slot=\"typography-h3\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH3Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyH4Sizes = sizes(\"text-lg\", \"text-xl\", \"text-2xl\")\n\nfunction TypographyH4({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"h4\"> & { size?: TypographySize }) {\n return (\n <h4\n data-slot=\"typography-h4\"\n data-size={size}\n className={cn(\n \"font-semibold tracking-tight scroll-m-20 font-heading\",\n typographyH4Sizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyPSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyP({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-p\"\n data-size={size}\n className={cn(\n \"leading-7 [&:not(:first-child)]:mt-6\",\n typographyPSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyLeadSizes = sizes(\"text-base\", \"text-lg\", \"text-xl\")\n\nfunction TypographyLead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"p\"> & { size?: TypographySize }) {\n return (\n <p\n data-slot=\"typography-lead\"\n data-size={size}\n className={cn(\n \"text-muted-foreground\",\n typographyLeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyASizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyA({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"a\"> & { size?: TypographySize }) {\n return (\n <a\n data-slot=\"typography-a\"\n data-size={size}\n className={cn(\n // shadcn/ui's typography link uses text-primary, below 4.5:1 in dark\n // mode with most theme colors. There a lighter step of the primary\n // keeps 4.5:1, as in the Astro Button's link variant.\n \"font-medium text-(--fd-link,var(--primary)) underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n typographyASizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyBlockquoteSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyBlockquote({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"blockquote\"> & { size?: TypographySize }) {\n return (\n <blockquote\n data-slot=\"typography-blockquote\"\n data-size={size}\n className={cn(\n \"mt-6 border-s-2 ps-6 italic\",\n typographyBlockquoteSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyInlineCodeSizes = sizes(\"text-xs\", \"text-sm\", \"text-base\")\n\nfunction TypographyInlineCode({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"code\"> & { size?: TypographySize }) {\n return (\n <code\n data-slot=\"typography-inline-code\"\n data-size={size}\n className={cn(\n \"rounded bg-muted font-mono font-semibold relative px-[0.3rem] py-[0.2rem]\",\n typographyInlineCodeSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListItemSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyListItem({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"li\"> & { size?: TypographySize }) {\n return (\n <li\n data-slot=\"typography-list-item\"\n data-size={size}\n className={cn(\"mt-2\", typographyListItemSizes[size], className)}\n {...props}\n />\n )\n}\n\nconst typographyTableRowSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableRow({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"tr\"> & { size?: TypographySize }) {\n return (\n <tr\n data-slot=\"typography-table-row\"\n data-size={size}\n className={cn(\n \"m-0 border-t p-0 even:bg-muted\",\n typographyTableRowSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableHeadSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableHead({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"th\"> & { size?: TypographySize }) {\n return (\n <th\n data-slot=\"typography-table-head\"\n data-size={size}\n className={cn(\n \"border-b border-border px-4 py-3 text-start font-semibold [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableHeadSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableCellSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTableCell({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"td\"> & { size?: TypographySize }) {\n return (\n <td\n data-slot=\"typography-table-cell\"\n data-size={size}\n className={cn(\n \"border-t border-border px-4 py-3 text-start align-middle [&[align=center]]:text-center [&[align=left]]:text-left [&[align=right]]:text-right\",\n typographyTableCellSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyListSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\n// The list type changes its markers, so it is a prop instead of a render.\nfunction TypographyList({\n className,\n as = \"ul\",\n size = \"default\",\n ...props\n}: React.ComponentProps<\"ol\"> & {\n as?: \"ul\" | \"ol\"\n size?: TypographySize\n}) {\n // A <ul> takes the attributes of an <ol> except start and reversed.\n const Tag = as as \"ol\"\n return (\n <Tag\n data-slot=\"typography-list\"\n data-size={size}\n data-ordered={as === \"ol\" ? \"\" : undefined}\n className={cn(\n \"my-6 ms-6\",\n as === \"ol\" ? \"list-decimal\" : \"list-disc\",\n typographyListSizes[size],\n className\n )}\n {...props}\n />\n )\n}\n\nconst typographyTableSizes = sizes(\"text-sm\", \"text-base\", \"text-lg\")\n\nfunction TypographyTable({\n className,\n containerClassName,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"table\"> & {\n containerClassName?: string\n size?: TypographySize\n}) {\n return (\n <div\n data-slot=\"typography-table-container\"\n data-size={size}\n className={cn(\n \"rounded-xl border border-border my-6 w-full overflow-x-auto\",\n containerClassName\n )}\n >\n <table\n data-slot=\"typography-table\"\n data-size={size}\n className={cn(\n \"w-full border-collapse\",\n typographyTableSizes[size],\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport {\n Typography,\n TypographyA,\n TypographyBlockquote,\n TypographyH1,\n TypographyH2,\n TypographyH3,\n TypographyH4,\n TypographyInlineCode,\n TypographyLead,\n TypographyList,\n TypographyListItem,\n TypographyP,\n TypographyTable,\n TypographyTableCell,\n TypographyTableHead,\n TypographyTableRow,\n}\n",
14
14
  "type": "registry:ui"
15
15
  },
16
16
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/badge/badge-variants.ts",
9
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -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/30 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-3 aria-invalid:ring-3 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 dark:bg-transparent hover:bg-muted hover:text-foreground dark:hover:bg-input/30 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",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/30 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-3 aria-invalid:ring-3 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 dark:bg-transparent hover:bg-muted hover:text-foreground dark:hover:bg-input/30 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 // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] 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
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/typography/typography-a.astro",
14
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-primary font-medium underline underline-offset-4\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
14
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n// shadcn/ui's typography link uses text-primary, below 4.5:1 in dark mode with\n// most theme colors. There a lighter step of the primary keeps 4.5:1, as in\n// Button's link variant.\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-(--fd-link,var(--primary)) font-medium underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
15
15
  "type": "registry:ui"
16
16
  },
17
17
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/badge/badge-variants.ts",
9
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-none border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-none border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -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 // 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",
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 // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] 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
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/typography/typography-a.astro",
14
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-primary font-medium underline underline-offset-4\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
14
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n// shadcn/ui's typography link uses text-primary, below 4.5:1 in dark mode with\n// most theme colors. There a lighter step of the primary keeps 4.5:1, as in\n// Button's link variant.\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-(--fd-link,var(--primary)) font-medium underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
15
15
  "type": "registry:ui"
16
16
  },
17
17
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/badge/badge-variants.ts",
9
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/30\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/30\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -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 // 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",
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 // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] 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
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/typography/typography-a.astro",
14
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-primary font-medium underline underline-offset-4\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
14
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n// shadcn/ui's typography link uses text-primary, below 4.5:1 in dark mode with\n// most theme colors. There a lighter step of the primary keeps 4.5:1, as in\n// Button's link variant.\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-(--fd-link,var(--primary)) font-medium underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
15
15
  "type": "registry:ui"
16
16
  },
17
17
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/badge/badge-variants.ts",
9
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-2.5! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-2.5! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -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/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-2 aria-invalid:ring-2 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 dark: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-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n xs: \"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5\",\n sm: \"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n lg: \"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4\",\n icon: \"size-7 [&_svg:not([class*='size-'])]:size-3.5\",\n \"icon-xs\": \"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5\",\n \"icon-sm\": \"size-6 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-lg\": \"size-8 [&_svg:not([class*='size-'])]:size-4\",\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/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-2 aria-invalid:ring-2 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 dark: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 // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n xs: \"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5\",\n sm: \"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n lg: \"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4\",\n icon: \"size-7 [&_svg:not([class*='size-'])]:size-3.5\",\n \"icon-xs\": \"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5\",\n \"icon-sm\": \"size-6 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-lg\": \"size-8 [&_svg:not([class*='size-'])]:size-4\",\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
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/typography/typography-a.astro",
14
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-primary font-medium underline underline-offset-4\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
14
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n// shadcn/ui's typography link uses text-primary, below 4.5:1 in dark mode with\n// most theme colors. There a lighter step of the primary keeps 4.5:1, as in\n// Button's link variant.\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-(--fd-link,var(--primary)) font-medium underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
15
15
  "type": "registry:ui"
16
16
  },
17
17
  {
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "src/components/ui/badge/badge-variants.ts",
9
- "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
9
+ "content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const badgeVariants = cva(\n \"h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive: \"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -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-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 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-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg 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-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg 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-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\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-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 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 // shadcn/ui uses text-primary, below 4.5:1 in dark mode with most theme\n // colors. A lighter step of the primary keeps 4.5:1 there.\n link: \"text-(--fd-link,var(--primary)) dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)] 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-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg 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-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg 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-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\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
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/typography/typography-a.astro",
14
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-primary font-medium underline underline-offset-4\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
14
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Size = \"sm\" | \"default\" | \"lg\"\ntype Props = HTMLAttributes<\"a\"> & {\n size?: Size\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n\nconst sizeClass =\n size === \"sm\" ? \"text-sm\" : size === \"lg\" ? \"text-lg\" : \"text-base\"\n// shadcn/ui's typography link uses text-primary, below 4.5:1 in dark mode with\n// most theme colors. There a lighter step of the primary keeps 4.5:1, as in\n// Button's link variant.\n---\n\n<a\n data-slot=\"typography-a\"\n data-size={size}\n class={cn(\n \"text-(--fd-link,var(--primary)) font-medium underline underline-offset-4 dark:supports-[color:oklch(from_red_l_c_h)]:[--fd-link:oklch(from_var(--primary)_max(l,0.7)_calc(c*1.2)_h)]\",\n sizeClass,\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
15
15
  "type": "registry:ui"
16
16
  },
17
17
  {