@pradip1995/create-storefront 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-storefront.js +239 -0
- package/lib/kit-next-config.js +84 -0
- package/package.json +32 -0
- package/templates/storefront/.eslintrc.json +3 -0
- package/templates/storefront/README.md +35 -0
- package/templates/storefront/check-env-variables.js +51 -0
- package/templates/storefront/kit-next-config.js +71 -0
- package/templates/storefront/next-env.d.ts +5 -0
- package/templates/storefront/next.config.js +25 -0
- package/templates/storefront/package.json +56 -0
- package/templates/storefront/postcss.config.js +6 -0
- package/templates/storefront/public/favicon.png +0 -0
- package/templates/storefront/src/app/[countryCode]/(checkout)/checkout/page.tsx +23 -0
- package/templates/storefront/src/app/[countryCode]/(checkout)/checkout/payment/page.tsx +47 -0
- package/templates/storefront/src/app/[countryCode]/(checkout)/layout.tsx +31 -0
- package/templates/storefront/src/app/[countryCode]/(checkout)/not-found.tsx +19 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/addresses/page.tsx +31 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/loading.tsx +9 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/details/[id]/page.tsx +35 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/exchange/[id]/page.tsx +47 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/page.tsx +28 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/return/[id]/page.tsx +66 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/page.tsx +22 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/payment-methods/page.tsx +23 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/profile/page.tsx +43 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@login/default.tsx +11 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/@login/page.tsx +18 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/guest-orders/page.tsx +13 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/layout.tsx +22 -0
- package/templates/storefront/src/app/[countryCode]/(main)/account/loading.tsx +9 -0
- package/templates/storefront/src/app/[countryCode]/(main)/cart/loading.tsx +5 -0
- package/templates/storefront/src/app/[countryCode]/(main)/cart/not-found.tsx +21 -0
- package/templates/storefront/src/app/[countryCode]/(main)/cart/page.tsx +23 -0
- package/templates/storefront/src/app/[countryCode]/(main)/categories/[...category]/page.tsx +11 -0
- package/templates/storefront/src/app/[countryCode]/(main)/collections/[handle]/page.tsx +11 -0
- package/templates/storefront/src/app/[countryCode]/(main)/contact/page.tsx +21 -0
- package/templates/storefront/src/app/[countryCode]/(main)/guest-orders/page.tsx +12 -0
- package/templates/storefront/src/app/[countryCode]/(main)/help/page.tsx +28 -0
- package/templates/storefront/src/app/[countryCode]/(main)/layout.tsx +21 -0
- package/templates/storefront/src/app/[countryCode]/(main)/not-found.tsx +20 -0
- package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/confirmed/loading.tsx +5 -0
- package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/confirmed/page.tsx +23 -0
- package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/transfer/[token]/accept/page.tsx +41 -0
- package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/transfer/[token]/decline/page.tsx +41 -0
- package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/transfer/[token]/page.tsx +38 -0
- package/templates/storefront/src/app/[countryCode]/(main)/order/exchange/[id]/page.tsx +47 -0
- package/templates/storefront/src/app/[countryCode]/(main)/order/return/[id]/page.tsx +61 -0
- package/templates/storefront/src/app/[countryCode]/(main)/orders/[id]/page.tsx +33 -0
- package/templates/storefront/src/app/[countryCode]/(main)/page.tsx +24 -0
- package/templates/storefront/src/app/[countryCode]/(main)/privacy-policy/page.tsx +173 -0
- package/templates/storefront/src/app/[countryCode]/(main)/products/[handle]/page.tsx +193 -0
- package/templates/storefront/src/app/[countryCode]/(main)/reset-password/page.tsx +192 -0
- package/templates/storefront/src/app/[countryCode]/(main)/store/page.tsx +72 -0
- package/templates/storefront/src/app/[countryCode]/(main)/terms-of-use/page.tsx +179 -0
- package/templates/storefront/src/app/[countryCode]/(main)/wishlist/page.tsx +19 -0
- package/templates/storefront/src/app/api/meta/event/route.ts +63 -0
- package/templates/storefront/src/app/auth/customer/google/callback/page.tsx +126 -0
- package/templates/storefront/src/app/layout.tsx +104 -0
- package/templates/storefront/src/app/not-found.tsx +30 -0
- package/templates/storefront/src/app/opengraph-image.jpg +0 -0
- package/templates/storefront/src/app/robots.ts +15 -0
- package/templates/storefront/src/app/sitemap.ts +65 -0
- package/templates/storefront/src/app/twitter-image.jpg +0 -0
- package/templates/storefront/src/modules/account/components/account-deletion/index.tsx +160 -0
- package/templates/storefront/src/modules/account/components/account-info/index.tsx +145 -0
- package/templates/storefront/src/modules/account/components/account-nav/icons.tsx +43 -0
- package/templates/storefront/src/modules/account/components/account-nav/index.tsx +318 -0
- package/templates/storefront/src/modules/account/components/account-nav/logout-modal.tsx +92 -0
- package/templates/storefront/src/modules/account/components/account-nav/payment-methods-icon.tsx +9 -0
- package/templates/storefront/src/modules/account/components/address-book/index.tsx +47 -0
- package/templates/storefront/src/modules/account/components/address-card/add-address.tsx +377 -0
- package/templates/storefront/src/modules/account/components/address-card/edit-address-modal.tsx +468 -0
- package/templates/storefront/src/modules/account/components/deletion-pending-modal/index.tsx +213 -0
- package/templates/storefront/src/modules/account/components/forgot-password/index.tsx +1 -0
- package/templates/storefront/src/modules/account/components/login/index.tsx +1 -0
- package/templates/storefront/src/modules/account/components/order-card/index.tsx +221 -0
- package/templates/storefront/src/modules/account/components/order-overview/index.tsx +159 -0
- package/templates/storefront/src/modules/account/components/overview/index.tsx +189 -0
- package/templates/storefront/src/modules/account/components/profile-billing-address/index.tsx +447 -0
- package/templates/storefront/src/modules/account/components/profile-email/index.tsx +75 -0
- package/templates/storefront/src/modules/account/components/profile-form/index.tsx +416 -0
- package/templates/storefront/src/modules/account/components/profile-name/index.tsx +76 -0
- package/templates/storefront/src/modules/account/components/profile-password/index.tsx +70 -0
- package/templates/storefront/src/modules/account/components/profile-phone/index.tsx +185 -0
- package/templates/storefront/src/modules/account/components/register/index.tsx +1 -0
- package/templates/storefront/src/modules/account/components/return-item-selector/index.tsx +187 -0
- package/templates/storefront/src/modules/account/components/return-shipping-selector/index.tsx +118 -0
- package/templates/storefront/src/modules/account/components/transfer-request-form/index.tsx +81 -0
- package/templates/storefront/src/modules/account/templates/account-layout.tsx +38 -0
- package/templates/storefront/src/modules/account/templates/exchange-request-template.tsx +389 -0
- package/templates/storefront/src/modules/account/templates/guest-orders-template.tsx +123 -0
- package/templates/storefront/src/modules/account/templates/login-template.tsx +44 -0
- package/templates/storefront/src/modules/account/templates/payment-methods-template.tsx +478 -0
- package/templates/storefront/src/modules/account/templates/return-request-template.tsx +300 -0
- package/templates/storefront/src/modules/cart/components/abandoned-carts/ScrollToPendingOrdersButton.tsx +21 -0
- package/templates/storefront/src/modules/cart/components/abandoned-carts/index.tsx +335 -0
- package/templates/storefront/src/modules/cart/components/applied-promotions/index.tsx +121 -0
- package/templates/storefront/src/modules/cart/components/cart-delivery-selection/index.tsx +203 -0
- package/templates/storefront/src/modules/cart/components/cart-item-card/index.tsx +476 -0
- package/templates/storefront/src/modules/cart/components/cart-item-select/index.tsx +73 -0
- package/templates/storefront/src/modules/cart/components/cart-view-tracker/index.tsx +44 -0
- package/templates/storefront/src/modules/cart/components/delivery-information/index.tsx +89 -0
- package/templates/storefront/src/modules/cart/components/empty-cart-message/index.tsx +38 -0
- package/templates/storefront/src/modules/cart/components/item/index.tsx +150 -0
- package/templates/storefront/src/modules/cart/components/pincode-checker/index.tsx +174 -0
- package/templates/storefront/src/modules/cart/components/sign-in-prompt/index.tsx +26 -0
- package/templates/storefront/src/modules/cart/components/you-may-also-like/index.tsx +137 -0
- package/templates/storefront/src/modules/cart/templates/index.tsx +88 -0
- package/templates/storefront/src/modules/cart/templates/items.tsx +49 -0
- package/templates/storefront/src/modules/cart/templates/preview.tsx +51 -0
- package/templates/storefront/src/modules/cart/templates/summary.tsx +29 -0
- package/templates/storefront/src/modules/checkout/components/add-address-modal/index.tsx +390 -0
- package/templates/storefront/src/modules/checkout/components/address-card/index.tsx +135 -0
- package/templates/storefront/src/modules/checkout/components/address-select/index.tsx +116 -0
- package/templates/storefront/src/modules/checkout/components/addresses/index.tsx +605 -0
- package/templates/storefront/src/modules/checkout/components/back-link/index.tsx +32 -0
- package/templates/storefront/src/modules/checkout/components/billing_address/index.tsx +301 -0
- package/templates/storefront/src/modules/checkout/components/checkout-begin-tracker/index.tsx +45 -0
- package/templates/storefront/src/modules/checkout/components/checkout-leave-guard/index.tsx +109 -0
- package/templates/storefront/src/modules/checkout/components/checkout-shipping-tracker/index.tsx +45 -0
- package/templates/storefront/src/modules/checkout/components/country-select/index.tsx +50 -0
- package/templates/storefront/src/modules/checkout/components/discount-code/index.tsx +220 -0
- package/templates/storefront/src/modules/checkout/components/error-message/index.tsx +13 -0
- package/templates/storefront/src/modules/checkout/components/payment/index.tsx +572 -0
- package/templates/storefront/src/modules/checkout/components/payment-button/index.tsx +257 -0
- package/templates/storefront/src/modules/checkout/components/payment-button/razorpay-payment-button.tsx +136 -0
- package/templates/storefront/src/modules/checkout/components/payment-container/index.tsx +129 -0
- package/templates/storefront/src/modules/checkout/components/payment-test/index.tsx +12 -0
- package/templates/storefront/src/modules/checkout/components/payment-wrapper/index.tsx +50 -0
- package/templates/storefront/src/modules/checkout/components/payment-wrapper/stripe-wrapper.tsx +54 -0
- package/templates/storefront/src/modules/checkout/components/processing-overlay/index.tsx +83 -0
- package/templates/storefront/src/modules/checkout/components/review/index.tsx +60 -0
- package/templates/storefront/src/modules/checkout/components/select-address-modal/index.tsx +103 -0
- package/templates/storefront/src/modules/checkout/components/shipping/index.tsx +533 -0
- package/templates/storefront/src/modules/checkout/components/shipping-address/index.tsx +521 -0
- package/templates/storefront/src/modules/checkout/components/submit-button/index.tsx +32 -0
- package/templates/storefront/src/modules/checkout/templates/checkout-form/index.tsx +38 -0
- package/templates/storefront/src/modules/checkout/templates/checkout-summary/index.tsx +274 -0
- package/templates/storefront/src/modules/common/components/breadcrumb/index.tsx +43 -0
- package/templates/storefront/src/modules/common/components/cart-totals/index.tsx +473 -0
- package/templates/storefront/src/modules/common/components/checkbox/index.tsx +98 -0
- package/templates/storefront/src/modules/common/components/delete-button/index.tsx +156 -0
- package/templates/storefront/src/modules/common/components/divider/index.tsx +9 -0
- package/templates/storefront/src/modules/common/components/filter-checkbox-group/index.tsx +134 -0
- package/templates/storefront/src/modules/common/components/filter-radio-group/index.tsx +62 -0
- package/templates/storefront/src/modules/common/components/input/index.tsx +79 -0
- package/templates/storefront/src/modules/common/components/interactive-link/index.tsx +33 -0
- package/templates/storefront/src/modules/common/components/line-item-options/index.tsx +26 -0
- package/templates/storefront/src/modules/common/components/line-item-price/index.tsx +64 -0
- package/templates/storefront/src/modules/common/components/line-item-unit-price/index.tsx +61 -0
- package/templates/storefront/src/modules/common/components/localized-client-link/index.tsx +32 -0
- package/templates/storefront/src/modules/common/components/login-popup/index.tsx +78 -0
- package/templates/storefront/src/modules/common/components/modal/index.tsx +123 -0
- package/templates/storefront/src/modules/common/components/native-select/index.tsx +75 -0
- package/templates/storefront/src/modules/common/components/obfuscated-email/index.tsx +30 -0
- package/templates/storefront/src/modules/common/components/product/product-rating/index.tsx +172 -0
- package/templates/storefront/src/modules/common/components/product/review-modal/index.tsx +333 -0
- package/templates/storefront/src/modules/common/components/product/share-button/index.tsx +227 -0
- package/templates/storefront/src/modules/common/components/product/wishlist-icon/index.tsx +46 -0
- package/templates/storefront/src/modules/common/components/radio/index.tsx +27 -0
- package/templates/storefront/src/modules/common/components/select/index.tsx +164 -0
- package/templates/storefront/src/modules/common/components/side-panel/index.tsx +65 -0
- package/templates/storefront/src/modules/common/icons/arrow-left.tsx +36 -0
- package/templates/storefront/src/modules/common/icons/back.tsx +37 -0
- package/templates/storefront/src/modules/common/icons/bancontact.tsx +26 -0
- package/templates/storefront/src/modules/common/icons/chevron-down.tsx +30 -0
- package/templates/storefront/src/modules/common/icons/delivered.tsx +29 -0
- package/templates/storefront/src/modules/common/icons/envelope.tsx +27 -0
- package/templates/storefront/src/modules/common/icons/eye-off.tsx +37 -0
- package/templates/storefront/src/modules/common/icons/eye.tsx +37 -0
- package/templates/storefront/src/modules/common/icons/fast-delivery.tsx +65 -0
- package/templates/storefront/src/modules/common/icons/ideal.tsx +26 -0
- package/templates/storefront/src/modules/common/icons/lock.tsx +31 -0
- package/templates/storefront/src/modules/common/icons/map-pin.tsx +37 -0
- package/templates/storefront/src/modules/common/icons/medusa.tsx +27 -0
- package/templates/storefront/src/modules/common/icons/menu.tsx +45 -0
- package/templates/storefront/src/modules/common/icons/nextjs.tsx +27 -0
- package/templates/storefront/src/modules/common/icons/package.tsx +44 -0
- package/templates/storefront/src/modules/common/icons/paypal.tsx +30 -0
- package/templates/storefront/src/modules/common/icons/phone.tsx +30 -0
- package/templates/storefront/src/modules/common/icons/placeholder-image.tsx +44 -0
- package/templates/storefront/src/modules/common/icons/refresh.tsx +51 -0
- package/templates/storefront/src/modules/common/icons/spinner.tsx +37 -0
- package/templates/storefront/src/modules/common/icons/trash.tsx +51 -0
- package/templates/storefront/src/modules/common/icons/user.tsx +37 -0
- package/templates/storefront/src/modules/common/icons/x.tsx +37 -0
- package/templates/storefront/src/modules/contact/templates/index.tsx +272 -0
- package/templates/storefront/src/modules/help/templates/index.tsx +629 -0
- package/templates/storefront/src/modules/home/components/dynamic-banner/index.tsx +190 -0
- package/templates/storefront/src/modules/home/components/featured-products/index.tsx +16 -0
- package/templates/storefront/src/modules/home/components/featured-products/product-rail/index.tsx +51 -0
- package/templates/storefront/src/modules/home/components/features/index.tsx +1 -0
- package/templates/storefront/src/modules/home/components/hero/index.tsx +1 -0
- package/templates/storefront/src/modules/home/components/loved-by-moms/index.tsx +1 -0
- package/templates/storefront/src/modules/home/components/new-arrivals/index.tsx +1 -0
- package/templates/storefront/src/modules/home/components/shop-by-age/index.tsx +1 -0
- package/templates/storefront/src/modules/home/components/shop-by-category/index.tsx +1 -0
- package/templates/storefront/src/modules/home/components/testimonials/index.tsx +1 -0
- package/templates/storefront/src/modules/home/components/why-choose-us/dynamic-features.tsx +93 -0
- package/templates/storefront/src/modules/home/components/why-choose-us/index.tsx +1 -0
- package/templates/storefront/src/modules/layout/components/account-dropdown/index.tsx +56 -0
- package/templates/storefront/src/modules/layout/components/cart-button/index.tsx +8 -0
- package/templates/storefront/src/modules/layout/components/cart-dropdown/index.tsx +424 -0
- package/templates/storefront/src/modules/layout/components/cart-mismatch-banner/index.tsx +57 -0
- package/templates/storefront/src/modules/layout/components/cookie-consent/index.tsx +116 -0
- package/templates/storefront/src/modules/layout/components/country-select/index.tsx +135 -0
- package/templates/storefront/src/modules/layout/components/desktop-search/index.tsx +148 -0
- package/templates/storefront/src/modules/layout/components/dynamic-logo/index.tsx +27 -0
- package/templates/storefront/src/modules/layout/components/footer-categories/index.tsx +34 -0
- package/templates/storefront/src/modules/layout/components/footer-contact/index.tsx +87 -0
- package/templates/storefront/src/modules/layout/components/footer-description/index.tsx +12 -0
- package/templates/storefront/src/modules/layout/components/footer-logo/index.tsx +22 -0
- package/templates/storefront/src/modules/layout/components/footer-newsletter/index.tsx +100 -0
- package/templates/storefront/src/modules/layout/components/language-select/index.tsx +192 -0
- package/templates/storefront/src/modules/layout/components/medusa-cta/index.tsx +21 -0
- package/templates/storefront/src/modules/layout/components/mobile-menu/index.tsx +296 -0
- package/templates/storefront/src/modules/layout/components/nav-links/index.tsx +66 -0
- package/templates/storefront/src/modules/layout/components/nav-wrapper/index.tsx +14 -0
- package/templates/storefront/src/modules/layout/components/promo-bar/index.tsx +7 -0
- package/templates/storefront/src/modules/layout/components/promo-bar/promo-bar-content.tsx +174 -0
- package/templates/storefront/src/modules/layout/components/push-notification-manager/index.tsx +191 -0
- package/templates/storefront/src/modules/layout/components/search-panel/index.tsx +136 -0
- package/templates/storefront/src/modules/layout/components/side-menu/index.tsx +144 -0
- package/templates/storefront/src/modules/layout/components/verification-banner/index.tsx +217 -0
- package/templates/storefront/src/modules/layout/components/wishlist-counter/index.tsx +17 -0
- package/templates/storefront/src/modules/layout/templates/footer/index.tsx +7 -0
- package/templates/storefront/src/modules/layout/templates/nav/index.tsx +14 -0
- package/templates/storefront/src/modules/order/components/cancel-order-modal/index.tsx +168 -0
- package/templates/storefront/src/modules/order/components/help/index.tsx +25 -0
- package/templates/storefront/src/modules/order/components/item/index.tsx +62 -0
- package/templates/storefront/src/modules/order/components/items/index.tsx +44 -0
- package/templates/storefront/src/modules/order/components/onboarding-cta/index.tsx +28 -0
- package/templates/storefront/src/modules/order/components/order-confirmation-back-handler/index.tsx +28 -0
- package/templates/storefront/src/modules/order/components/order-details/index.tsx +63 -0
- package/templates/storefront/src/modules/order/components/order-purchase-tracker/index.tsx +48 -0
- package/templates/storefront/src/modules/order/components/order-redesign/index.tsx +887 -0
- package/templates/storefront/src/modules/order/components/order-summary/index.tsx +60 -0
- package/templates/storefront/src/modules/order/components/payment-details/index.tsx +63 -0
- package/templates/storefront/src/modules/order/components/shipping-details/index.tsx +73 -0
- package/templates/storefront/src/modules/order/components/transfer-actions/index.tsx +81 -0
- package/templates/storefront/src/modules/order/components/transfer-image/index.tsx +275 -0
- package/templates/storefront/src/modules/order/templates/order-completed-template.tsx +233 -0
- package/templates/storefront/src/modules/order/templates/order-details-template.tsx +128 -0
- package/templates/storefront/src/modules/products/components/image-gallery/index.tsx +297 -0
- package/templates/storefront/src/modules/products/components/product-actions/index.tsx +1400 -0
- package/templates/storefront/src/modules/products/components/product-actions/mobile-actions.tsx +217 -0
- package/templates/storefront/src/modules/products/components/product-actions/option-select.tsx +62 -0
- package/templates/storefront/src/modules/products/components/product-onboarding-cta/index.tsx +30 -0
- package/templates/storefront/src/modules/products/components/product-preview/index.tsx +5 -0
- package/templates/storefront/src/modules/products/components/product-preview/price.tsx +29 -0
- package/templates/storefront/src/modules/products/components/product-price/index.tsx +58 -0
- package/templates/storefront/src/modules/products/components/product-rating/index.tsx +1 -0
- package/templates/storefront/src/modules/products/components/product-tabs/accordion.tsx +100 -0
- package/templates/storefront/src/modules/products/components/product-tabs/index.tsx +127 -0
- package/templates/storefront/src/modules/products/components/product-tabs/ratings-tab.tsx +598 -0
- package/templates/storefront/src/modules/products/components/product-view-tracker/index.tsx +53 -0
- package/templates/storefront/src/modules/products/components/related-products/index.tsx +152 -0
- package/templates/storefront/src/modules/products/components/review-modal/index.tsx +1 -0
- package/templates/storefront/src/modules/products/components/share-button/index.tsx +1 -0
- package/templates/storefront/src/modules/products/components/thumbnail/index.tsx +91 -0
- package/templates/storefront/src/modules/products/components/wishlist-icon/index.tsx +1 -0
- package/templates/storefront/src/modules/products/context/product-context.tsx +52 -0
- package/templates/storefront/src/modules/products/templates/index.tsx +26 -0
- package/templates/storefront/src/modules/products/templates/product-actions-wrapper/index.tsx +1 -0
- package/templates/storefront/src/modules/products/templates/product-info/index.tsx +2 -0
- package/templates/storefront/src/modules/shipping/components/free-shipping-price-nudge/index.tsx +283 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-button/index.tsx +5 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-card-details/index.tsx +10 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-cart-item/index.tsx +35 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-cart-totals/index.tsx +30 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-code-form/index.tsx +13 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-line-item/index.tsx +35 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-order-confirmed-header/index.tsx +14 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-order-information/index.tsx +36 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-order-items/index.tsx +43 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-order-summary/index.tsx +15 -0
- package/templates/storefront/src/modules/skeletons/components/skeleton-product-preview/index.tsx +15 -0
- package/templates/storefront/src/modules/skeletons/templates/skeleton-cart-page/index.tsx +65 -0
- package/templates/storefront/src/modules/skeletons/templates/skeleton-order-confirmed/index.tsx +21 -0
- package/templates/storefront/src/modules/skeletons/templates/skeleton-product-grid/index.tsx +23 -0
- package/templates/storefront/src/modules/skeletons/templates/skeleton-related-products/index.tsx +25 -0
- package/templates/storefront/src/modules/store/components/client-paginated-products.tsx +108 -0
- package/templates/storefront/src/modules/store/components/mobile-filters/index.tsx +135 -0
- package/templates/storefront/src/modules/store/components/pagination/index.tsx +118 -0
- package/templates/storefront/src/modules/store/components/product-list-view-tracker/index.tsx +43 -0
- package/templates/storefront/src/modules/store/components/refinement-list/index.tsx +299 -0
- package/templates/storefront/src/modules/store/components/refinement-list/sort-products/index.tsx +120 -0
- package/templates/storefront/src/modules/store/components/store-header/index.tsx +67 -0
- package/templates/storefront/src/modules/store/templates/index.tsx +1 -0
- package/templates/storefront/src/modules/store/templates/paginated-products.tsx +175 -0
- package/templates/storefront/src/modules/wishlist/components/wishlist-item/index.tsx +797 -0
- package/templates/storefront/src/modules/wishlist/templates/index.tsx +176 -0
- package/templates/storefront/src/storefront.config.ts +12 -0
- package/templates/storefront/src/styles/globals.css +326 -0
- package/templates/storefront/src/theme/valero/blocks/home/Features/index.tsx +61 -0
- package/templates/storefront/src/theme/valero/blocks/home/Hero/index.tsx +102 -0
- package/templates/storefront/src/theme/valero/blocks/home/LovedByMoms/index.tsx +407 -0
- package/templates/storefront/src/theme/valero/blocks/home/NewArrivals/index.tsx +48 -0
- package/templates/storefront/src/theme/valero/blocks/home/ShopByAge/index.tsx +128 -0
- package/templates/storefront/src/theme/valero/blocks/home/ShopByCategory/index.tsx +409 -0
- package/templates/storefront/src/theme/valero/blocks/home/Testimonials/index.tsx +697 -0
- package/templates/storefront/src/theme/valero/blocks/home/WhyChooseUs/index.tsx +62 -0
- package/templates/storefront/src/theme/valero/layouts/MainLayoutShell.tsx +14 -0
- package/templates/storefront/src/theme/valero/primitives/Button.tsx +28 -0
- package/templates/storefront/src/theme/valero/primitives/Card.tsx +32 -0
- package/templates/storefront/src/theme/valero/primitives/index.ts +2 -0
- package/templates/storefront/src/theme/valero/slots/account/ForgotPassword/index.tsx +1 -0
- package/templates/storefront/src/theme/valero/slots/account/Login/index.tsx +1 -0
- package/templates/storefront/src/theme/valero/slots/account/LoginTemplate/index.tsx +44 -0
- package/templates/storefront/src/theme/valero/slots/account/Register/index.tsx +1 -0
- package/templates/storefront/src/theme/valero/slots/cart/CartItem/index.tsx +11 -0
- package/templates/storefront/src/theme/valero/slots/cart/CartSummary/index.tsx +13 -0
- package/templates/storefront/src/theme/valero/slots/checkout/CheckoutForm/index.tsx +1 -0
- package/templates/storefront/src/theme/valero/slots/checkout/CheckoutSummary/index.tsx +1 -0
- package/templates/storefront/src/theme/valero/slots/layout/Footer/index.tsx +104 -0
- package/templates/storefront/src/theme/valero/slots/layout/Nav/index.tsx +97 -0
- package/templates/storefront/src/theme/valero/slots/layout/PromoBar/index.tsx +19 -0
- package/templates/storefront/src/theme/valero/slots/layout/PromoBar/promo-bar-content.tsx +174 -0
- package/templates/storefront/src/theme/valero/slots/order/OrderDetails/index.tsx +12 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductCTASection.tsx +191 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductDetailsSection.tsx +137 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductFeaturePanel.tsx +245 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductHighlightsSection.tsx +98 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductOptionsSection.tsx +233 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductPriceSection.tsx +53 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductTrustSection.tsx +84 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductActions/index.tsx +161 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductCard/index.tsx +132 -0
- package/templates/storefront/src/theme/valero/slots/product/ProductInfo/index.tsx +40 -0
- package/templates/storefront/src/theme/valero/templates/StorePage/index.tsx +154 -0
- package/templates/storefront/src/theme/valero/tokens/colors.js +16 -0
- package/templates/storefront/src/theme/valero/tokens/colors.ts +21 -0
- package/templates/storefront/src/theme/valero/tokens/fonts.ts +13 -0
- package/templates/storefront/src/theme/valero/tokens/index.ts +3 -0
- package/templates/storefront/src/theme/valero/tokens/spacing.ts +9 -0
- package/templates/storefront/src/theme/valero/tokens/theme.css +91 -0
- package/templates/storefront/tailwind.config.js +221 -0
- package/templates/storefront/tsconfig.json +30 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Listbox,
|
|
5
|
+
ListboxButton,
|
|
6
|
+
ListboxOption,
|
|
7
|
+
ListboxOptions,
|
|
8
|
+
Transition,
|
|
9
|
+
} from "@headlessui/react"
|
|
10
|
+
import { Fragment, useEffect, useMemo, useState } from "react"
|
|
11
|
+
import ReactCountryFlag from "react-country-flag"
|
|
12
|
+
|
|
13
|
+
import { StateType } from "@core/hooks/use-toggle-state"
|
|
14
|
+
import { useParams, usePathname } from "next/navigation"
|
|
15
|
+
import { updateRegion } from "@core/data/cart"
|
|
16
|
+
import { HttpTypes } from "@medusajs/types"
|
|
17
|
+
|
|
18
|
+
type CountryOption = {
|
|
19
|
+
country: string
|
|
20
|
+
region: string
|
|
21
|
+
label: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type CountrySelectProps = {
|
|
25
|
+
toggleState: StateType
|
|
26
|
+
regions: HttpTypes.StoreRegion[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const CountrySelect = ({ toggleState, regions }: CountrySelectProps) => {
|
|
30
|
+
const [current, setCurrent] = useState<
|
|
31
|
+
| { country: string | undefined; region: string; label: string | undefined }
|
|
32
|
+
| undefined
|
|
33
|
+
>(undefined)
|
|
34
|
+
|
|
35
|
+
const { countryCode } = useParams()
|
|
36
|
+
const currentPath = usePathname().split(`/${countryCode}`)[1]
|
|
37
|
+
|
|
38
|
+
const { state, close } = toggleState
|
|
39
|
+
|
|
40
|
+
const options = useMemo(() => {
|
|
41
|
+
return regions
|
|
42
|
+
?.map((r) => {
|
|
43
|
+
return r.countries?.map((c) => ({
|
|
44
|
+
country: c.iso_2,
|
|
45
|
+
region: r.id,
|
|
46
|
+
label: c.display_name,
|
|
47
|
+
}))
|
|
48
|
+
})
|
|
49
|
+
.flat()
|
|
50
|
+
.sort((a, b) => (a?.label ?? "").localeCompare(b?.label ?? ""))
|
|
51
|
+
}, [regions])
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (countryCode) {
|
|
55
|
+
const option = options?.find((o) => o?.country === countryCode)
|
|
56
|
+
setCurrent(option)
|
|
57
|
+
}
|
|
58
|
+
}, [options, countryCode])
|
|
59
|
+
|
|
60
|
+
const handleChange = (option: CountryOption) => {
|
|
61
|
+
updateRegion(option.country, currentPath)
|
|
62
|
+
close()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div>
|
|
67
|
+
<Listbox
|
|
68
|
+
as="span"
|
|
69
|
+
onChange={handleChange}
|
|
70
|
+
defaultValue={
|
|
71
|
+
countryCode
|
|
72
|
+
? options?.find((o) => o?.country === countryCode)
|
|
73
|
+
: undefined
|
|
74
|
+
}
|
|
75
|
+
>
|
|
76
|
+
<ListboxButton className="py-1 w-full">
|
|
77
|
+
<div className="txt-compact-small flex items-start gap-x-2">
|
|
78
|
+
<span>Shipping to:</span>
|
|
79
|
+
{current && (
|
|
80
|
+
<span className="txt-compact-small flex items-center gap-x-2">
|
|
81
|
+
{/* @ts-ignore */}
|
|
82
|
+
<ReactCountryFlag
|
|
83
|
+
svg
|
|
84
|
+
style={{
|
|
85
|
+
width: "16px",
|
|
86
|
+
height: "16px",
|
|
87
|
+
}}
|
|
88
|
+
countryCode={current.country ?? ""}
|
|
89
|
+
/>
|
|
90
|
+
{current.label}
|
|
91
|
+
</span>
|
|
92
|
+
)}
|
|
93
|
+
</div>
|
|
94
|
+
</ListboxButton>
|
|
95
|
+
<div className="flex relative w-full min-w-[320px]">
|
|
96
|
+
<Transition
|
|
97
|
+
show={state}
|
|
98
|
+
as={Fragment}
|
|
99
|
+
leave="transition ease-in duration-150"
|
|
100
|
+
leaveFrom="opacity-100"
|
|
101
|
+
leaveTo="opacity-0"
|
|
102
|
+
>
|
|
103
|
+
<ListboxOptions
|
|
104
|
+
className="absolute -bottom-[calc(100%-36px)] left-0 xsmall:left-auto xsmall:right-0 max-h-[442px] overflow-y-scroll z-[900] bg-white drop-shadow-md text-small-regular uppercase text-black no-scrollbar rounded-rounded w-full"
|
|
105
|
+
static
|
|
106
|
+
>
|
|
107
|
+
{options?.map((o, index) => {
|
|
108
|
+
return (
|
|
109
|
+
<ListboxOption
|
|
110
|
+
key={index}
|
|
111
|
+
value={o}
|
|
112
|
+
className="py-2 hover:bg-gray-200 px-3 cursor-pointer flex items-center gap-x-2"
|
|
113
|
+
>
|
|
114
|
+
{/* @ts-ignore */}
|
|
115
|
+
<ReactCountryFlag
|
|
116
|
+
svg
|
|
117
|
+
style={{
|
|
118
|
+
width: "16px",
|
|
119
|
+
height: "16px",
|
|
120
|
+
}}
|
|
121
|
+
countryCode={o?.country ?? ""}
|
|
122
|
+
/>{" "}
|
|
123
|
+
{o?.label}
|
|
124
|
+
</ListboxOption>
|
|
125
|
+
)
|
|
126
|
+
})}
|
|
127
|
+
</ListboxOptions>
|
|
128
|
+
</Transition>
|
|
129
|
+
</div>
|
|
130
|
+
</Listbox>
|
|
131
|
+
</div>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export default CountrySelect
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState, useEffect, useRef, createContext, useContext } from "react"
|
|
4
|
+
import Image from "next/image"
|
|
5
|
+
import { XMark } from "@medusajs/icons"
|
|
6
|
+
import { useRouter, useSearchParams } from "next/navigation"
|
|
7
|
+
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
|
8
|
+
import NavLinks from "@modules/layout/components/nav-links"
|
|
9
|
+
|
|
10
|
+
type SearchContextType = {
|
|
11
|
+
isSearchOpen: boolean
|
|
12
|
+
setIsSearchOpen: (isOpen: boolean) => void
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const SearchContext = createContext<SearchContextType | undefined>(undefined)
|
|
16
|
+
|
|
17
|
+
export const useSearchContext = () => {
|
|
18
|
+
const context = useContext(SearchContext)
|
|
19
|
+
if (!context) {
|
|
20
|
+
throw new Error("useSearchContext must be used within DesktopSearch")
|
|
21
|
+
}
|
|
22
|
+
return context
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type DesktopSearchProps = {
|
|
26
|
+
countryCode: string
|
|
27
|
+
children?: React.ReactNode
|
|
28
|
+
hideNavLinks?: boolean
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const DesktopSearch = ({ countryCode, children, hideNavLinks = false }: DesktopSearchProps) => {
|
|
32
|
+
const searchParams = useSearchParams()
|
|
33
|
+
const q = searchParams.get("q") || ""
|
|
34
|
+
const [isSearchOpen, setIsSearchOpen] = useState(!!q)
|
|
35
|
+
const [searchQuery, setSearchQuery] = useState(q)
|
|
36
|
+
const prevOpenRef = useRef(!!q)
|
|
37
|
+
const router = useRouter()
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
setSearchQuery(q)
|
|
41
|
+
}, [q])
|
|
42
|
+
|
|
43
|
+
// Lock body scroll when search is open
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (isSearchOpen !== prevOpenRef.current) {
|
|
46
|
+
prevOpenRef.current = isSearchOpen
|
|
47
|
+
if (isSearchOpen) {
|
|
48
|
+
document.body.style.overflow = "hidden"
|
|
49
|
+
} else {
|
|
50
|
+
document.body.style.overflow = "unset"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, [isSearchOpen])
|
|
54
|
+
|
|
55
|
+
// Cleanup on unmount
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
return () => {
|
|
58
|
+
document.body.style.overflow = "unset"
|
|
59
|
+
}
|
|
60
|
+
}, [])
|
|
61
|
+
|
|
62
|
+
const handleCloseSearch = () => {
|
|
63
|
+
setIsSearchOpen(false)
|
|
64
|
+
// Don't clear searchQuery so it stays if user reopens
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const handleSearchSubmit = () => {
|
|
68
|
+
if (searchQuery.trim()) {
|
|
69
|
+
const query = searchQuery.trim()
|
|
70
|
+
// Navigate to search page
|
|
71
|
+
router.push(`/store?q=${encodeURIComponent(query)}`)
|
|
72
|
+
setIsSearchOpen(false)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<SearchContext.Provider value={{ isSearchOpen, setIsSearchOpen }}>
|
|
78
|
+
{/* Navigation Links - Hidden when search is open. Visible from 640px (sm) */}
|
|
79
|
+
{!hideNavLinks && (
|
|
80
|
+
<div className={`hidden sm:flex items-center gap-x-6 xl:gap-x-8 h-full transition-all duration-300 ${isSearchOpen ? "opacity-0 pointer-events-none w-0 overflow-hidden" : "opacity-100 w-auto"
|
|
81
|
+
}`}>
|
|
82
|
+
<NavLinks />
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
{/* Search Bar - ONLY shows on Desktop (1024px+) */}
|
|
87
|
+
<div className={`hidden lg:flex items-center gap-x-6 xl:gap-x-8 h-full transition-all duration-300 ${isSearchOpen ? "opacity-100 w-auto" : "opacity-0 pointer-events-none w-0 overflow-hidden"
|
|
88
|
+
}`}>
|
|
89
|
+
<div className="flex items-center gap-3 w-[650px]">
|
|
90
|
+
<div className="relative flex-1">
|
|
91
|
+
<input
|
|
92
|
+
type="text"
|
|
93
|
+
placeholder="Search for products, brands and more"
|
|
94
|
+
value={searchQuery}
|
|
95
|
+
onChange={(e) => setSearchQuery(e.target.value)}
|
|
96
|
+
onKeyDown={(e) => {
|
|
97
|
+
if (e.key === "Enter") {
|
|
98
|
+
handleSearchSubmit()
|
|
99
|
+
}
|
|
100
|
+
}}
|
|
101
|
+
className="w-full h-11 pl-12 pr-4 border border-[var(--color-border)] bg-surface-muted focus:bg-surface focus:outline-none focus:ring-2 focus:ring-brand-accent"
|
|
102
|
+
/>
|
|
103
|
+
<Image
|
|
104
|
+
src="/Search.svg"
|
|
105
|
+
alt="Search"
|
|
106
|
+
width={20}
|
|
107
|
+
height={20}
|
|
108
|
+
className="absolute left-4 top-1/2 -translate-y-1/2 opacity-60"
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<button
|
|
113
|
+
onClick={handleCloseSearch}
|
|
114
|
+
className="h-11 w-11 flex items-center justify-center rounded-full bg-gray-100 hover:bg-gray-200 transition"
|
|
115
|
+
>
|
|
116
|
+
<XMark className="w-4 h-5 text-muted" />
|
|
117
|
+
</button>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
</div>
|
|
121
|
+
{children}
|
|
122
|
+
</SearchContext.Provider>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Search Icon Component - to be used in action icons area
|
|
127
|
+
export const DesktopSearchIcon = () => {
|
|
128
|
+
const { isSearchOpen, setIsSearchOpen } = useSearchContext()
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<button
|
|
132
|
+
onClick={() => setIsSearchOpen(true)}
|
|
133
|
+
className={`hidden lg:flex items-center hover:opacity-80 transition-all duration-300 ${isSearchOpen ? "opacity-0 pointer-events-none w-0 overflow-hidden" : "opacity-100 w-auto"
|
|
134
|
+
}`}
|
|
135
|
+
data-testid="nav-search-button"
|
|
136
|
+
>
|
|
137
|
+
<Image
|
|
138
|
+
src="/Search.svg"
|
|
139
|
+
alt="Search"
|
|
140
|
+
width={26}
|
|
141
|
+
height={26}
|
|
142
|
+
className="w-5 h-5"
|
|
143
|
+
/>
|
|
144
|
+
</button>
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export default DesktopSearch
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Image from "next/image"
|
|
2
|
+
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
|
3
|
+
import { getLogoFromConfig } from "@core/data/dynamic-config"
|
|
4
|
+
|
|
5
|
+
const DynamicLogo = async () => {
|
|
6
|
+
const logoUrl = (await getLogoFromConfig()) || "/Logo.png"
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<LocalizedClientLink
|
|
10
|
+
href="/"
|
|
11
|
+
className="flex items-center h-full"
|
|
12
|
+
data-testid="nav-store-link"
|
|
13
|
+
>
|
|
14
|
+
<Image
|
|
15
|
+
src={logoUrl}
|
|
16
|
+
alt="Chocomelon"
|
|
17
|
+
width={150}
|
|
18
|
+
height={60}
|
|
19
|
+
className="h-8 sm:h-10 md:h-12 lg:h-14 xl:h-auto w-auto object-contain max-w-[120px] sm:max-w-[140px] md:max-w-[150px]"
|
|
20
|
+
priority
|
|
21
|
+
/>
|
|
22
|
+
</LocalizedClientLink>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default DynamicLogo
|
|
27
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { HttpTypes } from "@medusajs/types"
|
|
4
|
+
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
|
5
|
+
|
|
6
|
+
type FooterCategoriesProps = {
|
|
7
|
+
categories: HttpTypes.StoreProductCategory[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const FooterCategories = ({ categories }: FooterCategoriesProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<div className="flex flex-col gap-y-3 sm:gap-y-4">
|
|
13
|
+
<h3 className="text-white text-sm sm:text-base font-semibold mb-1 sm:mb-2">
|
|
14
|
+
Shop
|
|
15
|
+
</h3>
|
|
16
|
+
<ul className="flex flex-col gap-y-1.5 sm:gap-y-2">
|
|
17
|
+
{categories.map((category) => (
|
|
18
|
+
<li key={category.id}>
|
|
19
|
+
<LocalizedClientLink
|
|
20
|
+
href={`/store?category=${category.id}`}
|
|
21
|
+
data-ga-event="footer_category_click"
|
|
22
|
+
data-ga-label={category.name || "Category"}
|
|
23
|
+
className="text-white text-xs sm:text-sm hover:text-pink-400 transition-colors"
|
|
24
|
+
>
|
|
25
|
+
{category.name}
|
|
26
|
+
</LocalizedClientLink>
|
|
27
|
+
</li>
|
|
28
|
+
))}
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default FooterCategories
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import ObfuscatedEmail from "@modules/common/components/obfuscated-email"
|
|
2
|
+
import { getContactInfoFromConfig } from "@core/data/dynamic-config"
|
|
3
|
+
|
|
4
|
+
const FooterContact = async () => {
|
|
5
|
+
const fetchedContact = await getContactInfoFromConfig()
|
|
6
|
+
|
|
7
|
+
const contactInfo = {
|
|
8
|
+
phone: fetchedContact?.phone || "+91 82382 57652",
|
|
9
|
+
email: fetchedContact?.email || "support@smartbytelabs.com",
|
|
10
|
+
address: fetchedContact?.address || "312, Silver trade center, Mota Varachha, Surat",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className="flex flex-col gap-y-4 sm:gap-y-6">
|
|
15
|
+
<h3 className="text-white text-sm sm:text-base font-semibold mb-2 sm:mb-3">Contact Us</h3>
|
|
16
|
+
<div className="flex flex-col gap-y-4 sm:gap-y-5">
|
|
17
|
+
{/* Phone */}
|
|
18
|
+
<div className="flex items-center gap-4 sm:gap-5">
|
|
19
|
+
<div className="w-9 h-9 sm:w-11 sm:h-11 rounded-full bg-gray-600/50 flex items-center justify-center flex-shrink-0">
|
|
20
|
+
<svg
|
|
21
|
+
width="18"
|
|
22
|
+
height="18"
|
|
23
|
+
viewBox="0 0 24 24"
|
|
24
|
+
fill="none"
|
|
25
|
+
stroke="white"
|
|
26
|
+
strokeWidth="2"
|
|
27
|
+
strokeLinecap="round"
|
|
28
|
+
strokeLinejoin="round"
|
|
29
|
+
className="text-white"
|
|
30
|
+
>
|
|
31
|
+
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" />
|
|
32
|
+
</svg>
|
|
33
|
+
</div>
|
|
34
|
+
<span className="text-white text-xs sm:text-sm font-medium">{contactInfo.phone}</span>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
{/* Email */}
|
|
38
|
+
<div className="flex items-center gap-4 sm:gap-5">
|
|
39
|
+
<div className="w-9 h-9 sm:w-11 sm:h-11 rounded-full bg-gray-600/50 flex items-center justify-center flex-shrink-0">
|
|
40
|
+
<svg
|
|
41
|
+
width="18"
|
|
42
|
+
height="18"
|
|
43
|
+
viewBox="0 0 24 24"
|
|
44
|
+
fill="none"
|
|
45
|
+
stroke="white"
|
|
46
|
+
strokeWidth="2"
|
|
47
|
+
strokeLinecap="round"
|
|
48
|
+
strokeLinejoin="round"
|
|
49
|
+
className="text-white"
|
|
50
|
+
>
|
|
51
|
+
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
|
|
52
|
+
<polyline points="22,6 12,13 2,6" />
|
|
53
|
+
</svg>
|
|
54
|
+
</div>
|
|
55
|
+
<ObfuscatedEmail
|
|
56
|
+
email={contactInfo.email}
|
|
57
|
+
className="text-white text-xs sm:text-sm font-medium hover:text-pink-400 transition-colors"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
{/* Address */}
|
|
62
|
+
<div className="flex items-start gap-4 sm:gap-5">
|
|
63
|
+
<div className="w-9 h-9 sm:w-11 sm:h-11 rounded-full bg-gray-600/50 flex items-center justify-center flex-shrink-0">
|
|
64
|
+
<svg
|
|
65
|
+
width="18"
|
|
66
|
+
height="18"
|
|
67
|
+
viewBox="0 0 24 24"
|
|
68
|
+
fill="none"
|
|
69
|
+
stroke="white"
|
|
70
|
+
strokeWidth="2"
|
|
71
|
+
strokeLinecap="round"
|
|
72
|
+
strokeLinejoin="round"
|
|
73
|
+
className="text-white"
|
|
74
|
+
>
|
|
75
|
+
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" />
|
|
76
|
+
<circle cx="12" cy="10" r="3" />
|
|
77
|
+
</svg>
|
|
78
|
+
</div>
|
|
79
|
+
<span className="text-white text-xs sm:text-sm font-medium leading-normal">{contactInfo.address}</span>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export default FooterContact
|
|
87
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getWebsiteDescriptionFromConfig } from "@core/data/dynamic-config"
|
|
2
|
+
|
|
3
|
+
const FooterDescription = async () => {
|
|
4
|
+
const description = (await getWebsiteDescriptionFromConfig()) || "Chocomelon is a kids clothing brand creating soft, stylish outfits for babies and children from newborn to 15 years. Our designs focus on skin-friendly fabrics, comfortable fits, and playful details kids love. From everyday wear to special occasions, we deliver quality, durability, and trusted comfort for growing kids."
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<p className="text-white text-xs sm:text-sm leading-relaxed">{description}</p>
|
|
8
|
+
)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default FooterDescription
|
|
12
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Image from "next/image"
|
|
2
|
+
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
|
3
|
+
import { getLogoFromConfig } from "@core/data/dynamic-config"
|
|
4
|
+
|
|
5
|
+
const FooterLogo = async () => {
|
|
6
|
+
const logoUrl = (await getLogoFromConfig()) || "/Logo.png"
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<LocalizedClientLink href="/" className="block mb-3 sm:mb-4">
|
|
10
|
+
<Image
|
|
11
|
+
src={logoUrl}
|
|
12
|
+
alt="Chocomelon"
|
|
13
|
+
width={180}
|
|
14
|
+
height={60}
|
|
15
|
+
className="h-auto object-contain w-32 sm:w-40 md:w-44 lg:w-[180px]"
|
|
16
|
+
/>
|
|
17
|
+
</LocalizedClientLink>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default FooterLogo
|
|
22
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import { subscribeToNewsletter } from "@core/data/newsletter"
|
|
5
|
+
|
|
6
|
+
const FooterNewsletter = () => {
|
|
7
|
+
const [email, setEmail] = useState("")
|
|
8
|
+
const [isSubmitting, setIsSubmitting] = useState(false)
|
|
9
|
+
const [message, setMessage] = useState<{ type: "success" | "error"; text: string } | null>(null)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const handleSubmit = async (e: React.FormEvent) => {
|
|
14
|
+
e.preventDefault()
|
|
15
|
+
|
|
16
|
+
if (!email || !email.includes("@")) {
|
|
17
|
+
setMessage({ type: "error", text: "Please enter a valid email address" })
|
|
18
|
+
return
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
setIsSubmitting(true)
|
|
22
|
+
setMessage(null)
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
const result = await subscribeToNewsletter(email)
|
|
26
|
+
|
|
27
|
+
if (result.success) {
|
|
28
|
+
// Track form submission in Google Analytics
|
|
29
|
+
if (typeof window !== 'undefined') {
|
|
30
|
+
window.dataLayer = window.dataLayer || [];
|
|
31
|
+
window.dataLayer.push({
|
|
32
|
+
event: 'form_submit',
|
|
33
|
+
form_type: 'footer_newsletter_subscribe'
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
setMessage({ type: "success", text: result.message })
|
|
38
|
+
setEmail("")
|
|
39
|
+
// Clear message after 3 seconds
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
setMessage(null)
|
|
42
|
+
}, 3000)
|
|
43
|
+
} else {
|
|
44
|
+
setMessage({ type: "error", text: result.message })
|
|
45
|
+
}
|
|
46
|
+
} catch (error: any) {
|
|
47
|
+
setMessage({
|
|
48
|
+
type: "error",
|
|
49
|
+
text: "Something went wrong. Please try again."
|
|
50
|
+
})
|
|
51
|
+
} finally {
|
|
52
|
+
setIsSubmitting(false)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div className="w-full sm:w-[560px] flex-1 sm:flex-initial">
|
|
58
|
+
<form onSubmit={handleSubmit} className="flex flex-col sm:flex-row items-stretch sm:items-center gap-2 sm:gap-2">
|
|
59
|
+
<input
|
|
60
|
+
type="email"
|
|
61
|
+
value={email}
|
|
62
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
63
|
+
placeholder="Enter your email"
|
|
64
|
+
className="flex-1 px-3 sm:px-4 py-2 text-sm sm:text-base rounded-lg bg-white text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-purple-500"
|
|
65
|
+
required
|
|
66
|
+
disabled={isSubmitting}
|
|
67
|
+
/>
|
|
68
|
+
<button
|
|
69
|
+
type="submit"
|
|
70
|
+
disabled={isSubmitting}
|
|
71
|
+
data-ga-event="newsletter_subscribe"
|
|
72
|
+
data-ga-label="Footer Newsletter"
|
|
73
|
+
className="px-4 sm:px-6 py-2 text-sm sm:text-base rounded-lg font-semibold text-white transition-colors disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap"
|
|
74
|
+
style={{ backgroundColor: '#8B5AB1' }}
|
|
75
|
+
onMouseEnter={(e) => {
|
|
76
|
+
if (!isSubmitting) {
|
|
77
|
+
e.currentTarget.style.backgroundColor = '#7a4a9a'
|
|
78
|
+
}
|
|
79
|
+
}}
|
|
80
|
+
onMouseLeave={(e) => {
|
|
81
|
+
if (!isSubmitting) {
|
|
82
|
+
e.currentTarget.style.backgroundColor = '#8B5AB1'
|
|
83
|
+
}
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<span className="pointer-events-none block">
|
|
87
|
+
{isSubmitting ? "..." : "Subscribe"}
|
|
88
|
+
</span>
|
|
89
|
+
</button>
|
|
90
|
+
</form>
|
|
91
|
+
{message && (
|
|
92
|
+
<p className={`text-xs sm:text-sm mt-2 ${message.type === "success" ? "text-green-400" : "text-red-400"}`}>
|
|
93
|
+
{message.text}
|
|
94
|
+
</p>
|
|
95
|
+
)}
|
|
96
|
+
</div>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export default FooterNewsletter
|