fulldev-ui 0.9.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +100 -16
- package/package.json +3 -2
- package/public/r/accordion.json +3 -5
- package/public/r/alert-dialog.json +1 -1
- package/public/r/alert.json +0 -5
- package/public/r/article-1.json +1 -1
- package/public/r/article-2.json +1 -1
- package/public/r/articles-1.json +1 -1
- package/public/r/articles-2.json +1 -1
- package/public/r/articles-3.json +1 -1
- package/public/r/avatar.json +1 -16
- package/public/r/badge.json +1 -1
- package/public/r/banner-1.json +5 -3
- package/public/r/banner-2.json +1 -1
- package/public/r/banner.json +5 -3
- package/public/r/blocks-1.json +6 -3
- package/public/r/breadcrumb.json +4 -4
- package/public/r/button.json +1 -1
- package/public/r/card.json +4 -4
- package/public/r/carousel.json +5 -5
- package/public/r/checkbox.json +1 -1
- package/public/r/combobox.json +8 -8
- package/public/r/command.json +6 -6
- package/public/r/components.json +1 -7
- package/public/r/contact-1.json +4 -2
- package/public/r/contact-2.json +4 -2
- package/public/r/contact-3.json +11 -3
- package/public/r/content-1.json +11 -3
- package/public/r/content-2.json +11 -3
- package/public/r/content-3.json +7 -1
- package/public/r/content-4.json +11 -3
- package/public/r/cta-2.json +7 -1
- package/public/r/cta-4.json +7 -1
- package/public/r/cta-5.json +11 -3
- package/public/r/cta-6.json +7 -1
- package/public/r/dialog.json +6 -6
- package/public/r/doc-1.json +6 -3
- package/public/r/dropdown-menu.json +9 -11
- package/public/r/features-1.json +5 -3
- package/public/r/features-2.json +5 -3
- package/public/r/features-4.json +5 -3
- package/public/r/features-5.json +4 -2
- package/public/r/field.json +2 -7
- package/public/r/footer-1.json +5 -3
- package/public/r/footer-2.json +5 -3
- package/public/r/footer-3.json +5 -3
- package/public/r/header-1.json +1 -1
- package/public/r/header.json +3 -0
- package/public/r/hero-13.json +1 -1
- package/public/r/hero-4.json +5 -3
- package/public/r/hero-5.json +5 -3
- package/public/r/hero-6.json +5 -3
- package/public/r/hero-7.json +5 -3
- package/public/r/hero-8.json +1 -1
- package/public/r/hero-9.json +5 -3
- package/public/r/hover-card.json +2 -2
- package/public/r/icon.json +1 -1
- package/public/r/input-group.json +1 -1
- package/public/r/item.json +2 -20
- package/public/r/kbd.json +2 -2
- package/public/r/layout.json +4 -7
- package/public/r/links-2.json +5 -3
- package/public/r/marquee.json +1 -1
- package/public/r/native-select.json +3 -3
- package/public/r/navigation-menu.json +6 -8
- package/public/r/page.json +17 -0
- package/public/r/popover.json +1 -1
- package/public/r/pricing-1.json +5 -3
- package/public/r/pricing-2.json +5 -3
- package/public/r/pricing-3.json +5 -3
- package/public/r/products-1.json +1 -1
- package/public/r/products-4.json +1 -1
- package/public/r/products-5.json +1 -1
- package/public/r/radio-group.json +1 -1
- package/public/r/rating.json +3 -3
- package/public/r/registry.json +186 -450
- package/public/r/reviews-1.json +5 -3
- package/public/r/reviews-2.json +5 -3
- package/public/r/reviews-3.json +5 -3
- package/public/r/reviews-4.json +1 -1
- package/public/r/reviews-5.json +5 -3
- package/public/r/select.json +6 -8
- package/public/r/services-1.json +11 -3
- package/public/r/services-2.json +7 -1
- package/public/r/services-3.json +7 -1
- package/public/r/services-4.json +11 -3
- package/public/r/services-5.json +5 -3
- package/public/r/services-6.json +11 -3
- package/public/r/services-7.json +11 -3
- package/public/r/sheet.json +6 -3
- package/public/r/sidebar-1.json +4 -2
- package/public/r/sidebar.json +10 -7
- package/public/r/slider.json +1 -1
- package/public/r/spinner.json +3 -3
- package/public/r/switch.json +1 -1
- package/public/r/theme-toggle.json +5 -3
- package/public/r/tooltip.json +1 -1
- package/public/r/typography.json +16 -16
- package/public/r/video.json +1 -1
- package/registry.json +186 -450
- package/src/components/blocks/article-1.astro +1 -1
- package/src/components/blocks/article-2.astro +1 -1
- package/src/components/blocks/articles-1.astro +1 -1
- package/src/components/blocks/articles-2.astro +2 -2
- package/src/components/blocks/articles-3.astro +1 -1
- package/src/components/blocks/banner-1.astro +3 -5
- package/src/components/blocks/banner-2.astro +1 -1
- package/src/components/blocks/blocks-1.astro +25 -37
- package/src/components/blocks/contact-3.astro +4 -3
- package/src/components/blocks/content-1.astro +5 -4
- package/src/components/blocks/content-2.astro +6 -5
- package/src/components/blocks/content-3.astro +9 -2
- package/src/components/blocks/content-4.astro +6 -5
- package/src/components/blocks/cta-2.astro +4 -3
- package/src/components/blocks/cta-4.astro +3 -2
- package/src/components/blocks/cta-5.astro +6 -5
- package/src/components/blocks/cta-6.astro +4 -3
- package/src/components/blocks/doc-1.astro +28 -56
- package/src/components/blocks/features-1.astro +3 -1
- package/src/components/blocks/features-2.astro +4 -2
- package/src/components/blocks/features-4.astro +3 -1
- package/src/components/blocks/footer-1.astro +26 -12
- package/src/components/blocks/footer-2.astro +24 -12
- package/src/components/blocks/footer-3.astro +26 -12
- package/src/components/blocks/header-1.astro +2 -3
- package/src/components/blocks/hero-13.astro +1 -1
- package/src/components/blocks/hero-4.astro +2 -2
- package/src/components/blocks/hero-5.astro +3 -3
- package/src/components/blocks/hero-6.astro +3 -3
- package/src/components/blocks/hero-7.astro +3 -3
- package/src/components/blocks/hero-8.astro +1 -1
- package/src/components/blocks/hero-9.astro +2 -2
- package/src/components/blocks/links-2.astro +3 -5
- package/src/components/blocks/pricing-1.astro +3 -2
- package/src/components/blocks/pricing-2.astro +3 -2
- package/src/components/blocks/pricing-3.astro +3 -2
- package/src/components/blocks/products-1.astro +1 -1
- package/src/components/blocks/products-4.astro +2 -2
- package/src/components/blocks/products-5.astro +4 -4
- package/src/components/blocks/reviews-1.astro +2 -2
- package/src/components/blocks/reviews-2.astro +2 -2
- package/src/components/blocks/reviews-3.astro +2 -2
- package/src/components/blocks/reviews-4.astro +4 -4
- package/src/components/blocks/reviews-5.astro +16 -25
- package/src/components/blocks/services-1.astro +7 -9
- package/src/components/blocks/services-2.astro +5 -4
- package/src/components/blocks/services-3.astro +6 -5
- package/src/components/blocks/services-4.astro +7 -9
- package/src/components/blocks/services-5.astro +3 -4
- package/src/components/blocks/services-6.astro +7 -6
- package/src/components/blocks/services-7.astro +7 -9
- package/src/components/blocks/sidebar-1.astro +42 -97
- package/src/components/ui/accordion/accordion-trigger.astro +7 -8
- package/src/components/ui/alert-dialog/alert-dialog.astro +23 -3
- package/src/components/ui/avatar/avatar.astro +1 -1
- package/src/components/ui/badge/badge.astro +1 -0
- package/src/components/ui/banner/banner-container.astro +3 -3
- package/src/components/ui/breadcrumb/breadcrumb-ellipsis.astro +2 -2
- package/src/components/ui/breadcrumb/breadcrumb-separator.astro +2 -2
- package/src/components/ui/button/button-variants.ts +8 -7
- package/src/components/ui/card/card-content.astro +1 -1
- package/src/components/ui/card/card-footer.astro +1 -1
- package/src/components/ui/card/card-header.astro +1 -1
- package/src/components/ui/card/card.astro +1 -1
- package/src/components/ui/carousel/carousel-next.astro +3 -3
- package/src/components/ui/carousel/carousel-previous.astro +3 -3
- package/src/components/ui/checkbox/checkbox.astro +1 -1
- package/src/components/ui/combobox/combobox-input.astro +2 -2
- package/src/components/ui/combobox/combobox-item.astro +4 -4
- package/src/components/ui/combobox/combobox-list.astro +1 -1
- package/src/components/ui/combobox/combobox-trigger.astro +2 -5
- package/src/components/ui/combobox/combobox.astro +3 -0
- package/src/components/ui/command/command-dialog.astro +10 -10
- package/src/components/ui/command/command-input.astro +2 -2
- package/src/components/ui/command/command-item.astro +4 -5
- package/src/components/ui/dialog/dialog-close.astro +2 -2
- package/src/components/ui/dialog/dialog-content.astro +2 -2
- package/src/components/ui/dialog/dialog.astro +26 -3
- package/src/components/ui/dropdown-menu/dropdown-menu-checkbox-item.astro +4 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-content.astro +4 -4
- package/src/components/ui/dropdown-menu/dropdown-menu-item.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-label.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-radio-item.astro +4 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-shortcut.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu.astro +3 -0
- package/src/components/ui/field/field-label.astro +1 -1
- package/src/components/ui/field/field-title.astro +1 -1
- package/src/components/ui/hover-card/hover-card-content.astro +4 -4
- package/src/components/ui/hover-card/hover-card.astro +2 -2
- package/src/components/ui/icon/icon.astro +8 -17
- package/src/components/ui/input-group/input-group-button.astro +0 -1
- package/src/components/ui/item/item-media.astro +1 -1
- package/src/components/ui/item/item.astro +0 -18
- package/src/components/ui/kbd/kbd-group.astro +1 -1
- package/src/components/ui/kbd/kbd.astro +1 -1
- package/src/components/ui/layout/layout-body.astro +1 -1
- package/src/components/ui/layout/layout-head.astro +3 -2
- package/src/components/ui/layout/layout-main.astro +1 -1
- package/src/components/ui/layout/layout.astro +4 -0
- package/src/components/ui/marquee/marquee.astro +50 -69
- package/src/components/ui/native-select/native-select.astro +2 -3
- package/src/components/ui/navigation-menu/navigation-menu-content.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu-list.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu-trigger.astro +2 -3
- package/src/components/ui/navigation-menu/navigation-menu.astro +1 -1
- package/src/components/ui/popover/popover-content.astro +1 -1
- package/src/components/ui/radio-group/radio-group-item.astro +3 -3
- package/src/components/ui/rating/rating.astro +3 -3
- package/src/components/ui/select/select-content.astro +1 -1
- package/src/components/ui/select/select-item.astro +4 -4
- package/src/components/ui/select/select-trigger.astro +3 -6
- package/src/components/ui/select/select.astro +6 -0
- package/src/components/ui/sheet/sheet-content.astro +4 -5
- package/src/components/ui/sidebar/sidebar-menu-button.astro +13 -10
- package/src/components/ui/sidebar/sidebar-menu-sub-button.astro +10 -8
- package/src/components/ui/sidebar/sidebar-provider.astro +1 -13
- package/src/components/ui/sidebar/sidebar-rail.astro +1 -1
- package/src/components/ui/sidebar/sidebar-trigger.astro +3 -3
- package/src/components/ui/sidebar/sidebar.astro +1 -1
- package/src/components/ui/slider/slider.astro +6 -4
- package/src/components/ui/spinner/spinner.astro +4 -4
- package/src/components/ui/switch/switch.astro +1 -1
- package/src/components/ui/theme-toggle/theme-toggle.astro +4 -3
- package/src/components/ui/tooltip/tooltip-content.astro +1 -1
- package/src/components/ui/typography/typography-a.astro +19 -4
- package/src/components/ui/typography/typography-blockquote.astro +26 -6
- package/src/components/ui/typography/typography-h1.astro +7 -9
- package/src/components/ui/typography/typography-h2.astro +12 -9
- package/src/components/ui/typography/typography-h3.astro +7 -9
- package/src/components/ui/typography/typography-h4.astro +7 -9
- package/src/components/ui/typography/typography-inline-code.astro +28 -12
- package/src/components/ui/typography/typography-lead.astro +29 -4
- package/src/components/ui/typography/typography-list-item.astro +25 -9
- package/src/components/ui/typography/typography-list.astro +29 -11
- package/src/components/ui/typography/typography-p.astro +26 -6
- package/src/components/ui/typography/typography-table-cell.astro +32 -13
- package/src/components/ui/typography/typography-table-head.astro +27 -13
- package/src/components/ui/typography/typography-table-row.astro +23 -13
- package/src/components/ui/typography/typography-table.astro +29 -20
- package/src/components/ui/typography/typography.astro +172 -46
- package/src/components/ui/video/video.astro +11 -27
- package/src/styles/global.css +2 -15
- package/public/r/beta-repo-setup.json +0 -125
- package/public/r/blocks.json +0 -91
- package/public/r/content-5.json +0 -17
- package/public/r/content-6.json +0 -17
- package/public/r/gradient.json +0 -17
- package/public/r/init.json +0 -23
- package/public/r/tile.json +0 -27
- package/src/components/blocks/content-5.astro +0 -115
- package/src/components/blocks/content-6.astro +0 -91
- package/src/components/ui/gradient/gradient.astro +0 -45
- package/src/components/ui/gradient/index.ts +0 -1
- package/src/components/ui/tile/index.ts +0 -3
- package/src/components/ui/tile/tile-content.astro +0 -17
- package/src/components/ui/tile/tile-group.astro +0 -76
- package/src/components/ui/tile/tile.astro +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#182](https://github.com/fulldotdev/ui/pull/182) [`751434e`](https://github.com/fulldotdev/ui/commit/751434ed8557b7b5e9250fcc4774eec7661e0ce6) Thanks [@silveltman](https://github.com/silveltman)! - Refresh existing Astro components against current data-slot wrappers and shadcn/ui Base UI Vega, including updated behavior, styling, public props, and registry dependencies.
|
|
8
|
+
|
|
3
9
|
## 0.9.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,35 +1,119 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
content-driven websites.
|
|
3
|
+
A shadcn-compatible set of components built for [Astro][astro], designed for content-driven websites.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
and blocks as source files, then customize, extend, and compose them in your own
|
|
8
|
-
Astro project.
|
|
5
|
+
## Features
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
- **Vanilla Astro Components** — No framework dependencies, pure Astro components
|
|
8
|
+
- **shadcn Compatible** — Uses the shadcn CLI and registry system for easy installation
|
|
9
|
+
- **Content-First** — Built for content-driven websites with components like sections and tiles
|
|
10
|
+
- **100+ Components & Blocks** — Ready-to-use UI components and pre-built page blocks
|
|
11
|
+
- **Tailwind CSS v4** — Styled with the latest Tailwind CSS
|
|
12
|
+
- **TypeScript** — Full TypeScript support
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
### Prerequisites
|
|
17
|
+
|
|
18
|
+
- Node.js 22.12.0+
|
|
19
|
+
- pnpm 10+
|
|
20
|
+
|
|
21
|
+
### Quick Start
|
|
22
|
+
|
|
23
|
+
1. **Create a new Astro project** (skip if you have one):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx create-astro@latest my-project --template with-tailwindcss --install --git
|
|
27
|
+
cd my-project
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. **Configure TypeScript paths** in `tsconfig.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"compilerOptions": {
|
|
35
|
+
"baseUrl": ".",
|
|
36
|
+
"paths": {
|
|
37
|
+
"@/*": ["./src/*"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Initialize shadcn**:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx shadcn@latest init
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
4. **Add Fulldev UI registry** to `components.json`:
|
|
11
50
|
|
|
12
|
-
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"registries": {
|
|
54
|
+
"@fulldev": "https://ui.full.dev/r/{name}.json"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
5. **Copy the base stylesheet** from [`src/styles/global.css`](./src/styles/global.css) into your project, then import it in your layout.
|
|
13
60
|
|
|
14
|
-
|
|
61
|
+
6. **Use a container-aware app shell** because Fulldev UI uses Tailwind v4 container-query variants like `@2xl:` and `@max-5xl:`:
|
|
15
62
|
|
|
16
|
-
```
|
|
17
|
-
|
|
63
|
+
```astro
|
|
64
|
+
---
|
|
65
|
+
import "@/styles/global.css"
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
<body class="@container">
|
|
69
|
+
<slot />
|
|
70
|
+
</body>
|
|
18
71
|
```
|
|
19
72
|
|
|
20
|
-
|
|
73
|
+
7. **Add components**:
|
|
21
74
|
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
|
|
75
|
+
```bash
|
|
76
|
+
npx shadcn@latest add @fulldev/button
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Documentation
|
|
80
|
+
|
|
81
|
+
Visit [ui.full.dev][docs] for complete documentation, component examples, and usage guides.
|
|
82
|
+
|
|
83
|
+
## Development
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Install dependencies
|
|
87
|
+
pnpm install
|
|
88
|
+
|
|
89
|
+
# Start development server
|
|
90
|
+
pnpm dev
|
|
91
|
+
|
|
92
|
+
# Build for production
|
|
93
|
+
pnpm build
|
|
94
|
+
|
|
95
|
+
# Preview production build
|
|
96
|
+
pnpm build:preview
|
|
97
|
+
|
|
98
|
+
# Type check
|
|
99
|
+
pnpm check
|
|
25
100
|
```
|
|
26
101
|
|
|
27
102
|
## Contributing
|
|
28
103
|
|
|
29
|
-
Please
|
|
104
|
+
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
105
|
+
|
|
106
|
+
## Community
|
|
107
|
+
|
|
108
|
+
- **Discord** — Join our [Discord server][discord] to share your work and get support
|
|
109
|
+
- **Issues** — Report bugs and request features on [GitHub Issues][issues]
|
|
30
110
|
|
|
31
111
|
## License
|
|
32
112
|
|
|
33
|
-
|
|
113
|
+
MIT License — Copyright (c) 2024–present [Fulldev][fulldev]
|
|
34
114
|
|
|
115
|
+
[astro]: https://astro.build/
|
|
35
116
|
[docs]: https://ui.full.dev/
|
|
117
|
+
[fulldev]: https://full.dev/
|
|
118
|
+
[issues]: https://github.com/fulldotdev/ui/issues
|
|
119
|
+
[discord]: https://discord.gg/tdmUyH2YE4
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fulldev-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"description": "Open-source Astro UI components and blocks",
|
|
6
6
|
"homepage": "https://ui.full.dev",
|
|
7
7
|
"bugs": "https://github.com/fulldotdev/ui/issues",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"astro-ui",
|
|
21
21
|
"components",
|
|
22
22
|
"ui",
|
|
23
|
-
"astro-components",
|
|
24
23
|
"component-registry",
|
|
25
24
|
"ui-components",
|
|
26
25
|
"pagebuilder",
|
|
@@ -71,6 +70,7 @@
|
|
|
71
70
|
"@fontsource-variable/geist": "^5.2.9",
|
|
72
71
|
"@fontsource-variable/geist-mono": "^5.2.8",
|
|
73
72
|
"@lexingtonthemes/seo": "^0.2.0",
|
|
73
|
+
"@lucide/astro": "^1.14.0",
|
|
74
74
|
"@tailwindcss/vite": "^4.3.2",
|
|
75
75
|
"astro": "^6.3.3",
|
|
76
76
|
"astro-favicons": "^3.1.6",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"lucide-static": "^1.22.0",
|
|
83
83
|
"shadcn": "^4.12.0",
|
|
84
84
|
"simple-icons": "^16.24.1",
|
|
85
|
+
"simple-icons-astro": "^16.1.0",
|
|
85
86
|
"tailwind-merge": "^3.6.0",
|
|
86
87
|
"tailwindcss": "^4.3.2",
|
|
87
88
|
"tw-animate-css": "^1.4.0",
|
package/public/r/accordion.json
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "accordion",
|
|
4
4
|
"dependencies": [
|
|
5
|
-
"@data-slot/accordion"
|
|
6
|
-
|
|
7
|
-
"registryDependencies": [
|
|
8
|
-
"@fulldev/icon"
|
|
5
|
+
"@data-slot/accordion",
|
|
6
|
+
"@lucide/astro"
|
|
9
7
|
],
|
|
10
8
|
"files": [
|
|
11
9
|
{
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
},
|
|
26
24
|
{
|
|
27
25
|
"path": "src/components/ui/accordion/accordion-trigger.astro",
|
|
28
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
26
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\nimport ChevronUpIcon from \"@lucide/astro/icons/chevron-up\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\">\n\nconst { class: className, type = \"button\", ...props } = Astro.props\n---\n\n<button\n data-slot=\"accordion-trigger\"\n type={type}\n class={cn(\n \"group/accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:after:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground relative flex w-full flex-1 items-start justify-between rounded-md border border-transparent bg-transparent py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-3 aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4\",\n className\n )}\n {...props}\n>\n <slot />\n <ChevronDownIcon\n data-slot=\"accordion-trigger-icon\"\n aria-hidden=\"true\"\n class=\"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden\"\n />\n <ChevronUpIcon\n data-slot=\"accordion-trigger-icon\"\n aria-hidden=\"true\"\n class=\"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline\"\n />\n</button>\n",
|
|
29
27
|
"type": "registry:ui"
|
|
30
28
|
},
|
|
31
29
|
{
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
|
|
13
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"
|
|
13
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"alert-dialog\"\n data-default-open={defaultOpen}\n data-close-on-click-outside={closeOnClickOutside}\n data-close-on-escape={closeOnEscape}\n data-lock-scroll={lockScroll}\n class={className}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/alert-dialog\"\n\n create()\n</script>\n",
|
|
14
14
|
"type": "registry:ui"
|
|
15
15
|
},
|
|
16
16
|
{
|
package/public/r/alert.json
CHANGED
|
@@ -7,11 +7,6 @@
|
|
|
7
7
|
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = VariantProps<typeof variants> & HTMLAttributes<\"div\">\n\nconst variants = cva(\n \"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst { class: className, variant, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert\"\n role=\"alert\"\n class={cn(variants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
8
8
|
"type": "registry:ui"
|
|
9
9
|
},
|
|
10
|
-
{
|
|
11
|
-
"path": "src/components/ui/alert/alert-action.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert-action\"\n class={cn(\"absolute top-2.5 right-3\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
13
|
-
"type": "registry:ui"
|
|
14
|
-
},
|
|
15
10
|
{
|
|
16
11
|
"path": "src/components/ui/alert/alert-description.astro",
|
|
17
12
|
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"alert-description\"\n class={cn(\n \"text-muted-foreground [&_a]:hover:text-foreground text-sm text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
package/public/r/article-1.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/blocks/article-1.astro",
|
|
12
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\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 badge,\n title,\n description,\n author,\n image,\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"mx-auto max-w-2xl gap-8\">\n <div class=\"mx-auto flex w-full max-w-2xl flex-col gap-6\">\n {\n badge && (\n <Badge variant=\"secondary\" class=\"w-fit\">\n {badge}\n </Badge>\n )\n }\n <div class=\"flex flex-col gap-4\">\n <h1\n class=\"text-4xl leading-tight font-semibold tracking-tight text-balance sm:text-5xl\"\n >\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\">\n <AvatarImage src={author.image} alt={author.name} />\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 </div>\n\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-16/10 w-full rounded-xl object-cover\"\n widths={[640, 960]}\n sizes=\"(min-width: 42rem) 42rem, 100vw\"\n />\n\n <article\n class=\"mx-auto flex w-full max-w-2xl flex-col gap-6 text-base leading-8\"\n >\n <slot />\n </article>\n </SectionContainer>\n</Section>\n",
|
|
12
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\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 badge,\n title,\n description,\n author,\n image,\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"mx-auto max-w-2xl gap-8\">\n <div class=\"mx-auto flex w-full max-w-2xl flex-col gap-6\">\n {\n badge && (\n <Badge variant=\"secondary\" class=\"w-fit\">\n {badge}\n </Badge>\n )\n }\n <div class=\"flex flex-col gap-4\">\n <h1\n class=\"text-4xl leading-tight font-semibold tracking-tight text-balance sm:text-5xl\"\n >\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\">\n <AvatarImage src={author.image} alt={author.name} />\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 </div>\n\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[16/10] w-full rounded-xl object-cover\"\n widths={[640, 960]}\n sizes=\"(min-width: 42rem) 42rem, 100vw\"\n />\n\n <article\n class=\"mx-auto flex w-full max-w-2xl flex-col gap-6 text-base leading-8\"\n >\n <slot />\n </article>\n </SectionContainer>\n</Section>\n",
|
|
13
13
|
"type": "registry:block"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/article-2.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/blocks/article-2.astro",
|
|
12
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\n title: string\n description: string\n author: {\n image?: ImageMetadata\n initials: string\n name: string\n date: string\n readingTime: string\n }\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n badge,\n title,\n description,\n author,\n image,\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"mx-auto max-w-2xl items-center gap-8 text-center\">\n <div class=\"mx-auto flex w-full max-w-2xl flex-col items-center gap-6\">\n {badge && <Badge variant=\"secondary\">{badge}</Badge>}\n <div class=\"flex flex-col gap-4\">\n <h1\n class=\"text-4xl leading-tight font-semibold tracking-tight text-balance sm:text-5xl\"\n >\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\">\n <AvatarImage src={author.image} alt={author.name} />\n <AvatarFallback>{author.initials}</AvatarFallback>\n </Avatar>\n <div class=\"flex flex-col text-left\">\n <p class=\"text-sm font-medium\">\n {author.name}\n <span class=\"text-muted-foreground font-normal\">\n · {author.date}\n </span>\n </p>\n <p class=\"text-muted-foreground text-xs\">{author.readingTime}</p>\n </div>\n </div>\n </div>\n\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-16/10 w-full rounded-xl object-cover\"\n widths={[640, 960]}\n sizes=\"(min-width: 42rem) 42rem, 100vw\"\n />\n\n <article\n class=\"mx-auto flex w-full max-w-2xl flex-col gap-6 text-left text-base leading-8\"\n >\n <slot />\n </article>\n </SectionContainer>\n</Section>\n",
|
|
12
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\n title: string\n description: string\n author: {\n image?: ImageMetadata\n initials: string\n name: string\n date: string\n readingTime: string\n }\n image: {\n src: ImageMetadata\n alt: string\n }\n}\n\nconst {\n class: className,\n badge,\n title,\n description,\n author,\n image,\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"mx-auto max-w-2xl items-center gap-8 text-center\">\n <div class=\"mx-auto flex w-full max-w-2xl flex-col items-center gap-6\">\n {badge && <Badge variant=\"secondary\">{badge}</Badge>}\n <div class=\"flex flex-col gap-4\">\n <h1\n class=\"text-4xl leading-tight font-semibold tracking-tight text-balance sm:text-5xl\"\n >\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\">\n <AvatarImage src={author.image} alt={author.name} />\n <AvatarFallback>{author.initials}</AvatarFallback>\n </Avatar>\n <div class=\"flex flex-col text-left\">\n <p class=\"text-sm font-medium\">\n {author.name}\n <span class=\"text-muted-foreground font-normal\">\n · {author.date}\n </span>\n </p>\n <p class=\"text-muted-foreground text-xs\">{author.readingTime}</p>\n </div>\n </div>\n </div>\n\n <Image\n src={image.src}\n alt={image.alt}\n class=\"aspect-[16/10] w-full rounded-xl object-cover\"\n widths={[640, 960]}\n sizes=\"(min-width: 42rem) 42rem, 100vw\"\n />\n\n <article\n class=\"mx-auto flex w-full max-w-2xl flex-col gap-6 text-left text-base leading-8\"\n >\n <slot />\n </article>\n </SectionContainer>\n</Section>\n",
|
|
13
13
|
"type": "registry:block"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/articles-1.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/blocks/articles-1.astro",
|
|
12
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\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, badge, title, description, articles } = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"gap-8\">\n <div class=\"flex max-w-2xl flex-col gap-4\">\n {\n badge && (\n <Badge variant=\"secondary\" class=\"w-fit\">\n {badge}\n </Badge>\n )\n }\n <h2\n class=\"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\"\n >\n {title}\n </h2>\n <p class=\"text-muted-foreground text-base leading-7\">\n {description}\n </p>\n </div>\n\n <div class=\"grid gap-6 md:grid-cols-2 lg:grid-cols-3\">\n {\n articles.map((article) => (\n <a\n href={article.href ?? \"#\"}\n class=\"group hover:bg-muted/50 focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl p-4 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <Image\n src={article.image.src}\n alt={article.image.alt}\n class=\"-mx-4 -mt-4 aspect-
|
|
12
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\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, badge, title, description, articles } = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"gap-8\">\n <div class=\"flex max-w-2xl flex-col gap-4\">\n {\n badge && (\n <Badge variant=\"secondary\" class=\"w-fit\">\n {badge}\n </Badge>\n )\n }\n <h2\n class=\"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\"\n >\n {title}\n </h2>\n <p class=\"text-muted-foreground text-base leading-7\">\n {description}\n </p>\n </div>\n\n <div class=\"grid gap-6 md:grid-cols-2 lg:grid-cols-3\">\n {\n articles.map((article) => (\n <a\n href={article.href ?? \"#\"}\n class=\"group hover:bg-muted/50 focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl p-4 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <Image\n src={article.image.src}\n alt={article.image.alt}\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>\n <AvatarImage\n src={article.author.image}\n alt={article.author.name}\n />\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 </a>\n ))\n }\n </div>\n </SectionContainer>\n</Section>\n",
|
|
13
13
|
"type": "registry:block"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/articles-2.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/blocks/articles-2.astro",
|
|
12
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\n title: string\n description: string\n featured: {\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 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 {\n class: className,\n badge,\n title,\n description,\n featured,\n articles,\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"gap-8\">\n <div class=\"mx-auto max-w-2xl text-center\">\n {badge && <Badge variant=\"secondary\">{badge}</Badge>}\n <h2\n class={cn(\n \"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\",\n badge && \"mt-4\"\n )}\n >\n {title}\n </h2>\n <p class=\"text-muted-foreground mt-2 text-base leading-7 text-balance\">\n {description}\n </p>\n </div>\n\n <a\n href={featured.href ?? \"#\"}\n class=\"group hover:bg-muted/50 focus-visible:ring-ring/50 grid gap-6 rounded-xl transition-colors focus-visible:ring-2 focus-visible:outline-none lg:grid-cols-2 lg:items-center lg:pr-4\"\n >\n <Image\n src={featured.image.src}\n alt={featured.image.alt}\n class=\"aspect-4/3 rounded-lg object-cover transition-opacity group-hover:opacity-85\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 64rem) 50vw, 100vw\"\n />\n <div class=\"flex flex-col gap-4\">\n <Badge variant=\"outline\" class=\"w-fit\">{featured.category}</Badge>\n <h3\n class=\"text-foreground text-2xl leading-tight font-semibold sm:text-3xl\"\n >\n {featured.title}\n </h3>\n <p class=\"text-muted-foreground text-base leading-7\">\n {featured.description}\n </p>\n <div class=\"flex items-center gap-3\">\n <Avatar>\n <AvatarImage\n src={featured.author.image}\n alt={featured.author.name}\n />\n <AvatarFallback>{featured.author.initials}</AvatarFallback>\n </Avatar>\n <div class=\"flex flex-col\">\n <p class=\"text-sm font-medium\">{featured.author.name}</p>\n <p class=\"text-muted-foreground text-xs\">{featured.author.date}</p>\n </div>\n </div>\n </div>\n </a>\n\n <div class=\"grid gap-6 md:grid-cols-2 lg:grid-cols-3\">\n {\n articles.map((article) => (\n <a\n href={article.href ?? \"#\"}\n class=\"group hover:bg-muted/50 focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl p-4 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <Image\n src={article.image.src}\n alt={article.image.alt}\n class=\"-mx-4 -mt-4 aspect-
|
|
12
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\n title: string\n description: string\n featured: {\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 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 {\n class: className,\n badge,\n title,\n description,\n featured,\n articles,\n} = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"gap-8\">\n <div class=\"mx-auto max-w-2xl text-center\">\n {badge && <Badge variant=\"secondary\">{badge}</Badge>}\n <h2\n class={cn(\n \"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\",\n badge && \"mt-4\"\n )}\n >\n {title}\n </h2>\n <p class=\"text-muted-foreground mt-2 text-base leading-7 text-balance\">\n {description}\n </p>\n </div>\n\n <a\n href={featured.href ?? \"#\"}\n class=\"group hover:bg-muted/50 focus-visible:ring-ring/50 grid gap-6 rounded-xl transition-colors focus-visible:ring-2 focus-visible:outline-none lg:grid-cols-2 lg:items-center lg:pr-4\"\n >\n <Image\n src={featured.image.src}\n alt={featured.image.alt}\n class=\"aspect-[4/3] rounded-lg object-cover transition-opacity group-hover:opacity-85\"\n widths={[640, 960, 1280]}\n sizes=\"(min-width: 64rem) 50vw, 100vw\"\n />\n <div class=\"flex flex-col gap-4\">\n <Badge variant=\"outline\" class=\"w-fit\">{featured.category}</Badge>\n <h3\n class=\"text-foreground text-2xl leading-tight font-semibold sm:text-3xl\"\n >\n {featured.title}\n </h3>\n <p class=\"text-muted-foreground text-base leading-7\">\n {featured.description}\n </p>\n <div class=\"flex items-center gap-3\">\n <Avatar>\n <AvatarImage\n src={featured.author.image}\n alt={featured.author.name}\n />\n <AvatarFallback>{featured.author.initials}</AvatarFallback>\n </Avatar>\n <div class=\"flex flex-col\">\n <p class=\"text-sm font-medium\">{featured.author.name}</p>\n <p class=\"text-muted-foreground text-xs\">{featured.author.date}</p>\n </div>\n </div>\n </div>\n </a>\n\n <div class=\"grid gap-6 md:grid-cols-2 lg:grid-cols-3\">\n {\n articles.map((article) => (\n <a\n href={article.href ?? \"#\"}\n class=\"group hover:bg-muted/50 focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl p-4 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <Image\n src={article.image.src}\n alt={article.image.alt}\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]}\n sizes=\"(min-width: 64rem) 22rem, (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-lg 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>\n <AvatarImage\n src={article.author.image}\n alt={article.author.name}\n />\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 </a>\n ))\n }\n </div>\n </SectionContainer>\n</Section>\n",
|
|
13
13
|
"type": "registry:block"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/articles-3.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/blocks/articles-3.astro",
|
|
12
|
-
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\n title: 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, badge, title, articles } = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"gap-8\">\n <div class=\"flex flex-wrap items-end justify-between gap-4\">\n <div class=\"flex flex-col gap-4\">\n {\n badge && (\n <Badge variant=\"secondary\" class=\"w-fit\">\n {badge}\n </Badge>\n )\n }\n <h2\n class=\"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\"\n >\n {title}\n </h2>\n </div>\n </div>\n\n <div class=\"grid gap-6 md:grid-cols-2 lg:grid-cols-4\">\n {\n articles.map((article) => (\n <a\n href={article.href ?? \"#\"}\n class=\"group bg-muted/50 hover:bg-muted focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl p-4 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <Image\n src={article.image.src}\n alt={article.image.alt}\n class=\"-mx-4 -mt-4 aspect-
|
|
12
|
+
"content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Section, SectionContainer } from \"@/components/ui/section\"\n\ntype Props = {\n class?: string\n badge?: string\n title: 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, badge, title, articles } = Astro.props\n---\n\n<Section class={cn(\"\", className)}>\n <SectionContainer class=\"gap-8\">\n <div class=\"flex flex-wrap items-end justify-between gap-4\">\n <div class=\"flex flex-col gap-4\">\n {\n badge && (\n <Badge variant=\"secondary\" class=\"w-fit\">\n {badge}\n </Badge>\n )\n }\n <h2\n class=\"text-3xl font-semibold tracking-tight text-balance sm:text-4xl\"\n >\n {title}\n </h2>\n </div>\n </div>\n\n <div class=\"grid gap-6 md:grid-cols-2 lg:grid-cols-4\">\n {\n articles.map((article) => (\n <a\n href={article.href ?? \"#\"}\n class=\"group bg-muted/50 hover:bg-muted focus-visible:ring-ring/50 flex h-full flex-col gap-4 rounded-xl p-4 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <Image\n src={article.image.src}\n alt={article.image.alt}\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]}\n sizes=\"(min-width: 64rem) 18rem, (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-lg 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>\n <AvatarImage\n src={article.author.image}\n alt={article.author.name}\n />\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 </a>\n ))\n }\n </div>\n </SectionContainer>\n</Section>\n",
|
|
13
13
|
"type": "registry:block"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/avatar.json
CHANGED
|
@@ -4,12 +4,7 @@
|
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
6
|
"path": "src/components/ui/avatar/avatar.astro",
|
|
7
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\" | \"lg\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"avatar\"\n data-size={size}\n class={cn(\n \"after:border-border group/avatar relative flex size-8 shrink-0
|
|
8
|
-
"type": "registry:ui"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"path": "src/components/ui/avatar/avatar-badge.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"avatar-badge\"\n class={cn(\n \"bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none\",\n \"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden\",\n \"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2\",\n \"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
7
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n size?: \"default\" | \"sm\" | \"lg\"\n}\n\nconst { class: className, size = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"avatar\"\n data-size={size}\n class={cn(\n \"after:border-border group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
13
8
|
"type": "registry:ui"
|
|
14
9
|
},
|
|
15
10
|
{
|
|
@@ -17,16 +12,6 @@
|
|
|
17
12
|
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"avatar-fallback\"\n class={cn(\n \"bg-muted text-muted-foreground absolute inset-0 z-0 flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
18
13
|
"type": "registry:ui"
|
|
19
14
|
},
|
|
20
|
-
{
|
|
21
|
-
"path": "src/components/ui/avatar/avatar-group.astro",
|
|
22
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"avatar-group\"\n class={cn(\n \"*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
23
|
-
"type": "registry:ui"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "src/components/ui/avatar/avatar-group-count.astro",
|
|
27
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"avatar-group-count\"\n class={cn(\n \"bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
28
|
-
"type": "registry:ui"
|
|
29
|
-
},
|
|
30
15
|
{
|
|
31
16
|
"path": "src/components/ui/avatar/avatar-image.astro",
|
|
32
17
|
"content": "---\nimport { Image } from \"astro:assets\"\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Partial<ComponentProps<typeof Image>>\n\nconst {\n class: className,\n alt = \"\",\n width = 44,\n height = 44,\n sizes = \"44px\",\n widths = [44, 88, 176],\n ...props\n} = Astro.props\n---\n\n{\n props.src && (\n <Image\n data-slot=\"avatar-image\"\n class={cn(\n \"absolute inset-0 z-10 aspect-square size-full rounded-full object-cover\",\n className\n )}\n alt={alt}\n width={width}\n height={height}\n sizes={sizes}\n widths={widths}\n {...(props as any)}\n />\n )\n}\n",
|
package/public/r/badge.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "src/components/ui/badge/badge.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { badgeVariants, type BadgeVariantProps } from \"./badge-variants\"\n\ntype Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }> & BadgeVariantProps\n\nconst {\n as: Tag = \"span\",\n class: className,\n variant = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"badge\"\n class={cn(badgeVariants({ variant }), className)}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
12
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { badgeVariants, type BadgeVariantProps } from \"./badge-variants\"\n\ntype Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }> & BadgeVariantProps\n\nconst {\n as: Tag = \"span\",\n class: className,\n variant = \"default\",\n ...props\n} = Astro.props\n---\n\n<Tag\n data-slot=\"badge\"\n data-variant={variant}\n class={cn(badgeVariants({ variant }), className)}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
13
13
|
"type": "registry:ui"
|
|
14
14
|
},
|
|
15
15
|
{
|
package/public/r/banner-1.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "banner-1",
|
|
4
|
+
"dependencies": [
|
|
5
|
+
"@lucide/astro"
|
|
6
|
+
],
|
|
4
7
|
"registryDependencies": [
|
|
5
|
-
"@fulldev/banner"
|
|
6
|
-
"@fulldev/icon"
|
|
8
|
+
"@fulldev/banner"
|
|
7
9
|
],
|
|
8
10
|
"files": [
|
|
9
11
|
{
|
|
10
12
|
"path": "src/components/blocks/banner-1.astro",
|
|
11
|
-
"content": "---\nimport
|
|
13
|
+
"content": "---\nimport ArrowRightIcon from \"@lucide/astro/icons/arrow-right\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Banner, BannerContainer } from \"@/components/ui/banner\"\n\ntype Props = {\n class?: string\n title: string\n description: string\n link?: {\n label: string\n href: string\n }\n}\n\nconst { class: className, title, description, link } = Astro.props\n---\n\n<Banner\n storageKey=\"banner-1\"\n class={cn(\"dark bg-background text-foreground\", className)}\n>\n <BannerContainer class=\"flex-row items-center gap-x-4 gap-y-1\">\n <p class=\"text-sm leading-relaxed\">\n <span class=\"font-semibold\">{title}</span>\n <span class=\"mx-1.5 hidden opacity-50 sm:inline\">—</span>\n <span class=\"opacity-80\">{description}</span>\n </p>\n {\n link && (\n <a\n href={link.href}\n class=\"group/link inline-flex shrink-0 items-center gap-1 text-sm font-medium underline underline-offset-4 transition-opacity hover:opacity-80\"\n >\n {link.label}\n <ArrowRightIcon class=\"size-3.5 transition-transform group-hover/link:translate-x-0.5\" />\n </a>\n )\n }\n </BannerContainer>\n</Banner>\n",
|
|
12
14
|
"type": "registry:block"
|
|
13
15
|
}
|
|
14
16
|
],
|
package/public/r/banner-2.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "src/components/blocks/banner-2.astro",
|
|
11
|
-
"content": "---\nimport { cn } from \"@/lib/utils\"\nimport { Banner, BannerContainer } from \"@/components/ui/banner\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = {\n class?: string\n title: string\n description: string\n buttons?: {\n label: string\n href: string\n variant?: \"default\" | \"outline\" | \"secondary\" | \"ghost\"\n }[]\n}\n\nconst { class: className, title, description, buttons } = Astro.props\n---\n\n<Banner variant=\"floating\" storageKey=\"banner-2\" class={cn(\"\", className)}>\n <BannerContainer class=\"gap-4 py-1\" showClose={false}>\n <div\n class=\"flex flex-1 flex-col gap-0.5
|
|
11
|
+
"content": "---\nimport { cn } from \"@/lib/utils\"\nimport { Banner, BannerContainer } from \"@/components/ui/banner\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = {\n class?: string\n title: string\n description: string\n buttons?: {\n label: string\n href: string\n variant?: \"default\" | \"outline\" | \"secondary\" | \"ghost\"\n }[]\n}\n\nconst { class: className, title, description, buttons } = Astro.props\n---\n\n<Banner variant=\"floating\" storageKey=\"banner-2\" class={cn(\"\", className)}>\n <BannerContainer class=\"gap-4 py-1\" showClose={false}>\n <div\n class=\"flex flex-1 flex-col gap-0.5 @5xl:flex-row @5xl:items-center @5xl:gap-x-4\"\n >\n <p class=\"text-sm font-semibold\">{title}</p>\n <p class=\"text-muted-foreground text-sm\">{description}</p>\n </div>\n {\n buttons?.length && (\n <div class=\"flex shrink-0 items-center gap-2\">\n {buttons.map(({ href, label, ...button }, index) => (\n <Button\n as=\"a\"\n href={href}\n size=\"sm\"\n variant={button.variant ?? (index === 0 ? \"default\" : \"outline\")}\n {...button}\n >\n {label}\n </Button>\n ))}\n </div>\n )\n }\n </BannerContainer>\n</Banner>\n",
|
|
12
12
|
"type": "registry:block"
|
|
13
13
|
}
|
|
14
14
|
],
|
package/public/r/banner.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "banner",
|
|
4
|
+
"dependencies": [
|
|
5
|
+
"@lucide/astro"
|
|
6
|
+
],
|
|
4
7
|
"registryDependencies": [
|
|
5
8
|
"@fulldev/button",
|
|
6
|
-
"@fulldev/dropdown-menu"
|
|
7
|
-
"@fulldev/icon"
|
|
9
|
+
"@fulldev/dropdown-menu"
|
|
8
10
|
],
|
|
9
11
|
"files": [
|
|
10
12
|
{
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
},
|
|
15
17
|
{
|
|
16
18
|
"path": "src/components/ui/banner/banner-container.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
19
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n showClose?: boolean\n}\n\nconst { class: className, showClose = true, ...props } = Astro.props\n---\n\n<div\n class={cn(\n \"relative mx-auto flex w-full max-w-7xl gap-4 px-4\",\n showClose && \"pr-10\",\n className\n )}\n {...props}\n>\n <slot />\n {\n showClose && (\n <button\n type=\"button\"\n class=\"focus-visible:ring-ring/50 absolute top-1/2 right-4 z-20 inline-flex shrink-0 -translate-y-1/2 items-center justify-center rounded-sm text-current/65 transition-colors outline-none hover:text-current focus-visible:text-current focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 in-[[data-variant=floating]]:right-5\"\n aria-label=\"Close\"\n data-slot=\"banner-close\"\n >\n <XIcon class=\"size-4\" />\n <span class=\"sr-only\">Close</span>\n </button>\n )\n }\n</div>\n",
|
|
18
20
|
"type": "registry:ui"
|
|
19
21
|
},
|
|
20
22
|
{
|
package/public/r/blocks-1.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "blocks-1",
|
|
4
|
+
"dependencies": [
|
|
5
|
+
"@lucide/astro",
|
|
6
|
+
"simple-icons-astro"
|
|
7
|
+
],
|
|
4
8
|
"registryDependencies": [
|
|
5
9
|
"@fulldev/button",
|
|
6
10
|
"@fulldev/dropdown-menu",
|
|
7
11
|
"@fulldev/section",
|
|
8
|
-
"@fulldev/typography"
|
|
9
|
-
"@fulldev/icon"
|
|
12
|
+
"@fulldev/typography"
|
|
10
13
|
],
|
|
11
14
|
"files": [
|
|
12
15
|
{
|
|
13
16
|
"path": "src/components/blocks/blocks-1.astro",
|
|
14
|
-
"content": "---\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { buttonVariants } from \"@/components/ui/button/button-variants\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {
|
|
17
|
+
"content": "---\nimport ArrowLeft from \"@lucide/astro/icons/arrow-left\"\nimport ArrowRight from \"@lucide/astro/icons/arrow-right\"\nimport Check from \"@lucide/astro/icons/check\"\nimport ChevronDown from \"@lucide/astro/icons/chevron-down\"\nimport Copy from \"@lucide/astro/icons/copy\"\nimport ExternalLink from \"@lucide/astro/icons/external-link\"\nimport Claude from \"simple-icons-astro/Claude\"\nimport Cursor from \"simple-icons-astro/Cursor\"\nimport Markdown from \"simple-icons-astro/Markdown\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { buttonVariants } from \"@/components/ui/button/button-variants\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport { SectionContainer } from \"@/components/ui/section\"\nimport {\n Typography,\n TypographyH1,\n TypographyLead,\n} from \"@/components/ui/typography\"\n\ntype Props = {\n class?: string\n title: string\n description?: string\n copyButton?: {\n id: string\n source: string\n }\n markdownUrl?: string\n previousPage?: {\n href: string\n title: string\n }\n nextPage?: {\n href: string\n title: string\n }\n labels: {\n copyMarkdown: string\n openIn: string\n openInMarkdown: string\n openInChatGPT: string\n openInClaude: string\n openInCursor: string\n pagination: {\n previous: string\n next: string\n ariaLabel: string\n }\n }\n}\n\nconst {\n class: className,\n title,\n description,\n copyButton,\n markdownUrl,\n previousPage,\n nextPage,\n labels,\n} = Astro.props\nconst showCopyButton = Boolean(copyButton)\nconst showOpenButton = Boolean(markdownUrl)\nconst showPagination = Boolean(previousPage || nextPage)\nconst assistantPrompt = markdownUrl\n ? `Read ${markdownUrl}, I want to ask questions about it.`\n : \"\"\nconst openLinks = markdownUrl\n ? [\n {\n label: labels.openInMarkdown,\n href: markdownUrl,\n icon: \"markdown\",\n },\n {\n label: labels.openInChatGPT,\n href: `https://chatgpt.com/?hints=search&q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"chatgpt\",\n },\n {\n label: labels.openInClaude,\n href: `https://claude.ai/new?q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"claude\",\n },\n {\n label: labels.openInCursor,\n href: `https://cursor.com/link/prompt?text=${encodeURIComponent(assistantPrompt)}`,\n icon: \"cursor\",\n },\n ]\n : []\n---\n\n<SectionContainer\n data-slot=\"blocks-page\"\n class={cn(\"gap-10 pt-10 pb-10 sm:pt-12 sm:pb-12\", className)}\n>\n <div class=\"mx-auto flex w-full max-w-[84rem] flex-col gap-10\">\n <header\n class=\"flex flex-col gap-4 border-b pb-8 sm:flex-row sm:items-start sm:justify-between\"\n >\n <div class=\"flex max-w-3xl min-w-0 flex-1 flex-col gap-2\">\n <TypographyH1\n class=\"text-foreground text-left text-3xl tracking-tight sm:text-4xl\"\n >\n {title}\n </TypographyH1>\n {\n description && (\n <TypographyLead class=\"max-w-2xl text-base leading-7\">\n {description}\n </TypographyLead>\n )\n }\n </div>\n <div class=\"flex shrink-0 items-center gap-2 self-start\">\n {\n showCopyButton && (\n <Button\n id={copyButton?.id}\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n data-source={copyButton?.source}\n aria-label={labels.copyMarkdown}\n >\n <Copy class=\"blocks-copy-icon size-3.5\" />\n <Check class=\"blocks-check-icon hidden size-3.5\" />\n <span>{labels.copyMarkdown}</span>\n </Button>\n )\n }\n {\n showOpenButton && (\n <DropdownMenu>\n <DropdownMenuTrigger\n class={buttonVariants({ variant: \"outline\", size: \"xs\" })}\n >\n <span>{labels.openIn}</span>\n <ChevronDown class=\"size-3.5 opacity-70\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" sideOffset={6} class=\"w-56\">\n {openLinks.map((link) => (\n <a\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n class=\"hover:bg-accent hover:text-accent-foreground flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none\"\n >\n {link.icon === \"markdown\" && <Markdown class=\"size-4\" />}\n {link.icon === \"chatgpt\" && (\n <svg\n role=\"img\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"size-4\"\n aria-hidden=\"true\"\n >\n <path d=\"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.182a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .511 4.91 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.989 5.989 0 0 0 3.998-2.9 6.056 6.056 0 0 0-.748-7.073ZM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.142-.081 4.778-2.758a.795.795 0 0 0 .393-.681v-6.737l2.02 1.169a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.495 4.494Zm-9.66-4.125a4.471 4.471 0 0 1-.535-3.014l.142.085 4.783 2.758a.771.771 0 0 0 .781 0l5.843-3.368v2.332a.08.08 0 0 1-.034.062L9.74 19.95a4.499 4.499 0 0 1-6.14-1.646ZM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.814 3.354-2.02 1.169a.076.076 0 0 1-.071 0l-4.83-2.787A4.504 4.504 0 0 1 2.34 7.872Zm16.596 3.856-5.833-3.388L15.12 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.104v-5.677a.79.79 0 0 0-.407-.667Zm2.011-3.024-.142-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.499 4.499 0 0 1 6.68 4.66ZM8.307 12.863l-2.02-1.164a.08.08 0 0 1-.038-.057V6.074a4.499 4.499 0 0 1 7.376-3.453l-.142.08-4.778 2.758a.795.795 0 0 0-.393.681Zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5Z\" />\n </svg>\n )}\n {link.icon === \"claude\" && <Claude class=\"size-4\" />}\n {link.icon === \"cursor\" && <Cursor class=\"size-4\" />}\n <span>{link.label}</span>\n <ExternalLink class=\"text-muted-foreground ml-auto size-3.5\" />\n </a>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n }\n </div>\n </header>\n\n <Typography as=\"article\" class=\"w-full max-w-none\">\n <slot />\n </Typography>\n\n {\n showPagination && (\n <nav\n class=\"flex items-center justify-between gap-3\"\n aria-label={labels.pagination.ariaLabel}\n >\n {previousPage ? (\n <Button\n as=\"a\"\n href={previousPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-start gap-2 px-3 py-2 whitespace-normal\"\n >\n <ArrowLeft class=\"size-4\" />\n <span class=\"truncate text-sm font-medium\">\n {previousPage.title}\n </span>\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n\n {nextPage ? (\n <Button\n as=\"a\"\n href={nextPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-end gap-2 px-3 py-2 text-right whitespace-normal\"\n >\n <span class=\"truncate text-sm font-medium\">{nextPage.title}</span>\n <ArrowRight class=\"size-4\" />\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n </nav>\n )\n }\n </div>\n</SectionContainer>\n\n<script is:inline define:vars={{ copyButtonId: copyButton?.id }}>\n const button = copyButtonId ? document.getElementById(copyButtonId) : null\n\n if (button instanceof HTMLButtonElement) {\n button.addEventListener(\"click\", async () => {\n const source = button.dataset.source\n\n if (!source) return\n\n try {\n await navigator.clipboard.writeText(source)\n button.querySelector(\".blocks-copy-icon\")?.classList.add(\"hidden\")\n button.querySelector(\".blocks-check-icon\")?.classList.remove(\"hidden\")\n\n window.setTimeout(() => {\n button.querySelector(\".blocks-copy-icon\")?.classList.remove(\"hidden\")\n button.querySelector(\".blocks-check-icon\")?.classList.add(\"hidden\")\n }, 1200)\n } catch {\n // Ignore clipboard failures; the button remains available for retry.\n }\n })\n }\n</script>\n",
|
|
15
18
|
"type": "registry:block"
|
|
16
19
|
}
|
|
17
20
|
],
|
package/public/r/breadcrumb.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "breadcrumb",
|
|
4
|
-
"
|
|
5
|
-
"@
|
|
4
|
+
"dependencies": [
|
|
5
|
+
"@lucide/astro"
|
|
6
6
|
],
|
|
7
7
|
"files": [
|
|
8
8
|
{
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"path": "src/components/ui/breadcrumb/breadcrumb-separator.astro",
|
|
35
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
35
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronRight from \"@lucide/astro/icons/chevron-right\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"li\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn(\"[&>svg]:size-3.5\", className)}\n {...props}\n>\n {Astro.slots.has(\"default\") ? <slot /> : <ChevronRight />}\n</li>\n",
|
|
36
36
|
"type": "registry:ui"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"path": "src/components/ui/breadcrumb/breadcrumb-ellipsis.astro",
|
|
40
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
40
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport Ellipsis from \"@lucide/astro/icons/ellipsis\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n class={cn(\n \"flex size-5 items-center justify-center [&>svg]:size-4\",\n className\n )}\n {...props}\n>\n <Ellipsis />\n <span class=\"sr-only\">More</span>\n</span>\n",
|
|
41
41
|
"type": "registry:ui"
|
|
42
42
|
},
|
|
43
43
|
{
|