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,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* HolyGrailGrid — Production-grade CSS grid layout container with sticky header, dual sidebars, fluid content, and footer.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} leftWidth - Left sidebar width. Default is '240px'.
|
|
6
|
+
* @param {string} rightWidth - Right sidebar width. Default is '220px'.
|
|
7
|
+
* @param {string} gap - Spacing gap between grid regions. Default is '1.5rem'.
|
|
8
|
+
* @param {string} className - Optional CSS class.
|
|
9
|
+
*/
|
|
10
|
+
interface Props {
|
|
11
|
+
leftWidth?: string;
|
|
12
|
+
rightWidth?: string;
|
|
13
|
+
gap?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
leftWidth = '240px',
|
|
19
|
+
rightWidth = '220px',
|
|
20
|
+
gap = '1.5rem',
|
|
21
|
+
className = '',
|
|
22
|
+
} = Astro.props;
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
<div class="cq-holy-grail-grid-cq">
|
|
26
|
+
<div
|
|
27
|
+
class:list={['holy-grail', className]}
|
|
28
|
+
style={`--hg-left: ${leftWidth}; --hg-right: ${rightWidth}; --hg-gap: ${gap};`}
|
|
29
|
+
>
|
|
30
|
+
<header class="holy-grail__header">
|
|
31
|
+
<slot name="header" />
|
|
32
|
+
</header>
|
|
33
|
+
|
|
34
|
+
<div class="holy-grail__middle">
|
|
35
|
+
<aside class="holy-grail__left">
|
|
36
|
+
<slot name="left" />
|
|
37
|
+
</aside>
|
|
38
|
+
|
|
39
|
+
<main class="holy-grail__main">
|
|
40
|
+
<slot />
|
|
41
|
+
</main>
|
|
42
|
+
|
|
43
|
+
<aside class="holy-grail__right">
|
|
44
|
+
<slot name="right" />
|
|
45
|
+
</aside>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<footer class="holy-grail__footer">
|
|
49
|
+
<slot name="footer" />
|
|
50
|
+
</footer>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<style>
|
|
54
|
+
.cq-holy-grail-grid-cq { container-type: inline-size; }
|
|
55
|
+
.holy-grail {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
min-height: 100vh;
|
|
59
|
+
width: 100%;
|
|
60
|
+
color: var(--c-text-1, #ffffff);
|
|
61
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.holy-grail__header {
|
|
65
|
+
width: 100%;
|
|
66
|
+
padding: var(--sp-4, 1rem) var(--sp-6, 1.5rem);
|
|
67
|
+
background: rgba(10, 10, 14, 0.8);
|
|
68
|
+
backdrop-filter: blur(16px);
|
|
69
|
+
border-bottom: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.holy-grail__middle {
|
|
73
|
+
display: grid;
|
|
74
|
+
grid-template-columns: var(--hg-left) 1fr var(--hg-right);
|
|
75
|
+
gap: var(--hg-gap);
|
|
76
|
+
flex: 1;
|
|
77
|
+
max-width: 1440px;
|
|
78
|
+
margin: 0 auto;
|
|
79
|
+
width: 100%;
|
|
80
|
+
padding: var(--sp-6, 1.5rem);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.holy-grail__left,
|
|
84
|
+
.holy-grail__right {
|
|
85
|
+
padding: var(--sp-4, 1rem);
|
|
86
|
+
background: rgb(var(--ink-rgb, 255 255 255) / 0.02);
|
|
87
|
+
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.06);
|
|
88
|
+
border-radius: var(--r-lg, 16px);
|
|
89
|
+
height: fit-content;
|
|
90
|
+
position: sticky;
|
|
91
|
+
top: 2rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.holy-grail__main {
|
|
95
|
+
padding: var(--sp-6, 1.5rem);
|
|
96
|
+
background: rgb(var(--ink-rgb, 255 255 255) / 0.015);
|
|
97
|
+
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.06);
|
|
98
|
+
border-radius: var(--r-lg, 16px);
|
|
99
|
+
min-height: 400px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.holy-grail__footer {
|
|
103
|
+
width: 100%;
|
|
104
|
+
padding: var(--sp-6, 1.5rem);
|
|
105
|
+
background: rgba(10, 10, 14, 0.9);
|
|
106
|
+
border-top: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
|
|
107
|
+
margin-top: auto;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@container (max-width: 1024px) {
|
|
111
|
+
.holy-grail__middle {
|
|
112
|
+
grid-template-columns: var(--hg-left) 1fr;
|
|
113
|
+
}
|
|
114
|
+
.holy-grail__right {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@container (max-width: 768px) {
|
|
120
|
+
.holy-grail__middle {
|
|
121
|
+
grid-template-columns: 1fr;
|
|
122
|
+
}
|
|
123
|
+
.holy-grail__left {
|
|
124
|
+
position: static;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
</style>
|
|
@@ -15,6 +15,7 @@ const {
|
|
|
15
15
|
} = Astro.props;
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
+
<div class="cq-landing-section-split-cq">
|
|
18
19
|
<section class={`split-sec ${className}`}>
|
|
19
20
|
<div class="split-sec-text">
|
|
20
21
|
<h2>{title}</h2>
|
|
@@ -33,8 +34,9 @@ const {
|
|
|
33
34
|
</slot>
|
|
34
35
|
</div>
|
|
35
36
|
</section>
|
|
36
|
-
|
|
37
|
+
</div>
|
|
37
38
|
<style>
|
|
39
|
+
.cq-landing-section-split-cq { container-type: inline-size; }
|
|
38
40
|
.split-sec {
|
|
39
41
|
display: grid;
|
|
40
42
|
grid-template-columns: 1fr 1fr;
|
|
@@ -72,14 +74,14 @@ const {
|
|
|
72
74
|
height: 220px;
|
|
73
75
|
background: rgba(15, 23, 42, 0.6);
|
|
74
76
|
border-radius: 16px;
|
|
75
|
-
border: 1px solid
|
|
77
|
+
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.1);
|
|
76
78
|
display: flex;
|
|
77
79
|
align-items: center;
|
|
78
80
|
justify-content: center;
|
|
79
81
|
color: #94a3b8;
|
|
80
82
|
font-weight: 600;
|
|
81
83
|
}
|
|
82
|
-
@
|
|
84
|
+
@container (max-width: 768px) {
|
|
83
85
|
.split-sec {
|
|
84
86
|
grid-template-columns: 1fr;
|
|
85
87
|
gap: 2rem;
|
|
@@ -34,8 +34,8 @@ const { columns = 3, gap = '1.5rem', className = '' } = Astro.props;
|
|
|
34
34
|
display: block;
|
|
35
35
|
}
|
|
36
36
|
.masonry-demo-item {
|
|
37
|
-
background:
|
|
38
|
-
border: 1px solid
|
|
37
|
+
background: rgb(var(--ink-rgb, 255 255 255) / 0.04);
|
|
38
|
+
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
|
|
39
39
|
border-radius: var(--r-md, 12px);
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
@@ -37,7 +37,7 @@ const { brandName = 'AstroKit', className = '' } = Astro.props;
|
|
|
37
37
|
.m-footer {
|
|
38
38
|
width: 100%;
|
|
39
39
|
padding: 3rem 1.5rem;
|
|
40
|
-
border-top: 1px solid
|
|
40
|
+
border-top: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
|
|
41
41
|
background: rgba(0, 0, 0, 0.2);
|
|
42
42
|
}
|
|
43
43
|
.f-row {
|
|
@@ -25,7 +25,7 @@ const { height = '300px', className = '' } = Astro.props;
|
|
|
25
25
|
scroll-snap-type: y mandatory;
|
|
26
26
|
width: 100%;
|
|
27
27
|
border-radius: var(--r-lg, 12px);
|
|
28
|
-
border: 1px solid
|
|
28
|
+
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.1);
|
|
29
29
|
}
|
|
30
30
|
.snap-wrap :global(section), .snap-panel {
|
|
31
31
|
height: var(--snap-height, 300px);
|
|
@@ -30,6 +30,7 @@ interface Props {
|
|
|
30
30
|
const { sidebarWidth = '280px', breakpoint = '768px', className = '' } = Astro.props;
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
<div class="cq-sidebar-layout-wrapper-cq">
|
|
33
34
|
<div class:list={['sidebar-layout', className]} style={`--sidebar-w: ${sidebarWidth}; --breakpoint: ${breakpoint}`}>
|
|
34
35
|
<aside class="sidebar-layout__sidebar">
|
|
35
36
|
<slot name="sidebar" />
|
|
@@ -38,8 +39,9 @@ const { sidebarWidth = '280px', breakpoint = '768px', className = '' } = Astro.p
|
|
|
38
39
|
<slot name="main" />
|
|
39
40
|
</main>
|
|
40
41
|
</div>
|
|
41
|
-
|
|
42
|
+
</div>
|
|
42
43
|
<style>
|
|
44
|
+
.cq-sidebar-layout-wrapper-cq { container-type: inline-size; }
|
|
43
45
|
.sidebar-layout {
|
|
44
46
|
display: grid;
|
|
45
47
|
grid-template-columns: var(--sidebar-w) 1fr;
|
|
@@ -54,7 +56,7 @@ const { sidebarWidth = '280px', breakpoint = '768px', className = '' } = Astro.p
|
|
|
54
56
|
padding: var(--sp-6);
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
@
|
|
59
|
+
@container (max-width: 768px) {
|
|
58
60
|
.sidebar-layout {
|
|
59
61
|
grid-template-columns: 1fr;
|
|
60
62
|
}
|
|
@@ -36,7 +36,7 @@ const { className = '' } = Astro.props;
|
|
|
36
36
|
width: 100%;
|
|
37
37
|
border-radius: var(--r-xl, 16px);
|
|
38
38
|
overflow: hidden;
|
|
39
|
-
border: 1px solid
|
|
39
|
+
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.08);
|
|
40
40
|
}
|
|
41
41
|
.split-side {
|
|
42
42
|
flex: 1;
|
|
@@ -47,11 +47,11 @@ const { className = '' } = Astro.props;
|
|
|
47
47
|
padding: 3rem 2rem;
|
|
48
48
|
}
|
|
49
49
|
.left {
|
|
50
|
-
background:
|
|
50
|
+
background: rgb(var(--ink-rgb, 255 255 255) / 0.02);
|
|
51
51
|
}
|
|
52
52
|
.right {
|
|
53
53
|
background: rgba(0, 0, 0, 0.3);
|
|
54
|
-
border-left: 1px solid
|
|
54
|
+
border-left: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.06);
|
|
55
55
|
}
|
|
56
56
|
.demo-split-block {
|
|
57
57
|
text-align: center;
|
|
@@ -32,6 +32,7 @@ interface Props {
|
|
|
32
32
|
const { sidebarWidth = '280px', stickyTop = '100px', gap = '2rem', className = '' } = Astro.props;
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
+
<div class="cq-sticky-sidebar-wrapper-cq">
|
|
35
36
|
<div class:list=['sticky-sidebar', className]} style={`--sidebar-w: ${sidebarWidth}; --sticky-top: ${stickyTop}; --col-gap: ${gap}`}>
|
|
36
37
|
<main class="sticky-sidebar__main">
|
|
37
38
|
<slot name="main" />
|
|
@@ -42,8 +43,9 @@ const { sidebarWidth = '280px', stickyTop = '100px', gap = '2rem', className = '
|
|
|
42
43
|
</div>
|
|
43
44
|
</aside>
|
|
44
45
|
</div>
|
|
45
|
-
|
|
46
|
+
</div>
|
|
46
47
|
<style>
|
|
48
|
+
.cq-sticky-sidebar-wrapper-cq { container-type: inline-size; }
|
|
47
49
|
.sticky-sidebar {
|
|
48
50
|
display: grid;
|
|
49
51
|
grid-template-columns: 1fr var(--sidebar-w, 280px);
|
|
@@ -61,7 +63,7 @@ const { sidebarWidth = '280px', stickyTop = '100px', gap = '2rem', className = '
|
|
|
61
63
|
top: var(--sticky-top, 100px);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
|
-
@
|
|
66
|
+
@container (max-width: 768px) {
|
|
65
67
|
.sticky-sidebar {
|
|
66
68
|
grid-template-columns: 1fr;
|
|
67
69
|
gap: var(--sp-6);
|
|
@@ -20,4 +20,6 @@ export { default as CenterFixedBox } from './CenterFixedBox.astro';
|
|
|
20
20
|
export { default as GalleryGrid4 } from './GalleryGrid4.astro';
|
|
21
21
|
export { default as StepLayoutVertical } from './StepLayoutVertical.astro';
|
|
22
22
|
export { default as LandingSectionSplit } from './LandingSectionSplit.astro';
|
|
23
|
-
export { default as FooterCenteredMinimal } from './FooterCenteredMinimal.astro';
|
|
23
|
+
export { default as FooterCenteredMinimal } from './FooterCenteredMinimal.astro';
|
|
24
|
+
export { default as HolyGrailGrid } from './HolyGrailGrid.astro';
|
|
25
|
+
export { default as DiagonalSectionDivider } from './DiagonalSectionDivider.astro';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* QuickJumpDock — Floating desktop navigation dock bar with hover magnification and tooltips.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array<{label: string, icon: string, href: string}>} items - List of dock actions.
|
|
6
|
+
*/
|
|
7
|
+
interface Props {
|
|
8
|
+
items?: Array<{ label: string; icon: string; href: string }>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
items = [
|
|
13
|
+
{
|
|
14
|
+
label: 'Home',
|
|
15
|
+
href: '/',
|
|
16
|
+
icon: `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>`,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: 'Components',
|
|
20
|
+
href: '/docs/glass-button',
|
|
21
|
+
icon: `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/></svg>`,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: 'Sections',
|
|
25
|
+
href: '/sections',
|
|
26
|
+
icon: `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="16" rx="1"/></svg>`,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'Search',
|
|
30
|
+
href: '#search',
|
|
31
|
+
icon: `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: 'GitHub',
|
|
35
|
+
href: 'https://github.com/konstantinWDK/astro-components',
|
|
36
|
+
icon: `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/></svg>`,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
} = Astro.props;
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
<nav class="quick-dock" aria-label="Quick dock navigation" data-dock>
|
|
43
|
+
{items.map((item) => (
|
|
44
|
+
<a href={item.href} class="quick-dock__item" aria-label={item.label}>
|
|
45
|
+
<span class="quick-dock__tooltip" aria-hidden="true">{item.label}</span>
|
|
46
|
+
<span class="quick-dock__icon" set:html={item.icon} />
|
|
47
|
+
</a>
|
|
48
|
+
))}
|
|
49
|
+
</nav>
|
|
50
|
+
|
|
51
|
+
<style>
|
|
52
|
+
.quick-dock {
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
padding: 8px 12px;
|
|
57
|
+
background: rgba(14, 14, 18, 0.85);
|
|
58
|
+
backdrop-filter: blur(20px);
|
|
59
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
60
|
+
border-radius: var(--r-full, 9999px);
|
|
61
|
+
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.quick-dock__item {
|
|
65
|
+
position: relative;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
width: 42px;
|
|
70
|
+
height: 42px;
|
|
71
|
+
border-radius: 50%;
|
|
72
|
+
background: rgba(255, 255, 255, 0.04);
|
|
73
|
+
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
74
|
+
color: var(--c-text-2, #a3a3a3);
|
|
75
|
+
text-decoration: none;
|
|
76
|
+
transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, color 0.2s ease;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.quick-dock__item:hover {
|
|
80
|
+
transform: translateY(-8px) scale(1.15);
|
|
81
|
+
background: rgba(184, 134, 11, 0.2);
|
|
82
|
+
border-color: rgba(184, 134, 11, 0.4);
|
|
83
|
+
color: var(--c-primary-light, #d4a017);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.quick-dock__icon {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.quick-dock__tooltip {
|
|
93
|
+
position: absolute;
|
|
94
|
+
bottom: calc(100% + 12px);
|
|
95
|
+
padding: 4px 10px;
|
|
96
|
+
background: #000000;
|
|
97
|
+
color: #ffffff;
|
|
98
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
99
|
+
font-size: 0.72rem;
|
|
100
|
+
font-weight: 700;
|
|
101
|
+
border-radius: 6px;
|
|
102
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
opacity: 0;
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
transform: translateY(6px);
|
|
107
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.quick-dock__tooltip::after {
|
|
111
|
+
content: '';
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 100%;
|
|
114
|
+
left: 50%;
|
|
115
|
+
transform: translateX(-50%);
|
|
116
|
+
border-width: 4px;
|
|
117
|
+
border-style: solid;
|
|
118
|
+
border-color: #000 transparent transparent transparent;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.quick-dock__item:hover .quick-dock__tooltip {
|
|
122
|
+
opacity: 1;
|
|
123
|
+
transform: translateY(0);
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* StepBreadcrumbBar — Stepped workflow breadcrumb indicator for checkout, multi-step forms, or wizards.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array<{step: number, label: string, status: 'complete' | 'active' | 'upcoming', href?: string}>} steps - Step definitions.
|
|
6
|
+
*/
|
|
7
|
+
interface Props {
|
|
8
|
+
steps?: Array<{
|
|
9
|
+
step: number;
|
|
10
|
+
label: string;
|
|
11
|
+
status: 'complete' | 'active' | 'upcoming';
|
|
12
|
+
href?: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
steps = [
|
|
18
|
+
{ step: 1, label: 'Account', status: 'complete', href: '#step-1' },
|
|
19
|
+
{ step: 2, label: 'Plan & Billing', status: 'active', href: '#step-2' },
|
|
20
|
+
{ step: 3, label: 'Preferences', status: 'upcoming', href: '#step-3' },
|
|
21
|
+
{ step: 4, label: 'Review', status: 'upcoming', href: '#step-4' },
|
|
22
|
+
],
|
|
23
|
+
} = Astro.props;
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<nav class="step-nav" aria-label="Workflow progress">
|
|
27
|
+
<ol class="step-nav__list">
|
|
28
|
+
{steps.map((st, i) => (
|
|
29
|
+
<li class:list={['step-nav__item', `step-nav__item--${st.status}`]}>
|
|
30
|
+
<a href={st.href || '#'} class="step-nav__link" aria-current={st.status === 'active' ? 'step' : undefined}>
|
|
31
|
+
<span class="step-nav__circle">
|
|
32
|
+
{st.status === 'complete' ? (
|
|
33
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
34
|
+
<polyline points="20 6 9 17 4 12" />
|
|
35
|
+
</svg>
|
|
36
|
+
) : (
|
|
37
|
+
st.step
|
|
38
|
+
)}
|
|
39
|
+
</span>
|
|
40
|
+
<span class="step-nav__label">{st.label}</span>
|
|
41
|
+
</a>
|
|
42
|
+
{i < steps.length - 1 && (
|
|
43
|
+
<div class="step-nav__line" aria-hidden="true"></div>
|
|
44
|
+
)}
|
|
45
|
+
</li>
|
|
46
|
+
))}
|
|
47
|
+
</ol>
|
|
48
|
+
</nav>
|
|
49
|
+
|
|
50
|
+
<style>
|
|
51
|
+
.step-nav {
|
|
52
|
+
width: 100%;
|
|
53
|
+
max-width: 680px;
|
|
54
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.step-nav__list {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
list-style: none;
|
|
61
|
+
padding: 0;
|
|
62
|
+
margin: 0;
|
|
63
|
+
width: 100%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.step-nav__item {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
flex: 1;
|
|
70
|
+
position: relative;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.step-nav__item:last-child {
|
|
74
|
+
flex: 0 0 auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.step-nav__link {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
gap: 10px;
|
|
81
|
+
text-decoration: none;
|
|
82
|
+
color: var(--c-text-3, #737373);
|
|
83
|
+
font-size: 0.82rem;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
transition: color 0.2s ease;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.step-nav__link:hover {
|
|
90
|
+
color: var(--c-text-1, #ffffff);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.step-nav__circle {
|
|
94
|
+
display: grid;
|
|
95
|
+
place-items: center;
|
|
96
|
+
width: 28px;
|
|
97
|
+
height: 28px;
|
|
98
|
+
border-radius: 50%;
|
|
99
|
+
background: rgba(255, 255, 255, 0.04);
|
|
100
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
101
|
+
color: var(--c-text-2, #a3a3a3);
|
|
102
|
+
font-size: 0.78rem;
|
|
103
|
+
font-weight: 700;
|
|
104
|
+
flex-shrink: 0;
|
|
105
|
+
transition: all 0.25s ease;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Status modifiers */
|
|
109
|
+
.step-nav__item--complete .step-nav__circle {
|
|
110
|
+
background: rgba(16, 185, 129, 0.15);
|
|
111
|
+
border-color: #10b981;
|
|
112
|
+
color: #10b981;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.step-nav__item--complete .step-nav__label {
|
|
116
|
+
color: var(--c-text-1, #ffffff);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.step-nav__item--active .step-nav__circle {
|
|
120
|
+
background: linear-gradient(135deg, #d4a017, #b8860b);
|
|
121
|
+
border-color: #d4a017;
|
|
122
|
+
color: #050505;
|
|
123
|
+
box-shadow: 0 0 12px rgba(212, 160, 23, 0.4);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.step-nav__item--active .step-nav__label {
|
|
127
|
+
color: var(--c-primary-light, #d4a017);
|
|
128
|
+
font-weight: 700;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.step-nav__line {
|
|
132
|
+
flex: 1;
|
|
133
|
+
height: 2px;
|
|
134
|
+
background: rgba(255, 255, 255, 0.08);
|
|
135
|
+
margin: 0 12px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.step-nav__item--complete .step-nav__line {
|
|
139
|
+
background: #10b981;
|
|
140
|
+
opacity: 0.5;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media (max-width: 640px) {
|
|
144
|
+
.step-nav__label {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
.step-nav__line {
|
|
148
|
+
margin: 0 6px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* SubNavbarPills — Secondary horizontal sub-navigation bar with scrollable pill links and badge counters.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array<{label: string, href: string, count?: number, active?: boolean}>} items - Nav links list.
|
|
6
|
+
* @param {string} className - Optional CSS class.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
items?: Array<{ label: string; href: string; count?: number; active?: boolean }>;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
items = [
|
|
15
|
+
{ label: 'All Items', href: '#all', count: 124, active: true },
|
|
16
|
+
{ label: 'Components', href: '#components', count: 86 },
|
|
17
|
+
{ label: 'Templates', href: '#templates', count: 18 },
|
|
18
|
+
{ label: 'Icons', href: '#icons', count: 20 },
|
|
19
|
+
{ label: 'Guides', href: '#guides' },
|
|
20
|
+
],
|
|
21
|
+
className = '',
|
|
22
|
+
} = Astro.props;
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
<nav class:list={['subnav-pills', className]} aria-label="Sub navigation">
|
|
26
|
+
<div class="subnav-pills__track">
|
|
27
|
+
{items.map((item) => (
|
|
28
|
+
<a
|
|
29
|
+
href={item.href}
|
|
30
|
+
class:list={['subnav-pills__link', { 'is-active': item.active }]}
|
|
31
|
+
aria-current={item.active ? 'page' : undefined}
|
|
32
|
+
>
|
|
33
|
+
<span>{item.label}</span>
|
|
34
|
+
{item.count !== undefined && (
|
|
35
|
+
<span class="subnav-pills__count">{item.count}</span>
|
|
36
|
+
)}
|
|
37
|
+
</a>
|
|
38
|
+
))}
|
|
39
|
+
</div>
|
|
40
|
+
</nav>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
.subnav-pills {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
width: 100%;
|
|
47
|
+
overflow-x: auto;
|
|
48
|
+
scrollbar-width: none;
|
|
49
|
+
-ms-overflow-style: none;
|
|
50
|
+
padding: 0.5rem 0;
|
|
51
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
52
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.subnav-pills::-webkit-scrollbar {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.subnav-pills__track {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: 8px;
|
|
63
|
+
padding: 2px 4px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.subnav-pills__link {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 8px;
|
|
70
|
+
padding: 0.45rem 1rem;
|
|
71
|
+
background: rgba(255, 255, 255, 0.03);
|
|
72
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
73
|
+
border-radius: var(--r-full, 9999px);
|
|
74
|
+
color: var(--c-text-2, #a3a3a3);
|
|
75
|
+
font-size: 0.85rem;
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
text-decoration: none;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
transition: all 0.2s ease;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.subnav-pills__link:hover {
|
|
83
|
+
color: var(--c-text-1, #ffffff);
|
|
84
|
+
background: rgba(255, 255, 255, 0.08);
|
|
85
|
+
border-color: rgba(255, 255, 255, 0.15);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.subnav-pills__link.is-active {
|
|
89
|
+
background: linear-gradient(135deg, rgba(184, 134, 11, 0.25), rgba(212, 160, 23, 0.25));
|
|
90
|
+
border-color: rgba(184, 134, 11, 0.5);
|
|
91
|
+
color: var(--c-accent, #fef3c7);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.subnav-pills__count {
|
|
95
|
+
font-size: 0.7rem;
|
|
96
|
+
font-weight: 700;
|
|
97
|
+
background: rgba(0, 0, 0, 0.3);
|
|
98
|
+
padding: 1px 7px;
|
|
99
|
+
border-radius: var(--r-full, 9999px);
|
|
100
|
+
color: inherit;
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
@@ -21,3 +21,6 @@ export { default as SimpleFooterGlass } from './SimpleFooterGlass.astro';
|
|
|
21
21
|
export { default as TabUnderline } from './TabUnderline.astro';
|
|
22
22
|
export { default as UserProfileNav } from './UserProfileNav.astro';
|
|
23
23
|
export { default as VerticalTabs } from './VerticalTabs.astro';
|
|
24
|
+
export { default as SubNavbarPills } from './SubNavbarPills.astro';
|
|
25
|
+
export { default as QuickJumpDock } from './QuickJumpDock.astro';
|
|
26
|
+
export { default as StepBreadcrumbBar } from './StepBreadcrumbBar.astro';
|