fancy-ui-svelte 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +198 -0
- package/dist/fancy-ui/_template/Component.svelte +110 -0
- package/dist/fancy-ui/_template/Component.svelte.d.ts +16 -0
- package/dist/fancy-ui/_template/README.md +279 -0
- package/dist/fancy-ui/_template/index.d.ts +13 -0
- package/dist/fancy-ui/_template/index.js +27 -0
- package/dist/fancy-ui/_template/types.d.ts +53 -0
- package/dist/fancy-ui/_template/types.js +12 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte +166 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte.d.ts +4 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.test.d.ts +1 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.test.js +49 -0
- package/dist/fancy-ui/animated-beam/README.md +38 -0
- package/dist/fancy-ui/animated-beam/index.d.ts +2 -0
- package/dist/fancy-ui/animated-beam/index.js +1 -0
- package/dist/fancy-ui/animated-beam/types.d.ts +19 -0
- package/dist/fancy-ui/animated-beam/types.js +1 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte +196 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte.d.ts +29 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.d.ts +1 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.js +92 -0
- package/dist/fancy-ui/animated-testimonials/index.d.ts +2 -0
- package/dist/fancy-ui/animated-testimonials/index.js +1 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte +97 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte.d.ts +15 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.d.ts +1 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.js +67 -0
- package/dist/fancy-ui/animated-tooltip/index.d.ts +2 -0
- package/dist/fancy-ui/animated-tooltip/index.js +1 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte +226 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte.d.ts +27 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte +49 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte.d.ts +11 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.d.ts +1 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.js +85 -0
- package/dist/fancy-ui/apple-card-carousel/index.d.ts +3 -0
- package/dist/fancy-ui/apple-card-carousel/index.js +2 -0
- package/dist/fancy-ui/bento-grid/BentoGrid.svelte +21 -0
- package/dist/fancy-ui/bento-grid/BentoGrid.svelte.d.ts +7 -0
- package/dist/fancy-ui/bento-grid/BentoGridCard.svelte +70 -0
- package/dist/fancy-ui/bento-grid/BentoGridCard.svelte.d.ts +12 -0
- package/dist/fancy-ui/bento-grid/BentoGridItem.svelte +39 -0
- package/dist/fancy-ui/bento-grid/BentoGridItem.svelte.d.ts +10 -0
- package/dist/fancy-ui/bento-grid/README.md +51 -0
- package/dist/fancy-ui/bento-grid/index.d.ts +3 -0
- package/dist/fancy-ui/bento-grid/index.js +3 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte +163 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte.d.ts +11 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.d.ts +1 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.js +50 -0
- package/dist/fancy-ui/bg-falling-stars/README.md +22 -0
- package/dist/fancy-ui/bg-falling-stars/index.d.ts +2 -0
- package/dist/fancy-ui/bg-falling-stars/index.js +1 -0
- package/dist/fancy-ui/bg-stars/README.md +41 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.svelte +205 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.svelte.d.ts +33 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.test.d.ts +1 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.test.js +46 -0
- package/dist/fancy-ui/bg-stars/index.d.ts +1 -0
- package/dist/fancy-ui/bg-stars/index.js +1 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.svelte +126 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.svelte.d.ts +18 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.test.d.ts +1 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.test.js +47 -0
- package/dist/fancy-ui/blur-reveal/README.md +41 -0
- package/dist/fancy-ui/blur-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/blur-reveal/index.js +2 -0
- package/dist/fancy-ui/book/Book.svelte +89 -0
- package/dist/fancy-ui/book/Book.svelte.d.ts +15 -0
- package/dist/fancy-ui/book/Book.test.d.ts +1 -0
- package/dist/fancy-ui/book/Book.test.js +47 -0
- package/dist/fancy-ui/book/BookDescription.svelte +17 -0
- package/dist/fancy-ui/book/BookDescription.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/BookHeader.svelte +17 -0
- package/dist/fancy-ui/book/BookHeader.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/BookTitle.svelte +17 -0
- package/dist/fancy-ui/book/BookTitle.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/README.md +34 -0
- package/dist/fancy-ui/book/index.d.ts +128 -0
- package/dist/fancy-ui/book/index.js +46 -0
- package/dist/fancy-ui/border-beam/BorderBeam.svelte +85 -0
- package/dist/fancy-ui/border-beam/BorderBeam.svelte.d.ts +27 -0
- package/dist/fancy-ui/border-beam/BorderBeam.test.d.ts +1 -0
- package/dist/fancy-ui/border-beam/BorderBeam.test.js +64 -0
- package/dist/fancy-ui/border-beam/index.d.ts +2 -0
- package/dist/fancy-ui/border-beam/index.js +2 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.svelte +73 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.svelte.d.ts +24 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.test.d.ts +1 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.test.js +66 -0
- package/dist/fancy-ui/box-reveal/README.md +24 -0
- package/dist/fancy-ui/box-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/box-reveal/index.js +2 -0
- package/dist/fancy-ui/card-3d/CardBody.svelte +16 -0
- package/dist/fancy-ui/card-3d/CardBody.svelte.d.ts +7 -0
- package/dist/fancy-ui/card-3d/CardContainer.svelte +53 -0
- package/dist/fancy-ui/card-3d/CardContainer.svelte.d.ts +8 -0
- package/dist/fancy-ui/card-3d/CardItem.svelte +49 -0
- package/dist/fancy-ui/card-3d/CardItem.svelte.d.ts +14 -0
- package/dist/fancy-ui/card-3d/README.md +52 -0
- package/dist/fancy-ui/card-3d/index.d.ts +3 -0
- package/dist/fancy-ui/card-3d/index.js +3 -0
- package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte +59 -0
- package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte.d.ts +11 -0
- package/dist/fancy-ui/card-spotlight/README.md +24 -0
- package/dist/fancy-ui/card-spotlight/index.d.ts +1 -0
- package/dist/fancy-ui/card-spotlight/index.js +1 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.svelte +78 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.svelte.d.ts +22 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.test.d.ts +1 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.test.js +53 -0
- package/dist/fancy-ui/colourful-text/README.md +21 -0
- package/dist/fancy-ui/colourful-text/index.d.ts +2 -0
- package/dist/fancy-ui/colourful-text/index.js +2 -0
- package/dist/fancy-ui/compare/Compare.svelte +304 -0
- package/dist/fancy-ui/compare/Compare.svelte.d.ts +25 -0
- package/dist/fancy-ui/compare/Compare.test.d.ts +1 -0
- package/dist/fancy-ui/compare/Compare.test.js +57 -0
- package/dist/fancy-ui/compare/README.md +97 -0
- package/dist/fancy-ui/compare/StarField.svelte +108 -0
- package/dist/fancy-ui/compare/StarField.svelte.d.ts +7 -0
- package/dist/fancy-ui/compare/index.d.ts +2 -0
- package/dist/fancy-ui/compare/index.js +2 -0
- package/dist/fancy-ui/confetti/Confetti.svelte +60 -0
- package/dist/fancy-ui/confetti/Confetti.svelte.d.ts +14 -0
- package/dist/fancy-ui/confetti/Confetti.test.d.ts +1 -0
- package/dist/fancy-ui/confetti/Confetti.test.js +39 -0
- package/dist/fancy-ui/confetti/ConfettiButton.svelte +41 -0
- package/dist/fancy-ui/confetti/ConfettiButton.svelte.d.ts +9 -0
- package/dist/fancy-ui/confetti/README.md +22 -0
- package/dist/fancy-ui/confetti/index.d.ts +2 -0
- package/dist/fancy-ui/confetti/index.js +2 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.svelte +82 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.svelte.d.ts +9 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.test.d.ts +1 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.test.js +34 -0
- package/dist/fancy-ui/container-scroll/README.md +28 -0
- package/dist/fancy-ui/container-scroll/index.d.ts +1 -0
- package/dist/fancy-ui/container-scroll/index.js +1 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte +78 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte.d.ts +10 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.d.ts +1 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.js +46 -0
- package/dist/fancy-ui/container-text-flip/README.md +22 -0
- package/dist/fancy-ui/container-text-flip/index.d.ts +1 -0
- package/dist/fancy-ui/container-text-flip/index.js +1 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte +232 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte.d.ts +11 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.d.ts +1 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.js +78 -0
- package/dist/fancy-ui/direction-aware-hover/README.md +47 -0
- package/dist/fancy-ui/direction-aware-hover/index.d.ts +1 -0
- package/dist/fancy-ui/direction-aware-hover/index.js +1 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.svelte +224 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.svelte.d.ts +19 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.test.d.ts +1 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.test.js +144 -0
- package/dist/fancy-ui/displacement-text/index.d.ts +2 -0
- package/dist/fancy-ui/displacement-text/index.js +1 -0
- package/dist/fancy-ui/dock/Dock.svelte +87 -0
- package/dist/fancy-ui/dock/Dock.svelte.d.ts +12 -0
- package/dist/fancy-ui/dock/Dock.test.d.ts +1 -0
- package/dist/fancy-ui/dock/Dock.test.js +51 -0
- package/dist/fancy-ui/dock/DockIcon.svelte +50 -0
- package/dist/fancy-ui/dock/DockIcon.svelte.d.ts +7 -0
- package/dist/fancy-ui/dock/DockSeparator.svelte +21 -0
- package/dist/fancy-ui/dock/DockSeparator.svelte.d.ts +6 -0
- package/dist/fancy-ui/dock/README.md +57 -0
- package/dist/fancy-ui/dock/index.d.ts +4 -0
- package/dist/fancy-ui/dock/index.js +4 -0
- package/dist/fancy-ui/dock/types.d.ts +14 -0
- package/dist/fancy-ui/dock/types.js +1 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte +154 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte.d.ts +27 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.d.ts +1 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.js +34 -0
- package/dist/fancy-ui/flickering-grid/README.md +24 -0
- package/dist/fancy-ui/flickering-grid/index.d.ts +2 -0
- package/dist/fancy-ui/flickering-grid/index.js +2 -0
- package/dist/fancy-ui/flip-card/FlipCard.svelte +48 -0
- package/dist/fancy-ui/flip-card/FlipCard.svelte.d.ts +10 -0
- package/dist/fancy-ui/flip-card/FlipCard.test.d.ts +1 -0
- package/dist/fancy-ui/flip-card/FlipCard.test.js +36 -0
- package/dist/fancy-ui/flip-card/README.md +26 -0
- package/dist/fancy-ui/flip-card/index.d.ts +1 -0
- package/dist/fancy-ui/flip-card/index.js +1 -0
- package/dist/fancy-ui/flip-words/FlipWords.svelte +135 -0
- package/dist/fancy-ui/flip-words/FlipWords.svelte.d.ts +18 -0
- package/dist/fancy-ui/flip-words/FlipWords.test.d.ts +1 -0
- package/dist/fancy-ui/flip-words/FlipWords.test.js +50 -0
- package/dist/fancy-ui/flip-words/README.md +17 -0
- package/dist/fancy-ui/flip-words/index.d.ts +2 -0
- package/dist/fancy-ui/flip-words/index.js +2 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte +1378 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte.d.ts +25 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.test.d.ts +1 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.test.js +41 -0
- package/dist/fancy-ui/fluid-cursor/README.md +34 -0
- package/dist/fancy-ui/fluid-cursor/index.d.ts +1 -0
- package/dist/fancy-ui/fluid-cursor/index.js +1 -0
- package/dist/fancy-ui/focus/Focus.svelte +177 -0
- package/dist/fancy-ui/focus/Focus.svelte.d.ts +12 -0
- package/dist/fancy-ui/focus/Focus.test.d.ts +1 -0
- package/dist/fancy-ui/focus/Focus.test.js +48 -0
- package/dist/fancy-ui/focus/README.md +21 -0
- package/dist/fancy-ui/focus/index.d.ts +1 -0
- package/dist/fancy-ui/focus/index.js +1 -0
- package/dist/fancy-ui/glare-card/GlareCard.svelte +133 -0
- package/dist/fancy-ui/glare-card/GlareCard.svelte.d.ts +8 -0
- package/dist/fancy-ui/glare-card/GlareCard.test.d.ts +1 -0
- package/dist/fancy-ui/glare-card/GlareCard.test.js +40 -0
- package/dist/fancy-ui/glare-card/README.md +24 -0
- package/dist/fancy-ui/glare-card/index.d.ts +1 -0
- package/dist/fancy-ui/glare-card/index.js +1 -0
- package/dist/fancy-ui/glow-border/GlowBorder.svelte +67 -0
- package/dist/fancy-ui/glow-border/GlowBorder.svelte.d.ts +10 -0
- package/dist/fancy-ui/glow-border/GlowBorder.test.d.ts +1 -0
- package/dist/fancy-ui/glow-border/GlowBorder.test.js +57 -0
- package/dist/fancy-ui/glow-border/README.md +54 -0
- package/dist/fancy-ui/glow-border/index.d.ts +1 -0
- package/dist/fancy-ui/glow-border/index.js +1 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte +182 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte.d.ts +15 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.test.d.ts +1 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.test.js +68 -0
- package/dist/fancy-ui/glowing-effect/README.md +29 -0
- package/dist/fancy-ui/glowing-effect/index.d.ts +1 -0
- package/dist/fancy-ui/glowing-effect/index.js +1 -0
- package/dist/fancy-ui/gradient-button/GradientButton.svelte +103 -0
- package/dist/fancy-ui/gradient-button/GradientButton.svelte.d.ts +24 -0
- package/dist/fancy-ui/gradient-button/GradientButton.test.d.ts +1 -0
- package/dist/fancy-ui/gradient-button/GradientButton.test.js +65 -0
- package/dist/fancy-ui/gradient-button/README.md +10 -0
- package/dist/fancy-ui/gradient-button/index.d.ts +2 -0
- package/dist/fancy-ui/gradient-button/index.js +2 -0
- package/dist/fancy-ui/hyper-text/HyperText.svelte +112 -0
- package/dist/fancy-ui/hyper-text/HyperText.svelte.d.ts +20 -0
- package/dist/fancy-ui/hyper-text/HyperText.test.d.ts +1 -0
- package/dist/fancy-ui/hyper-text/HyperText.test.js +39 -0
- package/dist/fancy-ui/hyper-text/README.md +19 -0
- package/dist/fancy-ui/hyper-text/index.d.ts +2 -0
- package/dist/fancy-ui/hyper-text/index.js +2 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte +89 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte.d.ts +9 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.d.ts +1 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.js +60 -0
- package/dist/fancy-ui/image-trail-cursor/README.md +36 -0
- package/dist/fancy-ui/image-trail-cursor/index.d.ts +3 -0
- package/dist/fancy-ui/image-trail-cursor/index.js +1 -0
- package/dist/fancy-ui/image-trail-cursor/trail-variants.d.ts +107 -0
- package/dist/fancy-ui/image-trail-cursor/trail-variants.js +703 -0
- package/dist/fancy-ui/index.d.ts +52 -0
- package/dist/fancy-ui/index.js +64 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte +71 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte.d.ts +15 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.d.ts +1 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.js +47 -0
- package/dist/fancy-ui/interactive-grid-pattern/README.md +30 -0
- package/dist/fancy-ui/interactive-grid-pattern/index.d.ts +2 -0
- package/dist/fancy-ui/interactive-grid-pattern/index.js +2 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte +75 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte.d.ts +14 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.d.ts +1 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.js +64 -0
- package/dist/fancy-ui/interactive-hover-button/README.md +28 -0
- package/dist/fancy-ui/interactive-hover-button/index.d.ts +2 -0
- package/dist/fancy-ui/interactive-hover-button/index.js +2 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.svelte +58 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.svelte.d.ts +17 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.test.d.ts +1 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.test.js +49 -0
- package/dist/fancy-ui/letter-pullup/README.md +18 -0
- package/dist/fancy-ui/letter-pullup/index.d.ts +2 -0
- package/dist/fancy-ui/letter-pullup/index.js +2 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte +450 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte.d.ts +35 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.test.d.ts +1 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.test.js +55 -0
- package/dist/fancy-ui/line-hover-link/index.d.ts +2 -0
- package/dist/fancy-ui/line-hover-link/index.js +1 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte +63 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte.d.ts +9 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.test.d.ts +1 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.test.js +59 -0
- package/dist/fancy-ui/line-shadow-text/README.md +12 -0
- package/dist/fancy-ui/line-shadow-text/index.d.ts +2 -0
- package/dist/fancy-ui/line-shadow-text/index.js +1 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte +204 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte.d.ts +23 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.test.d.ts +1 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.test.js +48 -0
- package/dist/fancy-ui/liquid-glass/README.md +34 -0
- package/dist/fancy-ui/liquid-glass/index.d.ts +1 -0
- package/dist/fancy-ui/liquid-glass/index.js +1 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte +61 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte.d.ts +15 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.d.ts +1 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.js +59 -0
- package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte +31 -0
- package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte.d.ts +11 -0
- package/dist/fancy-ui/logo-cloud/README.md +41 -0
- package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte +31 -0
- package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte.d.ts +11 -0
- package/dist/fancy-ui/logo-cloud/index.d.ts +4 -0
- package/dist/fancy-ui/logo-cloud/index.js +4 -0
- package/dist/fancy-ui/marquee/Marquee.svelte +70 -0
- package/dist/fancy-ui/marquee/Marquee.svelte.d.ts +11 -0
- package/dist/fancy-ui/marquee/Marquee.test.d.ts +1 -0
- package/dist/fancy-ui/marquee/Marquee.test.js +46 -0
- package/dist/fancy-ui/marquee/ReviewCard.svelte +25 -0
- package/dist/fancy-ui/marquee/ReviewCard.svelte.d.ts +9 -0
- package/dist/fancy-ui/marquee/index.d.ts +2 -0
- package/dist/fancy-ui/marquee/index.js +2 -0
- package/dist/fancy-ui/meteors/Meteors.svelte +59 -0
- package/dist/fancy-ui/meteors/Meteors.svelte.d.ts +15 -0
- package/dist/fancy-ui/meteors/Meteors.test.d.ts +1 -0
- package/dist/fancy-ui/meteors/Meteors.test.js +48 -0
- package/dist/fancy-ui/meteors/README.md +18 -0
- package/dist/fancy-ui/meteors/index.d.ts +2 -0
- package/dist/fancy-ui/meteors/index.js +2 -0
- package/dist/fancy-ui/neon-border/NeonBorder.svelte +135 -0
- package/dist/fancy-ui/neon-border/NeonBorder.svelte.d.ts +24 -0
- package/dist/fancy-ui/neon-border/NeonBorder.test.d.ts +1 -0
- package/dist/fancy-ui/neon-border/NeonBorder.test.js +80 -0
- package/dist/fancy-ui/neon-border/README.md +27 -0
- package/dist/fancy-ui/neon-border/index.d.ts +2 -0
- package/dist/fancy-ui/neon-border/index.js +2 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.svelte +126 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.svelte.d.ts +24 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.test.d.ts +1 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.test.js +64 -0
- package/dist/fancy-ui/number-ticker/README.md +22 -0
- package/dist/fancy-ui/number-ticker/index.d.ts +2 -0
- package/dist/fancy-ui/number-ticker/index.js +2 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.svelte +96 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.svelte.d.ts +18 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.test.d.ts +1 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.test.js +51 -0
- package/dist/fancy-ui/rainbow-button/index.d.ts +2 -0
- package/dist/fancy-ui/rainbow-button/index.js +2 -0
- package/dist/fancy-ui/registry.d.ts +72 -0
- package/dist/fancy-ui/registry.js +643 -0
- package/dist/fancy-ui/ripple/README.md +16 -0
- package/dist/fancy-ui/ripple/Ripple.svelte +64 -0
- package/dist/fancy-ui/ripple/Ripple.svelte.d.ts +13 -0
- package/dist/fancy-ui/ripple/Ripple.test.d.ts +1 -0
- package/dist/fancy-ui/ripple/Ripple.test.js +81 -0
- package/dist/fancy-ui/ripple/index.d.ts +1 -0
- package/dist/fancy-ui/ripple/index.js +1 -0
- package/dist/fancy-ui/ripple-button/RippleButton.svelte +111 -0
- package/dist/fancy-ui/ripple-button/RippleButton.svelte.d.ts +15 -0
- package/dist/fancy-ui/ripple-button/RippleButton.test.d.ts +1 -0
- package/dist/fancy-ui/ripple-button/RippleButton.test.js +44 -0
- package/dist/fancy-ui/ripple-button/index.d.ts +2 -0
- package/dist/fancy-ui/ripple-button/index.js +2 -0
- package/dist/fancy-ui/shimmer-button/README.md +10 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte +115 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte.d.ts +22 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.test.d.ts +1 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.test.js +69 -0
- package/dist/fancy-ui/shimmer-button/index.d.ts +2 -0
- package/dist/fancy-ui/shimmer-button/index.js +2 -0
- package/dist/fancy-ui/smooth-cursor/README.md +23 -0
- package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte +224 -0
- package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte.d.ts +20 -0
- package/dist/fancy-ui/smooth-cursor/index.d.ts +2 -0
- package/dist/fancy-ui/smooth-cursor/index.js +1 -0
- package/dist/fancy-ui/sparkles/README.md +15 -0
- package/dist/fancy-ui/sparkles/Sparkles.svelte +123 -0
- package/dist/fancy-ui/sparkles/Sparkles.svelte.d.ts +12 -0
- package/dist/fancy-ui/sparkles/Sparkles.test.d.ts +1 -0
- package/dist/fancy-ui/sparkles/Sparkles.test.js +66 -0
- package/dist/fancy-ui/sparkles/index.d.ts +1 -0
- package/dist/fancy-ui/sparkles/index.js +1 -0
- package/dist/fancy-ui/sparkles-text/README.md +19 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.svelte +112 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.svelte.d.ts +22 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.test.d.ts +1 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.test.js +54 -0
- package/dist/fancy-ui/sparkles-text/index.d.ts +2 -0
- package/dist/fancy-ui/sparkles-text/index.js +2 -0
- package/dist/fancy-ui/tailwind.css +3 -0
- package/dist/fancy-ui/text-generate-effect/README.md +14 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte +66 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte.d.ts +11 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.d.ts +1 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.js +73 -0
- package/dist/fancy-ui/text-generate-effect/index.d.ts +2 -0
- package/dist/fancy-ui/text-generate-effect/index.js +1 -0
- package/dist/fancy-ui/text-reveal-card/README.md +36 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte +112 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte.d.ts +12 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.d.ts +1 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.js +34 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte +76 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte.d.ts +7 -0
- package/dist/fancy-ui/text-reveal-card/index.d.ts +2 -0
- package/dist/fancy-ui/text-reveal-card/index.js +2 -0
- package/dist/fancy-ui/timeline/README.md +56 -0
- package/dist/fancy-ui/timeline/Timeline.svelte +141 -0
- package/dist/fancy-ui/timeline/Timeline.svelte.d.ts +20 -0
- package/dist/fancy-ui/timeline/Timeline.test.d.ts +1 -0
- package/dist/fancy-ui/timeline/Timeline.test.js +63 -0
- package/dist/fancy-ui/timeline/index.d.ts +2 -0
- package/dist/fancy-ui/timeline/index.js +2 -0
- package/dist/fancy-ui/tracing-beam/README.md +24 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.svelte +156 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.svelte.d.ts +8 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.test.d.ts +1 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.test.js +61 -0
- package/dist/fancy-ui/tracing-beam/index.d.ts +1 -0
- package/dist/fancy-ui/tracing-beam/index.js +1 -0
- package/dist/types.d.ts +87 -0
- package/dist/types.js +6 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +5 -0
- package/package.json +105 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export * from "./apple-card-carousel/index.js";
|
|
2
|
+
export * from "./line-hover-link/index.js";
|
|
3
|
+
export * from "./animated-beam/index.js";
|
|
4
|
+
export * from "./animated-testimonials/index.js";
|
|
5
|
+
export * from "./fluid-cursor/index.js";
|
|
6
|
+
export * from "./animated-tooltip/index.js";
|
|
7
|
+
export * from "./blur-reveal/index.js";
|
|
8
|
+
export * from "./bg-falling-stars/index.js";
|
|
9
|
+
export * from "./bg-stars/index.js";
|
|
10
|
+
export * from "./border-beam/index.js";
|
|
11
|
+
export * from "./glow-border/index.js";
|
|
12
|
+
export * from "./marquee/index.js";
|
|
13
|
+
export * from "./compare/index.js";
|
|
14
|
+
export * from "./image-trail-cursor/index.js";
|
|
15
|
+
export * from "./interactive-grid-pattern/index.js";
|
|
16
|
+
export * from "./logo-cloud/index.js";
|
|
17
|
+
export * from "./direction-aware-hover/index.js";
|
|
18
|
+
export * from "./rainbow-button/index.js";
|
|
19
|
+
export * from "./ripple-button/index.js";
|
|
20
|
+
export * from "./shimmer-button/index.js";
|
|
21
|
+
export * from "./timeline/index.js";
|
|
22
|
+
export * from "./meteors/index.js";
|
|
23
|
+
export * from "./flickering-grid/index.js";
|
|
24
|
+
export * from "./neon-border/index.js";
|
|
25
|
+
export * from "./colourful-text/index.js";
|
|
26
|
+
export * from "./flip-words/index.js";
|
|
27
|
+
export * from "./hyper-text/index.js";
|
|
28
|
+
export * from "./letter-pullup/index.js";
|
|
29
|
+
export * from "./number-ticker/index.js";
|
|
30
|
+
export * from "./sparkles-text/index.js";
|
|
31
|
+
export * from "./box-reveal/index.js";
|
|
32
|
+
export * from "./card-3d/index.js";
|
|
33
|
+
export * from "./card-spotlight/index.js";
|
|
34
|
+
export * from "./bento-grid/index.js";
|
|
35
|
+
export * from "./flip-card/index.js";
|
|
36
|
+
export * from "./book/index.js";
|
|
37
|
+
export * from "./glare-card/index.js";
|
|
38
|
+
export * from "./text-reveal-card/index.js";
|
|
39
|
+
export * from "./container-scroll/index.js";
|
|
40
|
+
export * from "./container-text-flip/index.js";
|
|
41
|
+
export * from "./focus/index.js";
|
|
42
|
+
export * from "./liquid-glass/index.js";
|
|
43
|
+
export * from "./smooth-cursor/index.js";
|
|
44
|
+
export * from "./sparkles/index.js";
|
|
45
|
+
export * from "./glowing-effect/index.js";
|
|
46
|
+
export * from "./confetti/index.js";
|
|
47
|
+
export * from "./ripple/index.js";
|
|
48
|
+
export * from "./text-generate-effect/index.js";
|
|
49
|
+
export * from "./line-shadow-text/index.js";
|
|
50
|
+
export * from "./tracing-beam/index.js";
|
|
51
|
+
export * from "./displacement-text/index.js";
|
|
52
|
+
export { registry, categories, categoryLabels, categoryDescriptions, getAllComponents, getComponent, getComponentsByStatus, getComponentsByCategory, getComponentsGroupedByCategory, getComponentsGroupedByStatus, searchComponents, getStats, hasComponent, getComponentCategory, } from "./registry.js";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// FancyUI - Component Library
|
|
2
|
+
// Re-exports all implemented FancyUI components
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// Components
|
|
5
|
+
// =============================================================================
|
|
6
|
+
export * from "./apple-card-carousel/index.js";
|
|
7
|
+
export * from "./line-hover-link/index.js";
|
|
8
|
+
export * from "./animated-beam/index.js";
|
|
9
|
+
export * from "./animated-testimonials/index.js";
|
|
10
|
+
export * from "./fluid-cursor/index.js";
|
|
11
|
+
export * from "./animated-tooltip/index.js";
|
|
12
|
+
export * from "./blur-reveal/index.js";
|
|
13
|
+
export * from "./bg-falling-stars/index.js";
|
|
14
|
+
export * from "./bg-stars/index.js";
|
|
15
|
+
export * from "./border-beam/index.js";
|
|
16
|
+
export * from "./glow-border/index.js";
|
|
17
|
+
export * from "./marquee/index.js";
|
|
18
|
+
export * from "./compare/index.js";
|
|
19
|
+
export * from "./image-trail-cursor/index.js";
|
|
20
|
+
export * from "./interactive-grid-pattern/index.js";
|
|
21
|
+
export * from "./logo-cloud/index.js";
|
|
22
|
+
export * from "./direction-aware-hover/index.js";
|
|
23
|
+
export * from "./rainbow-button/index.js";
|
|
24
|
+
export * from "./ripple-button/index.js";
|
|
25
|
+
export * from "./shimmer-button/index.js";
|
|
26
|
+
export * from "./timeline/index.js";
|
|
27
|
+
export * from "./meteors/index.js";
|
|
28
|
+
export * from "./flickering-grid/index.js";
|
|
29
|
+
export * from "./neon-border/index.js";
|
|
30
|
+
export * from "./colourful-text/index.js";
|
|
31
|
+
export * from "./flip-words/index.js";
|
|
32
|
+
export * from "./hyper-text/index.js";
|
|
33
|
+
export * from "./letter-pullup/index.js";
|
|
34
|
+
export * from "./number-ticker/index.js";
|
|
35
|
+
export * from "./sparkles-text/index.js";
|
|
36
|
+
export * from "./box-reveal/index.js";
|
|
37
|
+
export * from "./card-3d/index.js";
|
|
38
|
+
export * from "./card-spotlight/index.js";
|
|
39
|
+
export * from "./bento-grid/index.js";
|
|
40
|
+
export * from "./flip-card/index.js";
|
|
41
|
+
export * from "./book/index.js";
|
|
42
|
+
export * from "./glare-card/index.js";
|
|
43
|
+
export * from "./text-reveal-card/index.js";
|
|
44
|
+
export * from "./container-scroll/index.js";
|
|
45
|
+
export * from "./container-text-flip/index.js";
|
|
46
|
+
export * from "./focus/index.js";
|
|
47
|
+
export * from "./liquid-glass/index.js";
|
|
48
|
+
export * from "./smooth-cursor/index.js";
|
|
49
|
+
export * from "./sparkles/index.js";
|
|
50
|
+
export * from "./glowing-effect/index.js";
|
|
51
|
+
export * from "./confetti/index.js";
|
|
52
|
+
export * from "./ripple/index.js";
|
|
53
|
+
export * from "./text-generate-effect/index.js";
|
|
54
|
+
export * from "./line-shadow-text/index.js";
|
|
55
|
+
export * from "./tracing-beam/index.js";
|
|
56
|
+
export * from "./displacement-text/index.js";
|
|
57
|
+
// =============================================================================
|
|
58
|
+
// Registry
|
|
59
|
+
// =============================================================================
|
|
60
|
+
export {
|
|
61
|
+
// Data
|
|
62
|
+
registry, categories, categoryLabels, categoryDescriptions,
|
|
63
|
+
// Helpers
|
|
64
|
+
getAllComponents, getComponent, getComponentsByStatus, getComponentsByCategory, getComponentsGroupedByCategory, getComponentsGroupedByStatus, searchComponents, getStats, hasComponent, getComponentCategory, } from "./registry.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export interface InteractiveGridPatternProps {
|
|
3
|
+
/** Additional CSS classes for the SVG container */
|
|
4
|
+
class?: string;
|
|
5
|
+
/** Additional CSS classes for individual squares */
|
|
6
|
+
squaresClassName?: string;
|
|
7
|
+
/** Width of each square in pixels */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** Height of each square in pixels */
|
|
10
|
+
height?: number;
|
|
11
|
+
/** Grid dimensions [columns, rows] */
|
|
12
|
+
squares?: [number, number];
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { cn } from "../../utils.js";
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
class: className,
|
|
21
|
+
squaresClassName,
|
|
22
|
+
width = 40,
|
|
23
|
+
height = 40,
|
|
24
|
+
squares = [24, 24] as [number, number],
|
|
25
|
+
}: InteractiveGridPatternProps = $props();
|
|
26
|
+
|
|
27
|
+
let hoveredSquare: number | null = $state(null);
|
|
28
|
+
|
|
29
|
+
const cols = $derived(squares[0]);
|
|
30
|
+
const rows = $derived(squares[1]);
|
|
31
|
+
const totalSquares = $derived(cols * rows);
|
|
32
|
+
const gridWidth = $derived(width * cols);
|
|
33
|
+
const gridHeight = $derived(height * rows);
|
|
34
|
+
|
|
35
|
+
function getX(index: number) {
|
|
36
|
+
return (index % cols) * width;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getY(index: number) {
|
|
40
|
+
return Math.floor(index / cols) * height;
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<svg
|
|
45
|
+
width={gridWidth}
|
|
46
|
+
height={gridHeight}
|
|
47
|
+
class={cn("absolute inset-0 h-full w-full border border-gray-400/30", className)}
|
|
48
|
+
>
|
|
49
|
+
{#each { length: totalSquares } as _, index}
|
|
50
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
51
|
+
<rect
|
|
52
|
+
x={getX(index)}
|
|
53
|
+
y={getY(index)}
|
|
54
|
+
{width}
|
|
55
|
+
{height}
|
|
56
|
+
class={cn(
|
|
57
|
+
"interactive-grid-square stroke-gray-400/30 transition-all duration-100 ease-in-out",
|
|
58
|
+
hoveredSquare === index ? "fill-gray-300/30" : "fill-transparent",
|
|
59
|
+
squaresClassName
|
|
60
|
+
)}
|
|
61
|
+
onmouseenter={() => (hoveredSquare = index)}
|
|
62
|
+
onmouseleave={() => (hoveredSquare = null)}
|
|
63
|
+
/>
|
|
64
|
+
{/each}
|
|
65
|
+
</svg>
|
|
66
|
+
|
|
67
|
+
<style>
|
|
68
|
+
.interactive-grid-square:not(:hover) {
|
|
69
|
+
transition-duration: 1000ms;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface InteractiveGridPatternProps {
|
|
2
|
+
/** Additional CSS classes for the SVG container */
|
|
3
|
+
class?: string;
|
|
4
|
+
/** Additional CSS classes for individual squares */
|
|
5
|
+
squaresClassName?: string;
|
|
6
|
+
/** Width of each square in pixels */
|
|
7
|
+
width?: number;
|
|
8
|
+
/** Height of each square in pixels */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Grid dimensions [columns, rows] */
|
|
11
|
+
squares?: [number, number];
|
|
12
|
+
}
|
|
13
|
+
declare const InteractiveGridPattern: import("svelte").Component<InteractiveGridPatternProps, {}, "">;
|
|
14
|
+
type InteractiveGridPattern = ReturnType<typeof InteractiveGridPattern>;
|
|
15
|
+
export default InteractiveGridPattern;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, describe, it, expect } from "vitest";
|
|
3
|
+
import InteractiveGridPattern from "./InteractiveGridPattern.svelte";
|
|
4
|
+
describe("InteractiveGridPattern", () => {
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
it("renders an SVG element", () => {
|
|
7
|
+
const { container } = render(InteractiveGridPattern, {
|
|
8
|
+
props: { squares: [3, 3] },
|
|
9
|
+
});
|
|
10
|
+
const svg = container.querySelector("svg");
|
|
11
|
+
expect(svg).toBeInTheDocument();
|
|
12
|
+
});
|
|
13
|
+
it("renders correct number of rect elements", () => {
|
|
14
|
+
const { container } = render(InteractiveGridPattern, {
|
|
15
|
+
props: { squares: [4, 3] },
|
|
16
|
+
});
|
|
17
|
+
const rects = container.querySelectorAll("rect");
|
|
18
|
+
expect(rects.length).toBe(12);
|
|
19
|
+
});
|
|
20
|
+
it("renders default 24x24 grid", () => {
|
|
21
|
+
const { container } = render(InteractiveGridPattern);
|
|
22
|
+
const rects = container.querySelectorAll("rect");
|
|
23
|
+
expect(rects.length).toBe(576);
|
|
24
|
+
});
|
|
25
|
+
it("each rect has interactive-grid-square class", () => {
|
|
26
|
+
const { container } = render(InteractiveGridPattern, {
|
|
27
|
+
props: { squares: [2, 2] },
|
|
28
|
+
});
|
|
29
|
+
const rects = container.querySelectorAll(".interactive-grid-square");
|
|
30
|
+
expect(rects.length).toBe(4);
|
|
31
|
+
});
|
|
32
|
+
it("applies custom class names to SVG", () => {
|
|
33
|
+
const { container } = render(InteractiveGridPattern, {
|
|
34
|
+
props: { squares: [2, 2], class: "my-grid" },
|
|
35
|
+
});
|
|
36
|
+
const svg = container.querySelector("svg");
|
|
37
|
+
expect(svg?.getAttribute("class")).toContain("my-grid");
|
|
38
|
+
});
|
|
39
|
+
it("sets correct SVG dimensions based on props", () => {
|
|
40
|
+
const { container } = render(InteractiveGridPattern, {
|
|
41
|
+
props: { squares: [5, 3], width: 50, height: 30 },
|
|
42
|
+
});
|
|
43
|
+
const svg = container.querySelector("svg");
|
|
44
|
+
expect(svg).toHaveAttribute("width", "250");
|
|
45
|
+
expect(svg).toHaveAttribute("height", "90");
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# InteractiveGridPattern
|
|
2
|
+
|
|
3
|
+
SVG grid of squares that highlight on hover with smooth fade transitions.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { InteractiveGridPattern } from '$lib/fancy-ui/interactive-grid-pattern';
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div class="relative h-96 w-full overflow-hidden">
|
|
13
|
+
<InteractiveGridPattern />
|
|
14
|
+
</div>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
|------|------|---------|-------------|
|
|
21
|
+
| `class` | `string` | - | Classes on the SVG container |
|
|
22
|
+
| `squaresClassName` | `string` | - | Classes on individual rect elements |
|
|
23
|
+
| `width` | `number` | `40` | Square width in pixels |
|
|
24
|
+
| `height` | `number` | `40` | Square height in pixels |
|
|
25
|
+
| `squares` | `[number, number]` | `[24, 24]` | Grid dimensions `[columns, rows]` |
|
|
26
|
+
|
|
27
|
+
## Implementation Notes
|
|
28
|
+
|
|
29
|
+
- Uses `$state` for hover tracking, Svelte 5 `onmouseenter`/`onmouseleave` handlers
|
|
30
|
+
- CSS transition: 100ms on hover-in, 1000ms on hover-out via `:not(:hover)` selector
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type BaseProps = {
|
|
6
|
+
/** Button label text */
|
|
7
|
+
text?: string;
|
|
8
|
+
/** Custom CSS class */
|
|
9
|
+
class?: string;
|
|
10
|
+
/** Button content (overrides text prop) */
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type InteractiveHoverButtonProps = BaseProps & Omit<HTMLButtonAttributes, keyof BaseProps>;
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
import { cn } from "../../utils.js";
|
|
19
|
+
|
|
20
|
+
let {
|
|
21
|
+
text = "Button",
|
|
22
|
+
class: className,
|
|
23
|
+
children,
|
|
24
|
+
...restProps
|
|
25
|
+
}: InteractiveHoverButtonProps = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<button
|
|
29
|
+
class={cn(
|
|
30
|
+
"group bg-background relative w-auto cursor-pointer overflow-hidden rounded-full border p-2 px-6 text-center font-semibold",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...restProps}
|
|
34
|
+
>
|
|
35
|
+
<div class="flex items-center gap-2">
|
|
36
|
+
<div
|
|
37
|
+
class="bg-primary size-2 rounded-lg transition-all duration-300 group-hover:scale-[100.8]"
|
|
38
|
+
></div>
|
|
39
|
+
<span
|
|
40
|
+
class="inline-block transition-all duration-300 group-hover:translate-x-12 group-hover:opacity-0"
|
|
41
|
+
>
|
|
42
|
+
{#if children}
|
|
43
|
+
{@render children()}
|
|
44
|
+
{:else}
|
|
45
|
+
{text}
|
|
46
|
+
{/if}
|
|
47
|
+
</span>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div
|
|
51
|
+
class="text-primary-foreground absolute top-0 z-10 flex size-full translate-x-12 items-center justify-center gap-2 opacity-0 transition-all duration-300 group-hover:-translate-x-5 group-hover:opacity-100"
|
|
52
|
+
>
|
|
53
|
+
<span>
|
|
54
|
+
{#if children}
|
|
55
|
+
{@render children()}
|
|
56
|
+
{:else}
|
|
57
|
+
{text}
|
|
58
|
+
{/if}
|
|
59
|
+
</span>
|
|
60
|
+
<svg
|
|
61
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
62
|
+
width="24"
|
|
63
|
+
height="24"
|
|
64
|
+
viewBox="0 0 24 24"
|
|
65
|
+
fill="none"
|
|
66
|
+
stroke="currentColor"
|
|
67
|
+
stroke-width="2"
|
|
68
|
+
stroke-linecap="round"
|
|
69
|
+
stroke-linejoin="round"
|
|
70
|
+
>
|
|
71
|
+
<path d="M5 12h14" />
|
|
72
|
+
<path d="m12 5 7 7-7 7" />
|
|
73
|
+
</svg>
|
|
74
|
+
</div>
|
|
75
|
+
</button>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
+
type BaseProps = {
|
|
4
|
+
/** Button label text */
|
|
5
|
+
text?: string;
|
|
6
|
+
/** Custom CSS class */
|
|
7
|
+
class?: string;
|
|
8
|
+
/** Button content (overrides text prop) */
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
};
|
|
11
|
+
export type InteractiveHoverButtonProps = BaseProps & Omit<HTMLButtonAttributes, keyof BaseProps>;
|
|
12
|
+
declare const InteractiveHoverButton: import("svelte").Component<InteractiveHoverButtonProps, {}, "">;
|
|
13
|
+
type InteractiveHoverButton = ReturnType<typeof InteractiveHoverButton>;
|
|
14
|
+
export default InteractiveHoverButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { render, screen, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, describe, it, expect } from "vitest";
|
|
3
|
+
import InteractiveHoverButton from "./InteractiveHoverButton.svelte";
|
|
4
|
+
describe("InteractiveHoverButton", () => {
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
it("renders a button element", () => {
|
|
7
|
+
render(InteractiveHoverButton);
|
|
8
|
+
expect(screen.getByRole("button")).toBeInTheDocument();
|
|
9
|
+
});
|
|
10
|
+
it('renders default text "Button" when no text prop is provided', () => {
|
|
11
|
+
render(InteractiveHoverButton);
|
|
12
|
+
const button = screen.getByRole("button");
|
|
13
|
+
expect(button).toHaveTextContent("Button");
|
|
14
|
+
});
|
|
15
|
+
it("renders custom text from the text prop", () => {
|
|
16
|
+
render(InteractiveHoverButton, { props: { text: "Get Started" } });
|
|
17
|
+
const button = screen.getByRole("button");
|
|
18
|
+
expect(button).toHaveTextContent("Get Started");
|
|
19
|
+
});
|
|
20
|
+
it("displays the text twice (initial + hover overlay)", () => {
|
|
21
|
+
render(InteractiveHoverButton, { props: { text: "Subscribe" } });
|
|
22
|
+
const matches = screen.getAllByText("Subscribe");
|
|
23
|
+
expect(matches).toHaveLength(2);
|
|
24
|
+
});
|
|
25
|
+
it("renders the arrow SVG icon", () => {
|
|
26
|
+
render(InteractiveHoverButton);
|
|
27
|
+
const button = screen.getByRole("button");
|
|
28
|
+
const svg = button.querySelector("svg");
|
|
29
|
+
expect(svg).toBeInTheDocument();
|
|
30
|
+
expect(svg?.querySelectorAll("path")).toHaveLength(2);
|
|
31
|
+
});
|
|
32
|
+
it("applies custom class names", () => {
|
|
33
|
+
render(InteractiveHoverButton, { props: { class: "my-custom-class" } });
|
|
34
|
+
const button = screen.getByRole("button");
|
|
35
|
+
expect(button.className).toContain("my-custom-class");
|
|
36
|
+
});
|
|
37
|
+
it("preserves base classes when custom class is added", () => {
|
|
38
|
+
render(InteractiveHoverButton, { props: { class: "extra" } });
|
|
39
|
+
const button = screen.getByRole("button");
|
|
40
|
+
expect(button.className).toContain("overflow-hidden");
|
|
41
|
+
expect(button.className).toContain("rounded-full");
|
|
42
|
+
});
|
|
43
|
+
it("forwards native button attributes", () => {
|
|
44
|
+
render(InteractiveHoverButton, {
|
|
45
|
+
props: { disabled: true, type: "submit", "aria-label": "Sign up" },
|
|
46
|
+
});
|
|
47
|
+
const button = screen.getByRole("button");
|
|
48
|
+
expect(button).toBeDisabled();
|
|
49
|
+
expect(button).toHaveAttribute("type", "submit");
|
|
50
|
+
expect(button).toHaveAttribute("aria-label", "Sign up");
|
|
51
|
+
});
|
|
52
|
+
it("contains the dot element with bg-primary class", () => {
|
|
53
|
+
render(InteractiveHoverButton);
|
|
54
|
+
const button = screen.getByRole("button");
|
|
55
|
+
const dot = button.querySelector(".bg-primary");
|
|
56
|
+
expect(dot).toBeInTheDocument();
|
|
57
|
+
});
|
|
58
|
+
it("has hover overlay with translate and opacity classes", () => {
|
|
59
|
+
render(InteractiveHoverButton);
|
|
60
|
+
const button = screen.getByRole("button");
|
|
61
|
+
const overlay = button.querySelector(".translate-x-12.opacity-0");
|
|
62
|
+
expect(overlay).toBeInTheDocument();
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# InteractiveHoverButton
|
|
2
|
+
|
|
3
|
+
Button with a hover animation: text slides out to the right while an arrow and duplicate text slide in from the right. A small `bg-primary` dot scales up to fill the button background.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------------|----------|------------|-------------------------------------|
|
|
9
|
+
| `text` | `string` | `"Button"` | Button label text |
|
|
10
|
+
| `class` | `string` | `""` | Additional CSS classes |
|
|
11
|
+
| `children` | Snippet | - | Optional content (overrides `text`) |
|
|
12
|
+
|
|
13
|
+
Also accepts all standard `<button>` attributes via `...restProps`.
|
|
14
|
+
|
|
15
|
+
## Animation details
|
|
16
|
+
|
|
17
|
+
All animations are pure CSS via Tailwind `group-hover` utilities, no JS required:
|
|
18
|
+
|
|
19
|
+
- **Dot**: `scale-1` -> `scale-[100.8]` fills the button background with `bg-primary`
|
|
20
|
+
- **Initial text**: slides right (`translate-x-12`) and fades out (`opacity-0`)
|
|
21
|
+
- **Hover text + arrow**: slides in from right (`-translate-x-5`) and fades in (`opacity-100`)
|
|
22
|
+
- All transitions use `duration-300`
|
|
23
|
+
|
|
24
|
+
## Porting notes
|
|
25
|
+
|
|
26
|
+
- Direct port, no structural changes needed
|
|
27
|
+
- Inline SVG arrow (no Lucide dependency)
|
|
28
|
+
- Uses theme tokens: `bg-background`, `bg-primary`, `text-primary-foreground`
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* LetterPullup - Staggered letter pull-up animation
|
|
4
|
+
*
|
|
5
|
+
* Each letter of the provided text pulls up from below with a staggered delay,
|
|
6
|
+
* creating a wave-like entrance effect. Pure CSS animation.
|
|
7
|
+
*/
|
|
8
|
+
export interface LetterPullupProps {
|
|
9
|
+
/** Text to animate (each character gets its own animation) */
|
|
10
|
+
words: string;
|
|
11
|
+
/** Delay between each letter animation (seconds) */
|
|
12
|
+
delay?: number;
|
|
13
|
+
/** Additional CSS classes */
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { cn } from "../../utils.js";
|
|
20
|
+
|
|
21
|
+
let { words, delay = 0.05, class: className }: LetterPullupProps = $props();
|
|
22
|
+
|
|
23
|
+
let letters = $derived(words.split(""));
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<div class="letter-pullup flex justify-center">
|
|
27
|
+
{#each letters as letter, index (index)}
|
|
28
|
+
<span
|
|
29
|
+
class={cn(
|
|
30
|
+
"letter-pullup-char inline-block text-center text-4xl font-bold tracking-[-0.02em] text-black drop-shadow-sm md:leading-[5rem] dark:text-white",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
style="animation:letterPullUp 0.5s ease forwards;animation-delay:{index *
|
|
34
|
+
delay}s;opacity:0;transform:translateY(100px)"
|
|
35
|
+
>
|
|
36
|
+
{#if letter === " "}
|
|
37
|
+
|
|
38
|
+
{:else}
|
|
39
|
+
{letter}
|
|
40
|
+
{/if}
|
|
41
|
+
</span>
|
|
42
|
+
{/each}
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<style>
|
|
46
|
+
:global {
|
|
47
|
+
@keyframes letterPullUp {
|
|
48
|
+
0% {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
transform: translateY(100px);
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
transform: translateY(0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LetterPullup - Staggered letter pull-up animation
|
|
3
|
+
*
|
|
4
|
+
* Each letter of the provided text pulls up from below with a staggered delay,
|
|
5
|
+
* creating a wave-like entrance effect. Pure CSS animation.
|
|
6
|
+
*/
|
|
7
|
+
export interface LetterPullupProps {
|
|
8
|
+
/** Text to animate (each character gets its own animation) */
|
|
9
|
+
words: string;
|
|
10
|
+
/** Delay between each letter animation (seconds) */
|
|
11
|
+
delay?: number;
|
|
12
|
+
/** Additional CSS classes */
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const LetterPullup: import("svelte").Component<LetterPullupProps, {}, "">;
|
|
16
|
+
type LetterPullup = ReturnType<typeof LetterPullup>;
|
|
17
|
+
export default LetterPullup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, describe, it, expect } from "vitest";
|
|
3
|
+
import LetterPullup from "./LetterPullup.svelte";
|
|
4
|
+
describe("LetterPullup", () => {
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
it("renders one span per character", () => {
|
|
7
|
+
const { container } = render(LetterPullup, { props: { words: "Hello" } });
|
|
8
|
+
const chars = container.querySelectorAll(".letter-pullup-char");
|
|
9
|
+
expect(chars.length).toBe(5);
|
|
10
|
+
});
|
|
11
|
+
it("renders spaces as non-breaking spaces", () => {
|
|
12
|
+
const { container } = render(LetterPullup, { props: { words: "A B" } });
|
|
13
|
+
const chars = container.querySelectorAll(".letter-pullup-char");
|
|
14
|
+
expect(chars.length).toBe(3);
|
|
15
|
+
expect(chars[1].innerHTML).toContain(" ");
|
|
16
|
+
});
|
|
17
|
+
it("applies staggered animation delays", () => {
|
|
18
|
+
const { container } = render(LetterPullup, {
|
|
19
|
+
props: { words: "AB", delay: 0.1 },
|
|
20
|
+
});
|
|
21
|
+
const chars = container.querySelectorAll(".letter-pullup-char");
|
|
22
|
+
const style0 = chars[0].getAttribute("style") ?? "";
|
|
23
|
+
const style1 = chars[1].getAttribute("style") ?? "";
|
|
24
|
+
expect(style0).toContain("animation-delay");
|
|
25
|
+
expect(style0).toMatch(/animation-delay:\s*0s/);
|
|
26
|
+
expect(style1).toContain("animation-delay");
|
|
27
|
+
expect(style1).toMatch(/animation-delay:\s*0\.1s/);
|
|
28
|
+
});
|
|
29
|
+
it("applies custom class names", () => {
|
|
30
|
+
const { container } = render(LetterPullup, {
|
|
31
|
+
props: { words: "Hi", class: "my-pullup" },
|
|
32
|
+
});
|
|
33
|
+
const chars = container.querySelectorAll(".letter-pullup-char");
|
|
34
|
+
chars.forEach((char) => {
|
|
35
|
+
expect(char.className).toContain("my-pullup");
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
it("has pull-up animation style", () => {
|
|
39
|
+
const { container } = render(LetterPullup, { props: { words: "X" } });
|
|
40
|
+
const char = container.querySelector(".letter-pullup-char");
|
|
41
|
+
const style = char.getAttribute("style") ?? "";
|
|
42
|
+
expect(style).toContain("letterPullUp");
|
|
43
|
+
});
|
|
44
|
+
it("renders correct text content", () => {
|
|
45
|
+
const { container } = render(LetterPullup, { props: { words: "Test" } });
|
|
46
|
+
const wrapper = container.querySelector(".letter-pullup");
|
|
47
|
+
expect(wrapper?.textContent).toContain("Test");
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# LetterPullup
|
|
2
|
+
|
|
3
|
+
Staggered letter pull-up animation. Each character pulls up from below with a configurable delay between letters, creating a wave-like entrance effect.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
| ------- | -------- | ------- | ------------------------------------------- |
|
|
9
|
+
| `words` | `string` | required| Text to animate |
|
|
10
|
+
| `delay` | `number` | `0.05` | Delay between each letter animation (secs) |
|
|
11
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<LetterPullup words="Hello World" />
|
|
17
|
+
<LetterPullup words="Slow reveal" delay={0.1} />
|
|
18
|
+
```
|