@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,409 @@
|
|
|
1
|
+
import Image from "next/image"
|
|
2
|
+
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
|
3
|
+
import { HttpTypes } from "@medusajs/types"
|
|
4
|
+
import PlaceholderImage from "@modules/common/icons/placeholder-image"
|
|
5
|
+
|
|
6
|
+
type ShopByCategoryProps = {
|
|
7
|
+
categories: HttpTypes.StoreProductCategory[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ShopByCategory = ({ categories }: ShopByCategoryProps) => {
|
|
11
|
+
if (!categories || categories.length === 0) {
|
|
12
|
+
return null
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Filter for subcategories (categories with parent_category_id)
|
|
16
|
+
const subcategories = categories.filter(
|
|
17
|
+
(category) => category.parent_category_id && category.parent_category
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
// Find Traditional and Dresses categories
|
|
21
|
+
const traditionalCategory = subcategories.find(c => {
|
|
22
|
+
const name = (c.name || "").toLowerCase()
|
|
23
|
+
return name.includes("traditional")
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const dressesCategory = subcategories.find(c => {
|
|
27
|
+
const name = (c.name || "").toLowerCase()
|
|
28
|
+
return name.includes("dress")
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
// Get other categories (excluding Traditional and Dresses)
|
|
32
|
+
const otherCategories = subcategories.filter(c => {
|
|
33
|
+
const name = (c.name || "").toLowerCase()
|
|
34
|
+
return !name.includes("traditional") && !name.includes("dress")
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
// Build display order: first 3 other categories, then Traditional (index 3), Dresses (index 4), then 6th category
|
|
38
|
+
const displayCategories: typeof subcategories = []
|
|
39
|
+
let otherIndex = 0
|
|
40
|
+
|
|
41
|
+
// 1. Fill up to first 3 slots with other categories
|
|
42
|
+
while (displayCategories.length < 3 && otherIndex < otherCategories.length) {
|
|
43
|
+
displayCategories.push(otherCategories[otherIndex++])
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 2. Add Traditional or next other category
|
|
47
|
+
if (traditionalCategory) {
|
|
48
|
+
displayCategories.push(traditionalCategory)
|
|
49
|
+
} else if (otherIndex < otherCategories.length) {
|
|
50
|
+
displayCategories.push(otherCategories[otherIndex++])
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 3. Add Dresses or next other category
|
|
54
|
+
if (dressesCategory) {
|
|
55
|
+
displayCategories.push(dressesCategory)
|
|
56
|
+
} else if (otherIndex < otherCategories.length) {
|
|
57
|
+
displayCategories.push(otherCategories[otherIndex++])
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 4. Fill remaining slots with any remaining other categories
|
|
61
|
+
while (otherIndex < otherCategories.length) {
|
|
62
|
+
displayCategories.push(otherCategories[otherIndex++])
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// No longer slice to 6 - allow all categories
|
|
66
|
+
const finalDisplayCategories = displayCategories
|
|
67
|
+
|
|
68
|
+
if (finalDisplayCategories.length === 0) {
|
|
69
|
+
return null
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<div className="w-full py-8 lg:py-16 bg-page-bg">
|
|
74
|
+
<div className="w-full px-4 sm:px-6 md:px-8 lg:px-12 xl:px-16">
|
|
75
|
+
<div className="w-full max-w-[1360px] mx-auto">
|
|
76
|
+
<h2 className="font-display text-2xl sm:text-3xl text-heading text-center mb-8 lg:mb-12">
|
|
77
|
+
Shop by category
|
|
78
|
+
</h2>
|
|
79
|
+
{/* Tablet Grid Layout - 768px to 1023px */}
|
|
80
|
+
<div
|
|
81
|
+
className="hidden md:grid lg:hidden gap-3 md:gap-4"
|
|
82
|
+
style={{
|
|
83
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
84
|
+
gridAutoRows: 'minmax(280px, 350px)',
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
{finalDisplayCategories.map((category, index) => {
|
|
88
|
+
// Calculate grid positioning based on 6-item repeating pattern
|
|
89
|
+
// Row A (Indices 0,1,2): Large (2 col), Small (1 col), Small (1 col)
|
|
90
|
+
// Row B (Indices 3,4,5): Small (1 col), Small (1 col), Large (2 col)
|
|
91
|
+
|
|
92
|
+
const positionInPattern = index % 6
|
|
93
|
+
const rowGroup = Math.floor(index / 6)
|
|
94
|
+
const rowBase = (rowGroup * 2) + 1
|
|
95
|
+
|
|
96
|
+
let gridColumn = ""
|
|
97
|
+
let gridRow = ""
|
|
98
|
+
|
|
99
|
+
if (positionInPattern === 0) {
|
|
100
|
+
gridColumn = "1 / 3" // Span 2 cols
|
|
101
|
+
gridRow = `${rowBase}`
|
|
102
|
+
} else if (positionInPattern === 1) {
|
|
103
|
+
gridColumn = "3"
|
|
104
|
+
gridRow = `${rowBase}`
|
|
105
|
+
} else if (positionInPattern === 2) {
|
|
106
|
+
gridColumn = "4"
|
|
107
|
+
gridRow = `${rowBase}`
|
|
108
|
+
} else if (positionInPattern === 3) {
|
|
109
|
+
gridColumn = "1"
|
|
110
|
+
gridRow = `${rowBase + 1}`
|
|
111
|
+
} else if (positionInPattern === 4) {
|
|
112
|
+
gridColumn = "2"
|
|
113
|
+
gridRow = `${rowBase + 1}`
|
|
114
|
+
} else if (positionInPattern === 5) {
|
|
115
|
+
gridColumn = "3 / 5" // Span 2 cols
|
|
116
|
+
gridRow = `${rowBase + 1}`
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Skip if position not set (shouldn't happen, but safety check)
|
|
120
|
+
if (!gridColumn || !gridRow) {
|
|
121
|
+
return null
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Get metadata
|
|
125
|
+
const metadata = (category as any)?.metadata || {}
|
|
126
|
+
const categoryImage = metadata.category_image || null
|
|
127
|
+
const backgroundColor = metadata.category_background_color || "#F3F4F6"
|
|
128
|
+
const showShopNow = metadata.show_shop_now === "true" || metadata.show_shop_now === true
|
|
129
|
+
|
|
130
|
+
// Get parent category name as subtitle
|
|
131
|
+
const parentCategory = (category as any)?.parent_category
|
|
132
|
+
const subtitle = parentCategory?.name || ""
|
|
133
|
+
|
|
134
|
+
// Get subcategory name as main title (in uppercase)
|
|
135
|
+
const mainTitle = (category.name || "").toUpperCase()
|
|
136
|
+
|
|
137
|
+
// Build category URL - use store page with category filter
|
|
138
|
+
const categoryUrl = category.id
|
|
139
|
+
? `/store?category=${category.id}`
|
|
140
|
+
: "#"
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<LocalizedClientLink
|
|
144
|
+
key={`tablet-${category.id}`}
|
|
145
|
+
href={categoryUrl}
|
|
146
|
+
data-ga-event="shop_by_category_click"
|
|
147
|
+
data-ga-label={category.name || "Category"}
|
|
148
|
+
data-ga-category-name={category.name || ""}
|
|
149
|
+
data-ga-category-handle={category.handle || ""}
|
|
150
|
+
data-ga-category-id={category.id || ""}
|
|
151
|
+
data-ga-parent-category={subtitle || ""}
|
|
152
|
+
className="relative rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col group w-full"
|
|
153
|
+
style={{
|
|
154
|
+
backgroundColor: backgroundColor,
|
|
155
|
+
gridColumn: gridColumn,
|
|
156
|
+
gridRow: gridRow,
|
|
157
|
+
minHeight: "280px",
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<div className="flex flex-col h-full p-3 md:p-4 pb-0 md:pb-0 pointer-events-none">
|
|
161
|
+
{/* Category Title */}
|
|
162
|
+
<div className="mb-2 md:mb-3">
|
|
163
|
+
{subtitle && (
|
|
164
|
+
<p className="text-xs text-gray-700 mb-1">{subtitle}</p>
|
|
165
|
+
)}
|
|
166
|
+
<h3 className="text-sm md:text-base lg:text-lg font-bold text-gray-900">
|
|
167
|
+
{mainTitle}
|
|
168
|
+
</h3>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
{/* Category Image */}
|
|
172
|
+
<div className="flex-1 flex items-end justify-center relative" style={{ minHeight: 0 }}>
|
|
173
|
+
{categoryImage ? (
|
|
174
|
+
<div className="w-full h-full flex items-end justify-center">
|
|
175
|
+
<Image
|
|
176
|
+
src={categoryImage}
|
|
177
|
+
alt={category.name || "Category"}
|
|
178
|
+
fill
|
|
179
|
+
sizes="(max-width: 768px) 50vw, (max-width: 1024px) 33vw, 25vw"
|
|
180
|
+
className="object-contain object-bottom"
|
|
181
|
+
/>
|
|
182
|
+
</div>
|
|
183
|
+
) : (
|
|
184
|
+
<div className="w-full h-full flex items-end justify-center">
|
|
185
|
+
<PlaceholderImage size={90} />
|
|
186
|
+
</div>
|
|
187
|
+
)}
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
</LocalizedClientLink>
|
|
191
|
+
)
|
|
192
|
+
})}
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
{/* Desktop Grid Layout - 1024px and above */}
|
|
196
|
+
<div
|
|
197
|
+
className="hidden lg:grid gap-4 xl:gap-6"
|
|
198
|
+
style={{
|
|
199
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
200
|
+
gridAutoRows: 'minmax(300px, 390px)',
|
|
201
|
+
}}
|
|
202
|
+
>
|
|
203
|
+
{finalDisplayCategories.map((category, index) => {
|
|
204
|
+
// Same 4-column logic for Desktop
|
|
205
|
+
const positionInPattern = index % 6
|
|
206
|
+
const rowGroup = Math.floor(index / 6)
|
|
207
|
+
const rowBase = (rowGroup * 2) + 1
|
|
208
|
+
|
|
209
|
+
let gridColumn = ""
|
|
210
|
+
let gridRow = ""
|
|
211
|
+
|
|
212
|
+
if (positionInPattern === 0) {
|
|
213
|
+
gridColumn = "1 / 3"
|
|
214
|
+
gridRow = `${rowBase}`
|
|
215
|
+
} else if (positionInPattern === 1) {
|
|
216
|
+
gridColumn = "3"
|
|
217
|
+
gridRow = `${rowBase}`
|
|
218
|
+
} else if (positionInPattern === 2) {
|
|
219
|
+
gridColumn = "4"
|
|
220
|
+
gridRow = `${rowBase}`
|
|
221
|
+
} else if (positionInPattern === 3) {
|
|
222
|
+
gridColumn = "1"
|
|
223
|
+
gridRow = `${rowBase + 1}`
|
|
224
|
+
} else if (positionInPattern === 4) {
|
|
225
|
+
gridColumn = "2"
|
|
226
|
+
gridRow = `${rowBase + 1}`
|
|
227
|
+
} else if (positionInPattern === 5) {
|
|
228
|
+
gridColumn = "3 / 5"
|
|
229
|
+
gridRow = `${rowBase + 1}`
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Skip if position not set (shouldn't happen, but safety check)
|
|
233
|
+
if (!gridColumn || !gridRow) {
|
|
234
|
+
return null
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Get metadata
|
|
238
|
+
const metadata = (category as any)?.metadata || {}
|
|
239
|
+
const categoryImage = metadata.category_image || null
|
|
240
|
+
const backgroundColor = metadata.category_background_color || "#F3F4F6"
|
|
241
|
+
const showShopNow = metadata.show_shop_now === "true" || metadata.show_shop_now === true
|
|
242
|
+
|
|
243
|
+
// Get parent category name as subtitle
|
|
244
|
+
const parentCategory = (category as any)?.parent_category
|
|
245
|
+
const subtitle = parentCategory?.name || ""
|
|
246
|
+
|
|
247
|
+
// Get subcategory name as main title (in uppercase)
|
|
248
|
+
const mainTitle = (category.name || "").toUpperCase()
|
|
249
|
+
|
|
250
|
+
// Build category URL - use store page with category filter
|
|
251
|
+
const categoryUrl = category.id
|
|
252
|
+
? `/store?category=${category.id}`
|
|
253
|
+
: "#"
|
|
254
|
+
|
|
255
|
+
return (
|
|
256
|
+
<LocalizedClientLink
|
|
257
|
+
key={category.id}
|
|
258
|
+
href={categoryUrl}
|
|
259
|
+
data-ga-event="shop_by_category_click"
|
|
260
|
+
data-ga-label={category.name || "Category"}
|
|
261
|
+
data-ga-category-name={category.name || ""}
|
|
262
|
+
data-ga-category-handle={category.handle || ""}
|
|
263
|
+
data-ga-category-id={category.id || ""}
|
|
264
|
+
data-ga-parent-category={subtitle || ""}
|
|
265
|
+
className="relative rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col group w-full"
|
|
266
|
+
style={{
|
|
267
|
+
backgroundColor: backgroundColor,
|
|
268
|
+
gridColumn: gridColumn,
|
|
269
|
+
gridRow: gridRow,
|
|
270
|
+
minHeight: "300px",
|
|
271
|
+
}}
|
|
272
|
+
>
|
|
273
|
+
<div className="flex flex-col h-full p-4 sm:p-5 lg:p-6 pb-0 sm:pb-0 lg:pb-0 pointer-events-none">
|
|
274
|
+
{/* Category Title */}
|
|
275
|
+
<div className="mb-3 lg:mb-4">
|
|
276
|
+
{subtitle && (
|
|
277
|
+
<p className="text-xs sm:text-sm text-gray-700 mb-1">{subtitle}</p>
|
|
278
|
+
)}
|
|
279
|
+
<h3 className="text-lg sm:text-xl lg:text-2xl font-bold text-gray-900">
|
|
280
|
+
{mainTitle}
|
|
281
|
+
</h3>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
{/* Category Image */}
|
|
285
|
+
<div className="flex-1 flex items-end justify-center relative" style={{ minHeight: 0 }}>
|
|
286
|
+
{categoryImage ? (
|
|
287
|
+
<div className="w-full h-full flex items-end justify-center">
|
|
288
|
+
<Image
|
|
289
|
+
src={categoryImage}
|
|
290
|
+
alt={category.name || "Category"}
|
|
291
|
+
fill
|
|
292
|
+
sizes="(max-width: 768px) 50vw, (max-width: 1024px) 33vw, 25vw"
|
|
293
|
+
className="object-contain object-bottom"
|
|
294
|
+
/>
|
|
295
|
+
</div>
|
|
296
|
+
) : (
|
|
297
|
+
<div className="w-full h-full flex items-end justify-center">
|
|
298
|
+
<PlaceholderImage size={110} />
|
|
299
|
+
</div>
|
|
300
|
+
)}
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
</LocalizedClientLink>
|
|
304
|
+
)
|
|
305
|
+
})}
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
{/* Mobile Layout - Below 768px */}
|
|
309
|
+
<style dangerouslySetInnerHTML={{
|
|
310
|
+
__html: `
|
|
311
|
+
@media (min-width: 350px) and (max-width: 767px) {
|
|
312
|
+
.shop-category-mobile-container {
|
|
313
|
+
grid-template-columns: repeat(2, 1fr) !important;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
@media (min-width: 350px) and (max-width: 450px) {
|
|
317
|
+
.shop-category-mobile-card {
|
|
318
|
+
aspect-ratio: 0.55 !important;
|
|
319
|
+
min-height: 210px !important;
|
|
320
|
+
height: 210px !important;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
@media (min-width: 450px) and (max-width: 550px) {
|
|
324
|
+
.shop-category-mobile-card {
|
|
325
|
+
aspect-ratio: 0.75 !important;
|
|
326
|
+
min-height: 250px !important;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
@media (min-width: 550px) and (max-width: 767px) {
|
|
330
|
+
.shop-category-mobile-card {
|
|
331
|
+
aspect-ratio: 0.80 !important;
|
|
332
|
+
min-height: 280px !important;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
`
|
|
336
|
+
}} />
|
|
337
|
+
<div
|
|
338
|
+
className="grid grid-cols-1 md:hidden gap-3 sm:gap-4 shop-category-mobile-container"
|
|
339
|
+
>
|
|
340
|
+
{finalDisplayCategories.map((category) => {
|
|
341
|
+
const metadata = (category as any)?.metadata || {}
|
|
342
|
+
const categoryImage = metadata.category_image || null
|
|
343
|
+
const backgroundColor = metadata.category_background_color || "#F3F4F6"
|
|
344
|
+
const showShopNow = metadata.show_shop_now === "true" || metadata.show_shop_now === true
|
|
345
|
+
|
|
346
|
+
const parentCategory = (category as any)?.parent_category
|
|
347
|
+
const subtitle = parentCategory?.name || ""
|
|
348
|
+
const mainTitle = (category.name || "").toUpperCase()
|
|
349
|
+
const categoryUrl = category.id
|
|
350
|
+
? `/store?category=${category.id}`
|
|
351
|
+
: "#"
|
|
352
|
+
|
|
353
|
+
return (
|
|
354
|
+
<LocalizedClientLink
|
|
355
|
+
key={category.id}
|
|
356
|
+
href={categoryUrl}
|
|
357
|
+
data-ga-event="shop_by_category_click"
|
|
358
|
+
data-ga-label={category.name || "Category"}
|
|
359
|
+
data-ga-category-name={category.name || ""}
|
|
360
|
+
data-ga-category-handle={category.handle || ""}
|
|
361
|
+
data-ga-category-id={category.id || ""}
|
|
362
|
+
data-ga-parent-category={subtitle || ""}
|
|
363
|
+
className="relative rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col group w-full shop-category-mobile-card"
|
|
364
|
+
style={{
|
|
365
|
+
backgroundColor: backgroundColor,
|
|
366
|
+
width: '100%',
|
|
367
|
+
aspectRatio: '0.85', // Default aspect ratio
|
|
368
|
+
minHeight: '300px',
|
|
369
|
+
}}
|
|
370
|
+
>
|
|
371
|
+
<div className="flex flex-col h-full p-4 sm:p-5 pb-0 sm:pb-0 pointer-events-none">
|
|
372
|
+
<div className="mb-3">
|
|
373
|
+
{subtitle && (
|
|
374
|
+
<p className="text-xs sm:text-sm text-gray-700 mb-1">{subtitle}</p>
|
|
375
|
+
)}
|
|
376
|
+
<h3 className="text-lg sm:text-xl font-bold text-gray-900">
|
|
377
|
+
{mainTitle}
|
|
378
|
+
</h3>
|
|
379
|
+
</div>
|
|
380
|
+
<div className="flex-1 flex items-end justify-center relative" style={{ minHeight: 0 }}>
|
|
381
|
+
{categoryImage ? (
|
|
382
|
+
<div className="w-full h-full flex items-end justify-center">
|
|
383
|
+
<Image
|
|
384
|
+
src={categoryImage}
|
|
385
|
+
alt={category.name || "Category"}
|
|
386
|
+
fill
|
|
387
|
+
sizes="(max-width: 768px) 50vw, (max-width: 1024px) 33vw, 25vw"
|
|
388
|
+
className="object-contain object-bottom"
|
|
389
|
+
/>
|
|
390
|
+
</div>
|
|
391
|
+
) : (
|
|
392
|
+
<div className="w-full h-full flex items-end justify-center">
|
|
393
|
+
<PlaceholderImage size={120} />
|
|
394
|
+
</div>
|
|
395
|
+
)}
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</LocalizedClientLink>
|
|
399
|
+
)
|
|
400
|
+
})}
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
)
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export default ShopByCategory
|
|
409
|
+
|