payaza-storefront-layouts 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/README.md +108 -0
- package/dist/components/learning/CertificateTemplates.d.ts +25 -0
- package/dist/components/learning/CertificateTemplates.d.ts.map +1 -0
- package/dist/components/learning/CertificateTemplates.js +31 -0
- package/dist/components/learning/CertificateViewer.d.ts +11 -0
- package/dist/components/learning/CertificateViewer.d.ts.map +1 -0
- package/dist/components/learning/CertificateViewer.js +114 -0
- package/dist/components/learning/MentorshipProgress.d.ts +18 -0
- package/dist/components/learning/MentorshipProgress.d.ts.map +1 -0
- package/dist/components/learning/MentorshipProgress.js +19 -0
- package/dist/components/ui/address-selector.d.ts +11 -0
- package/dist/components/ui/address-selector.d.ts.map +1 -0
- package/dist/components/ui/address-selector.js +21 -0
- package/dist/components/ui/avatar-image.d.ts +11 -0
- package/dist/components/ui/avatar-image.d.ts.map +1 -0
- package/dist/components/ui/avatar-image.js +39 -0
- package/dist/components/ui/background-patterns.d.ts +27 -0
- package/dist/components/ui/background-patterns.d.ts.map +1 -0
- package/dist/components/ui/background-patterns.js +5 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +20 -0
- package/dist/components/ui/breadcrumbs.d.ts +11 -0
- package/dist/components/ui/breadcrumbs.d.ts.map +1 -0
- package/dist/components/ui/breadcrumbs.js +8 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +33 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +24 -0
- package/dist/components/ui/category-tree.d.ts +16 -0
- package/dist/components/ui/category-tree.d.ts.map +1 -0
- package/dist/components/ui/category-tree.js +74 -0
- package/dist/components/ui/checkout-button.d.ts +11 -0
- package/dist/components/ui/checkout-button.d.ts.map +1 -0
- package/dist/components/ui/checkout-button.js +174 -0
- package/dist/components/ui/guest-checkout-modal.d.ts +19 -0
- package/dist/components/ui/guest-checkout-modal.d.ts.map +1 -0
- package/dist/components/ui/guest-checkout-modal.js +92 -0
- package/dist/components/ui/image-skeleton.d.ts +7 -0
- package/dist/components/ui/image-skeleton.d.ts.map +1 -0
- package/dist/components/ui/image-skeleton.js +15 -0
- package/dist/components/ui/image-with-fallback.d.ts +9 -0
- package/dist/components/ui/image-with-fallback.d.ts.map +1 -0
- package/dist/components/ui/image-with-fallback.js +203 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +8 -0
- package/dist/components/ui/loading-skeleton-wrapper.d.ts +6 -0
- package/dist/components/ui/loading-skeleton-wrapper.d.ts.map +1 -0
- package/dist/components/ui/loading-skeleton-wrapper.js +10 -0
- package/dist/components/ui/modal.d.ts +11 -0
- package/dist/components/ui/modal.d.ts.map +1 -0
- package/dist/components/ui/modal.js +26 -0
- package/dist/components/ui/otp-input.d.ts +10 -0
- package/dist/components/ui/otp-input.d.ts.map +1 -0
- package/dist/components/ui/otp-input.js +57 -0
- package/dist/components/ui/out-of-stock-overlay.d.ts +8 -0
- package/dist/components/ui/out-of-stock-overlay.d.ts.map +1 -0
- package/dist/components/ui/out-of-stock-overlay.js +12 -0
- package/dist/components/ui/page-animate-wrapper.d.ts +7 -0
- package/dist/components/ui/page-animate-wrapper.d.ts.map +1 -0
- package/dist/components/ui/page-animate-wrapper.js +16 -0
- package/dist/components/ui/page-content-loader.d.ts +13 -0
- package/dist/components/ui/page-content-loader.d.ts.map +1 -0
- package/dist/components/ui/page-content-loader.js +12 -0
- package/dist/components/ui/page-loader.d.ts +20 -0
- package/dist/components/ui/page-loader.d.ts.map +1 -0
- package/dist/components/ui/page-loader.js +31 -0
- package/dist/components/ui/product-card.d.ts +11 -0
- package/dist/components/ui/product-card.d.ts.map +1 -0
- package/dist/components/ui/product-card.js +95 -0
- package/dist/components/ui/product-rating.d.ts +17 -0
- package/dist/components/ui/product-rating.d.ts.map +1 -0
- package/dist/components/ui/product-rating.js +54 -0
- package/dist/components/ui/review-form.d.ts +9 -0
- package/dist/components/ui/review-form.d.ts.map +1 -0
- package/dist/components/ui/review-form.js +28 -0
- package/dist/components/ui/route-skeleton-loader.d.ts +7 -0
- package/dist/components/ui/route-skeleton-loader.d.ts.map +1 -0
- package/dist/components/ui/route-skeleton-loader.js +75 -0
- package/dist/components/ui/sheet.d.ts +12 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +29 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/skeletons/category-grid-skeleton.d.ts +6 -0
- package/dist/components/ui/skeletons/category-grid-skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeletons/category-grid-skeleton.js +16 -0
- package/dist/components/ui/skeletons/checkout-skeleton.d.ts +2 -0
- package/dist/components/ui/skeletons/checkout-skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeletons/checkout-skeleton.js +4 -0
- package/dist/components/ui/skeletons/index.d.ts +6 -0
- package/dist/components/ui/skeletons/index.d.ts.map +1 -0
- package/dist/components/ui/skeletons/index.js +5 -0
- package/dist/components/ui/skeletons/page-skeleton.d.ts +2 -0
- package/dist/components/ui/skeletons/page-skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeletons/page-skeleton.js +4 -0
- package/dist/components/ui/skeletons/product-card-skeleton.d.ts +2 -0
- package/dist/components/ui/skeletons/product-card-skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeletons/product-card-skeleton.js +4 -0
- package/dist/components/ui/skeletons/product-detail-skeleton.d.ts +2 -0
- package/dist/components/ui/skeletons/product-detail-skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeletons/product-detail-skeleton.js +4 -0
- package/dist/components/ui/skeletons/product-grid-skeleton.d.ts +7 -0
- package/dist/components/ui/skeletons/product-grid-skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeletons/product-grid-skeleton.js +12 -0
- package/dist/components/ui/store-logos.d.ts +43 -0
- package/dist/components/ui/store-logos.d.ts.map +1 -0
- package/dist/components/ui/store-logos.js +83 -0
- package/dist/components/ui/toast.d.ts +19 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +33 -0
- package/dist/components/ui/video-player.d.ts +48 -0
- package/dist/components/ui/video-player.d.ts.map +1 -0
- package/dist/components/ui/video-player.js +96 -0
- package/dist/hooks/use-analytics.d.ts +14 -0
- package/dist/hooks/use-analytics.d.ts.map +1 -0
- package/dist/hooks/use-analytics.js +66 -0
- package/dist/hooks/use-api.d.ts +17 -0
- package/dist/hooks/use-api.d.ts.map +1 -0
- package/dist/hooks/use-api.js +53 -0
- package/dist/hooks/use-cart-api.d.ts +17 -0
- package/dist/hooks/use-cart-api.d.ts.map +1 -0
- package/dist/hooks/use-cart-api.js +134 -0
- package/dist/hooks/use-content-ready.d.ts +17 -0
- package/dist/hooks/use-content-ready.d.ts.map +1 -0
- package/dist/hooks/use-content-ready.js +197 -0
- package/dist/hooks/use-navigation-loading.d.ts +4 -0
- package/dist/hooks/use-navigation-loading.d.ts.map +1 -0
- package/dist/hooks/use-navigation-loading.js +14 -0
- package/dist/hooks/use-payaza-checkout.d.ts +14 -0
- package/dist/hooks/use-payaza-checkout.d.ts.map +1 -0
- package/dist/hooks/use-payaza-checkout.js +56 -0
- package/dist/hooks/use-products-api.d.ts +19 -0
- package/dist/hooks/use-products-api.d.ts.map +1 -0
- package/dist/hooks/use-products-api.js +84 -0
- package/dist/hooks/use-store-api.d.ts +12 -0
- package/dist/hooks/use-store-api.d.ts.map +1 -0
- package/dist/hooks/use-store-api.js +73 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +126 -0
- package/dist/json/booking-agenda.json +18 -0
- package/dist/json/booking.json +71 -0
- package/dist/json/clothing-minimal.json +26 -0
- package/dist/json/clothing.json +169 -0
- package/dist/json/electronics-grid.json +18 -0
- package/dist/json/electronics.json +50 -0
- package/dist/json/food-modern.json +38 -0
- package/dist/json/food.json +85 -0
- package/dist/json/json-map.d.ts +7 -0
- package/dist/json/json-map.d.ts.map +1 -0
- package/dist/json/json-map.js +36 -0
- package/dist/json/motivational-speaker.json +96 -0
- package/dist/layouts/booking/components/BookingHomePage.d.ts +7 -0
- package/dist/layouts/booking/components/BookingHomePage.d.ts.map +1 -0
- package/dist/layouts/booking/components/BookingHomePage.js +49 -0
- package/dist/layouts/booking/index.d.ts +9 -0
- package/dist/layouts/booking/index.d.ts.map +1 -0
- package/dist/layouts/booking/index.js +9 -0
- package/dist/layouts/booking/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/booking/pages/AboutPage.js +45 -0
- package/dist/layouts/booking/pages/BookPage.d.ts +8 -0
- package/dist/layouts/booking/pages/BookPage.d.ts.map +1 -0
- package/dist/layouts/booking/pages/BookPage.js +441 -0
- package/dist/layouts/booking/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/booking/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/booking/pages/CategoriesPage.js +162 -0
- package/dist/layouts/booking/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/booking/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/booking/pages/CategoryPage.js +67 -0
- package/dist/layouts/booking/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/booking/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/booking/pages/ContactPage.js +20 -0
- package/dist/layouts/booking/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/booking/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/booking/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/booking/pages/ServicesPage.d.ts +9 -0
- package/dist/layouts/booking/pages/ServicesPage.d.ts.map +1 -0
- package/dist/layouts/booking/pages/ServicesPage.js +31 -0
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.d.ts +7 -0
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.js +186 -0
- package/dist/layouts/booking-agenda/index.d.ts +9 -0
- package/dist/layouts/booking-agenda/index.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/index.js +9 -0
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/pages/AboutPage.js +45 -0
- package/dist/layouts/booking-agenda/pages/BookPage.d.ts +8 -0
- package/dist/layouts/booking-agenda/pages/BookPage.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/pages/BookPage.js +441 -0
- package/dist/layouts/booking-agenda/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/booking-agenda/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/pages/CategoriesPage.js +162 -0
- package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/pages/CategoryPage.js +67 -0
- package/dist/layouts/booking-agenda/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/booking-agenda/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/pages/ContactPage.js +20 -0
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts +9 -0
- package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts.map +1 -0
- package/dist/layouts/booking-agenda/pages/ServicesPage.js +31 -0
- package/dist/layouts/clothing/components/ClothingHomePage.d.ts +7 -0
- package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -0
- package/dist/layouts/clothing/components/ClothingHomePage.js +295 -0
- package/dist/layouts/clothing/index.d.ts +8 -0
- package/dist/layouts/clothing/index.d.ts.map +1 -0
- package/dist/layouts/clothing/index.js +8 -0
- package/dist/layouts/clothing/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/clothing/pages/AboutPage.js +45 -0
- package/dist/layouts/clothing/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/clothing/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/clothing/pages/CategoriesPage.js +162 -0
- package/dist/layouts/clothing/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/clothing/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/clothing/pages/CategoryPage.js +67 -0
- package/dist/layouts/clothing/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/clothing/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/clothing/pages/ContactPage.js +20 -0
- package/dist/layouts/clothing/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/clothing/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/clothing/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/clothing/pages/ProductsPage.d.ts +7 -0
- package/dist/layouts/clothing/pages/ProductsPage.d.ts.map +1 -0
- package/dist/layouts/clothing/pages/ProductsPage.js +297 -0
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts +7 -0
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +48 -0
- package/dist/layouts/clothing-minimal/index.d.ts +8 -0
- package/dist/layouts/clothing-minimal/index.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/index.js +8 -0
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/pages/AboutPage.js +45 -0
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.js +162 -0
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/pages/CategoryPage.js +67 -0
- package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/pages/ContactPage.js +20 -0
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts +7 -0
- package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts.map +1 -0
- package/dist/layouts/clothing-minimal/pages/ProductsPage.js +297 -0
- package/dist/layouts/electronics/components/ElectronicsCategoriesPage.d.ts +7 -0
- package/dist/layouts/electronics/components/ElectronicsCategoriesPage.d.ts.map +1 -0
- package/dist/layouts/electronics/components/ElectronicsCategoriesPage.js +34 -0
- package/dist/layouts/electronics/components/ElectronicsGridProductCard.d.ts +10 -0
- package/dist/layouts/electronics/components/ElectronicsGridProductCard.d.ts.map +1 -0
- package/dist/layouts/electronics/components/ElectronicsGridProductCard.js +107 -0
- package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts +7 -0
- package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts.map +1 -0
- package/dist/layouts/electronics/components/ElectronicsHomePage.js +78 -0
- package/dist/layouts/electronics/components/ElectronicsPageWrapper.d.ts +8 -0
- package/dist/layouts/electronics/components/ElectronicsPageWrapper.d.ts.map +1 -0
- package/dist/layouts/electronics/components/ElectronicsPageWrapper.js +10 -0
- package/dist/layouts/electronics/components/ElectronicsProductsPage.d.ts +7 -0
- package/dist/layouts/electronics/components/ElectronicsProductsPage.d.ts.map +1 -0
- package/dist/layouts/electronics/components/ElectronicsProductsPage.js +100 -0
- package/dist/layouts/electronics/components/ElectronicsStoreFooter.d.ts +7 -0
- package/dist/layouts/electronics/components/ElectronicsStoreFooter.d.ts.map +1 -0
- package/dist/layouts/electronics/components/ElectronicsStoreFooter.js +10 -0
- package/dist/layouts/electronics/components/ElectronicsStoreHeader.d.ts +7 -0
- package/dist/layouts/electronics/components/ElectronicsStoreHeader.d.ts.map +1 -0
- package/dist/layouts/electronics/components/ElectronicsStoreHeader.js +27 -0
- package/dist/layouts/electronics/index.d.ts +19 -0
- package/dist/layouts/electronics/index.d.ts.map +1 -0
- package/dist/layouts/electronics/index.js +19 -0
- package/dist/layouts/electronics/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/AboutPage.js +45 -0
- package/dist/layouts/electronics/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/CategoriesPage.js +6 -0
- package/dist/layouts/electronics/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/electronics/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/CategoryPage.js +67 -0
- package/dist/layouts/electronics/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/ContactPage.js +20 -0
- package/dist/layouts/electronics/pages/HelpCenterPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/HelpCenterPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/HelpCenterPage.js +55 -0
- package/dist/layouts/electronics/pages/PrivacyPolicyPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/PrivacyPolicyPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/PrivacyPolicyPage.js +8 -0
- package/dist/layouts/electronics/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/electronics/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/electronics/pages/ProductsPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/ProductsPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/ProductsPage.js +297 -0
- package/dist/layouts/electronics/pages/ShippingReturnsPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/ShippingReturnsPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/ShippingReturnsPage.js +7 -0
- package/dist/layouts/electronics/pages/TermsPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/TermsPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/TermsPage.js +8 -0
- package/dist/layouts/electronics/pages/TrackOrderPage.d.ts +7 -0
- package/dist/layouts/electronics/pages/TrackOrderPage.d.ts.map +1 -0
- package/dist/layouts/electronics/pages/TrackOrderPage.js +371 -0
- package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.d.ts +10 -0
- package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.js +107 -0
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts +7 -0
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +89 -0
- package/dist/layouts/electronics-grid/index.d.ts +15 -0
- package/dist/layouts/electronics-grid/index.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/index.js +15 -0
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/AboutPage.js +45 -0
- package/dist/layouts/electronics-grid/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/CategoriesPage.js +6 -0
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/CategoryPage.js +67 -0
- package/dist/layouts/electronics-grid/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/ContactPage.js +20 -0
- package/dist/layouts/electronics-grid/pages/ElectronicsGridCategoriesPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/ElectronicsGridCategoriesPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/ElectronicsGridCategoriesPage.js +15 -0
- package/dist/layouts/electronics-grid/pages/HelpCenterPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/HelpCenterPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/HelpCenterPage.js +55 -0
- package/dist/layouts/electronics-grid/pages/PrivacyPolicyPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/PrivacyPolicyPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/PrivacyPolicyPage.js +8 -0
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/ProductsPage.js +297 -0
- package/dist/layouts/electronics-grid/pages/ShippingReturnsPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/ShippingReturnsPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/ShippingReturnsPage.js +7 -0
- package/dist/layouts/electronics-grid/pages/TermsPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/TermsPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/TermsPage.js +8 -0
- package/dist/layouts/electronics-grid/pages/TrackOrderPage.d.ts +7 -0
- package/dist/layouts/electronics-grid/pages/TrackOrderPage.d.ts.map +1 -0
- package/dist/layouts/electronics-grid/pages/TrackOrderPage.js +371 -0
- package/dist/layouts/food/components/FoodHomePage.d.ts +7 -0
- package/dist/layouts/food/components/FoodHomePage.d.ts.map +1 -0
- package/dist/layouts/food/components/FoodHomePage.js +304 -0
- package/dist/layouts/food/index.d.ts +9 -0
- package/dist/layouts/food/index.d.ts.map +1 -0
- package/dist/layouts/food/index.js +9 -0
- package/dist/layouts/food/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/food/pages/AboutPage.js +45 -0
- package/dist/layouts/food/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/food/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/food/pages/CategoriesPage.js +162 -0
- package/dist/layouts/food/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/food/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/food/pages/CategoryPage.js +67 -0
- package/dist/layouts/food/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/food/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/food/pages/ContactPage.js +20 -0
- package/dist/layouts/food/pages/MenuPage.d.ts +8 -0
- package/dist/layouts/food/pages/MenuPage.d.ts.map +1 -0
- package/dist/layouts/food/pages/MenuPage.js +75 -0
- package/dist/layouts/food/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/food/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/food/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/food/pages/ProductsPage.d.ts +7 -0
- package/dist/layouts/food/pages/ProductsPage.d.ts.map +1 -0
- package/dist/layouts/food/pages/ProductsPage.js +297 -0
- package/dist/layouts/food-modern/components/FoodHomePageModern.d.ts +7 -0
- package/dist/layouts/food-modern/components/FoodHomePageModern.d.ts.map +1 -0
- package/dist/layouts/food-modern/components/FoodHomePageModern.js +118 -0
- package/dist/layouts/food-modern/index.d.ts +9 -0
- package/dist/layouts/food-modern/index.d.ts.map +1 -0
- package/dist/layouts/food-modern/index.js +9 -0
- package/dist/layouts/food-modern/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/food-modern/pages/AboutPage.js +45 -0
- package/dist/layouts/food-modern/pages/CategoriesPage.d.ts +7 -0
- package/dist/layouts/food-modern/pages/CategoriesPage.d.ts.map +1 -0
- package/dist/layouts/food-modern/pages/CategoriesPage.js +162 -0
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/food-modern/pages/CategoryPage.js +67 -0
- package/dist/layouts/food-modern/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/food-modern/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/food-modern/pages/ContactPage.js +20 -0
- package/dist/layouts/food-modern/pages/MenuPage.d.ts +8 -0
- package/dist/layouts/food-modern/pages/MenuPage.d.ts.map +1 -0
- package/dist/layouts/food-modern/pages/MenuPage.js +75 -0
- package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts +8 -0
- package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts.map +1 -0
- package/dist/layouts/food-modern/pages/ProductDetailPage.js +502 -0
- package/dist/layouts/food-modern/pages/ProductsPage.d.ts +7 -0
- package/dist/layouts/food-modern/pages/ProductsPage.d.ts.map +1 -0
- package/dist/layouts/food-modern/pages/ProductsPage.js +297 -0
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.d.ts +7 -0
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.js +115 -0
- package/dist/layouts/motivational-speaker/components/MotivationalPageWrapper.d.ts +8 -0
- package/dist/layouts/motivational-speaker/components/MotivationalPageWrapper.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/components/MotivationalPageWrapper.js +10 -0
- package/dist/layouts/motivational-speaker/index.d.ts +10 -0
- package/dist/layouts/motivational-speaker/index.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/index.js +10 -0
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts +7 -0
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/pages/AboutPage.js +45 -0
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts +8 -0
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/pages/CategoryPage.js +67 -0
- package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts +7 -0
- package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/pages/ContactPage.js +20 -0
- package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts +7 -0
- package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/pages/ProductsPage.js +297 -0
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts +8 -0
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.js +144 -0
- package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts +9 -0
- package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/pages/ServicesPage.js +31 -0
- package/dist/layouts/motivational-speaker/pages/SubscriptionPage.d.ts +7 -0
- package/dist/layouts/motivational-speaker/pages/SubscriptionPage.d.ts.map +1 -0
- package/dist/layouts/motivational-speaker/pages/SubscriptionPage.js +136 -0
- package/dist/layouts/shared/components/BaseStoreLayout.d.ts +8 -0
- package/dist/layouts/shared/components/BaseStoreLayout.d.ts.map +1 -0
- package/dist/layouts/shared/components/BaseStoreLayout.js +59 -0
- package/dist/layouts/shared/components/GenericPageWrapper.d.ts +8 -0
- package/dist/layouts/shared/components/GenericPageWrapper.d.ts.map +1 -0
- package/dist/layouts/shared/components/GenericPageWrapper.js +19 -0
- package/dist/layouts/shared/components/PromoBanner.d.ts +9 -0
- package/dist/layouts/shared/components/PromoBanner.d.ts.map +1 -0
- package/dist/layouts/shared/components/PromoBanner.js +14 -0
- package/dist/layouts/shared/components/StoreFooter.d.ts +7 -0
- package/dist/layouts/shared/components/StoreFooter.d.ts.map +1 -0
- package/dist/layouts/shared/components/StoreFooter.js +147 -0
- package/dist/layouts/shared/components/StoreHeader.d.ts +8 -0
- package/dist/layouts/shared/components/StoreHeader.d.ts.map +1 -0
- package/dist/layouts/shared/components/StoreHeader.js +87 -0
- package/dist/layouts/shared/components/TestimonialCard.d.ts +8 -0
- package/dist/layouts/shared/components/TestimonialCard.d.ts.map +1 -0
- package/dist/layouts/shared/components/TestimonialCard.js +10 -0
- package/dist/layouts/shared/index.d.ts +23 -0
- package/dist/layouts/shared/index.d.ts.map +1 -0
- package/dist/layouts/shared/index.js +23 -0
- package/dist/layouts/shared/pages/AccountPage.d.ts +7 -0
- package/dist/layouts/shared/pages/AccountPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/AccountPage.js +605 -0
- package/dist/layouts/shared/pages/CartPage.d.ts +7 -0
- package/dist/layouts/shared/pages/CartPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/CartPage.js +83 -0
- package/dist/layouts/shared/pages/CheckoutPage.d.ts +7 -0
- package/dist/layouts/shared/pages/CheckoutPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/CheckoutPage.js +860 -0
- package/dist/layouts/shared/pages/CookiePolicyPage.d.ts +7 -0
- package/dist/layouts/shared/pages/CookiePolicyPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/CookiePolicyPage.js +8 -0
- package/dist/layouts/shared/pages/FeatureDisabledPage.d.ts +9 -0
- package/dist/layouts/shared/pages/FeatureDisabledPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/FeatureDisabledPage.js +8 -0
- package/dist/layouts/shared/pages/HelpCenterPage.d.ts +7 -0
- package/dist/layouts/shared/pages/HelpCenterPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/HelpCenterPage.js +55 -0
- package/dist/layouts/shared/pages/MaintenancePage.d.ts +7 -0
- package/dist/layouts/shared/pages/MaintenancePage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/MaintenancePage.js +44 -0
- package/dist/layouts/shared/pages/PortfolioPage.d.ts +7 -0
- package/dist/layouts/shared/pages/PortfolioPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/PortfolioPage.js +130 -0
- package/dist/layouts/shared/pages/PrivacyPolicyPage.d.ts +7 -0
- package/dist/layouts/shared/pages/PrivacyPolicyPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/PrivacyPolicyPage.js +8 -0
- package/dist/layouts/shared/pages/ShippingReturnsPage.d.ts +7 -0
- package/dist/layouts/shared/pages/ShippingReturnsPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/ShippingReturnsPage.js +7 -0
- package/dist/layouts/shared/pages/SizeGuidePage.d.ts +7 -0
- package/dist/layouts/shared/pages/SizeGuidePage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/SizeGuidePage.js +10 -0
- package/dist/layouts/shared/pages/StyleGuidePage.d.ts +7 -0
- package/dist/layouts/shared/pages/StyleGuidePage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/StyleGuidePage.js +126 -0
- package/dist/layouts/shared/pages/TeamPage.d.ts +7 -0
- package/dist/layouts/shared/pages/TeamPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/TeamPage.js +39 -0
- package/dist/layouts/shared/pages/TermsPage.d.ts +7 -0
- package/dist/layouts/shared/pages/TermsPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/TermsPage.js +8 -0
- package/dist/layouts/shared/pages/TrackOrderPage.d.ts +7 -0
- package/dist/layouts/shared/pages/TrackOrderPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/TrackOrderPage.js +371 -0
- package/dist/layouts/shared/pages/WishlistPage.d.ts +7 -0
- package/dist/layouts/shared/pages/WishlistPage.d.ts.map +1 -0
- package/dist/layouts/shared/pages/WishlistPage.js +162 -0
- package/dist/lib/api.d.ts +8 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +109 -0
- package/dist/lib/auth-context.d.ts +30 -0
- package/dist/lib/auth-context.d.ts.map +1 -0
- package/dist/lib/auth-context.js +207 -0
- package/dist/lib/content-selectors.d.ts +21 -0
- package/dist/lib/content-selectors.d.ts.map +1 -0
- package/dist/lib/content-selectors.js +75 -0
- package/dist/lib/countries.d.ts +11 -0
- package/dist/lib/countries.d.ts.map +1 -0
- package/dist/lib/countries.js +252 -0
- package/dist/lib/currency-symbols.d.ts +36 -0
- package/dist/lib/currency-symbols.d.ts.map +1 -0
- package/dist/lib/currency-symbols.js +153 -0
- package/dist/lib/guest-user.d.ts +27 -0
- package/dist/lib/guest-user.d.ts.map +1 -0
- package/dist/lib/guest-user.js +71 -0
- package/dist/lib/loading-context.d.ts +19 -0
- package/dist/lib/loading-context.d.ts.map +1 -0
- package/dist/lib/loading-context.js +197 -0
- package/dist/lib/mock-stores.d.ts +22 -0
- package/dist/lib/mock-stores.d.ts.map +1 -0
- package/dist/lib/mock-stores.js +2099 -0
- package/dist/lib/payaza-checkout.d.ts +167 -0
- package/dist/lib/payaza-checkout.d.ts.map +1 -0
- package/dist/lib/payaza-checkout.js +455 -0
- package/dist/lib/services/analytics.service.d.ts +58 -0
- package/dist/lib/services/analytics.service.d.ts.map +1 -0
- package/dist/lib/services/analytics.service.js +182 -0
- package/dist/lib/services/auth.service.d.ts +63 -0
- package/dist/lib/services/auth.service.d.ts.map +1 -0
- package/dist/lib/services/auth.service.js +101 -0
- package/dist/lib/services/booking.service.d.ts +53 -0
- package/dist/lib/services/booking.service.d.ts.map +1 -0
- package/dist/lib/services/booking.service.js +52 -0
- package/dist/lib/services/cart.service.d.ts +37 -0
- package/dist/lib/services/cart.service.d.ts.map +1 -0
- package/dist/lib/services/cart.service.js +55 -0
- package/dist/lib/services/category.service.d.ts +21 -0
- package/dist/lib/services/category.service.d.ts.map +1 -0
- package/dist/lib/services/category.service.js +41 -0
- package/dist/lib/services/checkout.service.d.ts +79 -0
- package/dist/lib/services/checkout.service.d.ts.map +1 -0
- package/dist/lib/services/checkout.service.js +37 -0
- package/dist/lib/services/customer.service.d.ts +52 -0
- package/dist/lib/services/customer.service.d.ts.map +1 -0
- package/dist/lib/services/customer.service.js +64 -0
- package/dist/lib/services/fees.service.d.ts +23 -0
- package/dist/lib/services/fees.service.d.ts.map +1 -0
- package/dist/lib/services/fees.service.js +13 -0
- package/dist/lib/services/index.d.ts +19 -0
- package/dist/lib/services/index.d.ts.map +1 -0
- package/dist/lib/services/index.js +18 -0
- package/dist/lib/services/order.service.d.ts +107 -0
- package/dist/lib/services/order.service.d.ts.map +1 -0
- package/dist/lib/services/order.service.js +82 -0
- package/dist/lib/services/payment.service.d.ts +51 -0
- package/dist/lib/services/payment.service.d.ts.map +1 -0
- package/dist/lib/services/payment.service.js +105 -0
- package/dist/lib/services/product.service.d.ts +90 -0
- package/dist/lib/services/product.service.d.ts.map +1 -0
- package/dist/lib/services/product.service.js +86 -0
- package/dist/lib/services/promo.service.d.ts +31 -0
- package/dist/lib/services/promo.service.d.ts.map +1 -0
- package/dist/lib/services/promo.service.js +29 -0
- package/dist/lib/services/review.service.d.ts +47 -0
- package/dist/lib/services/review.service.d.ts.map +1 -0
- package/dist/lib/services/review.service.js +54 -0
- package/dist/lib/services/service.service.d.ts +55 -0
- package/dist/lib/services/service.service.d.ts.map +1 -0
- package/dist/lib/services/service.service.js +37 -0
- package/dist/lib/services/shipping.service.d.ts +44 -0
- package/dist/lib/services/shipping.service.d.ts.map +1 -0
- package/dist/lib/services/shipping.service.js +23 -0
- package/dist/lib/services/store.service.d.ts +87 -0
- package/dist/lib/services/store.service.d.ts.map +1 -0
- package/dist/lib/services/store.service.js +41 -0
- package/dist/lib/services/wishlist.service.d.ts +30 -0
- package/dist/lib/services/wishlist.service.d.ts.map +1 -0
- package/dist/lib/services/wishlist.service.js +53 -0
- package/dist/lib/store-config-utils.d.ts +41 -0
- package/dist/lib/store-config-utils.d.ts.map +1 -0
- package/dist/lib/store-config-utils.js +1535 -0
- package/dist/lib/store-config.d.ts +3 -0
- package/dist/lib/store-config.d.ts.map +1 -0
- package/dist/lib/store-config.js +2 -0
- package/dist/lib/store-context.d.ts +39 -0
- package/dist/lib/store-context.d.ts.map +1 -0
- package/dist/lib/store-context.js +803 -0
- package/dist/lib/store-types.d.ts +663 -0
- package/dist/lib/store-types.d.ts.map +1 -0
- package/dist/lib/store-types.js +1 -0
- package/dist/lib/utils/asset-helpers.d.ts +102 -0
- package/dist/lib/utils/asset-helpers.d.ts.map +1 -0
- package/dist/lib/utils/asset-helpers.js +395 -0
- package/dist/lib/utils/category-tree.d.ts +25 -0
- package/dist/lib/utils/category-tree.d.ts.map +1 -0
- package/dist/lib/utils/category-tree.js +85 -0
- package/dist/lib/utils/demo-detection.d.ts +23 -0
- package/dist/lib/utils/demo-detection.d.ts.map +1 -0
- package/dist/lib/utils/demo-detection.js +36 -0
- package/dist/lib/utils/fee-calculations.d.ts +35 -0
- package/dist/lib/utils/fee-calculations.d.ts.map +1 -0
- package/dist/lib/utils/fee-calculations.js +64 -0
- package/dist/lib/utils/index.d.ts +37 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +160 -0
- package/dist/lib/utils/url-helpers.d.ts +30 -0
- package/dist/lib/utils/url-helpers.d.ts.map +1 -0
- package/dist/lib/utils/url-helpers.js +56 -0
- package/dist/lib/utils/video-helpers.d.ts +32 -0
- package/dist/lib/utils/video-helpers.d.ts.map +1 -0
- package/dist/lib/utils/video-helpers.js +210 -0
- package/package.json +92 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from '../../../components/ui/button';
|
|
4
|
+
import { ProductRating } from '../../../components/ui/product-rating';
|
|
5
|
+
import { ShoppingCart, Heart, ArrowRight, Truck, ShieldCheck, RefreshCw, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
6
|
+
import Link from 'next/link';
|
|
7
|
+
import Image from 'next/image';
|
|
8
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
9
|
+
import { useState, useEffect } from 'react';
|
|
10
|
+
import { formatCurrency, filterActiveProducts } from '../../../lib/utils';
|
|
11
|
+
import { getLayoutText, getBannerImage } from '../../../lib/utils/asset-helpers';
|
|
12
|
+
import { shouldUseAPI } from '../../../lib/utils/demo-detection';
|
|
13
|
+
import { PromoBanner } from '../../../layouts/shared/components/PromoBanner';
|
|
14
|
+
export function ClothingHomePage({ storeConfig }) {
|
|
15
|
+
const layoutConfig = storeConfig.layoutConfig;
|
|
16
|
+
const categories = storeConfig.categories || [];
|
|
17
|
+
// Randomly select max 2 categories on every page load
|
|
18
|
+
const [displayedCategories, setDisplayedCategories] = useState([]);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
// Shuffle and select max 2 categories
|
|
21
|
+
if (categories.length > 0) {
|
|
22
|
+
const shuffled = [...categories].sort(() => Math.random() - 0.5);
|
|
23
|
+
setDisplayedCategories(shuffled.slice(0, 2));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
setDisplayedCategories([]);
|
|
27
|
+
}
|
|
28
|
+
}, []); // Empty deps = run on mount only
|
|
29
|
+
// Debug logging for configuration
|
|
30
|
+
console.log('[ClothingHomePage] Full storeConfig:', {
|
|
31
|
+
storeId: storeConfig.id,
|
|
32
|
+
storeSlug: storeConfig.slug,
|
|
33
|
+
hasLayoutConfig: !!layoutConfig,
|
|
34
|
+
layoutConfigType: typeof layoutConfig,
|
|
35
|
+
});
|
|
36
|
+
console.log('[ClothingHomePage] LayoutConfig structure:', {
|
|
37
|
+
hasSections: !!layoutConfig?.sections,
|
|
38
|
+
hasHero: !!layoutConfig?.sections?.hero,
|
|
39
|
+
hasHeroSliders: !!layoutConfig?.sections?.hero?.sliders,
|
|
40
|
+
sliderCount: layoutConfig?.sections?.hero?.sliders?.length || 0,
|
|
41
|
+
topLevelHero: !!layoutConfig?.hero,
|
|
42
|
+
topLevelHeroSliders: !!layoutConfig?.hero?.sliders,
|
|
43
|
+
topLevelSliderCount: layoutConfig?.hero?.sliders?.length || 0,
|
|
44
|
+
});
|
|
45
|
+
console.log('[ClothingHomePage] Full LayoutConfig:', JSON.stringify(layoutConfig, null, 2));
|
|
46
|
+
console.log('[ClothingHomePage] Editorial config:', layoutConfig?.sections?.marketing?.editorial);
|
|
47
|
+
// Deduplicate products to avoid key warnings and filter out inactive/deleted products
|
|
48
|
+
const uniqueProducts = (storeConfig.products || []).filter((product, index, self) => index === self.findIndex((t) => t.id === product.id));
|
|
49
|
+
const products = filterActiveProducts(uniqueProducts);
|
|
50
|
+
// Hero slides data - use new slider structure with fallback to old format
|
|
51
|
+
// For demo stores, helpers will return fallbacks; for real stores, try layoutConfig first, then helpers
|
|
52
|
+
const isRealStore = shouldUseAPI(storeConfig.slug);
|
|
53
|
+
// Debug logging for slider configuration
|
|
54
|
+
console.log('[ClothingHomePage] LayoutConfig sections.hero:', layoutConfig?.sections?.hero);
|
|
55
|
+
console.log('[ClothingHomePage] LayoutConfig hero (top-level):', layoutConfig?.hero);
|
|
56
|
+
console.log('[ClothingHomePage] Sliders found:', layoutConfig?.sections?.hero?.sliders?.length || 0);
|
|
57
|
+
// Try new structure first (sections.hero.sliders)
|
|
58
|
+
let heroSlides = [];
|
|
59
|
+
if (layoutConfig?.sections?.hero?.sliders && Array.isArray(layoutConfig.sections.hero.sliders) && layoutConfig.sections.hero.sliders.length > 0) {
|
|
60
|
+
console.log('[ClothingHomePage] Using sections.hero.sliders structure');
|
|
61
|
+
heroSlides = layoutConfig.sections.hero.sliders
|
|
62
|
+
.filter((slider) => slider && slider.image) // Filter out invalid sliders
|
|
63
|
+
.map((slider) => {
|
|
64
|
+
// Extract button text - only use if not empty
|
|
65
|
+
const primaryButtonText = slider.primaryButton?.text?.trim() || '';
|
|
66
|
+
const secondaryButtonText = slider.secondaryButton?.text?.trim() || '';
|
|
67
|
+
console.log('[ClothingHomePage] Slider:', {
|
|
68
|
+
id: slider.id,
|
|
69
|
+
image: slider.image ? 'present' : 'missing',
|
|
70
|
+
title: slider.title,
|
|
71
|
+
primaryButtonText,
|
|
72
|
+
secondaryButtonText,
|
|
73
|
+
});
|
|
74
|
+
// Check badge visibility - use sections.hero.showBadges first, fallback to top-level hero.showBadges
|
|
75
|
+
const showBadges = layoutConfig?.sections?.hero?.showBadges !== false &&
|
|
76
|
+
(layoutConfig?.hero?.showBadges !== false || layoutConfig?.sections?.hero?.showBadges === undefined);
|
|
77
|
+
return {
|
|
78
|
+
image: slider.image || '',
|
|
79
|
+
badge: (showBadges && slider.badge && slider.badge.trim() !== '') ? slider.badge : undefined,
|
|
80
|
+
title: slider.title || storeConfig.name,
|
|
81
|
+
description: slider.description || storeConfig.description || '',
|
|
82
|
+
// Only set button text if it's not empty - this allows button visibility logic to work
|
|
83
|
+
primaryButtonText: primaryButtonText || getLayoutText(storeConfig, 'common.shopNow', 'Shop Now'),
|
|
84
|
+
primaryButtonLink: slider.primaryButton?.link || `/${storeConfig.slug}/products`,
|
|
85
|
+
secondaryButtonText: secondaryButtonText || undefined, // Don't provide fallback for secondary
|
|
86
|
+
secondaryButtonLink: slider.secondaryButton?.link || `/${storeConfig.slug}/categories`,
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
else if (layoutConfig?.hero?.sliders && Array.isArray(layoutConfig.hero.sliders) && layoutConfig.hero.sliders.length > 0) {
|
|
91
|
+
// Fallback to top-level hero.sliders
|
|
92
|
+
console.log('[ClothingHomePage] Using top-level hero.sliders structure');
|
|
93
|
+
heroSlides = layoutConfig.hero.sliders
|
|
94
|
+
.filter((slider) => slider && slider.image) // Filter out invalid sliders
|
|
95
|
+
.map((slider) => {
|
|
96
|
+
const primaryButtonText = slider.primaryButton?.text?.trim() || '';
|
|
97
|
+
const secondaryButtonText = slider.secondaryButton?.text?.trim() || '';
|
|
98
|
+
// Check badge visibility - use sections.hero.showBadges first, fallback to top-level hero.showBadges
|
|
99
|
+
const showBadges = layoutConfig?.sections?.hero?.showBadges !== false &&
|
|
100
|
+
(layoutConfig?.hero?.showBadges !== false || layoutConfig?.sections?.hero?.showBadges === undefined);
|
|
101
|
+
return {
|
|
102
|
+
image: slider.image || '',
|
|
103
|
+
badge: (showBadges && slider.badge && slider.badge.trim() !== '') ? slider.badge : undefined,
|
|
104
|
+
title: slider.title || storeConfig.name,
|
|
105
|
+
description: slider.description || storeConfig.description || '',
|
|
106
|
+
primaryButtonText: primaryButtonText || getLayoutText(storeConfig, 'common.shopNow', 'Shop Now'),
|
|
107
|
+
primaryButtonLink: slider.primaryButton?.link || `/${storeConfig.slug}/products`,
|
|
108
|
+
secondaryButtonText: secondaryButtonText || undefined,
|
|
109
|
+
secondaryButtonLink: slider.secondaryButton?.link || `/${storeConfig.slug}/categories`,
|
|
110
|
+
};
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
// Fallback to old format (backward compatibility)
|
|
115
|
+
heroSlides = [
|
|
116
|
+
{
|
|
117
|
+
image: getBannerImage(storeConfig, 'hero_slide_1', 'https://images.unsplash.com/photo-1483985988355-763728e1935b?q=80&w=2070&auto=format&fit=crop'),
|
|
118
|
+
badge: layoutConfig?.hero?.showBadges
|
|
119
|
+
? (isRealStore && layoutConfig?.text?.hero?.slides?.[0]?.badge ? layoutConfig.text.hero.slides[0].badge : getLayoutText(storeConfig, 'hero.badge', 'New Season'))
|
|
120
|
+
: undefined,
|
|
121
|
+
title: isRealStore && layoutConfig?.text?.hero?.slides?.[0]?.title ? layoutConfig.text.hero.slides[0].title : (getLayoutText(storeConfig, 'hero.slide1.title', storeConfig.name) || storeConfig.name),
|
|
122
|
+
description: isRealStore && layoutConfig?.text?.hero?.slides?.[0]?.description ? layoutConfig.text.hero.slides[0].description : (getLayoutText(storeConfig, 'hero.slide1.description', storeConfig.description) || storeConfig.description),
|
|
123
|
+
primaryButtonText: isRealStore && layoutConfig?.text?.hero?.slides?.[0]?.primaryButton ? layoutConfig.text.hero.slides[0].primaryButton : getLayoutText(storeConfig, 'common.shopNow', 'Shop Now'),
|
|
124
|
+
primaryButtonLink: `/${storeConfig.slug}/products`,
|
|
125
|
+
secondaryButtonText: isRealStore && layoutConfig?.text?.hero?.slides?.[0]?.secondaryButton ? layoutConfig.text.hero.slides[0].secondaryButton : getLayoutText(storeConfig, 'common.explore', 'Explore'),
|
|
126
|
+
secondaryButtonLink: `/${storeConfig.slug}/categories`,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
image: getBannerImage(storeConfig, 'hero_slide_2', 'https://images.unsplash.com/photo-1552374196-c4e7ffc6e126?q=80&w=2070&auto=format&fit=crop'),
|
|
130
|
+
badge: layoutConfig?.hero?.showBadges
|
|
131
|
+
? (isRealStore && layoutConfig?.text?.hero?.slides?.[1]?.badge ? layoutConfig.text.hero.slides[1].badge : getLayoutText(storeConfig, 'common.trending', 'Trending Now'))
|
|
132
|
+
: undefined,
|
|
133
|
+
title: isRealStore && layoutConfig?.text?.hero?.slides?.[1]?.title ? layoutConfig.text.hero.slides[1].title : getLayoutText(storeConfig, 'hero.slide2.title', 'Discover Your Style'),
|
|
134
|
+
description: isRealStore && layoutConfig?.text?.hero?.slides?.[1]?.description ? layoutConfig.text.hero.slides[1].description : getLayoutText(storeConfig, 'hero.slide2.description', 'Explore our curated collection of timeless pieces and contemporary designs.'),
|
|
135
|
+
primaryButtonText: isRealStore && layoutConfig?.text?.hero?.slides?.[1]?.primaryButton ? layoutConfig.text.hero.slides[1].primaryButton : getLayoutText(storeConfig, 'common.viewAll', 'View Collection'),
|
|
136
|
+
primaryButtonLink: `/${storeConfig.slug}/products`,
|
|
137
|
+
secondaryButtonText: isRealStore && layoutConfig?.text?.hero?.slides?.[1]?.secondaryButton ? layoutConfig.text.hero.slides[1].secondaryButton : undefined,
|
|
138
|
+
secondaryButtonLink: `/${storeConfig.slug}/categories/men`,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
image: getBannerImage(storeConfig, 'hero_slide_3', 'https://images.unsplash.com/photo-1469334031218-e382a71b716b?q=80&w=2070&auto=format&fit=crop'),
|
|
142
|
+
badge: layoutConfig?.hero?.showBadges
|
|
143
|
+
? (isRealStore && layoutConfig?.text?.hero?.slides?.[2]?.badge ? layoutConfig.text.hero.slides[2].badge : getLayoutText(storeConfig, 'common.limited', 'Limited Edition'))
|
|
144
|
+
: undefined,
|
|
145
|
+
title: isRealStore && layoutConfig?.text?.hero?.slides?.[2]?.title ? layoutConfig.text.hero.slides[2].title : getLayoutText(storeConfig, 'hero.slide3.title', 'Premium Quality'),
|
|
146
|
+
description: isRealStore && layoutConfig?.text?.hero?.slides?.[2]?.description ? layoutConfig.text.hero.slides[2].description : getLayoutText(storeConfig, 'hero.slide3.description', 'Crafted with attention to detail and premium materials for lasting elegance.'),
|
|
147
|
+
primaryButtonText: isRealStore && layoutConfig?.text?.hero?.slides?.[2]?.primaryButton ? layoutConfig.text.hero.slides[2].primaryButton : getLayoutText(storeConfig, 'common.shopNow', 'Shop Now'),
|
|
148
|
+
primaryButtonLink: `/${storeConfig.slug}/products`,
|
|
149
|
+
secondaryButtonText: isRealStore && layoutConfig?.text?.hero?.slides?.[2]?.secondaryButton ? layoutConfig.text.hero.slides[2].secondaryButton : undefined,
|
|
150
|
+
secondaryButtonLink: `/${storeConfig.slug}/categories/men`,
|
|
151
|
+
},
|
|
152
|
+
];
|
|
153
|
+
}
|
|
154
|
+
const [currentSlide, setCurrentSlide] = useState(0);
|
|
155
|
+
const [isAutoPlaying, setIsAutoPlaying] = useState(layoutConfig?.hero?.autoPlay !== false);
|
|
156
|
+
// Auto-play functionality
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
if (!isAutoPlaying || layoutConfig?.hero?.autoPlay === false || heroSlides.length === 0)
|
|
159
|
+
return;
|
|
160
|
+
const interval = setInterval(() => {
|
|
161
|
+
setCurrentSlide((prev) => (prev + 1) % heroSlides.length);
|
|
162
|
+
}, 5000); // Change slide every 5 seconds
|
|
163
|
+
return () => clearInterval(interval);
|
|
164
|
+
}, [isAutoPlaying, heroSlides.length, layoutConfig?.hero?.autoPlay]);
|
|
165
|
+
const goToSlide = (index) => {
|
|
166
|
+
if (heroSlides.length === 0)
|
|
167
|
+
return;
|
|
168
|
+
setCurrentSlide(Math.min(index, heroSlides.length - 1));
|
|
169
|
+
setIsAutoPlaying(false);
|
|
170
|
+
// Resume auto-play after 10 seconds
|
|
171
|
+
if (layoutConfig?.hero?.autoPlay !== false) {
|
|
172
|
+
setTimeout(() => setIsAutoPlaying(true), 10000);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const nextSlide = () => {
|
|
176
|
+
if (heroSlides.length === 0)
|
|
177
|
+
return;
|
|
178
|
+
setCurrentSlide((prev) => (prev + 1) % heroSlides.length);
|
|
179
|
+
setIsAutoPlaying(false);
|
|
180
|
+
if (layoutConfig?.hero?.autoPlay !== false) {
|
|
181
|
+
setTimeout(() => setIsAutoPlaying(true), 10000);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
const prevSlide = () => {
|
|
185
|
+
if (heroSlides.length === 0)
|
|
186
|
+
return;
|
|
187
|
+
setCurrentSlide((prev) => (prev - 1 + heroSlides.length) % heroSlides.length);
|
|
188
|
+
setIsAutoPlaying(false);
|
|
189
|
+
if (layoutConfig?.hero?.autoPlay !== false) {
|
|
190
|
+
setTimeout(() => setIsAutoPlaying(true), 10000);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
// Determine grid layout - always use 2-column layout since we limit to 2 categories
|
|
194
|
+
const getCategoryGridClass = () => {
|
|
195
|
+
return 'grid-cols-1 md:grid-cols-2';
|
|
196
|
+
};
|
|
197
|
+
return (_jsxs("div", { className: "min-h-screen bg-white", children: [layoutConfig?.hero?.show !== false && heroSlides.length > 0 && (_jsxs("section", { className: "relative h-[85vh] w-full overflow-hidden", onMouseEnter: () => setIsAutoPlaying(false), onMouseLeave: () => layoutConfig?.hero?.autoPlay !== false && setIsAutoPlaying(true), children: [_jsx("div", { className: "relative h-full w-full", children: heroSlides.map((slide, index) => (_jsxs("div", { className: `absolute inset-0 transition-opacity duration-1000 ease-in-out ${index === currentSlide ? 'opacity-100 z-10' : 'opacity-0 z-0'}`, children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: slide.image, alt: slide.title, fill: true, className: "object-cover", unoptimized: true }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/50 via-black/20 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center z-20", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: `max-w-3xl text-white space-y-8 transition-all duration-1000 ${index === currentSlide
|
|
198
|
+
? 'opacity-100 translate-y-0'
|
|
199
|
+
: 'opacity-0 translate-y-8'}`, children: [_jsxs("div", { children: [slide.badge && (_jsx("span", { className: "inline-block px-4 py-1.5 bg-white/20 backdrop-blur-md rounded-full text-sm font-medium border border-white/30 uppercase tracking-wider mb-4", children: slide.badge })), _jsx("h1", { className: "text-4xl sm:text-6xl lg:text-7xl font-bold leading-tight tracking-tight mb-4", children: slide.title }), _jsx("div", { className: "h-1 w-24 bg-white/80 rounded-full" })] }), _jsx("p", { className: "text-xl sm:text-2xl text-gray-100 font-light leading-relaxed max-w-lg", children: slide.description }), _jsxs("div", { className: "flex flex-wrap gap-4 pt-4", children: [layoutConfig?.sections?.hero?.showCTA !== false &&
|
|
200
|
+
layoutConfig?.hero?.showCTA !== false &&
|
|
201
|
+
slide.primaryButtonText &&
|
|
202
|
+
slide.primaryButtonText.trim() !== '' && (_jsx(Link, { href: slide.primaryButtonLink, children: _jsx(Button, { size: "lg", className: "h-14 px-10 text-base rounded-full bg-white text-black hover:bg-gray-100 transition-all duration-300 hover:scale-105 font-semibold", children: slide.primaryButtonText }) })), (layoutConfig?.sections?.hero?.showSecondaryCTA !== false || layoutConfig?.hero?.showSecondaryCTA !== false) &&
|
|
203
|
+
slide.secondaryButtonText &&
|
|
204
|
+
slide.secondaryButtonText.trim() !== '' &&
|
|
205
|
+
slide.secondaryButtonLink && (_jsx(Link, { href: slide.secondaryButtonLink, children: _jsx(Button, { size: "lg", variant: "outline", className: "h-14 px-10 text-base rounded-full border-white bg-transparent text-white hover:bg-white/20 hover:text-white backdrop-blur-sm transition-all duration-300", style: { color: 'white' }, children: slide.secondaryButtonText }) }))] })] }) }) })] }, index))) }), _jsx("button", { onClick: prevSlide, className: "absolute left-4 top-1/2 -translate-y-1/2 z-30 bg-white/10 hover:bg-white/20 backdrop-blur-md rounded-full p-3 transition-all duration-300 hover:scale-110 group", "aria-label": "Previous slide", children: _jsx(ChevronLeft, { className: "h-6 w-6 text-white group-hover:text-white" }) }), _jsx("button", { onClick: nextSlide, className: "absolute right-4 top-1/2 -translate-y-1/2 z-30 bg-white/10 hover:bg-white/20 backdrop-blur-md rounded-full p-3 transition-all duration-300 hover:scale-110 group", "aria-label": "Next slide", children: _jsx(ChevronRight, { className: "h-6 w-6 text-white group-hover:text-white" }) }), _jsx("div", { className: "absolute bottom-8 left-1/2 -translate-x-1/2 z-30 flex gap-2", children: heroSlides.map((_, index) => (_jsx("button", { onClick: () => goToSlide(index), className: `transition-all duration-300 rounded-full ${index === currentSlide
|
|
206
|
+
? 'w-12 h-2 bg-white'
|
|
207
|
+
: 'w-2 h-2 bg-white/50 hover:bg-white/75'}`, "aria-label": `Go to slide ${index + 1}` }, index))) })] })), layoutConfig?.features?.show !== false && (_jsx("section", { className: "py-8 bg-gray-50 border-b border-gray-100", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 text-center divide-y md:divide-y-0 md:divide-x divide-gray-200", children: [_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-4", children: [_jsx(Truck, { className: "h-6 w-6 text-gray-900" }), _jsx("h3", { className: "font-semibold text-gray-900", children: "Free Shipping" }), _jsxs("p", { className: "text-sm text-gray-500", children: ["On all orders over $", storeConfig.settings.freeShippingThreshold] })] }), _jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-4", children: [_jsx(RefreshCw, { className: "h-6 w-6 text-gray-900" }), _jsx("h3", { className: "font-semibold text-gray-900", children: "Free Returns" }), _jsx("p", { className: "text-sm text-gray-500", children: "30-day money back guarantee" })] }), _jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-4", children: [_jsx(ShieldCheck, { className: "h-6 w-6 text-gray-900" }), _jsx("h3", { className: "font-semibold text-gray-900", children: "Secure Payment" }), _jsx("p", { className: "text-sm text-gray-500", children: "100% secure checkout process" })] })] }) }) })), layoutConfig?.sections?.categories?.show !== false && (_jsx("section", { className: "py-12 md:py-20 px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "container mx-auto max-w-7xl", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-end mb-8 md:mb-12 gap-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold mb-3 tracking-tight", children: getLayoutText(storeConfig, 'sections.categories.title', 'Shop by Category') }), _jsx("p", { className: "text-gray-500 text-lg", children: getLayoutText(storeConfig, 'sections.categories.subtitle', 'Curated collections for every style') })] }), layoutConfig?.sections?.categories?.showViewAll !== false && (_jsxs(Link, { href: `/${storeConfig.slug}/categories`, className: "group flex items-center gap-2 text-sm font-medium hover:text-gray-600 transition-colors pb-1 border-b border-transparent hover:border-gray-300", children: [getLayoutText(storeConfig, 'sections.categories.viewAll', 'View All Categories'), " ", _jsx(ArrowRight, { className: "h-4 w-4 transition-transform group-hover:translate-x-1" })] }))] }), _jsx("div", { className: `grid ${getCategoryGridClass()} gap-6`, children: displayedCategories.map((category) => {
|
|
208
|
+
// Validate category image - handle all formats
|
|
209
|
+
const extractCategoryImage = (image) => {
|
|
210
|
+
if (!image)
|
|
211
|
+
return undefined;
|
|
212
|
+
// If already a string, validate
|
|
213
|
+
if (typeof image === 'string') {
|
|
214
|
+
const trimmed = image.trim();
|
|
215
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
216
|
+
}
|
|
217
|
+
// If object, extract url
|
|
218
|
+
if (typeof image === 'object' && image !== null) {
|
|
219
|
+
if ('url' in image && image.url) {
|
|
220
|
+
const url = typeof image.url === 'string' ? image.url.trim() : String(image.url).trim();
|
|
221
|
+
return url.length > 0 ? url : undefined;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
// If array, take first valid item
|
|
225
|
+
if (Array.isArray(image) && image.length > 0) {
|
|
226
|
+
return extractCategoryImage(image[0]);
|
|
227
|
+
}
|
|
228
|
+
return undefined;
|
|
229
|
+
};
|
|
230
|
+
const categoryImage = extractCategoryImage(category.image);
|
|
231
|
+
return (_jsxs(Link, { href: `/${storeConfig.slug}/categories/${category.slug}`, className: `group relative overflow-hidden rounded-2xl aspect-[3/4]`, children: [_jsxs("div", { className: "absolute inset-0 bg-gray-200", children: [_jsx(ImageWithFallback, { src: categoryImage, alt: category.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110", skeletonAspectRatio: "auto" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent opacity-80 group-hover:opacity-70 transition-opacity" })] }), _jsxs("div", { className: "absolute inset-0 flex flex-col justify-end p-8", children: [_jsx("h3", { className: "text-2xl font-bold text-white mb-2 transform translate-y-0 transition-transform duration-300", children: category.name }), _jsx("div", { className: "h-0.5 w-12 bg-white/0 group-hover:bg-white/100 transition-all duration-500 mb-4" }), _jsxs("span", { className: "inline-flex items-center text-white text-sm font-medium opacity-0 group-hover:opacity-100 transform translate-y-4 group-hover:translate-y-0 transition-all duration-300", children: [getLayoutText(storeConfig, 'common.shopNow', 'Shop Now'), " ", _jsx(ArrowRight, { className: "ml-2 h-4 w-4" })] })] })] }, category.id));
|
|
232
|
+
}) })] }) })), layoutConfig?.sections?.marketing?.show !== false && (_jsx("section", { className: "py-16 md:py-24 px-4 sm:px-6 lg:px-8 bg-stone-50", children: _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-12 lg:gap-20 items-center", children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: "aspect-[4/5] rounded-lg overflow-hidden relative", children: _jsx(ImageWithFallback, { src: layoutConfig?.sections?.marketing?.editorial?.image, alt: "Editorial Lookbook", className: "w-full h-full object-cover", skeletonAspectRatio: "4/5" }) }), layoutConfig?.sections?.marketing?.editorial?.detailImage && (_jsx("div", { className: "absolute -bottom-8 -right-8 w-48 h-48 bg-white p-4 shadow-xl rounded-lg hidden md:block animate-fade-in-up", style: { animationDelay: '0.2s' }, children: _jsx("div", { className: "w-full h-full relative", children: _jsx(ImageWithFallback, { src: layoutConfig.sections.marketing.editorial.detailImage, alt: "Detail Shot", className: "w-full h-full object-cover rounded", skeletonAspectRatio: "square" }) }) }))] }), _jsxs("div", { className: "space-y-8", children: [_jsx("span", { className: "text-sm font-bold tracking-widest text-gray-500 uppercase", children: layoutConfig?.sections?.marketing?.editorial?.label || "Editorial" }), _jsx("h2", { className: "text-4xl md:text-5xl font-bold tracking-tight leading-tight text-gray-900", children: layoutConfig?.sections?.marketing?.editorial?.title ? (layoutConfig.sections.marketing.editorial.title.split('\n').map((line, idx, arr) => (_jsxs("span", { children: [line, idx < arr.length - 1 && _jsx("br", {})] }, idx)))) : (_jsxs(_Fragment, { children: ["Redefining Modern ", _jsx("br", {}), _jsx("span", { className: "italic font-serif", children: "Elegance" })] })) }), _jsx("p", { className: "text-lg text-gray-600 leading-relaxed", children: layoutConfig?.sections?.marketing?.editorial?.description || "Explore our latest editorial featuring timeless pieces crafted for the contemporary wardrobe. From essential basics to statement outwear, find your signature look." }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-4 pt-4", children: [layoutConfig?.sections?.marketing?.editorial?.primaryButtonText && layoutConfig.sections.marketing.editorial.primaryButtonText.trim() !== '' && (_jsx(Link, { href: layoutConfig.sections.marketing.editorial.primaryButtonLink || `/${storeConfig.slug}/style-guide`, children: _jsx(Button, { className: "rounded-full px-8 py-6 bg-gray-900 hover:bg-black text-white transition-all", children: layoutConfig.sections.marketing.editorial.primaryButtonText }) })), layoutConfig?.sections?.marketing?.editorial?.secondaryButtonText && layoutConfig.sections.marketing.editorial.secondaryButtonText.trim() !== '' && (_jsx(Link, { href: layoutConfig.sections.marketing.editorial.secondaryButtonLink || `/${storeConfig.slug}/about`, children: _jsx(Button, { variant: "outline", className: "rounded-full px-8 py-6 border-gray-300 hover:bg-white hover:border-gray-900 transition-all", children: layoutConfig.sections.marketing.editorial.secondaryButtonText }) }))] })] })] }) }) })), layoutConfig?.sections?.featuredProducts?.show !== false && (_jsx("section", { className: "py-16 md:py-24 px-4 sm:px-6 lg:px-8 bg-white", children: _jsxs("div", { className: "container mx-auto max-w-7xl", children: [_jsxs("div", { className: "text-center max-w-2xl mx-auto mb-10 md:mb-16", children: [_jsx("span", { className: "text-sm font-bold tracking-widest text-gray-500 uppercase mb-3 block", children: "Curated For You" }), _jsx("h2", { className: "text-3xl md:text-4xl font-bold mb-4 tracking-tight", children: layoutConfig?.sections?.featuredProducts?.title || getLayoutText(storeConfig, 'sections.featuredProducts.title', 'Trending Now') }), _jsx("div", { className: "h-1 w-20 bg-gray-900 mx-auto mb-6" }), _jsx("p", { className: "text-gray-600 text-lg", children: getLayoutText(storeConfig, 'sections.featuredProducts.subtitle', 'Discover the latest trends and essential pieces that define this season\'s style.') })] }), _jsx("div", { className: "grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-8", children: products.slice(0, 4).map((product) => {
|
|
233
|
+
// Comprehensive image extraction - handles all formats
|
|
234
|
+
const extractProductImages = (images) => {
|
|
235
|
+
if (!images)
|
|
236
|
+
return [];
|
|
237
|
+
// If already an array of strings, validate and return
|
|
238
|
+
if (Array.isArray(images)) {
|
|
239
|
+
const firstItem = images[0];
|
|
240
|
+
if (typeof firstItem === 'string') {
|
|
241
|
+
return images
|
|
242
|
+
.filter((img) => typeof img === 'string' && img.trim().length > 0)
|
|
243
|
+
.map((img) => img.trim());
|
|
244
|
+
}
|
|
245
|
+
// If array of objects, extract URLs
|
|
246
|
+
if (firstItem && typeof firstItem === 'object' && firstItem !== null) {
|
|
247
|
+
const result = [];
|
|
248
|
+
for (const item of images) {
|
|
249
|
+
if (!item)
|
|
250
|
+
continue;
|
|
251
|
+
if (typeof item === 'object' && item !== null) {
|
|
252
|
+
// Check for url property
|
|
253
|
+
if ('url' in item && item.url) {
|
|
254
|
+
const url = typeof item.url === 'string' ? item.url.trim() : String(item.url).trim();
|
|
255
|
+
if (url.length > 0) {
|
|
256
|
+
result.push(url);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Check for nested url
|
|
260
|
+
else if (item.url && typeof item.url === 'object' && 'url' in item.url) {
|
|
261
|
+
const url = typeof item.url.url === 'string' ? item.url.url.trim() : String(item.url.url).trim();
|
|
262
|
+
if (url.length > 0) {
|
|
263
|
+
result.push(url);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else if (typeof item === 'string') {
|
|
268
|
+
const trimmed = item.trim();
|
|
269
|
+
if (trimmed.length > 0) {
|
|
270
|
+
result.push(trimmed);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return result;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
// Handle single object
|
|
278
|
+
if (typeof images === 'object' && images !== null && !Array.isArray(images)) {
|
|
279
|
+
if ('url' in images && images.url) {
|
|
280
|
+
const url = typeof images.url === 'string' ? images.url.trim() : String(images.url).trim();
|
|
281
|
+
return url.length > 0 ? [url] : [];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
// Handle single string
|
|
285
|
+
if (typeof images === 'string') {
|
|
286
|
+
const trimmed = images.trim();
|
|
287
|
+
return trimmed.length > 0 ? [trimmed] : [];
|
|
288
|
+
}
|
|
289
|
+
return [];
|
|
290
|
+
};
|
|
291
|
+
const validImages = extractProductImages(product.images);
|
|
292
|
+
const firstImage = validImages.length > 0 ? validImages[0] : undefined;
|
|
293
|
+
return (_jsx("div", { className: "group", children: _jsxs(Link, { href: `/${storeConfig.slug}/products/${product.slug}`, children: [_jsxs("div", { className: "relative aspect-[3/4] bg-gray-50 rounded-xl overflow-hidden mb-4", children: [_jsx(ImageWithFallback, { src: firstImage, alt: product.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105", skeletonAspectRatio: "3/4" }), validImages[1] && (_jsx(ImageWithFallback, { src: validImages[1], alt: product.name, className: "absolute inset-0 w-full h-full object-cover opacity-0 group-hover:opacity-100 transition-opacity duration-500", skeletonAspectRatio: "3/4" })), _jsxs("div", { className: "hidden lg:flex absolute bottom-4 right-4 flex-col gap-2 opacity-0 transform translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300", children: [storeConfig.features.wishlist && (_jsx(Button, { variant: "secondary", size: "icon", className: "bg-white hover:bg-black hover:text-white shadow-md rounded-full transition-colors", children: _jsx(Heart, { className: "h-4 w-4" }) })), _jsx(Button, { variant: "secondary", size: "icon", className: "bg-white hover:bg-black hover:text-white shadow-md rounded-full transition-colors", children: _jsx(ShoppingCart, { className: "h-4 w-4" }) })] }), _jsx(Button, { variant: "secondary", size: "icon", className: "lg:hidden absolute bottom-3 right-3 bg-white text-black h-10 w-10 rounded-full shadow-lg z-10 active:scale-95 transition-transform", children: _jsx(ShoppingCart, { className: "h-4 w-4" }) }), product.compareAtPrice && (_jsx("span", { className: "absolute top-3 left-3 bg-black text-white text-xs font-bold px-3 py-1 rounded-full uppercase tracking-wide", children: getLayoutText(storeConfig, 'common.sale', 'Sale') }))] }), _jsxs("div", { className: "space-y-1", children: [_jsx("h3", { className: "font-semibold text-gray-900 group-hover:text-gray-600 transition-colors text-lg", children: product.name }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-medium text-gray-900", children: formatCurrency(product.price, product.currency || 'USD') }), product.compareAtPrice && (_jsx("span", { className: "text-sm text-gray-400 line-through", children: formatCurrency(product.compareAtPrice, product.currency || 'USD') }))] }), _jsx(ProductRating, { rating: product.rating, reviewCount: product.reviewCount, size: "sm", showReviewCount: false, className: "shrink-0" })] })] }) }, product.id));
|
|
294
|
+
}) }), layoutConfig?.sections?.featuredProducts?.showViewAll !== false && (_jsx("div", { className: "mt-16 text-center", children: _jsx(Link, { href: `/${storeConfig.slug}/products`, children: _jsx(Button, { variant: "outline", className: "rounded-full px-10 py-6 border-gray-200 hover:border-black hover:bg-black hover:text-white transition-all text-base font-medium", children: getLayoutText(storeConfig, 'sections.featuredProducts.viewAll', 'View All Products') }) }) }))] }) })), _jsx(PromoBanner, { config: layoutConfig?.sections?.promoBanner, layoutStyle: "clothing" })] }));
|
|
295
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ClothingHomePage } from './components/ClothingHomePage';
|
|
2
|
+
export { ProductsPage } from './pages/ProductsPage';
|
|
3
|
+
export { ProductDetailPage } from './pages/ProductDetailPage';
|
|
4
|
+
export { CategoryPage } from './pages/CategoryPage';
|
|
5
|
+
export { CategoriesPage } from './pages/CategoriesPage';
|
|
6
|
+
export { AboutPage } from './pages/AboutPage';
|
|
7
|
+
export { ContactPage } from './pages/ContactPage';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/clothing/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Clothing layout exports
|
|
2
|
+
export { ClothingHomePage } from './components/ClothingHomePage';
|
|
3
|
+
export { ProductsPage } from './pages/ProductsPage';
|
|
4
|
+
export { ProductDetailPage } from './pages/ProductDetailPage';
|
|
5
|
+
export { CategoryPage } from './pages/CategoryPage';
|
|
6
|
+
export { CategoriesPage } from './pages/CategoriesPage';
|
|
7
|
+
export { AboutPage } from './pages/AboutPage';
|
|
8
|
+
export { ContactPage } from './pages/ContactPage';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StoreConfig } from '../../../lib/store-types';
|
|
2
|
+
interface AboutPageProps {
|
|
3
|
+
storeConfig: StoreConfig;
|
|
4
|
+
}
|
|
5
|
+
export declare function AboutPage({ storeConfig }: AboutPageProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=AboutPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhD,UAAU,cAAc;IACtB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,WAAW,EAAE,EAAE,cAAc,2CAsOxD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Users, Award, Heart, Leaf, MapPin, Clock, Mail, ArrowRight } from 'lucide-react';
|
|
4
|
+
import { Button } from '../../../components/ui/button';
|
|
5
|
+
import { DotPattern } from '../../../components/ui/background-patterns';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
export function AboutPage({ storeConfig }) {
|
|
8
|
+
const primaryColor = storeConfig.branding.primaryColor;
|
|
9
|
+
const secondaryColor = storeConfig.branding.secondaryColor || primaryColor;
|
|
10
|
+
const aboutConfig = storeConfig.layoutConfig?.pages?.about;
|
|
11
|
+
// Clothing-specific hero image
|
|
12
|
+
const heroImage = aboutConfig?.heroImage || 'https://images.unsplash.com/photo-1558769132-cb1aea458c5e?q=80&w=2074&auto=format&fit=crop';
|
|
13
|
+
const pageTitle = aboutConfig?.title || "Crafting Experiences, Delivering Joy.";
|
|
14
|
+
const pageContent = aboutConfig?.content || storeConfig.description;
|
|
15
|
+
const missionStatement = aboutConfig?.missionStatement;
|
|
16
|
+
const galleryImages = aboutConfig?.gallerySection;
|
|
17
|
+
const values = [
|
|
18
|
+
{
|
|
19
|
+
icon: Award,
|
|
20
|
+
title: "Quality First",
|
|
21
|
+
description: "We never compromise on the quality of our products and services."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
icon: Users,
|
|
25
|
+
title: "Customer Focused",
|
|
26
|
+
description: "Your satisfaction is our top priority. We're here to help."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
icon: Heart,
|
|
30
|
+
title: "Passion",
|
|
31
|
+
description: "We love what we do and it shows in every detail of our work."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
icon: Leaf,
|
|
35
|
+
title: "Sustainability",
|
|
36
|
+
description: "Committed to eco-friendly practices and responsible sourcing."
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [_jsxs("section", { className: "relative h-[60vh] min-h-[500px] w-full overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: heroImage, alt: "About Us", fill: true, className: "w-full h-full object-cover transform scale-105 animate-pulse-slow", unoptimized: true }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/80 via-black/50 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-sm font-medium mb-6", children: [_jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }), "Est. 2024"] }), _jsx("h1", { className: "text-5xl md:text-7xl font-bold text-white mb-6 tracking-tight leading-tight", children: pageTitle }), _jsx("p", { className: "text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed font-light", children: missionStatement || storeConfig.description })] }) }) })] }), _jsxs("section", { className: "py-24 px-4 sm:px-6 lg:px-8 relative", children: [_jsx("div", { className: "absolute top-0 right-0 -mt-24 -mr-24 w-96 h-96 bg-gray-50 rounded-full blur-3xl -z-10" }), _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-16 items-center", children: [_jsxs("div", { className: "relative", children: [galleryImages && galleryImages.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 gap-4", children: galleryImages.slice(0, 4).map((img, i) => (_jsx("div", { className: `relative overflow-hidden rounded-2xl shadow-lg ${i === 0 ? 'col-span-2 aspect-[16/9]' : 'aspect-square'}`, children: _jsx(Image, { src: img.image, alt: img.caption || "Gallery Image", fill: true, className: "w-full h-full object-cover hover:scale-110 transition-transform duration-500", unoptimized: true }) }, i))) })) : (_jsxs("div", { className: "relative aspect-[4/5] rounded-[2rem] overflow-hidden shadow-2xl", children: [_jsx(Image, { src: "https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=2071&auto=format&fit=crop", alt: "Our Team", fill: true, className: "w-full h-full object-cover", unoptimized: true }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-60" }), _jsxs("div", { className: "absolute bottom-8 left-8 text-white", children: [_jsx("p", { className: "font-bold text-lg", children: "The Dream Team" }), _jsx("p", { className: "text-white/80 text-sm", children: "Working together to serve you better" })] })] })), _jsx("div", { className: "absolute -bottom-6 -right-6 w-24 h-24 bg-white rounded-2xl shadow-xl flex items-center justify-center p-4 animate-bounce duration-[3000ms]", children: _jsx(Heart, { className: "w-10 h-10", style: { color: primaryColor, fill: primaryColor } }) })] }), _jsxs("div", { className: "space-y-10", children: [_jsxs("div", { children: [_jsx("span", { className: "text-sm font-bold uppercase tracking-widest mb-3 block", style: { color: primaryColor }, children: "Who We Are" }), _jsx("h2", { className: "text-4xl md:text-5xl font-black text-gray-900 mb-6 tracking-tight", children: "Our Journey" }), _jsxs("div", { className: "prose prose-lg text-gray-600 leading-relaxed space-y-6", children: [pageContent?.split('\n').map((paragraph, idx) => (_jsx("p", { children: paragraph }, idx))), !pageContent && (_jsxs(_Fragment, { children: [_jsxs("p", { children: ["Founded with a bold vision to redefine excellence in the ", _jsx("span", { className: "font-semibold text-gray-900", children: storeConfig.type }), " industry, ", storeConfig.name, " has grown from a small passion project into a beloved brand. We believe in the power of quality, innovation, and community."] }), _jsx("p", { children: "Every day, we strive to bring you the best products, curated with care and delivered with a smile. Our team is dedicated to ensuring that your experience with us is nothing short of exceptional." })] }))] })] }), _jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8", children: values.map((item, idx) => (_jsxs("div", { className: "flex gap-4 group", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("div", { className: "w-14 h-14 rounded-2xl flex items-center justify-center transition-colors group-hover:bg-gray-100", style: { backgroundColor: `${primaryColor}10` }, children: _jsx(item.icon, { className: "h-7 w-7 transition-transform group-hover:scale-110", style: { color: primaryColor } }) }) }), _jsxs("div", { children: [_jsx("h4", { className: "font-bold text-gray-900 mb-2 text-lg", children: item.title }), _jsx("p", { className: "text-gray-600 text-sm leading-relaxed", children: item.description })] })] }, idx))) })] })] }) })] }), _jsxs("section", { className: "py-20 relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 opacity-10", children: _jsx(DotPattern, { color: primaryColor, cx: 2, cy: 2, cr: 2, width: 30, height: 30 }) }), _jsx("div", { className: "absolute inset-0", style: { backgroundColor: `${secondaryColor}15` } }), _jsx("div", { className: "container mx-auto px-4 relative z-10", children: _jsx("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-12", children: [
|
|
40
|
+
{ label: "Happy Customers", value: "10k+" },
|
|
41
|
+
{ label: "Products", value: storeConfig.products?.length ? `${storeConfig.products.length * 10}+` : "50+" },
|
|
42
|
+
{ label: "Years Active", value: "5+" },
|
|
43
|
+
{ label: "Team Members", value: "25+" }
|
|
44
|
+
].map((stat, idx) => (_jsxs("div", { className: "text-center group", children: [_jsx("div", { className: "text-5xl md:text-6xl font-black mb-2 tracking-tight transition-transform group-hover:scale-110 duration-300", style: { color: primaryColor }, children: stat.value }), _jsx("div", { className: "text-gray-600 font-bold uppercase tracking-widest text-xs md:text-sm", children: stat.label })] }, idx))) }) })] }), _jsx("section", { className: "py-24 px-4 sm:px-6 lg:px-8 bg-white", children: _jsxs("div", { className: "container mx-auto max-w-6xl", children: [_jsxs("div", { className: "text-center mb-16", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-gray-900 mb-4", children: "Get in Touch" }), _jsx("p", { className: "text-gray-500 max-w-xl mx-auto", children: "Have questions? We'd love to hear from you. Reach out to our team via email, phone, or visit us at our store." })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: [_jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center", children: [_jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(MapPin, { className: "h-8 w-8 text-gray-400 group-hover:text-blue-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Visit Us" }), _jsxs("p", { className: "text-gray-600 leading-relaxed", children: ["123 Store Street", _jsx("br", {}), "Commerce City, ST 12345"] })] }), _jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 border-2 border-transparent group-hover:border-orange-100 rounded-[2rem] transition-colors pointer-events-none" }), _jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(Mail, { className: "h-8 w-8 text-gray-400 group-hover:text-orange-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Email Us" }), _jsxs("p", { className: "text-gray-600 leading-relaxed mb-4", children: ["hello@", storeConfig.slug, ".com", _jsx("br", {}), "support@", storeConfig.slug, ".com"] }), _jsxs(Button, { variant: "link", className: "text-orange-600 font-bold p-0 h-auto hover:no-underline group-hover:translate-x-1 transition-transform", children: ["Send a message ", _jsx(ArrowRight, { className: "ml-1 h-4 w-4" })] })] }), _jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center", children: [_jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(Clock, { className: "h-8 w-8 text-gray-400 group-hover:text-green-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Opening Hours" }), _jsxs("p", { className: "text-gray-600 leading-relaxed", children: ["Mon - Fri: 9am - 6pm", _jsx("br", {}), "Sat - Sun: 10am - 4pm"] })] })] })] }) })] }));
|
|
45
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StoreConfig } from '../../../lib/store-types';
|
|
2
|
+
interface CategoriesPageProps {
|
|
3
|
+
storeConfig: StoreConfig;
|
|
4
|
+
}
|
|
5
|
+
export declare function CategoriesPage({ storeConfig }: CategoriesPageProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=CategoriesPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoriesPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/pages/CategoriesPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhD,UAAU,mBAAmB;IAC3B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAmGD,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,EAAE,mBAAmB,2CAwHlE"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
5
|
+
import { ArrowRight } from 'lucide-react';
|
|
6
|
+
import { Breadcrumbs } from '../../../components/ui/breadcrumbs';
|
|
7
|
+
/**
|
|
8
|
+
* Calculate optimal grid span classes based on category count and index
|
|
9
|
+
* Ensures visual balance and hierarchy for any number of categories
|
|
10
|
+
*/
|
|
11
|
+
function getCategoryGridLayout(index, totalCount) {
|
|
12
|
+
// Always make first category prominent (hero treatment)
|
|
13
|
+
if (index === 0) {
|
|
14
|
+
if (totalCount === 1) {
|
|
15
|
+
return 'md:col-span-3 md:row-span-2'; // Full width for single category
|
|
16
|
+
}
|
|
17
|
+
if (totalCount === 2) {
|
|
18
|
+
return 'md:col-span-2 md:row-span-2'; // Large hero, second category fills remaining space
|
|
19
|
+
}
|
|
20
|
+
return 'md:col-span-2 md:row-span-2'; // Standard hero treatment
|
|
21
|
+
}
|
|
22
|
+
// Handle different category count ranges
|
|
23
|
+
if (totalCount === 1) {
|
|
24
|
+
return ''; // Won't be reached, but safe fallback
|
|
25
|
+
}
|
|
26
|
+
if (totalCount === 2) {
|
|
27
|
+
// Second category fills remaining space
|
|
28
|
+
return 'md:col-span-1 md:row-span-2';
|
|
29
|
+
}
|
|
30
|
+
if (totalCount === 3) {
|
|
31
|
+
// After hero, two equal categories
|
|
32
|
+
if (index === 1)
|
|
33
|
+
return 'md:col-span-1 md:row-span-2';
|
|
34
|
+
if (index === 2)
|
|
35
|
+
return 'md:col-span-1 md:row-span-2';
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
if (totalCount === 4) {
|
|
39
|
+
// Hero + 3 categories: one tall, two standard
|
|
40
|
+
if (index === 1)
|
|
41
|
+
return 'md:col-span-1 md:row-span-2';
|
|
42
|
+
if (index === 2)
|
|
43
|
+
return 'md:col-span-1';
|
|
44
|
+
if (index === 3)
|
|
45
|
+
return 'md:col-span-1';
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
if (totalCount === 5) {
|
|
49
|
+
// Hero + 4 categories: balanced distribution
|
|
50
|
+
if (index === 1)
|
|
51
|
+
return 'md:col-span-1 md:row-span-2';
|
|
52
|
+
if (index === 2)
|
|
53
|
+
return 'md:col-span-1';
|
|
54
|
+
if (index === 3)
|
|
55
|
+
return 'md:col-span-1';
|
|
56
|
+
if (index === 4)
|
|
57
|
+
return 'md:col-span-1';
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
if (totalCount === 6) {
|
|
61
|
+
// Hero + 5 categories: create visual rhythm
|
|
62
|
+
if (index === 1)
|
|
63
|
+
return 'md:col-span-1 md:row-span-2';
|
|
64
|
+
if (index === 2)
|
|
65
|
+
return 'md:col-span-1';
|
|
66
|
+
if (index === 3)
|
|
67
|
+
return 'md:col-span-1';
|
|
68
|
+
if (index === 4)
|
|
69
|
+
return 'md:col-span-2'; // Wide category
|
|
70
|
+
if (index === 5)
|
|
71
|
+
return 'md:col-span-1';
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
if (totalCount >= 7 && totalCount <= 9) {
|
|
75
|
+
// Hero + masonry-style grid
|
|
76
|
+
if (index === 1)
|
|
77
|
+
return 'md:col-span-1 md:row-span-2';
|
|
78
|
+
if (index === 2)
|
|
79
|
+
return 'md:col-span-1';
|
|
80
|
+
if (index === 3)
|
|
81
|
+
return 'md:col-span-1';
|
|
82
|
+
if (index === 4)
|
|
83
|
+
return 'md:col-span-2'; // Wide category
|
|
84
|
+
if (index === 5)
|
|
85
|
+
return 'md:col-span-1';
|
|
86
|
+
if (index === 6)
|
|
87
|
+
return 'md:col-span-1 md:row-span-2';
|
|
88
|
+
if (index === 7)
|
|
89
|
+
return 'md:col-span-1';
|
|
90
|
+
if (index === 8)
|
|
91
|
+
return 'md:col-span-1';
|
|
92
|
+
return '';
|
|
93
|
+
}
|
|
94
|
+
// 10+ categories: uniform grid with occasional emphasis
|
|
95
|
+
// Create a repeating pattern for visual interest
|
|
96
|
+
const patternIndex = (index - 1) % 8; // Pattern repeats every 8 items (after hero)
|
|
97
|
+
if (patternIndex === 0)
|
|
98
|
+
return 'md:col-span-1 md:row-span-2'; // Tall
|
|
99
|
+
if (patternIndex === 3)
|
|
100
|
+
return 'md:col-span-2'; // Wide
|
|
101
|
+
if (patternIndex === 6)
|
|
102
|
+
return 'md:col-span-1 md:row-span-2'; // Tall
|
|
103
|
+
return ''; // Standard 1x1
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get optimal grid container class based on category count
|
|
107
|
+
*/
|
|
108
|
+
function getGridContainerClass(totalCount) {
|
|
109
|
+
if (totalCount === 1) {
|
|
110
|
+
return 'grid grid-cols-1 md:grid-cols-3 gap-6 auto-rows-[300px]';
|
|
111
|
+
}
|
|
112
|
+
if (totalCount <= 3) {
|
|
113
|
+
return 'grid grid-cols-1 md:grid-cols-3 gap-6 auto-rows-[300px]';
|
|
114
|
+
}
|
|
115
|
+
// For 4+ categories, use standard 3-column grid
|
|
116
|
+
return 'grid grid-cols-1 md:grid-cols-3 gap-6 auto-rows-[300px]';
|
|
117
|
+
}
|
|
118
|
+
export function CategoriesPage({ storeConfig }) {
|
|
119
|
+
const categories = storeConfig.categories || [];
|
|
120
|
+
// Breadcrumbs
|
|
121
|
+
const breadcrumbItems = [
|
|
122
|
+
{ label: storeConfig.name, href: `/${storeConfig.slug}` },
|
|
123
|
+
{ label: 'Categories', href: `/${storeConfig.slug}/categories` },
|
|
124
|
+
];
|
|
125
|
+
return (_jsxs("div", { "data-content-ready": true, className: "min-h-screen bg-white text-slate-900 font-sans", children: [_jsx("div", { className: "bg-gray-50 border-b border-gray-200", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8 py-12 lg:py-16", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsx("div", { className: "mb-6", children: _jsx(Breadcrumbs, { items: breadcrumbItems }) }), _jsx("h1", { className: "text-4xl lg:text-5xl font-bold tracking-tight text-gray-900 mb-6", children: "Shop by Category" }), _jsx("p", { className: "text-lg text-gray-600 leading-relaxed max-w-2xl", children: "Explore our comprehensive collection of premium products across various departments. Dive into our curated selections designed to match your style and needs." })] }) }) }), _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8 py-16", children: categories.length === 0 ? (_jsxs("div", { className: "text-center py-20", children: [_jsx("h3", { className: "text-xl font-semibold text-gray-900 mb-2", children: "No categories available" }), _jsx("p", { className: "text-gray-500", children: "Categories will appear here once they are added to the store." })] })) : (_jsx("div", { className: getGridContainerClass(categories.length), children: categories.map((category, index) => {
|
|
126
|
+
// Get adaptive grid layout based on position and total count
|
|
127
|
+
const spanClass = getCategoryGridLayout(index, categories.length);
|
|
128
|
+
// Validate category image - handle all formats independently
|
|
129
|
+
const extractCategoryImage = (image) => {
|
|
130
|
+
if (!image)
|
|
131
|
+
return undefined;
|
|
132
|
+
// If already a string, validate
|
|
133
|
+
if (typeof image === 'string') {
|
|
134
|
+
const trimmed = image.trim();
|
|
135
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
136
|
+
}
|
|
137
|
+
// If object, extract url
|
|
138
|
+
if (typeof image === 'object' && image !== null) {
|
|
139
|
+
if ('url' in image && image.url) {
|
|
140
|
+
const url = typeof image.url === 'string' ? image.url.trim() : String(image.url).trim();
|
|
141
|
+
return url.length > 0 ? url : undefined;
|
|
142
|
+
}
|
|
143
|
+
// Check for other common property names
|
|
144
|
+
for (const key of ['src', 'image', 'imageUrl', 'image_url', 'value']) {
|
|
145
|
+
if (key in image && image[key]) {
|
|
146
|
+
const url = typeof image[key] === 'string' ? image[key].trim() : String(image[key]).trim();
|
|
147
|
+
if (url.length > 0) {
|
|
148
|
+
return url;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// If array, take first valid item
|
|
154
|
+
if (Array.isArray(image) && image.length > 0) {
|
|
155
|
+
return extractCategoryImage(image[0]);
|
|
156
|
+
}
|
|
157
|
+
return undefined;
|
|
158
|
+
};
|
|
159
|
+
const categoryImage = extractCategoryImage(category.image);
|
|
160
|
+
return (_jsxs(Link, { "data-category-card": true, href: `/${storeConfig.slug}/products?category=${category.slug}`, className: `group relative overflow-hidden rounded-2xl bg-gray-100 border border-gray-200 shadow-sm hover:shadow-xl transition-all duration-500 min-h-[300px] ${spanClass}`, children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(ImageWithFallback, { src: categoryImage, alt: category.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105", skeletonAspectRatio: "auto" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-60 transition-opacity group-hover:opacity-70" })] }), _jsx("div", { className: "absolute inset-0 flex flex-col justify-end p-6 lg:p-8", children: _jsxs("div", { className: "transform transition-transform duration-300 translate-y-2 group-hover:translate-y-0", children: [_jsx("h2", { className: "font-bold text-white mb-2 text-2xl md:text-3xl", children: category.name }), category.description && (_jsx("p", { className: "text-gray-200 mb-6 line-clamp-2 max-w-md opacity-0 group-hover:opacity-100 transition-opacity duration-300 delay-75 text-sm md:text-base", children: category.description })), _jsxs("div", { className: "flex items-center gap-2 text-white font-medium text-sm tracking-wide uppercase", children: [_jsx("span", { className: "border-b border-transparent group-hover:border-white transition-colors", children: "Explore Collection" }), _jsx(ArrowRight, { className: "w-4 h-4 transform transition-transform group-hover:translate-x-1" })] })] }) })] }, category.id));
|
|
161
|
+
}) })) })] }));
|
|
162
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StoreConfig } from '../../../lib/store-types';
|
|
2
|
+
interface CategoryPageProps {
|
|
3
|
+
storeConfig: StoreConfig;
|
|
4
|
+
categorySlug: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function CategoryPage({ storeConfig, categorySlug }: CategoryPageProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=CategoryPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/pages/CategoryPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAA8B,MAAM,mBAAmB,CAAC;AAc5E,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,iBAAiB,2CA+N5E"}
|