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,204 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../utils";
|
|
3
|
+
import { onMount } from "svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
radius?: number;
|
|
8
|
+
border?: number;
|
|
9
|
+
lightness?: number;
|
|
10
|
+
displace?: number;
|
|
11
|
+
blend?: string;
|
|
12
|
+
xChannel?: "R" | "G" | "B";
|
|
13
|
+
yChannel?: "R" | "G" | "B";
|
|
14
|
+
alpha?: number;
|
|
15
|
+
blur?: number;
|
|
16
|
+
rOffset?: number;
|
|
17
|
+
gOffset?: number;
|
|
18
|
+
bOffset?: number;
|
|
19
|
+
scale?: number;
|
|
20
|
+
frost?: number;
|
|
21
|
+
class?: string;
|
|
22
|
+
containerClass?: string;
|
|
23
|
+
children?: Snippet;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
radius = 16,
|
|
28
|
+
border: borderProp = 0.07,
|
|
29
|
+
lightness = 50,
|
|
30
|
+
displace,
|
|
31
|
+
blend = "difference",
|
|
32
|
+
xChannel = "R",
|
|
33
|
+
yChannel = "B",
|
|
34
|
+
alpha = 0.93,
|
|
35
|
+
blur = 11,
|
|
36
|
+
rOffset = 0,
|
|
37
|
+
gOffset = 10,
|
|
38
|
+
bOffset = 20,
|
|
39
|
+
scale = -180,
|
|
40
|
+
frost = 0.05,
|
|
41
|
+
class: className = "",
|
|
42
|
+
containerClass = "",
|
|
43
|
+
children,
|
|
44
|
+
}: Props = $props();
|
|
45
|
+
|
|
46
|
+
let liquidGlassRoot: HTMLDivElement;
|
|
47
|
+
let dimensions = $state({ width: 0, height: 0 });
|
|
48
|
+
let filterId = $state("");
|
|
49
|
+
|
|
50
|
+
let displacementImage = $derived.by(() => {
|
|
51
|
+
const brd = Math.min(dimensions.width, dimensions.height) * (borderProp * 0.5);
|
|
52
|
+
|
|
53
|
+
return `<svg viewBox="0 0 ${dimensions.width} ${dimensions.height}" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="red-${filterId}" x1="100%" y1="0%" x2="0%" y2="0%"><stop offset="0%" stop-color="#0000"/><stop offset="100%" stop-color="red"/></linearGradient><linearGradient id="blue-${filterId}" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="#0000"/><stop offset="100%" stop-color="blue"/></linearGradient></defs><rect x="0" y="0" width="${dimensions.width}" height="${dimensions.height}" fill="black"/><rect x="0" y="0" width="${dimensions.width}" height="${dimensions.height}" rx="${radius}" fill="url(#red-${filterId})"/><rect x="0" y="0" width="${dimensions.width}" height="${dimensions.height}" rx="${radius}" fill="url(#blue-${filterId})" style="mix-blend-mode:${blend}"/><rect x="${brd}" y="${brd}" width="${dimensions.width - brd * 2}" height="${dimensions.height - brd * 2}" rx="${radius}" fill="hsl(0 0% ${lightness}% / ${alpha})" style="filter:blur(${blur}px)"/></svg>`;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
let displacementDataUri = $derived(`data:image/svg+xml,${encodeURIComponent(displacementImage)}`);
|
|
57
|
+
|
|
58
|
+
let backdropStyle = $derived(
|
|
59
|
+
filterId
|
|
60
|
+
? `--frost:${frost};border-radius:${radius}px;backdrop-filter:url(#displacementFilter-${filterId});`
|
|
61
|
+
: `--frost:${frost};border-radius:${radius}px;`
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
onMount(() => {
|
|
65
|
+
filterId = `lg-${Math.random().toString(36).slice(2, 8)}`;
|
|
66
|
+
|
|
67
|
+
if (!liquidGlassRoot) return;
|
|
68
|
+
|
|
69
|
+
const observer = new ResizeObserver((entries) => {
|
|
70
|
+
const entry = entries[0];
|
|
71
|
+
if (!entry) return;
|
|
72
|
+
|
|
73
|
+
let width = 0;
|
|
74
|
+
let height = 0;
|
|
75
|
+
|
|
76
|
+
if (entry.borderBoxSize && entry.borderBoxSize.length) {
|
|
77
|
+
width = entry.borderBoxSize[0]!.inlineSize;
|
|
78
|
+
height = entry.borderBoxSize[0]!.blockSize;
|
|
79
|
+
} else if (entry.contentRect) {
|
|
80
|
+
width = entry.contentRect.width;
|
|
81
|
+
height = entry.contentRect.height;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
dimensions = { width, height };
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
observer.observe(liquidGlassRoot);
|
|
88
|
+
|
|
89
|
+
return () => observer.disconnect();
|
|
90
|
+
});
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<div
|
|
94
|
+
bind:this={liquidGlassRoot}
|
|
95
|
+
class={cn("liquid-glass-effect", containerClass)}
|
|
96
|
+
style={backdropStyle}
|
|
97
|
+
>
|
|
98
|
+
<div class={cn("liquid-glass-slot", className)}>
|
|
99
|
+
{#if children}
|
|
100
|
+
{@render children()}
|
|
101
|
+
{/if}
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
{#if filterId}
|
|
105
|
+
<svg class="liquid-glass-filter" xmlns="http://www.w3.org/2000/svg">
|
|
106
|
+
<defs>
|
|
107
|
+
<filter id="displacementFilter-{filterId}" color-interpolation-filters="sRGB">
|
|
108
|
+
<feImage x="0" y="0" width="100%" height="100%" href={displacementDataUri} result="map" />
|
|
109
|
+
<feDisplacementMap
|
|
110
|
+
in="SourceGraphic"
|
|
111
|
+
in2="map"
|
|
112
|
+
xChannelSelector={xChannel}
|
|
113
|
+
yChannelSelector={yChannel}
|
|
114
|
+
scale={scale + rOffset}
|
|
115
|
+
result="dispRed"
|
|
116
|
+
/>
|
|
117
|
+
<feColorMatrix
|
|
118
|
+
in="dispRed"
|
|
119
|
+
type="matrix"
|
|
120
|
+
values="1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"
|
|
121
|
+
result="red"
|
|
122
|
+
/>
|
|
123
|
+
<feDisplacementMap
|
|
124
|
+
in="SourceGraphic"
|
|
125
|
+
in2="map"
|
|
126
|
+
xChannelSelector={xChannel}
|
|
127
|
+
yChannelSelector={yChannel}
|
|
128
|
+
scale={scale + gOffset}
|
|
129
|
+
result="dispGreen"
|
|
130
|
+
/>
|
|
131
|
+
<feColorMatrix
|
|
132
|
+
in="dispGreen"
|
|
133
|
+
type="matrix"
|
|
134
|
+
values="0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0"
|
|
135
|
+
result="green"
|
|
136
|
+
/>
|
|
137
|
+
<feDisplacementMap
|
|
138
|
+
in="SourceGraphic"
|
|
139
|
+
in2="map"
|
|
140
|
+
xChannelSelector={xChannel}
|
|
141
|
+
yChannelSelector={yChannel}
|
|
142
|
+
scale={scale + bOffset}
|
|
143
|
+
result="dispBlue"
|
|
144
|
+
/>
|
|
145
|
+
<feColorMatrix
|
|
146
|
+
in="dispBlue"
|
|
147
|
+
type="matrix"
|
|
148
|
+
values="0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0"
|
|
149
|
+
result="blue"
|
|
150
|
+
/>
|
|
151
|
+
<feBlend in="red" in2="green" mode="screen" result="rg" />
|
|
152
|
+
<feBlend in="rg" in2="blue" mode="screen" result="output" />
|
|
153
|
+
{#if displace !== undefined}
|
|
154
|
+
<feGaussianBlur stdDeviation={displace} />
|
|
155
|
+
{/if}
|
|
156
|
+
</filter>
|
|
157
|
+
</defs>
|
|
158
|
+
</svg>
|
|
159
|
+
{/if}
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<style>
|
|
163
|
+
.liquid-glass-effect {
|
|
164
|
+
position: relative;
|
|
165
|
+
display: block;
|
|
166
|
+
opacity: 1;
|
|
167
|
+
border-radius: inherit;
|
|
168
|
+
background: light-dark(hsl(0 0% 100% / var(--frost, 0)), hsl(0 0% 0% / var(--frost, 0)));
|
|
169
|
+
box-shadow:
|
|
170
|
+
0 0 2px 1px
|
|
171
|
+
light-dark(
|
|
172
|
+
color-mix(in oklch, canvasText, #0000 85%),
|
|
173
|
+
color-mix(in oklch, canvasText, #0000 90%)
|
|
174
|
+
)
|
|
175
|
+
inset,
|
|
176
|
+
0 0 10px 4px
|
|
177
|
+
light-dark(
|
|
178
|
+
color-mix(in oklch, canvasText, #0000 90%),
|
|
179
|
+
color-mix(in oklch, canvasText, #0000 95%)
|
|
180
|
+
)
|
|
181
|
+
inset,
|
|
182
|
+
0px 4px 16px rgba(17, 17, 26, 0.05),
|
|
183
|
+
0px 8px 24px rgba(17, 17, 26, 0.05),
|
|
184
|
+
0px 16px 56px rgba(17, 17, 26, 0.05),
|
|
185
|
+
0px 4px 16px rgba(17, 17, 26, 0.05) inset,
|
|
186
|
+
0px 8px 24px rgba(17, 17, 26, 0.05) inset,
|
|
187
|
+
0px 16px 56px rgba(17, 17, 26, 0.05) inset;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.liquid-glass-slot {
|
|
191
|
+
width: 100%;
|
|
192
|
+
height: 100%;
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
border-radius: inherit;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.liquid-glass-filter {
|
|
198
|
+
position: absolute;
|
|
199
|
+
inset: 0;
|
|
200
|
+
width: 100%;
|
|
201
|
+
height: 100%;
|
|
202
|
+
pointer-events: none;
|
|
203
|
+
}
|
|
204
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
radius?: number;
|
|
4
|
+
border?: number;
|
|
5
|
+
lightness?: number;
|
|
6
|
+
displace?: number;
|
|
7
|
+
blend?: string;
|
|
8
|
+
xChannel?: "R" | "G" | "B";
|
|
9
|
+
yChannel?: "R" | "G" | "B";
|
|
10
|
+
alpha?: number;
|
|
11
|
+
blur?: number;
|
|
12
|
+
rOffset?: number;
|
|
13
|
+
gOffset?: number;
|
|
14
|
+
bOffset?: number;
|
|
15
|
+
scale?: number;
|
|
16
|
+
frost?: number;
|
|
17
|
+
class?: string;
|
|
18
|
+
containerClass?: string;
|
|
19
|
+
children?: Snippet;
|
|
20
|
+
}
|
|
21
|
+
declare const LiquidGlass: import("svelte").Component<Props, {}, "">;
|
|
22
|
+
type LiquidGlass = ReturnType<typeof LiquidGlass>;
|
|
23
|
+
export default LiquidGlass;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, beforeEach, describe, it, expect, vi } from "vitest";
|
|
3
|
+
import LiquidGlass from "./LiquidGlass.svelte";
|
|
4
|
+
describe("LiquidGlass", () => {
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
// Mock ResizeObserver (not available in jsdom)
|
|
7
|
+
vi.stubGlobal("ResizeObserver", class {
|
|
8
|
+
observe = vi.fn();
|
|
9
|
+
unobserve = vi.fn();
|
|
10
|
+
disconnect = vi.fn();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
afterEach(cleanup);
|
|
14
|
+
it("renders the component", () => {
|
|
15
|
+
const { container } = render(LiquidGlass);
|
|
16
|
+
const wrapper = container.querySelector(".liquid-glass-effect");
|
|
17
|
+
expect(wrapper).toBeInTheDocument();
|
|
18
|
+
});
|
|
19
|
+
it("renders slot container", () => {
|
|
20
|
+
const { container } = render(LiquidGlass);
|
|
21
|
+
const slot = container.querySelector(".liquid-glass-slot");
|
|
22
|
+
expect(slot).toBeInTheDocument();
|
|
23
|
+
});
|
|
24
|
+
it("applies custom container class", () => {
|
|
25
|
+
const { container } = render(LiquidGlass, {
|
|
26
|
+
props: { containerClass: "my-container" },
|
|
27
|
+
});
|
|
28
|
+
const wrapper = container.querySelector(".liquid-glass-effect");
|
|
29
|
+
expect(wrapper?.className).toContain("my-container");
|
|
30
|
+
});
|
|
31
|
+
it("applies custom class to slot container", () => {
|
|
32
|
+
const { container } = render(LiquidGlass, { props: { class: "my-slot" } });
|
|
33
|
+
const slot = container.querySelector(".liquid-glass-slot");
|
|
34
|
+
expect(slot?.className).toContain("my-slot");
|
|
35
|
+
});
|
|
36
|
+
it("sets frost CSS variable", () => {
|
|
37
|
+
const { container } = render(LiquidGlass, { props: { frost: 0.1 } });
|
|
38
|
+
const wrapper = container.querySelector(".liquid-glass-effect");
|
|
39
|
+
expect(wrapper.getAttribute("style")).toContain("--frost");
|
|
40
|
+
expect(wrapper.getAttribute("style")).toContain("0.1");
|
|
41
|
+
});
|
|
42
|
+
it("sets border radius", () => {
|
|
43
|
+
const { container } = render(LiquidGlass, { props: { radius: 24 } });
|
|
44
|
+
const wrapper = container.querySelector(".liquid-glass-effect");
|
|
45
|
+
expect(wrapper.getAttribute("style")).toContain("border-radius");
|
|
46
|
+
expect(wrapper.getAttribute("style")).toContain("24px");
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# LiquidGlass
|
|
2
|
+
|
|
3
|
+
A glass-like visual effect using SVG filters for chromatic displacement, creating a liquid glass refraction look. Uses `backdrop-filter` with an inline SVG displacement map.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
| ---------------- | ------------- | -------------- | ------------------------------------ |
|
|
9
|
+
| `radius` | `number` | `16` | Border radius in px |
|
|
10
|
+
| `border` | `number` | `0.07` | Border thickness factor |
|
|
11
|
+
| `lightness` | `number` | `50` | HSL lightness of fill |
|
|
12
|
+
| `displace` | `number` | — | Gaussian blur std deviation |
|
|
13
|
+
| `blend` | `string` | `"difference"` | SVG blend mode |
|
|
14
|
+
| `xChannel` | `"R"\|"G"\|"B"` | `"R"` | X displacement channel |
|
|
15
|
+
| `yChannel` | `"R"\|"G"\|"B"` | `"B"` | Y displacement channel |
|
|
16
|
+
| `alpha` | `number` | `0.93` | Fill opacity |
|
|
17
|
+
| `blur` | `number` | `11` | Inner blur |
|
|
18
|
+
| `rOffset` | `number` | `0` | Red channel offset |
|
|
19
|
+
| `gOffset` | `number` | `10` | Green channel offset |
|
|
20
|
+
| `bOffset` | `number` | `20` | Blue channel offset |
|
|
21
|
+
| `scale` | `number` | `-180` | Displacement scale |
|
|
22
|
+
| `frost` | `number` | `0.05` | Frosted overlay opacity |
|
|
23
|
+
| `class` | `string` | `""` | CSS classes for inner container |
|
|
24
|
+
| `containerClass` | `string` | `""` | CSS classes for outer container |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```svelte
|
|
29
|
+
<LiquidGlass containerClass="w-64 h-40">
|
|
30
|
+
<div class="p-4 text-white">Glass content</div>
|
|
31
|
+
</LiquidGlass>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Note**: This component uses `position: fixed` and `backdrop-filter` with SVG filters. Place it over content to see the refraction effect.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LiquidGlass } from "./LiquidGlass.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LiquidGlass } from "./LiquidGlass.svelte";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export interface Logo {
|
|
3
|
+
name: string;
|
|
4
|
+
path: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface AnimatedLogoCloudProps {
|
|
8
|
+
/** Additional CSS classes for the scrolling container */
|
|
9
|
+
class?: string;
|
|
10
|
+
/** Optional title displayed above the logos */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Array of logos with name and image path */
|
|
13
|
+
logos?: Logo[];
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
import { cn } from "../../utils.js";
|
|
19
|
+
|
|
20
|
+
let { class: className, title, logos = [] }: AnimatedLogoCloudProps = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div class="w-full py-12">
|
|
24
|
+
<div class="mx-auto w-full px-4 md:px-8">
|
|
25
|
+
{#if title}
|
|
26
|
+
<div class="text-muted-foreground text-center font-medium">
|
|
27
|
+
{title}
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
30
|
+
<div
|
|
31
|
+
class={cn("logo-cloud-mask group relative mt-6 flex gap-6 overflow-hidden p-2", className)}
|
|
32
|
+
>
|
|
33
|
+
{#each { length: 5 } as _}
|
|
34
|
+
<div class="logo-cloud-scroll flex shrink-0 flex-row justify-around gap-6">
|
|
35
|
+
{#each logos as logo}
|
|
36
|
+
<img src={logo.path} alt={logo.name} class="h-10 w-28 px-2 brightness-0 dark:invert" />
|
|
37
|
+
{/each}
|
|
38
|
+
</div>
|
|
39
|
+
{/each}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
.logo-cloud-mask {
|
|
46
|
+
mask-image: linear-gradient(to left, transparent 0%, black 20%, black 80%, transparent 95%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.logo-cloud-scroll {
|
|
50
|
+
animation: logo-cloud-scroll 30s linear infinite;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes logo-cloud-scroll {
|
|
54
|
+
0% {
|
|
55
|
+
transform: translateX(0);
|
|
56
|
+
}
|
|
57
|
+
100% {
|
|
58
|
+
transform: translateX(calc(-100% - 1.5rem));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Logo {
|
|
2
|
+
name: string;
|
|
3
|
+
path: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AnimatedLogoCloudProps {
|
|
6
|
+
/** Additional CSS classes for the scrolling container */
|
|
7
|
+
class?: string;
|
|
8
|
+
/** Optional title displayed above the logos */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Array of logos with name and image path */
|
|
11
|
+
logos?: Logo[];
|
|
12
|
+
}
|
|
13
|
+
declare const AnimatedLogoCloud: import("svelte").Component<AnimatedLogoCloudProps, {}, "">;
|
|
14
|
+
type AnimatedLogoCloud = ReturnType<typeof AnimatedLogoCloud>;
|
|
15
|
+
export default AnimatedLogoCloud;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, describe, it, expect } from "vitest";
|
|
3
|
+
import { AnimatedLogoCloud } from "./index";
|
|
4
|
+
const mockLogos = [
|
|
5
|
+
{ name: "Svelte", path: "/svelte.svg" },
|
|
6
|
+
{ name: "React", path: "/react.svg" },
|
|
7
|
+
];
|
|
8
|
+
describe("AnimatedLogoCloud", () => {
|
|
9
|
+
afterEach(cleanup);
|
|
10
|
+
it("renders a container div", () => {
|
|
11
|
+
const { container } = render(AnimatedLogoCloud, {
|
|
12
|
+
props: { logos: mockLogos },
|
|
13
|
+
});
|
|
14
|
+
const mask = container.querySelector(".logo-cloud-mask");
|
|
15
|
+
expect(mask).toBeInTheDocument();
|
|
16
|
+
});
|
|
17
|
+
it("renders 5 scroll groups", () => {
|
|
18
|
+
const { container } = render(AnimatedLogoCloud, {
|
|
19
|
+
props: { logos: mockLogos },
|
|
20
|
+
});
|
|
21
|
+
const scrolls = container.querySelectorAll(".logo-cloud-scroll");
|
|
22
|
+
expect(scrolls.length).toBe(5);
|
|
23
|
+
});
|
|
24
|
+
it("renders correct number of logo images per group", () => {
|
|
25
|
+
const { container } = render(AnimatedLogoCloud, {
|
|
26
|
+
props: { logos: mockLogos },
|
|
27
|
+
});
|
|
28
|
+
const firstGroup = container.querySelector(".logo-cloud-scroll");
|
|
29
|
+
const imgs = firstGroup?.querySelectorAll("img");
|
|
30
|
+
expect(imgs?.length).toBe(2);
|
|
31
|
+
});
|
|
32
|
+
it("sets correct alt on logo images", () => {
|
|
33
|
+
const { container } = render(AnimatedLogoCloud, {
|
|
34
|
+
props: { logos: mockLogos },
|
|
35
|
+
});
|
|
36
|
+
const img = container.querySelector("img");
|
|
37
|
+
expect(img).toHaveAttribute("alt", "Svelte");
|
|
38
|
+
});
|
|
39
|
+
it("renders title when provided", () => {
|
|
40
|
+
const { container } = render(AnimatedLogoCloud, {
|
|
41
|
+
props: { logos: mockLogos, title: "Our Partners" },
|
|
42
|
+
});
|
|
43
|
+
expect(container.textContent).toContain("Our Partners");
|
|
44
|
+
});
|
|
45
|
+
it("does not render title when not provided", () => {
|
|
46
|
+
const { container } = render(AnimatedLogoCloud, {
|
|
47
|
+
props: { logos: mockLogos },
|
|
48
|
+
});
|
|
49
|
+
const titleDiv = container.querySelector(".text-center");
|
|
50
|
+
expect(titleDiv).not.toBeInTheDocument();
|
|
51
|
+
});
|
|
52
|
+
it("applies custom class names", () => {
|
|
53
|
+
const { container } = render(AnimatedLogoCloud, {
|
|
54
|
+
props: { logos: mockLogos, class: "custom-cloud" },
|
|
55
|
+
});
|
|
56
|
+
const mask = container.querySelector(".logo-cloud-mask");
|
|
57
|
+
expect(mask?.className).toContain("custom-cloud");
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export interface IconLogoCloudProps {
|
|
3
|
+
/** Additional CSS classes for the grid container */
|
|
4
|
+
class?: string;
|
|
5
|
+
/** Optional title displayed above the logos */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Array of logos with name and image path */
|
|
8
|
+
logos?: import("./AnimatedLogoCloud.svelte").Logo[];
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { cn } from "../../utils.js";
|
|
14
|
+
|
|
15
|
+
let { class: className, title, logos = [] }: IconLogoCloudProps = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div class="w-full py-12">
|
|
19
|
+
<div class="flex w-full flex-col items-center justify-center gap-6 px-4 md:px-8">
|
|
20
|
+
{#if title}
|
|
21
|
+
<div class="text-muted-foreground font-medium">
|
|
22
|
+
{title}
|
|
23
|
+
</div>
|
|
24
|
+
{/if}
|
|
25
|
+
<div class={cn("grid grid-cols-3 md:grid-cols-8 lg:grid-cols-8", className)}>
|
|
26
|
+
{#each logos as logo}
|
|
27
|
+
<img src={logo.path} alt={logo.name} class="h-7 w-12 px-2 brightness-0 dark:invert" />
|
|
28
|
+
{/each}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IconLogoCloudProps {
|
|
2
|
+
/** Additional CSS classes for the grid container */
|
|
3
|
+
class?: string;
|
|
4
|
+
/** Optional title displayed above the logos */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Array of logos with name and image path */
|
|
7
|
+
logos?: import("./AnimatedLogoCloud.svelte").Logo[];
|
|
8
|
+
}
|
|
9
|
+
declare const IconLogoCloud: import("svelte").Component<IconLogoCloudProps, {}, "">;
|
|
10
|
+
type IconLogoCloud = ReturnType<typeof IconLogoCloud>;
|
|
11
|
+
export default IconLogoCloud;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# LogoCloud
|
|
2
|
+
|
|
3
|
+
Logo display components in three variants: animated marquee, static grid, and compact icon grid.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { AnimatedLogoCloud, StaticLogoCloud, IconLogoCloud } from '$lib/fancy-ui/logo-cloud';
|
|
10
|
+
|
|
11
|
+
const logos = [
|
|
12
|
+
{ name: 'Vercel', path: '/logos/vercel.svg' },
|
|
13
|
+
{ name: 'Next.js', path: '/logos/nextjs.svg' },
|
|
14
|
+
];
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<AnimatedLogoCloud title="Trusted by" {logos} />
|
|
18
|
+
<StaticLogoCloud title="Our Partners" {logos} />
|
|
19
|
+
<IconLogoCloud title="Built with" {logos} />
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Variants
|
|
23
|
+
|
|
24
|
+
| Component | Description |
|
|
25
|
+
|-----------|-------------|
|
|
26
|
+
| `AnimatedLogoCloud` | Infinite horizontal scroll with fade mask |
|
|
27
|
+
| `StaticLogoCloud` | Responsive grid layout |
|
|
28
|
+
| `IconLogoCloud` | Compact icon-sized grid |
|
|
29
|
+
|
|
30
|
+
## Props (shared)
|
|
31
|
+
|
|
32
|
+
| Prop | Type | Default | Description |
|
|
33
|
+
|------|------|---------|-------------|
|
|
34
|
+
| `class` | `string` | - | Classes on the container |
|
|
35
|
+
| `title` | `string` | - | Optional heading text |
|
|
36
|
+
| `logos` | `Logo[]` | `[]` | Array of `{ name, path }` objects |
|
|
37
|
+
|
|
38
|
+
## Implementation Notes
|
|
39
|
+
|
|
40
|
+
- Images use `brightness-0 dark:invert` for monochrome display that adapts to theme
|
|
41
|
+
- Animated variant duplicates logos 5x for seamless infinite scroll
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export interface StaticLogoCloudProps {
|
|
3
|
+
/** Additional CSS classes for the grid container */
|
|
4
|
+
class?: string;
|
|
5
|
+
/** Optional title displayed above the logos */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Array of logos with name and image path */
|
|
8
|
+
logos?: import("./AnimatedLogoCloud.svelte").Logo[];
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { cn } from "../../utils.js";
|
|
14
|
+
|
|
15
|
+
let { class: className, title, logos = [] }: StaticLogoCloudProps = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div class="w-full py-12">
|
|
19
|
+
<div class="flex w-full flex-col items-center justify-center gap-4 px-4 md:px-8">
|
|
20
|
+
{#if title}
|
|
21
|
+
<div class="text-muted-foreground font-medium uppercase">
|
|
22
|
+
{title}
|
|
23
|
+
</div>
|
|
24
|
+
{/if}
|
|
25
|
+
<div class={cn("grid grid-cols-3 gap-x-4 md:grid-cols-5 lg:grid-cols-8", className)}>
|
|
26
|
+
{#each logos as logo}
|
|
27
|
+
<img src={logo.path} alt={logo.name} class="h-10 w-28 px-2 brightness-0 dark:invert" />
|
|
28
|
+
{/each}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface StaticLogoCloudProps {
|
|
2
|
+
/** Additional CSS classes for the grid container */
|
|
3
|
+
class?: string;
|
|
4
|
+
/** Optional title displayed above the logos */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Array of logos with name and image path */
|
|
7
|
+
logos?: import("./AnimatedLogoCloud.svelte").Logo[];
|
|
8
|
+
}
|
|
9
|
+
declare const StaticLogoCloud: import("svelte").Component<StaticLogoCloudProps, {}, "">;
|
|
10
|
+
type StaticLogoCloud = ReturnType<typeof StaticLogoCloud>;
|
|
11
|
+
export default StaticLogoCloud;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import AnimatedLogoCloud, { type AnimatedLogoCloudProps, type Logo } from "./AnimatedLogoCloud.svelte";
|
|
2
|
+
import StaticLogoCloud, { type StaticLogoCloudProps } from "./StaticLogoCloud.svelte";
|
|
3
|
+
import IconLogoCloud, { type IconLogoCloudProps } from "./IconLogoCloud.svelte";
|
|
4
|
+
export { AnimatedLogoCloud, StaticLogoCloud, IconLogoCloud, type AnimatedLogoCloudProps, type StaticLogoCloudProps, type IconLogoCloudProps, type Logo, };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../utils.js";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
reverse?: boolean;
|
|
7
|
+
pauseOnHover?: boolean;
|
|
8
|
+
vertical?: boolean;
|
|
9
|
+
repeat?: number;
|
|
10
|
+
children?: import("svelte").Snippet;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
class: className,
|
|
15
|
+
reverse = false,
|
|
16
|
+
pauseOnHover = false,
|
|
17
|
+
vertical = false,
|
|
18
|
+
repeat = 4,
|
|
19
|
+
children,
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div
|
|
24
|
+
class={cn(
|
|
25
|
+
"group flex [gap:var(--gap)] overflow-hidden p-2 [--duration:40s] [--gap:1rem]",
|
|
26
|
+
vertical ? "flex-col" : "flex-row",
|
|
27
|
+
className
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
{#each Array(repeat) as _, index (index)}
|
|
31
|
+
<div
|
|
32
|
+
class={cn(
|
|
33
|
+
"flex shrink-0 justify-around [gap:var(--gap)]",
|
|
34
|
+
vertical ? "animate-marquee-vertical flex-col" : "animate-marquee flex-row",
|
|
35
|
+
pauseOnHover ? "group-hover:[animation-play-state:paused]" : ""
|
|
36
|
+
)}
|
|
37
|
+
style="animation-direction: {reverse ? 'reverse' : 'normal'};"
|
|
38
|
+
>
|
|
39
|
+
{@render children?.()}
|
|
40
|
+
</div>
|
|
41
|
+
{/each}
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
.animate-marquee {
|
|
46
|
+
animation: marquee var(--duration) linear infinite;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.animate-marquee-vertical {
|
|
50
|
+
animation: marquee-vertical var(--duration) linear infinite;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes marquee {
|
|
54
|
+
from {
|
|
55
|
+
transform: translateX(0);
|
|
56
|
+
}
|
|
57
|
+
to {
|
|
58
|
+
transform: translateX(calc(-100% - var(--gap)));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes marquee-vertical {
|
|
63
|
+
from {
|
|
64
|
+
transform: translateY(0);
|
|
65
|
+
}
|
|
66
|
+
to {
|
|
67
|
+
transform: translateY(calc(-100% - var(--gap)));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</style>
|