fulldev-ui 0.18.1 → 0.19.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Fulldev UI
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#262](https://github.com/fulldotdev/ui/pull/262) [`ac31d53`](https://github.com/fulldotdev/ui/commit/ac31d535756fb844b7e09c70ee597f03076a963b) Thanks [@silveltman](https://github.com/silveltman)! - - `Button` writes `data-variant` and `data-size` on its root element, as shadcn/ui's Button does. Without a `variant` or `size`, both are `default`. Classes and props are unchanged.
8
+ - `Card` takes a polymorphic `as` prop, so a card can render as an `article`, `section`, `a`, `li`, `dl` or any other element, with that element's attributes. It keeps `data-slot="card"` and `data-size`, and still renders a `div` by default.
9
+ - `CardTitle` takes a polymorphic `as` prop, so a title can be a heading such as `h2` or `h3`. It still renders a `div` by default.
10
+
3
11
  ## 0.18.1
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
3
  "type": "module",
4
- "version": "0.18.1",
4
+ "version": "0.19.0",
5
5
  "description": "Open-source Astro UI components and blocks",
6
6
  "homepage": "https://ui.full.dev",
7
7
  "bugs": "https://github.com/fulldotdev/ui/issues",
@@ -124,7 +124,7 @@
124
124
  "test": "node --test tests/*.test.mjs",
125
125
  "fix": "prettier --write . && eslint . --fix",
126
126
  "build": "astro build && html-validate dist",
127
- "registry:build": "pnpm registry:meta && node scripts/registry-adapt.mjs && shadcn build --output node_modules/.cache/fulldev-registry && node scripts/registry-styles.mjs && prettier --write . --log-level warn",
127
+ "registry:build": "pnpm registry:meta && node scripts/registry-adapt.mjs && shadcn build --output node_modules/.cache/fulldev-registry && node scripts/registry-styles.mjs && prettier --write registry.json public/r registry/styles/adapted --log-level warn",
128
128
  "registry:check": "pnpm registry:validate && pnpm registry:build && git diff --exit-code -- registry.json public/r registry/styles/adapted",
129
129
  "registry:validate": "node scripts/registry-validate.mjs",
