astro-component-kit 0.4.0 → 0.5.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.
Files changed (208) hide show
  1. package/README.md +139 -27
  2. package/bin/cli.js +67 -0
  3. package/bin/installer.js +179 -0
  4. package/package.json +35 -5
  5. package/src/components/index.ts +2 -0
  6. package/src/components/lib/Galaxy3D.astro +249 -137
  7. package/src/components/lib/app/AppSidebar.astro +249 -0
  8. package/src/components/lib/app/AppTopbar.astro +284 -0
  9. package/src/components/lib/app/ArrivalsBoard.astro +176 -0
  10. package/src/components/lib/app/AuthCard.astro +213 -0
  11. package/src/components/lib/app/DataTable.astro +346 -0
  12. package/src/components/lib/app/GuestProfileCard.astro +133 -0
  13. package/src/components/lib/app/HousekeepingBoard.astro +189 -0
  14. package/src/components/lib/app/PageHeader.astro +157 -0
  15. package/src/components/lib/app/PlanUsageCard.astro +112 -0
  16. package/src/components/lib/app/RoomRack.astro +207 -0
  17. package/src/components/lib/app/SettingsSection.astro +96 -0
  18. package/src/components/lib/app/SwitchRow.astro +71 -0
  19. package/src/components/lib/app/TeamMembers.astro +190 -0
  20. package/src/components/lib/app/app-icons.ts +52 -0
  21. package/src/components/lib/app/index.ts +19 -0
  22. package/src/components/lib/charts/AreaChart.astro +4 -4
  23. package/src/components/lib/charts/BarChart.astro +3 -3
  24. package/src/components/lib/charts/ChartFrame.astro +10 -10
  25. package/src/components/lib/charts/DonutChart.astro +2 -2
  26. package/src/components/lib/charts/DumbbellChart.astro +1 -1
  27. package/src/components/lib/charts/ForecastLineChart.astro +1 -1
  28. package/src/components/lib/charts/GaugeChart.astro +1 -1
  29. package/src/components/lib/charts/HeatmapChart.astro +1 -1
  30. package/src/components/lib/charts/HorizontalBarChart.astro +2 -2
  31. package/src/components/lib/charts/KpiStatTile.astro +4 -4
  32. package/src/components/lib/charts/LinearProgressGauge.astro +4 -4
  33. package/src/components/lib/charts/MetricDeltaTable.astro +3 -3
  34. package/src/components/lib/charts/RadarMetricChart.astro +4 -4
  35. package/src/components/lib/charts/RadialBarChart.astro +1 -1
  36. package/src/components/lib/charts/RetentionCohortTable.astro +2 -2
  37. package/src/components/lib/charts/TreemapChart.astro +1 -1
  38. package/src/components/lib/ecommerce/CartDrawer.astro +483 -0
  39. package/src/components/lib/ecommerce/CartPageList.astro +290 -0
  40. package/src/components/lib/ecommerce/CartToast.astro +276 -0
  41. package/src/components/lib/ecommerce/CategoryTiles.astro +143 -0
  42. package/src/components/lib/ecommerce/CheckoutForm.astro +423 -0
  43. package/src/components/lib/ecommerce/CountdownBanner.astro +230 -0
  44. package/src/components/lib/ecommerce/FilterBar.astro +278 -0
  45. package/src/components/lib/ecommerce/FilterSidebar.astro +405 -0
  46. package/src/components/lib/ecommerce/LiveActivityToast.astro +213 -0
  47. package/src/components/lib/ecommerce/OrderSummary.astro +295 -0
  48. package/src/components/lib/ecommerce/ProductBuyBox.astro +247 -0
  49. package/src/components/lib/ecommerce/ProductCardMinimal.astro +229 -0
  50. package/src/components/lib/ecommerce/ProductGallery.astro +145 -0
  51. package/src/components/lib/ecommerce/ProductGrid.astro +118 -0
  52. package/src/components/lib/ecommerce/ProductMedia.astro +113 -0
  53. package/src/components/lib/ecommerce/ProductRating.astro +78 -0
  54. package/src/components/lib/ecommerce/ProductToolbar.astro +93 -0
  55. package/src/components/lib/ecommerce/PromoBar.astro +145 -0
  56. package/src/components/lib/ecommerce/StockIndicator.astro +127 -0
  57. package/src/components/lib/ecommerce/StoreHeader.astro +446 -0
  58. package/src/components/lib/ecommerce/StoreHero.astro +260 -0
  59. package/src/components/lib/ecommerce/StoreProductCard.astro +307 -0
  60. package/src/components/lib/ecommerce/TrustBadges.astro +101 -0
  61. package/src/components/lib/ecommerce/VariantPicker.astro +145 -0
  62. package/src/components/lib/ecommerce/cart-store.ts +151 -0
  63. package/src/components/lib/ecommerce/catalog-filter.ts +62 -0
  64. package/src/components/lib/ecommerce/index.ts +34 -0
  65. package/src/components/lib/ecommerce/product-icons.ts +28 -0
  66. package/src/components/lib/ecommerce/types.ts +70 -0
  67. package/src/components/lib/forms/AnimatedInput.astro +4 -2
  68. package/src/components/lib/forms/CustomRadioGroup.astro +3 -1
  69. package/src/components/lib/index.ts +2 -0
  70. package/src/components/lib/layout/BentoGrid3.astro +6 -4
  71. package/src/components/lib/layout/CenterFixedBox.astro +2 -2
  72. package/src/components/lib/layout/CenteredContainer.astro +4 -2
  73. package/src/components/lib/layout/ClusterHorizontal.astro +2 -2
  74. package/src/components/lib/layout/FeatureHero.astro +4 -2
  75. package/src/components/lib/layout/FooterCenteredMinimal.astro +4 -2
  76. package/src/components/lib/layout/FullBleedSection.astro +2 -2
  77. package/src/components/lib/layout/GalleryGrid4.astro +2 -2
  78. package/src/components/lib/layout/HolyGrailGrid.astro +11 -9
  79. package/src/components/lib/layout/LandingSectionSplit.astro +5 -3
  80. package/src/components/lib/layout/MasonryGrid.astro +2 -2
  81. package/src/components/lib/layout/MinimalFooterGrid.astro +1 -1
  82. package/src/components/lib/layout/ScrollSnapSection.astro +1 -1
  83. package/src/components/lib/layout/SidebarLayoutWrapper.astro +4 -2
  84. package/src/components/lib/layout/SplitScreenLayout.astro +3 -3
  85. package/src/components/lib/layout/StepLayoutVertical.astro +1 -1
  86. package/src/components/lib/layout/StickySidebarWrapper.astro +4 -2
  87. package/src/components/lib/sections/AgencyContactBrief.astro +194 -0
  88. package/src/components/lib/sections/AgencyFooterCta.astro +94 -0
  89. package/src/components/lib/sections/AgencyHeader.astro +161 -0
  90. package/src/components/lib/sections/AgencyHeroKinetic.astro +172 -0
  91. package/src/components/lib/sections/AgencyServicesList.astro +113 -0
  92. package/src/components/lib/sections/AgencyTeamGrid.astro +111 -0
  93. package/src/components/lib/sections/AgencyWorkGrid.astro +147 -0
  94. package/src/components/lib/sections/BlogGridSection.astro +9 -7
  95. package/src/components/lib/sections/ButtonsShowcase.astro +20 -18
  96. package/src/components/lib/sections/CardsShowcase.astro +28 -26
  97. package/src/components/lib/sections/CareersOpenings.astro +10 -8
  98. package/src/components/lib/sections/ChangelogSection.astro +20 -7
  99. package/src/components/lib/sections/ContactGlassForm.astro +10 -8
  100. package/src/components/lib/sections/ContactSplitMap.astro +11 -9
  101. package/src/components/lib/sections/CtaAppDownload.astro +13 -11
  102. package/src/components/lib/sections/CtaGlowBanner.astro +12 -10
  103. package/src/components/lib/sections/CtaNewsletterSection.astro +13 -11
  104. package/src/components/lib/sections/CtaSplitImage.astro +13 -11
  105. package/src/components/lib/sections/DataShowcase.astro +23 -21
  106. package/src/components/lib/sections/FaqAccordionSection.astro +8 -8
  107. package/src/components/lib/sections/FaqTwoColumn.astro +9 -7
  108. package/src/components/lib/sections/FeatureAlternatingRows.astro +10 -8
  109. package/src/components/lib/sections/FeatureBentoGrid.astro +13 -11
  110. package/src/components/lib/sections/FeatureIconGrid.astro +6 -6
  111. package/src/components/lib/sections/FeatureTabsShowcase.astro +13 -11
  112. package/src/components/lib/sections/FeatureTimelineFlow.astro +8 -6
  113. package/src/components/lib/sections/FeedbackShowcase.astro +15 -13
  114. package/src/components/lib/sections/FooterMegaSection.astro +13 -11
  115. package/src/components/lib/sections/FormsShowcase.astro +22 -20
  116. package/src/components/lib/sections/HeroDashboardPreview.astro +11 -9
  117. package/src/components/lib/sections/HeroGlass.astro +22 -20
  118. package/src/components/lib/sections/HeroGradient.astro +15 -13
  119. package/src/components/lib/sections/HeroMinimalCentered.astro +10 -10
  120. package/src/components/lib/sections/HeroShowcaseSplit.astro +18 -16
  121. package/src/components/lib/sections/HeroSplit.astro +13 -11
  122. package/src/components/lib/sections/HeroTerminal.astro +14 -12
  123. package/src/components/lib/sections/HeroWaitlist.astro +10 -8
  124. package/src/components/lib/sections/HowItWorksSteps.astro +12 -10
  125. package/src/components/lib/sections/IntegrationsGrid.astro +7 -7
  126. package/src/components/lib/sections/LayoutShowcase.astro +21 -19
  127. package/src/components/lib/sections/LogoCloudSection.astro +4 -4
  128. package/src/components/lib/sections/LogoWallGrid.astro +6 -4
  129. package/src/components/lib/sections/NavigationShowcase.astro +15 -13
  130. package/src/components/lib/sections/OverlaysShowcase.astro +21 -19
  131. package/src/components/lib/sections/PricingComparisonMatrix.astro +15 -13
  132. package/src/components/lib/sections/PricingSinglePlan.astro +13 -11
  133. package/src/components/lib/sections/PricingTierCards.astro +11 -9
  134. package/src/components/lib/sections/PricingToggleCards.astro +13 -13
  135. package/src/components/lib/sections/ShopCategoryHero.astro +103 -0
  136. package/src/components/lib/sections/ShopCollectionMosaic.astro +131 -0
  137. package/src/components/lib/sections/ShopFooterWordmark.astro +100 -0
  138. package/src/components/lib/sections/ShopHeaderEditorial.astro +396 -0
  139. package/src/components/lib/sections/ShopHeroEditorial.astro +151 -0
  140. package/src/components/lib/sections/ShopLookbook.astro +250 -0
  141. package/src/components/lib/sections/ShopNewsletterEditorial.astro +128 -0
  142. package/src/components/lib/sections/ShopProductRail.astro +150 -0
  143. package/src/components/lib/sections/ShopReviewsEditorial.astro +133 -0
  144. package/src/components/lib/sections/ShopValuesMarquee.astro +91 -0
  145. package/src/components/lib/sections/StatsCounterBand.astro +9 -7
  146. package/src/components/lib/sections/StatsDashboardSection.astro +4 -2
  147. package/src/components/lib/sections/StatsMetricShowcase.astro +9 -7
  148. package/src/components/lib/sections/TeamGridSection.astro +12 -10
  149. package/src/components/lib/sections/TestimonialCarousel.astro +10 -8
  150. package/src/components/lib/sections/TestimonialFeatured.astro +7 -5
  151. package/src/components/lib/sections/TestimonialGridSection.astro +7 -7
  152. package/src/components/lib/sections/TestimonialWallGlass.astro +11 -9
  153. package/src/components/lib/sections/TypographyShowcase.astro +10 -8
  154. package/src/components/lib/sections/index.ts +10 -0
  155. package/src/components/lib/templates/ecommerce/StoreCategoryPage.astro +160 -0
  156. package/src/components/lib/templates/ecommerce/StoreCheckoutPage.astro +98 -0
  157. package/src/components/lib/templates/ecommerce/StoreHomePage.astro +191 -0
  158. package/src/components/lib/templates/ecommerce/StoreLayout.astro +169 -0
  159. package/src/components/lib/templates/ecommerce/StoreProductPage.astro +165 -0
  160. package/src/components/lib/templates/ecommerce/data.ts +187 -0
  161. package/src/components/lib/templates/ecommerce/index.ts +14 -0
  162. package/src/components/lib/templates/ecommerce-editorial/EditorialBagPage.astro +52 -0
  163. package/src/components/lib/templates/ecommerce-editorial/EditorialCheckoutPage.astro +123 -0
  164. package/src/components/lib/templates/ecommerce-editorial/EditorialHomePage.astro +102 -0
  165. package/src/components/lib/templates/ecommerce-editorial/EditorialLayout.astro +216 -0
  166. package/src/components/lib/templates/ecommerce-editorial/EditorialProductPage.astro +205 -0
  167. package/src/components/lib/templates/ecommerce-editorial/EditorialShopPage.astro +112 -0
  168. package/src/components/lib/templates/ecommerce-editorial/data.ts +125 -0
  169. package/src/components/lib/templates/ecommerce-editorial/index.ts +16 -0
  170. package/src/components/lib/templates/saas-hotel/AppLayout.astro +83 -0
  171. package/src/components/lib/templates/saas-hotel/DashboardPage.astro +66 -0
  172. package/src/components/lib/templates/saas-hotel/GuestsPage.astro +65 -0
  173. package/src/components/lib/templates/saas-hotel/LandingPage.astro +213 -0
  174. package/src/components/lib/templates/saas-hotel/ReportsPage.astro +63 -0
  175. package/src/components/lib/templates/saas-hotel/ReservationsPage.astro +49 -0
  176. package/src/components/lib/templates/saas-hotel/RoomsPage.astro +48 -0
  177. package/src/components/lib/templates/saas-hotel/SettingsPage.astro +115 -0
  178. package/src/components/lib/templates/saas-hotel/SignInPage.astro +50 -0
  179. package/src/components/lib/templates/saas-hotel/data.ts +229 -0
  180. package/src/components/lib/templates/saas-hotel/index.ts +19 -0
  181. package/src/components/lib/templates/saas-hotel/lobby-theme.css +90 -0
  182. package/src/data/registry/app.ts +93 -0
  183. package/src/data/registry/buttons.ts +3279 -0
  184. package/src/data/registry/cards.ts +1753 -0
  185. package/src/data/registry/charts-svg.ts +557 -0
  186. package/src/data/registry/charts.ts +500 -0
  187. package/src/data/registry/data.ts +986 -0
  188. package/src/data/registry/ecommerce.ts +269 -0
  189. package/src/data/registry/feedback.ts +1824 -0
  190. package/src/data/registry/forms.ts +2513 -0
  191. package/src/data/registry/index.ts +64 -0
  192. package/src/data/registry/layout.ts +206 -0
  193. package/src/data/registry/navigation.ts +936 -0
  194. package/src/data/registry/overlays.ts +1133 -0
  195. package/src/data/registry/sections-extra.ts +397 -0
  196. package/src/data/registry/sections.ts +361 -0
  197. package/src/data/registry/sources.ts +41 -0
  198. package/src/data/registry/templates.ts +414 -0
  199. package/src/data/registry/types.ts +30 -0
  200. package/src/data/registry/typography.ts +777 -0
  201. package/src/mcp/http-server.ts +324 -0
  202. package/src/mcp/index.ts +67 -0
  203. package/src/mcp/installer.ts +178 -0
  204. package/src/mcp/registry-adapter.ts +278 -0
  205. package/src/mcp/stdio-server.ts +11 -0
  206. package/src/mcp/tools.ts +247 -0
  207. package/src/mcp/types.ts +53 -0
  208. package/src/styles/global.css +95 -0
