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,158 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
href?: string;
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
5
|
-
baseColor?: string;
|
|
6
|
-
variant?: 'convex' | 'concave';
|
|
7
|
-
size?: 'sm' | 'md' | 'lg';
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
href,
|
|
13
|
-
type = 'button',
|
|
14
|
-
baseColor = 'var(--c-bg-2, #111827)',
|
|
15
|
-
variant = 'convex',
|
|
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}
|
|
27
|
-
class={`neu-btn neu-btn--${size} neu-btn--${variant}`}
|
|
28
|
-
style={`--base-color: ${baseColor}`}
|
|
29
|
-
>
|
|
30
|
-
<span class="neu-btn__surface">
|
|
31
|
-
<slot />
|
|
32
|
-
</span>
|
|
33
|
-
</Tag>
|
|
34
|
-
|
|
35
|
-
<style>
|
|
36
|
-
.neu-btn {
|
|
37
|
-
/* Design Tokens */
|
|
38
|
-
--distance: 8px;
|
|
39
|
-
--blur: 16px;
|
|
40
|
-
--shadow-opacity: 0.4;
|
|
41
|
-
--highlight-opacity: 0.05;
|
|
42
|
-
|
|
43
|
-
/* Derived Colors */
|
|
44
|
-
--shadow-dark: rgba(0, 0, 0, var(--shadow-opacity));
|
|
45
|
-
--shadow-light: rgba(255, 255, 255, var(--highlight-opacity));
|
|
46
|
-
--surface-light: color-mix(in srgb, var(--base-color), white 4%);
|
|
47
|
-
--surface-dark: color-mix(in srgb, var(--base-color), black 4%);
|
|
48
|
-
|
|
49
|
-
position: relative;
|
|
50
|
-
display: inline-flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
padding: 0;
|
|
54
|
-
border: none;
|
|
55
|
-
background: transparent;
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
text-decoration: none;
|
|
58
|
-
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
59
|
-
font-family: var(--font-sans, inherit);
|
|
60
|
-
font-weight: 700;
|
|
61
|
-
letter-spacing: 0.3px;
|
|
62
|
-
color: var(--c-text-1, #f1f5f9);
|
|
63
|
-
border-radius: var(--r-xl, 20px);
|
|
64
|
-
user-select: none;
|
|
65
|
-
white-space: nowrap;
|
|
66
|
-
outline: none;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.neu-btn__surface {
|
|
70
|
-
position: relative;
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: center;
|
|
74
|
-
width: 100%;
|
|
75
|
-
height: 100%;
|
|
76
|
-
padding: inherit;
|
|
77
|
-
border-radius: inherit;
|
|
78
|
-
background: linear-gradient(145deg, var(--surface-light), var(--surface-dark));
|
|
79
|
-
z-index: 2;
|
|
80
|
-
transition: background 0.4s ease, box-shadow 0.4s ease;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* Rim Light highlight */
|
|
84
|
-
.neu-btn__surface::before {
|
|
85
|
-
content: '';
|
|
86
|
-
position: absolute;
|
|
87
|
-
inset: 0.5px;
|
|
88
|
-
border-radius: inherit;
|
|
89
|
-
padding: 1px;
|
|
90
|
-
background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 50%, rgba(0,0,0,0.1));
|
|
91
|
-
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
92
|
-
mask-composite: exclude;
|
|
93
|
-
pointer-events: none;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* Convex Variant (Default) */
|
|
97
|
-
.neu-btn--convex {
|
|
98
|
-
box-shadow:
|
|
99
|
-
var(--distance) var(--distance) var(--blur) var(--shadow-dark),
|
|
100
|
-
calc(var(--distance) * -0.6) calc(var(--distance) * -0.6) var(--blur) var(--shadow-light);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/* Concave Variant */
|
|
104
|
-
.neu-btn--concave .neu-btn__surface {
|
|
105
|
-
background: var(--base-color);
|
|
106
|
-
box-shadow:
|
|
107
|
-
inset var(--distance) var(--distance) var(--blur) var(--shadow-dark),
|
|
108
|
-
inset calc(var(--distance) * -0.5) calc(var(--distance) * -0.5) var(--blur) var(--shadow-light);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/* Hover States */
|
|
112
|
-
.neu-btn:hover:not(:disabled) {
|
|
113
|
-
transform: translateY(-2px);
|
|
114
|
-
filter: brightness(1.08);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.neu-btn--convex:hover:not(:disabled) {
|
|
118
|
-
box-shadow:
|
|
119
|
-
calc(var(--distance) * 1.4) calc(var(--distance) * 1.4) calc(var(--blur) * 1.4) var(--shadow-dark),
|
|
120
|
-
calc(var(--distance) * -0.8) calc(var(--distance) * -0.8) calc(var(--blur) * 1.4) var(--shadow-light);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Active/Pressed States */
|
|
124
|
-
.neu-btn:active:not(:disabled) {
|
|
125
|
-
transform: translateY(0) scale(0.97);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.neu-btn--convex:active:not(:disabled) .neu-btn__surface {
|
|
129
|
-
background: var(--base-color);
|
|
130
|
-
box-shadow:
|
|
131
|
-
inset calc(var(--distance) * 0.5) calc(var(--distance) * 0.5) calc(var(--blur) * 0.5) var(--shadow-dark),
|
|
132
|
-
inset calc(var(--distance) * -0.3) calc(var(--distance) * -0.3) calc(var(--blur) * 0.5) var(--shadow-light);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.neu-btn:disabled {
|
|
136
|
-
opacity: 0.4;
|
|
137
|
-
cursor: not-allowed;
|
|
138
|
-
filter: grayscale(1);
|
|
139
|
-
box-shadow: none;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* Sizes */
|
|
143
|
-
.neu-btn--sm { padding: 0.5rem 1.4rem; font-size: 0.85rem; --distance: 4px; --blur: 8px; }
|
|
144
|
-
.neu-btn--md { padding: 0.85rem 2.4rem; font-size: 1rem; }
|
|
145
|
-
.neu-btn--lg { padding: 1.2rem 3.5rem; font-size: 1.2rem; --distance: 12px; --blur: 24px; }
|
|
146
|
-
|
|
147
|
-
/* Color scheme adjustments */
|
|
148
|
-
@media (prefers-color-scheme: light) {
|
|
149
|
-
.neu-btn {
|
|
150
|
-
--shadow-opacity: 0.15;
|
|
151
|
-
--highlight-opacity: 0.8;
|
|
152
|
-
--shadow-dark: rgba(163, 177, 198, var(--shadow-opacity));
|
|
153
|
-
--shadow-light: rgba(255, 255, 255, var(--highlight-opacity));
|
|
154
|
-
color: #374151;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
</style>
|
|
158
|
-
|
|
@@ -1,111 +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
|
-
color?: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
href,
|
|
13
|
-
type = 'button',
|
|
14
|
-
variant = 'primary',
|
|
15
|
-
size = 'md',
|
|
16
|
-
color = '#8b5cf6',
|
|
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={`pulse-btn pulse-btn--${variant} pulse-btn--${size}`}
|
|
28
|
-
style={`--pulse-color: ${color}`}
|
|
29
|
-
>
|
|
30
|
-
<slot />
|
|
31
|
-
</Tag>
|
|
32
|
-
|
|
33
|
-
<style>
|
|
34
|
-
.pulse-btn {
|
|
35
|
-
position: relative;
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
padding: 0.7rem 1.6rem;
|
|
40
|
-
background: var(--pulse-color);
|
|
41
|
-
color: white;
|
|
42
|
-
border: none;
|
|
43
|
-
border-radius: var(--r-full, 9999px);
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
text-decoration: none;
|
|
46
|
-
font-weight: 600;
|
|
47
|
-
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
48
|
-
user-select: none;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
font-family: var(--font-sans, inherit);
|
|
51
|
-
isolation: isolate;
|
|
52
|
-
box-shadow: 0 10px 26px -18px color-mix(in srgb, var(--pulse-color), black 10%);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.pulse-btn::after {
|
|
56
|
-
content: '';
|
|
57
|
-
position: absolute;
|
|
58
|
-
inset: 0;
|
|
59
|
-
border-radius: inherit;
|
|
60
|
-
box-shadow: 0 0 0 0 var(--pulse-color);
|
|
61
|
-
animation: pulse-ring 2s infinite;
|
|
62
|
-
z-index: -1;
|
|
63
|
-
pointer-events: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@keyframes pulse-ring {
|
|
67
|
-
0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pulse-color), transparent 30%); }
|
|
68
|
-
70% { box-shadow: 0 0 0 15px color-mix(in srgb, var(--pulse-color), transparent 100%); }
|
|
69
|
-
100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pulse-color), transparent 100%); }
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.pulse-btn:hover:not(:disabled) {
|
|
73
|
-
transform: scale(1.05);
|
|
74
|
-
filter: brightness(110%);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.pulse-btn:active:not(:disabled) {
|
|
78
|
-
transform: scale(0.98);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.pulse-btn:disabled {
|
|
82
|
-
opacity: 0.5;
|
|
83
|
-
cursor: not-allowed;
|
|
84
|
-
animation: none;
|
|
85
|
-
filter: grayscale(1);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.pulse-btn:disabled::after {
|
|
89
|
-
animation: none;
|
|
90
|
-
box-shadow: none;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Variants */
|
|
94
|
-
.pulse-btn--secondary {
|
|
95
|
-
background: #0f172a;
|
|
96
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
97
|
-
box-shadow: 0 10px 26px -20px rgba(15, 23, 42, 0.95);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.pulse-btn--ghost {
|
|
101
|
-
background: transparent;
|
|
102
|
-
border: 1px solid var(--pulse-color);
|
|
103
|
-
color: var(--pulse-color);
|
|
104
|
-
box-shadow: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Sizes */
|
|
108
|
-
.pulse-btn--sm { padding: 0.4rem 1.1rem; font-size: 0.8rem; }
|
|
109
|
-
.pulse-btn--md { padding: 0.7rem 1.6rem; font-size: 0.95rem; }
|
|
110
|
-
.pulse-btn--lg { padding: 1rem 2.2rem; font-size: 1.1rem; }
|
|
111
|
-
</style>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
href?: string;
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
5
|
-
variant?: 'yellow' | 'red' | 'blue' | 'green';
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
href,
|
|
12
|
-
type = 'button',
|
|
13
|
-
variant = 'yellow',
|
|
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={`retro-arcade-btn retro-arcade-btn--${variant} retro-arcade-btn--${size}`}
|
|
26
|
-
>
|
|
27
|
-
<span class="retro-arcade-btn__inner">
|
|
28
|
-
<slot />
|
|
29
|
-
</span>
|
|
30
|
-
</Tag>
|
|
31
|
-
|
|
32
|
-
<style>
|
|
33
|
-
.retro-arcade-btn {
|
|
34
|
-
--pixel-size: 4px;
|
|
35
|
-
--main-color: #facc15;
|
|
36
|
-
--shadow-color: #a16207;
|
|
37
|
-
|
|
38
|
-
position: relative;
|
|
39
|
-
display: inline-flex;
|
|
40
|
-
padding: 0;
|
|
41
|
-
background: #000;
|
|
42
|
-
border: none;
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
text-decoration: none;
|
|
45
|
-
box-shadow:
|
|
46
|
-
var(--pixel-size) 0 #000,
|
|
47
|
-
calc(var(--pixel-size) * -1) 0 #000,
|
|
48
|
-
0 var(--pixel-size) #000,
|
|
49
|
-
0 calc(var(--pixel-size) * -1) #000;
|
|
50
|
-
transition: transform 0.1s;
|
|
51
|
-
user-select: none;
|
|
52
|
-
margin: var(--pixel-size);
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.retro-arcade-btn__inner {
|
|
57
|
-
display: block;
|
|
58
|
-
padding: 0.6rem 1.4rem;
|
|
59
|
-
background: var(--main-color);
|
|
60
|
-
color: #000;
|
|
61
|
-
font-family: 'Courier New', monospace;
|
|
62
|
-
font-weight: 900;
|
|
63
|
-
text-transform: uppercase;
|
|
64
|
-
box-shadow:
|
|
65
|
-
inset calc(var(--pixel-size) * -1) calc(var(--pixel-size) * -1) var(--shadow-color);
|
|
66
|
-
transition: all 0.1s;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* Interaction */
|
|
70
|
-
.retro-arcade-btn:hover:not(:disabled) .retro-arcade-btn__inner {
|
|
71
|
-
filter: brightness(110%);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.retro-arcade-btn:active:not(:disabled) {
|
|
75
|
-
transform: translate(calc(var(--pixel-size) / 2), calc(var(--pixel-size) / 2));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.retro-arcade-btn:active:not(:disabled) .retro-arcade-btn__inner {
|
|
79
|
-
box-shadow:
|
|
80
|
-
inset var(--pixel-size) var(--pixel-size) var(--shadow-color);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.retro-arcade-btn:disabled {
|
|
84
|
-
opacity: 0.6;
|
|
85
|
-
cursor: not-allowed;
|
|
86
|
-
filter: grayscale(1);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Variants */
|
|
90
|
-
.retro-arcade-btn--yellow { --main-color: #facc15; --shadow-color: #a16207; }
|
|
91
|
-
.retro-arcade-btn--red { --main-color: #ef4444; --shadow-color: #991b1b; }
|
|
92
|
-
.retro-arcade-btn--blue { --main-color: #3b82f6; --shadow-color: #1e3a8a; }
|
|
93
|
-
.retro-arcade-btn--green { --main-color: #22c55e; --shadow-color: #14532d; }
|
|
94
|
-
|
|
95
|
-
/* Sizes */
|
|
96
|
-
.retro-arcade-btn--sm { --pixel-size: 2px; }
|
|
97
|
-
.retro-arcade-btn--sm .retro-arcade-btn__inner { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
|
|
98
|
-
|
|
99
|
-
.retro-arcade-btn--md { --pixel-size: 4px; }
|
|
100
|
-
.retro-arcade-btn--md .retro-arcade-btn__inner { padding: 0.7rem 1.4rem; font-size: 0.9rem; }
|
|
101
|
-
|
|
102
|
-
.retro-arcade-btn--lg { --pixel-size: 6px; }
|
|
103
|
-
.retro-arcade-btn--lg .retro-arcade-btn__inner { padding: 1rem 2rem; font-size: 1.1rem; }
|
|
104
|
-
</style>
|
|
105
|
-
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
href?: string;
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
5
|
-
variant?: 'pink' | 'cyan' | 'yellow' | 'lime';
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
href,
|
|
12
|
-
type = 'button',
|
|
13
|
-
variant = 'pink',
|
|
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={`retro-shadow-btn retro-shadow-btn--${variant} retro-shadow-btn--${size}`}
|
|
26
|
-
>
|
|
27
|
-
<slot />
|
|
28
|
-
</Tag>
|
|
29
|
-
|
|
30
|
-
<style>
|
|
31
|
-
.retro-shadow-btn {
|
|
32
|
-
--btn-bg: #ff7eb3;
|
|
33
|
-
--shadow-color: #000;
|
|
34
|
-
--shadow-offset: 6px;
|
|
35
|
-
|
|
36
|
-
position: relative;
|
|
37
|
-
display: inline-flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
background: var(--btn-bg);
|
|
41
|
-
color: #000;
|
|
42
|
-
border: 3px solid #000;
|
|
43
|
-
font-family: var(--font-sans, inherit);
|
|
44
|
-
font-weight: 800;
|
|
45
|
-
text-transform: uppercase;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
text-decoration: none;
|
|
48
|
-
transition: all 0.1s;
|
|
49
|
-
box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--shadow-color);
|
|
50
|
-
user-select: none;
|
|
51
|
-
white-space: nowrap;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.retro-shadow-btn:hover:not(:disabled) {
|
|
55
|
-
transform: translate(calc(var(--shadow-offset) * -0.2), calc(var(--shadow-offset) * -0.2));
|
|
56
|
-
box-shadow: calc(var(--shadow-offset) * 1.2) calc(var(--shadow-offset) * 1.2) 0 var(--shadow-color);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.retro-shadow-btn:active:not(:disabled) {
|
|
60
|
-
transform: translate(calc(var(--shadow-offset) * 0.5), calc(var(--shadow-offset) * 0.5));
|
|
61
|
-
box-shadow: calc(var(--shadow-offset) * 0.5) calc(var(--shadow-offset) * 0.5) 0 var(--shadow-color);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.retro-shadow-btn:disabled {
|
|
65
|
-
opacity: 0.6;
|
|
66
|
-
cursor: not-allowed;
|
|
67
|
-
filter: grayscale(0.5);
|
|
68
|
-
box-shadow: 2px 2px 0 var(--shadow-color);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Variants (90s Palette) */
|
|
72
|
-
.retro-shadow-btn--pink { --btn-bg: #ff7eb3; }
|
|
73
|
-
.retro-shadow-btn--cyan { --btn-bg: #00f5ff; }
|
|
74
|
-
.retro-shadow-btn--yellow { --btn-bg: #fff01f; }
|
|
75
|
-
.retro-shadow-btn--lime { --btn-bg: #bfff00; }
|
|
76
|
-
|
|
77
|
-
/* Sizes */
|
|
78
|
-
.retro-shadow-btn--sm { padding: 0.4rem 1rem; font-size: 0.85rem; --shadow-offset: 4px; border-width: 2px; }
|
|
79
|
-
.retro-shadow-btn--md { padding: 0.7rem 1.6rem; font-size: 1rem; --shadow-offset: 6px; border-width: 3px; }
|
|
80
|
-
.retro-shadow-btn--lg { padding: 1rem 2.2rem; font-size: 1.2rem; --shadow-offset: 8px; border-width: 4px; }
|
|
81
|
-
</style>
|
|
82
|
-
|
|
@@ -1,113 +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={`shimmer-btn shimmer-btn--${variant} shimmer-btn--${size}`}
|
|
26
|
-
>
|
|
27
|
-
<span class="shimmer-btn__content"><slot /></span>
|
|
28
|
-
</Tag>
|
|
29
|
-
|
|
30
|
-
<style>
|
|
31
|
-
.shimmer-btn {
|
|
32
|
-
--shimmer-speed: 3s;
|
|
33
|
-
--shimmer-color: rgba(255, 255, 255, 0.3);
|
|
34
|
-
|
|
35
|
-
position: relative;
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
padding: 0;
|
|
40
|
-
border: none;
|
|
41
|
-
border-radius: var(--r-full, 9999px);
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
text-decoration: none;
|
|
44
|
-
overflow: hidden;
|
|
45
|
-
transition: all 0.3s ease;
|
|
46
|
-
user-select: none;
|
|
47
|
-
font-family: var(--font-sans, inherit);
|
|
48
|
-
font-weight: 600;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.shimmer-btn__content {
|
|
53
|
-
display: block;
|
|
54
|
-
padding: 0.75rem 1.8rem;
|
|
55
|
-
z-index: 2;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.shimmer-btn::after {
|
|
59
|
-
content: "";
|
|
60
|
-
position: absolute;
|
|
61
|
-
inset: 0;
|
|
62
|
-
background: linear-gradient(
|
|
63
|
-
120deg,
|
|
64
|
-
transparent 30%,
|
|
65
|
-
var(--shimmer-color) 50%,
|
|
66
|
-
transparent 70%
|
|
67
|
-
);
|
|
68
|
-
background-size: 200% 100%;
|
|
69
|
-
transform: translateX(-100%);
|
|
70
|
-
animation: sweep var(--shimmer-speed) infinite;
|
|
71
|
-
z-index: 1;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@keyframes sweep {
|
|
75
|
-
0% { transform: translateX(-100%); }
|
|
76
|
-
40%, 100% { transform: translateX(100%); }
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.shimmer-btn:hover:not(:disabled) {
|
|
80
|
-
transform: scale(1.02);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.shimmer-btn:disabled {
|
|
84
|
-
opacity: 0.5;
|
|
85
|
-
cursor: not-allowed;
|
|
86
|
-
filter: grayscale(1);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Variants */
|
|
90
|
-
.shimmer-btn--primary {
|
|
91
|
-
background: var(--c-bg-2, #1e293b);
|
|
92
|
-
color: #fff;
|
|
93
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.shimmer-btn--secondary {
|
|
97
|
-
background: var(--c-primary, #6366f1);
|
|
98
|
-
color: #fff;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.shimmer-btn--ghost {
|
|
102
|
-
background: transparent;
|
|
103
|
-
color: var(--c-primary-light, #818cf8);
|
|
104
|
-
border: 1px solid rgba(99, 102, 241, 0.4);
|
|
105
|
-
--shimmer-color: rgba(99, 102, 241, 0.2);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* Sizes */
|
|
109
|
-
.shimmer-btn--sm .shimmer-btn__content { padding: 0.45rem 1.2rem; font-size: 0.8rem; }
|
|
110
|
-
.shimmer-btn--md .shimmer-btn__content { padding: 0.75rem 1.8rem; font-size: 0.95rem; }
|
|
111
|
-
.shimmer-btn--lg .shimmer-btn__content { padding: 1.1rem 2.6rem; font-size: 1.1rem; }
|
|
112
|
-
</style>
|
|
113
|
-
|
|
@@ -1,121 +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={`shiny-btn shiny-btn--${variant} shiny-btn--${size}`}
|
|
26
|
-
>
|
|
27
|
-
<span class="shiny-btn__content"><slot /></span>
|
|
28
|
-
</Tag>
|
|
29
|
-
|
|
30
|
-
<style>
|
|
31
|
-
.shiny-btn {
|
|
32
|
-
position: relative;
|
|
33
|
-
display: inline-flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
background: #111;
|
|
37
|
-
color: #fff;
|
|
38
|
-
padding: 0;
|
|
39
|
-
border: none;
|
|
40
|
-
border-radius: var(--r-md, 12px);
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
text-decoration: none;
|
|
43
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
user-select: none;
|
|
46
|
-
white-space: nowrap;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
font-family: var(--font-sans, inherit);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.shiny-btn__content {
|
|
52
|
-
display: block;
|
|
53
|
-
padding: 0.7rem 1.8rem;
|
|
54
|
-
z-index: 2;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.shiny-btn::after {
|
|
58
|
-
content: '';
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: -50%;
|
|
61
|
-
left: -150%;
|
|
62
|
-
width: 200%;
|
|
63
|
-
height: 200%;
|
|
64
|
-
background: linear-gradient(
|
|
65
|
-
45deg,
|
|
66
|
-
transparent 0%,
|
|
67
|
-
rgba(255, 255, 255, 0) 30%,
|
|
68
|
-
rgba(255, 255, 255, 0.2) 50%,
|
|
69
|
-
rgba(255, 255, 255, 0) 70%,
|
|
70
|
-
transparent 100%
|
|
71
|
-
);
|
|
72
|
-
transform: rotate(45deg);
|
|
73
|
-
transition: left 0.6s ease;
|
|
74
|
-
z-index: 1;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.shiny-btn:hover:not(:disabled)::after {
|
|
78
|
-
left: 100%;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.shiny-btn:hover:not(:disabled) {
|
|
82
|
-
box-shadow: 0 10px 30px -10px rgba(255, 255, 255, 0.1);
|
|
83
|
-
transform: translateY(-2px);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.shiny-btn:active:not(:disabled) {
|
|
87
|
-
transform: scale(0.98);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.shiny-btn:disabled {
|
|
91
|
-
opacity: 0.5;
|
|
92
|
-
cursor: not-allowed;
|
|
93
|
-
filter: grayscale(1);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* Variants */
|
|
97
|
-
.shiny-btn--primary {
|
|
98
|
-
background: linear-gradient(135deg, #1e293b, #0f172a);
|
|
99
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.shiny-btn--secondary {
|
|
103
|
-
background: var(--c-primary, #6366f1);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.shiny-btn--ghost {
|
|
107
|
-
background: transparent;
|
|
108
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
109
|
-
color: var(--c-text-2, #94a3b8);
|
|
110
|
-
}
|
|
111
|
-
.shiny-btn--ghost:hover:not(:disabled) {
|
|
112
|
-
color: #fff;
|
|
113
|
-
border-color: #fff;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/* Sizes */
|
|
117
|
-
.shiny-btn--sm .shiny-btn__content { padding: 0.45rem 1.2rem; font-size: 0.85rem; }
|
|
118
|
-
.shiny-btn--md .shiny-btn__content { padding: 0.75rem 1.8rem; font-size: 1rem; }
|
|
119
|
-
.shiny-btn--lg .shiny-btn__content { padding: 1.1rem 2.6rem; font-size: 1.15rem; }
|
|
120
|
-
</style>
|
|
121
|
-
|