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,119 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
color?: string;
|
|
4
|
-
href?: string;
|
|
5
|
-
type?: 'button' | 'submit' | 'reset';
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { color = '#6366f1', href, type = 'button', size = 'md', disabled = false } = Astro.props;
|
|
11
|
-
const Tag = href ? 'a' : 'button';
|
|
12
|
-
---
|
|
13
|
-
<Tag
|
|
14
|
-
href={href}
|
|
15
|
-
type={href ? undefined : type}
|
|
16
|
-
disabled={disabled}
|
|
17
|
-
class={`glow-btn glow-btn--${size}`}
|
|
18
|
-
style={`--btn-color: ${color}`}
|
|
19
|
-
>
|
|
20
|
-
<span class="glow-btn__content"><slot /></span>
|
|
21
|
-
</Tag>
|
|
22
|
-
|
|
23
|
-
<style>
|
|
24
|
-
.glow-btn {
|
|
25
|
-
--glow-color: var(--btn-color);
|
|
26
|
-
--glow-opacity: 0.4;
|
|
27
|
-
|
|
28
|
-
display: inline-flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
font-family: var(--font-sans, inherit);
|
|
32
|
-
font-weight: 700;
|
|
33
|
-
letter-spacing: 0.05em;
|
|
34
|
-
text-transform: uppercase;
|
|
35
|
-
color: #fff;
|
|
36
|
-
background: var(--btn-color);
|
|
37
|
-
border: none;
|
|
38
|
-
border-radius: 10px;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
text-decoration: none;
|
|
41
|
-
position: relative;
|
|
42
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
43
|
-
white-space: nowrap;
|
|
44
|
-
user-select: none;
|
|
45
|
-
z-index: 1;
|
|
46
|
-
|
|
47
|
-
/* Layered Glow */
|
|
48
|
-
box-shadow:
|
|
49
|
-
0 0 10px color-mix(in srgb, var(--glow-color), transparent 60%),
|
|
50
|
-
0 0 20px color-mix(in srgb, var(--glow-color), transparent 80%);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.glow-btn__content {
|
|
54
|
-
position: relative;
|
|
55
|
-
z-index: 2;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.glow-btn::before {
|
|
59
|
-
content: '';
|
|
60
|
-
position: absolute;
|
|
61
|
-
inset: -2px;
|
|
62
|
-
background: var(--btn-color);
|
|
63
|
-
border-radius: inherit;
|
|
64
|
-
z-index: -1;
|
|
65
|
-
opacity: 0;
|
|
66
|
-
filter: blur(8px);
|
|
67
|
-
transition: opacity 0.3s ease;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.glow-btn::after {
|
|
71
|
-
content: '';
|
|
72
|
-
position: absolute;
|
|
73
|
-
inset: -8px;
|
|
74
|
-
background: var(--btn-color);
|
|
75
|
-
border-radius: 14px;
|
|
76
|
-
opacity: 0;
|
|
77
|
-
filter: blur(25px);
|
|
78
|
-
transition: opacity 0.4s ease;
|
|
79
|
-
z-index: -2;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.glow-btn:hover:not(:disabled) {
|
|
83
|
-
transform: translateY(-3px) scale(1.03);
|
|
84
|
-
box-shadow:
|
|
85
|
-
0 0 20px color-mix(in srgb, var(--glow-color), transparent 40%),
|
|
86
|
-
0 0 40px color-mix(in srgb, var(--glow-color), transparent 70%);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.glow-btn:hover:not(:disabled)::before {
|
|
90
|
-
opacity: 0.4;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.glow-btn:hover:not(:disabled)::after {
|
|
94
|
-
opacity: 0.7;
|
|
95
|
-
animation: animate-glow 2.5s ease-in-out infinite;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.glow-btn:active:not(:disabled) {
|
|
99
|
-
transform: translateY(1px) scale(0.98);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.glow-btn:disabled {
|
|
103
|
-
opacity: 0.5;
|
|
104
|
-
cursor: not-allowed;
|
|
105
|
-
filter: grayscale(1);
|
|
106
|
-
box-shadow: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@keyframes animate-glow {
|
|
110
|
-
0%, 100% { opacity: 0.5; filter: blur(20px); transform: scale(1); }
|
|
111
|
-
50% { opacity: 0.8; filter: blur(30px); transform: scale(1.1); }
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/* Sizes */
|
|
115
|
-
.glow-btn--sm { padding: 0.5rem 1.4rem; font-size: 0.75rem; }
|
|
116
|
-
.glow-btn--md { padding: 0.8rem 2.2rem; font-size: 0.875rem; }
|
|
117
|
-
.glow-btn--lg { padding: 1.1rem 3rem; font-size: 1rem; }
|
|
118
|
-
</style>
|
|
119
|
-
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
href?: string;
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
5
|
-
color?: string;
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
href,
|
|
12
|
-
type = 'button',
|
|
13
|
-
color = '#6366f1',
|
|
14
|
-
size = 'md',
|
|
15
|
-
disabled = false
|
|
16
|
-
} = Astro.props;
|
|
17
|
-
|
|
18
|
-
const Tag = href ? 'a' : 'button';
|
|
19
|
-
// Create a unique filter ID to avoid conflicts when multiple buttons are on screen
|
|
20
|
-
const filterId = `gooey-${Math.random().toString(36).substr(2, 9)}`;
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<Tag
|
|
24
|
-
href={href}
|
|
25
|
-
type={href ? undefined : type}
|
|
26
|
-
disabled={disabled}
|
|
27
|
-
class={`liquid-btn liquid-btn--${size}`}
|
|
28
|
-
style={`--liquid-color: ${color}`}
|
|
29
|
-
>
|
|
30
|
-
<span class="liquid-btn__text"><slot /></span>
|
|
31
|
-
|
|
32
|
-
<div class="liquid-wrapper">
|
|
33
|
-
<div class="liquid-main"></div>
|
|
34
|
-
<div class="liquid-container">
|
|
35
|
-
<div class="liquid-blob"></div>
|
|
36
|
-
<div class="liquid-blob"></div>
|
|
37
|
-
<div class="liquid-blob"></div>
|
|
38
|
-
<div class="liquid-blob"></div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<svg style="position: absolute; width: 0; height: 0; pointer-events: none;">
|
|
43
|
-
<defs>
|
|
44
|
-
<filter id={filterId}>
|
|
45
|
-
<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
|
|
46
|
-
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -9" result="goo" />
|
|
47
|
-
<feComposite in="SourceGraphic" in2="goo" operator="atop" />
|
|
48
|
-
</filter>
|
|
49
|
-
</defs>
|
|
50
|
-
</svg>
|
|
51
|
-
</Tag>
|
|
52
|
-
|
|
53
|
-
<style define:vars={{ filterId: `url(#${filterId})` }}>
|
|
54
|
-
.liquid-btn {
|
|
55
|
-
position: relative;
|
|
56
|
-
display: inline-flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
background: #080b14;
|
|
60
|
-
color: #fff;
|
|
61
|
-
border: none;
|
|
62
|
-
border-radius: var(--r-md, 14px);
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
text-decoration: none;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
|
|
67
|
-
z-index: 1;
|
|
68
|
-
font-family: var(--font-sans, inherit);
|
|
69
|
-
font-weight: 800;
|
|
70
|
-
letter-spacing: 0.1em;
|
|
71
|
-
text-transform: uppercase;
|
|
72
|
-
user-select: none;
|
|
73
|
-
white-space: nowrap;
|
|
74
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.liquid-btn__text {
|
|
78
|
-
position: relative;
|
|
79
|
-
z-index: 10;
|
|
80
|
-
padding: 0 4px;
|
|
81
|
-
transition: color 0.4s ease;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.liquid-wrapper {
|
|
85
|
-
position: absolute;
|
|
86
|
-
inset: 0;
|
|
87
|
-
z-index: 2;
|
|
88
|
-
pointer-events: none;
|
|
89
|
-
filter: var(--filterId);
|
|
90
|
-
border-radius: inherit;
|
|
91
|
-
/* Subtle base fill */
|
|
92
|
-
opacity: 0.95;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.liquid-main {
|
|
96
|
-
position: absolute;
|
|
97
|
-
bottom: -100%;
|
|
98
|
-
left: 0;
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: 100%;
|
|
101
|
-
background: var(--liquid-color);
|
|
102
|
-
transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.liquid-container {
|
|
106
|
-
position: absolute;
|
|
107
|
-
inset: 0;
|
|
108
|
-
z-index: 3;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.liquid-blob {
|
|
112
|
-
position: absolute;
|
|
113
|
-
top: 100%;
|
|
114
|
-
background: var(--liquid-color);
|
|
115
|
-
border-radius: 50%;
|
|
116
|
-
transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.liquid-blob:nth-child(1) { left: 10%; width: 60px; height: 60px; transition-delay: 0s; }
|
|
120
|
-
.liquid-blob:nth-child(2) { left: 40%; width: 80px; height: 80px; transition-delay: 0.05s; }
|
|
121
|
-
.liquid-blob:nth-child(3) { left: 70%; width: 50px; height: 50px; transition-delay: 0.02s; }
|
|
122
|
-
.liquid-blob:nth-child(4) { left: 30%; width: 70px; height: 70px; transition-delay: 0.08s; }
|
|
123
|
-
|
|
124
|
-
/* Hover States */
|
|
125
|
-
.liquid-btn:hover:not(:disabled) {
|
|
126
|
-
border-color: rgba(255, 255, 255, 0.1);
|
|
127
|
-
transform: translateY(-2px);
|
|
128
|
-
box-shadow: 0 20px 40px -10px color-mix(in srgb, var(--liquid-color), transparent 70%);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.liquid-btn:hover:not(:disabled) .liquid-main {
|
|
132
|
-
transform: translateY(-100%);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.liquid-btn:hover:not(:disabled) .liquid-blob {
|
|
136
|
-
transform: translateY(-180%) scale(1.4);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/* Movement animation for blobs when hovered */
|
|
140
|
-
.liquid-btn:hover:not(:disabled) .liquid-blob:nth-child(odd) {
|
|
141
|
-
animation: liquid-wiggle 3s ease-in-out infinite alternate;
|
|
142
|
-
}
|
|
143
|
-
.liquid-btn:hover:not(:disabled) .liquid-blob:nth-child(even) {
|
|
144
|
-
animation: liquid-wiggle 4s ease-in-out infinite alternate-reverse;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@keyframes liquid-wiggle {
|
|
148
|
-
0% { margin-left: -5px; }
|
|
149
|
-
100% { margin-left: 5px; }
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.liquid-btn:active:not(:disabled) {
|
|
153
|
-
transform: scale(0.96);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.liquid-btn:disabled {
|
|
157
|
-
opacity: 0.4;
|
|
158
|
-
cursor: not-allowed;
|
|
159
|
-
filter: grayscale(1);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* Sizes */
|
|
163
|
-
.liquid-btn--sm { padding: 0.6rem 1.6rem; font-size: 0.8rem; }
|
|
164
|
-
.liquid-btn--md { padding: 0.9rem 2.4rem; font-size: 0.95rem; }
|
|
165
|
-
.liquid-btn--lg { padding: 1.2rem 3.5rem; font-size: 1.1rem; }
|
|
166
|
-
</style>
|
|
167
|
-
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
isLoading?: boolean;
|
|
4
|
-
href?: string;
|
|
5
|
-
type?: 'button' | 'submit' | 'reset';
|
|
6
|
-
variant?: 'primary' | 'secondary' | 'ghost';
|
|
7
|
-
size?: 'sm' | 'md' | 'lg';
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
isLoading = false,
|
|
13
|
-
href,
|
|
14
|
-
type = 'button',
|
|
15
|
-
variant = 'primary',
|
|
16
|
-
size = 'md',
|
|
17
|
-
disabled = false
|
|
18
|
-
} = Astro.props;
|
|
19
|
-
|
|
20
|
-
const Tag = href ? 'a' : 'button';
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<Tag
|
|
24
|
-
href={href}
|
|
25
|
-
type={href ? undefined : type}
|
|
26
|
-
disabled={disabled || isLoading}
|
|
27
|
-
class:list={[
|
|
28
|
-
"load-btn",
|
|
29
|
-
`load-btn--${variant}`,
|
|
30
|
-
`load-btn--${size}`,
|
|
31
|
-
{ "is-loading": isLoading }
|
|
32
|
-
]}
|
|
33
|
-
>
|
|
34
|
-
<span class="load-btn__content">
|
|
35
|
-
<slot />
|
|
36
|
-
</span>
|
|
37
|
-
<span class="load-btn__spinner">
|
|
38
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
39
|
-
<path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"/>
|
|
40
|
-
</svg>
|
|
41
|
-
</span>
|
|
42
|
-
</Tag>
|
|
43
|
-
|
|
44
|
-
<style>
|
|
45
|
-
.load-btn {
|
|
46
|
-
position: relative;
|
|
47
|
-
display: inline-flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
font-family: var(--font-sans, inherit);
|
|
51
|
-
font-weight: 600;
|
|
52
|
-
letter-spacing: 0.02em;
|
|
53
|
-
border-radius: var(--r-md, 12px);
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
text-decoration: none;
|
|
56
|
-
border: 1px solid transparent;
|
|
57
|
-
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
58
|
-
overflow: hidden;
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
user-select: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.load-btn__content {
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
gap: 0.5rem;
|
|
67
|
-
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.load-btn__spinner {
|
|
71
|
-
position: absolute;
|
|
72
|
-
inset: 0;
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
opacity: 0;
|
|
77
|
-
transform: scale(0.5);
|
|
78
|
-
transition: all 0.2s ease;
|
|
79
|
-
pointer-events: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.load-btn__spinner svg {
|
|
83
|
-
width: 1.25em;
|
|
84
|
-
height: 1.25em;
|
|
85
|
-
animation: spin 1s linear infinite;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* Loading State */
|
|
89
|
-
.load-btn.is-loading {
|
|
90
|
-
cursor: wait;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.load-btn.is-loading .load-btn__content {
|
|
94
|
-
opacity: 0;
|
|
95
|
-
transform: translateY(5px);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.load-btn.is-loading .load-btn__spinner {
|
|
99
|
-
opacity: 1;
|
|
100
|
-
transform: scale(1);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@keyframes spin {
|
|
104
|
-
from { transform: rotate(0deg); }
|
|
105
|
-
to { transform: rotate(360deg); }
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* Variants */
|
|
109
|
-
.load-btn--primary {
|
|
110
|
-
background: var(--c-primary, #6366f1);
|
|
111
|
-
color: #fff;
|
|
112
|
-
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
|
|
113
|
-
}
|
|
114
|
-
.load-btn--primary:hover:not(:disabled) {
|
|
115
|
-
background: var(--c-primary-light, #818cf8);
|
|
116
|
-
transform: translateY(-1px);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.load-btn--secondary {
|
|
120
|
-
background: rgba(255, 255, 255, 0.05);
|
|
121
|
-
color: var(--c-text-1, #f8fafc);
|
|
122
|
-
border-color: var(--c-border, rgba(255, 255, 255, 0.1));
|
|
123
|
-
}
|
|
124
|
-
.load-btn--secondary:hover:not(:disabled) {
|
|
125
|
-
background: rgba(255, 255, 255, 0.08);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.load-btn--ghost {
|
|
129
|
-
background: transparent;
|
|
130
|
-
color: var(--c-primary-light, #818cf8);
|
|
131
|
-
border-color: rgba(99, 102, 241, 0.3);
|
|
132
|
-
}
|
|
133
|
-
.load-btn--ghost:hover:not(:disabled) {
|
|
134
|
-
background: rgba(99, 102, 241, 0.05);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* Sizes / Layout */
|
|
138
|
-
.load-btn--sm { padding: 0.45rem 1rem; font-size: 0.825rem; min-width: 100px; }
|
|
139
|
-
.load-btn--md { padding: 0.75rem 1.6rem; font-size: 0.95rem; min-width: 140px; }
|
|
140
|
-
.load-btn--lg { padding: 1rem 2.2rem; font-size: 1.1rem; min-width: 180px; }
|
|
141
|
-
|
|
142
|
-
.load-btn:disabled {
|
|
143
|
-
opacity: 0.5;
|
|
144
|
-
cursor: not-allowed;
|
|
145
|
-
filter: grayscale(1);
|
|
146
|
-
}
|
|
147
|
-
</style>
|
|
148
|
-
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
href?: string;
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
5
|
-
variant?: 'primary' | 'secondary' | 'ghost';
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
strength?: number;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
href,
|
|
13
|
-
type = 'button',
|
|
14
|
-
variant = 'secondary',
|
|
15
|
-
size = 'md',
|
|
16
|
-
strength = 0.5,
|
|
17
|
-
disabled = false
|
|
18
|
-
} = Astro.props;
|
|
19
|
-
|
|
20
|
-
const Tag = href ? 'a' : 'button';
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<Tag
|
|
24
|
-
href={href}
|
|
25
|
-
type={href ? undefined : type}
|
|
26
|
-
disabled={disabled}
|
|
27
|
-
class={`magnetic-btn magnetic-btn--${variant} magnetic-btn--${size}`}
|
|
28
|
-
data-strength={strength}
|
|
29
|
-
>
|
|
30
|
-
<span class="magnetic-btn__inner">
|
|
31
|
-
<slot />
|
|
32
|
-
</span>
|
|
33
|
-
</Tag>
|
|
34
|
-
|
|
35
|
-
<style>
|
|
36
|
-
.magnetic-btn {
|
|
37
|
-
display: inline-flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
padding: 0;
|
|
41
|
-
border: none;
|
|
42
|
-
border-radius: var(--r-full, 9999px);
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
text-decoration: none;
|
|
45
|
-
position: relative;
|
|
46
|
-
transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
|
|
47
|
-
user-select: none;
|
|
48
|
-
font-family: var(--font-sans, inherit);
|
|
49
|
-
font-weight: 600;
|
|
50
|
-
white-space: nowrap;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.magnetic-btn__inner {
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
width: 100%;
|
|
58
|
-
height: 100%;
|
|
59
|
-
transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
|
|
60
|
-
pointer-events: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Variants */
|
|
64
|
-
.magnetic-btn--primary {
|
|
65
|
-
background: var(--c-primary, #6366f1);
|
|
66
|
-
color: #fff;
|
|
67
|
-
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.magnetic-btn--secondary {
|
|
71
|
-
background: rgba(255, 255, 255, 0.05);
|
|
72
|
-
backdrop-filter: blur(12px);
|
|
73
|
-
color: var(--c-text-1, #f8fafc);
|
|
74
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.magnetic-btn--ghost {
|
|
78
|
-
background: transparent;
|
|
79
|
-
color: var(--c-primary-light, #818cf8);
|
|
80
|
-
border: 1px solid rgba(99, 102, 241, 0.3);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.magnetic-btn:hover:not(:disabled) {
|
|
84
|
-
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.magnetic-btn:disabled {
|
|
88
|
-
opacity: 0.5;
|
|
89
|
-
cursor: not-allowed;
|
|
90
|
-
filter: grayscale(1);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Sizes */
|
|
94
|
-
.magnetic-btn--sm { min-width: 80px; min-height: 40px; }
|
|
95
|
-
.magnetic-btn--sm .magnetic-btn__inner { padding: 0.5rem 1.2rem; font-size: 0.8rem; }
|
|
96
|
-
|
|
97
|
-
.magnetic-btn--md { min-width: 120px; min-height: 50px; }
|
|
98
|
-
.magnetic-btn--md .magnetic-btn__inner { padding: 0.8rem 1.8rem; font-size: 0.95rem; }
|
|
99
|
-
|
|
100
|
-
.magnetic-btn--lg { min-width: 160px; min-height: 64px; }
|
|
101
|
-
.magnetic-btn--lg .magnetic-btn__inner { padding: 1.1rem 2.5rem; font-size: 1.1rem; }
|
|
102
|
-
</style>
|
|
103
|
-
|
|
104
|
-
<script>
|
|
105
|
-
function initMagnetic() {
|
|
106
|
-
const btns = document.querySelectorAll('.magnetic-btn:not([data-magnetic-init])');
|
|
107
|
-
|
|
108
|
-
btns.forEach(btn => {
|
|
109
|
-
btn.setAttribute('data-magnetic-init', 'true');
|
|
110
|
-
const inner = btn.querySelector('.magnetic-btn__inner') as HTMLElement;
|
|
111
|
-
const strengthAttr = btn.getAttribute('data-strength');
|
|
112
|
-
const strength = strengthAttr ? parseFloat(strengthAttr) : 0.5;
|
|
113
|
-
|
|
114
|
-
btn.addEventListener('mousemove', (e: any) => {
|
|
115
|
-
const rect = btn.getBoundingClientRect();
|
|
116
|
-
const x = (e.clientX - rect.left - rect.width / 2) * strength;
|
|
117
|
-
const y = (e.clientY - rect.top - rect.height / 2) * strength;
|
|
118
|
-
|
|
119
|
-
(btn as HTMLElement).style.transform = `translate(${x}px, ${y}px)`;
|
|
120
|
-
if (inner) inner.style.transform = `translate(${x * 0.4}px, ${y * 0.4}px)`;
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
btn.addEventListener('mouseleave', () => {
|
|
124
|
-
(btn as HTMLElement).style.transform = `translate(0px, 0px)`;
|
|
125
|
-
if (inner) inner.style.transform = `translate(0px, 0px)`;
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Initial and view transition support
|
|
131
|
-
initMagnetic();
|
|
132
|
-
document.addEventListener('astro:after-swap', initMagnetic);
|
|
133
|
-
</script>
|
|
134
|
-
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
href?: string;
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
5
|
-
variant?: 'primary' | 'secondary' | 'ghost';
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
href,
|
|
12
|
-
type = 'button',
|
|
13
|
-
variant = 'primary',
|
|
14
|
-
size = 'md',
|
|
15
|
-
disabled = false
|
|
16
|
-
} = Astro.props;
|
|
17
|
-
|
|
18
|
-
const Tag = href ? 'a' : 'button';
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
<Tag
|
|
22
|
-
href={href}
|
|
23
|
-
type={href ? undefined : type}
|
|
24
|
-
disabled={disabled}
|
|
25
|
-
class={`pill-btn pill-btn--${variant} pill-btn--${size}`}
|
|
26
|
-
>
|
|
27
|
-
<slot />
|
|
28
|
-
</Tag>
|
|
29
|
-
|
|
30
|
-
<style>
|
|
31
|
-
.pill-btn {
|
|
32
|
-
position: relative;
|
|
33
|
-
display: inline-flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
padding: 0.5rem 1.5rem;
|
|
37
|
-
border-radius: var(--r-full, 9999px);
|
|
38
|
-
font-size: 0.85rem;
|
|
39
|
-
font-weight: 500;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
text-decoration: none;
|
|
42
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
43
|
-
user-select: none;
|
|
44
|
-
white-space: nowrap;
|
|
45
|
-
border: 1px solid transparent;
|
|
46
|
-
font-family: var(--font-sans, inherit);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.pill-btn:hover:not(:disabled) {
|
|
50
|
-
transform: translateY(-1px);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.pill-btn:active:not(:disabled) {
|
|
54
|
-
transform: translateY(0);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.pill-btn:disabled {
|
|
58
|
-
opacity: 0.5;
|
|
59
|
-
cursor: not-allowed;
|
|
60
|
-
filter: grayscale(1);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Variants */
|
|
64
|
-
.pill-btn--primary {
|
|
65
|
-
background: rgba(255, 255, 255, 0.05);
|
|
66
|
-
color: var(--c-text-2, #94a3b8);
|
|
67
|
-
border-color: rgba(255, 255, 255, 0.1);
|
|
68
|
-
}
|
|
69
|
-
.pill-btn--primary:hover:not(:disabled) {
|
|
70
|
-
background: #fff;
|
|
71
|
-
color: #000;
|
|
72
|
-
border-color: #fff;
|
|
73
|
-
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.pill-btn--secondary {
|
|
77
|
-
background: var(--c-primary, #6366f1);
|
|
78
|
-
color: #fff;
|
|
79
|
-
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
|
|
80
|
-
}
|
|
81
|
-
.pill-btn--secondary:hover:not(:disabled) {
|
|
82
|
-
background: var(--c-primary-light, #818cf8);
|
|
83
|
-
box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.pill-btn--ghost {
|
|
87
|
-
background: transparent;
|
|
88
|
-
color: var(--c-text-2, #94a3b8);
|
|
89
|
-
border-color: rgba(255, 255, 255, 0.1);
|
|
90
|
-
}
|
|
91
|
-
.pill-btn--ghost:hover:not(:disabled) {
|
|
92
|
-
background: rgba(255, 255, 255, 0.05);
|
|
93
|
-
color: #fff;
|
|
94
|
-
border-color: rgba(255, 255, 255, 0.3);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Sizes */
|
|
98
|
-
.pill-btn--sm { padding: 0.35rem 1.2rem; font-size: 0.75rem; }
|
|
99
|
-
.pill-btn--md { padding: 0.55rem 1.6rem; font-size: 0.85rem; }
|
|
100
|
-
.pill-btn--lg { padding: 0.8rem 2.2rem; font-size: 1rem; }
|
|
101
|
-
</style>
|
|
102
|
-
|