astro-component-kit 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +218 -119
- package/package.json +25 -52
- 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 +9 -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,19 +1,104 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* GlassModal — A premium overlay dialog for critical confirmations or focused interactions.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} id - HTML ID for toggle and script and association.
|
|
6
|
+
* @param {string} title - Header text. Default is "Confirm Action".
|
|
7
|
+
* @param {string} confirmLabel - Label for the primary button. Default is "Confirm".
|
|
8
|
+
* @param {string} cancelLabel - Label for the secondary button. Default is "Cancel".
|
|
9
|
+
*/
|
|
10
|
+
interface Props {
|
|
11
|
+
id: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
confirmLabel?: string;
|
|
14
|
+
cancelLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
id,
|
|
19
|
+
title = "Confirm Action",
|
|
20
|
+
confirmLabel = "Confirm",
|
|
21
|
+
cancelLabel = "Cancel"
|
|
22
|
+
} = Astro.props;
|
|
2
23
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<div class="modal-
|
|
7
|
-
<div class="modal-
|
|
24
|
+
|
|
25
|
+
<dialog id={id} class="modal-dialog">
|
|
26
|
+
<div class="modal-box">
|
|
27
|
+
<div class="modal-header"><h3>{title}</h3></div>
|
|
28
|
+
<div class="modal-body">
|
|
29
|
+
<slot />
|
|
30
|
+
</div>
|
|
31
|
+
<div class="modal-footer">
|
|
32
|
+
<form method="dialog">
|
|
33
|
+
<button class="modal-btn modal-btn--sec" type="submit">{cancelLabel}</button>
|
|
34
|
+
</form>
|
|
35
|
+
<button class="modal-btn modal-btn--pri" data-modal-confirm>{confirmLabel}</button>
|
|
36
|
+
</div>
|
|
8
37
|
</div>
|
|
9
|
-
</
|
|
38
|
+
</dialog>
|
|
39
|
+
|
|
10
40
|
<style>
|
|
11
|
-
.modal-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
41
|
+
.modal-dialog {
|
|
42
|
+
background: transparent;
|
|
43
|
+
border: none;
|
|
44
|
+
padding: 0;
|
|
45
|
+
max-width: 400px;
|
|
46
|
+
width: 100%;
|
|
47
|
+
overflow: visible;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.modal-dialog::backdrop {
|
|
51
|
+
background: rgba(0, 0, 0, 0.4);
|
|
52
|
+
backdrop-filter: blur(8px);
|
|
53
|
+
animation: fade-in 0.3s forwards;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.modal-box {
|
|
57
|
+
background: var(--c-bg-elev, rgba(255,255,255,0.05));
|
|
58
|
+
border: 1px solid var(--c-border, rgba(255,255,255,0.1));
|
|
59
|
+
border-radius: var(--r-xl, 24px);
|
|
60
|
+
padding: var(--sp-8, 2rem);
|
|
61
|
+
box-shadow: 0 30px 100px rgba(0,0,0,0.6);
|
|
62
|
+
color: var(--c-text-1, #fff);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.animate-open { animation: scale-up 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
|
|
66
|
+
|
|
67
|
+
.modal-header h3 { margin: 0 0 var(--sp-4, 1rem); color: var(--c-text-1, #fff); font-size: 1.25rem; }
|
|
68
|
+
|
|
69
|
+
.modal-body { color: var(--c-text-2, #94a3b8); font-size: 0.95rem; line-height: 1.6; }
|
|
70
|
+
|
|
71
|
+
.modal-footer { display: flex; justify-content: flex-end; gap: var(--sp-4, 1rem); margin-top: var(--sp-8, 2rem); }
|
|
72
|
+
|
|
73
|
+
.modal-btn {
|
|
74
|
+
padding: 0.7rem 1.4rem;
|
|
75
|
+
border-radius: var(--r-md, 12px);
|
|
76
|
+
border: none;
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
font-family: inherit;
|
|
80
|
+
transition: 0.2s;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.modal-btn--sec { background: transparent; color: var(--c-text-1, #fff); border: 1px solid var(--c-border, rgba(255,255,255,0.1)); }
|
|
84
|
+
.modal-btn--sec:hover { background: rgba(255,255,255,0.05); }
|
|
85
|
+
|
|
86
|
+
.modal-btn--pri {
|
|
87
|
+
background: var(--c-primary, #6366f1);
|
|
88
|
+
color: #fff;
|
|
89
|
+
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
|
|
90
|
+
}
|
|
91
|
+
.modal-btn--pri:hover { transform: translateY(-2px); filter: brightness(1.1); }
|
|
92
|
+
|
|
93
|
+
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
|
|
94
|
+
@keyframes scale-up { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
|
|
19
95
|
</style>
|
|
96
|
+
|
|
97
|
+
<script>
|
|
98
|
+
// Add simple show/hide logic helper if needed, but <dialog> works natively
|
|
99
|
+
document.querySelectorAll('dialog').forEach(modal => {
|
|
100
|
+
modal.addEventListener('click', (e) => {
|
|
101
|
+
if (e.target === modal) modal.close();
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
@@ -1,10 +1,44 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* GlassProgress — A horizontal linear progress bar with glassmorphism and gradient fill.
|
|
4
|
+
*
|
|
5
|
+
* @param {number} value - The current progress from 0 to 100.
|
|
6
|
+
* @param {string} label - Optional accessible label message.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
value: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { value, label = "Progress bar" } = Astro.props;
|
|
3
14
|
---
|
|
4
|
-
|
|
5
|
-
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
class="progress-container"
|
|
18
|
+
role="progressbar"
|
|
19
|
+
aria-valuenow={value}
|
|
20
|
+
aria-valuemin="0"
|
|
21
|
+
aria-valuemax="100"
|
|
22
|
+
aria-label={label}
|
|
23
|
+
>
|
|
24
|
+
<div class="progress-fill" style={`width: ${Math.min(100, Math.max(0, value))}%`}></div>
|
|
6
25
|
</div>
|
|
26
|
+
|
|
7
27
|
<style>
|
|
8
|
-
.progress-container {
|
|
9
|
-
|
|
28
|
+
.progress-container {
|
|
29
|
+
height: 10px;
|
|
30
|
+
background: var(--c-bg-elev, rgba(255,255,255,0.05));
|
|
31
|
+
border-radius: var(--r-full, 10px);
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
border: 1px solid var(--c-border, rgba(255,255,255,0.1));
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.progress-fill {
|
|
38
|
+
height: 100%;
|
|
39
|
+
background: linear-gradient(90deg, var(--c-primary, #6366f1), var(--c-primary-light, #c084fc));
|
|
40
|
+
border-radius: inherit;
|
|
41
|
+
transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
|
|
42
|
+
box-shadow: 0 0 10px rgba(99,102,241,0.3);
|
|
43
|
+
}
|
|
10
44
|
</style>
|
|
@@ -1,10 +1,63 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* IndicatorBadgeMinimal — A small notification dot typically placed on the corner of an icon or avatar.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} color - CSS color for the indicator dot. Default is 'var(--c-primary)'.
|
|
6
|
+
* @param {string} position - Corner position (top-right|top-left|bottom-right|bottom-left). Default is 'top-right'.
|
|
7
|
+
* @param {boolean} pulse - If true, adds a glowing pulse animation.
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
color?: string;
|
|
11
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
12
|
+
pulse?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
color = 'var(--c-primary, #6366f1)',
|
|
17
|
+
position = 'top-right',
|
|
18
|
+
pulse = false
|
|
19
|
+
} = Astro.props;
|
|
20
|
+
|
|
21
|
+
const positionStyles = {
|
|
22
|
+
'top-right': 'top: 0; right: 0; transform: translate(25%, -25%);',
|
|
23
|
+
'top-left': 'top: 0; left: 0; transform: translate(-25%, -25%);',
|
|
24
|
+
'bottom-right': 'bottom: 0; right: 0; transform: translate(25%, 25%);',
|
|
25
|
+
'bottom-left': 'bottom: 0; left: 0; transform: translate(-25%, 25%);'
|
|
26
|
+
};
|
|
2
27
|
---
|
|
28
|
+
|
|
3
29
|
<div class="indicator-wrap">
|
|
4
30
|
<slot />
|
|
5
|
-
<span
|
|
31
|
+
<span
|
|
32
|
+
class:list={['dot-indicator', { 'dot-indicator--pulse': pulse }]}
|
|
33
|
+
style={`background: ${color}; ${positionStyles[position]}`}
|
|
34
|
+
aria-hidden="true"
|
|
35
|
+
></span>
|
|
6
36
|
</div>
|
|
37
|
+
|
|
7
38
|
<style>
|
|
8
|
-
.indicator-wrap { position: relative; width: fit-content; }
|
|
9
|
-
.dot-indicator {
|
|
39
|
+
.indicator-wrap { position: relative; width: fit-content; display: inline-flex; }
|
|
40
|
+
.dot-indicator {
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: 10px; height: 10px;
|
|
43
|
+
border: 2px solid var(--c-bg, #080b14);
|
|
44
|
+
border-radius: var(--r-full, 50%);
|
|
45
|
+
z-index: 10;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dot-indicator--pulse::after {
|
|
49
|
+
content: "";
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: -2px;
|
|
52
|
+
border-radius: inherit;
|
|
53
|
+
border: 2px solid inherit;
|
|
54
|
+
background: inherit;
|
|
55
|
+
opacity: 0.6;
|
|
56
|
+
animation: indicator-pulse 2s infinite;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes indicator-pulse {
|
|
60
|
+
0% { transform: scale(1); opacity: 0.6; }
|
|
61
|
+
100% { transform: scale(2.5); opacity: 0; }
|
|
62
|
+
}
|
|
10
63
|
</style>
|
|
@@ -1,7 +1,44 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* NeonSpinner — A sleek, glowing loading spinner with customizable color and size.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} color - CSS color for the primary spinning segment. Default is 'var(--c-primary)'.
|
|
6
|
+
* @param {'sm'|'md'|'lg'} size - Predetermined size variant. Default is 'md'.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
color?: string;
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { color = 'var(--c-primary, #6366f1)', size = 'md' } = Astro.props;
|
|
14
|
+
|
|
15
|
+
const dimensions = {
|
|
16
|
+
sm: '24px',
|
|
17
|
+
md: '40px',
|
|
18
|
+
lg: '64px'
|
|
19
|
+
};
|
|
2
20
|
---
|
|
3
|
-
|
|
21
|
+
|
|
22
|
+
<div
|
|
23
|
+
class="neon-spinner"
|
|
24
|
+
style={`--spinner-color: ${color}; --spinner-size: ${dimensions[size]};`}
|
|
25
|
+
role="status"
|
|
26
|
+
aria-label="Loading"
|
|
27
|
+
></div>
|
|
28
|
+
|
|
4
29
|
<style>
|
|
5
|
-
.neon-
|
|
6
|
-
|
|
30
|
+
.neon-spinner {
|
|
31
|
+
width: var(--spinner-size);
|
|
32
|
+
height: var(--spinner-size);
|
|
33
|
+
border: 3px solid var(--c-bg-elev, #111);
|
|
34
|
+
border-top-color: var(--spinner-color);
|
|
35
|
+
border-radius: var(--r-full, 50%);
|
|
36
|
+
animation: neon-spin 0.8s linear infinite;
|
|
37
|
+
filter: drop-shadow(0 0 5px var(--spinner-color));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes neon-spin {
|
|
41
|
+
from { transform: rotate(0deg); }
|
|
42
|
+
to { transform: rotate(360deg); }
|
|
43
|
+
}
|
|
7
44
|
</style>
|
|
@@ -1,12 +1,56 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* PulseDot — A status indicator with a labeled text and a pulsing dot animation.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} label - Text label (e.g. "System Active").
|
|
6
|
+
* @param {string} color - CSS color for the pulse and text. Default is '#34d399' (Success).
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
label: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { label, color = '#34d399' } = Astro.props;
|
|
2
14
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
15
|
+
|
|
16
|
+
<div class="status-wrap" style={`--status-color: ${color};`}>
|
|
17
|
+
<div class="pulse-dot" aria-hidden="true"></div>
|
|
18
|
+
<span class="status-text">{label}</span>
|
|
6
19
|
</div>
|
|
20
|
+
|
|
7
21
|
<style>
|
|
8
|
-
.status-wrap {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
.status-wrap {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--sp-3, 0.6rem);
|
|
26
|
+
color: var(--status-color);
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
font-size: 0.75rem;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
letter-spacing: 0.05em;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pulse-dot {
|
|
34
|
+
width: 8px;
|
|
35
|
+
height: 8px;
|
|
36
|
+
background: var(--status-color);
|
|
37
|
+
border-radius: var(--r-full, 50%);
|
|
38
|
+
position: relative;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pulse-dot::after {
|
|
42
|
+
content: "";
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: 0;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
border: 2px solid var(--status-color);
|
|
47
|
+
animation: status-pulse 1.8s infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes status-pulse {
|
|
51
|
+
0% { transform: scale(1); opacity: 0.8; }
|
|
52
|
+
100% { transform: scale(3.5); opacity: 0; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.status-text { white-space: nowrap; }
|
|
12
56
|
</style>
|
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* RatingPill — A compact badge displaying a numeric score or rating stars.
|
|
4
|
+
*
|
|
5
|
+
* @param {number} score - The rating value (0 to 5).
|
|
6
|
+
* @param {boolean} showStar - If true, displays a star icon suffix. Default is true.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
score: number;
|
|
10
|
+
showStar?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { score, showStar = true } = Astro.props;
|
|
14
|
+
|
|
15
|
+
const status = score >= 4 ? 'high' : score >= 3 ? 'mid' : 'low';
|
|
4
16
|
---
|
|
5
|
-
|
|
6
|
-
|
|
17
|
+
|
|
18
|
+
<div class:list={["rate-pill", `rate-pill--${status}`]}>
|
|
19
|
+
<span class="rate-pill__val">{score.toFixed(1)}</span>
|
|
20
|
+
{showStar && <span class="rate-pill__star" aria-hidden="true">★</span>}
|
|
7
21
|
</div>
|
|
22
|
+
|
|
8
23
|
<style>
|
|
9
|
-
.rate-pill {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
.rate-pill {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 4px;
|
|
28
|
+
padding: var(--sp-1, 4px) var(--sp-3, 12px);
|
|
29
|
+
border-radius: var(--r-full, 100px);
|
|
30
|
+
font-weight: 800;
|
|
31
|
+
font-size: 0.75rem;
|
|
32
|
+
color: #fff;
|
|
33
|
+
width: fit-content;
|
|
34
|
+
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.rate-pill--high { background: #10b981; }
|
|
38
|
+
.rate-pill--mid { background: #f59e0b; }
|
|
39
|
+
.rate-pill--low { background: #ef4444; }
|
|
40
|
+
|
|
41
|
+
.rate-pill__star { font-size: 0.8rem; margin-top: -1px; }
|
|
42
|
+
.rate-pill__val { font-family: inherit; }
|
|
13
43
|
</style>
|
|
@@ -1,7 +1,48 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* ShakeError — A feedback container that shakes horizontally to indicate failure or invalid input.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} message - The error message to display.
|
|
6
|
+
* @param {boolean} active - If true, triggers the shake animation once.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
message: string;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { message, active = false } = Astro.props;
|
|
2
14
|
---
|
|
3
|
-
|
|
15
|
+
|
|
16
|
+
<div class:list={["shake-box", { "shake-box--active": active }]} role="alert">
|
|
17
|
+
<span class="shake-box__icon" aria-hidden="true">⚠️</span>
|
|
18
|
+
<span class="shake-box__msg">{message}</span>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
4
21
|
<style>
|
|
5
|
-
.shake-box
|
|
6
|
-
|
|
22
|
+
.shake-box {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--sp-3, 0.75rem);
|
|
26
|
+
background: rgba(239, 68, 68, 0.08);
|
|
27
|
+
border: 1px solid var(--c-error, #ef4444);
|
|
28
|
+
color: #f87171;
|
|
29
|
+
padding: var(--sp-4, 1rem);
|
|
30
|
+
border-radius: var(--r-md, 10px);
|
|
31
|
+
text-align: center;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
width: 100%;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.shake-box--active { animation: shake-kb 0.5s cubic-bezier(.36,.07,.19,.97) both; }
|
|
38
|
+
|
|
39
|
+
.shake-box__icon { font-size: 1rem; }
|
|
40
|
+
.shake-box__msg { font-size: 0.9rem; }
|
|
41
|
+
|
|
42
|
+
@keyframes shake-kb {
|
|
43
|
+
10%, 90% { transform: translateX(-1px); }
|
|
44
|
+
20%, 80% { transform: translateX(2px); }
|
|
45
|
+
30%, 50%, 70% { transform: translateX(-4px); }
|
|
46
|
+
40%, 60% { transform: translateX(4px); }
|
|
47
|
+
}
|
|
7
48
|
</style>
|
|
@@ -1,10 +1,59 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* SimpleTooltip — A lightweight hover-based hint for buttons or icons.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} text - The tooltip content text.
|
|
6
|
+
* @param {'top'|'bottom'|'left'|'right'} position - Preferred placement relative to the child. Default is 'top'.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
text: string;
|
|
10
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { text, position = 'top' } = Astro.props;
|
|
2
14
|
---
|
|
3
|
-
|
|
15
|
+
|
|
16
|
+
<div class:list={["tooltip-wrap", `tooltip-wrap--${position}`]} data-tip={text}>
|
|
4
17
|
<slot />
|
|
5
18
|
</div>
|
|
19
|
+
|
|
6
20
|
<style>
|
|
7
|
-
.tooltip-wrap {
|
|
8
|
-
|
|
9
|
-
|
|
21
|
+
.tooltip-wrap {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
cursor: help;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tooltip-wrap::after {
|
|
28
|
+
content: attr(data-tip);
|
|
29
|
+
position: absolute;
|
|
30
|
+
padding: var(--sp-2, 6px) var(--sp-3, 12px);
|
|
31
|
+
background: var(--c-bg-elev, #111);
|
|
32
|
+
color: var(--c-text-1, #fff);
|
|
33
|
+
font-size: 0.72rem;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
border-radius: var(--r-sm, 6px);
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
40
|
+
border: 1px solid var(--c-border, rgba(255,255,255,0.1));
|
|
41
|
+
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
|
|
42
|
+
z-index: 100;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Positions */
|
|
46
|
+
.tooltip-wrap--top::after { bottom: 125%; left: 50%; transform: translateX(-50%) translateY(5px); }
|
|
47
|
+
.tooltip-wrap--bottom::after { top: 125%; left: 50%; transform: translateX(-50%) translateY(-5px); }
|
|
48
|
+
.tooltip-wrap--left::after { right: 125%; top: 50%; transform: translateY(-50%) translateX(5px); }
|
|
49
|
+
.tooltip-wrap--right::after { left: 125%; top: 50%; transform: translateY(-50%) translateX(-5px); }
|
|
50
|
+
|
|
51
|
+
/* Hover States */
|
|
52
|
+
.tooltip-wrap:hover::after {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
.tooltip-wrap--top:hover::after { transform: translateX(-50%) translateY(0); }
|
|
56
|
+
.tooltip-wrap--bottom:hover::after { transform: translateX(-50%) translateY(0); }
|
|
57
|
+
.tooltip-wrap--left:hover::after { transform: translateY(-50%) translateX(0); }
|
|
58
|
+
.tooltip-wrap--right:hover::after { transform: translateY(-50%) translateX(0); }
|
|
10
59
|
</style>
|
|
@@ -1,20 +1,66 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* SkeletonList — Shimmering loading placeholder for lists or feed items.
|
|
4
|
+
*
|
|
5
|
+
* @param {number} count - Number of skeleton items to render. Default is 3.
|
|
6
|
+
*/
|
|
7
|
+
interface Props {
|
|
8
|
+
count?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { count = 3 } = Astro.props;
|
|
2
12
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div class="
|
|
13
|
+
|
|
14
|
+
<div class="skeleton-list" aria-hidden="true">
|
|
15
|
+
{Array.from({ length: count }).map(() => (
|
|
16
|
+
<div class="skeleton-item">
|
|
17
|
+
<div class="skeleton-avatar"></div>
|
|
18
|
+
<div class="skeleton-content">
|
|
19
|
+
<div class="skeleton-line skeleton-line--title"></div>
|
|
20
|
+
<div class="skeleton-line skeleton-line--body"></div>
|
|
21
|
+
</div>
|
|
8
22
|
</div>
|
|
9
23
|
))}
|
|
10
24
|
</div>
|
|
25
|
+
|
|
11
26
|
<style>
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
.skeleton-list { display: flex; flex-direction: column; width: 100%; }
|
|
28
|
+
|
|
29
|
+
.skeleton-item {
|
|
30
|
+
display: flex; gap: var(--sp-4, 1rem);
|
|
31
|
+
padding: var(--sp-4, 1rem) 0;
|
|
32
|
+
border-bottom: 1px solid var(--c-border, rgba(255,255,255,0.05));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.skeleton-avatar {
|
|
36
|
+
width: 48px; height: 48px;
|
|
37
|
+
border-radius: var(--r-full, 50%);
|
|
38
|
+
background: var(--c-bg-elev, rgba(255,255,255,0.05));
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.skeleton-content { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
|
|
43
|
+
|
|
44
|
+
.skeleton-line {
|
|
45
|
+
height: 12px;
|
|
46
|
+
background: var(--c-bg-elev, rgba(255,255,255,0.05));
|
|
47
|
+
border-radius: var(--r-sm, 6px);
|
|
48
|
+
position: relative; overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.skeleton-line--title { width: 40%; height: 14px; }
|
|
52
|
+
.skeleton-line--body { width: 85%; }
|
|
53
|
+
|
|
54
|
+
.skeleton-item div::after {
|
|
55
|
+
content: "";
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: 0;
|
|
58
|
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
|
|
59
|
+
animation: skeleton-shimmer 1.8s infinite;
|
|
60
|
+
transform: translateX(-100%);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes skeleton-shimmer {
|
|
64
|
+
100% { transform: translateX(100%); }
|
|
65
|
+
}
|
|
20
66
|
</style>
|
|
@@ -1,9 +1,54 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Spotlight — A visual emphasis component that dims the page and highlights its children.
|
|
4
|
+
*
|
|
5
|
+
* @param {boolean} active - If true, the spotlight overlay is visible. Default is false.
|
|
6
|
+
* @param {number} opacity - Background overlay opacity (0 to 1). Default is 0.7.
|
|
7
|
+
*/
|
|
8
|
+
interface Props {
|
|
9
|
+
active?: boolean;
|
|
10
|
+
opacity?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { active = false, opacity = 0.7 } = Astro.props;
|
|
2
14
|
---
|
|
3
|
-
|
|
4
|
-
|
|
15
|
+
|
|
16
|
+
<div class:list={["spotlight-wrap", { "spotlight-wrap--active": active }]} style={`--spotlight-opacity: ${opacity};`}>
|
|
17
|
+
<div class="spotlight-content">
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
5
20
|
</div>
|
|
21
|
+
|
|
6
22
|
<style>
|
|
7
|
-
.spotlight {
|
|
8
|
-
|
|
23
|
+
.spotlight-wrap {
|
|
24
|
+
position: relative;
|
|
25
|
+
display: inline-block;
|
|
26
|
+
transition: z-index 0.3s;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.spotlight-wrap--active { z-index: 2000; }
|
|
30
|
+
|
|
31
|
+
.spotlight-wrap--active::after {
|
|
32
|
+
content: "";
|
|
33
|
+
position: fixed;
|
|
34
|
+
inset: 0;
|
|
35
|
+
background: rgba(0,0,0,var(--spotlight-opacity));
|
|
36
|
+
backdrop-filter: blur(4px);
|
|
37
|
+
z-index: -1;
|
|
38
|
+
animation: spotlight-fade 0.3s forwards;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.spotlight-content {
|
|
43
|
+
position: relative;
|
|
44
|
+
border-radius: var(--r-md, 12px);
|
|
45
|
+
transition: transform 0.3s;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.spotlight-wrap--active .spotlight-content {
|
|
49
|
+
transform: scale(1.05);
|
|
50
|
+
box-shadow: 0 0 50px rgba(255,255,255,0.1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes spotlight-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
9
54
|
</style>
|