130
130
  "release": "changeset version && pnpm install --lockfile-only",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-base leading-normal font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-base leading-normal font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 gap-(--card-spacing) overflow-hidden rounded-4xl py-(--card-spacing) text-sm shadow-md ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-4xl *:[img:last-child]:rounded-b-4xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 gap-(--card-spacing) overflow-hidden rounded-4xl py-(--card-spacing) text-sm shadow-md ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-4xl *:[img:last-child]:rounded-b-4xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-base font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-base font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-none py-(--card-spacing) text-xs/relaxed ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-none py-(--card-spacing) text-xs/relaxed ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-sm font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-sm font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-2xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-2xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-base font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-base font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-lg py-(--card-spacing) text-xs/relaxed ring-1 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-lg py-(--card-spacing) text-xs/relaxed ring-1 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-sm font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-sm font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 gap-(--card-spacing) overflow-hidden rounded-[min(var(--radius-4xl),24px)] py-(--card-spacing) text-sm shadow-sm ring-1 [--card-spacing:--spacing(5)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-[min(var(--radius-4xl),24px)] *:[img:last-child]:rounded-b-[min(var(--radius-4xl),24px)] group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 gap-(--card-spacing) overflow-hidden rounded-[min(var(--radius-4xl),24px)] py-(--card-spacing) text-sm shadow-sm ring-1 [--card-spacing:--spacing(5)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-[min(var(--radius-4xl),24px)] *:[img:last-child]:rounded-b-[min(var(--radius-4xl),24px)] group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-base font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-base font-medium font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"bg-card text-card-foreground ring-foreground/5 gap-(--card-spacing) overflow-hidden py-(--card-spacing) text-sm shadow-sm ring-1 [--card-spacing:--spacing(8)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(5)] *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"bg-card text-card-foreground ring-foreground/5 gap-(--card-spacing) overflow-hidden py-(--card-spacing) text-sm shadow-sm ring-1 [--card-spacing:--spacing(8)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(5)] *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-lg font-semibold tracking-wider uppercase font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-lg font-semibold tracking-wider uppercase font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "src/components/ui/button/button.astro",
14
- "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant,\n size,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
14
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { buttonVariants, type ButtonVariantProps } from \"./button-variants\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n variant = \"default\",\n size = \"default\",\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n class={cn(buttonVariants({ variant, size }), className)}\n {...attributes}\n>\n <slot />\n</Tag>\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/card/card.astro",
9
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n",
9
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{\n as: Tag\n size?: \"default\" | \"sm\"\n}>\n\nconst {\n as: Tag = \"div\",\n class: className,\n size = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"card\"\n data-size={size}\n class={cn(\"ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
10
10
  "type": "registry:ui"
11
11
  },
12
12
  {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "src/components/ui/card/card-title.astro",
24
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"card-title\"\n class={cn(\"text-base leading-normal font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</div>\n",
24
+ "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"card-title\"\n class={cn(\"text-base leading-normal font-medium group-data-[size=sm]/card:text-sm font-heading\", className)}\n {...props}\n>\n <slot />\n</Tag>\n",
25
25
  "type": "registry:ui"
26
26
  },
27
27
  {
@@ -11,8 +11,8 @@ type Props<Tag extends HTMLTag = "button"> = Polymorphic<{ as: Tag }> &
11
11
  const {
12
12
  as: Tag = "href" in Astro.props ? "a" : "button",
13
13
  class: className,
14
- variant,
15
- size,
14
+ variant = "default",
15
+ size = "default",
16
16
  ...props
17
17
  } = Astro.props
18
18
 
@@ -22,6 +22,8 @@ if (Tag === "button") attributes.type ??= "button"
22
22
 
23
23
  <Tag
24
24
  data-slot="button"
25
+ data-variant={variant}
26
+ data-size={size}
25
27
  class={cn(buttonVariants({ variant, size }), className)}
26
28
  {...attributes}
27
29
  >
@@ -1,17 +1,17 @@
1
1
  ---
2
- import type { HTMLAttributes } from "astro/types"
2
+ import type { HTMLTag, Polymorphic } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
- type Props = HTMLAttributes<"div">
6
+ type Props<Tag extends HTMLTag = "div"> = Polymorphic<{ as: Tag }>
7
7
 
8
- const { class: className, ...props } = Astro.props
8
+ const { as: Tag = "div", class: className, ...props } = Astro.props
9
9
  ---
10
10
 
11
- <div
11
+ <Tag
12
12
  data-slot="card-title"
13
13
  class={cn("cn-card-title font-heading", className)}
14
14
  {...props}
15
15
  >
16
16
  <slot />
17
- </div>
17
+ </Tag>
@@ -1,20 +1,26 @@
1
1
  ---
2
- import type { HTMLAttributes } from "astro/types"
2
+ import type { HTMLTag, Polymorphic } from "astro/types"
3
3
 
4
4
  import { cn } from "@/lib/utils"
5
5
 
6
- type Props = HTMLAttributes<"div"> & {
6
+ type Props<Tag extends HTMLTag = "div"> = Polymorphic<{
7
+ as: Tag
7
8
  size?: "default" | "sm"
8
- }
9
+ }>
9
10
 
10
- const { class: className, size = "default", ...props } = Astro.props
11
+ const {
12
+ as: Tag = "div",
13
+ class: className,
14
+ size = "default",
15
+ ...props
16
+ } = Astro.props
11
17
  ---
12
18
 
13
- <div
19
+ <Tag
14
20
  data-slot="card"
15
21
  data-size={size}
16
22
  class={cn("cn-card group/card flex flex-col", className)}
17
23
  {...props}
18
24
  >
19
25
  <slot />
20
- </div>
26
+ </Tag>