fulldev-ui 0.17.2 → 0.17.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.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/public/r/command.json +1 -1
- package/public/r/dialog.json +1 -1
- package/public/r/field.json +1 -1
- package/public/r/navigation-menu.json +1 -1
- package/public/r/rating.json +1 -1
- package/public/r/styles/base-luma/command.json +1 -1
- package/public/r/styles/base-luma/dialog.json +1 -1
- package/public/r/styles/base-luma/field.json +1 -1
- package/public/r/styles/base-luma/navigation-menu.json +1 -1
- package/public/r/styles/base-luma/rating.json +1 -1
- package/public/r/styles/base-lyra/command.json +1 -1
- package/public/r/styles/base-lyra/dialog.json +1 -1
- package/public/r/styles/base-lyra/field.json +1 -1
- package/public/r/styles/base-lyra/navigation-menu.json +1 -1
- package/public/r/styles/base-lyra/rating.json +1 -1
- package/public/r/styles/base-maia/command.json +1 -1
- package/public/r/styles/base-maia/dialog.json +1 -1
- package/public/r/styles/base-maia/field.json +1 -1
- package/public/r/styles/base-maia/navigation-menu.json +1 -1
- package/public/r/styles/base-maia/rating.json +1 -1
- package/public/r/styles/base-mira/command.json +1 -1
- package/public/r/styles/base-mira/dialog.json +1 -1
- package/public/r/styles/base-mira/field.json +1 -1
- package/public/r/styles/base-mira/navigation-menu.json +1 -1
- package/public/r/styles/base-mira/rating.json +1 -1
- package/public/r/styles/base-nova/command.json +1 -1
- package/public/r/styles/base-nova/dialog.json +1 -1
- package/public/r/styles/base-nova/field.json +1 -1
- package/public/r/styles/base-nova/navigation-menu.json +1 -1
- package/public/r/styles/base-nova/rating.json +1 -1
- package/public/r/styles/base-rhea/command.json +1 -1
- package/public/r/styles/base-rhea/dialog.json +1 -1
- package/public/r/styles/base-rhea/field.json +1 -1
- package/public/r/styles/base-rhea/navigation-menu.json +1 -1
- package/public/r/styles/base-rhea/rating.json +1 -1
- package/public/r/styles/base-sera/command.json +1 -1
- package/public/r/styles/base-sera/dialog.json +1 -1
- package/public/r/styles/base-sera/field.json +1 -1
- package/public/r/styles/base-sera/navigation-menu.json +1 -1
- package/public/r/styles/base-sera/rating.json +1 -1
- package/public/r/styles/base-vega/command.json +1 -1
- package/public/r/styles/base-vega/dialog.json +1 -1
- package/public/r/styles/base-vega/field.json +1 -1
- package/public/r/styles/base-vega/navigation-menu.json +1 -1
- package/public/r/styles/base-vega/rating.json +1 -1
- package/src/components/ui/command/command-item.astro +1 -1
- package/src/components/ui/dialog/dialog-close.astro +1 -0
- package/src/components/ui/field/field-label.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu-positioner.astro +1 -1
- package/src/components/ui/rating/rating.astro +16 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.17.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#252](https://github.com/fulldotdev/ui/pull/252) [`cd76b28`](https://github.com/fulldotdev/ui/commit/cd76b28df0b327b720cc05effddb2c06dfef9b7c) Thanks [@silveltman](https://github.com/silveltman)! - Field choice cards now show their selected state for checked native checkboxes, command items that are links get the pointer cursor without underline (the `href:` variant did not exist), and the navigation menu popup drops a class for a nonexistent `xs` breakpoint.
|
|
8
|
+
|
|
9
|
+
## 0.17.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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`).
|
|
14
|
+
|
|
3
15
|
## 0.17.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
package/public/r/command.json
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:**:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:**:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
package/public/r/dialog.json
CHANGED
|
@@ -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
|
{
|
package/public/r/field.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-primary/5 has-[[data-checked],:checked]:border-primary/30 dark:has-[[data-checked],:checked]:border-primary/20 dark:has-[[data-checked],:checked]:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
package/public/r/rating.json
CHANGED
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none in-data-[slot=dialog-content]:rounded-3xl [&_svg:not([class*='size-'])]:size-4 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none in-data-[slot=dialog-content]:rounded-3xl [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-input/30 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-4 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-input/30 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-4 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/5 dark:ring-foreground/10 rounded-3xl shadow-lg ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/5 dark:ring-foreground/10 rounded-3xl shadow-lg ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none in-data-[slot=dialog-content]:rounded-none! [&_svg:not([class*='size-'])]:size-4 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none in-data-[slot=dialog-content]:rounded-none! [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-1 *:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-primary/5 has-[[data-checked],:checked]:border-primary/30 dark:has-[[data-checked],:checked]:border-primary/20 dark:has-[[data-checked],:checked]:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-1 *:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-none shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-none shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl [&_svg:not([class*='size-'])]:size-4 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-[3px] *:data-[slot=field]:p-4 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-primary/5 has-[[data-checked],:checked]:border-primary/30 dark:has-[[data-checked],:checked]:border-primary/20 dark:has-[[data-checked],:checked]:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-[3px] *:data-[slot=field]:p-4 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/5 rounded-2xl shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/5 rounded-2xl shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2.5 py-1.5 text-xs/relaxed outline-hidden select-none in-data-[slot=dialog-content]:rounded-md [&_svg:not([class*='size-'])]:size-3.5 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2.5 py-1.5 text-xs/relaxed outline-hidden select-none in-data-[slot=dialog-content]:rounded-md [&_svg:not([class*='size-'])]:size-3.5 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-primary/5 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/30 has-[>[data-slot=field]]:has-[:focus-visible]:ring-2 *:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-primary/5 dark:has-[[data-checked],:checked]:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/30 has-[>[data-slot=field]]:has-[:focus-visible]:ring-2 *:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-xl shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-xl shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-primary/5 has-[[data-checked],:checked]:border-primary/30 dark:has-[[data-checked],:checked]:border-primary/20 dark:has-[[data-checked],:checked]:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 min-h-7 rounded-xl px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl [&_svg:not([class*='size-'])]:size-4 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 min-h-7 rounded-xl px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-input/30 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-4 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-input/30 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-4 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/5 dark:ring-foreground/10 rounded-3xl shadow-lg ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/5 dark:ring-foreground/10 rounded-3xl shadow-lg ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-none [&_svg:not([class*='size-'])]:size-3.5 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-none [&_svg:not([class*='size-'])]:size-3.5 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/30 has-[>[data-slot=field]]:has-[:focus-visible]:ring-2 *:data-[slot=field]:p-4 leading-relaxed group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-primary/5 has-[[data-checked],:checked]:border-primary/30 dark:has-[[data-checked],:checked]:border-primary/20 dark:has-[[data-checked],:checked]:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/30 has-[>[data-slot=field]]:has-[:focus-visible]:ring-2 *:data-[slot=field]:p-4 leading-relaxed group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-none shadow-md ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-none shadow-md ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "src/components/ui/command/command-item.astro",
|
|
47
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:**:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item
|
|
47
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n disabled?: boolean\n href?: string\n value?: string\n label?: string\n keywords?: string | string[]\n forceMount?: boolean\n}\n\nconst {\n class: className,\n disabled,\n href,\n value,\n label,\n keywords,\n forceMount,\n ...props\n} = Astro.props\n\nconst Tag = href ? \"a\" : \"div\"\nconst keywordsValue = Array.isArray(keywords) ? keywords.join(\", \") : keywords\n---\n\n<Tag\n data-slot=\"command-item\"\n data-disabled={disabled ? \"true\" : undefined}\n data-value={value}\n data-label={label}\n data-keywords={keywordsValue}\n data-force-mount={forceMount ? \"true\" : undefined}\n href={href}\n class={cn(\n \"data-selected:bg-muted data-selected:text-foreground data-selected:**:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline\",\n className\n )}\n {...props}\n>\n <slot />\n <CheckIcon\n class=\"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100\"\n />\n</Tag>\n",
|
|
48
48
|
"type": "registry:ui"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -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
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "src/components/ui/field/field-label.astro",
|
|
38
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
38
|
+
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/components/ui/label\"\n\ntype Props = ComponentProps<typeof Label>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Label\n data-slot=\"field-label\"\n class={cn(\n \"has-[[data-checked],:checked]:bg-primary/5 has-[[data-checked],:checked]:border-primary/30 dark:has-[[data-checked],:checked]:border-primary/20 dark:has-[[data-checked],:checked]:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className\n )}\n {...props}\n>\n <slot />\n</Label>\n",
|
|
39
39
|
"type": "registry:ui"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"path": "src/components/ui/navigation-menu/navigation-menu-positioner.astro",
|
|
53
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0
|
|
53
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n}\n\nconst {\n class: className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n} = Astro.props\n---\n\n<div data-slot=\"navigation-menu-portal\">\n <div\n {...props}\n data-slot=\"navigation-menu-positioner\"\n data-side={side}\n data-side-offset={sideOffset}\n data-align={align}\n data-align-offset={alignOffset}\n class={cn(\n \"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0\",\n className\n )}\n >\n <div\n data-slot=\"navigation-menu-popup\"\n hidden\n class=\"bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]\"\n >\n <div\n data-slot=\"navigation-menu-viewport\"\n hidden\n class=\"relative size-full overflow-hidden\"\n >\n </div>\n </div>\n </div>\n</div>\n",
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -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 {
|
|
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
|
{
|
|
@@ -37,7 +37,7 @@ const keywordsValue = Array.isArray(keywords) ? keywords.join(", ") : keywords
|
|
|
37
37
|
data-force-mount={forceMount ? "true" : undefined}
|
|
38
38
|
href={href}
|
|
39
39
|
class={cn(
|
|
40
|
-
"cn-command-item group/command-item
|
|
40
|
+
"cn-command-item group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[href]]:cursor-pointer [&[href]]:no-underline",
|
|
41
41
|
className
|
|
42
42
|
)}
|
|
43
43
|
{...props}
|
|
@@ -12,7 +12,7 @@ const { class: className, ...props } = Astro.props
|
|
|
12
12
|
<Label
|
|
13
13
|
data-slot="field-label"
|
|
14
14
|
class={cn(
|
|
15
|
-
"cn-field-label group/field-label peer/field-label flex w-fit",
|
|
15
|
+
"cn-fd-field-label group/field-label peer/field-label flex w-fit",
|
|
16
16
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
@@ -36,7 +36,7 @@ const {
|
|
|
36
36
|
<div
|
|
37
37
|
data-slot="navigation-menu-popup"
|
|
38
38
|
hidden
|
|
39
|
-
class="cn-navigation-menu-popup
|
|
39
|
+
class="cn-navigation-menu-popup relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] data-ending-style:ease-[ease]"
|
|
40
40
|
>
|
|
41
41
|
<div
|
|
42
42
|
data-slot="navigation-menu-viewport"
|
|
@@ -8,10 +8,20 @@ type Props = HTMLAttributes<"div"> & {
|
|
|
8
8
|
value?: number
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const {
|
|
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
|
|
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
|
|
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
|