astro-component-kit 0.0.1 → 0.1.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 +218 -119
- package/package.json +28 -55
- package/src/components/index.ts +207 -0
- package/src/components/lib/AnimatedGalaxy.astro +185 -0
- package/src/components/lib/Galaxy3D.astro +308 -0
- package/src/components/lib/GlassNavbar.astro +13 -11
- package/src/components/lib/LogoWithGalaxy.astro +63 -0
- package/src/components/lib/buttons/3dPushButton.astro +9 -0
- package/src/components/lib/buttons/AnimatedIconButton.astro +10 -0
- package/src/components/lib/buttons/BorderDrawButton.astro +9 -0
- package/src/components/lib/buttons/CyberpunkButton.astro +10 -0
- package/src/components/lib/buttons/DoubleBorderButton.astro +9 -0
- package/src/components/lib/buttons/GhostOutlineButton.astro +10 -0
- package/src/components/lib/buttons/GlassButton.astro +13 -32
- package/src/components/lib/buttons/GlowButton.astro +9 -0
- package/src/components/lib/buttons/LiquidButton.astro +9 -0
- package/src/components/lib/buttons/LoadingButton.astro +10 -0
- package/src/components/lib/buttons/MagneticButton.astro +10 -0
- package/src/components/lib/buttons/MinimalPillButton.astro +9 -0
- package/src/components/lib/buttons/NeumorphicButton.astro +10 -0
- package/src/components/lib/buttons/PulseButton.astro +10 -0
- package/src/components/lib/buttons/RetroArcadeButton.astro +9 -0
- package/src/components/lib/buttons/RetroShadowButton.astro +9 -0
- package/src/components/lib/buttons/ShimmerButton.astro +9 -0
- package/src/components/lib/buttons/ShinyButton.astro +9 -0
- package/src/components/lib/buttons/TiltGlowButton.astro +10 -0
- package/src/components/lib/cards/BlogHorizontalCard.astro +46 -13
- package/src/components/lib/cards/CyberFeatureCard.astro +50 -6
- package/src/components/lib/cards/EcommerceProductCard.astro +69 -16
- package/src/components/lib/cards/GlassCard.astro +8 -0
- package/src/components/lib/cards/GlassEventCard.astro +53 -12
- package/src/components/lib/cards/GlowPortfolioCard.astro +46 -9
- package/src/components/lib/cards/InteractiveTiltCard.astro +47 -7
- package/src/components/lib/cards/KanbanItemCard.astro +40 -9
- package/src/components/lib/cards/MinimalLinkCard.astro +37 -7
- package/src/components/lib/cards/MusicPlayerMini.astro +54 -14
- package/src/components/lib/cards/NeumorphicCard.astro +32 -2
- package/src/components/lib/cards/NotificationCard.astro +44 -9
- package/src/components/lib/cards/PricingCard.astro +47 -9
- package/src/components/lib/cards/ProfileCard.astro +50 -11
- package/src/components/lib/cards/RetroGameCard.astro +37 -9
- package/src/components/lib/cards/StatCard.astro +43 -8
- package/src/components/lib/cards/TaskKanbanCard.astro +50 -11
- package/src/components/lib/cards/TestimonialCardClean.astro +43 -12
- package/src/components/lib/cards/WeatherWidgetCard.astro +36 -10
- package/src/components/lib/feedback/AnimatedCheckmark.astro +58 -9
- package/src/components/lib/feedback/Badge.astro +47 -12
- package/src/components/lib/feedback/CircleProgress.astro +56 -13
- package/src/components/lib/feedback/ConfettiFeedback.astro +74 -11
- package/src/components/lib/feedback/CyberGlitchAlert.astro +69 -6
- package/src/components/lib/feedback/EmptyStateCard.astro +55 -7
- package/src/components/lib/feedback/GlassAlert.astro +59 -13
- package/src/components/lib/feedback/GlassModal.astro +99 -14
- package/src/components/lib/feedback/GlassProgress.astro +39 -5
- package/src/components/lib/feedback/IndicatorBadgeMinimal.astro +56 -3
- package/src/components/lib/feedback/NeonSpinner.astro +40 -3
- package/src/components/lib/feedback/PulseDot.astro +51 -7
- package/src/components/lib/feedback/RatingPill.astro +38 -8
- package/src/components/lib/feedback/ShakeErrorGroup.astro +44 -3
- package/src/components/lib/feedback/SimpleTooltip.astro +53 -4
- package/src/components/lib/feedback/SkeletonList.astro +59 -13
- package/src/components/lib/feedback/Spotlight.astro +49 -4
- package/src/components/lib/feedback/StepProgress.astro +96 -9
- package/src/components/lib/feedback/ToastNotif.astro +60 -6
- package/src/components/lib/feedback/TypingIndicator.astro +52 -7
- package/src/components/lib/forms/AnimatedInput.astro +47 -5
- package/src/components/lib/forms/ChipInput.astro +116 -8
- package/src/components/lib/forms/ColorPickerInput.astro +53 -6
- package/src/components/lib/forms/CurrencyInput.astro +59 -6
- package/src/components/lib/forms/CustomRadioGroup.astro +61 -9
- package/src/components/lib/forms/CyberpunkCheckbox.astro +64 -8
- package/src/components/lib/forms/DragDropUpload.astro +87 -7
- package/src/components/lib/forms/ErrorInput.astro +31 -4
- package/src/components/lib/forms/FloatingPassword.astro +48 -10
- package/src/components/lib/forms/FormGroupVertical.astro +63 -9
- package/src/components/lib/forms/GlassSlider.astro +84 -3
- package/src/components/lib/forms/GlassTextarea.astro +39 -6
- package/src/components/lib/forms/ModernSelect.astro +66 -10
- package/src/components/lib/forms/NeumorphicSwitch.astro +54 -26
- package/src/components/lib/forms/OTPInput.astro +84 -12
- package/src/components/lib/forms/RatingStars.astro +66 -10
- package/src/components/lib/forms/SearchReveal.astro +44 -6
- package/src/components/lib/forms/SegmentedControl.astro +61 -7
- package/src/components/lib/forms/SimpleFileInput.astro +57 -6
- package/src/components/lib/forms/StepperInput.astro +101 -9
- package/src/components/lib/layout/FeatureHero.astro +70 -6
- package/src/components/lib/layout/FooterCenteredMinimal.astro +5 -2
- package/src/components/lib/navigation/GlassNavbar.astro +10 -5
- package/src/components/lib/navigation/MinimalSidebar.astro +6 -3
- package/src/components/lib/navigation/SimpleFooterGlass.astro +6 -2
- package/src/components/lib/overlays/SplashIntroOverlay.astro +6 -3
- package/src/components/lib/sections/ButtonsShowcase.astro +182 -0
- package/src/components/lib/sections/CardsShowcase.astro +376 -0
- package/src/components/lib/sections/DataShowcase.astro +329 -0
- package/src/components/lib/sections/FeedbackShowcase.astro +320 -0
- package/src/components/lib/sections/FormsShowcase.astro +347 -0
- package/src/components/lib/sections/HeroGlass.astro +202 -0
- package/src/components/lib/sections/HeroGradient.astro +143 -0
- package/src/components/lib/sections/HeroSplit.astro +210 -0
- package/src/components/lib/sections/LayoutShowcase.astro +317 -0
- package/src/components/lib/sections/NavigationShowcase.astro +285 -0
- package/src/components/lib/sections/OverlaysShowcase.astro +373 -0
- package/src/components/lib/sections/TypographyShowcase.astro +239 -0
- package/src/components/lib/sections/index.ts +6 -0
- package/src/components/types.d.ts +6 -0
- package/{dist → src}/styles/global.css +5 -5
- package/dist/AnimatedInput.astro +0 -82
- package/dist/Badge.astro +0 -52
- package/dist/GlassButton.astro +0 -87
- package/dist/GlassCard.astro +0 -72
- package/dist/GlassNavbar.astro +0 -65
- package/dist/GlowButton.astro +0 -60
- package/dist/buttons/3dPushButton.astro +0 -136
- package/dist/buttons/AnimatedIconButton.astro +0 -146
- package/dist/buttons/BorderDrawButton.astro +0 -112
- package/dist/buttons/CyberpunkButton.astro +0 -148
- package/dist/buttons/DoubleBorderButton.astro +0 -131
- package/dist/buttons/GhostOutlineButton.astro +0 -109
- package/dist/buttons/GlassButton.astro +0 -165
- package/dist/buttons/GlowButton.astro +0 -119
- package/dist/buttons/LiquidButton.astro +0 -167
- package/dist/buttons/LoadingButton.astro +0 -148
- package/dist/buttons/MagneticButton.astro +0 -134
- package/dist/buttons/MinimalPillButton.astro +0 -102
- package/dist/buttons/NeumorphicButton.astro +0 -158
- package/dist/buttons/PulseButton.astro +0 -111
- package/dist/buttons/RetroArcadeButton.astro +0 -105
- package/dist/buttons/RetroShadowButton.astro +0 -82
- package/dist/buttons/ShimmerButton.astro +0 -113
- package/dist/buttons/ShinyButton.astro +0 -121
- package/dist/buttons/TiltGlowButton.astro +0 -145
- package/dist/buttons/index.mjs +0 -19
- package/dist/buttons/index.ts +0 -19
- package/dist/cards/BlogHorizontalCard.astro +0 -18
- package/dist/cards/CyberFeatureCard.astro +0 -12
- package/dist/cards/EcommerceProductCard.astro +0 -24
- package/dist/cards/GlassCard.astro +0 -17
- package/dist/cards/GlassEventCard.astro +0 -19
- package/dist/cards/GlowPortfolioCard.astro +0 -16
- package/dist/cards/InteractiveTiltCard.astro +0 -25
- package/dist/cards/KanbanItemCard.astro +0 -15
- package/dist/cards/MinimalLinkCard.astro +0 -12
- package/dist/cards/MusicPlayerMini.astro +0 -21
- package/dist/cards/NeumorphicCard.astro +0 -6
- package/dist/cards/NotificationCard.astro +0 -15
- package/dist/cards/PricingCard.astro +0 -17
- package/dist/cards/ProfileCard.astro +0 -17
- package/dist/cards/RetroGameCard.astro +0 -15
- package/dist/cards/StatCard.astro +0 -15
- package/dist/cards/TaskKanbanCard.astro +0 -18
- package/dist/cards/TestimonialCardClean.astro +0 -20
- package/dist/cards/WeatherWidgetCard.astro +0 -17
- package/dist/cards/index.mjs +0 -19
- package/dist/cards/index.ts +0 -19
- package/dist/data/AccordionGroupGlass.astro +0 -21
- package/dist/data/AvatarGroupStack.astro +0 -15
- package/dist/data/CalendarGridView.astro +0 -18
- package/dist/data/DataChipsGroup.astro +0 -16
- package/dist/data/DescriptionListHoriz.astro +0 -14
- package/dist/data/FileTreeView.astro +0 -22
- package/dist/data/GanttChartMinimal.astro +0 -12
- package/dist/data/GlassTable.astro +0 -23
- package/dist/data/KeyValuePillGroup.astro +0 -12
- package/dist/data/PriceCompareTable.astro +0 -22
- package/dist/data/ProgressListSmall.astro +0 -17
- package/dist/data/RatingBreakdownBar.astro +0 -13
- package/dist/data/SparklineStatCard.astro +0 -16
- package/dist/data/StatsGridDashboard.astro +0 -16
- package/dist/data/StepperDataVertical.astro +0 -15
- package/dist/data/TagCloudData.astro +0 -14
- package/dist/data/TimelineHorizSteps.astro +0 -18
- package/dist/data/TreeItemInteractive.astro +0 -18
- package/dist/data/UserDirectoryItem.astro +0 -15
- package/dist/data/VerticalTimeline.astro +0 -21
- package/dist/data/index.mjs +0 -20
- package/dist/data/index.ts +0 -20
- package/dist/feedback/AnimatedCheckmark.astro +0 -13
- package/dist/feedback/Badge.astro +0 -19
- package/dist/feedback/CircleProgress.astro +0 -22
- package/dist/feedback/ConfettiFeedback.astro +0 -18
- package/dist/feedback/CyberGlitchAlert.astro +0 -11
- package/dist/feedback/EmptyStateCard.astro +0 -13
- package/dist/feedback/GlassAlert.astro +0 -20
- package/dist/feedback/GlassModal.astro +0 -19
- package/dist/feedback/GlassProgress.astro +0 -10
- package/dist/feedback/IndicatorBadgeMinimal.astro +0 -10
- package/dist/feedback/NeonSpinner.astro +0 -7
- package/dist/feedback/PulseDot.astro +0 -12
- package/dist/feedback/RatingPill.astro +0 -13
- package/dist/feedback/ShakeErrorGroup.astro +0 -7
- package/dist/feedback/SimpleTooltip.astro +0 -10
- package/dist/feedback/SkeletonList.astro +0 -20
- package/dist/feedback/Spotlight.astro +0 -9
- package/dist/feedback/StepProgress.astro +0 -14
- package/dist/feedback/ToastNotif.astro +0 -11
- package/dist/feedback/TypingIndicator.astro +0 -12
- package/dist/feedback/index.mjs +0 -20
- package/dist/feedback/index.ts +0 -20
- package/dist/forms/AnimatedInput.astro +0 -16
- package/dist/forms/ChipInput.astro +0 -13
- package/dist/forms/ColorPickerInput.astro +0 -13
- package/dist/forms/CurrencyInput.astro +0 -11
- package/dist/forms/CustomRadioGroup.astro +0 -13
- package/dist/forms/CyberpunkCheckbox.astro +0 -15
- package/dist/forms/DragDropUpload.astro +0 -12
- package/dist/forms/ErrorInput.astro +0 -11
- package/dist/forms/FloatingPassword.astro +0 -20
- package/dist/forms/FormGroupVertical.astro +0 -14
- package/dist/forms/GlassSlider.astro +0 -7
- package/dist/forms/GlassTextarea.astro +0 -14
- package/dist/forms/ModernSelect.astro +0 -16
- package/dist/forms/NeumorphicSwitch.astro +0 -55
- package/dist/forms/OTPInput.astro +0 -22
- package/dist/forms/RatingStars.astro +0 -15
- package/dist/forms/SearchReveal.astro +0 -13
- package/dist/forms/SegmentedControl.astro +0 -13
- package/dist/forms/SimpleFileInput.astro +0 -11
- package/dist/forms/StepperInput.astro +0 -14
- package/dist/forms/index.mjs +0 -20
- package/dist/forms/index.ts +0 -20
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
- package/dist/layout/BentoGrid3.astro +0 -14
- package/dist/layout/CenterFixedBox.astro +0 -6
- package/dist/layout/CenteredContainer.astro +0 -8
- package/dist/layout/ClusterHorizontal.astro +0 -6
- package/dist/layout/FeatureHero.astro +0 -17
- package/dist/layout/FooterCenteredMinimal.astro +0 -11
- package/dist/layout/FullBleedSection.astro +0 -6
- package/dist/layout/GalleryGrid4.astro +0 -7
- package/dist/layout/GlassCardGrid.astro +0 -6
- package/dist/layout/GlassSectionHeader.astro +0 -15
- package/dist/layout/LandingSectionSplit.astro +0 -13
- package/dist/layout/MasonryGrid.astro +0 -7
- package/dist/layout/MinimalFooterGrid.astro +0 -20
- package/dist/layout/ScrollSnapSection.astro +0 -7
- package/dist/layout/SectionDividerText.astro +0 -7
- package/dist/layout/SidebarLayoutWrapper.astro +0 -11
- package/dist/layout/SplitScreenLayout.astro +0 -11
- package/dist/layout/StepLayoutVertical.astro +0 -21
- package/dist/layout/StickySidebarWrapper.astro +0 -10
- package/dist/layout/VerticalStack.astro +0 -8
- package/dist/layout/index.mjs +0 -20
- package/dist/layout/index.ts +0 -20
- package/dist/navigation/AnchorSideNav.astro +0 -13
- package/dist/navigation/BottomNavMobile.astro +0 -13
- package/dist/navigation/BreadcrumbsMinimal.astro +0 -16
- package/dist/navigation/BurgerMorphIcon.astro +0 -12
- package/dist/navigation/CommandPaletteUI.astro +0 -17
- package/dist/navigation/DotNavigationSlider.astro +0 -13
- package/dist/navigation/FloatingTabBar.astro +0 -12
- package/dist/navigation/GlassNavbar.astro +0 -19
- package/dist/navigation/LangSwitcherPill.astro +0 -17
- package/dist/navigation/MegaMenuGlass.astro +0 -25
- package/dist/navigation/MinimalSidebar.astro +0 -18
- package/dist/navigation/PaginationGlass.astro +0 -20
- package/dist/navigation/PaginationInfiniteUI.astro +0 -11
- package/dist/navigation/RadialIconMenu.astro +0 -15
- package/dist/navigation/RetroArcadeMenu.astro +0 -12
- package/dist/navigation/ScrollProgressTop.astro +0 -15
- package/dist/navigation/SimpleFooterGlass.astro +0 -21
- package/dist/navigation/TabUnderline.astro +0 -14
- package/dist/navigation/UserProfileNav.astro +0 -21
- package/dist/navigation/VerticalTabs.astro +0 -14
- package/dist/navigation/index.mjs +0 -20
- package/dist/navigation/index.ts +0 -20
- package/dist/overlays/AgeVerificationOverlay.astro +0 -20
- package/dist/overlays/BackdropBlurMask.astro +0 -6
- package/dist/overlays/BottomSheetMobile.astro +0 -16
- package/dist/overlays/CommandDialog.astro +0 -19
- package/dist/overlays/ContextMenuOverlay.astro +0 -17
- package/dist/overlays/CookieBannerGlass.astro +0 -14
- package/dist/overlays/ExitIntentOverlay.astro +0 -19
- package/dist/overlays/FloatingTrayActions.astro +0 -13
- package/dist/overlays/HelpBubbleOverlay.astro +0 -11
- package/dist/overlays/LightboxOverlay.astro +0 -13
- package/dist/overlays/LoadingOverlayFull.astro +0 -10
- package/dist/overlays/MobileNavOverlay.astro +0 -18
- package/dist/overlays/OverlayModal.astro +0 -24
- package/dist/overlays/PopoverMenuGlass.astro +0 -17
- package/dist/overlays/SearchOverlayFullscreen.astro +0 -15
- package/dist/overlays/SideDrawerRight.astro +0 -16
- package/dist/overlays/SplashIntroOverlay.astro +0 -11
- package/dist/overlays/SpotlightIndicator.astro +0 -6
- package/dist/overlays/ToastStackOverlay.astro +0 -12
- package/dist/overlays/TooltipActionTray.astro +0 -14
- package/dist/overlays/index.mjs +0 -20
- package/dist/overlays/index.ts +0 -20
- package/dist/typography/AnimatedUnderlineLink.astro +0 -10
- package/dist/typography/BackgroundClipMask.astro +0 -7
- package/dist/typography/CodeInlineGlass.astro +0 -6
- package/dist/typography/CyberpunkGlitchText.astro +0 -20
- package/dist/typography/DropCapParagraph.astro +0 -7
- package/dist/typography/FadedVerticalText.astro +0 -6
- package/dist/typography/FloatingTextLabel.astro +0 -10
- package/dist/typography/GlassBlockQuote.astro +0 -13
- package/dist/typography/GlassTextReveal.astro +0 -7
- package/dist/typography/GradientHeading.astro +0 -9
- package/dist/typography/GradientUnderlineLink.astro +0 -7
- package/dist/typography/KbdIndicator.astro +0 -6
- package/dist/typography/LetterSpacingWide.astro +0 -6
- package/dist/typography/MinimalListMarkers.astro +0 -10
- package/dist/typography/MonospaceStatLine.astro +0 -6
- package/dist/typography/NeonTextHighlight.astro +0 -6
- package/dist/typography/ShadowRevealText.astro +0 -7
- package/dist/typography/StrokeHeadingOutline.astro +0 -8
- package/dist/typography/Text3DLayer.astro +0 -7
- package/dist/typography/TypewriterText.astro +0 -15
- package/dist/typography/index.mjs +0 -20
- package/dist/typography/index.ts +0 -20
- package/dist/utilities/AspectRatioBox.astro +0 -11
- package/dist/utilities/BackgroundDotPattern.astro +0 -6
- package/dist/utilities/CircularMask.astro +0 -7
- package/dist/utilities/ClickRippleWrapper.astro +0 -7
- package/dist/utilities/FadeInWrapper.astro +0 -11
- package/dist/utilities/FixedRatioImage.astro +0 -7
- package/dist/utilities/GlassBlurLayer.astro +0 -6
- package/dist/utilities/GradientBorderMask.astro +0 -7
- package/dist/utilities/HoverLift.astro +0 -7
- package/dist/utilities/ResponsiveSpacer.astro +0 -15
- package/dist/utilities/ResponsiveVisToggle.astro +0 -11
- package/dist/utilities/ScrollLockParent.astro +0 -11
- package/dist/utilities/ScrollMarginTarget.astro +0 -10
- package/dist/utilities/SlideUpReveal.astro +0 -7
- package/dist/utilities/SmoothAnchorLink.astro +0 -22
- package/dist/utilities/StackLayering.astro +0 -12
- package/dist/utilities/StickyObserver.astro +0 -8
- package/dist/utilities/TextTruncate.astro +0 -10
- package/dist/utilities/TruncateSingleLine.astro +0 -6
- package/dist/utilities/VisuallyHidden.astro +0 -6
- package/dist/utilities/index.mjs +0 -20
- package/dist/utilities/index.ts +0 -20
- package/src/components/lib/utilities/AspectRatioBox.astro +0 -11
- package/src/components/lib/utilities/BackgroundDotPattern.astro +0 -6
- package/src/components/lib/utilities/CircularMask.astro +0 -7
- package/src/components/lib/utilities/ClickRippleWrapper.astro +0 -7
- package/src/components/lib/utilities/FadeInWrapper.astro +0 -11
- package/src/components/lib/utilities/FixedRatioImage.astro +0 -7
- package/src/components/lib/utilities/GlassBlurLayer.astro +0 -6
- package/src/components/lib/utilities/GradientBorderMask.astro +0 -7
- package/src/components/lib/utilities/HoverLift.astro +0 -7
- package/src/components/lib/utilities/ResponsiveSpacer.astro +0 -15
- package/src/components/lib/utilities/ResponsiveVisToggle.astro +0 -11
- package/src/components/lib/utilities/ScrollLockParent.astro +0 -11
- package/src/components/lib/utilities/ScrollMarginTarget.astro +0 -10
- package/src/components/lib/utilities/SlideUpReveal.astro +0 -7
- package/src/components/lib/utilities/SmoothAnchorLink.astro +0 -22
- package/src/components/lib/utilities/StackLayering.astro +0 -12
- package/src/components/lib/utilities/StickyObserver.astro +0 -8
- package/src/components/lib/utilities/TextTruncate.astro +0 -10
- package/src/components/lib/utilities/TruncateSingleLine.astro +0 -6
- package/src/components/lib/utilities/VisuallyHidden.astro +0 -6
- package/src/components/lib/utilities/index.ts +0 -20
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* WeatherWidgetCard — Glassmorphism card showing weather conditions.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} temp - The formatted temperature (e.g. "24°").
|
|
6
|
+
* @param {string} city - The location name.
|
|
7
|
+
* @param {string} condition - Short weather condition string (e.g. "Partly Cloudy").
|
|
8
|
+
* @param {string} icon - Emoji or symbol representing the weather.
|
|
9
|
+
*/
|
|
10
|
+
interface Props {
|
|
11
|
+
temp: string;
|
|
12
|
+
city: string;
|
|
13
|
+
condition: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const { temp, city, condition, icon } = Astro.props;
|
|
2
18
|
---
|
|
19
|
+
|
|
3
20
|
<div class="weather-card">
|
|
4
|
-
<div class="
|
|
5
|
-
<div class="
|
|
6
|
-
<h4>
|
|
7
|
-
<p>
|
|
21
|
+
<div class="weather-card__temp">{temp}</div>
|
|
22
|
+
<div class="weather-card__city">
|
|
23
|
+
<h4 class="weather-card__name">{city}</h4>
|
|
24
|
+
<p class="weather-card__cond">{condition}</p>
|
|
8
25
|
</div>
|
|
9
|
-
<div class="icon
|
|
26
|
+
<div class="weather-card__icon" aria-hidden="true">{icon}</div>
|
|
10
27
|
</div>
|
|
28
|
+
|
|
11
29
|
<style>
|
|
12
|
-
.weather-card {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
.weather-card {
|
|
31
|
+
display: flex; align-items: center; gap: var(--sp-6, 1.5rem);
|
|
32
|
+
padding: var(--sp-6, 1.5rem);
|
|
33
|
+
background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(192,132,252,0.2));
|
|
34
|
+
backdrop-filter: blur(20px);
|
|
35
|
+
border: 1px solid var(--c-border, rgba(255,255,255,0.15));
|
|
36
|
+
border-radius: var(--r-xl, 24px);
|
|
37
|
+
color: var(--c-text-1, #fff);
|
|
38
|
+
}
|
|
39
|
+
.weather-card__temp { font-size: 2.2rem; font-weight: 800; }
|
|
40
|
+
.weather-card__name { margin: 0; font-size: 1rem; }
|
|
41
|
+
.weather-card__cond { margin: 0; font-size: 0.8rem; opacity: 0.7; }
|
|
42
|
+
.weather-card__icon { font-size: 2.5rem; margin-left: auto; }
|
|
17
43
|
</style>
|
|
@@ -1,13 +1,62 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* AnimatedCheckmark — A decorative SVG checkmark with a circular fill and draw animation.
|
|
4
|
+
*
|
|
5
|
+
* @param {number|string} size - The width/height of the checkmark in pixels. Default is 56.
|
|
6
|
+
* @param {string} color - The primary color of the success state. Default is '#7ac142'.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
size?: number | string;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { size = 56, color = '#7ac142' } = Astro.props;
|
|
2
14
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
15
|
+
|
|
16
|
+
<div class="checkmark-container" style={`--check-size: ${size}px; --check-color: ${color};`}>
|
|
17
|
+
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
|
|
18
|
+
<circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
|
|
19
|
+
<path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
|
|
20
|
+
</svg>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
7
23
|
<style>
|
|
8
|
-
.checkmark {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
.checkmark-container {
|
|
25
|
+
width: var(--check-size);
|
|
26
|
+
height: var(--check-size);
|
|
27
|
+
margin: var(--sp-4, 1rem) auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.checkmark {
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
border-radius: var(--r-full, 50%);
|
|
34
|
+
display: block;
|
|
35
|
+
stroke-width: 2;
|
|
36
|
+
stroke: #fff;
|
|
37
|
+
stroke-miterlimit: 10;
|
|
38
|
+
box-shadow: inset 0px 0px 0px transparent;
|
|
39
|
+
animation: checkmark-fill .4s ease-in-out .4s forwards, checkmark-scale .3s ease-in-out .9s both;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.checkmark__circle {
|
|
43
|
+
stroke-dasharray: 166;
|
|
44
|
+
stroke-dashoffset: 166;
|
|
45
|
+
stroke-width: 2;
|
|
46
|
+
stroke-miterlimit: 10;
|
|
47
|
+
stroke: var(--check-color);
|
|
48
|
+
fill: none;
|
|
49
|
+
animation: checkmark-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.checkmark__check {
|
|
53
|
+
transform-origin: 50% 50%;
|
|
54
|
+
stroke-dasharray: 48;
|
|
55
|
+
stroke-dashoffset: 48;
|
|
56
|
+
animation: checkmark-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes checkmark-stroke { 100% { stroke-dashoffset: 0; } }
|
|
60
|
+
@keyframes checkmark-fill { 100% { box-shadow: inset 0px 0px 0px 30px var(--check-color); } }
|
|
61
|
+
@keyframes checkmark-scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
|
|
13
62
|
</style>
|
|
@@ -1,19 +1,54 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Badge — A compact visual indicator for labels, categories, or status tags.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} variant - Visual theme (default|success|warning|danger|info). Default is 'default'.
|
|
6
|
+
* @param {boolean} dot - If true, displays a small decorative circle inside the badge.
|
|
7
|
+
* @param {boolean} pulse - If true, adds a subtle breathing animation to the internal dot.
|
|
8
|
+
* @param {string} className - Optional additional CSS classes.
|
|
9
|
+
*/
|
|
10
|
+
interface Props {
|
|
11
|
+
variant?: 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
12
|
+
dot?: boolean;
|
|
13
|
+
pulse?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const { variant = 'default', dot = false, pulse = false, className = '' } = Astro.props;
|
|
4
18
|
---
|
|
5
|
-
|
|
19
|
+
|
|
20
|
+
<span class:list={['badge', `badge--${variant}`, className]}>
|
|
6
21
|
{dot && <span class:list={['badge__dot', { 'badge__dot--pulse': pulse }]}></span>}
|
|
7
22
|
<slot />
|
|
8
23
|
</span>
|
|
24
|
+
|
|
9
25
|
<style>
|
|
10
|
-
.badge {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
.badge {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--sp-2, 0.4rem);
|
|
30
|
+
padding: var(--sp-1, 0.25rem) var(--sp-3, 0.7rem);
|
|
31
|
+
border-radius: var(--r-full, 100px);
|
|
32
|
+
font-size: 0.72rem;
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
letter-spacing: 0.05em;
|
|
35
|
+
text-transform: uppercase;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
border: 1px solid transparent;
|
|
38
|
+
transition: 0.2s;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.badge--default { background: rgba(148, 163, 184, 0.12); color: var(--c-text-2, #94a3b8); border-color: var(--c-border, rgba(148, 163, 184, 0.2)); }
|
|
42
|
+
.badge--success { background: rgba(52, 211, 153, 0.12); color: #34d399; border-color: rgba(52, 211, 153, 0.25); }
|
|
43
|
+
.badge--warning { background: rgba(251, 191, 36, 0.12); color: #fbbf24; border-color: rgba(251, 191, 36, 0.25); }
|
|
44
|
+
.badge--danger { background: rgba(248, 113, 113, 0.12); color: #f87171; border-color: rgba(248, 113, 113, 0.25); }
|
|
45
|
+
.badge--info { background: rgba(129, 140, 248, 0.12); color: var(--c-primary-light, #818cf8); border-color: rgba(129, 140, 248, 0.25); }
|
|
46
|
+
|
|
47
|
+
.badge__dot { width: 6px; height: 6px; border-radius: var(--r-full, 50%); background: currentColor; flex-shrink: 0; }
|
|
48
|
+
.badge__dot--pulse { animation: badge-dot-pulse 2s ease-in-out infinite; }
|
|
49
|
+
|
|
50
|
+
@keyframes badge-dot-pulse {
|
|
51
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
52
|
+
50% { opacity: 0.4; transform: scale(0.7); }
|
|
53
|
+
}
|
|
19
54
|
</style>
|
|
@@ -1,22 +1,65 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* CircleProgress — A circular chart indicating a percentage of completion.
|
|
4
|
+
*
|
|
5
|
+
* @param {number} percent - Completion percentage (0 to 100).
|
|
6
|
+
* @param {number} size - Pixel size of the square SVG container. Default is 80.
|
|
7
|
+
* @param {string} color - Primary gauge color. Default is 'var(--c-primary)'.
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
percent: number;
|
|
11
|
+
size?: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { percent, size = 80, color = 'var(--c-primary, #6366f1)' } = Astro.props;
|
|
16
|
+
|
|
17
|
+
const radius = (size / 2) - 10;
|
|
5
18
|
const circum = 2 * Math.PI * radius;
|
|
6
|
-
const offset = circum - (percent / 100) * circum;
|
|
19
|
+
const offset = circum - (Math.min(100, Math.max(0, percent)) / 100) * circum;
|
|
7
20
|
---
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<circle class="
|
|
21
|
+
|
|
22
|
+
<div class="circle-box" style={`--gauge-size: ${size}px; --gauge-color: ${color};`}>
|
|
23
|
+
<svg width={size} height={size}>
|
|
24
|
+
<circle class="circle-bg" cx={size/2} cy={size/2} r={radius} />
|
|
25
|
+
<circle
|
|
26
|
+
class="circle-val"
|
|
27
|
+
cx={size/2} cy={size/2} r={radius}
|
|
28
|
+
stroke-dasharray={circum}
|
|
29
|
+
stroke-dashoffset={offset}
|
|
30
|
+
stroke={color}
|
|
31
|
+
/>
|
|
12
32
|
</svg>
|
|
13
|
-
<div class="label">{percent}%</div>
|
|
33
|
+
<div class="circle-label" role="presentation">{percent}%</div>
|
|
14
34
|
</div>
|
|
35
|
+
|
|
15
36
|
<style>
|
|
16
|
-
.circle-box {
|
|
37
|
+
.circle-box {
|
|
38
|
+
position: relative;
|
|
39
|
+
width: var(--gauge-size);
|
|
40
|
+
height: var(--gauge-size);
|
|
41
|
+
display: grid; place-items: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
17
44
|
svg { transform: rotate(-90deg); }
|
|
45
|
+
|
|
18
46
|
circle { fill: transparent; stroke-width: 6; stroke-linecap: round; }
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
|
|
47
|
+
|
|
48
|
+
.circle-bg {
|
|
49
|
+
stroke: var(--c-bg-elev, rgba(255,255,255,0.05));
|
|
50
|
+
stroke-width: 5;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.circle-val {
|
|
54
|
+
transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
|
|
55
|
+
filter: drop-shadow(0 0 3px var(--gauge-color));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.circle-label {
|
|
59
|
+
position: absolute;
|
|
60
|
+
font-size: 0.85rem;
|
|
61
|
+
font-weight: 800;
|
|
62
|
+
color: var(--c-text-1, #fff);
|
|
63
|
+
font-family: inherit;
|
|
64
|
+
}
|
|
22
65
|
</style>
|
|
@@ -1,18 +1,81 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* ConfettiFeedback — A celebration component that triggers a falling confetti animation.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} label - Text to display briefly before/during confetti. Default is "Success!".
|
|
6
|
+
* @param {string} color - Primary color of the confetti pieces. Default is 'var(--c-primary)'.
|
|
7
|
+
* @param {boolean} active - If true, starts the animation immediately. Default is true.
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
label?: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { label = "Success!", color = 'var(--c-primary, #6366f1)', active = true } = Astro.props;
|
|
2
16
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
17
|
+
|
|
18
|
+
<div class:list={["confetti-trigger", { "confetti-trigger--active": active }]}>
|
|
19
|
+
<span class="confetti-label">{label}</span>
|
|
20
|
+
<div class="confetti-container" aria-hidden="true" style={`--confetti-color: ${color}`}>
|
|
21
|
+
{Array.from({ length: 12 }).map((_, i) => (
|
|
22
|
+
<div
|
|
23
|
+
class="confetti-piece"
|
|
24
|
+
style={`--l: ${Math.random() * 100}%; --d: ${Math.random() * 2}s; --r: ${Math.random() * 360}deg; --s: ${0.5 + Math.random()} `}
|
|
25
|
+
></div>
|
|
26
|
+
))}
|
|
9
27
|
</div>
|
|
10
28
|
</div>
|
|
29
|
+
|
|
11
30
|
<style>
|
|
12
|
-
.confetti-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
.confetti-trigger {
|
|
32
|
+
position: relative;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: center;
|
|
36
|
+
padding: var(--sp-4, 1rem);
|
|
37
|
+
width: fit-content;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.confetti-label {
|
|
42
|
+
font-size: 1.25rem;
|
|
43
|
+
font-weight: 800;
|
|
44
|
+
color: var(--c-text-1, #fff);
|
|
45
|
+
z-index: 1;
|
|
46
|
+
text-shadow: 0 4px 10px rgba(0,0,0,0.3);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.confetti-container {
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: 0;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transition: opacity 0.3s;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.confetti-trigger--active .confetti-container { opacity: 1; }
|
|
58
|
+
|
|
59
|
+
.confetti-piece {
|
|
60
|
+
position: absolute;
|
|
61
|
+
left: var(--l);
|
|
62
|
+
top: -20px;
|
|
63
|
+
width: 10px; height: 10px;
|
|
64
|
+
background: var(--confetti-color);
|
|
65
|
+
border-radius: 2px;
|
|
66
|
+
transform: rotate(var(--r)) scale(var(--s));
|
|
67
|
+
opacity: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.confetti-trigger--active .confetti-piece {
|
|
71
|
+
animation: confetti-fall 2.5s linear infinite var(--d);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@keyframes confetti-fall {
|
|
75
|
+
0% { transform: translateY(0) rotate(0deg) scale(var(--s)); opacity: 1; }
|
|
76
|
+
25% { transform: translateY(40px) rotate(90deg) translateX(10px); }
|
|
77
|
+
50% { transform: translateY(80px) rotate(180deg) translateX(-10px); }
|
|
78
|
+
75% { transform: translateY(120px) rotate(270deg) translateX(5px); }
|
|
79
|
+
100% { transform: translateY(160px) rotate(360deg); opacity: 0; }
|
|
17
80
|
}
|
|
18
81
|
</style>
|
|
@@ -1,11 +1,74 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* CyberGlitchAlert — A loud, high-contrast alert box with a CSS glitch animation effect.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} message - Primary alert text. Default is "CRITICAL ERROR".
|
|
6
|
+
* @param {string} accentColor - The secondary glitch shadow color. Default is '#00e0ff'.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
message?: string;
|
|
10
|
+
accentColor?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { message = "CRITICAL ERROR", accentColor = "#00e0ff" } = Astro.props;
|
|
2
14
|
---
|
|
3
|
-
|
|
4
|
-
|
|
15
|
+
|
|
16
|
+
<div class="glitch-alert" role="alert" style={`--glitch-accent: ${accentColor}`}>
|
|
17
|
+
<span class="glitch-text" data-text={message}>{message}</span>
|
|
5
18
|
</div>
|
|
19
|
+
|
|
6
20
|
<style>
|
|
7
|
-
.glitch-alert {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
21
|
+
.glitch-alert {
|
|
22
|
+
background: var(--c-primary, #ff003c);
|
|
23
|
+
padding: var(--sp-6, 1.5rem);
|
|
24
|
+
border: 3px solid var(--c-text-1, #fff);
|
|
25
|
+
position: relative;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
width: 100%;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.glitch-text {
|
|
33
|
+
font-family: 'Courier New', Courier, monospace;
|
|
34
|
+
font-weight: 900;
|
|
35
|
+
color: var(--c-text-1, #fff);
|
|
36
|
+
font-size: 1.25rem;
|
|
37
|
+
display: block;
|
|
38
|
+
text-align: center;
|
|
39
|
+
position: relative;
|
|
40
|
+
letter-spacing: 0.1em;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.glitch-text::before,
|
|
44
|
+
.glitch-text::after {
|
|
45
|
+
content: attr(data-text);
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 0; left: 0;
|
|
48
|
+
width: 100%; height: 100%;
|
|
49
|
+
background: var(--c-primary, #ff003c);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.glitch-text::before {
|
|
53
|
+
left: 2px;
|
|
54
|
+
text-shadow: -2px 0 var(--glitch-accent);
|
|
55
|
+
clip: rect(44px, 450px, 56px, 0);
|
|
56
|
+
animation: glitch-anim 2s infinite linear alternate-reverse;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.glitch-text::after {
|
|
60
|
+
left: -2px;
|
|
61
|
+
text-shadow: -2px 0 #fff;
|
|
62
|
+
clip: rect(12px, 450px, 80px, 0);
|
|
63
|
+
animation: glitch-anim 3s infinite linear alternate-reverse;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes glitch-anim {
|
|
67
|
+
0% { clip: rect(10px, 9999px, 30px, 0); }
|
|
68
|
+
20% { clip: rect(40px, 9999px, 60px, 0); }
|
|
69
|
+
40% { clip: rect(70px, 9999px, 10px, 0); }
|
|
70
|
+
60% { clip: rect(20px, 9999px, 50px, 0); }
|
|
71
|
+
80% { clip: rect(90px, 9999px, 20px, 0); }
|
|
72
|
+
100% { clip: rect(50px, 9999px, 80px, 0); }
|
|
73
|
+
}
|
|
11
74
|
</style>
|
|
@@ -1,13 +1,61 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* EmptyStateCard — A placeholder component for empty views or failed searches.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} icon - The emoji or symbol to display. Default is '📁'.
|
|
6
|
+
* @param {string} title - The primary bold headline. Default is 'No results found'.
|
|
7
|
+
* @param {string} message - Supporting descriptive text.
|
|
8
|
+
* @param {string} ctaLabel - Optional button text for an action.
|
|
9
|
+
*/
|
|
10
|
+
interface Props {
|
|
11
|
+
icon?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
ctaLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
icon = "📁",
|
|
19
|
+
title = "No results found",
|
|
20
|
+
message = "Try adjusting your filters or adding a new item.",
|
|
21
|
+
ctaLabel
|
|
22
|
+
} = Astro.props;
|
|
2
23
|
---
|
|
24
|
+
|
|
3
25
|
<div class="empty-state">
|
|
4
|
-
<div class="
|
|
5
|
-
<h4>
|
|
6
|
-
<p>
|
|
26
|
+
<div class="empty-state__icon" aria-hidden="true">{icon}</div>
|
|
27
|
+
<h4 class="empty-state__title">{title}</h4>
|
|
28
|
+
<p class="empty-state__message">{message}</p>
|
|
29
|
+
{ctaLabel && <button class="empty-state__btn" type="button">{ctaLabel}</button>}
|
|
7
30
|
</div>
|
|
31
|
+
|
|
8
32
|
<style>
|
|
9
|
-
.empty-state {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
33
|
+
.empty-state {
|
|
34
|
+
text-align: center;
|
|
35
|
+
padding: var(--sp-16, 4rem) var(--sp-8, 2rem);
|
|
36
|
+
border: 2px dashed var(--c-border, rgba(255,255,255,0.1));
|
|
37
|
+
border-radius: var(--r-xl, 24px);
|
|
38
|
+
color: var(--c-text-2, #94a3b8);
|
|
39
|
+
background: var(--c-bg-elev, rgba(255,255,255,0.02));
|
|
40
|
+
width: 100%;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.empty-state__icon { font-size: 3.5rem; margin-bottom: var(--sp-4, 1rem); opacity: 0.6; filter: grayscale(0.5); }
|
|
45
|
+
|
|
46
|
+
.empty-state__title { color: var(--c-text-1, #fff); margin: 0; font-size: 1.25rem; font-weight: 700; }
|
|
47
|
+
|
|
48
|
+
.empty-state__message { font-size: 0.95rem; margin-top: 0.75rem; max-width: 320px; margin-inline: auto; line-height: 1.5; }
|
|
49
|
+
|
|
50
|
+
.empty-state__btn {
|
|
51
|
+
margin-top: var(--sp-6, 1.5rem);
|
|
52
|
+
background: var(--c-primary, #6366f1);
|
|
53
|
+
color: #fff; border: none;
|
|
54
|
+
padding: 0.6rem 1.4rem;
|
|
55
|
+
border-radius: var(--r-md, 8px);
|
|
56
|
+
font-weight: 700; cursor: pointer;
|
|
57
|
+
transition: transform 0.2s;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.empty-state__btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
|
|
13
61
|
</style>
|
|
@@ -1,20 +1,66 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* GlassAlert — A translucent feedback bar for displaying situational messages.
|
|
4
|
+
*
|
|
5
|
+
* @param {'info'|'success'|'warning'|'error'} type - The severity or nature of the alert. Default is 'info'.
|
|
6
|
+
* @param {string} title - Bold header text for the alert.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
type?: 'info' | 'success' | 'warning' | 'error';
|
|
10
|
+
title: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
const { type = 'info', title } = Astro.props;
|
|
14
|
+
|
|
15
|
+
const icons = {
|
|
16
|
+
info: "i",
|
|
17
|
+
success: "✓",
|
|
18
|
+
warning: "!",
|
|
19
|
+
error: "✕"
|
|
20
|
+
};
|
|
4
21
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div class="
|
|
8
|
-
|
|
9
|
-
<div class="
|
|
22
|
+
|
|
23
|
+
<div class:list={['glass-alert', `glass-alert--${type}` ]} role="alert">
|
|
24
|
+
<div class="glass-alert__icon" aria-hidden="true">{icons[type]}</div>
|
|
25
|
+
<div class="glass-alert__content">
|
|
26
|
+
<div class="glass-alert__title">{title}</div>
|
|
27
|
+
<div class="glass-alert__body"><slot /></div>
|
|
10
28
|
</div>
|
|
11
29
|
</div>
|
|
30
|
+
|
|
12
31
|
<style>
|
|
13
|
-
.alert {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
32
|
+
.glass-alert {
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: var(--sp-4, 1rem);
|
|
35
|
+
padding: var(--sp-5, 1.25rem);
|
|
36
|
+
border-radius: var(--r-md, 16px);
|
|
37
|
+
border: 1px solid var(--c-border, rgba(255,255,255,0.1));
|
|
38
|
+
backdrop-filter: blur(12px);
|
|
39
|
+
background: var(--c-bg-elev, rgba(255,255,255,0.03));
|
|
40
|
+
width: 100%;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.glass-alert--success { border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.05); }
|
|
45
|
+
.glass-alert--warning { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.05); }
|
|
46
|
+
.glass-alert--error { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); }
|
|
47
|
+
|
|
48
|
+
.glass-alert__icon {
|
|
49
|
+
font-weight: 900;
|
|
50
|
+
background: rgba(255, 255, 255, 0.1);
|
|
51
|
+
width: 24px; height: 24px;
|
|
52
|
+
display: grid; place-items: center;
|
|
53
|
+
border-radius: var(--r-full, 50%);
|
|
54
|
+
font-size: 0.8rem;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
font-family: monospace;
|
|
57
|
+
color: var(--c-text-1, #fff);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.glass-alert--success .glass-alert__icon { background: #10b981; color: #fff; }
|
|
61
|
+
.glass-alert--warning .glass-alert__icon { background: #f59e0b; color: #fff; }
|
|
62
|
+
.glass-alert--error .glass-alert__icon { background: #ef4444; color: #fff; }
|
|
63
|
+
|
|
64
|
+
.glass-alert__title { font-weight: 700; color: var(--c-text-1, #fff); margin-bottom: 2px; font-size: 0.95rem; }
|
|
65
|
+
.glass-alert__body { font-size: 0.85rem; color: var(--c-text-2, #94a3b8); line-height: 1.5; }
|
|
20
66
|
</style>
|