fulldev-ui 0.25.4 → 0.25.5
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 +8 -0
- package/README.md +7 -0
- package/package.json +8 -6
- package/public/r/styles/base-luma/article-1.json +1 -1
- package/public/r/styles/base-luma/articles-1.json +1 -1
- package/public/r/styles/base-luma/checkbox-examples.json +3 -3
- package/public/r/styles/base-luma/content-1.json +1 -1
- package/public/r/styles/base-luma/content-2.json +1 -1
- package/public/r/styles/base-luma/content-4.json +1 -1
- package/public/r/styles/base-luma/cta-5.json +1 -1
- package/public/r/styles/base-luma/header-1.json +1 -1
- package/public/r/styles/base-luma/hero-1.json +1 -1
- package/public/r/styles/base-luma/hero-4.json +1 -1
- package/public/r/styles/base-luma/hero-5.json +1 -1
- package/public/r/styles/base-luma/hero-6.json +1 -1
- package/public/r/styles/base-luma/hero-7.json +1 -1
- package/public/r/styles/base-luma/hero-9.json +1 -1
- package/public/r/styles/base-luma/pricing-1.json +1 -1
- package/public/r/styles/base-luma/pricing-2.json +1 -1
- package/public/r/styles/base-luma/pricing-3.json +1 -1
- package/public/r/styles/base-lyra/article-1.json +1 -1
- package/public/r/styles/base-lyra/articles-1.json +1 -1
- package/public/r/styles/base-lyra/checkbox-examples.json +3 -3
- package/public/r/styles/base-lyra/content-1.json +1 -1
- package/public/r/styles/base-lyra/content-2.json +1 -1
- package/public/r/styles/base-lyra/content-4.json +1 -1
- package/public/r/styles/base-lyra/cta-5.json +1 -1
- package/public/r/styles/base-lyra/header-1.json +1 -1
- package/public/r/styles/base-lyra/hero-1.json +1 -1
- package/public/r/styles/base-lyra/hero-4.json +1 -1
- package/public/r/styles/base-lyra/hero-5.json +1 -1
- package/public/r/styles/base-lyra/hero-6.json +1 -1
- package/public/r/styles/base-lyra/hero-7.json +1 -1
- package/public/r/styles/base-lyra/hero-9.json +1 -1
- package/public/r/styles/base-lyra/pricing-1.json +1 -1
- package/public/r/styles/base-lyra/pricing-2.json +1 -1
- package/public/r/styles/base-lyra/pricing-3.json +1 -1
- package/public/r/styles/base-maia/article-1.json +1 -1
- package/public/r/styles/base-maia/articles-1.json +1 -1
- package/public/r/styles/base-maia/checkbox-examples.json +3 -3
- package/public/r/styles/base-maia/content-1.json +1 -1
- package/public/r/styles/base-maia/content-2.json +1 -1
- package/public/r/styles/base-maia/content-4.json +1 -1
- package/public/r/styles/base-maia/cta-5.json +1 -1
- package/public/r/styles/base-maia/header-1.json +1 -1
- package/public/r/styles/base-maia/hero-1.json +1 -1
- package/public/r/styles/base-maia/hero-4.json +1 -1
- package/public/r/styles/base-maia/hero-5.json +1 -1
- package/public/r/styles/base-maia/hero-6.json +1 -1
- package/public/r/styles/base-maia/hero-7.json +1 -1
- package/public/r/styles/base-maia/hero-9.json +1 -1
- package/public/r/styles/base-maia/pricing-1.json +1 -1
- package/public/r/styles/base-maia/pricing-2.json +1 -1
- package/public/r/styles/base-maia/pricing-3.json +1 -1
- package/public/r/styles/base-mira/article-1.json +1 -1
- package/public/r/styles/base-mira/articles-1.json +1 -1
- package/public/r/styles/base-mira/checkbox-examples.json +3 -3
- package/public/r/styles/base-mira/content-1.json +1 -1
- package/public/r/styles/base-mira/content-2.json +1 -1
- package/public/r/styles/base-mira/content-4.json +1 -1
- package/public/r/styles/base-mira/cta-5.json +1 -1
- package/public/r/styles/base-mira/header-1.json +1 -1
- package/public/r/styles/base-mira/hero-1.json +1 -1
- package/public/r/styles/base-mira/hero-4.json +1 -1
- package/public/r/styles/base-mira/hero-5.json +1 -1
- package/public/r/styles/base-mira/hero-6.json +1 -1
- package/public/r/styles/base-mira/hero-7.json +1 -1
- package/public/r/styles/base-mira/hero-9.json +1 -1
- package/public/r/styles/base-mira/pricing-1.json +1 -1
- package/public/r/styles/base-mira/pricing-2.json +1 -1
- package/public/r/styles/base-mira/pricing-3.json +1 -1
- package/public/r/styles/base-nova/article-1.json +1 -1
- package/public/r/styles/base-nova/articles-1.json +1 -1
- package/public/r/styles/base-nova/checkbox-examples.json +3 -3
- package/public/r/styles/base-nova/content-1.json +1 -1
- package/public/r/styles/base-nova/content-2.json +1 -1
- package/public/r/styles/base-nova/content-4.json +1 -1
- package/public/r/styles/base-nova/cta-5.json +1 -1
- package/public/r/styles/base-nova/header-1.json +1 -1
- package/public/r/styles/base-nova/hero-1.json +1 -1
- package/public/r/styles/base-nova/hero-4.json +1 -1
- package/public/r/styles/base-nova/hero-5.json +1 -1
- package/public/r/styles/base-nova/hero-6.json +1 -1
- package/public/r/styles/base-nova/hero-7.json +1 -1
- package/public/r/styles/base-nova/hero-9.json +1 -1
- package/public/r/styles/base-nova/pricing-1.json +1 -1
- package/public/r/styles/base-nova/pricing-2.json +1 -1
- package/public/r/styles/base-nova/pricing-3.json +1 -1
- package/public/r/styles/base-rhea/article-1.json +1 -1
- package/public/r/styles/base-rhea/articles-1.json +1 -1
- package/public/r/styles/base-rhea/checkbox-examples.json +3 -3
- package/public/r/styles/base-rhea/content-1.json +1 -1
- package/public/r/styles/base-rhea/content-2.json +1 -1
- package/public/r/styles/base-rhea/content-4.json +1 -1
- package/public/r/styles/base-rhea/cta-5.json +1 -1
- package/public/r/styles/base-rhea/header-1.json +1 -1
- package/public/r/styles/base-rhea/hero-1.json +1 -1
- package/public/r/styles/base-rhea/hero-4.json +1 -1
- package/public/r/styles/base-rhea/hero-5.json +1 -1
- package/public/r/styles/base-rhea/hero-6.json +1 -1
- package/public/r/styles/base-rhea/hero-7.json +1 -1
- package/public/r/styles/base-rhea/hero-9.json +1 -1
- package/public/r/styles/base-rhea/pricing-1.json +1 -1
- package/public/r/styles/base-rhea/pricing-2.json +1 -1
- package/public/r/styles/base-rhea/pricing-3.json +1 -1
- package/public/r/styles/base-sera/article-1.json +1 -1
- package/public/r/styles/base-sera/articles-1.json +1 -1
- package/public/r/styles/base-sera/checkbox-examples.json +3 -3
- package/public/r/styles/base-sera/content-1.json +1 -1
- package/public/r/styles/base-sera/content-2.json +1 -1
- package/public/r/styles/base-sera/content-4.json +1 -1
- package/public/r/styles/base-sera/cta-5.json +1 -1
- package/public/r/styles/base-sera/header-1.json +1 -1
- package/public/r/styles/base-sera/hero-1.json +1 -1
- package/public/r/styles/base-sera/hero-4.json +1 -1
- package/public/r/styles/base-sera/hero-5.json +1 -1
- package/public/r/styles/base-sera/hero-6.json +1 -1
- package/public/r/styles/base-sera/hero-7.json +1 -1
- package/public/r/styles/base-sera/hero-9.json +1 -1
- package/public/r/styles/base-sera/pricing-1.json +1 -1
- package/public/r/styles/base-sera/pricing-2.json +1 -1
- package/public/r/styles/base-sera/pricing-3.json +1 -1
- package/public/r/styles/base-vega/article-1.json +1 -1
- package/public/r/styles/base-vega/articles-1.json +1 -1
- package/public/r/styles/base-vega/checkbox-examples.json +3 -3
- package/public/r/styles/base-vega/content-1.json +1 -1
- package/public/r/styles/base-vega/content-2.json +1 -1
- package/public/r/styles/base-vega/content-4.json +1 -1
- package/public/r/styles/base-vega/cta-5.json +1 -1
- package/public/r/styles/base-vega/header-1.json +1 -1
- package/public/r/styles/base-vega/hero-1.json +1 -1
- package/public/r/styles/base-vega/hero-4.json +1 -1
- package/public/r/styles/base-vega/hero-5.json +1 -1
- package/public/r/styles/base-vega/hero-6.json +1 -1
- package/public/r/styles/base-vega/hero-7.json +1 -1
- package/public/r/styles/base-vega/hero-9.json +1 -1
- package/public/r/styles/base-vega/pricing-1.json +1 -1
- package/public/r/styles/base-vega/pricing-2.json +1 -1
- package/public/r/styles/base-vega/pricing-3.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.25.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#325](https://github.com/fulldotdev/ui/pull/325) [`57e3ff2`](https://github.com/fulldotdev/ui/commit/57e3ff25f89ea0e97f47725d62bf36c92c72246e) Thanks [@silveltman](https://github.com/silveltman)! - Import each icon in the Content, CTA, Hero and Pricing blocks from its own path, so a page loads only the icons it uses instead of all of Lucide.
|
|
8
|
+
|
|
9
|
+
- [#323](https://github.com/fulldotdev/ui/pull/323) [`cec3667`](https://github.com/fulldotdev/ui/commit/cec3667f28590b0beedd9100b8b0573abf865fac) Thanks [@silveltman](https://github.com/silveltman)! - Serve AVIF images with WebP fallbacks in Hero1, Article1 and Articles1, preserving responsive sizes and image priority.
|
|
10
|
+
|
|
3
11
|
## 0.25.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -102,6 +102,13 @@ pnpm registry:build # regenerates public/r after registry changes
|
|
|
102
102
|
|
|
103
103
|
`vp run check` runs Prettier, TypeScript and `astro check`, ESLint, knip, the source photo check, and, specific to this registry, `registry:check` (the committed `public/r` must match a fresh build). `vp run test:unit` runs the tests in `tests`.
|
|
104
104
|
|
|
105
|
+
`vp run og` regenerates the per-page Open Graph screenshots in `public/og/`.
|
|
106
|
+
Run it after changing a page's opening content and commit the JPEGs. It
|
|
107
|
+
uses Playwright's Chromium; `CHROME` can point to an existing test-browser
|
|
108
|
+
executable and `OG_PORT` sets its local preview port. The normal build
|
|
109
|
+
checks image coverage and dimensions without launching a browser. See
|
|
110
|
+
[DESIGN.md](DESIGN.md) for the screenshot treatment.
|
|
111
|
+
|
|
105
112
|
`pnpm ui:add` formats the project right after the install, so a later `vp run fix` or `vp run check` does not change the installed components. A plain `pnpm dlx shadcn@latest add` leaves the CLI's own formatting, which the next format run may change.
|
|
106
113
|
|
|
107
114
|
## Contributing
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fulldev-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.25.
|
|
4
|
+
"version": "0.25.5",
|
|
5
5
|
"description": "Open-source UI components for Astro, React and native Liquid",
|
|
6
6
|
"homepage": "https://ui.full.dev",
|
|
7
7
|
"bugs": "https://github.com/fulldotdev/ui/issues",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"imports": {
|
|
45
45
|
"#styles": "./scripts/styles.mjs",
|
|
46
46
|
"#liquid-fixture": "./tests/helpers/liquid.mjs",
|
|
47
|
-
"#analytics-
|
|
47
|
+
"#analytics-privacy": "./src/lib/analytics-privacy.js"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@astrojs/check": "^0.9.10",
|
|
@@ -78,9 +78,11 @@
|
|
|
78
78
|
"@data-slot/toggle-group": "^1.1.2",
|
|
79
79
|
"@data-slot/tooltip": "^1.1.2",
|
|
80
80
|
"@eslint/js": "^10.0.1",
|
|
81
|
+
"@fulldotdev/check": "0.4.0",
|
|
81
82
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
82
83
|
"@lexingtonthemes/seo": "^0.4.0",
|
|
83
84
|
"@lucide/astro": "^1.49.0",
|
|
85
|
+
"@netlify/vite-plugin": "3.0.1",
|
|
84
86
|
"@shopify/prettier-plugin-liquid": "1.11.2",
|
|
85
87
|
"@shopify/theme-check-node": "3.30.1",
|
|
86
88
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -100,7 +102,6 @@
|
|
|
100
102
|
"globals": "^17.13.0",
|
|
101
103
|
"html-validate": "^11.16.1",
|
|
102
104
|
"knip": "^6.39.0",
|
|
103
|
-
"linkinator": "^8.1.0",
|
|
104
105
|
"liquidjs": "10.27.2",
|
|
105
106
|
"lucide-static": "^1.49.0",
|
|
106
107
|
"playwright": "1.64.0",
|
|
@@ -114,8 +115,7 @@
|
|
|
114
115
|
"tailwindcss": "^4.3.3",
|
|
115
116
|
"tw-animate-css": "^1.4.0",
|
|
116
117
|
"typescript": "~6.0.3",
|
|
117
|
-
"typescript-eslint": "^8.71.0"
|
|
118
|
-
"@netlify/vite-plugin": "3.0.1"
|
|
118
|
+
"typescript-eslint": "^8.71.0"
|
|
119
119
|
},
|
|
120
120
|
"scripts": {
|
|
121
121
|
"astro": "astro",
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
"test:browser": "node --test tests/browser/*.test.mjs",
|
|
128
128
|
"fix": "prettier --write . && eslint . --fix",
|
|
129
129
|
"images": "node scripts/images.ts",
|
|
130
|
+
"og": "node scripts/og.ts",
|
|
130
131
|
"ui:add": "node scripts/ui-add.ts",
|
|
131
132
|
"build": "astro build && pnpm --dir react build && node scripts/check-build.ts",
|
|
132
133
|
"a11y": "pnpm build && playwright install chromium --only-shell && node scripts/a11y.mjs",
|
|
@@ -137,6 +138,7 @@
|
|
|
137
138
|
"release:publish": "pnpm registry:check && changeset publish",
|
|
138
139
|
"registry:meta": "node scripts/registry-meta.mjs",
|
|
139
140
|
"registry:liquid": "node scripts/registry-liquid.mjs && shadcn build -c liquid -o ../public/r/liquid",
|
|
140
|
-
"test": "vp run test:unit"
|
|
141
|
+
"test": "vp run test:unit",
|
|
142
|
+
"audit:build": "fulldev-check"
|
|
141
143
|
}
|
|
142
144
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/blocks/article-1.astro",
|
|
13
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport {
|
|
13
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Picture } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n author: {\n image?: ImageMetadata\n initials: string\n name: string\n date: string\n }\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n author,\n image,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"max-w-2xl\">\n <article class=\"flex flex-col gap-8\">\n <header class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <h1 class=\"text-4xl leading-tight font-semibold tracking-tight text-balance sm:text-5xl\">\n {title}\n </h1>\n <p class=\"text-muted-foreground text-lg leading-8 text-balance\">\n {description}\n </p>\n </div>\n <div class=\"flex items-center gap-3\">\n <Avatar size=\"lg\" aria-hidden=\"true\">\n <AvatarImage src={author.image} />\n <AvatarFallback>{author.initials}</AvatarFallback>\n </Avatar>\n <div class=\"flex flex-col\">\n <p class=\"text-sm font-medium\">{author.name}</p>\n <p class=\"text-muted-foreground text-xs\">{author.date}</p>\n </div>\n </div>\n </header>\n <Picture\n src={image.src}\n alt={image.alt}\n formats={\n [\"svg\", \"gif\"].includes(image.src.format)\n ? [image.src.format as \"svg\" | \"gif\"]\n : [\"avif\", \"webp\"]\n }\n fallbackFormat={\n [\"svg\", \"gif\"].includes(image.src.format)\n ? (image.src.format as \"svg\" | \"gif\")\n : \"webp\"\n }\n pictureAttributes={{ class: \"contents [&>source]:hidden\" }}\n class=\"aspect-[16/10] w-full rounded-xl object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 42rem) 42rem, 100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n <div class=\"flex flex-col gap-6 text-base leading-8\">\n <slot />\n </div>\n </article>\n </SectionContainer>\n</Section>\n",
|
|
14
14
|
"type": "registry:block"
|
|
15
15
|
}
|
|
16
16
|
],
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/blocks/articles-1.astro",
|
|
13
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport {
|
|
13
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Picture } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport {\n Section,\n SectionContainer,\n SectionTitle,\n} from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n articles: {\n image: {\n src: ImageMetadata\n alt: string\n }\n category: string\n title: string\n description: string\n href?: string\n author: {\n image?: ImageMetadata\n initials: string\n name: string\n date: string\n }\n }[]\n}\n\nconst { class: className, title, description, articles, ...props } = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"flex flex-col gap-8\">\n <div class=\"flex max-w-2xl flex-col gap-4\">\n <SectionTitle>{title}</SectionTitle>\n <p class=\"text-muted-foreground text-base leading-7\">{description}</p>\n </div>\n\n <div class=\"grid gap-6 md:grid-cols-2 lg:grid-cols-3\">\n {articles.map((article) => {\n const Wrapper = article.href != null ? \"a\" : \"div\"\n return (\n <Wrapper\n href={article.href}\n class={cn(\n \"flex h-full flex-col gap-4 rounded-xl p-4\",\n article.href != null &&\n \"group hover:bg-muted/50 focus-visible:ring-ring/50 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n )}\n >\n <Picture\n src={article.image.src}\n alt={article.image.alt}\n formats={\n [\"svg\", \"gif\"].includes(article.image.src.format)\n ? [article.image.src.format as \"svg\" | \"gif\"]\n : [\"avif\", \"webp\"]\n }\n fallbackFormat={\n [\"svg\", \"gif\"].includes(article.image.src.format)\n ? (article.image.src.format as \"svg\" | \"gif\")\n : \"webp\"\n }\n pictureAttributes={{ class: \"contents [&>source]:hidden\" }}\n class=\"-mx-4 -mt-4 aspect-[16/9] w-[calc(100%+2rem)] max-w-none rounded-lg object-cover transition-opacity group-hover:opacity-85\"\n widths={[480, 720, 960]}\n sizes=\"(min-width: 64rem) 26rem, (min-width: 48rem) 50vw, 100vw\"\n />\n <div class=\"flex flex-col gap-2\">\n <p class=\"text-muted-foreground text-sm font-medium\">\n {article.category}\n </p>\n <h3 class=\"text-foreground line-clamp-2 text-xl leading-snug font-semibold\">\n {article.title}\n </h3>\n <p class=\"text-muted-foreground line-clamp-2 text-sm leading-6\">\n {article.description}\n </p>\n </div>\n <div class=\"mt-auto flex items-center gap-3\">\n <Avatar aria-hidden=\"true\">\n <AvatarImage src={article.author.image} />\n <AvatarFallback>{article.author.initials}</AvatarFallback>\n </Avatar>\n <div class=\"flex flex-col\">\n <p class=\"text-sm font-medium\">{article.author.name}</p>\n <p class=\"text-muted-foreground text-xs\">\n {article.author.date}\n </p>\n </div>\n </div>\n </Wrapper>\n )\n })}\n </div>\n </SectionContainer>\n</Section>\n",
|
|
14
14
|
"type": "registry:block"
|
|
15
15
|
}
|
|
16
16
|
],
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"path": "src/components/examples/checkbox/checkbox-demo.astro",
|
|
20
|
-
"content": "---\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldTitle,\n} from \"@/components/ui/field\"\nimport { Label } from \"@/components/ui/label\"\n---\n\n<FieldGroup class=\"max-w-sm\">\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox\" name=\"terms-checkbox\" />\n <Label for=\"terms-checkbox\">Accept terms and conditions</Label>\n </Field>\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox-2\" name=\"terms-checkbox-2\" checked />\n <FieldContent>\n <FieldLabel for=\"terms-checkbox-2\">\n Accept terms and conditions\n </FieldLabel>\n <FieldDescription>\n By clicking this checkbox, you agree to the terms.\n </FieldDescription>\n </FieldContent>\n </Field>\n <Field orientation=\"horizontal\" data-disabled>\n <Checkbox id=\"toggle-checkbox\" name=\"toggle-checkbox\" disabled />\n <FieldLabel for=\"toggle-checkbox\">Enable notifications</FieldLabel>\n </Field>\n <FieldLabel>\n <Field as=\"span\" orientation=\"horizontal\">\n <Checkbox
|
|
20
|
+
"content": "---\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldTitle,\n} from \"@/components/ui/field\"\nimport { Label } from \"@/components/ui/label\"\n---\n\n<FieldGroup class=\"max-w-sm\">\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox\" name=\"terms-checkbox\" />\n <Label for=\"terms-checkbox\">Accept terms and conditions</Label>\n </Field>\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox-2\" name=\"terms-checkbox-2\" checked />\n <FieldContent>\n <FieldLabel for=\"terms-checkbox-2\">\n Accept terms and conditions\n </FieldLabel>\n <FieldDescription>\n By clicking this checkbox, you agree to the terms.\n </FieldDescription>\n </FieldContent>\n </Field>\n <Field orientation=\"horizontal\" data-disabled>\n <Checkbox id=\"toggle-checkbox\" name=\"toggle-checkbox\" disabled />\n <FieldLabel for=\"toggle-checkbox\">Enable notifications</FieldLabel>\n </Field>\n <FieldLabel for=\"toggle-checkbox-2\">\n <Field as=\"span\" orientation=\"horizontal\">\n <Checkbox\n id=\"toggle-checkbox-2\"\n name=\"toggle-checkbox-2\"\n aria-labelledby=\"toggle-checkbox-2-title\"\n aria-describedby=\"toggle-checkbox-2-description\"\n />\n <FieldContent as=\"span\">\n <FieldTitle as=\"span\" id=\"toggle-checkbox-2-title\">\n Enable notifications\n </FieldTitle>\n <FieldDescription as=\"span\" id=\"toggle-checkbox-2-description\">\n You can enable or disable notifications at any time.\n </FieldDescription>\n </FieldContent>\n </Field>\n </FieldLabel>\n</FieldGroup>\n",
|
|
21
21
|
"type": "registry:component"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "src/components/examples/checkbox/checkbox-rtl.astro",
|
|
45
|
-
"content": "---\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldTitle,\n} from \"@/components/ui/field\"\nimport { Label } from \"@/components/ui/label\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n acceptTerms: \"Accept terms and conditions\",\n acceptTermsDescription:\n \"By clicking this checkbox, you agree to the terms.\",\n enableNotifications: \"Enable notifications\",\n enableNotificationsDescription:\n \"You can enable or disable notifications at any time.\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n acceptTerms: \"قبول الشروط والأحكام\",\n acceptTermsDescription: \"بالنقر على هذا المربع، فإنك توافق على الشروط.\",\n enableNotifications: \"تفعيل الإشعارات\",\n enableNotificationsDescription:\n \"يمكنك تفعيل أو إلغاء تفعيل الإشعارات في أي وقت.\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n acceptTerms: \"קבל תנאים והגבלות\",\n acceptTermsDescription:\n \"על ידי לחיצה על תיבת הסימון הזו, אתה מסכים לתנאים.\",\n enableNotifications: \"הפעל התראות\",\n enableNotificationsDescription:\n \"אתה יכול להפעיל או להשבית התראות בכל עת.\",\n },\n },\n}\n\nconst { dir, values: t } = translations.ar\n---\n\n<FieldGroup class=\"max-w-sm\" dir={dir}>\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox-rtl\" name=\"terms-checkbox\" />\n <Label for=\"terms-checkbox-rtl\">{t.acceptTerms}</Label>\n </Field>\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox-2-rtl\" name=\"terms-checkbox-2\" checked />\n <FieldContent>\n <FieldLabel for=\"terms-checkbox-2-rtl\">{t.acceptTerms}</FieldLabel>\n <FieldDescription>{t.acceptTermsDescription}</FieldDescription>\n </FieldContent>\n </Field>\n <Field orientation=\"horizontal\" data-disabled>\n <Checkbox id=\"toggle-checkbox-rtl\" name=\"toggle-checkbox\" disabled />\n <FieldLabel for=\"toggle-checkbox-rtl\">{t.enableNotifications}</FieldLabel>\n </Field>\n <FieldLabel>\n <Field as=\"span\" orientation=\"horizontal\">\n <Checkbox
|
|
45
|
+
"content": "---\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldTitle,\n} from \"@/components/ui/field\"\nimport { Label } from \"@/components/ui/label\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n acceptTerms: \"Accept terms and conditions\",\n acceptTermsDescription:\n \"By clicking this checkbox, you agree to the terms.\",\n enableNotifications: \"Enable notifications\",\n enableNotificationsDescription:\n \"You can enable or disable notifications at any time.\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n acceptTerms: \"قبول الشروط والأحكام\",\n acceptTermsDescription: \"بالنقر على هذا المربع، فإنك توافق على الشروط.\",\n enableNotifications: \"تفعيل الإشعارات\",\n enableNotificationsDescription:\n \"يمكنك تفعيل أو إلغاء تفعيل الإشعارات في أي وقت.\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n acceptTerms: \"קבל תנאים והגבלות\",\n acceptTermsDescription:\n \"על ידי לחיצה על תיבת הסימון הזו, אתה מסכים לתנאים.\",\n enableNotifications: \"הפעל התראות\",\n enableNotificationsDescription:\n \"אתה יכול להפעיל או להשבית התראות בכל עת.\",\n },\n },\n}\n\nconst { dir, values: t } = translations.ar\n---\n\n<FieldGroup class=\"max-w-sm\" dir={dir}>\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox-rtl\" name=\"terms-checkbox\" />\n <Label for=\"terms-checkbox-rtl\">{t.acceptTerms}</Label>\n </Field>\n <Field orientation=\"horizontal\">\n <Checkbox id=\"terms-checkbox-2-rtl\" name=\"terms-checkbox-2\" checked />\n <FieldContent>\n <FieldLabel for=\"terms-checkbox-2-rtl\">{t.acceptTerms}</FieldLabel>\n <FieldDescription>{t.acceptTermsDescription}</FieldDescription>\n </FieldContent>\n </Field>\n <Field orientation=\"horizontal\" data-disabled>\n <Checkbox id=\"toggle-checkbox-rtl\" name=\"toggle-checkbox\" disabled />\n <FieldLabel for=\"toggle-checkbox-rtl\">{t.enableNotifications}</FieldLabel>\n </Field>\n <FieldLabel for=\"toggle-checkbox-rtl-2\">\n <Field as=\"span\" orientation=\"horizontal\">\n <Checkbox\n id=\"toggle-checkbox-rtl-2\"\n name=\"toggle-checkbox-2\"\n aria-labelledby=\"toggle-checkbox-rtl-2-title\"\n aria-describedby=\"toggle-checkbox-rtl-2-description\"\n />\n <FieldContent as=\"span\">\n <FieldTitle as=\"span\" id=\"toggle-checkbox-rtl-2-title\">\n {t.enableNotifications}\n </FieldTitle>\n <FieldDescription as=\"span\" id=\"toggle-checkbox-rtl-2-description\">\n {t.enableNotificationsDescription}\n </FieldDescription>\n </FieldContent>\n </Field>\n </FieldLabel>\n</FieldGroup>\n",
|
|
46
46
|
"type": "registry:component"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"path": "src/components/examples/checkbox/checkbox-table.astro",
|
|
50
|
-
"content": "---\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\"\n\nconst tableData = [\n {\n id: \"1\",\n name: \"Sarah Chen\",\n email: \"sarah.chen@example.com\",\n role: \"Admin\",\n },\n {\n id: \"2\",\n name: \"Marcus Rodriguez\",\n email: \"marcus.rodriguez@example.com\",\n role: \"User\",\n },\n {\n id: \"3\",\n name: \"Priya Patel\",\n email: \"priya.patel@example.com\",\n role: \"User\",\n },\n {\n id: \"4\",\n name: \"David Kim\",\n email: \"david.kim@example.com\",\n role: \"Editor\",\n },\n]\n\nconst selectedRows = new Set([\"1\"])\n---\n\n<Table data-checkbox-table>\n <TableHeader>\n <TableRow>\n <TableHead class=\"w-8\">\n <Checkbox\n id=\"select-all-checkbox\"\n name=\"select-all-checkbox\"\n checked={selectedRows.size === tableData.length}\n data-select-all\n />\n </TableHead>\n <TableHead>Name</TableHead>\n <TableHead>Email</TableHead>\n <TableHead>Role</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {tableData.map((row) => (\n <TableRow data-state={selectedRows.has(row.id) ? \"selected\" : undefined}>\n <TableCell>\n <Checkbox\n id={`row-${row.id}-checkbox`}\n name={`row-${row.id}-checkbox`}\n checked={selectedRows.has(row.id)}\n data-select-row\n />\n </TableCell>\n <TableCell class=\"font-medium\">{row.name}</TableCell>\n <TableCell>{row.email}</TableCell>\n <TableCell>{row.role}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n</Table>\n\n<script>\n const initialize = () => {\n for (const table of document.querySelectorAll(\"[data-checkbox-table]\")) {\n if (table.hasAttribute(\"data-bound\")) continue\n table.setAttribute(\"data-bound\", \"\")\n const all = table.querySelector<HTMLInputElement>(\"[data-select-all]\")\n const rows = [\n ...table.querySelectorAll<HTMLInputElement>(\"[data-select-row]\"),\n ]\n const update = () => {\n for (const row of rows) {\n const tr = row.closest(\"tr\")\n if (row.checked) tr?.setAttribute(\"data-state\", \"selected\")\n else tr?.removeAttribute(\"data-state\")\n }\n if (all) all.checked = rows.every((row) => row.checked)\n }\n all?.addEventListener(\"change\", () => {\n for (const row of rows) row.checked = all.checked\n update()\n })\n for (const row of rows) row.addEventListener(\"change\", update)\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
|
|
50
|
+
"content": "---\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\"\n\nconst tableData = [\n {\n id: \"1\",\n name: \"Sarah Chen\",\n email: \"sarah.chen@example.com\",\n role: \"Admin\",\n },\n {\n id: \"2\",\n name: \"Marcus Rodriguez\",\n email: \"marcus.rodriguez@example.com\",\n role: \"User\",\n },\n {\n id: \"3\",\n name: \"Priya Patel\",\n email: \"priya.patel@example.com\",\n role: \"User\",\n },\n {\n id: \"4\",\n name: \"David Kim\",\n email: \"david.kim@example.com\",\n role: \"Editor\",\n },\n]\n\nconst selectedRows = new Set([\"1\"])\n---\n\n<Table data-checkbox-table>\n <TableHeader>\n <TableRow>\n <TableHead class=\"w-8\">\n <Checkbox\n id=\"select-all-checkbox\"\n name=\"select-all-checkbox\"\n aria-label=\"Select all rows\"\n checked={selectedRows.size === tableData.length}\n data-select-all\n />\n </TableHead>\n <TableHead>Name</TableHead>\n <TableHead>Email</TableHead>\n <TableHead>Role</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {tableData.map((row) => (\n <TableRow data-state={selectedRows.has(row.id) ? \"selected\" : undefined}>\n <TableCell>\n <Checkbox\n id={`row-${row.id}-checkbox`}\n name={`row-${row.id}-checkbox`}\n aria-label={`Select ${row.name}`}\n checked={selectedRows.has(row.id)}\n data-select-row\n />\n </TableCell>\n <TableCell class=\"font-medium\">{row.name}</TableCell>\n <TableCell>{row.email}</TableCell>\n <TableCell>{row.role}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n</Table>\n\n<script>\n const initialize = () => {\n for (const table of document.querySelectorAll(\"[data-checkbox-table]\")) {\n if (table.hasAttribute(\"data-bound\")) continue\n table.setAttribute(\"data-bound\", \"\")\n const all = table.querySelector<HTMLInputElement>(\"[data-select-all]\")\n const rows = [\n ...table.querySelectorAll<HTMLInputElement>(\"[data-select-row]\"),\n ]\n const update = () => {\n for (const row of rows) {\n const tr = row.closest(\"tr\")\n if (row.checked) tr?.setAttribute(\"data-state\", \"selected\")\n else tr?.removeAttribute(\"data-state\")\n }\n if (all) all.checked = rows.every((row) => row.checked)\n }\n all?.addEventListener(\"change\", () => {\n for (const row of rows) row.checked = all.checked\n update()\n })\n for (const row of rows) row.addEventListener(\"change\", update)\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
|
|
51
51
|
"type": "registry:component"
|
|
52
52
|
}
|
|
53
53
|
],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "src/components/blocks/content-1.astro",
|
|
16
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
16
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Section,\n SectionContainer,\n SectionDescription,\n SectionTitle,\n} from \"@/components/ui/section\"\nimport PlaceholderImage from \"@/assets/placeholder.svg\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n image?: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n image = { src: PlaceholderImage, alt: \"\" },\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <SectionTitle>{title}</SectionTitle>\n <SectionDescription>{description}</SectionDescription>\n </div>\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n </SectionContainer>\n <SectionContainer>\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-video w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280, 1536]}\n sizes=\"(min-width: 80rem) 80rem, 100vw\"\n />\n </SectionContainer>\n</Section>\n",
|
|
17
17
|
"type": "registry:block"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "src/components/blocks/content-2.astro",
|
|
16
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
16
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Section,\n SectionContainer,\n SectionDescription,\n SectionTitle,\n} from \"@/components/ui/section\"\nimport PlaceholderImage from \"@/assets/placeholder.svg\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n image?: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n image = { src: PlaceholderImage, alt: \"\" },\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"grid gap-12 lg:grid-cols-2 lg:items-center\">\n <div class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <SectionTitle>{title}</SectionTitle>\n <SectionDescription>{description}</SectionDescription>\n </div>\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n </div>\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[4/3] w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 80rem) 600px, (min-width: 64rem) 50vw, 100vw\"\n />\n </SectionContainer>\n</Section>\n",
|
|
17
17
|
"type": "registry:block"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "src/components/blocks/content-4.astro",
|
|
16
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
16
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Section,\n SectionContainer,\n SectionDescription,\n SectionTitle,\n} from \"@/components/ui/section\"\nimport PlaceholderImage from \"@/assets/placeholder.svg\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n image?: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n image = { src: PlaceholderImage, alt: \"\" },\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer>\n <div class=\"grid gap-12 lg:grid-cols-[1fr_2fr] lg:items-center\">\n <div class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <SectionTitle>{title}</SectionTitle>\n <SectionDescription>{description}</SectionDescription>\n </div>\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n </div>\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[4/3] w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 80rem) 800px, (min-width: 64rem) 66vw, 100vw\"\n />\n </div>\n </SectionContainer>\n</Section>\n",
|
|
17
17
|
"type": "registry:block"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "src/components/blocks/cta-5.astro",
|
|
16
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
16
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Section,\n SectionContainer,\n SectionTitle,\n} from \"@/components/ui/section\"\nimport PlaceholderImage from \"@/assets/placeholder.svg\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n image?: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n image = { src: PlaceholderImage, alt: \"\" },\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"grid gap-12 lg:grid-cols-2 lg:items-center\">\n <div class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <SectionTitle class=\"leading-[1.1]\">{title}</SectionTitle>\n <p class=\"text-muted-foreground text-lg leading-relaxed\">\n {description}\n </p>\n </div>\n {features.length > 0 && (\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n )}\n {buttons.length > 0 && (\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"outline\"}\n >\n {label}\n </Button>\n ))}\n </div>\n )}\n </div>\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[4/3] w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 80rem) 600px, (min-width: 64rem) 50vw, 100vw\"\n />\n </SectionContainer>\n</Section>\n",
|
|
17
17
|
"type": "registry:block"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
{
|
|
19
19
|
"path": "src/components/blocks/header-1.astro",
|
|
20
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n---\n\n<Header class={cn(\"\", className)} {...props}>\n <HeaderContainer class=\"items-center justify-between gap-4\">\n <HeaderGroup>\n <Logo href={logo.href}>\n <LogoImage\n src={logo.src}\n srcLight={logo.srcLight}\n srcDark={logo.srcDark}\n alt=\"\"\n />\n <LogoText>{logo.label}</LogoText>\n </Logo>\n </HeaderGroup>\n <NavigationMenu\n
|
|
20
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n---\n\n<Header class={cn(\"\", className)} {...props}>\n <HeaderContainer class=\"items-center justify-between gap-4\">\n <HeaderGroup>\n <Logo href={logo.href}>\n <LogoImage\n src={logo.src}\n srcLight={logo.srcLight}\n srcDark={logo.srcDark}\n alt=\"\"\n />\n <LogoText>{logo.label}</LogoText>\n </Logo>\n </HeaderGroup>\n {navigation.length > 0 && (\n <NavigationMenu\n aria-label={navigationLabel}\n class=\"hidden flex-none justify-start lg:flex\"\n >\n <NavigationMenuList class=\"justify-start\">\n {navigation.map((item, index) => (\n <NavigationMenuItem value={`nav-${index}`}>\n <NavigationMenuLink href={item.href} active={item.active}>\n {item.label}\n </NavigationMenuLink>\n </NavigationMenuItem>\n ))}\n </NavigationMenuList>\n </NavigationMenu>\n )}\n <HeaderGroup class=\"ml-auto hidden flex-1 justify-end lg:flex\">\n {buttons.map(({ label, href, icon, target }, index) => (\n <Button\n as=\"a\"\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noreferrer\" : undefined}\n size=\"sm\"\n variant={index === buttons.length - 1 ? \"default\" : \"ghost\"}\n >\n {icon && <Icon name={icon} />}\n {label}\n </Button>\n ))}\n </HeaderGroup>\n <Sheet class=\"lg:hidden\">\n <SheetTrigger\n variant=\"ghost\"\n size=\"icon-sm\"\n class=\"ml-auto\"\n aria-label={menu.label}\n >\n <Icon name=\"menu\" />\n </SheetTrigger>\n <SheetContent side=\"right\" showCloseButton={false} class=\"p-0\">\n <SheetHeader class=\"sr-only\">\n <SheetTitle>{menu.title}</SheetTitle>\n <SheetDescription>{menu.description}</SheetDescription>\n </SheetHeader>\n <div class=\"flex h-full flex-col gap-6 px-4 py-12\">\n <nav aria-label={menu.title} class=\"flex flex-col gap-1\">\n {navigation.map((item) => (\n <SheetClose\n as=\"a\"\n href={item.href}\n aria-current={item.active ? \"page\" : undefined}\n variant=\"ghost\"\n class=\"justify-start\"\n >\n {item.label}\n </SheetClose>\n ))}\n </nav>\n {buttons.length > 0 && (\n <div class=\"mt-auto flex flex-col gap-2\">\n {buttons.map(({ label, href, icon, target }, index) => (\n <SheetClose\n as=\"a\"\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noreferrer\" : undefined}\n variant={index === buttons.length - 1 ? \"default\" : \"outline\"}\n >\n {icon && <Icon name={icon} />}\n {label}\n </SheetClose>\n ))}\n </div>\n )}\n </div>\n <SheetClose\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class=\"absolute top-4 right-4 bg-secondary\"\n >\n <XIcon />\n <span class=\"sr-only\">{menu.closeLabel}</span>\n </SheetClose>\n </SheetContent>\n </Sheet>\n </HeaderContainer>\n</Header>\n",
|
|
21
21
|
"type": "registry:block"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
{
|
|
13
13
|
"path": "src/components/blocks/hero-1.astro",
|
|
14
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport {
|
|
14
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Picture } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Section,\n SectionContainer,\n SectionDescription,\n} from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n badge?: {\n label: string\n href: string\n }\n buttons: {\n label: string\n href: string\n }[]\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n badge,\n buttons,\n image,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"flex flex-col items-center gap-8 text-center\">\n {badge && (\n <Badge as=\"a\" href={badge.href} variant=\"secondary\">\n {badge.label}\n </Badge>\n )}\n <h1 class=\"text-foreground max-w-4xl text-4xl leading-[1.1] font-semibold tracking-tight text-balance sm:text-5xl lg:text-6xl\">\n {title}\n </h1>\n <SectionDescription class=\"max-w-2xl\">{description}</SectionDescription>\n <div class=\"flex flex-wrap justify-center gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n </SectionContainer>\n <SectionContainer>\n <Picture\n src={image.src}\n alt={image.alt}\n formats={\n [\"svg\", \"gif\"].includes(image.src.format)\n ? [image.src.format as \"svg\" | \"gif\"]\n : [\"avif\", \"webp\"]\n }\n fallbackFormat={\n [\"svg\", \"gif\"].includes(image.src.format)\n ? (image.src.format as \"svg\" | \"gif\")\n : \"webp\"\n }\n pictureAttributes={{ class: \"contents [&>source]:hidden\" }}\n class=\"aspect-video w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280, 1536]}\n sizes=\"(min-width: 80rem) 80rem, 100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n </SectionContainer>\n</Section>\n",
|
|
15
15
|
"type": "registry:block"
|
|
16
16
|
}
|
|
17
17
|
],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "src/components/blocks/hero-4.astro",
|
|
16
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
16
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n image: {\n src: ImageMetadata\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n image,\n ...props\n} = Astro.props\n---\n\n<Section\n class={cn(\n \"dark bg-background text-foreground min-h-screen justify-center\",\n className\n )}\n {...props}\n>\n <SectionContainer class=\"flex flex-col relative z-10 items-center gap-8 text-center\">\n <h1 class=\"text-foreground max-w-4xl text-4xl leading-[1.1] font-semibold tracking-tight text-balance sm:text-5xl lg:text-6xl\">\n {title}\n </h1>\n <p class=\"text-foreground/80 max-w-2xl text-lg leading-relaxed text-balance\">\n {description}\n </p>\n <ul class=\"flex flex-wrap justify-center gap-x-6 gap-y-2\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-2 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap justify-center gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n </SectionContainer>\n <div class=\"bg-background pointer-events-none absolute inset-0\">\n <Image\n src={image.src}\n alt=\"\"\n class=\"size-full object-cover opacity-50\"\n widths={[640, 960, 1280, 1920]}\n sizes=\"100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n </div>\n</Section>\n",
|
|
17
17
|
"type": "registry:block"
|
|
18
18
|
}
|
|
19
19
|
],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/blocks/hero-5.astro",
|
|
18
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
18
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarImage,\n} from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport { Rating } from \"@/components/ui/rating\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n socialProof: {\n avatars: {\n image?: ImageMetadata\n initials: string\n }[]\n rating: number\n ratingLabel: string\n text: string\n }\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n socialProof,\n image,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"grid gap-12 lg:grid-cols-2 lg:items-center\">\n <div class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <h1 class=\"text-foreground text-4xl leading-[1.1] font-semibold tracking-tight text-balance sm:text-5xl\">\n {title}\n </h1>\n <p class=\"text-muted-foreground text-lg leading-relaxed\">\n {description}\n </p>\n </div>\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n <div class=\"flex items-center gap-3\">\n <AvatarGroup aria-hidden=\"true\">\n {socialProof.avatars.map((avatar) => (\n <Avatar class=\"ring-background size-11 ring\">\n <AvatarImage src={avatar.image} />\n <AvatarFallback>{avatar.initials}</AvatarFallback>\n </Avatar>\n ))}\n </AvatarGroup>\n <div class=\"flex flex-col gap-0.5\">\n <Rating\n value={socialProof.rating}\n aria-label={socialProof.ratingLabel}\n />\n <span class=\"text-muted-foreground text-xs\">{socialProof.text}</span>\n </div>\n </div>\n </div>\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[4/3] w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 80rem) 600px, (min-width: 64rem) 50vw, 100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n </SectionContainer>\n</Section>\n",
|
|
19
19
|
"type": "registry:block"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/blocks/hero-6.astro",
|
|
18
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
18
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarImage,\n} from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport { Rating } from \"@/components/ui/rating\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n socialProof: {\n avatars: {\n image?: ImageMetadata\n initials: string\n }[]\n rating: number\n ratingLabel: string\n text: string\n }\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n socialProof,\n image,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"grid gap-12 lg:grid-cols-2 lg:items-center\">\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[4/3] w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 80rem) 600px, (min-width: 64rem) 50vw, 100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n <div class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <h1 class=\"text-foreground text-4xl leading-[1.1] font-semibold tracking-tight text-balance sm:text-5xl\">\n {title}\n </h1>\n <p class=\"text-muted-foreground text-lg leading-relaxed\">\n {description}\n </p>\n </div>\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n <div class=\"flex items-center gap-3\">\n <AvatarGroup aria-hidden=\"true\">\n {socialProof.avatars.map((avatar) => (\n <Avatar class=\"ring-background size-11 ring\">\n <AvatarImage src={avatar.image} />\n <AvatarFallback>{avatar.initials}</AvatarFallback>\n </Avatar>\n ))}\n </AvatarGroup>\n <div class=\"flex flex-col gap-0.5\">\n <Rating\n value={socialProof.rating}\n aria-label={socialProof.ratingLabel}\n />\n <span class=\"text-muted-foreground text-xs\">{socialProof.text}</span>\n </div>\n </div>\n </div>\n </SectionContainer>\n</Section>\n",
|
|
19
19
|
"type": "registry:block"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/blocks/hero-7.astro",
|
|
18
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
18
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarImage,\n} from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport { Rating } from \"@/components/ui/rating\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n socialProof: {\n avatars: {\n image?: ImageMetadata\n initials: string\n }[]\n rating: number\n ratingLabel: string\n text: string\n }\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n socialProof,\n image,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"grid gap-12 lg:grid-cols-[2fr_3fr] lg:items-center lg:gap-0\">\n <div class=\"flex flex-col gap-6 lg:pr-12\">\n <div class=\"flex flex-col gap-4\">\n <h1 class=\"text-foreground text-4xl leading-[1.1] font-semibold tracking-tight text-balance sm:text-5xl\">\n {title}\n </h1>\n <p class=\"text-muted-foreground text-lg leading-relaxed\">\n {description}\n </p>\n </div>\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n <div class=\"flex items-center gap-3\">\n <AvatarGroup aria-hidden=\"true\">\n {socialProof.avatars.map((avatar) => (\n <Avatar class=\"ring-background size-11 ring\">\n <AvatarImage src={avatar.image} />\n <AvatarFallback>{avatar.initials}</AvatarFallback>\n </Avatar>\n ))}\n </AvatarGroup>\n <div class=\"flex flex-col gap-0.5\">\n <Rating\n value={socialProof.rating}\n aria-label={socialProof.ratingLabel}\n />\n <span class=\"text-muted-foreground text-xs\">{socialProof.text}</span>\n </div>\n </div>\n </div>\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[4/3] w-full rounded-xl border object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 80rem) 750px, (min-width: 64rem) 60vw, 100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n </SectionContainer>\n</Section>\n",
|
|
19
19
|
"type": "registry:block"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/blocks/hero-9.astro",
|
|
18
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
18
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarGroup,\n AvatarImage,\n} from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport { Rating } from \"@/components/ui/rating\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n features: string[]\n buttons: {\n label: string\n href: string\n }[]\n socialProof: {\n avatars: {\n image?: ImageMetadata\n initials: string\n }[]\n rating: number\n ratingLabel: string\n text: string\n }\n image: {\n src: ImageMetadata\n }\n}\n\nconst {\n class: className,\n title,\n description,\n features,\n buttons,\n socialProof,\n image,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"dark bg-background text-foreground\", className)} {...props}>\n <SectionContainer class=\"grid gap-12 lg:grid-cols-2 lg:items-center\">\n <div class=\"relative z-10 flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <h1 class=\"text-foreground text-4xl leading-[1.1] font-semibold tracking-tight text-balance sm:text-5xl\">\n {title}\n </h1>\n <p class=\"text-foreground/80 text-lg leading-relaxed\">{description}</p>\n </div>\n <ul class=\"flex flex-col gap-3\">\n {features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n <div class=\"flex flex-wrap gap-3\">\n {buttons.map(({ href, label }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"lg\"\n variant={index === 0 ? \"default\" : \"secondary\"}\n >\n {label}\n </Button>\n ))}\n </div>\n <div class=\"flex items-center gap-3\">\n <AvatarGroup aria-hidden=\"true\">\n {socialProof.avatars.map((avatar) => (\n <Avatar class=\"ring-background size-11 ring\">\n <AvatarImage src={avatar.image} />\n <AvatarFallback>{avatar.initials}</AvatarFallback>\n </Avatar>\n ))}\n </AvatarGroup>\n <div class=\"flex flex-col gap-0.5\">\n <Rating\n value={socialProof.rating}\n aria-label={socialProof.ratingLabel}\n />\n <span class=\"text-muted-foreground text-xs\">{socialProof.text}</span>\n </div>\n </div>\n </div>\n </SectionContainer>\n <div class=\"bg-background pointer-events-none absolute inset-0 lg:mask-l-from-30%\">\n <Image\n src={image.src}\n alt=\"\"\n class=\"size-full object-cover opacity-50\"\n widths={[640, 960, 1280, 1920]}\n sizes=\"100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n </div>\n</Section>\n",
|
|
19
19
|
"type": "registry:block"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
{
|
|
19
19
|
"path": "src/components/blocks/pricing-1.astro",
|
|
20
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
20
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { Price, PriceUnit, PriceValue } from \"@/components/ui/price\"\nimport {\n Section,\n SectionContainer,\n SectionDescription,\n SectionTitle,\n} from \"@/components/ui/section\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n featuredLabel: string\n locale?: string\n discountLabel?: string\n plans: {\n name: string\n description: string\n price: {\n value: number\n compareAt?: number\n currency: string\n unit: string\n }\n featured?: boolean\n features: string[]\n button: {\n label: string\n href: string\n }\n }[]\n}\n\nconst {\n class: className,\n title,\n description,\n featuredLabel,\n locale,\n discountLabel,\n plans,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"flex flex-col items-center gap-8 text-center\">\n <div class=\"flex max-w-2xl flex-col items-center gap-4\">\n <SectionTitle>{title}</SectionTitle>\n <SectionDescription>{description}</SectionDescription>\n </div>\n </SectionContainer>\n <SectionContainer>\n <div class=\"mx-auto grid w-full grid-cols-1 justify-center gap-6 sm:grid-cols-2 lg:grid-cols-[repeat(auto-fit,minmax(16rem,18rem))]\">\n {plans.map((plan) => (\n <Card\n class={cn(\"flex flex-col\", plan.featured && \"ring-primary ring-2\")}\n >\n <CardHeader>\n <div class=\"flex items-center gap-2\">\n <CardTitle as=\"h3\">{plan.name}</CardTitle>\n {plan.featured && <Badge>{featuredLabel}</Badge>}\n </div>\n <CardDescription>{plan.description}</CardDescription>\n </CardHeader>\n <CardContent class=\"flex flex-col gap-6\">\n <Price>\n <PriceValue\n price={plan.price.value}\n compareAt={plan.price.compareAt}\n currency={plan.price.currency}\n locale={locale}\n discountLabel={discountLabel}\n />\n <PriceUnit>{plan.price.unit}</PriceUnit>\n </Price>\n <Separator />\n <ul class=\"flex flex-col gap-3\">\n {plan.features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n </CardContent>\n <CardFooter class=\"mt-auto\">\n <Button\n as=\"a\"\n href={plan.button.href}\n variant={plan.featured ? \"default\" : \"outline\"}\n class=\"w-full\"\n >\n {plan.button.label}\n </Button>\n </CardFooter>\n </Card>\n ))}\n </div>\n </SectionContainer>\n</Section>\n",
|
|
21
21
|
"type": "registry:block"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
{
|
|
18
18
|
"path": "src/components/blocks/pricing-2.astro",
|
|
19
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
19
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { Price, PriceUnit, PriceValue } from \"@/components/ui/price\"\nimport {\n Section,\n SectionContainer,\n SectionDescription,\n SectionTitle,\n} from \"@/components/ui/section\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n locale?: string\n discountLabel?: string\n plans: {\n name: string\n description: string\n price: {\n value: number\n compareAt?: number\n currency: string\n unit: string\n }\n featured?: boolean\n features: string[]\n button: {\n label: string\n href: string\n }\n }[]\n}\n\nconst {\n class: className,\n title,\n description,\n locale,\n discountLabel,\n plans,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"flex flex-col gap-8\">\n <div class=\"mx-auto max-w-2xl text-center\">\n <SectionTitle>{title}</SectionTitle>\n <SectionDescription class=\"mt-4\">{description}</SectionDescription>\n </div>\n <div class=\"mx-auto grid w-full justify-center gap-6 sm:grid-cols-2 lg:grid-cols-[repeat(auto-fit,minmax(16rem,18rem))]\">\n {plans.map((plan) => (\n <Card class=\"flex flex-col border-none shadow-none\">\n <CardHeader>\n <CardTitle as=\"h3\">{plan.name}</CardTitle>\n <CardDescription>{plan.description}</CardDescription>\n </CardHeader>\n <CardContent class=\"flex flex-col gap-6\">\n <Price>\n <PriceValue\n price={plan.price.value}\n compareAt={plan.price.compareAt}\n currency={plan.price.currency}\n locale={locale}\n discountLabel={discountLabel}\n />\n <PriceUnit>{plan.price.unit}</PriceUnit>\n </Price>\n <Separator />\n <ul class=\"flex flex-col gap-3\">\n {plan.features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n </CardContent>\n <CardFooter class=\"mt-auto\">\n <Button\n as=\"a\"\n href={plan.button.href}\n variant={plan.featured ? \"default\" : \"outline\"}\n class=\"w-full\"\n >\n {plan.button.label}\n </Button>\n </CardFooter>\n </Card>\n ))}\n </div>\n </SectionContainer>\n</Section>\n",
|
|
20
20
|
"type": "registry:block"
|
|
21
21
|
}
|
|
22
22
|
],
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
{
|
|
19
19
|
"path": "src/components/blocks/pricing-3.astro",
|
|
20
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport
|
|
20
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CheckIcon from \"@lucide/astro/icons/check\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { Price, PriceUnit, PriceValue } from \"@/components/ui/price\"\nimport {\n Section,\n SectionContainer,\n SectionDescription,\n SectionTitle,\n} from \"@/components/ui/section\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n badge: string\n title: string\n description: string\n locale?: string\n discountLabel?: string\n offer: {\n name: string\n description: string\n price: {\n value: number\n compareAt?: number\n currency: string\n unit: string\n }\n features: string[]\n button: {\n label: string\n href: string\n }\n }\n}\n\nconst {\n class: className,\n badge,\n title,\n description,\n locale,\n discountLabel,\n offer,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"flex flex-col items-center gap-8 text-center\">\n <div class=\"flex max-w-2xl flex-col items-center gap-4\">\n <Badge variant=\"secondary\">{badge}</Badge>\n <SectionTitle>{title}</SectionTitle>\n <SectionDescription>{description}</SectionDescription>\n </div>\n <Card class=\"ring-primary w-full max-w-md ring-2\">\n <CardHeader class=\"text-left\">\n <CardTitle as=\"h3\">{offer.name}</CardTitle>\n <CardDescription>{offer.description}</CardDescription>\n </CardHeader>\n <CardContent class=\"flex flex-col gap-6 text-left\">\n <Price>\n <PriceValue\n price={offer.price.value}\n compareAt={offer.price.compareAt}\n currency={offer.price.currency}\n locale={locale}\n discountLabel={discountLabel}\n />\n <PriceUnit>{offer.price.unit}</PriceUnit>\n </Price>\n <Separator />\n <ul class=\"flex flex-col gap-3\">\n {offer.features.map((feature) => (\n <li class=\"flex items-start gap-3 text-sm\">\n <CheckIcon class=\"text-primary mt-0.5 size-4 shrink-0\" />\n {feature}\n </li>\n ))}\n </ul>\n </CardContent>\n <CardFooter>\n <Button as=\"a\" href={offer.button.href} class=\"w-full\">\n {offer.button.label}\n </Button>\n </CardFooter>\n </Card>\n </SectionContainer>\n</Section>\n",
|
|
21
21
|
"type": "registry:block"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/blocks/article-1.astro",
|
|
13
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport {
|
|
13
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Picture } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n title: string\n description: string\n author: {\n image?: ImageMetadata\n initials: string\n name: string\n date: string\n }\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n author,\n image,\n ...props\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)} {...props}>\n <SectionContainer class=\"max-w-2xl\">\n <article class=\"flex flex-col gap-8\">\n <header class=\"flex flex-col gap-6\">\n <div class=\"flex flex-col gap-4\">\n <h1 class=\"text-4xl leading-tight font-semibold tracking-tight text-balance sm:text-5xl\">\n {title}\n </h1>\n <p class=\"text-muted-foreground text-lg leading-8 text-balance\">\n {description}\n </p>\n </div>\n <div class=\"flex items-center gap-3\">\n <Avatar size=\"lg\" aria-hidden=\"true\">\n <AvatarImage src={author.image} />\n <AvatarFallback>{author.initials}</AvatarFallback>\n </Avatar>\n <div class=\"flex flex-col\">\n <p class=\"text-sm font-medium\">{author.name}</p>\n <p class=\"text-muted-foreground text-xs\">{author.date}</p>\n </div>\n </div>\n </header>\n <Picture\n src={image.src}\n alt={image.alt}\n formats={\n [\"svg\", \"gif\"].includes(image.src.format)\n ? [image.src.format as \"svg\" | \"gif\"]\n : [\"avif\", \"webp\"]\n }\n fallbackFormat={\n [\"svg\", \"gif\"].includes(image.src.format)\n ? (image.src.format as \"svg\" | \"gif\")\n : \"webp\"\n }\n pictureAttributes={{ class: \"contents [&>source]:hidden\" }}\n class=\"aspect-[16/10] w-full rounded-xl object-cover\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 42rem) 42rem, 100vw\"\n loading=\"eager\"\n fetchpriority=\"high\"\n />\n <div class=\"flex flex-col gap-6 text-base leading-8\">\n <slot />\n </div>\n </article>\n </SectionContainer>\n</Section>\n",
|
|
14
14
|
"type": "registry:block"
|
|
15
15
|
}
|
|
16
16
|
],
|