fulldev-ui 0.17.2 → 0.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Fulldev UI
2
2
 
3
+ ## 0.17.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#246](https://github.com/fulldotdev/ui/pull/246) [`41f1f73`](https://github.com/fulldotdev/ui/commit/41f1f73c687043265bca59c7dc39fc39c1fab6e5) Thanks [@silveltman](https://github.com/silveltman)! - Give the default `DialogClose` icon a screen-reader "Close" label, and expose `Rating` to assistive technology as an image labelled "Rated N out of 5" (override with `aria-label`).
8
+
3
9
  ## 0.17.2
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
3
  "type": "module",
4
- "version": "0.17.2",
4
+ "version": "0.17.3",
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",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "path": "src/components/ui/dialog/dialog-close.astro",
61
- "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n </slot>\n</Button>\n",
61
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport X from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button class={cn(className)} data-slot=\"dialog-close\" {...props}>\n <slot>\n <X />\n <span class=\"sr-only\">Close</span>\n </slot>\n</Button>\n",
62
62
  "type": "registry:ui"
63
63
  },
64
64
  {
@@ -9,7 +9,7 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "src/components/ui/rating/rating.astro",
12
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst { value = 5, class: className, ...props } = Astro.props\n---\n\n<div class={cn(\"flex items-center gap-1 text-base\", className)} {...props}>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span class=\"text-muted-foreground/25 relative inline-flex size-[1em]\">\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
12
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Star from \"@lucide/astro/icons/star\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value?: number\n}\n\nconst {\n value = 5,\n class: className,\n \"aria-label\": ariaLabel = `Rated ${value} out of 5`,\n ...props\n} = Astro.props\n---\n\n<div\n role=\"img\"\n aria-label={ariaLabel}\n class={cn(\"flex items-center gap-1 text-base\", className)}\n {...props}\n>\n {\n Array.from({ length: 5 }).map((_, index) => {\n const fillPercentage =\n index < Math.floor(value)\n ? 100\n : index === Math.floor(value)\n ? (value % 1) * 100\n : 0\n\n return (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground/25 relative inline-flex size-[1em]\"\n >\n <Star class=\"size-[1em] fill-current\" />\n {fillPercentage > 0 && (\n <span\n class=\"text-primary absolute inset-0 overflow-hidden\"\n style={{ width: `${fillPercentage}%` }}\n >\n <Star class=\"size-[1em] fill-current\" />\n </span>\n )}\n </span>\n )\n })\n }\n</div>\n",
13
13
  "type": "registry:ui"
14
14
  },
15
15
  {
@@ -13,5 +13,6 @@ const { class: className, ...props } = Astro.props
13
13
  <Button class={cn(className)} data-slot="dialog-close" {...props}>
14
14
  <slot>
15
15
  <X />
16
+ <span class="sr-only">Close</span>
16
17
  </slot>
17
18
  </Button>
@@ -8,10 +8,20 @@ type Props = HTMLAttributes<"div"> & {
8
8
  value?: number
9
9
  }
10
10
 
11
- const { value = 5, class: className, ...props } = Astro.props
11
+ const {
12
+ value = 5,
13
+ class: className,
14
+ "aria-label": ariaLabel = `Rated ${value} out of 5`,
15
+ ...props
16
+ } = Astro.props
12
17
  ---
13
18
 
14
- <div class={cn("flex items-center gap-1 text-base", className)} {...props}>
19
+ <div
20
+ role="img"
21
+ aria-label={ariaLabel}
22
+ class={cn("flex items-center gap-1 text-base", className)}
23
+ {...props}
24
+ >
15
25
  {
16
26
  Array.from({ length: 5 }).map((_, index) => {
17
27
  const fillPercentage =
@@ -22,7 +32,10 @@ const { value = 5, class: className, ...props } = Astro.props
22
32
  : 0
23
33
 
24
34
  return (
25
- <span class="text-muted-foreground/25 relative inline-flex size-[1em]">
35
+ <span
36
+ aria-hidden="true"
37
+ class="text-muted-foreground/25 relative inline-flex size-[1em]"
38
+ >
26
39
  <Star class="size-[1em] fill-current" />
27
40
  {fillPercentage > 0 && (
28
41
  <span