astro-component-kit 0.3.1 → 0.4.1
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/README.md +133 -36
- package/package.json +17 -4
- package/src/components/index.ts +18 -202
- package/src/components/lib/Galaxy3D.astro +249 -137
- package/src/components/lib/app/AppSidebar.astro +249 -0
- package/src/components/lib/app/AppTopbar.astro +284 -0
- package/src/components/lib/app/ArrivalsBoard.astro +176 -0
- package/src/components/lib/app/AuthCard.astro +213 -0
- package/src/components/lib/app/DataTable.astro +346 -0
- package/src/components/lib/app/GuestProfileCard.astro +133 -0
- package/src/components/lib/app/HousekeepingBoard.astro +189 -0
- package/src/components/lib/app/PageHeader.astro +157 -0
- package/src/components/lib/app/PlanUsageCard.astro +112 -0
- package/src/components/lib/app/RoomRack.astro +207 -0
- package/src/components/lib/app/SettingsSection.astro +96 -0
- package/src/components/lib/app/SwitchRow.astro +71 -0
- package/src/components/lib/app/TeamMembers.astro +190 -0
- package/src/components/lib/app/app-icons.ts +52 -0
- package/src/components/lib/app/index.ts +19 -0
- package/src/components/lib/buttons/NeonBorderButton.astro +162 -0
- package/src/components/lib/buttons/RippleButton.astro +199 -0
- package/src/components/lib/buttons/SlideRevealButton.astro +159 -0
- package/src/components/lib/buttons/index.ts +4 -0
- package/src/components/lib/cards/GithubRepoCard.astro +176 -0
- package/src/components/lib/cards/PricingCompareMiniCard.astro +196 -0
- package/src/components/lib/cards/StatsTrendCard.astro +149 -0
- package/src/components/lib/cards/index.ts +3 -0
- package/src/components/lib/charts/ActivityRings.astro +105 -0
- package/src/components/lib/charts/AreaChart.astro +4 -4
- package/src/components/lib/charts/BarChart.astro +3 -3
- package/src/components/lib/charts/BoxPlotChart.astro +109 -0
- package/src/components/lib/charts/BubbleChart.astro +101 -0
- package/src/components/lib/charts/BulletChart.astro +160 -0
- package/src/components/lib/charts/BumpChart.astro +92 -0
- package/src/components/lib/charts/CandlestickChart.astro +105 -0
- package/src/components/lib/charts/ChartFrame.astro +373 -0
- package/src/components/lib/charts/DivergingBarChart.astro +98 -0
- package/src/components/lib/charts/DonutChart.astro +2 -2
- package/src/components/lib/charts/DumbbellChart.astro +92 -0
- package/src/components/lib/charts/ForecastLineChart.astro +125 -0
- package/src/components/lib/charts/FunnelChart.astro +122 -0
- package/src/components/lib/charts/GaugeChart.astro +111 -0
- package/src/components/lib/charts/GoalProgressChart.astro +97 -0
- package/src/components/lib/charts/GroupedBarChart.astro +125 -0
- package/src/components/lib/charts/HeatmapChart.astro +131 -0
- package/src/components/lib/charts/HistogramChart.astro +111 -0
- package/src/components/lib/charts/HorizontalBarChart.astro +155 -0
- package/src/components/lib/charts/KpiStatTile.astro +116 -0
- package/src/components/lib/charts/KpiTrendGrid.astro +60 -0
- package/src/components/lib/charts/LineChart.astro +160 -0
- package/src/components/lib/charts/LinearProgressGauge.astro +136 -0
- package/src/components/lib/charts/LollipopChart.astro +100 -0
- package/src/components/lib/charts/MeterGauge.astro +122 -0
- package/src/components/lib/charts/MetricDeltaTable.astro +125 -0
- package/src/components/lib/charts/PieChart.astro +135 -0
- package/src/components/lib/charts/PolarAreaChart.astro +85 -0
- package/src/components/lib/charts/PopulationPyramid.astro +122 -0
- package/src/components/lib/charts/PunchCardChart.astro +89 -0
- package/src/components/lib/charts/RadarChart.astro +94 -0
- package/src/components/lib/charts/RadarMetricChart.astro +168 -0
- package/src/components/lib/charts/RadialBarChart.astro +124 -0
- package/src/components/lib/charts/RangeAreaChart.astro +113 -0
- package/src/components/lib/charts/RetentionCohortTable.astro +126 -0
- package/src/components/lib/charts/SankeyChart.astro +128 -0
- package/src/components/lib/charts/ScatterPlot.astro +139 -0
- package/src/components/lib/charts/SegmentedBarChart.astro +119 -0
- package/src/components/lib/charts/SlopeChart.astro +105 -0
- package/src/components/lib/charts/SparklineChart.astro +87 -0
- package/src/components/lib/charts/StackedAreaChart.astro +130 -0
- package/src/components/lib/charts/StackedBarChart.astro +136 -0
- package/src/components/lib/charts/SunburstChart.astro +103 -0
- package/src/components/lib/charts/TreemapChart.astro +94 -0
- package/src/components/lib/charts/WaffleChart.astro +121 -0
- package/src/components/lib/charts/WaterfallChart.astro +118 -0
- package/src/components/lib/charts/chart-tooltip.ts +75 -0
- package/src/components/lib/charts/chart-utils.ts +271 -0
- package/src/components/lib/charts/index.ts +46 -0
- package/src/components/lib/data/ActivityHeatmapGrid.astro +157 -0
- package/src/components/lib/data/MetricComparisonRow.astro +109 -0
- package/src/components/lib/data/StatusTimelineFeed.astro +168 -0
- package/src/components/lib/data/index.ts +3 -0
- package/src/components/lib/ecommerce/CartDrawer.astro +483 -0
- package/src/components/lib/ecommerce/CartPageList.astro +290 -0
- package/src/components/lib/ecommerce/CartToast.astro +276 -0
- package/src/components/lib/ecommerce/CategoryTiles.astro +143 -0
- package/src/components/lib/ecommerce/CheckoutForm.astro +423 -0
- package/src/components/lib/ecommerce/CountdownBanner.astro +230 -0
- package/src/components/lib/ecommerce/FilterBar.astro +278 -0
- package/src/components/lib/ecommerce/FilterSidebar.astro +405 -0
- package/src/components/lib/ecommerce/LiveActivityToast.astro +213 -0
- package/src/components/lib/ecommerce/OrderSummary.astro +295 -0
- package/src/components/lib/ecommerce/ProductBuyBox.astro +247 -0
- package/src/components/lib/ecommerce/ProductCardMinimal.astro +229 -0
- package/src/components/lib/ecommerce/ProductGallery.astro +145 -0
- package/src/components/lib/ecommerce/ProductGrid.astro +118 -0
- package/src/components/lib/ecommerce/ProductMedia.astro +113 -0
- package/src/components/lib/ecommerce/ProductRating.astro +78 -0
- package/src/components/lib/ecommerce/ProductToolbar.astro +93 -0
- package/src/components/lib/ecommerce/PromoBar.astro +145 -0
- package/src/components/lib/ecommerce/StockIndicator.astro +127 -0
- package/src/components/lib/ecommerce/StoreHeader.astro +446 -0
- package/src/components/lib/ecommerce/StoreHero.astro +260 -0
- package/src/components/lib/ecommerce/StoreProductCard.astro +307 -0
- package/src/components/lib/ecommerce/TrustBadges.astro +101 -0
- package/src/components/lib/ecommerce/VariantPicker.astro +145 -0
- package/src/components/lib/ecommerce/cart-store.ts +151 -0
- package/src/components/lib/ecommerce/catalog-filter.ts +62 -0
- package/src/components/lib/ecommerce/index.ts +34 -0
- package/src/components/lib/ecommerce/product-icons.ts +28 -0
- package/src/components/lib/ecommerce/types.ts +70 -0
- package/src/components/lib/feedback/ProgressRingCounter.astro +118 -0
- package/src/components/lib/feedback/ToastNotificationGroup.astro +173 -0
- package/src/components/lib/feedback/index.ts +2 -0
- package/src/components/lib/forms/AnimatedInput.astro +4 -2
- package/src/components/lib/forms/CustomRadioGroup.astro +3 -1
- package/src/components/lib/forms/GlassInlineToggleGroup.astro +161 -0
- package/src/components/lib/forms/PasswordStrengthInput.astro +242 -0
- package/src/components/lib/forms/PhoneCountryInput.astro +145 -0
- package/src/components/lib/forms/TagsAutocompleteInput.astro +249 -0
- package/src/components/lib/forms/index.ts +5 -0
- package/src/components/lib/index.ts +2 -0
- package/src/components/lib/layout/BentoGrid3.astro +6 -4
- package/src/components/lib/layout/CenterFixedBox.astro +2 -2
- package/src/components/lib/layout/CenteredContainer.astro +4 -2
- package/src/components/lib/layout/ClusterHorizontal.astro +2 -2
- package/src/components/lib/layout/DiagonalSectionDivider.astro +69 -0
- package/src/components/lib/layout/FeatureHero.astro +4 -2
- package/src/components/lib/layout/FooterCenteredMinimal.astro +4 -2
- package/src/components/lib/layout/FullBleedSection.astro +2 -2
- package/src/components/lib/layout/GalleryGrid4.astro +2 -2
- package/src/components/lib/layout/HolyGrailGrid.astro +127 -0
- package/src/components/lib/layout/LandingSectionSplit.astro +5 -3
- package/src/components/lib/layout/MasonryGrid.astro +2 -2
- package/src/components/lib/layout/MinimalFooterGrid.astro +1 -1
- package/src/components/lib/layout/ScrollSnapSection.astro +1 -1
- package/src/components/lib/layout/SidebarLayoutWrapper.astro +4 -2
- package/src/components/lib/layout/SplitScreenLayout.astro +3 -3
- package/src/components/lib/layout/StepLayoutVertical.astro +1 -1
- package/src/components/lib/layout/StickySidebarWrapper.astro +4 -2
- package/src/components/lib/layout/index.ts +3 -1
- package/src/components/lib/navigation/QuickJumpDock.astro +125 -0
- package/src/components/lib/navigation/StepBreadcrumbBar.astro +151 -0
- package/src/components/lib/navigation/SubNavbarPills.astro +102 -0
- package/src/components/lib/navigation/index.ts +3 -0
- package/src/components/lib/overlays/CookiePreferencesDrawer.astro +226 -0
- package/src/components/lib/overlays/FloatingFeedbackWidget.astro +203 -0
- package/src/components/lib/overlays/ImageCompareSlider.astro +172 -0
- package/src/components/lib/overlays/index.ts +3 -0
- package/src/components/lib/sections/AgencyContactBrief.astro +194 -0
- package/src/components/lib/sections/AgencyFooterCta.astro +94 -0
- package/src/components/lib/sections/AgencyHeader.astro +161 -0
- package/src/components/lib/sections/AgencyHeroKinetic.astro +172 -0
- package/src/components/lib/sections/AgencyServicesList.astro +113 -0
- package/src/components/lib/sections/AgencyTeamGrid.astro +111 -0
- package/src/components/lib/sections/AgencyWorkGrid.astro +147 -0
- package/src/components/lib/sections/BlogGridSection.astro +133 -0
- package/src/components/lib/sections/ButtonsShowcase.astro +20 -18
- package/src/components/lib/sections/CardsShowcase.astro +28 -26
- package/src/components/lib/sections/CareersOpenings.astro +141 -0
- package/src/components/lib/sections/ChangelogSection.astro +151 -0
- package/src/components/lib/sections/ContactGlassForm.astro +10 -8
- package/src/components/lib/sections/ContactSplitMap.astro +141 -0
- package/src/components/lib/sections/CtaAppDownload.astro +13 -11
- package/src/components/lib/sections/CtaGlowBanner.astro +12 -10
- package/src/components/lib/sections/CtaNewsletterSection.astro +165 -0
- package/src/components/lib/sections/CtaSplitImage.astro +149 -0
- package/src/components/lib/sections/DataShowcase.astro +23 -21
- package/src/components/lib/sections/FaqAccordionSection.astro +8 -8
- package/src/components/lib/sections/FaqTwoColumn.astro +121 -0
- package/src/components/lib/sections/FeatureAlternatingRows.astro +192 -0
- package/src/components/lib/sections/FeatureBentoGrid.astro +13 -11
- package/src/components/lib/sections/FeatureIconGrid.astro +155 -0
- package/src/components/lib/sections/FeatureTabsShowcase.astro +182 -0
- package/src/components/lib/sections/FeatureTimelineFlow.astro +8 -6
- package/src/components/lib/sections/FeedbackShowcase.astro +15 -13
- package/src/components/lib/sections/FooterMegaSection.astro +157 -0
- package/src/components/lib/sections/FormsShowcase.astro +22 -20
- package/src/components/lib/sections/HeroDashboardPreview.astro +182 -0
- package/src/components/lib/sections/HeroGlass.astro +22 -20
- package/src/components/lib/sections/HeroGradient.astro +15 -13
- package/src/components/lib/sections/HeroMinimalCentered.astro +175 -0
- package/src/components/lib/sections/HeroShowcaseSplit.astro +306 -0
- package/src/components/lib/sections/HeroSplit.astro +13 -11
- package/src/components/lib/sections/HeroTerminal.astro +253 -0
- package/src/components/lib/sections/HeroWaitlist.astro +231 -0
- package/src/components/lib/sections/HowItWorksSteps.astro +180 -0
- package/src/components/lib/sections/IntegrationsGrid.astro +167 -0
- package/src/components/lib/sections/LayoutShowcase.astro +21 -19
- package/src/components/lib/sections/LogoCloudSection.astro +96 -0
- package/src/components/lib/sections/LogoWallGrid.astro +93 -0
- package/src/components/lib/sections/NavigationShowcase.astro +15 -13
- package/src/components/lib/sections/OverlaysShowcase.astro +21 -19
- package/src/components/lib/sections/PricingComparisonMatrix.astro +15 -13
- package/src/components/lib/sections/PricingSinglePlan.astro +159 -0
- package/src/components/lib/sections/PricingTierCards.astro +11 -9
- package/src/components/lib/sections/PricingToggleCards.astro +171 -0
- package/src/components/lib/sections/ShopCategoryHero.astro +103 -0
- package/src/components/lib/sections/ShopCollectionMosaic.astro +131 -0
- package/src/components/lib/sections/ShopFooterWordmark.astro +100 -0
- package/src/components/lib/sections/ShopHeaderEditorial.astro +396 -0
- package/src/components/lib/sections/ShopHeroEditorial.astro +151 -0
- package/src/components/lib/sections/ShopLookbook.astro +250 -0
- package/src/components/lib/sections/ShopNewsletterEditorial.astro +128 -0
- package/src/components/lib/sections/ShopProductRail.astro +150 -0
- package/src/components/lib/sections/ShopReviewsEditorial.astro +133 -0
- package/src/components/lib/sections/ShopValuesMarquee.astro +91 -0
- package/src/components/lib/sections/StatsCounterBand.astro +124 -0
- package/src/components/lib/sections/StatsDashboardSection.astro +85 -0
- package/src/components/lib/sections/StatsMetricShowcase.astro +9 -7
- package/src/components/lib/sections/TeamGridSection.astro +12 -10
- package/src/components/lib/sections/TestimonialCarousel.astro +167 -0
- package/src/components/lib/sections/TestimonialFeatured.astro +122 -0
- package/src/components/lib/sections/TestimonialGridSection.astro +188 -0
- package/src/components/lib/sections/TestimonialWallGlass.astro +11 -9
- package/src/components/lib/sections/TypographyShowcase.astro +10 -8
- package/src/components/lib/sections/index.ts +39 -0
- package/src/components/lib/templates/ecommerce/StoreCategoryPage.astro +160 -0
- package/src/components/lib/templates/ecommerce/StoreCheckoutPage.astro +98 -0
- package/src/components/lib/templates/ecommerce/StoreHomePage.astro +191 -0
- package/src/components/lib/templates/ecommerce/StoreLayout.astro +169 -0
- package/src/components/lib/templates/ecommerce/StoreProductPage.astro +165 -0
- package/src/components/lib/templates/ecommerce/data.ts +187 -0
- package/src/components/lib/templates/ecommerce/index.ts +14 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialBagPage.astro +52 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialCheckoutPage.astro +123 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialHomePage.astro +102 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialLayout.astro +216 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialProductPage.astro +205 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialShopPage.astro +112 -0
- package/src/components/lib/templates/ecommerce-editorial/data.ts +125 -0
- package/src/components/lib/templates/ecommerce-editorial/index.ts +16 -0
- package/src/components/lib/templates/saas-hotel/AppLayout.astro +83 -0
- package/src/components/lib/templates/saas-hotel/DashboardPage.astro +66 -0
- package/src/components/lib/templates/saas-hotel/GuestsPage.astro +65 -0
- package/src/components/lib/templates/saas-hotel/LandingPage.astro +213 -0
- package/src/components/lib/templates/saas-hotel/ReportsPage.astro +63 -0
- package/src/components/lib/templates/saas-hotel/ReservationsPage.astro +49 -0
- package/src/components/lib/templates/saas-hotel/RoomsPage.astro +48 -0
- package/src/components/lib/templates/saas-hotel/SettingsPage.astro +115 -0
- package/src/components/lib/templates/saas-hotel/SignInPage.astro +50 -0
- package/src/components/lib/templates/saas-hotel/data.ts +229 -0
- package/src/components/lib/templates/saas-hotel/index.ts +19 -0
- package/src/components/lib/templates/saas-hotel/lobby-theme.css +90 -0
- package/src/components/lib/typography/AnimatedCounterText.astro +102 -0
- package/src/components/lib/typography/CurvedPathHeading.astro +86 -0
- package/src/components/lib/typography/GradientTextMarquee.astro +105 -0
- package/src/components/lib/typography/HackerDecodeText.astro +85 -0
- package/src/components/lib/typography/index.ts +4 -0
- package/src/styles/global.css +113 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* ActivityHeatmapGrid — GitHub-style activity contribution matrix with intensity color levels and month labels.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} title - Section header label. Default is 'Commit Activity'.
|
|
6
|
+
* @param {number} totalCount - Total activity events recorded. Default is 1428.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
title?: string;
|
|
10
|
+
totalCount?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
title = 'Contribution Activity',
|
|
15
|
+
totalCount = 1428,
|
|
16
|
+
} = Astro.props;
|
|
17
|
+
|
|
18
|
+
// Mock 16 weeks of 7 days
|
|
19
|
+
const weeks = Array.from({ length: 16 }, (_, w) =>
|
|
20
|
+
Array.from({ length: 7 }, (_, d) => {
|
|
21
|
+
// Generate pseudo-random intensity 0 to 4
|
|
22
|
+
const seed = (w * 7 + d * 13 + 5) % 17;
|
|
23
|
+
if (seed < 4) return 0;
|
|
24
|
+
if (seed < 8) return 1;
|
|
25
|
+
if (seed < 12) return 2;
|
|
26
|
+
if (seed < 15) return 3;
|
|
27
|
+
return 4;
|
|
28
|
+
})
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const months = ['Jul', 'Aug', 'Sep', 'Oct'];
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
<div class="heatmap-card">
|
|
35
|
+
<div class="heatmap-card__head">
|
|
36
|
+
<div class="heatmap-card__title-wrap">
|
|
37
|
+
<h5 class="heatmap-card__title">{title}</h5>
|
|
38
|
+
<span class="heatmap-card__total">{totalCount.toLocaleString()} events in the last 4 months</span>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="heatmap-card__legend" aria-hidden="true">
|
|
42
|
+
<span class="legend-text">Less</span>
|
|
43
|
+
<span class="cell cell--0"></span>
|
|
44
|
+
<span class="cell cell--1"></span>
|
|
45
|
+
<span class="cell cell--2"></span>
|
|
46
|
+
<span class="cell cell--3"></span>
|
|
47
|
+
<span class="cell cell--4"></span>
|
|
48
|
+
<span class="legend-text">More</span>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div class="heatmap-card__matrix">
|
|
53
|
+
<div class="heatmap-card__months">
|
|
54
|
+
{months.map((m) => (
|
|
55
|
+
<span class="month-label">{m}</span>
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="heatmap-card__grid">
|
|
60
|
+
{weeks.map((week) => (
|
|
61
|
+
<div class="heatmap-col">
|
|
62
|
+
{week.map((level) => (
|
|
63
|
+
<span class:list={['cell', `cell--${level}`]}></span>
|
|
64
|
+
))}
|
|
65
|
+
</div>
|
|
66
|
+
))}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.heatmap-card {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: 12px;
|
|
76
|
+
padding: var(--sp-6, 1.5rem);
|
|
77
|
+
background: rgba(255, 255, 255, 0.02);
|
|
78
|
+
backdrop-filter: blur(16px);
|
|
79
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
80
|
+
border-radius: var(--r-xl, 20px);
|
|
81
|
+
width: 100%;
|
|
82
|
+
max-width: 480px;
|
|
83
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.heatmap-card__head {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
align-items: flex-start;
|
|
90
|
+
gap: 12px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.heatmap-card__title {
|
|
94
|
+
font-size: 0.95rem;
|
|
95
|
+
font-weight: 700;
|
|
96
|
+
color: var(--c-text-1, #ffffff);
|
|
97
|
+
margin: 0 0 2px 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.heatmap-card__total {
|
|
101
|
+
font-size: 0.75rem;
|
|
102
|
+
color: var(--c-text-3, #737373);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.heatmap-card__legend {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 4px;
|
|
109
|
+
font-size: 0.7rem;
|
|
110
|
+
color: var(--c-text-3, #737373);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.heatmap-card__matrix {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: 6px;
|
|
117
|
+
overflow-x: auto;
|
|
118
|
+
padding-bottom: 4px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.heatmap-card__months {
|
|
122
|
+
display: flex;
|
|
123
|
+
justify-content: space-between;
|
|
124
|
+
padding: 0 4px;
|
|
125
|
+
font-size: 0.68rem;
|
|
126
|
+
color: var(--c-text-3, #737373);
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.heatmap-card__grid {
|
|
131
|
+
display: flex;
|
|
132
|
+
gap: 4px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.heatmap-col {
|
|
136
|
+
display: flex;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
gap: 4px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cell {
|
|
142
|
+
width: 12px;
|
|
143
|
+
height: 12px;
|
|
144
|
+
border-radius: 3px;
|
|
145
|
+
transition: transform 0.15s ease;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.heatmap-card__grid .cell:hover {
|
|
149
|
+
transform: scale(1.3);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.cell--0 { background: rgba(255, 255, 255, 0.05); }
|
|
153
|
+
.cell--1 { background: rgba(184, 134, 11, 0.25); }
|
|
154
|
+
.cell--2 { background: rgba(184, 134, 11, 0.55); }
|
|
155
|
+
.cell--3 { background: rgba(212, 160, 23, 0.85); }
|
|
156
|
+
.cell--4 { background: #fef3c7; box-shadow: 0 0 6px rgba(254, 243, 199, 0.6); }
|
|
157
|
+
</style>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* MetricComparisonRow — Horizontal gauge comparing actual performance vs target benchmark with percentage badge.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} title - Benchmark description (e.g. 'Monthly Revenue Target').
|
|
6
|
+
* @param {number} current - Current numeric value figure.
|
|
7
|
+
* @param {number} target - Goal target value.
|
|
8
|
+
* @param {string} unit - Unit prefix or suffix (e.g. '$', 'ms', 'users'). Default is '$'.
|
|
9
|
+
* @param {string} color - Progress bar accent color. Default is '#d4a017'.
|
|
10
|
+
*/
|
|
11
|
+
interface Props {
|
|
12
|
+
title: string;
|
|
13
|
+
current: number;
|
|
14
|
+
target: number;
|
|
15
|
+
unit?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
title = 'Quarterly Revenue Target',
|
|
21
|
+
current = 8450,
|
|
22
|
+
target = 10000,
|
|
23
|
+
unit = '$',
|
|
24
|
+
color = '#d4a017',
|
|
25
|
+
} = Astro.props;
|
|
26
|
+
|
|
27
|
+
const safeCurrent = current ?? 0;
|
|
28
|
+
const safeTarget = (target && target > 0) ? target : 1;
|
|
29
|
+
const percent = Math.min(100, Math.round((safeCurrent / safeTarget) * 100));
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
<div class="metric-row" style={`--metric-accent: ${color};`}>
|
|
33
|
+
<div class="metric-row__header">
|
|
34
|
+
<div class="metric-row__title-wrap">
|
|
35
|
+
<h5 class="metric-row__title">{title}</h5>
|
|
36
|
+
<span class="metric-row__ratio">{unit}{safeCurrent.toLocaleString()} of {unit}{safeTarget.toLocaleString()}</span>
|
|
37
|
+
</div>
|
|
38
|
+
<span class="metric-row__badge">{percent}%</span>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="metric-row__track" role="progressbar" aria-valuenow={safeCurrent} aria-valuemax={safeTarget} aria-valuemin="0">
|
|
42
|
+
<div class="metric-row__fill" style={`width: ${percent}%;`}></div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<style>
|
|
47
|
+
.metric-row {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 8px;
|
|
51
|
+
width: 100%;
|
|
52
|
+
max-width: 440px;
|
|
53
|
+
padding: var(--sp-4, 1rem);
|
|
54
|
+
background: rgba(255, 255, 255, 0.02);
|
|
55
|
+
backdrop-filter: blur(12px);
|
|
56
|
+
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
57
|
+
border-radius: var(--r-md, 14px);
|
|
58
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.metric-row__header {
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
align-items: flex-end;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.metric-row__title-wrap {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 2px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.metric-row__title {
|
|
74
|
+
font-size: 0.88rem;
|
|
75
|
+
font-weight: 700;
|
|
76
|
+
color: var(--c-text-1, #ffffff);
|
|
77
|
+
margin: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.metric-row__ratio {
|
|
81
|
+
font-size: 0.75rem;
|
|
82
|
+
color: var(--c-text-3, #737373);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.metric-row__badge {
|
|
86
|
+
font-size: 0.82rem;
|
|
87
|
+
font-weight: 800;
|
|
88
|
+
color: var(--metric-accent);
|
|
89
|
+
background: rgba(184, 134, 11, 0.12);
|
|
90
|
+
border: 1px solid rgba(184, 134, 11, 0.3);
|
|
91
|
+
padding: 2px 8px;
|
|
92
|
+
border-radius: var(--r-full, 9999px);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.metric-row__track {
|
|
96
|
+
height: 8px;
|
|
97
|
+
background: rgba(255, 255, 255, 0.06);
|
|
98
|
+
border-radius: var(--r-full, 9999px);
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.metric-row__fill {
|
|
103
|
+
height: 100%;
|
|
104
|
+
background: linear-gradient(90deg, #b8860b, var(--metric-accent));
|
|
105
|
+
border-radius: inherit;
|
|
106
|
+
box-shadow: 0 0 10px rgba(212, 160, 23, 0.4);
|
|
107
|
+
transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
|
|
108
|
+
}
|
|
109
|
+
</style>
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* StatusTimelineFeed — Chronological event audit feed with status icons, timestamps, and detail lines.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array<{title: string, desc: string, time: string, status: 'done' | 'active' | 'pending'}>} events - Timeline events.
|
|
6
|
+
*/
|
|
7
|
+
interface Props {
|
|
8
|
+
events?: Array<{
|
|
9
|
+
title: string;
|
|
10
|
+
desc: string;
|
|
11
|
+
time: string;
|
|
12
|
+
status: 'done' | 'active' | 'pending';
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
events = [
|
|
18
|
+
{
|
|
19
|
+
title: 'Production Deployment #104',
|
|
20
|
+
desc: 'Container vtzmu4t7 synchronized with latest Git commit.',
|
|
21
|
+
time: 'Just now',
|
|
22
|
+
status: 'done',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: 'Automated Playwright Audits',
|
|
26
|
+
desc: 'All 214 pages verified with 0 visual regressions.',
|
|
27
|
+
time: '12 mins ago',
|
|
28
|
+
status: 'done',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: 'Edge Cache Invalidation',
|
|
32
|
+
desc: 'Purging stale Cloudflare and Traefik edge routes.',
|
|
33
|
+
time: 'In progress',
|
|
34
|
+
status: 'active',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: 'Global CDN Replication',
|
|
38
|
+
desc: 'Waiting for European and US west points of presence.',
|
|
39
|
+
time: 'Queued',
|
|
40
|
+
status: 'pending',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
} = Astro.props;
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
<div class="status-feed">
|
|
47
|
+
<div class="status-feed__line" aria-hidden="true"></div>
|
|
48
|
+
{events.map((evt) => (
|
|
49
|
+
<div class:list={['status-feed__item', `status-feed__item--${evt.status}`]}>
|
|
50
|
+
<div class="status-feed__bullet">
|
|
51
|
+
{evt.status === 'done' && '✓'}
|
|
52
|
+
{evt.status === 'active' && '●'}
|
|
53
|
+
{evt.status === 'pending' && '○'}
|
|
54
|
+
</div>
|
|
55
|
+
<div class="status-feed__content">
|
|
56
|
+
<div class="status-feed__header">
|
|
57
|
+
<h5 class="status-feed__title">{evt.title}</h5>
|
|
58
|
+
<span class="status-feed__time">{evt.time}</span>
|
|
59
|
+
</div>
|
|
60
|
+
<p class="status-feed__desc">{evt.desc}</p>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
))}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<style>
|
|
67
|
+
.status-feed {
|
|
68
|
+
position: relative;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: 20px;
|
|
72
|
+
width: 100%;
|
|
73
|
+
max-width: 440px;
|
|
74
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
75
|
+
padding: 4px 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.status-feed__line {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 14px;
|
|
81
|
+
bottom: 14px;
|
|
82
|
+
left: 12px;
|
|
83
|
+
width: 2px;
|
|
84
|
+
background: rgba(255, 255, 255, 0.08);
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.status-feed__item {
|
|
89
|
+
position: relative;
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: flex-start;
|
|
92
|
+
gap: 16px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.status-feed__bullet {
|
|
96
|
+
position: relative;
|
|
97
|
+
z-index: 2;
|
|
98
|
+
display: grid;
|
|
99
|
+
place-items: center;
|
|
100
|
+
width: 26px;
|
|
101
|
+
height: 26px;
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
background: #0a0a0e;
|
|
104
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
105
|
+
font-size: 0.75rem;
|
|
106
|
+
font-weight: 900;
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
color: var(--c-text-3, #737373);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.status-feed__item--done .status-feed__bullet {
|
|
112
|
+
background: rgba(16, 185, 129, 0.15);
|
|
113
|
+
border-color: #10b981;
|
|
114
|
+
color: #10b981;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.status-feed__item--active .status-feed__bullet {
|
|
118
|
+
background: rgba(212, 160, 23, 0.2);
|
|
119
|
+
border-color: var(--c-primary-light, #d4a017);
|
|
120
|
+
color: var(--c-primary-light, #d4a017);
|
|
121
|
+
box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
|
|
122
|
+
animation: status-pulse 2s infinite ease-in-out;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.status-feed__content {
|
|
126
|
+
flex: 1;
|
|
127
|
+
padding: 0.65rem 1rem;
|
|
128
|
+
background: rgba(255, 255, 255, 0.02);
|
|
129
|
+
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
130
|
+
border-radius: var(--r-md, 12px);
|
|
131
|
+
transition: border-color 0.2s ease;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.status-feed__content:hover {
|
|
135
|
+
border-color: rgba(184, 134, 11, 0.3);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.status-feed__header {
|
|
139
|
+
display: flex;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
align-items: center;
|
|
142
|
+
margin-bottom: 2px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.status-feed__title {
|
|
146
|
+
font-size: 0.85rem;
|
|
147
|
+
font-weight: 700;
|
|
148
|
+
color: var(--c-text-1, #ffffff);
|
|
149
|
+
margin: 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.status-feed__time {
|
|
153
|
+
font-size: 0.7rem;
|
|
154
|
+
color: var(--c-text-3, #737373);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.status-feed__desc {
|
|
158
|
+
font-size: 0.78rem;
|
|
159
|
+
color: var(--c-text-2, #a3a3a3);
|
|
160
|
+
margin: 0;
|
|
161
|
+
line-height: 1.45;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@keyframes status-pulse {
|
|
165
|
+
0%, 100% { transform: scale(1); }
|
|
166
|
+
50% { transform: scale(1.1); }
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
@@ -21,3 +21,6 @@ export { default as TimelineHorizSteps } from './TimelineHorizSteps.astro';
|
|
|
21
21
|
export { default as TreeItemInteractive } from './TreeItemInteractive.astro';
|
|
22
22
|
export { default as UserDirectoryItem } from './UserDirectoryItem.astro';
|
|
23
23
|
export { default as VerticalTimeline } from './VerticalTimeline.astro';
|
|
24
|
+
export { default as MetricComparisonRow } from './MetricComparisonRow.astro';
|
|
25
|
+
export { default as ActivityHeatmapGrid } from './ActivityHeatmapGrid.astro';
|
|
26
|
+
export { default as StatusTimelineFeed } from './StatusTimelineFeed.astro';
|