@@ -0,0 +1,986 @@
1
+ // src/data/registry/data.ts
2
+ import type { ComponentDoc } from './types';
3
+
4
+ export const data: ComponentDoc[] = [
5
+ {
6
+ slug: 'glass-table',
7
+ name: 'Glass Data Table',
8
+ description: 'A clean, translucent table for displaying structured data with sortable header styles.',
9
+ category: 'data',
10
+ tags: ['table', 'data', 'glass'],
11
+ featured: true,
12
+ code: `---
13
+ ---
14
+ <div class="table-wrap">
15
+ <table>
16
+ <thead><tr><th>User</th><th>Status</th><th>Role</th><th>Activity</th></tr></thead>
17
+ <tbody>
18
+ <tr><td>Alex Smith</td><td><span class="st st-active">Active</span></td><td>Admin</td><td>2m ago</td></tr>
19
+ <tr><td>Maria Garcia</td><td><span class="st st-away">Away</span></td><td>Editor</td><td>1h ago</td></tr>
20
+ <tr><td>James Wilson</td><td><span class="st st-offline">Offline</span></td><td>Viewer</td><td>2d ago</td></tr>
21
+ </tbody>
22
+ </table>
23
+ </div>
24
+ <style>
25
+ .table-wrap { width: 100%; overflow-x: auto; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; backdrop-filter: blur(10px); }
26
+ table { width: 100%; border-collapse: collapse; text-align: left; }
27
+ th { padding: 1rem 1.5rem; background: rgba(255,255,255,0.03); color: #818cf8; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid rgba(255,255,255,0.06); }
28
+ td { padding: 1rem 1.5rem; color: #e2e8f0; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
29
+ tr:hover td { background: rgba(255,255,255,0.02); }
30
+ .st { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; }
31
+ .st-active { background: rgba(16,185,129,0.1); color: #34d399; }
32
+ .st-away { background: rgba(245,158,11,0.1); color: #fbbf24; }
33
+ .st-offline { background: rgba(100,116,139,0.1); color: #94a3b8; }
34
+ </style>
35
+ `,
36
+ usage: `<GlassTable>Content</GlassTable>`,
37
+ },
38
+ {
39
+ slug: 'vertical-timeline',
40
+ name: 'Vertical Timeline',
41
+ description: 'Chronological list of events with a continuous vertical line and dot indicators.',
42
+ category: 'data',
43
+ tags: ['timeline', 'events', 'data'],
44
+ code: `---
45
+ ---
46
+ <div class="timeline-v">
47
+ <div class="t-item">
48
+ <div class="t-date">Oct 2024</div>
49
+ <div class="t-content"><h4>V2 Release</h4><p>Launched the modular registry architecture.</p></div>
50
+ </div>
51
+ <div class="t-item">
52
+ <div class="t-date">Aug 2024</div>
53
+ <div class="t-content"><h4>Beta Phase</h4><p>Community testing and initial component set.</p></div>
54
+ </div>
55
+ </div>
56
+ <style>
57
+ .timeline-v { position: relative; padding-left: 2rem; }
58
+ .timeline-v::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: rgba(99,102,241,0.2); }
59
+ .t-item { position: relative; margin-bottom: 2.5rem; }
60
+ .t-item::after { content: ""; position: absolute; left: -2.35rem; top: 5px; width: 12px; height: 12px; background: #6366f1; border: 3px solid #080b14; border-radius: 50%; }
61
+ .t-date { font-size: 0.75rem; font-weight: 700; color: #6366f1; margin-bottom: 0.25rem; }
62
+ h4 { color: #fff; margin: 0; }
63
+ p { font-size: 0.85rem; color: #94a3b8; margin-top: 0.25rem; }
64
+ </style>
65
+ `,
66
+ usage: `<VerticalTimeline>Content</VerticalTimeline>`,
67
+ },
68
+ {
69
+ slug: 'stats-grid-dashboard',
70
+ name: 'Metric Grid',
71
+ description: 'High-density grid of key performance indicators for dashboards.',
72
+ category: 'data',
73
+ tags: ['stats', 'dashboard', 'data'],
74
+ code: `---
75
+ ---
76
+ <div class="s-grid">
77
+ <div class="s-card"><span>Users</span><h3>12.4k</h3><small class="up">+12%</small></div>
78
+ <div class="s-card"><span>Revenue</span><h3>$48k</h3><small class="up">+5%</small></div>
79
+ <div class="s-card"><span>Bounce</span><h3>24%</h3><small class="down">-2%</small></div>
80
+ </div>
81
+ <style>
82
+ .s-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
83
+ .s-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255, 255, 255, 0.1); padding: 1.25rem; border-radius: 12px; }
84
+ span { font-size: 0.75rem; color: #64748b; font-weight: 600; text-transform: uppercase; }
85
+ h3 { font-size: 1.5rem; color: #fff; margin: 0.25rem 0; }
86
+ small { font-size: 0.7rem; font-weight: 700; }
87
+ .up { color: #10b981; }
88
+ .down { color: #ef4444; }
89
+ </style>
90
+ `,
91
+ usage: `<StatsGridDashboard>Content</StatsGridDashboard>`,
92
+ },
93
+ {
94
+ slug: 'accordion-group-glass',
95
+ name: 'Glass Accordion',
96
+ description: 'Expandable content sections with a subtle glass effect and smooth transitions.',
97
+ category: 'data',
98
+ tags: ['accordion', 'data', 'glass'],
99
+ code: `---
100
+ ---
101
+ <div class="acc-wrap">
102
+ <details open>
103
+ <summary>How do I install the components?</summary>
104
+ <div class="content">Simply copy the Astro and CSS code into your project.</div>
105
+ </details>
106
+ <details>
107
+ <summary>Is this open source?</summary>
108
+ <div class="content">Yes, Astro Components is free under the MIT license.</div>
109
+ </details>
110
+ </div>
111
+ <style>
112
+ .acc-wrap { display: flex; flex-direction: column; gap: 0.5rem; }
113
+ details { background: rgba(255,255,255,0.03); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; overflow: hidden; }
114
+ summary { padding: 1rem 1.5rem; cursor: pointer; color: #fff; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
115
+ summary:hover { background: rgba(255,255,255,0.02); }
116
+ summary::after { content: "+"; font-size: 1.25rem; transition: transform 0.3s; }
117
+ details[open] summary::after { transform: rotate(45deg); }
118
+ .content { padding: 0 1.5rem 1rem; color: #94a3b8; font-size: 0.9rem; line-height: 1.6; }
119
+ </style>
120
+ `,
121
+ usage: `<AccordionGroupGlass>Content</AccordionGroupGlass>`,
122
+ },
123
+ {
124
+ slug: 'avatar-group-stack',
125
+ name: 'Overlapping Avatars',
126
+ description: 'A set of user avatars clustered together, perfect for ',
127
+ category: 'data',
128
+ tags: ['avatar', 'data', 'group'],
129
+ code: `---
130
+ ---
131
+ <div class="av-group">
132
+ <div class="av" style="background:#6366f1">AJ</div>
133
+ <div class="av" style="background:#8b5cf6">MK</div>
134
+ <div class="av" style="background:#ec4899">SL</div>
135
+ <div class="av more">+4</div>
136
+ </div>
137
+ <style>
138
+ .av-group { display: flex; align-items: center; }
139
+ .av { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #080b14; margin-left: -10px; display: grid; place-items: center; font-size: 0.65rem; font-weight: 800; color: #fff; position: relative; transition: 0.2s; cursor: pointer; }
140
+ .av:first-child { margin-left: 0; }
141
+ .av:hover { transform: translateY(-4px); z-index: 10; }
142
+ .more { background: #1e293b; color: #94a3b8; border-style: dashed; }
143
+ </style>
144
+ `,
145
+ usage: `<AvatarGroupStack>Content</AvatarGroupStack>`,
146
+ },
147
+ {
148
+ slug: 'file-tree-view',
149
+ name: 'File Tree Structure',
150
+ description: 'A nested folder and file list hierarchy for representing directories.',
151
+ category: 'data',
152
+ tags: ['tree', 'data', 'files'],
153
+ code: `---
154
+ ---
155
+ <div class="tree">
156
+ <div class="folder active">📁 src</div>
157
+ <div class="indent">
158
+ <div class="folder">📁 components</div>
159
+ <div class="indent">
160
+ <div class="file">📄 Button.astro</div>
161
+ <div class="file">📄 Card.astro</div>
162
+ </div>
163
+ <div class="file">📄 styles.css</div>
164
+ </div>
165
+ <div class="file">📄 astro.config.mjs</div>
166
+ </div>
167
+ <style>
168
+ .tree { font-family: monospace; font-size: 0.85rem; color: #94a3b8; line-height: 1.8; }
169
+ .indent { padding-left: 1.25rem; border-left: 1px solid rgba(255,255,255,0.1); }
170
+ .folder { color: #fff; font-weight: 700; cursor: pointer; }
171
+ .folder.active { color: #818cf8; }
172
+ .file { cursor: pointer; padding-left: 4px; }
173
+ .file:hover { color: #fff; }
174
+ </style>
175
+ `,
176
+ usage: `<FileTreeView>Content</FileTreeView>`,
177
+ },
178
+ {
179
+ slug: 'calendar-grid-view',
180
+ name: 'Minimal Month Calendar',
181
+ description: 'Compact calendar grid for event scheduling and date selection.',
182
+ category: 'data',
183
+ tags: ['calendar', 'data', 'grid'],
184
+ code: `---
185
+ ---
186
+ <div class="cal-card">
187
+ <div class="cal-head"><h4>October 2024</h4></div>
188
+ <div class="cal-grid">
189
+ <span>Mo</span><span>Tu</span><span>We</span><span>Th</span><span>Fr</span><span>Sa</span><span>Su</span>
190
+ {[...Array(31)].map((_, i) => <div class:list={[{ "today": i+1 === 24 }]}>{i+1}</div>)}
191
+ </div>
192
+ </div>
193
+ <style>
194
+ .cal-card { background: #111; border: 1px solid #333; border-radius: 16px; padding: 1.25rem; width: fit-content; }
195
+ .cal-head { text-align: center; margin-bottom: 1rem; color: #fff; }
196
+ .cal-grid { display: grid; grid-template-columns: repeat(7, 35px); text-align: center; font-size: 0.75rem; color: #64748b; }
197
+ .cal-grid span { font-weight: 800; padding: 5px 0; color: #818cf8; }
198
+ .cal-grid div { padding: 8px 0; cursor: pointer; transition: 0.2s; }
199
+ .cal-grid div:hover { color: #fff; background: rgba(255,255,255,0.05); border-radius: 5px; }
200
+ .today { background: #6366f1; color: #fff !important; border-radius: 5px; box-shadow: 0 0 10px rgba(99,102,241,0.4); }
201
+ </style>
202
+ `,
203
+ usage: `<CalendarGridView>Content</CalendarGridView>`,
204
+ },
205
+ {
206
+ slug: 'description-list-horiz',
207
+ name: 'Data Key-Value List',
208
+ description: 'Clean list for technical specifications or user details.',
209
+ category: 'data',
210
+ tags: ['data', 'list', 'details'],
211
+ code: `---
212
+ ---
213
+ <dl class="desc-list">
214
+ <div class="row"><dt>Module Name</dt><dd>AuthEngine</dd></div>
215
+ <div class="row"><dt>Version</dt><dd>1.4.2</dd></div>
216
+ <div class="row"><dt>Status</dt><dd>Deployment Ready</dd></div>
217
+ </dl>
218
+ <style>
219
+ .desc-list { display: flex; flex-direction: column; width: 100%; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; overflow: hidden; background: rgba(0,0,0,0.1); }
220
+ .row { display: grid; grid-template-columns: 140px 1fr; padding: 0.75rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.85rem; }
221
+ .row:last-child { border-bottom: none; }
222
+ dt { color: #64748b; font-weight: 600; }
223
+ dd { color: #fff; margin: 0; }
224
+ </style>
225
+ `,
226
+ usage: `<DescriptionListHoriz>Content</DescriptionListHoriz>`,
227
+ },
228
+ {
229
+ slug: 'tag-cloud-data',
230
+ name: 'Metric Tag Cloud',
231
+ description: 'Visual group of tags or keywords for categorization.',
232
+ category: 'data',
233
+ tags: ['tags', 'cloud', 'data'],
234
+ code: `---
235
+ ---
236
+ <div class="t-cloud">
237
+ <span class="t-pill">React</span>
238
+ <span class="t-pill t-active">Astro</span>
239
+ <span class="t-pill">Next.js</span>
240
+ <span class="t-pill">Vue</span>
241
+ <span class="t-pill">Svelte</span>
242
+ </div>
243
+ <style>
244
+ .t-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
245
+ .t-pill { padding: 4px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 100px; color: #94a3b8; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
246
+ .t-pill:hover, .t-active { background: #6366f1; color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(99,102,241,0.3); }
247
+ </style>
248
+ `,
249
+ usage: `<TagCloudData>Content</TagCloudData>`,
250
+ },
251
+ {
252
+ slug: 'stepper-data-vertical',
253
+ name: 'Vertical Steps',
254
+ description: 'Visual path for multi-step data processes or wizards.',
255
+ category: 'data',
256
+ tags: ['steps', 'data', 'vertical'],
257
+ code: `---
258
+ ---
259
+ <div class="v-steps">
260
+ <div class="v-step done"><span>Check</span>Account Created</div>
261
+ <div class="v-step current"><span>2</span>Verify Email</div>
262
+ <div class="v-step"><span>3</span>Setup Profile</div>
263
+ </div>
264
+ <style>
265
+ .v-steps { display: flex; flex-direction: column; gap: 1rem; }
266
+ .v-step { display: flex; align-items: center; gap: 1rem; color: #64748b; font-size: 0.9rem; font-weight: 600; }
267
+ .v-step span { width: 24px; height: 24px; background: #1e293b; display: grid; place-items: center; border-radius: 50%; font-size: 0.7rem; border: 1px solid #334155; }
268
+ .current { color: #fff; }
269
+ .current span { background: #6366f1; border-color: #6366f1; box-shadow: 0 0 10px rgba(99,102,241,0.4); }
270
+ .done span { background: #10b981; border-color: #10b981; color: #fff; }
271
+ </style>
272
+ `,
273
+ usage: `<StepperDataVertical>Content</StepperDataVertical>`,
274
+ },
275
+ {
276
+ slug: 'rating-breakdown-bar',
277
+ name: 'Rating Distribution',
278
+ description: 'Bar graph breakdown of user ratings/reviews.',
279
+ category: 'data',
280
+ tags: ['rating', 'data', 'graph'],
281
+ code: `---
282
+ ---
283
+ <div class="rating-box">
284
+ <div class="r-row"><span>5★</span><div class="bar-bg"><div class="bar-val" style="width: 80%"></div></div></div>
285
+ <div class="r-row"><span>4★</span><div class="bar-bg"><div class="bar-val" style="width: 15%"></div></div></div>
286
+ <div class="r-row"><span>3★</span><div class="bar-bg"><div class="bar-val" style="width: 5%"></div></div></div>
287
+ </div>
288
+ <style>
289
+ .rating-box { display: flex; flex-direction: column; gap: 8px; width: 220px; }
290
+ .r-row { display: flex; align-items: center; gap: 10px; color: #94a3b8; font-size: 0.75rem; font-weight: 700; }
291
+ .bar-bg { flex: 1; height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; border: 1px solid rgba(255, 255, 255, 0.03); }
292
+ .bar-val { height: 100%; background: #fbbf24; border-radius: inherit; box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
293
+ </style>
294
+ `,
295
+ usage: `<RatingBreakdownBar>Content</RatingBreakdownBar>`,
296
+ },
297
+ {
298
+ slug: 'timeline-horiz-steps',
299
+ name: 'Horizontal Timeline',
300
+ description: 'Side-scrolling event tracker with distinct timestamps.',
301
+ category: 'data',
302
+ tags: ['timeline', 'horizontal', 'data'],
303
+ code: `---
304
+ ---
305
+ <div class="h-timeline">
306
+ <div class="h-line"></div>
307
+ <div class="h-item"><span>2022</span><strong>Founded</strong></div>
308
+ <div class="h-item"><span>2023</span><strong>Global</strong></div>
309
+ <div class="h-item curr"><span>2024</span><strong>V2.0</strong></div>
310
+ </div>
311
+ <style>
312
+ .h-timeline { display: flex; justify-content: space-between; position: relative; padding: 2rem 0; width: 100%; max-width: 600px; margin: 0 auto; }
313
+ .h-line { position: absolute; top: 3.2rem; left: 0; width: 100%; height: 2px; background: rgba(255,255,255,0.1); }
314
+ .h-item { text-align: center; position: relative; z-index: 1; min-width: 80px; }
315
+ .h-item span { display: block; font-size: 0.7rem; color: #64748b; margin-bottom: 2rem; font-weight: 700; }
316
+ .h-item::after { content: ""; position: absolute; left: 50%; top: 1.1rem; width: 16px; height: 16px; background: #1e293b; border: 3px solid #334155; border-radius: 50%; transform: translateX(-50%); transition: 0.3s; }
317
+ strong { display: block; color: #fff; font-size: 0.85rem; }
318
+ .curr strong { color: #6366f1; }
319
+ .curr::after { background: #6366f1; border-color: #080b14; box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); }
320
+ </style>
321
+ `,
322
+ usage: `<TimelineHorizSteps>Content</TimelineHorizSteps>`,
323
+ },
324
+ {
325
+ slug: 'price-compare-table',
326
+ name: 'Comparison Table',
327
+ description: 'Grid layout for comparing plan features side-by-side.',
328
+ category: 'data',
329
+ tags: ['table', 'pricing', 'compare'],
330
+ code: `---
331
+ ---
332
+ <div class="c-wrap">
333
+ <table>
334
+ <thead>
335
+ <tr><th>Features</th><th>Free</th><th>Pro</th></tr>
336
+ </thead>
337
+ <tbody>
338
+ <tr><td>Feature A</td><td>✅</td><td>✅</td></tr>
339
+ <tr><td>Feature B</td><td>❌</td><td>✅</td></tr>
340
+ <tr><td>Storage</td><td>10GB</td><td>100GB</td></tr>
341
+ </tbody>
342
+ </table>
343
+ </div>
344
+ <style>
345
+ .c-wrap { background: #0f172a; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden; }
346
+ table { width: 100%; font-size: 0.85rem; color: #e2e8f0; border-collapse: collapse; }
347
+ th { padding: 1rem; background: rgba(255, 255, 255, 0.05); color: #fff; text-align: center; font-weight: 800; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
348
+ th:first-child { text-align: left; }
349
+ td { padding: 1rem; border: 1px solid rgba(255, 255, 255, 0.05); text-align: center; }
350
+ td:first-child { text-align: left; background: rgba(255,255,255,0.02); width: 40%; font-weight: 600; }
351
+ </style>
352
+ `,
353
+ usage: `<PriceCompareTable>Content</PriceCompareTable>`,
354
+ },
355
+ {
356
+ slug: 'user-directory-item',
357
+ name: 'Directory Card',
358
+ description: 'Compact row for listing users with avatar and online status.',
359
+ category: 'data',
360
+ tags: ['user', 'list', 'data'],
361
+ code: `---
362
+ ---
363
+ <div class="u-item">
364
+ <div class="u-pic">JS</div>
365
+ <div class="u-info"><h5>John Doe</h5><p>Software Engineer</p></div>
366
+ <div class="u-stat">Online</div>
367
+ </div>
368
+ <style>
369
+ .u-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: rgba(255, 255, 255, 0.03); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.08); transition: 0.2s; }
370
+ .u-item:hover { border-color: rgba(99, 102, 241, 0.4); background: rgba(99, 102, 241, 0.05); }
371
+ .u-pic { width: 42px; height: 42px; background: linear-gradient(135deg, #6366f1, #c084fc); border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.8rem; }
372
+ .u-info h5 { margin: 0; color: #fff; font-size: 1rem; }
373
+ .u-info p { margin: 2px 0 0; font-size: 0.75rem; color: #64748b; }
374
+ .u-stat { margin-left: auto; font-size: 0.65rem; color: #34d399; font-weight: 800; text-transform: uppercase; background: rgba(52, 211, 153, 0.1); padding: 2px 8px; border-radius: 4px; }
375
+ </style>
376
+ `,
377
+ usage: `<UserDirectoryItem>Content</UserDirectoryItem>`,
378
+ },
379
+ {
380
+ slug: 'data-chips-group',
381
+ name: 'Filter Chips List',
382
+ description: 'Group of interactive chips for data filtering.',
383
+ category: 'data',
384
+ tags: ['chips', 'filter', 'data'],
385
+ code: `---
386
+ ---
387
+ <div class="chips-row">
388
+ <span class="chip-active">All Assets</span>
389
+ <span>Images</span>
390
+ <span>Videos</span>
391
+ <span>Docs</span>
392
+ <span>Music</span>
393
+ </div>
394
+ <style>
395
+ .chips-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
396
+ .chips-row::-webkit-scrollbar { display: none; }
397
+ .chips-row span { padding: 6px 16px; background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.05); color: #94a3b8; font-size: 0.8rem; border-radius: 100px; cursor: pointer; white-space: nowrap; transition: 0.2s; font-weight: 600; }
398
+ .chips-row span:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
399
+ .chip-active { background: #6366f1 !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); }
400
+ </style>
401
+ `,
402
+ usage: `<DataChipsGroup>Content</DataChipsGroup>`,
403
+ },
404
+ {
405
+ slug: 'sparkline-stat-card',
406
+ name: 'Metric with Sparkline',
407
+ description: 'Data card showing target metric and a miniature trend graph.',
408
+ category: 'data',
409
+ tags: ['graph', 'stat', 'data'],
410
+ code: `---
411
+ ---
412
+ <div class="spark-card">
413
+ <div class="top"><span>Sessions</span><h3>2,415</h3></div>
414
+ <div class="graph">
415
+ <svg viewBox="0 0 100 30">
416
+ <path d="M0 25 L10 20 L20 22 L30 15 L40 18 L50 25 L60 10 L70 12 L80 5 L90 8 L100 2" fill="none" stroke="#6366f1" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
417
+ </svg>
418
+ </div>
419
+ </div>
420
+ <style>
421
+ .spark-card { padding: 1.5rem; background: #111; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; min-width: 160px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
422
+ h3 { margin: 4px 0; color: #fff; font-size: 1.5rem; font-weight: 800; }
423
+ span { font-size: 0.75rem; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
424
+ .graph { margin-top: 15px; height: 30px; opacity: 0.8; }
425
+ </style>
426
+ `,
427
+ usage: `<SparklineStatCard>Content</SparklineStatCard>`,
428
+ },
429
+ {
430
+ slug: 'progress-list-small',
431
+ name: 'Minimal Progress List',
432
+ description: 'Set of progress bars labels for small dashboards.',
433
+ category: 'data',
434
+ tags: ['progress', 'data', 'stat'],
435
+ code: `---
436
+ ---
437
+ <div class="p-list">
438
+ <div class="p-row"><span>Storage</span><strong>42%</strong></div>
439
+ <div class="p-bar"><div class="fill" style="width: 42%"></div></div>
440
+ <div style="margin-top: 1rem"></div>
441
+ <div class="p-row"><span>Bandwidth</span><strong>68%</strong></div>
442
+ <div class="p-bar"><div class="fill" style="width: 68%; background: #c084fc"></div></div>
443
+ </div>
444
+ <style>
445
+ .p-list { width: 100%; max-width: 300px; }
446
+ .p-row { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 6px; }
447
+ span { color: #64748b; font-weight: 600; }
448
+ strong { color: #fff; }
449
+ .p-bar { height: 6px; background: rgba(255, 255, 255, 0.05); border-radius: 100px; overflow: hidden; }
450
+ .fill { height: 100%; background: #6366f1; border-radius: inherit; }
451
+ </style>
452
+ `,
453
+ usage: `<ProgressListSmall>Content</ProgressListSmall>`,
454
+ },
455
+ {
456
+ slug: 'tree-item-interactive',
457
+ name: 'Expandable Row',
458
+ description: 'List item that toggles visible child data on click.',
459
+ category: 'data',
460
+ tags: ['tree', 'interactive', 'data'],
461
+ code: `---
462
+ ---
463
+ <div class="exp-row">
464
+ <div class="main"><span>▶</span> Users Database</div>
465
+ <div class="child">
466
+ <p>Columns: id, name, email, avatar, status</p>
467
+ <p>Rows: 1,402 entries</p>
468
+ </div>
469
+ </div>
470
+ <style>
471
+ .exp-row { border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 12px; }
472
+ .main { color: #fff; font-size: 0.85rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
473
+ .main span { font-size: 0.6rem; color: #64748b; transition: 0.3s; }
474
+ .child { margin-top: 12px; padding-left: 24px; color: #64748b; font-size: 0.8rem; display: none; line-height: 1.5; }
475
+ .exp-row:hover .main { color: #818cf8; }
476
+ .exp-row:hover .main span { transform: rotate(90deg); color: #818cf8; }
477
+ .exp-row:hover .child { display: block; }
478
+ </style>
479
+ `,
480
+ usage: `<TreeItemInteractive>Content</TreeItemInteractive>`,
481
+ },
482
+ {
483
+ slug: 'key-value-pill-group',
484
+ name: 'Metadata Pill List',
485
+ description: 'Dense grouping of status metadata for entities.',
486
+ category: 'data',
487
+ tags: ['metadata', 'pills', 'data'],
488
+ code: `---
489
+ ---
490
+ <div class="meta-row">
491
+ <div class="m-pill">OS:<span>MacOS</span></div>
492
+ <div class="m-pill">Ver:<span>14.5</span></div>
493
+ <div class="m-pill">Arch:<span>ARM64</span></div>
494
+ </div>
495
+ <style>
496
+ .meta-row { display: flex; gap: 8px; flex-wrap: wrap; }
497
+ .m-pill { background: rgba(0,0,0,0.2); color: #64748b; font-size: 0.7rem; padding: 4px 12px; border-radius: 8px; font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.05); }
498
+ span { color: #e2e8f0; margin-left: 6px; }
499
+ </style>
500
+ `,
501
+ usage: `<KeyValuePillGroup>Content</KeyValuePillGroup>`,
502
+ },
503
+ {
504
+ slug: 'gantt-chart-minimal',
505
+ name: 'Gantt Timeline UI',
506
+ description: 'Simplified bar-based timeline for project schedules.',
507
+ category: 'data',
508
+ tags: ['gantt', 'project', 'data'],
509
+ code: `---
510
+ ---
511
+ <div class="gantt">
512
+ <div class="g-row"><div class="g-bar" style="width: 40%; margin-left: 10%; background: #6366f1"></div></div>
513
+ <div class="g-row"><div class="g-bar" style="width: 30%; margin-left: 55%; background: #c084fc"></div></div>
514
+ <div class="g-row"><div class="g-bar" style="width: 20%; margin-left: 20%; background: #10b981"></div></div>
515
+ </div>
516
+ <style>
517
+ .gantt { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 8px; background: rgba(0,0,0,0.3); padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); }
518
+ .g-row { height: 20px; position: relative; width: 100%; background: rgba(255,255,255,0.02); border-radius: 4px; }
519
+ .g-bar { height: 100%; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
520
+ </style>
521
+ `,
522
+ usage: `<GanttChartMinimal>Content</GanttChartMinimal>`,
523
+ },
524
+ {
525
+ slug: 'metric-comparison-row',
526
+ name: 'Metric Comparison Row',
527
+ description: 'Compact horizontal metric row comparing Current vs Previous periods or A/B performance with ratio progress bars.',
528
+ category: 'data',
529
+ tags: ["data","metric","comparison","kpi","analytics"],
530
+ featured: true,
531
+ code: `---
532
+ /**
533
+ * MetricComparisonRow — Horizontal gauge comparing actual performance vs target benchmark with percentage badge.
534
+ *
535
+ * @param {string} title - Benchmark description (e.g. 'Monthly Revenue Target').
536
+ * @param {number} current - Current numeric value figure.
537
+ * @param {number} target - Goal target value.
538
+ * @param {string} unit - Unit prefix or suffix (e.g. '$', 'ms', 'users'). Default is '$'.
539
+ * @param {string} color - Progress bar accent color. Default is '#d4a017'.
540
+ */
541
+ interface Props {
542
+ title: string;
543
+ current: number;
544
+ target: number;
545
+ unit?: string;
546
+ color?: string;
547
+ }
548
+
549
+ const {
550
+ title,
551
+ current,
552
+ target,
553
+ unit = '$',
554
+ color = '#d4a017',
555
+ } = Astro.props;
556
+
557
+ const percent = Math.min(100, Math.round((current / target) * 100));
558
+ ---
559
+
560
+ <div class="metric-row" style={\`--metric-accent: \${color};\`}>
561
+ <div class="metric-row__header">
562
+ <div class="metric-row__title-wrap">
563
+ <h5 class="metric-row__title">{title}</h5>
564
+ <span class="metric-row__ratio">{unit}{current.toLocaleString()} of {unit}{target.toLocaleString()}</span>
565
+ </div>
566
+ <span class="metric-row__badge">{percent}%</span>
567
+ </div>
568
+
569
+ <div class="metric-row__track" role="progressbar" aria-valuenow={current} aria-valuemax={target} aria-valuemin="0">
570
+ <div class="metric-row__fill" style={\`width: \${percent}%;\`}></div>
571
+ </div>
572
+ </div>
573
+
574
+ <style>
575
+ .metric-row {
576
+ display: flex;
577
+ flex-direction: column;
578
+ gap: 8px;
579
+ width: 100%;
580
+ max-width: 440px;
581
+ padding: var(--sp-4, 1rem);
582
+ background: rgba(255, 255, 255, 0.02);
583
+ backdrop-filter: blur(12px);
584
+ border: 1px solid rgba(255, 255, 255, 0.06);
585
+ border-radius: var(--r-md, 14px);
586
+ font-family: var(--font-sans, system-ui, sans-serif);
587
+ }
588
+
589
+ .metric-row__header {
590
+ display: flex;
591
+ justify-content: space-between;
592
+ align-items: flex-end;
593
+ }
594
+
595
+ .metric-row__title-wrap {
596
+ display: flex;
597
+ flex-direction: column;
598
+ gap: 2px;
599
+ }
600
+
601
+ .metric-row__title {
602
+ font-size: 0.88rem;
603
+ font-weight: 700;
604
+ color: var(--c-text-1, #ffffff);
605
+ margin: 0;
606
+ }
607
+
608
+ .metric-row__ratio {
609
+ font-size: 0.75rem;
610
+ color: var(--c-text-3, #737373);
611
+ }
612
+
613
+ .metric-row__badge {
614
+ font-size: 0.82rem;
615
+ font-weight: 800;
616
+ color: var(--metric-accent);
617
+ background: rgba(184, 134, 11, 0.12);
618
+ border: 1px solid rgba(184, 134, 11, 0.3);
619
+ padding: 2px 8px;
620
+ border-radius: var(--r-full, 9999px);
621
+ }
622
+
623
+ .metric-row__track {
624
+ height: 8px;
625
+ background: rgba(255, 255, 255, 0.06);
626
+ border-radius: var(--r-full, 9999px);
627
+ overflow: hidden;
628
+ }
629
+
630
+ .metric-row__fill {
631
+ height: 100%;
632
+ background: linear-gradient(90deg, #b8860b, var(--metric-accent));
633
+ border-radius: inherit;
634
+ box-shadow: 0 0 10px rgba(212, 160, 23, 0.4);
635
+ transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
636
+ }
637
+ </style>
638
+ `,
639
+ usage: `<MetricComparisonRow label="Conversion Rate" currentValue="4.82%" previousValue="3.15%" change="+53.0%" />`,
640
+ },
641
+ {
642
+ slug: 'activity-heatmap-grid',
643
+ name: 'Activity Heatmap Grid',
644
+ description: 'GitHub-styled commit/activity frequency matrix visualizing contribution density across days and weeks.',
645
+ category: 'data',
646
+ tags: ["data","heatmap","activity","github","matrix"],
647
+ featured: true,
648
+ code: `---
649
+ /**
650
+ * ActivityHeatmapGrid — GitHub-style activity contribution matrix with intensity color levels and month labels.
651
+ *
652
+ * @param {string} title - Section header label. Default is 'Commit Activity'.
653
+ * @param {number} totalCount - Total activity events recorded. Default is 1428.
654
+ */
655
+ interface Props {
656
+ title?: string;
657
+ totalCount?: number;
658
+ }
659
+
660
+ const {
661
+ title = 'Contribution Activity',
662
+ totalCount = 1428,
663
+ } = Astro.props;
664
+
665
+ // Mock 16 weeks of 7 days
666
+ const weeks = Array.from({ length: 16 }, (_, w) =>
667
+ Array.from({ length: 7 }, (_, d) => {
668
+ // Generate pseudo-random intensity 0 to 4
669
+ const seed = (w * 7 + d * 13 + 5) % 17;
670
+ if (seed < 4) return 0;
671
+ if (seed < 8) return 1;
672
+ if (seed < 12) return 2;
673
+ if (seed < 15) return 3;
674
+ return 4;
675
+ })
676
+ );
677
+
678
+ const months = ['Jul', 'Aug', 'Sep', 'Oct'];
679
+ ---
680
+
681
+ <div class="heatmap-card">
682
+ <div class="heatmap-card__head">
683
+ <div class="heatmap-card__title-wrap">
684
+ <h5 class="heatmap-card__title">{title}</h5>
685
+ <span class="heatmap-card__total">{totalCount.toLocaleString()} events in the last 4 months</span>
686
+ </div>
687
+
688
+ <div class="heatmap-card__legend" aria-hidden="true">
689
+ <span class="legend-text">Less</span>
690
+ <span class="cell cell--0"></span>
691
+ <span class="cell cell--1"></span>
692
+ <span class="cell cell--2"></span>
693
+ <span class="cell cell--3"></span>
694
+ <span class="cell cell--4"></span>
695
+ <span class="legend-text">More</span>
696
+ </div>
697
+ </div>
698
+
699
+ <div class="heatmap-card__matrix">
700
+ <div class="heatmap-card__months">
701
+ {months.map((m) => (
702
+ <span class="month-label">{m}</span>
703
+ ))}
704
+ </div>
705
+
706
+ <div class="heatmap-card__grid">
707
+ {weeks.map((week) => (
708
+ <div class="heatmap-col">
709
+ {week.map((level) => (
710
+ <span class:list={['cell', \`cell--\${level}\`]}></span>
711
+ ))}
712
+ </div>
713
+ ))}
714
+ </div>
715
+ </div>
716
+ </div>
717
+
718
+ <style>
719
+ .heatmap-card {
720
+ display: flex;
721
+ flex-direction: column;
722
+ gap: 12px;
723
+ padding: var(--sp-6, 1.5rem);
724
+ background: rgba(255, 255, 255, 0.02);
725
+ backdrop-filter: blur(16px);
726
+ border: 1px solid rgba(255, 255, 255, 0.08);
727
+ border-radius: var(--r-xl, 20px);
728
+ width: 100%;
729
+ max-width: 480px;
730
+ font-family: var(--font-sans, system-ui, sans-serif);
731
+ }
732
+
733
+ .heatmap-card__head {
734
+ display: flex;
735
+ justify-content: space-between;
736
+ align-items: flex-start;
737
+ gap: 12px;
738
+ }
739
+
740
+ .heatmap-card__title {
741
+ font-size: 0.95rem;
742
+ font-weight: 700;
743
+ color: var(--c-text-1, #ffffff);
744
+ margin: 0 0 2px 0;
745
+ }
746
+
747
+ .heatmap-card__total {
748
+ font-size: 0.75rem;
749
+ color: var(--c-text-3, #737373);
750
+ }
751
+
752
+ .heatmap-card__legend {
753
+ display: flex;
754
+ align-items: center;
755
+ gap: 4px;
756
+ font-size: 0.7rem;
757
+ color: var(--c-text-3, #737373);
758
+ }
759
+
760
+ .heatmap-card__matrix {
761
+ display: flex;
762
+ flex-direction: column;
763
+ gap: 6px;
764
+ overflow-x: auto;
765
+ padding-bottom: 4px;
766
+ }
767
+
768
+ .heatmap-card__months {
769
+ display: flex;
770
+ justify-content: space-between;
771
+ padding: 0 4px;
772
+ font-size: 0.68rem;
773
+ color: var(--c-text-3, #737373);
774
+ font-weight: 600;
775
+ }
776
+
777
+ .heatmap-card__grid {
778
+ display: flex;
779
+ gap: 4px;
780
+ }
781
+
782
+ .heatmap-col {
783
+ display: flex;
784
+ flex-direction: column;
785
+ gap: 4px;
786
+ }
787
+
788
+ .cell {
789
+ width: 12px;
790
+ height: 12px;
791
+ border-radius: 3px;
792
+ transition: transform 0.15s ease;
793
+ }
794
+
795
+ .heatmap-card__grid .cell:hover {
796
+ transform: scale(1.3);
797
+ }
798
+
799
+ .cell--0 { background: rgba(255, 255, 255, 0.05); }
800
+ .cell--1 { background: rgba(184, 134, 11, 0.25); }
801
+ .cell--2 { background: rgba(184, 134, 11, 0.55); }
802
+ .cell--3 { background: rgba(212, 160, 23, 0.85); }
803
+ .cell--4 { background: #fef3c7; box-shadow: 0 0 6px rgba(254, 243, 199, 0.6); }
804
+ </style>
805
+ `,
806
+ usage: `<ActivityHeatmapGrid title="Contribution Activity" weeks={16} />`,
807
+ },
808
+ {
809
+ slug: 'status-timeline-feed',
810
+ name: 'Status Timeline Feed',
811
+ description: 'Rich operational audit and incident log timeline feed with status color badges, author tags, and relative timestamps.',
812
+ category: 'data',
813
+ tags: ["data","timeline","status","audit","feed"],
814
+ featured: false,
815
+ code: `---
816
+ /**
817
+ * StatusTimelineFeed — Chronological event audit feed with status icons, timestamps, and detail lines.
818
+ *
819
+ * @param {Array<{title: string, desc: string, time: string, status: 'done' | 'active' | 'pending'}>} events - Timeline events.
820
+ */
821
+ interface Props {
822
+ events?: Array<{
823
+ title: string;
824
+ desc: string;
825
+ time: string;
826
+ status: 'done' | 'active' | 'pending';
827
+ }>;
828
+ }
829
+
830
+ const {
831
+ events = [
832
+ {
833
+ title: 'Production Deployment #104',
834
+ desc: 'Container vtzmu4t7 synchronized with latest Git commit.',
835
+ time: 'Just now',
836
+ status: 'done',
837
+ },
838
+ {
839
+ title: 'Automated Playwright Audits',
840
+ desc: 'All 214 pages verified with 0 visual regressions.',
841
+ time: '12 mins ago',
842
+ status: 'done',
843
+ },
844
+ {
845
+ title: 'Edge Cache Invalidation',
846
+ desc: 'Purging stale Cloudflare and Traefik edge routes.',
847
+ time: 'In progress',
848
+ status: 'active',
849
+ },
850
+ {
851
+ title: 'Global CDN Replication',
852
+ desc: 'Waiting for European and US west points of presence.',
853
+ time: 'Queued',
854
+ status: 'pending',
855
+ },
856
+ ],
857
+ } = Astro.props;
858
+ ---
859
+
860
+ <div class="status-feed">
861
+ <div class="status-feed__line" aria-hidden="true"></div>
862
+ {events.map((evt) => (
863
+ <div class:list={['status-feed__item', \`status-feed__item--\${evt.status}\`]}>
864
+ <div class="status-feed__bullet">
865
+ {evt.status === 'done' && '✓'}
866
+ {evt.status === 'active' && '●'}
867
+ {evt.status === 'pending' && '○'}
868
+ </div>
869
+ <div class="status-feed__content">
870
+ <div class="status-feed__header">
871
+ <h5 class="status-feed__title">{evt.title}</h5>
872
+ <span class="status-feed__time">{evt.time}</span>
873
+ </div>
874
+ <p class="status-feed__desc">{evt.desc}</p>
875
+ </div>
876
+ </div>
877
+ ))}
878
+ </div>
879
+
880
+ <style>
881
+ .status-feed {
882
+ position: relative;
883
+ display: flex;
884
+ flex-direction: column;
885
+ gap: 20px;
886
+ width: 100%;
887
+ max-width: 440px;
888
+ font-family: var(--font-sans, system-ui, sans-serif);
889
+ padding: 4px 0;
890
+ }
891
+
892
+ .status-feed__line {
893
+ position: absolute;
894
+ top: 14px;
895
+ bottom: 14px;
896
+ left: 12px;
897
+ width: 2px;
898
+ background: rgba(255, 255, 255, 0.08);
899
+ pointer-events: none;
900
+ }
901
+
902
+ .status-feed__item {
903
+ position: relative;
904
+ display: flex;
905
+ align-items: flex-start;
906
+ gap: 16px;
907
+ }
908
+
909
+ .status-feed__bullet {
910
+ position: relative;
911
+ z-index: 2;
912
+ display: grid;
913
+ place-items: center;
914
+ width: 26px;
915
+ height: 26px;
916
+ border-radius: 50%;
917
+ background: #0a0a0e;
918
+ border: 1px solid rgba(255, 255, 255, 0.15);
919
+ font-size: 0.75rem;
920
+ font-weight: 900;
921
+ flex-shrink: 0;
922
+ color: var(--c-text-3, #737373);
923
+ }
924
+
925
+ .status-feed__item--done .status-feed__bullet {
926
+ background: rgba(16, 185, 129, 0.15);
927
+ border-color: #10b981;
928
+ color: #10b981;
929
+ }
930
+
931
+ .status-feed__item--active .status-feed__bullet {
932
+ background: rgba(212, 160, 23, 0.2);
933
+ border-color: var(--c-primary-light, #d4a017);
934
+ color: var(--c-primary-light, #d4a017);
935
+ box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
936
+ animation: status-pulse 2s infinite ease-in-out;
937
+ }
938
+
939
+ .status-feed__content {
940
+ flex: 1;
941
+ padding: 0.65rem 1rem;
942
+ background: rgba(255, 255, 255, 0.02);
943
+ border: 1px solid rgba(255, 255, 255, 0.06);
944
+ border-radius: var(--r-md, 12px);
945
+ transition: border-color 0.2s ease;
946
+ }
947
+
948
+ .status-feed__content:hover {
949
+ border-color: rgba(184, 134, 11, 0.3);
950
+ }
951
+
952
+ .status-feed__header {
953
+ display: flex;
954
+ justify-content: space-between;
955
+ align-items: center;
956
+ margin-bottom: 2px;
957
+ }
958
+
959
+ .status-feed__title {
960
+ font-size: 0.85rem;
961
+ font-weight: 700;
962
+ color: var(--c-text-1, #ffffff);
963
+ margin: 0;
964
+ }
965
+
966
+ .status-feed__time {
967
+ font-size: 0.7rem;
968
+ color: var(--c-text-3, #737373);
969
+ }
970
+
971
+ .status-feed__desc {
972
+ font-size: 0.78rem;
973
+ color: var(--c-text-2, #a3a3a3);
974
+ margin: 0;
975
+ line-height: 1.45;
976
+ }
977
+
978
+ @keyframes status-pulse {
979
+ 0%, 100% { transform: scale(1); }
980
+ 50% { transform: scale(1.1); }
981
+ }
982
+ </style>
983
+ `,
984
+ usage: `<StatusTimelineFeed events={[{ title: 'Deployment Success', timestamp: '10m ago', status: 'success', description: 'Production bundle compiled with 0 errors.' }]} />`,
985
+ },
986
+ ];