@lexsis/storefront-components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PageRenderer.d.ts +8 -0
- package/dist/PageRenderer.d.ts.map +1 -0
- package/dist/PageRenderer.js +116 -0
- package/dist/PageRenderer.js.map +1 -0
- package/dist/SectionSkeleton.d.ts +2 -0
- package/dist/SectionSkeleton.d.ts.map +1 -0
- package/dist/SectionSkeleton.js +5 -0
- package/dist/SectionSkeleton.js.map +1 -0
- package/dist/ThemeContext.d.ts +11 -0
- package/dist/ThemeContext.d.ts.map +1 -0
- package/dist/ThemeContext.js +13 -0
- package/dist/ThemeContext.js.map +1 -0
- package/dist/ThemeProvider.d.ts +9 -0
- package/dist/ThemeProvider.d.ts.map +1 -0
- package/dist/ThemeProvider.js +227 -0
- package/dist/ThemeProvider.js.map +1 -0
- package/dist/ThemeToggle.d.ts +6 -0
- package/dist/ThemeToggle.d.ts.map +1 -0
- package/dist/ThemeToggle.js +26 -0
- package/dist/ThemeToggle.js.map +1 -0
- package/dist/animations/advanced-hooks.d.ts +36 -0
- package/dist/animations/advanced-hooks.d.ts.map +1 -0
- package/dist/animations/advanced-hooks.js +106 -0
- package/dist/animations/advanced-hooks.js.map +1 -0
- package/dist/animations/canvas-utils.d.ts +41 -0
- package/dist/animations/canvas-utils.d.ts.map +1 -0
- package/dist/animations/canvas-utils.js +115 -0
- package/dist/animations/canvas-utils.js.map +1 -0
- package/dist/animations/hooks.d.ts +48 -0
- package/dist/animations/hooks.d.ts.map +1 -0
- package/dist/animations/hooks.js +50 -0
- package/dist/animations/hooks.js.map +1 -0
- package/dist/animations/index.d.ts +4 -0
- package/dist/animations/index.d.ts.map +1 -0
- package/dist/animations/index.js +4 -0
- package/dist/animations/index.js.map +1 -0
- package/dist/animations/presets.d.ts +43 -0
- package/dist/animations/presets.d.ts.map +1 -0
- package/dist/animations/presets.js +278 -0
- package/dist/animations/presets.js.map +1 -0
- package/dist/animations/variants.d.ts +15 -0
- package/dist/animations/variants.d.ts.map +1 -0
- package/dist/animations/variants.js +90 -0
- package/dist/animations/variants.js.map +1 -0
- package/dist/backgrounds/BackgroundSection.d.ts +3 -0
- package/dist/backgrounds/BackgroundSection.d.ts.map +1 -0
- package/dist/backgrounds/BackgroundSection.js +205 -0
- package/dist/backgrounds/BackgroundSection.js.map +1 -0
- package/dist/buttons/ButtonSection.d.ts +3 -0
- package/dist/buttons/ButtonSection.d.ts.map +1 -0
- package/dist/buttons/ButtonSection.js +150 -0
- package/dist/buttons/ButtonSection.js.map +1 -0
- package/dist/cards/CardStack.d.ts +3 -0
- package/dist/cards/CardStack.d.ts.map +1 -0
- package/dist/cards/CardStack.js +140 -0
- package/dist/cards/CardStack.js.map +1 -0
- package/dist/cards/FeatureCard.d.ts +3 -0
- package/dist/cards/FeatureCard.d.ts.map +1 -0
- package/dist/cards/FeatureCard.js +100 -0
- package/dist/cards/FeatureCard.js.map +1 -0
- package/dist/cards/FeaturedCard.d.ts +3 -0
- package/dist/cards/FeaturedCard.d.ts.map +1 -0
- package/dist/cards/FeaturedCard.js +66 -0
- package/dist/cards/FeaturedCard.js.map +1 -0
- package/dist/cards/TerminalCard.d.ts +3 -0
- package/dist/cards/TerminalCard.d.ts.map +1 -0
- package/dist/cards/TerminalCard.js +73 -0
- package/dist/cards/TerminalCard.js.map +1 -0
- package/dist/cards/TestimonialCard.d.ts +3 -0
- package/dist/cards/TestimonialCard.d.ts.map +1 -0
- package/dist/cards/TestimonialCard.js +50 -0
- package/dist/cards/TestimonialCard.js.map +1 -0
- package/dist/cards/index.d.ts +2 -0
- package/dist/cards/index.d.ts.map +1 -0
- package/dist/cards/index.js +2 -0
- package/dist/cards/index.js.map +1 -0
- package/dist/cart/CartCheckoutBar.d.ts +3 -0
- package/dist/cart/CartCheckoutBar.d.ts.map +1 -0
- package/dist/cart/CartCheckoutBar.js +258 -0
- package/dist/cart/CartCheckoutBar.js.map +1 -0
- package/dist/cart/CartDiscount.d.ts +3 -0
- package/dist/cart/CartDiscount.d.ts.map +1 -0
- package/dist/cart/CartDiscount.js +78 -0
- package/dist/cart/CartDiscount.js.map +1 -0
- package/dist/cart/CartDrawer.d.ts +3 -0
- package/dist/cart/CartDrawer.d.ts.map +1 -0
- package/dist/cart/CartDrawer.js +141 -0
- package/dist/cart/CartDrawer.js.map +1 -0
- package/dist/cart/CartLines.d.ts +3 -0
- package/dist/cart/CartLines.d.ts.map +1 -0
- package/dist/cart/CartLines.js +227 -0
- package/dist/cart/CartLines.js.map +1 -0
- package/dist/cart/CartPage.d.ts +3 -0
- package/dist/cart/CartPage.d.ts.map +1 -0
- package/dist/cart/CartPage.js +128 -0
- package/dist/cart/CartPage.js.map +1 -0
- package/dist/cart/CartSummary.d.ts +3 -0
- package/dist/cart/CartSummary.d.ts.map +1 -0
- package/dist/cart/CartSummary.js +155 -0
- package/dist/cart/CartSummary.js.map +1 -0
- package/dist/cart/CartTrigger.d.ts +3 -0
- package/dist/cart/CartTrigger.d.ts.map +1 -0
- package/dist/cart/CartTrigger.js +45 -0
- package/dist/cart/CartTrigger.js.map +1 -0
- package/dist/cart/GuaranteeBanner.d.ts +3 -0
- package/dist/cart/GuaranteeBanner.d.ts.map +1 -0
- package/dist/cart/GuaranteeBanner.js +15 -0
- package/dist/cart/GuaranteeBanner.js.map +1 -0
- package/dist/cart/index.d.ts +8 -0
- package/dist/cart/index.d.ts.map +1 -0
- package/dist/cart/index.js +8 -0
- package/dist/cart/index.js.map +1 -0
- package/dist/content/BeforeAfterSlider.d.ts +3 -0
- package/dist/content/BeforeAfterSlider.d.ts.map +1 -0
- package/dist/content/BeforeAfterSlider.js +61 -0
- package/dist/content/BeforeAfterSlider.js.map +1 -0
- package/dist/content/ImageTextSplit.d.ts +3 -0
- package/dist/content/ImageTextSplit.d.ts.map +1 -0
- package/dist/content/ImageTextSplit.js +33 -0
- package/dist/content/ImageTextSplit.js.map +1 -0
- package/dist/content/LookbookGrid.d.ts +3 -0
- package/dist/content/LookbookGrid.d.ts.map +1 -0
- package/dist/content/LookbookGrid.js +183 -0
- package/dist/content/LookbookGrid.js.map +1 -0
- package/dist/content/ParallaxSection.d.ts +3 -0
- package/dist/content/ParallaxSection.d.ts.map +1 -0
- package/dist/content/ParallaxSection.js +66 -0
- package/dist/content/ParallaxSection.js.map +1 -0
- package/dist/content/RichText.d.ts +3 -0
- package/dist/content/RichText.d.ts.map +1 -0
- package/dist/content/RichText.js +21 -0
- package/dist/content/RichText.js.map +1 -0
- package/dist/content/index.d.ts +5 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +5 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content-types.d.ts +637 -0
- package/dist/content-types.d.ts.map +1 -0
- package/dist/content-types.js +2 -0
- package/dist/content-types.js.map +1 -0
- package/dist/context/LxCartContext.d.ts +71 -0
- package/dist/context/LxCartContext.d.ts.map +1 -0
- package/dist/context/LxCartContext.js +491 -0
- package/dist/context/LxCartContext.js.map +1 -0
- package/dist/context/LxEditorContext.d.ts +8 -0
- package/dist/context/LxEditorContext.d.ts.map +1 -0
- package/dist/context/LxEditorContext.js +10 -0
- package/dist/context/LxEditorContext.js.map +1 -0
- package/dist/context/LxPDPContext.d.ts +39 -0
- package/dist/context/LxPDPContext.d.ts.map +1 -0
- package/dist/context/LxPDPContext.js +52 -0
- package/dist/context/LxPDPContext.js.map +1 -0
- package/dist/cta/CtaFullWidth.d.ts +3 -0
- package/dist/cta/CtaFullWidth.d.ts.map +1 -0
- package/dist/cta/CtaFullWidth.js +30 -0
- package/dist/cta/CtaFullWidth.js.map +1 -0
- package/dist/cta/CtaStickyBottom.d.ts +3 -0
- package/dist/cta/CtaStickyBottom.d.ts.map +1 -0
- package/dist/cta/CtaStickyBottom.js +43 -0
- package/dist/cta/CtaStickyBottom.js.map +1 -0
- package/dist/cta/GuaranteeCta.d.ts +3 -0
- package/dist/cta/GuaranteeCta.d.ts.map +1 -0
- package/dist/cta/GuaranteeCta.js +27 -0
- package/dist/cta/GuaranteeCta.js.map +1 -0
- package/dist/cta/NewsletterSignup.d.ts +3 -0
- package/dist/cta/NewsletterSignup.d.ts.map +1 -0
- package/dist/cta/NewsletterSignup.js +35 -0
- package/dist/cta/NewsletterSignup.js.map +1 -0
- package/dist/cta/Popup.d.ts +3 -0
- package/dist/cta/Popup.d.ts.map +1 -0
- package/dist/cta/Popup.js +208 -0
- package/dist/cta/Popup.js.map +1 -0
- package/dist/cta/UrgencyCta.d.ts +3 -0
- package/dist/cta/UrgencyCta.d.ts.map +1 -0
- package/dist/cta/UrgencyCta.js +85 -0
- package/dist/cta/UrgencyCta.js.map +1 -0
- package/dist/cta/WaitlistCta.d.ts +3 -0
- package/dist/cta/WaitlistCta.d.ts.map +1 -0
- package/dist/cta/WaitlistCta.js +62 -0
- package/dist/cta/WaitlistCta.js.map +1 -0
- package/dist/cta/index.d.ts +3 -0
- package/dist/cta/index.d.ts.map +1 -0
- package/dist/cta/index.js +3 -0
- package/dist/cta/index.js.map +1 -0
- package/dist/effects/AnimatedBackground.d.ts +22 -0
- package/dist/effects/AnimatedBackground.d.ts.map +1 -0
- package/dist/effects/AnimatedBackground.js +313 -0
- package/dist/effects/AnimatedBackground.js.map +1 -0
- package/dist/effects/CanvasReveal.d.ts +5 -0
- package/dist/effects/CanvasReveal.d.ts.map +1 -0
- package/dist/effects/CanvasReveal.js +104 -0
- package/dist/effects/CanvasReveal.js.map +1 -0
- package/dist/effects/DecorativeOverlay.d.ts +10 -0
- package/dist/effects/DecorativeOverlay.d.ts.map +1 -0
- package/dist/effects/DecorativeOverlay.js +76 -0
- package/dist/effects/DecorativeOverlay.js.map +1 -0
- package/dist/effects/ScrollLinked.d.ts +3 -0
- package/dist/effects/ScrollLinked.d.ts.map +1 -0
- package/dist/effects/ScrollLinked.js +57 -0
- package/dist/effects/ScrollLinked.js.map +1 -0
- package/dist/effects/svg-library.d.ts +3 -0
- package/dist/effects/svg-library.d.ts.map +1 -0
- package/dist/effects/svg-library.js +105 -0
- package/dist/effects/svg-library.js.map +1 -0
- package/dist/faq/FaqAccordion.d.ts +3 -0
- package/dist/faq/FaqAccordion.d.ts.map +1 -0
- package/dist/faq/FaqAccordion.js +39 -0
- package/dist/faq/FaqAccordion.js.map +1 -0
- package/dist/faq/FaqTwoColumn.d.ts +3 -0
- package/dist/faq/FaqTwoColumn.d.ts.map +1 -0
- package/dist/faq/FaqTwoColumn.js +38 -0
- package/dist/faq/FaqTwoColumn.js.map +1 -0
- package/dist/faq/index.d.ts +3 -0
- package/dist/faq/index.d.ts.map +1 -0
- package/dist/faq/index.js +3 -0
- package/dist/faq/index.js.map +1 -0
- package/dist/features/BentoGrid.d.ts +3 -0
- package/dist/features/BentoGrid.d.ts.map +1 -0
- package/dist/features/BentoGrid.js +62 -0
- package/dist/features/BentoGrid.js.map +1 -0
- package/dist/features/FeatureGrid.d.ts +3 -0
- package/dist/features/FeatureGrid.d.ts.map +1 -0
- package/dist/features/FeatureGrid.js +89 -0
- package/dist/features/FeatureGrid.js.map +1 -0
- package/dist/features/FeatureTabs.d.ts +3 -0
- package/dist/features/FeatureTabs.d.ts.map +1 -0
- package/dist/features/FeatureTabs.js +64 -0
- package/dist/features/FeatureTabs.js.map +1 -0
- package/dist/features/ProcessSteps.d.ts +3 -0
- package/dist/features/ProcessSteps.d.ts.map +1 -0
- package/dist/features/ProcessSteps.js +74 -0
- package/dist/features/ProcessSteps.js.map +1 -0
- package/dist/heroes/HeroActivity.d.ts +3 -0
- package/dist/heroes/HeroActivity.d.ts.map +1 -0
- package/dist/heroes/HeroActivity.js +54 -0
- package/dist/heroes/HeroActivity.js.map +1 -0
- package/dist/heroes/HeroAnimated.d.ts +3 -0
- package/dist/heroes/HeroAnimated.d.ts.map +1 -0
- package/dist/heroes/HeroAnimated.js +101 -0
- package/dist/heroes/HeroAnimated.js.map +1 -0
- package/dist/heroes/HeroAurora.d.ts +3 -0
- package/dist/heroes/HeroAurora.d.ts.map +1 -0
- package/dist/heroes/HeroAurora.js +53 -0
- package/dist/heroes/HeroAurora.js.map +1 -0
- package/dist/heroes/HeroCarousel.d.ts +3 -0
- package/dist/heroes/HeroCarousel.d.ts.map +1 -0
- package/dist/heroes/HeroCarousel.js +187 -0
- package/dist/heroes/HeroCarousel.js.map +1 -0
- package/dist/heroes/HeroCentered.d.ts +3 -0
- package/dist/heroes/HeroCentered.d.ts.map +1 -0
- package/dist/heroes/HeroCentered.js +62 -0
- package/dist/heroes/HeroCentered.js.map +1 -0
- package/dist/heroes/HeroCinematicFullbleed.d.ts +3 -0
- package/dist/heroes/HeroCinematicFullbleed.d.ts.map +1 -0
- package/dist/heroes/HeroCinematicFullbleed.js +44 -0
- package/dist/heroes/HeroCinematicFullbleed.js.map +1 -0
- package/dist/heroes/HeroCountdown.d.ts +3 -0
- package/dist/heroes/HeroCountdown.d.ts.map +1 -0
- package/dist/heroes/HeroCountdown.js +64 -0
- package/dist/heroes/HeroCountdown.js.map +1 -0
- package/dist/heroes/HeroDarkSplitSticker.d.ts +3 -0
- package/dist/heroes/HeroDarkSplitSticker.d.ts.map +1 -0
- package/dist/heroes/HeroDarkSplitSticker.js +39 -0
- package/dist/heroes/HeroDarkSplitSticker.js.map +1 -0
- package/dist/heroes/HeroEditorial.d.ts +3 -0
- package/dist/heroes/HeroEditorial.d.ts.map +1 -0
- package/dist/heroes/HeroEditorial.js +30 -0
- package/dist/heroes/HeroEditorial.js.map +1 -0
- package/dist/heroes/HeroEditorialMinimal.d.ts +3 -0
- package/dist/heroes/HeroEditorialMinimal.d.ts.map +1 -0
- package/dist/heroes/HeroEditorialMinimal.js +47 -0
- package/dist/heroes/HeroEditorialMinimal.js.map +1 -0
- package/dist/heroes/HeroFullBleed.d.ts +3 -0
- package/dist/heroes/HeroFullBleed.d.ts.map +1 -0
- package/dist/heroes/HeroFullBleed.js +136 -0
- package/dist/heroes/HeroFullBleed.js.map +1 -0
- package/dist/heroes/HeroMini.d.ts +3 -0
- package/dist/heroes/HeroMini.d.ts.map +1 -0
- package/dist/heroes/HeroMini.js +25 -0
- package/dist/heroes/HeroMini.js.map +1 -0
- package/dist/heroes/HeroParallax.d.ts +3 -0
- package/dist/heroes/HeroParallax.d.ts.map +1 -0
- package/dist/heroes/HeroParallax.js +71 -0
- package/dist/heroes/HeroParallax.js.map +1 -0
- package/dist/heroes/HeroRetroCentered.d.ts +3 -0
- package/dist/heroes/HeroRetroCentered.d.ts.map +1 -0
- package/dist/heroes/HeroRetroCentered.js +49 -0
- package/dist/heroes/HeroRetroCentered.js.map +1 -0
- package/dist/heroes/HeroSplit.d.ts +3 -0
- package/dist/heroes/HeroSplit.d.ts.map +1 -0
- package/dist/heroes/HeroSplit.js +81 -0
- package/dist/heroes/HeroSplit.js.map +1 -0
- package/dist/heroes/HeroSpotlight.d.ts +3 -0
- package/dist/heroes/HeroSpotlight.d.ts.map +1 -0
- package/dist/heroes/HeroSpotlight.js +60 -0
- package/dist/heroes/HeroSpotlight.js.map +1 -0
- package/dist/heroes/HeroTrustSplit.d.ts +3 -0
- package/dist/heroes/HeroTrustSplit.d.ts.map +1 -0
- package/dist/heroes/HeroTrustSplit.js +53 -0
- package/dist/heroes/HeroTrustSplit.js.map +1 -0
- package/dist/heroes/HeroTypewriter.d.ts +3 -0
- package/dist/heroes/HeroTypewriter.d.ts.map +1 -0
- package/dist/heroes/HeroTypewriter.js +80 -0
- package/dist/heroes/HeroTypewriter.js.map +1 -0
- package/dist/heroes/index.d.ts +12 -0
- package/dist/heroes/index.d.ts.map +1 -0
- package/dist/heroes/index.js +12 -0
- package/dist/heroes/index.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/Footer.d.ts +3 -0
- package/dist/layout/Footer.d.ts.map +1 -0
- package/dist/layout/Footer.js +75 -0
- package/dist/layout/Footer.js.map +1 -0
- package/dist/layout/Navbar.d.ts +3 -0
- package/dist/layout/Navbar.d.ts.map +1 -0
- package/dist/layout/Navbar.js +81 -0
- package/dist/layout/Navbar.js.map +1 -0
- package/dist/layout/PromoTopBar.d.ts +3 -0
- package/dist/layout/PromoTopBar.d.ts.map +1 -0
- package/dist/layout/PromoTopBar.js +201 -0
- package/dist/layout/PromoTopBar.js.map +1 -0
- package/dist/layout/SectionDivider.d.ts +3 -0
- package/dist/layout/SectionDivider.d.ts.map +1 -0
- package/dist/layout/SectionDivider.js +13 -0
- package/dist/layout/SectionDivider.js.map +1 -0
- package/dist/layout/SectionTransition.d.ts +3 -0
- package/dist/layout/SectionTransition.d.ts.map +1 -0
- package/dist/layout/SectionTransition.js +60 -0
- package/dist/layout/SectionTransition.js.map +1 -0
- package/dist/layout/Ticker.d.ts +3 -0
- package/dist/layout/Ticker.d.ts.map +1 -0
- package/dist/layout/Ticker.js +32 -0
- package/dist/layout/Ticker.js.map +1 -0
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +6 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/personalization/CartRecovery.d.ts +3 -0
- package/dist/personalization/CartRecovery.d.ts.map +1 -0
- package/dist/personalization/CartRecovery.js +224 -0
- package/dist/personalization/CartRecovery.js.map +1 -0
- package/dist/personalization/CohortTrustStack.d.ts +3 -0
- package/dist/personalization/CohortTrustStack.d.ts.map +1 -0
- package/dist/personalization/CohortTrustStack.js +101 -0
- package/dist/personalization/CohortTrustStack.js.map +1 -0
- package/dist/personalization/LiveActivityTicker.d.ts +3 -0
- package/dist/personalization/LiveActivityTicker.d.ts.map +1 -0
- package/dist/personalization/LiveActivityTicker.js +137 -0
- package/dist/personalization/LiveActivityTicker.js.map +1 -0
- package/dist/personalization/LoyaltyStatus.d.ts +3 -0
- package/dist/personalization/LoyaltyStatus.d.ts.map +1 -0
- package/dist/personalization/LoyaltyStatus.js +185 -0
- package/dist/personalization/LoyaltyStatus.js.map +1 -0
- package/dist/personalization/PersonalizedGreeting.d.ts +3 -0
- package/dist/personalization/PersonalizedGreeting.d.ts.map +1 -0
- package/dist/personalization/PersonalizedGreeting.js +176 -0
- package/dist/personalization/PersonalizedGreeting.js.map +1 -0
- package/dist/personalization/PersonalizedRecommendations.d.ts +3 -0
- package/dist/personalization/PersonalizedRecommendations.d.ts.map +1 -0
- package/dist/personalization/PersonalizedRecommendations.js +156 -0
- package/dist/personalization/PersonalizedRecommendations.js.map +1 -0
- package/dist/personalization/ProgressMilestone.d.ts +3 -0
- package/dist/personalization/ProgressMilestone.d.ts.map +1 -0
- package/dist/personalization/ProgressMilestone.js +127 -0
- package/dist/personalization/ProgressMilestone.js.map +1 -0
- package/dist/personalization/ReengagementBanner.d.ts +3 -0
- package/dist/personalization/ReengagementBanner.d.ts.map +1 -0
- package/dist/personalization/ReengagementBanner.js +185 -0
- package/dist/personalization/ReengagementBanner.js.map +1 -0
- package/dist/personalization/ScarcityIndicator.d.ts +3 -0
- package/dist/personalization/ScarcityIndicator.d.ts.map +1 -0
- package/dist/personalization/ScarcityIndicator.js +264 -0
- package/dist/personalization/ScarcityIndicator.js.map +1 -0
- package/dist/personalization/VipGate.d.ts +3 -0
- package/dist/personalization/VipGate.d.ts.map +1 -0
- package/dist/personalization/VipGate.js +309 -0
- package/dist/personalization/VipGate.js.map +1 -0
- package/dist/placeholder/UnknownComponent.d.ts +6 -0
- package/dist/placeholder/UnknownComponent.d.ts.map +1 -0
- package/dist/placeholder/UnknownComponent.js +5 -0
- package/dist/placeholder/UnknownComponent.js.map +1 -0
- package/dist/pricing/PricingCards.d.ts +3 -0
- package/dist/pricing/PricingCards.d.ts.map +1 -0
- package/dist/pricing/PricingCards.js +143 -0
- package/dist/pricing/PricingCards.js.map +1 -0
- package/dist/primitives/AspectBox.d.ts +12 -0
- package/dist/primitives/AspectBox.d.ts.map +1 -0
- package/dist/primitives/AspectBox.js +15 -0
- package/dist/primitives/AspectBox.js.map +1 -0
- package/dist/primitives/CursorSpotlight.d.ts +11 -0
- package/dist/primitives/CursorSpotlight.d.ts.map +1 -0
- package/dist/primitives/CursorSpotlight.js +21 -0
- package/dist/primitives/CursorSpotlight.js.map +1 -0
- package/dist/primitives/HeadlineEffect.d.ts +16 -0
- package/dist/primitives/HeadlineEffect.d.ts.map +1 -0
- package/dist/primitives/HeadlineEffect.js +187 -0
- package/dist/primitives/HeadlineEffect.js.map +1 -0
- package/dist/primitives/Marquee.d.ts +11 -0
- package/dist/primitives/Marquee.d.ts.map +1 -0
- package/dist/primitives/Marquee.js +22 -0
- package/dist/primitives/Marquee.js.map +1 -0
- package/dist/primitives/MediaFlip.d.ts +16 -0
- package/dist/primitives/MediaFlip.d.ts.map +1 -0
- package/dist/primitives/MediaFlip.js +118 -0
- package/dist/primitives/MediaFlip.js.map +1 -0
- package/dist/primitives/MediaLoop.d.ts +15 -0
- package/dist/primitives/MediaLoop.d.ts.map +1 -0
- package/dist/primitives/MediaLoop.js +31 -0
- package/dist/primitives/MediaLoop.js.map +1 -0
- package/dist/primitives/PDPGallery.d.ts +24 -0
- package/dist/primitives/PDPGallery.d.ts.map +1 -0
- package/dist/primitives/PDPGallery.js +128 -0
- package/dist/primitives/PDPGallery.js.map +1 -0
- package/dist/primitives/TiltCard.d.ts +12 -0
- package/dist/primitives/TiltCard.d.ts.map +1 -0
- package/dist/primitives/TiltCard.js +41 -0
- package/dist/primitives/TiltCard.js.map +1 -0
- package/dist/product/BundleBuilder.d.ts +3 -0
- package/dist/product/BundleBuilder.d.ts.map +1 -0
- package/dist/product/BundleBuilder.js +34 -0
- package/dist/product/BundleBuilder.js.map +1 -0
- package/dist/product/BuyBox.d.ts +3 -0
- package/dist/product/BuyBox.d.ts.map +1 -0
- package/dist/product/BuyBox.js +398 -0
- package/dist/product/BuyBox.js.map +1 -0
- package/dist/product/ComparisonTable.d.ts +3 -0
- package/dist/product/ComparisonTable.d.ts.map +1 -0
- package/dist/product/ComparisonTable.js +59 -0
- package/dist/product/ComparisonTable.js.map +1 -0
- package/dist/product/FormatGrid.d.ts +3 -0
- package/dist/product/FormatGrid.d.ts.map +1 -0
- package/dist/product/FormatGrid.js +28 -0
- package/dist/product/FormatGrid.js.map +1 -0
- package/dist/product/PDPVariants.d.ts +3 -0
- package/dist/product/PDPVariants.d.ts.map +1 -0
- package/dist/product/PDPVariants.js +284 -0
- package/dist/product/PDPVariants.js.map +1 -0
- package/dist/product/PillNav.d.ts +3 -0
- package/dist/product/PillNav.d.ts.map +1 -0
- package/dist/product/PillNav.js +35 -0
- package/dist/product/PillNav.js.map +1 -0
- package/dist/product/ProductAccordion.d.ts +3 -0
- package/dist/product/ProductAccordion.d.ts.map +1 -0
- package/dist/product/ProductAccordion.js +46 -0
- package/dist/product/ProductAccordion.js.map +1 -0
- package/dist/product/ProductCard.d.ts +62 -0
- package/dist/product/ProductCard.d.ts.map +1 -0
- package/dist/product/ProductCard.js +442 -0
- package/dist/product/ProductCard.js.map +1 -0
- package/dist/product/ProductCarousel.d.ts +3 -0
- package/dist/product/ProductCarousel.d.ts.map +1 -0
- package/dist/product/ProductCarousel.js +123 -0
- package/dist/product/ProductCarousel.js.map +1 -0
- package/dist/product/ProductCenteredStack.d.ts +3 -0
- package/dist/product/ProductCenteredStack.d.ts.map +1 -0
- package/dist/product/ProductCenteredStack.js +28 -0
- package/dist/product/ProductCenteredStack.js.map +1 -0
- package/dist/product/ProductGallery.d.ts +3 -0
- package/dist/product/ProductGallery.d.ts.map +1 -0
- package/dist/product/ProductGallery.js +80 -0
- package/dist/product/ProductGallery.js.map +1 -0
- package/dist/product/ProductGrid.d.ts +3 -0
- package/dist/product/ProductGrid.d.ts.map +1 -0
- package/dist/product/ProductGrid.js +58 -0
- package/dist/product/ProductGrid.js.map +1 -0
- package/dist/product/ProductHighlightLeft.d.ts +3 -0
- package/dist/product/ProductHighlightLeft.d.ts.map +1 -0
- package/dist/product/ProductHighlightLeft.js +37 -0
- package/dist/product/ProductHighlightLeft.js.map +1 -0
- package/dist/product/ProductHighlightRight.d.ts +3 -0
- package/dist/product/ProductHighlightRight.d.ts.map +1 -0
- package/dist/product/ProductHighlightRight.js +23 -0
- package/dist/product/ProductHighlightRight.js.map +1 -0
- package/dist/product/ProductPage.d.ts +3 -0
- package/dist/product/ProductPage.d.ts.map +1 -0
- package/dist/product/ProductPage.js +105 -0
- package/dist/product/ProductPage.js.map +1 -0
- package/dist/product/SubscriptionToggle.d.ts +3 -0
- package/dist/product/SubscriptionToggle.d.ts.map +1 -0
- package/dist/product/SubscriptionToggle.js +38 -0
- package/dist/product/SubscriptionToggle.js.map +1 -0
- package/dist/product/Upsell.d.ts +3 -0
- package/dist/product/Upsell.d.ts.map +1 -0
- package/dist/product/Upsell.js +59 -0
- package/dist/product/Upsell.js.map +1 -0
- package/dist/product/VideoCarousel.d.ts +3 -0
- package/dist/product/VideoCarousel.d.ts.map +1 -0
- package/dist/product/VideoCarousel.js +188 -0
- package/dist/product/VideoCarousel.js.map +1 -0
- package/dist/product/index.d.ts +8 -0
- package/dist/product/index.d.ts.map +1 -0
- package/dist/product/index.js +8 -0
- package/dist/product/index.js.map +1 -0
- package/dist/registry-field-schemas.d.ts +66 -0
- package/dist/registry-field-schemas.d.ts.map +1 -0
- package/dist/registry-field-schemas.js +745 -0
- package/dist/registry-field-schemas.js.map +1 -0
- package/dist/registry-metadata.d.ts +10 -0
- package/dist/registry-metadata.d.ts.map +1 -0
- package/dist/registry-metadata.js +2 -0
- package/dist/registry-metadata.js.map +1 -0
- package/dist/registry.d.ts +20 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +2317 -0
- package/dist/registry.js.map +1 -0
- package/dist/renderText.d.ts +6 -0
- package/dist/renderText.d.ts.map +1 -0
- package/dist/renderText.js +23 -0
- package/dist/renderText.js.map +1 -0
- package/dist/reviews/ReviewCarousel.d.ts +3 -0
- package/dist/reviews/ReviewCarousel.d.ts.map +1 -0
- package/dist/reviews/ReviewCarousel.js +24 -0
- package/dist/reviews/ReviewCarousel.js.map +1 -0
- package/dist/reviews/ReviewMasonry.d.ts +3 -0
- package/dist/reviews/ReviewMasonry.d.ts.map +1 -0
- package/dist/reviews/ReviewMasonry.js +25 -0
- package/dist/reviews/ReviewMasonry.js.map +1 -0
- package/dist/reviews/ReviewSpotlight.d.ts +3 -0
- package/dist/reviews/ReviewSpotlight.d.ts.map +1 -0
- package/dist/reviews/ReviewSpotlight.js +13 -0
- package/dist/reviews/ReviewSpotlight.js.map +1 -0
- package/dist/reviews/VideoTestimonials.d.ts +3 -0
- package/dist/reviews/VideoTestimonials.d.ts.map +1 -0
- package/dist/reviews/VideoTestimonials.js +35 -0
- package/dist/reviews/VideoTestimonials.js.map +1 -0
- package/dist/reviews/index.d.ts +4 -0
- package/dist/reviews/index.d.ts.map +1 -0
- package/dist/reviews/index.js +4 -0
- package/dist/reviews/index.js.map +1 -0
- package/dist/schemas/content.d.ts +125 -0
- package/dist/schemas/content.d.ts.map +1 -0
- package/dist/schemas/content.js +2 -0
- package/dist/schemas/content.js.map +1 -0
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/settings.d.ts +23 -0
- package/dist/schemas/settings.d.ts.map +1 -0
- package/dist/schemas/settings.js +321 -0
- package/dist/schemas/settings.js.map +1 -0
- package/dist/social-proof/AvatarGroup.d.ts +3 -0
- package/dist/social-proof/AvatarGroup.d.ts.map +1 -0
- package/dist/social-proof/AvatarGroup.js +58 -0
- package/dist/social-proof/AvatarGroup.js.map +1 -0
- package/dist/social-proof/LogoCarousel.d.ts +3 -0
- package/dist/social-proof/LogoCarousel.d.ts.map +1 -0
- package/dist/social-proof/LogoCarousel.js +49 -0
- package/dist/social-proof/LogoCarousel.js.map +1 -0
- package/dist/social-proof/LogoStrip.d.ts +3 -0
- package/dist/social-proof/LogoStrip.d.ts.map +1 -0
- package/dist/social-proof/LogoStrip.js +35 -0
- package/dist/social-proof/LogoStrip.js.map +1 -0
- package/dist/social-proof/PressMentions.d.ts +3 -0
- package/dist/social-proof/PressMentions.d.ts.map +1 -0
- package/dist/social-proof/PressMentions.js +40 -0
- package/dist/social-proof/PressMentions.js.map +1 -0
- package/dist/social-proof/StatsGrid.d.ts +3 -0
- package/dist/social-proof/StatsGrid.d.ts.map +1 -0
- package/dist/social-proof/StatsGrid.js +39 -0
- package/dist/social-proof/StatsGrid.js.map +1 -0
- package/dist/social-proof/TrustBadges.d.ts +3 -0
- package/dist/social-proof/TrustBadges.d.ts.map +1 -0
- package/dist/social-proof/TrustBadges.js +18 -0
- package/dist/social-proof/TrustBadges.js.map +1 -0
- package/dist/social-proof/index.d.ts +4 -0
- package/dist/social-proof/index.d.ts.map +1 -0
- package/dist/social-proof/index.js +4 -0
- package/dist/social-proof/index.js.map +1 -0
- package/dist/text-effects/TextEffect.d.ts +3 -0
- package/dist/text-effects/TextEffect.d.ts.map +1 -0
- package/dist/text-effects/TextEffect.js +277 -0
- package/dist/text-effects/TextEffect.js.map +1 -0
- package/dist/theme/resolve.d.ts +12 -0
- package/dist/theme/resolve.d.ts.map +1 -0
- package/dist/theme/resolve.js +26 -0
- package/dist/theme/resolve.js.map +1 -0
- package/dist/theme/tokens.d.ts +147 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +113 -0
- package/dist/theme/tokens.js.map +1 -0
- package/dist/types.d.ts +154 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/elementStyles.d.ts +4 -0
- package/dist/utils/elementStyles.d.ts.map +1 -0
- package/dist/utils/elementStyles.js +6 -0
- package/dist/utils/elementStyles.js.map +1 -0
- package/dist/utils/icon-map.d.ts +128 -0
- package/dist/utils/icon-map.d.ts.map +1 -0
- package/dist/utils/icon-map.js +199 -0
- package/dist/utils/icon-map.js.map +1 -0
- package/dist/utils/imageStyle.d.ts +4 -0
- package/dist/utils/imageStyle.d.ts.map +1 -0
- package/dist/utils/imageStyle.js +23 -0
- package/dist/utils/imageStyle.js.map +1 -0
- package/dist/utils/renderIcon.d.ts +32 -0
- package/dist/utils/renderIcon.d.ts.map +1 -0
- package/dist/utils/renderIcon.js +188 -0
- package/dist/utils/renderIcon.js.map +1 -0
- package/dist/utils/schemaUtils.d.ts +9 -0
- package/dist/utils/schemaUtils.d.ts.map +1 -0
- package/dist/utils/schemaUtils.js +10 -0
- package/dist/utils/schemaUtils.js.map +1 -0
- package/dist/value-props/HowItWorks.d.ts +3 -0
- package/dist/value-props/HowItWorks.d.ts.map +1 -0
- package/dist/value-props/HowItWorks.js +23 -0
- package/dist/value-props/HowItWorks.js.map +1 -0
- package/dist/value-props/NumberedList.d.ts +3 -0
- package/dist/value-props/NumberedList.d.ts.map +1 -0
- package/dist/value-props/NumberedList.js +22 -0
- package/dist/value-props/NumberedList.js.map +1 -0
- package/dist/value-props/ValuePropsAlternating.d.ts +3 -0
- package/dist/value-props/ValuePropsAlternating.d.ts.map +1 -0
- package/dist/value-props/ValuePropsAlternating.js +22 -0
- package/dist/value-props/ValuePropsAlternating.js.map +1 -0
- package/dist/value-props/ValuePropsGrid.d.ts +3 -0
- package/dist/value-props/ValuePropsGrid.d.ts.map +1 -0
- package/dist/value-props/ValuePropsGrid.js +23 -0
- package/dist/value-props/ValuePropsGrid.js.map +1 -0
- package/dist/value-props/ValuePropsIconStrip.d.ts +3 -0
- package/dist/value-props/ValuePropsIconStrip.d.ts.map +1 -0
- package/dist/value-props/ValuePropsIconStrip.js +11 -0
- package/dist/value-props/ValuePropsIconStrip.js.map +1 -0
- package/dist/value-props/index.d.ts +6 -0
- package/dist/value-props/index.d.ts.map +1 -0
- package/dist/value-props/index.js +6 -0
- package/dist/value-props/index.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type CardStyle = "standard" | "editorial" | "minimal" | "floating" | "story" | "polaroid" | "magnetic" | "spotlight" | "flip" | "morph";
|
|
2
|
+
export type ImageAspect = "1:1" | "3:4" | "4:5" | "16:9";
|
|
3
|
+
export type HoverReveal = "none" | "quick_add" | "details";
|
|
4
|
+
export type BadgeStyle = "pill" | "ribbon" | "corner";
|
|
5
|
+
export type ShadowLevel = "none" | "sm" | "md" | "lg";
|
|
6
|
+
export interface ProductItem {
|
|
7
|
+
name: string;
|
|
8
|
+
price: string;
|
|
9
|
+
compare_price?: string;
|
|
10
|
+
image_url?: string;
|
|
11
|
+
handle?: string;
|
|
12
|
+
badge?: string;
|
|
13
|
+
images?: string[];
|
|
14
|
+
rating?: number;
|
|
15
|
+
colors?: string[];
|
|
16
|
+
card_style?: CardStyle;
|
|
17
|
+
image_aspect?: ImageAspect;
|
|
18
|
+
hover_image?: boolean;
|
|
19
|
+
hover_image_speed?: number;
|
|
20
|
+
hover_reveal?: HoverReveal;
|
|
21
|
+
badge_style?: BadgeStyle;
|
|
22
|
+
image_fit?: "cover" | "contain";
|
|
23
|
+
card_shadow?: ShadowLevel;
|
|
24
|
+
blob_color?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ProductCardSectionFlags {
|
|
27
|
+
card_style: CardStyle;
|
|
28
|
+
image_aspect: ImageAspect;
|
|
29
|
+
hover_image: boolean;
|
|
30
|
+
hover_image_speed: number;
|
|
31
|
+
hover_reveal: HoverReveal;
|
|
32
|
+
show_compare_price: boolean;
|
|
33
|
+
show_rating: boolean;
|
|
34
|
+
show_color_swatches: boolean;
|
|
35
|
+
badge_style: BadgeStyle;
|
|
36
|
+
image_fit: "cover" | "contain";
|
|
37
|
+
card_shadow: ShadowLevel;
|
|
38
|
+
blob_color: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ProductCardProps {
|
|
41
|
+
item: ProductItem;
|
|
42
|
+
flags: ProductCardSectionFlags;
|
|
43
|
+
theme: {
|
|
44
|
+
palette: {
|
|
45
|
+
bg: string;
|
|
46
|
+
surface: string;
|
|
47
|
+
text: string;
|
|
48
|
+
accent: string;
|
|
49
|
+
border?: string;
|
|
50
|
+
};
|
|
51
|
+
fonts: {
|
|
52
|
+
display: string;
|
|
53
|
+
body: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
isCarouselCard?: boolean;
|
|
57
|
+
idx?: number;
|
|
58
|
+
}
|
|
59
|
+
export declare function parseSectionFlags(content: Record<string, unknown>): ProductCardSectionFlags;
|
|
60
|
+
export declare function ProductCard({ item, flags, theme, isCarouselCard, idx }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export default ProductCard;
|
|
62
|
+
//# sourceMappingURL=ProductCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../src/product/ProductCard.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GAAK,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AACjJ,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAI,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,WAAW,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,WAAW,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,UAAU,CAAC;IACxB,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,uBAAuB,CAAC;IAC/B,KAAK,EAAE;QACL,OAAO,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACxF,KAAK,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KAC1C,CAAC;IACF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAkBD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,uBAAuB,CAe3F;AA2ND,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAsB,EAAE,GAAO,EAAE,EAAE,gBAAgB,2CAmuBpG;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useRef } from "react";
|
|
3
|
+
import { motion, useSpring, useMotionValue, useTransform, AnimatePresence } from "framer-motion";
|
|
4
|
+
import { useMouseOffset } from "../animations/advanced-hooks";
|
|
5
|
+
// ── Default flags ──────────────────────────────────────────────────────────
|
|
6
|
+
const DEFAULT_FLAGS = {
|
|
7
|
+
card_style: "standard",
|
|
8
|
+
image_aspect: "1:1",
|
|
9
|
+
hover_image: true,
|
|
10
|
+
hover_image_speed: 1500,
|
|
11
|
+
hover_reveal: "quick_add",
|
|
12
|
+
show_compare_price: true,
|
|
13
|
+
show_rating: false,
|
|
14
|
+
show_color_swatches: false,
|
|
15
|
+
badge_style: "pill",
|
|
16
|
+
image_fit: "cover",
|
|
17
|
+
card_shadow: "md",
|
|
18
|
+
blob_color: "#fde8d8",
|
|
19
|
+
};
|
|
20
|
+
export function parseSectionFlags(content) {
|
|
21
|
+
return {
|
|
22
|
+
card_style: content.card_style ?? DEFAULT_FLAGS.card_style,
|
|
23
|
+
image_aspect: content.image_aspect ?? DEFAULT_FLAGS.image_aspect,
|
|
24
|
+
hover_image: content.hover_image !== false,
|
|
25
|
+
hover_image_speed: typeof content.hover_image_speed === "number" ? content.hover_image_speed : DEFAULT_FLAGS.hover_image_speed,
|
|
26
|
+
hover_reveal: content.hover_reveal ?? DEFAULT_FLAGS.hover_reveal,
|
|
27
|
+
show_compare_price: content.show_compare_price !== false,
|
|
28
|
+
show_rating: Boolean(content.show_rating),
|
|
29
|
+
show_color_swatches: Boolean(content.show_color_swatches),
|
|
30
|
+
badge_style: content.badge_style ?? DEFAULT_FLAGS.badge_style,
|
|
31
|
+
image_fit: content.image_fit ?? DEFAULT_FLAGS.image_fit,
|
|
32
|
+
card_shadow: content.card_shadow ?? DEFAULT_FLAGS.card_shadow,
|
|
33
|
+
blob_color: typeof content.blob_color === "string" ? content.blob_color : DEFAULT_FLAGS.blob_color,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
// ── Maps ───────────────────────────────────────────────────────────────────
|
|
37
|
+
const ASPECT_MAP = {
|
|
38
|
+
"1:1": "1 / 1", "3:4": "3 / 4", "4:5": "4 / 5", "16:9": "16 / 9",
|
|
39
|
+
};
|
|
40
|
+
const SHADOW_MAP = {
|
|
41
|
+
none: "none",
|
|
42
|
+
sm: "0 2px 8px rgba(0,0,0,0.07)",
|
|
43
|
+
md: "var(--lx-shadow-md, 0 8px 24px rgba(0,0,0,0.12))",
|
|
44
|
+
lg: "0 16px 48px rgba(0,0,0,0.18)",
|
|
45
|
+
};
|
|
46
|
+
const SHADOW_HOVER_MAP = {
|
|
47
|
+
none: "none",
|
|
48
|
+
sm: "0 4px 14px rgba(0,0,0,0.12)",
|
|
49
|
+
md: "0 16px 40px rgba(0,0,0,0.18)",
|
|
50
|
+
lg: "0 24px 60px rgba(0,0,0,0.24)",
|
|
51
|
+
};
|
|
52
|
+
// ── Hooks ──────────────────────────────────────────────────────────────────
|
|
53
|
+
function useImageCycle(images, speed, active) {
|
|
54
|
+
const [idx, setIdx] = useState(0);
|
|
55
|
+
const timerRef = useRef(null);
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (timerRef.current)
|
|
58
|
+
clearInterval(timerRef.current);
|
|
59
|
+
if (!active || images.length < 2) {
|
|
60
|
+
setIdx(0);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
setIdx(1);
|
|
64
|
+
if (images.length < 3)
|
|
65
|
+
return;
|
|
66
|
+
let current = 1;
|
|
67
|
+
timerRef.current = setInterval(() => {
|
|
68
|
+
current = (current % (images.length - 1)) + 1;
|
|
69
|
+
setIdx(current);
|
|
70
|
+
}, speed);
|
|
71
|
+
return () => { if (timerRef.current)
|
|
72
|
+
clearInterval(timerRef.current); };
|
|
73
|
+
}, [active, images.length, speed]);
|
|
74
|
+
return images[idx] ?? images[0] ?? "";
|
|
75
|
+
}
|
|
76
|
+
// ── Sub-components ─────────────────────────────────────────────────────────
|
|
77
|
+
function StarRow({ rating }) {
|
|
78
|
+
const r = Math.round(Math.min(5, Math.max(0, rating)));
|
|
79
|
+
return (_jsx("div", { style: { fontSize: "0.75rem", lineHeight: 1, letterSpacing: "0.06em" }, children: Array.from({ length: 5 }, (_, i) => (_jsx("span", { style: { color: "#f59e0b", opacity: i < r ? 1 : 0.3 }, children: "\u2605" }, i))) }));
|
|
80
|
+
}
|
|
81
|
+
function ColorSwatches({ colors }) {
|
|
82
|
+
const visible = colors.slice(0, 6);
|
|
83
|
+
const extra = colors.length - 6;
|
|
84
|
+
return (_jsxs("div", { style: { display: "flex", gap: "var(--lx-productcard-swatch-gap, var(--lx-space-xs))", flexWrap: "wrap", alignItems: "center" }, children: [visible.map((hex, i) => (_jsx("span", { style: {
|
|
85
|
+
display: "inline-block", width: "12px", height: "12px",
|
|
86
|
+
borderRadius: "var(--lx-productcard-swatch-radius, var(--lx-radius-full))", backgroundColor: hex,
|
|
87
|
+
border: "1px solid rgba(0,0,0,0.12)",
|
|
88
|
+
} }, i))), extra > 0 && (_jsxs("span", { style: { fontSize: "0.6rem", opacity: 0.6 }, children: ["+", extra] }))] }));
|
|
89
|
+
}
|
|
90
|
+
function BadgeOverlay({ badge, compare_price, badgeStyle, theme, }) {
|
|
91
|
+
const hasBadge = badge || compare_price;
|
|
92
|
+
if (!hasBadge)
|
|
93
|
+
return null;
|
|
94
|
+
const label = compare_price ? "SALE" : badge;
|
|
95
|
+
const bg = compare_price ? theme.palette.accent : theme.palette.accent;
|
|
96
|
+
if (badgeStyle === "ribbon") {
|
|
97
|
+
return (_jsx("div", { style: {
|
|
98
|
+
position: "absolute", top: 0, left: 0,
|
|
99
|
+
width: "72px", height: "72px", overflow: "hidden", zIndex: 2,
|
|
100
|
+
}, children: _jsx("span", { style: {
|
|
101
|
+
position: "absolute",
|
|
102
|
+
top: "18px", left: "-28px",
|
|
103
|
+
width: "110px",
|
|
104
|
+
backgroundColor: bg,
|
|
105
|
+
color: "#fff",
|
|
106
|
+
fontSize: "0.6rem",
|
|
107
|
+
fontWeight: 700,
|
|
108
|
+
textAlign: "center",
|
|
109
|
+
padding: "3px 0",
|
|
110
|
+
transform: "rotate(-45deg)",
|
|
111
|
+
display: "block",
|
|
112
|
+
letterSpacing: "0.04em",
|
|
113
|
+
}, children: label }) }));
|
|
114
|
+
}
|
|
115
|
+
if (badgeStyle === "corner") {
|
|
116
|
+
return (_jsx("div", { style: {
|
|
117
|
+
position: "absolute", top: 0, right: 0, zIndex: 2,
|
|
118
|
+
backgroundColor: bg, color: "#fff",
|
|
119
|
+
borderRadius: "0 0 0 var(--lx-productcard-badge-radius, var(--lx-radius-md))",
|
|
120
|
+
padding: "var(--lx-productcard-badge-padding-y, var(--lx-space-xs)) var(--lx-productcard-badge-padding-x, var(--lx-space-3))",
|
|
121
|
+
fontSize: "0.65rem",
|
|
122
|
+
fontWeight: 700,
|
|
123
|
+
letterSpacing: "0.04em",
|
|
124
|
+
}, children: label }));
|
|
125
|
+
}
|
|
126
|
+
// pill (default)
|
|
127
|
+
return (_jsxs("div", { style: { position: "absolute", top: "var(--lx-space-3)", left: "var(--lx-space-3)", zIndex: 2, display: "flex", flexDirection: "column", gap: "var(--lx-productcard-badge-gap, var(--lx-space-xs))" }, children: [compare_price && (_jsx("span", { style: { backgroundColor: theme.palette.accent, color: "#fff", fontSize: "0.65rem", fontWeight: 700, padding: "2px 10px", borderRadius: "var(--lx-productcard-badge-radius, var(--lx-radius-full))" }, children: "SALE" })), badge && (_jsx("span", { style: { backgroundColor: theme.palette.accent, color: "#fff", fontSize: "0.65rem", fontWeight: 700, padding: "2px 10px", borderRadius: "var(--lx-productcard-badge-radius, var(--lx-radius-full))" }, children: badge }))] }));
|
|
128
|
+
}
|
|
129
|
+
function HoverRevealOverlay({ reveal, item, theme, isHovered, showRating, showSwatches, }) {
|
|
130
|
+
if (reveal === "none")
|
|
131
|
+
return null;
|
|
132
|
+
const visible = isHovered;
|
|
133
|
+
if (reveal === "quick_add") {
|
|
134
|
+
return (_jsx("div", { style: {
|
|
135
|
+
position: "absolute", inset: "auto 0 0 0",
|
|
136
|
+
padding: "10px",
|
|
137
|
+
opacity: visible ? 1 : 0,
|
|
138
|
+
transform: visible ? "translateY(0)" : "translateY(8px)",
|
|
139
|
+
transition: "opacity 0.2s ease, transform 0.2s ease",
|
|
140
|
+
zIndex: 3,
|
|
141
|
+
}, children: _jsx("button", { type: "button", "data-lx-atc": "", "data-variant-gid": item.handle || "", "data-qty": "1", style: {
|
|
142
|
+
width: "100%",
|
|
143
|
+
padding: "10px 0",
|
|
144
|
+
fontSize: "0.85rem",
|
|
145
|
+
fontWeight: 600,
|
|
146
|
+
color: "#fff",
|
|
147
|
+
backgroundColor: theme.palette.accent,
|
|
148
|
+
border: "none",
|
|
149
|
+
borderRadius: "var(--lx-button-radius, 8px)",
|
|
150
|
+
cursor: "pointer",
|
|
151
|
+
}, children: "Add to Cart" }) }));
|
|
152
|
+
}
|
|
153
|
+
// details
|
|
154
|
+
return (_jsxs("div", { style: {
|
|
155
|
+
position: "absolute", inset: "auto 0 0 0",
|
|
156
|
+
padding: "10px 12px",
|
|
157
|
+
backgroundColor: "rgba(0,0,0,0.6)",
|
|
158
|
+
display: "flex",
|
|
159
|
+
alignItems: "center",
|
|
160
|
+
gap: "10px",
|
|
161
|
+
opacity: visible ? 1 : 0,
|
|
162
|
+
transform: visible ? "translateY(0)" : "translateY(8px)",
|
|
163
|
+
transition: "opacity 0.2s ease, transform 0.2s ease",
|
|
164
|
+
zIndex: 3,
|
|
165
|
+
}, children: [showRating && item.rating != null && _jsx(StarRow, { rating: item.rating }), showSwatches && item.colors?.length ? _jsx(ColorSwatches, { colors: item.colors }) : null, _jsx("a", { href: item.handle ? `/products/${item.handle}` : "#", style: { marginLeft: "auto", color: "#fff", fontSize: "0.75rem", fontWeight: 600, textDecoration: "none", opacity: 0.9 }, children: "View Details \u2192" })] }));
|
|
166
|
+
}
|
|
167
|
+
// ── Main Component ─────────────────────────────────────────────────────────
|
|
168
|
+
export function ProductCard({ item, flags, theme, isCarouselCard = false, idx = 0 }) {
|
|
169
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
170
|
+
// Merge per-item overrides over section flags
|
|
171
|
+
const style = item.card_style ?? flags.card_style;
|
|
172
|
+
const aspect = item.image_aspect ?? flags.image_aspect;
|
|
173
|
+
const doHover = item.hover_image ?? flags.hover_image;
|
|
174
|
+
const hoverSpeed = item.hover_image_speed ?? flags.hover_image_speed;
|
|
175
|
+
const reveal = item.hover_reveal ?? flags.hover_reveal;
|
|
176
|
+
const badgeStyle = item.badge_style ?? flags.badge_style;
|
|
177
|
+
const imageFit = item.image_fit ?? flags.image_fit;
|
|
178
|
+
const shadow = item.card_shadow ?? flags.card_shadow;
|
|
179
|
+
const blobColor = item.blob_color ?? flags.blob_color;
|
|
180
|
+
// Build image list: prefer item.images[], fall back to [image_url]
|
|
181
|
+
const images = (item.images && item.images.length > 0)
|
|
182
|
+
? item.images
|
|
183
|
+
: (item.image_url ? [item.image_url] : []);
|
|
184
|
+
const primarySrc = images[0] ?? "";
|
|
185
|
+
const cycledSrc = useImageCycle(images, hoverSpeed, isHovered && doHover);
|
|
186
|
+
const hasHoverImage = doHover && images.length > 1;
|
|
187
|
+
const aspectRatioCss = ASPECT_MAP[aspect];
|
|
188
|
+
const shadowCss = isHovered ? SHADOW_HOVER_MAP[shadow] : SHADOW_MAP[shadow];
|
|
189
|
+
const outerStyle = isCarouselCard
|
|
190
|
+
? { flexShrink: 0, width: "280px", scrollSnapAlign: "start" }
|
|
191
|
+
: { display: "block", width: "100%" };
|
|
192
|
+
// ── FLOATING ──────────────────────────────────────────────────────────
|
|
193
|
+
if (style === "floating") {
|
|
194
|
+
return (_jsxs("div", { style: {
|
|
195
|
+
...outerStyle,
|
|
196
|
+
backgroundColor: theme.palette.bg,
|
|
197
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
198
|
+
overflow: "visible",
|
|
199
|
+
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
200
|
+
transform: isHovered ? "translateY(-3px)" : "translateY(0)",
|
|
201
|
+
boxShadow: shadowCss,
|
|
202
|
+
cursor: "pointer",
|
|
203
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs("div", { style: { position: "relative", aspectRatio: aspectRatioCss, borderRadius: "var(--lx-card-radius, 12px)", overflow: "hidden", backgroundColor: theme.palette.bg }, children: [_jsx("div", { style: {
|
|
204
|
+
position: "absolute",
|
|
205
|
+
top: "50%", left: "50%",
|
|
206
|
+
transform: "translate(-50%, -50%)",
|
|
207
|
+
width: "78%", height: "78%",
|
|
208
|
+
borderRadius: "60% 40% 70% 30% / 40% 60% 30% 70%",
|
|
209
|
+
backgroundColor: blobColor,
|
|
210
|
+
opacity: 0.5,
|
|
211
|
+
transition: "border-radius 0.8s ease",
|
|
212
|
+
zIndex: 0,
|
|
213
|
+
} }), primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: {
|
|
214
|
+
position: "absolute", inset: 0, width: "100%", height: "100%",
|
|
215
|
+
objectFit: "contain", padding: "var(--lx-productcard-image-padding, var(--lx-space-3))",
|
|
216
|
+
opacity: hasHoverImage && isHovered ? 0 : 1,
|
|
217
|
+
transition: "opacity 0.35s ease",
|
|
218
|
+
zIndex: 1,
|
|
219
|
+
} })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: {
|
|
220
|
+
position: "absolute", inset: 0, width: "100%", height: "100%",
|
|
221
|
+
objectFit: "contain", padding: "var(--lx-productcard-image-padding, var(--lx-space-3))",
|
|
222
|
+
opacity: isHovered ? 1 : 0,
|
|
223
|
+
transition: "opacity 0.35s ease",
|
|
224
|
+
zIndex: 1,
|
|
225
|
+
} })), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme }), _jsx(HoverRevealOverlay, { reveal: reveal, item: item, theme: theme, isHovered: isHovered, showRating: flags.show_rating, showSwatches: flags.show_color_swatches })] }), _jsxs("div", { style: { padding: "var(--lx-productcard-info-padding-top, var(--lx-space-3)) var(--lx-productcard-info-padding-x, var(--lx-space-xs)) var(--lx-productcard-info-padding-bottom, var(--lx-space-sm))" }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.body, color: theme.palette.text, fontSize: "0.9rem", fontWeight: 600, margin: "0 0 4px", lineHeight: 1.3 }, children: item.name }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [_jsx("span", { style: { fontWeight: 700, fontSize: "1rem", color: theme.palette.accent }, children: item.price }), flags.show_compare_price && item.compare_price && (_jsx("span", { style: { fontSize: "0.8rem", textDecoration: "line-through", opacity: 0.5, color: theme.palette.text }, children: item.compare_price }))] }), flags.show_rating && item.rating != null && _jsx("div", { style: { marginTop: "var(--lx-productcard-rating-gap, var(--lx-space-xs))" }, children: _jsx(StarRow, { rating: item.rating }) }), flags.show_color_swatches && item.colors?.length ? _jsx("div", { style: { marginTop: "6px" }, children: _jsx(ColorSwatches, { colors: item.colors }) }) : null] })] }));
|
|
226
|
+
}
|
|
227
|
+
// ── EDITORIAL ─────────────────────────────────────────────────────────
|
|
228
|
+
if (style === "editorial") {
|
|
229
|
+
return (_jsxs("div", { style: {
|
|
230
|
+
...outerStyle,
|
|
231
|
+
position: "relative",
|
|
232
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
233
|
+
overflow: "hidden",
|
|
234
|
+
aspectRatio: aspectRatioCss,
|
|
235
|
+
boxShadow: shadowCss,
|
|
236
|
+
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
237
|
+
transform: isHovered ? "scale(1.02)" : "scale(1)",
|
|
238
|
+
cursor: "pointer",
|
|
239
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
240
|
+
opacity: hasHoverImage && isHovered ? 0 : 1, transition: "opacity 0.35s ease" } })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
241
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } })), _jsx("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0) 55%)", zIndex: 1 } }), _jsxs("div", { style: { position: "absolute", bottom: 0, left: 0, right: 0, padding: "var(--lx-productcard-info-padding, var(--lx-space-md))", zIndex: 2 }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.display, color: "#fff", fontSize: "1rem", fontWeight: 700, margin: "0 0 4px", lineHeight: 1.2 }, children: item.name }), _jsx("span", { style: { color: "#fff", opacity: 0.85, fontSize: "0.875rem", fontWeight: 500 }, children: item.price }), flags.show_rating && item.rating != null && _jsx("div", { style: { marginTop: "var(--lx-productcard-rating-gap, var(--lx-space-xs))" }, children: _jsx(StarRow, { rating: item.rating }) })] }), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme }), _jsx(HoverRevealOverlay, { reveal: reveal, item: item, theme: theme, isHovered: isHovered, showRating: false, showSwatches: flags.show_color_swatches })] }));
|
|
242
|
+
}
|
|
243
|
+
// ── MINIMAL ───────────────────────────────────────────────────────────
|
|
244
|
+
if (style === "minimal") {
|
|
245
|
+
return (_jsxs("div", { style: { ...outerStyle, backgroundColor: "transparent", cursor: "pointer" }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs("div", { style: { position: "relative", aspectRatio: aspectRatioCss, borderRadius: "var(--lx-productcard-image-radius, var(--lx-radius-md))", overflow: "hidden" }, children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
246
|
+
opacity: hasHoverImage && isHovered ? 0 : 1, transition: "opacity 0.35s ease" } })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
247
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } })), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme })] }), _jsxs("div", { style: { paddingTop: "10px" }, children: [_jsx("h3", { style: {
|
|
248
|
+
fontFamily: theme.fonts.body, color: theme.palette.text, fontSize: "0.875rem",
|
|
249
|
+
fontWeight: 500, margin: "0 0 4px",
|
|
250
|
+
textDecoration: isHovered ? "underline" : "none",
|
|
251
|
+
transition: "text-decoration 0.15s ease",
|
|
252
|
+
}, children: item.name }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [_jsx("span", { style: { fontWeight: 700, fontSize: "0.875rem", color: theme.palette.text }, children: item.price }), flags.show_compare_price && item.compare_price && (_jsx("span", { style: { fontSize: "0.75rem", textDecoration: "line-through", opacity: 0.45, color: theme.palette.text }, children: item.compare_price }))] }), flags.show_rating && item.rating != null && _jsx("div", { style: { marginTop: "var(--lx-productcard-rating-gap, var(--lx-space-xs))" }, children: _jsx(StarRow, { rating: item.rating }) }), flags.show_color_swatches && item.colors?.length ? _jsx("div", { style: { marginTop: "6px" }, children: _jsx(ColorSwatches, { colors: item.colors }) }) : null] })] }));
|
|
253
|
+
}
|
|
254
|
+
// ── STORY ─────────────────────────────────────────────────────────────
|
|
255
|
+
if (style === "story") {
|
|
256
|
+
return (_jsxs("div", { style: {
|
|
257
|
+
...outerStyle,
|
|
258
|
+
position: "relative",
|
|
259
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
260
|
+
overflow: "hidden",
|
|
261
|
+
aspectRatio: "4 / 5",
|
|
262
|
+
boxShadow: shadowCss,
|
|
263
|
+
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
264
|
+
transform: isHovered ? "scale(1.02)" : "scale(1)",
|
|
265
|
+
cursor: "pointer",
|
|
266
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover",
|
|
267
|
+
opacity: hasHoverImage && isHovered ? 0 : 1, transition: "opacity 0.35s ease" } })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover",
|
|
268
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } })), _jsx("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0) 50%)", zIndex: 1 } }), _jsxs("div", { style: { position: "absolute", bottom: 0, left: 0, right: 0, padding: "var(--lx-productcard-info-padding, var(--lx-space-md))", zIndex: 2 }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.display, color: "#fff", fontSize: "1.1rem", fontWeight: 700, margin: "0 0 4px", lineHeight: 1.2 }, children: item.name }), _jsx("span", { style: { color: "#fff", opacity: 0.85, fontSize: "0.9rem" }, children: item.price }), flags.show_color_swatches && item.colors?.length ? _jsx("div", { style: { marginTop: "6px" }, children: _jsx(ColorSwatches, { colors: item.colors }) }) : null] }), (item.badge || item.compare_price) && (_jsx("div", { style: { position: "absolute", top: "var(--lx-space-3)", right: "var(--lx-space-3)", zIndex: 3 }, children: _jsx("span", { style: {
|
|
269
|
+
backgroundColor: theme.palette.accent,
|
|
270
|
+
color: "#fff", fontSize: "0.65rem", fontWeight: 700, padding: "2px 10px", borderRadius: "var(--lx-productcard-badge-radius, var(--lx-radius-full))",
|
|
271
|
+
}, children: item.compare_price ? "SALE" : item.badge }) })), _jsx(HoverRevealOverlay, { reveal: reveal, item: item, theme: theme, isHovered: isHovered, showRating: flags.show_rating, showSwatches: false })] }));
|
|
272
|
+
}
|
|
273
|
+
// ── POLAROID ──────────────────────────────────────────────────────────
|
|
274
|
+
if (style === "polaroid") {
|
|
275
|
+
const tiltDeg = idx % 2 === 0 ? -1.5 : 1.5;
|
|
276
|
+
return (_jsxs("div", { style: {
|
|
277
|
+
...outerStyle,
|
|
278
|
+
backgroundColor: theme.palette.surface,
|
|
279
|
+
padding: "10px 10px 36px",
|
|
280
|
+
boxShadow: isHovered ? "0 12px 36px rgba(0,0,0,0.2)" : "0 4px 18px rgba(0,0,0,0.14)",
|
|
281
|
+
transition: "transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease",
|
|
282
|
+
transform: isHovered ? "rotate(0deg) scale(1.03) translateY(-4px)" : `rotate(${tiltDeg}deg)`,
|
|
283
|
+
cursor: "pointer",
|
|
284
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs("div", { style: { position: "relative", aspectRatio: aspectRatioCss, overflow: "hidden" }, children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
285
|
+
opacity: hasHoverImage && isHovered ? 0 : 1, transition: "opacity 0.35s ease" } })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
286
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } }))] }), _jsxs("div", { style: { paddingTop: "10px", textAlign: "center" }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.body, color: theme.palette.text, fontSize: "0.85rem", fontStyle: "italic", margin: "0 0 4px", fontWeight: 400 }, children: item.name }), _jsx("span", { style: { fontWeight: 700, fontSize: "0.875rem", color: theme.palette.accent }, children: item.price })] })] }));
|
|
287
|
+
}
|
|
288
|
+
// ── MAGNETIC ─────────────────────────────────────────────────────────
|
|
289
|
+
// Card physically follows cursor. Premium feel, signals interactivity.
|
|
290
|
+
if (style === "magnetic") {
|
|
291
|
+
const cardRef = useRef(null);
|
|
292
|
+
const offset = useMouseOffset(cardRef, 0.08);
|
|
293
|
+
const springX = useSpring(0, { stiffness: 200, damping: 20 });
|
|
294
|
+
const springY = useSpring(0, { stiffness: 200, damping: 20 });
|
|
295
|
+
useEffect(() => {
|
|
296
|
+
if (isHovered) {
|
|
297
|
+
springX.set(offset.x);
|
|
298
|
+
springY.set(offset.y);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
springX.set(0);
|
|
302
|
+
springY.set(0);
|
|
303
|
+
}
|
|
304
|
+
}, [isHovered, offset.x, offset.y]);
|
|
305
|
+
return (_jsxs(motion.div, { ref: cardRef, style: {
|
|
306
|
+
...outerStyle,
|
|
307
|
+
x: springX,
|
|
308
|
+
y: springY,
|
|
309
|
+
backgroundColor: theme.palette.surface,
|
|
310
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
311
|
+
overflow: "hidden",
|
|
312
|
+
cursor: "pointer",
|
|
313
|
+
position: "relative",
|
|
314
|
+
zIndex: isHovered ? 10 : 0,
|
|
315
|
+
}, whileHover: { scale: 1.04, boxShadow: "0 24px 60px rgba(0,0,0,0.22), 0 0 0 1.5px rgba(0,0,0,0.06)" }, transition: { type: "spring", stiffness: 300, damping: 25 }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs("div", { style: { position: "relative", aspectRatio: aspectRatioCss, overflow: "hidden" }, children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
316
|
+
opacity: hasHoverImage && isHovered ? 0 : 1, transition: "opacity 0.35s ease" } })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
317
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } })), _jsx(motion.div, { initial: { x: "-100%", opacity: 0 }, animate: isHovered ? { x: "150%", opacity: 0.18 } : { x: "-100%", opacity: 0 }, transition: { duration: 0.55, ease: "easeInOut" }, style: {
|
|
318
|
+
position: "absolute", inset: 0, zIndex: 4, pointerEvents: "none",
|
|
319
|
+
background: "linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.9) 50%, transparent 60%)",
|
|
320
|
+
transform: "skewX(-15deg)",
|
|
321
|
+
} }), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme }), _jsx(HoverRevealOverlay, { reveal: reveal, item: item, theme: theme, isHovered: isHovered, showRating: flags.show_rating, showSwatches: flags.show_color_swatches })] }), _jsxs("div", { style: { padding: "14px 16px" }, children: [_jsx(motion.h3, { animate: { color: isHovered ? theme.palette.accent : theme.palette.text }, transition: { duration: 0.2 }, style: { fontFamily: theme.fonts.body, fontSize: "0.9rem", fontWeight: 600, margin: "0 0 6px", lineHeight: 1.3 }, children: item.name }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [_jsx("span", { style: { fontWeight: 700, fontSize: "1rem", color: theme.palette.accent }, children: item.price }), flags.show_compare_price && item.compare_price && (_jsx("span", { style: { fontSize: "0.8rem", textDecoration: "line-through", opacity: 0.5, color: theme.palette.text }, children: item.compare_price }))] }), flags.show_rating && item.rating != null && _jsx("div", { style: { marginTop: "var(--lx-productcard-rating-gap, var(--lx-space-xs))" }, children: _jsx(StarRow, { rating: item.rating }) }), _jsx(AnimatePresence, { children: isHovered && flags.show_color_swatches && item.colors?.length && (_jsx(motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.2 }, style: { overflow: "hidden", marginTop: "6px" }, children: _jsx(ColorSwatches, { colors: item.colors }) })) })] })] }));
|
|
322
|
+
}
|
|
323
|
+
// ── SPOTLIGHT ─────────────────────────────────────────────────────────
|
|
324
|
+
// Radial spotlight follows cursor across the card image. Dramatic + premium.
|
|
325
|
+
if (style === "spotlight") {
|
|
326
|
+
const cardRef = useRef(null);
|
|
327
|
+
const mouseX = useMotionValue(0);
|
|
328
|
+
const mouseY = useMotionValue(0);
|
|
329
|
+
const spotlightX = useSpring(mouseX, { stiffness: 180, damping: 18 });
|
|
330
|
+
const spotlightY = useSpring(mouseY, { stiffness: 180, damping: 18 });
|
|
331
|
+
const spotlightOpacity = useSpring(0, { stiffness: 200, damping: 20 });
|
|
332
|
+
const gradientBg = useTransform([spotlightX, spotlightY], ([x, y]) => `radial-gradient(circle 160px at ${x}px ${y}px, rgba(255,255,255,0.22) 0%, transparent 70%)`);
|
|
333
|
+
function handleMouseMove(e) {
|
|
334
|
+
const rect = cardRef.current?.getBoundingClientRect();
|
|
335
|
+
if (!rect)
|
|
336
|
+
return;
|
|
337
|
+
mouseX.set(e.clientX - rect.left);
|
|
338
|
+
mouseY.set(e.clientY - rect.top);
|
|
339
|
+
}
|
|
340
|
+
return (_jsxs(motion.div, { ref: cardRef, style: {
|
|
341
|
+
...outerStyle,
|
|
342
|
+
backgroundColor: theme.palette.surface,
|
|
343
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
344
|
+
overflow: "hidden",
|
|
345
|
+
cursor: "pointer",
|
|
346
|
+
boxShadow: SHADOW_MAP[shadow],
|
|
347
|
+
}, whileHover: { scale: 1.025, boxShadow: SHADOW_HOVER_MAP[shadow] }, transition: { type: "spring", stiffness: 280, damping: 24 }, onMouseEnter: () => { setIsHovered(true); spotlightOpacity.set(1); }, onMouseLeave: () => { setIsHovered(false); spotlightOpacity.set(0); }, onMouseMove: handleMouseMove, children: [_jsxs("div", { style: { position: "relative", aspectRatio: aspectRatioCss, overflow: "hidden" }, children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
348
|
+
opacity: hasHoverImage && isHovered ? 0 : 1, transition: "opacity 0.35s ease" } })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
349
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } })), _jsx(motion.div, { style: {
|
|
350
|
+
position: "absolute", inset: 0, zIndex: 3, pointerEvents: "none",
|
|
351
|
+
background: gradientBg,
|
|
352
|
+
opacity: spotlightOpacity,
|
|
353
|
+
mixBlendMode: "overlay",
|
|
354
|
+
} }), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme }), _jsx(HoverRevealOverlay, { reveal: reveal, item: item, theme: theme, isHovered: isHovered, showRating: flags.show_rating, showSwatches: flags.show_color_swatches })] }), _jsxs("div", { style: { padding: "14px 16px" }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.body, color: theme.palette.text, fontSize: "0.9rem", fontWeight: 600, margin: "0 0 6px", lineHeight: 1.3 }, children: item.name }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [_jsx("span", { style: { fontWeight: 700, fontSize: "1rem", color: theme.palette.accent }, children: item.price }), flags.show_compare_price && item.compare_price && (_jsx("span", { style: { fontSize: "0.8rem", textDecoration: "line-through", opacity: 0.5, color: theme.palette.text }, children: item.compare_price }))] }), flags.show_rating && item.rating != null && _jsx("div", { style: { marginTop: "var(--lx-productcard-rating-gap, var(--lx-space-xs))" }, children: _jsx(StarRow, { rating: item.rating }) }), flags.show_color_swatches && item.colors?.length ? _jsx("div", { style: { marginTop: "6px" }, children: _jsx(ColorSwatches, { colors: item.colors }) }) : null] })] }));
|
|
355
|
+
}
|
|
356
|
+
// ── FLIP ──────────────────────────────────────────────────────────────
|
|
357
|
+
// 3D card flip — front=image+price, back=details+add-to-cart. Delight + CRO.
|
|
358
|
+
if (style === "flip") {
|
|
359
|
+
return (_jsx("div", { style: { ...outerStyle, perspective: "1200px", cursor: "pointer" }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: _jsxs(motion.div, { style: { position: "relative", width: "100%", transformStyle: "preserve-3d", minHeight: "340px" }, animate: { rotateY: isHovered ? 180 : 0 }, transition: { type: "spring", stiffness: 220, damping: 28 }, children: [_jsxs("div", { style: {
|
|
360
|
+
backfaceVisibility: "hidden",
|
|
361
|
+
WebkitBackfaceVisibility: "hidden",
|
|
362
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
363
|
+
overflow: "hidden",
|
|
364
|
+
backgroundColor: theme.palette.surface,
|
|
365
|
+
boxShadow: SHADOW_MAP[shadow],
|
|
366
|
+
}, children: [_jsxs("div", { style: { position: "relative", aspectRatio: aspectRatioCss, overflow: "hidden" }, children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { width: "100%", height: "100%", objectFit: imageFit, display: "block" } })), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme })] }), _jsxs("div", { style: { padding: "14px 16px" }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.body, color: theme.palette.text, fontSize: "0.9rem", fontWeight: 600, margin: "0 0 4px" }, children: item.name }), _jsx("span", { style: { fontWeight: 700, fontSize: "1rem", color: theme.palette.accent }, children: item.price })] })] }), _jsxs("div", { style: {
|
|
367
|
+
position: "absolute", inset: 0, top: 0, left: 0, right: 0, bottom: 0,
|
|
368
|
+
backfaceVisibility: "hidden",
|
|
369
|
+
WebkitBackfaceVisibility: "hidden",
|
|
370
|
+
transform: "rotateY(180deg)",
|
|
371
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
372
|
+
overflow: "hidden",
|
|
373
|
+
backgroundColor: theme.palette.accent,
|
|
374
|
+
display: "flex",
|
|
375
|
+
flexDirection: "column",
|
|
376
|
+
alignItems: "center",
|
|
377
|
+
justifyContent: "center",
|
|
378
|
+
padding: "var(--lx-productcard-flip-back-padding, var(--lx-space-lg))",
|
|
379
|
+
gap: "var(--lx-productcard-flip-back-gap, var(--lx-space-md))",
|
|
380
|
+
boxShadow: SHADOW_HOVER_MAP[shadow],
|
|
381
|
+
}, children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, style: { width: "80px", height: "80px", objectFit: "contain", borderRadius: "var(--lx-productcard-flip-thumb-radius, var(--lx-radius-lg))", backgroundColor: "rgba(255,255,255,0.15)" } })), _jsxs("div", { style: { textAlign: "center" }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.display, color: "#fff", fontSize: "1.1rem", fontWeight: 700, margin: "0 0 4px" }, children: item.name }), _jsx("span", { style: { color: "rgba(255,255,255,0.85)", fontSize: "0.9rem" }, children: item.price }), flags.show_rating && item.rating != null && (_jsx("div", { style: { marginTop: "6px", display: "flex", justifyContent: "center" }, children: _jsx(StarRow, { rating: item.rating }) }))] }), flags.show_color_swatches && item.colors?.length && (_jsx(ColorSwatches, { colors: item.colors })), _jsx("button", { type: "button", "data-lx-atc": "", "data-variant-gid": item.handle || "", "data-qty": "1", style: {
|
|
382
|
+
backgroundColor: "#fff",
|
|
383
|
+
color: theme.palette.accent,
|
|
384
|
+
border: "none",
|
|
385
|
+
borderRadius: "var(--lx-productcard-badge-radius, var(--lx-radius-full))",
|
|
386
|
+
padding: "10px 28px",
|
|
387
|
+
fontSize: "0.875rem",
|
|
388
|
+
fontWeight: 700,
|
|
389
|
+
fontFamily: theme.fonts.body,
|
|
390
|
+
cursor: "pointer",
|
|
391
|
+
width: "100%",
|
|
392
|
+
}, children: "Add to Cart" })] })] }) }));
|
|
393
|
+
}
|
|
394
|
+
// ── MORPH ─────────────────────────────────────────────────────────────
|
|
395
|
+
// Card expands vertically on hover, revealing a details strip below the image.
|
|
396
|
+
// Feels like a drawer opening. Spring physics = premium.
|
|
397
|
+
if (style === "morph") {
|
|
398
|
+
return (_jsxs(motion.div, { layout: true, style: {
|
|
399
|
+
...outerStyle,
|
|
400
|
+
backgroundColor: theme.palette.surface,
|
|
401
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
402
|
+
overflow: "hidden",
|
|
403
|
+
cursor: "pointer",
|
|
404
|
+
boxShadow: SHADOW_MAP[shadow],
|
|
405
|
+
position: "relative",
|
|
406
|
+
zIndex: isHovered ? 10 : 0,
|
|
407
|
+
}, animate: {
|
|
408
|
+
boxShadow: isHovered ? SHADOW_HOVER_MAP[shadow] : SHADOW_MAP[shadow],
|
|
409
|
+
y: isHovered ? -6 : 0,
|
|
410
|
+
}, transition: { type: "spring", stiffness: 260, damping: 24 }, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs(motion.div, { style: { position: "relative", aspectRatio: aspectRatioCss, overflow: "hidden" }, animate: { scale: isHovered ? 1.04 : 1 }, transition: { type: "spring", stiffness: 300, damping: 25 }, children: [primarySrc && (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
411
|
+
opacity: hasHoverImage && isHovered ? 0 : 1, transition: "opacity 0.35s ease" } })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
412
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } })), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme })] }), _jsxs("div", { style: { padding: "var(--lx-productcard-info-padding-top, var(--lx-space-3)) var(--lx-productcard-info-padding-x, var(--lx-space-md)) 10px" }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.body, color: theme.palette.text, fontSize: "0.9rem", fontWeight: 600, margin: "0 0 4px" }, children: item.name }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [_jsx("span", { style: { fontWeight: 700, fontSize: "1rem", color: theme.palette.accent }, children: item.price }), flags.show_compare_price && item.compare_price && (_jsx("span", { style: { fontSize: "0.8rem", textDecoration: "line-through", opacity: 0.5, color: theme.palette.text }, children: item.compare_price }))] })] }), _jsx(AnimatePresence, { children: isHovered && (_jsx(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: "auto", opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { type: "spring", stiffness: 280, damping: 28 }, style: { overflow: "hidden", borderTop: `1px solid ${theme.palette.border || "#f0ece8"}` }, children: _jsxs("div", { style: { padding: "var(--lx-productcard-info-padding-top, var(--lx-space-3)) var(--lx-productcard-info-padding-x, var(--lx-space-md))" }, children: [flags.show_rating && item.rating != null && (_jsx(motion.div, { initial: { x: -8, opacity: 0 }, animate: { x: 0, opacity: 1 }, transition: { delay: 0.04 }, style: { marginBottom: "var(--lx-productcard-rating-gap, var(--lx-space-sm))" }, children: _jsx(StarRow, { rating: item.rating }) })), flags.show_color_swatches && item.colors?.length && (_jsx(motion.div, { initial: { x: -8, opacity: 0 }, animate: { x: 0, opacity: 1 }, transition: { delay: 0.08 }, style: { marginBottom: "10px" }, children: _jsx(ColorSwatches, { colors: item.colors }) })), _jsx(motion.button, { initial: { y: 6, opacity: 0 }, animate: { y: 0, opacity: 1 }, transition: { delay: 0.12, type: "spring", stiffness: 300, damping: 22 }, whileTap: { scale: 0.97 }, type: "button", "data-lx-atc": "", "data-variant-gid": item.handle || "", "data-qty": "1", style: {
|
|
413
|
+
width: "100%",
|
|
414
|
+
padding: "10px",
|
|
415
|
+
fontSize: "0.85rem",
|
|
416
|
+
fontWeight: 700,
|
|
417
|
+
color: "#fff",
|
|
418
|
+
backgroundColor: theme.palette.accent,
|
|
419
|
+
border: "none",
|
|
420
|
+
borderRadius: "var(--lx-button-radius, 8px)",
|
|
421
|
+
cursor: "pointer",
|
|
422
|
+
fontFamily: theme.fonts.body,
|
|
423
|
+
}, children: "Add to Cart" })] }) }, "morph-drawer")) })] }));
|
|
424
|
+
}
|
|
425
|
+
// ── STANDARD (default) ────────────────────────────────────────────────
|
|
426
|
+
return (_jsxs("div", { style: {
|
|
427
|
+
...outerStyle,
|
|
428
|
+
backgroundColor: theme.palette.surface,
|
|
429
|
+
borderRadius: "var(--lx-card-radius, 12px)",
|
|
430
|
+
overflow: "hidden",
|
|
431
|
+
boxShadow: shadowCss,
|
|
432
|
+
transition: "transform 0.25s ease, box-shadow 0.25s ease",
|
|
433
|
+
transform: isHovered ? "translateY(-2px)" : "translateY(0)",
|
|
434
|
+
cursor: "pointer",
|
|
435
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs("div", { style: { position: "relative", aspectRatio: aspectRatioCss, overflow: "hidden" }, children: [primarySrc ? (_jsx("img", { src: primarySrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
436
|
+
transition: "opacity 0.35s ease, transform 0.4s ease",
|
|
437
|
+
opacity: hasHoverImage && isHovered ? 0 : 1,
|
|
438
|
+
transform: isHovered && !hasHoverImage ? "scale(1.06)" : "scale(1)", } })) : (_jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", fontSize: "2.5rem", backgroundColor: `${theme.palette.accent}18` }, children: "\uD83D\uDECD" })), hasHoverImage && (_jsx("img", { src: cycledSrc, alt: item.name, loading: "lazy", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: imageFit,
|
|
439
|
+
opacity: isHovered ? 1 : 0, transition: "opacity 0.35s ease" } })), _jsx(BadgeOverlay, { badge: item.badge, compare_price: item.compare_price, badgeStyle: badgeStyle, theme: theme }), _jsx(HoverRevealOverlay, { reveal: reveal, item: item, theme: theme, isHovered: isHovered, showRating: flags.show_rating, showSwatches: flags.show_color_swatches })] }), _jsxs("div", { style: { padding: "14px 16px" }, children: [_jsx("h3", { style: { fontFamily: theme.fonts.body, color: theme.palette.text, fontSize: "0.9rem", fontWeight: 600, margin: "0 0 6px", lineHeight: 1.3 }, children: item.name }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [_jsx("span", { style: { fontWeight: 700, fontSize: "1rem", color: theme.palette.accent }, children: item.price }), flags.show_compare_price && item.compare_price && (_jsx("span", { style: { fontSize: "0.8rem", textDecoration: "line-through", opacity: 0.5, color: theme.palette.text }, children: item.compare_price }))] }), flags.show_rating && item.rating != null && _jsx("div", { style: { marginTop: "var(--lx-productcard-rating-gap, var(--lx-space-xs))" }, children: _jsx(StarRow, { rating: item.rating }) }), flags.show_color_swatches && item.colors?.length ? _jsx("div", { style: { marginTop: "6px" }, children: _jsx(ColorSwatches, { colors: item.colors }) }) : null] })] }));
|
|
440
|
+
}
|
|
441
|
+
export default ProductCard;
|
|
442
|
+
//# sourceMappingURL=ProductCard.js.map
|