@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
package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductCTASection.tsx
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useRouter } from "next/navigation"
|
|
4
|
+
import { HttpTypes } from "@medusajs/types"
|
|
5
|
+
import type { ProductOptions } from "@core/domain/product/variant-selection"
|
|
6
|
+
|
|
7
|
+
export type ProductCTASectionProps = {
|
|
8
|
+
product: HttpTypes.StoreProduct
|
|
9
|
+
selectedVariant?: HttpTypes.StoreProductVariant
|
|
10
|
+
options: ProductOptions
|
|
11
|
+
isValidVariant: boolean
|
|
12
|
+
disabled?: boolean
|
|
13
|
+
inStock: boolean
|
|
14
|
+
inventoryLimit: number | null
|
|
15
|
+
quantity: number
|
|
16
|
+
quantityInCart: number
|
|
17
|
+
variantInCart: HttpTypes.StoreCartLineItem | undefined
|
|
18
|
+
isAdding: boolean
|
|
19
|
+
isBuyingNow: boolean
|
|
20
|
+
showNotifyMessage: boolean
|
|
21
|
+
setShowNotifyMessage: (v: boolean) => void
|
|
22
|
+
handleAddToCart: () => void
|
|
23
|
+
handleBuyNow: () => void
|
|
24
|
+
handleIncreaseQuantity: () => void
|
|
25
|
+
handleDecreaseQuantity: () => void
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const btnBase =
|
|
29
|
+
"h-12 w-full flex items-center justify-center gap-2 text-sm font-semibold uppercase tracking-[var(--letter-spacing-nav)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
|
30
|
+
|
|
31
|
+
export function ProductCTASection(props: ProductCTASectionProps) {
|
|
32
|
+
const router = useRouter()
|
|
33
|
+
const {
|
|
34
|
+
product,
|
|
35
|
+
selectedVariant,
|
|
36
|
+
options,
|
|
37
|
+
isValidVariant,
|
|
38
|
+
disabled,
|
|
39
|
+
inStock,
|
|
40
|
+
inventoryLimit,
|
|
41
|
+
quantity,
|
|
42
|
+
quantityInCart,
|
|
43
|
+
variantInCart,
|
|
44
|
+
isAdding,
|
|
45
|
+
isBuyingNow,
|
|
46
|
+
showNotifyMessage,
|
|
47
|
+
setShowNotifyMessage,
|
|
48
|
+
handleAddToCart,
|
|
49
|
+
handleBuyNow,
|
|
50
|
+
handleIncreaseQuantity,
|
|
51
|
+
handleDecreaseQuantity,
|
|
52
|
+
} = props
|
|
53
|
+
|
|
54
|
+
if (!inStock && selectedVariant) {
|
|
55
|
+
return (
|
|
56
|
+
<div className="flex flex-col gap-4 w-full">
|
|
57
|
+
<p className="text-sm font-medium text-brand-sale uppercase tracking-[var(--letter-spacing-nav)]">
|
|
58
|
+
Sold out
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
{showNotifyMessage ? (
|
|
62
|
+
<div className="border border-[var(--color-header-border)] p-5 flex flex-col gap-3">
|
|
63
|
+
<p className="text-sm text-body">
|
|
64
|
+
We'll notify you when this item is back in stock.
|
|
65
|
+
</p>
|
|
66
|
+
<button
|
|
67
|
+
onClick={() => {
|
|
68
|
+
const relatedSection = document.getElementById("related-products")
|
|
69
|
+
if (relatedSection) {
|
|
70
|
+
relatedSection.scrollIntoView({ behavior: "smooth" })
|
|
71
|
+
} else {
|
|
72
|
+
router.push("/store")
|
|
73
|
+
}
|
|
74
|
+
}}
|
|
75
|
+
className="text-sm font-medium underline underline-offset-4 text-heading hover:opacity-70 w-fit"
|
|
76
|
+
>
|
|
77
|
+
Browse similar products
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
80
|
+
) : (
|
|
81
|
+
<button
|
|
82
|
+
onClick={() => setShowNotifyMessage(true)}
|
|
83
|
+
className={`${btnBase} bg-brand-accent text-inverse hover:bg-brand-accent-hover`}
|
|
84
|
+
>
|
|
85
|
+
Notify me when available
|
|
86
|
+
</button>
|
|
87
|
+
)}
|
|
88
|
+
</div>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<div className="flex flex-col gap-3 w-full">
|
|
94
|
+
{variantInCart ? (
|
|
95
|
+
<div className="flex flex-col gap-2">
|
|
96
|
+
<p className="text-[11px] font-semibold uppercase tracking-[var(--letter-spacing-nav)] text-[var(--color-text-muted)]">
|
|
97
|
+
In your bag ({variantInCart.quantity})
|
|
98
|
+
</p>
|
|
99
|
+
<div className="flex h-12 border border-brand-accent">
|
|
100
|
+
<button
|
|
101
|
+
onClick={handleDecreaseQuantity}
|
|
102
|
+
disabled={isAdding}
|
|
103
|
+
className="w-12 flex items-center justify-center hover:bg-surface-muted transition-colors disabled:opacity-50"
|
|
104
|
+
aria-label="Decrease quantity"
|
|
105
|
+
>
|
|
106
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
107
|
+
<line x1="5" y1="12" x2="19" y2="12" />
|
|
108
|
+
</svg>
|
|
109
|
+
</button>
|
|
110
|
+
<div className="flex-1 flex items-center justify-center text-sm font-semibold text-heading">
|
|
111
|
+
{variantInCart.quantity}
|
|
112
|
+
</div>
|
|
113
|
+
<button
|
|
114
|
+
onClick={handleIncreaseQuantity}
|
|
115
|
+
disabled={isAdding || !inStock}
|
|
116
|
+
className="w-12 flex items-center justify-center hover:bg-surface-muted transition-colors disabled:opacity-50"
|
|
117
|
+
aria-label="Increase quantity"
|
|
118
|
+
>
|
|
119
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
120
|
+
<line x1="12" y1="5" x2="12" y2="19" />
|
|
121
|
+
<line x1="5" y1="12" x2="19" y2="12" />
|
|
122
|
+
</svg>
|
|
123
|
+
</button>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
) : (
|
|
127
|
+
<button
|
|
128
|
+
onClick={handleAddToCart}
|
|
129
|
+
disabled={
|
|
130
|
+
!inStock ||
|
|
131
|
+
!!disabled ||
|
|
132
|
+
isAdding ||
|
|
133
|
+
isBuyingNow ||
|
|
134
|
+
(!isValidVariant && product.options?.every((opt) => options[opt.id]))
|
|
135
|
+
}
|
|
136
|
+
className={`${btnBase} bg-brand-accent text-inverse hover:bg-brand-accent-hover`}
|
|
137
|
+
data-testid="add-product-button"
|
|
138
|
+
data-ga-event="add_to_bag_click"
|
|
139
|
+
data-ga-label={product.title || "Product"}
|
|
140
|
+
>
|
|
141
|
+
{isAdding ? (
|
|
142
|
+
<Spinner />
|
|
143
|
+
) : (
|
|
144
|
+
<>
|
|
145
|
+
{!selectedVariant || !isValidVariant
|
|
146
|
+
? product.options?.every((opt) => options[opt.id])
|
|
147
|
+
? "Unavailable"
|
|
148
|
+
: "Select options"
|
|
149
|
+
: !inStock
|
|
150
|
+
? inventoryLimit !== null &&
|
|
151
|
+
inventoryLimit + quantityInCart > 0 &&
|
|
152
|
+
quantity > inventoryLimit
|
|
153
|
+
? inventoryLimit <= 0
|
|
154
|
+
? "Sold out"
|
|
155
|
+
: "Max quantity reached"
|
|
156
|
+
: "Sold out"
|
|
157
|
+
: `Add to cart${quantity > 1 ? ` (${quantity})` : ""}`}
|
|
158
|
+
</>
|
|
159
|
+
)}
|
|
160
|
+
</button>
|
|
161
|
+
)}
|
|
162
|
+
|
|
163
|
+
<button
|
|
164
|
+
onClick={handleBuyNow}
|
|
165
|
+
disabled={
|
|
166
|
+
!inStock ||
|
|
167
|
+
!!disabled ||
|
|
168
|
+
isAdding ||
|
|
169
|
+
isBuyingNow ||
|
|
170
|
+
(!isValidVariant && product.options?.every((opt) => options[opt.id]))
|
|
171
|
+
}
|
|
172
|
+
className={`${btnBase} border border-brand-accent text-heading bg-transparent hover:bg-surface-muted`}
|
|
173
|
+
>
|
|
174
|
+
{isBuyingNow ? <Spinner /> : "Buy it now"}
|
|
175
|
+
</button>
|
|
176
|
+
</div>
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function Spinner() {
|
|
181
|
+
return (
|
|
182
|
+
<svg className="animate-spin h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
183
|
+
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" />
|
|
184
|
+
<path
|
|
185
|
+
className="opacity-75"
|
|
186
|
+
fill="currentColor"
|
|
187
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
188
|
+
/>
|
|
189
|
+
</svg>
|
|
190
|
+
)
|
|
191
|
+
}
|
package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductDetailsSection.tsx
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import { HttpTypes } from "@medusajs/types"
|
|
5
|
+
import RatingsTab from "@modules/products/components/product-tabs/ratings-tab"
|
|
6
|
+
|
|
7
|
+
function AccordionItem({
|
|
8
|
+
title,
|
|
9
|
+
isOpen,
|
|
10
|
+
onToggle,
|
|
11
|
+
children,
|
|
12
|
+
}: {
|
|
13
|
+
title: string
|
|
14
|
+
isOpen: boolean
|
|
15
|
+
onToggle: () => void
|
|
16
|
+
children: React.ReactNode
|
|
17
|
+
}) {
|
|
18
|
+
return (
|
|
19
|
+
<div className="border-t border-[var(--color-header-border)]">
|
|
20
|
+
<button
|
|
21
|
+
onClick={onToggle}
|
|
22
|
+
className="flex items-center justify-between w-full py-4 text-left"
|
|
23
|
+
>
|
|
24
|
+
<h3 className="text-[11px] font-semibold text-heading uppercase tracking-[var(--letter-spacing-nav)]">
|
|
25
|
+
{title}
|
|
26
|
+
</h3>
|
|
27
|
+
<svg
|
|
28
|
+
width="14"
|
|
29
|
+
height="14"
|
|
30
|
+
viewBox="0 0 24 24"
|
|
31
|
+
fill="none"
|
|
32
|
+
stroke="currentColor"
|
|
33
|
+
strokeWidth="2"
|
|
34
|
+
className={`transition-transform text-heading ${isOpen ? "rotate-180" : ""}`}
|
|
35
|
+
>
|
|
36
|
+
<polyline points="6 9 12 15 18 9" />
|
|
37
|
+
</svg>
|
|
38
|
+
</button>
|
|
39
|
+
{isOpen && (
|
|
40
|
+
<div className="pb-5 text-sm text-body leading-relaxed">{children}</div>
|
|
41
|
+
)}
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function ProductDetailsSection({ product }: { product: HttpTypes.StoreProduct }) {
|
|
47
|
+
const [isDescriptionOpen, setIsDescriptionOpen] = useState(true)
|
|
48
|
+
const [isCareGuideOpen, setIsCareGuideOpen] = useState(false)
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className="mt-2">
|
|
52
|
+
{product.description && (
|
|
53
|
+
<AccordionItem
|
|
54
|
+
title="Description"
|
|
55
|
+
isOpen={isDescriptionOpen}
|
|
56
|
+
onToggle={() => setIsDescriptionOpen(!isDescriptionOpen)}
|
|
57
|
+
>
|
|
58
|
+
<div
|
|
59
|
+
className="mb-3 whitespace-pre-line"
|
|
60
|
+
dangerouslySetInnerHTML={{
|
|
61
|
+
__html: product.description
|
|
62
|
+
? product.description.replace(/\n/g, "<br />")
|
|
63
|
+
: "",
|
|
64
|
+
}}
|
|
65
|
+
/>
|
|
66
|
+
{(() => {
|
|
67
|
+
const features = product.metadata?.features
|
|
68
|
+
if (!features) return null
|
|
69
|
+
|
|
70
|
+
if (typeof features === "string") {
|
|
71
|
+
return (
|
|
72
|
+
<ul className="list-disc list-inside space-y-1">
|
|
73
|
+
{features.split(",").map((feature: string, index: number) => (
|
|
74
|
+
<li key={index}>{feature.trim()}</li>
|
|
75
|
+
))}
|
|
76
|
+
</ul>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (Array.isArray(features)) {
|
|
81
|
+
return (
|
|
82
|
+
<ul className="list-disc list-inside space-y-1">
|
|
83
|
+
{(features as string[]).map((feature: string, index: number) => (
|
|
84
|
+
<li key={index}>{feature}</li>
|
|
85
|
+
))}
|
|
86
|
+
</ul>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return null
|
|
91
|
+
})()}
|
|
92
|
+
</AccordionItem>
|
|
93
|
+
)}
|
|
94
|
+
|
|
95
|
+
{product.metadata?.care_guide && (
|
|
96
|
+
<AccordionItem
|
|
97
|
+
title="Care guide"
|
|
98
|
+
isOpen={isCareGuideOpen}
|
|
99
|
+
onToggle={() => setIsCareGuideOpen(!isCareGuideOpen)}
|
|
100
|
+
>
|
|
101
|
+
{(() => {
|
|
102
|
+
const careGuide = product.metadata.care_guide
|
|
103
|
+
if (!careGuide) return null
|
|
104
|
+
|
|
105
|
+
const careGuideStr =
|
|
106
|
+
typeof careGuide === "string" ? careGuide : String(careGuide)
|
|
107
|
+
|
|
108
|
+
const items = careGuideStr.includes(",")
|
|
109
|
+
? careGuideStr.split(",").map((item) => item.trim()).filter(Boolean)
|
|
110
|
+
: careGuideStr.includes("\n")
|
|
111
|
+
? careGuideStr.split("\n").map((item) => item.trim()).filter(Boolean)
|
|
112
|
+
: [careGuideStr]
|
|
113
|
+
|
|
114
|
+
if (items.length > 1) {
|
|
115
|
+
return (
|
|
116
|
+
<ul className="list-disc list-inside space-y-1">
|
|
117
|
+
{items.map((item: string, index: number) => (
|
|
118
|
+
<li key={index}>{item}</li>
|
|
119
|
+
))}
|
|
120
|
+
</ul>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return <p>{careGuideStr}</p>
|
|
125
|
+
})()}
|
|
126
|
+
</AccordionItem>
|
|
127
|
+
)}
|
|
128
|
+
|
|
129
|
+
<div className="border-t border-[var(--color-header-border)] py-4">
|
|
130
|
+
<h3 className="text-[11px] font-semibold text-heading uppercase tracking-[var(--letter-spacing-nav)] mb-4">
|
|
131
|
+
Reviews
|
|
132
|
+
</h3>
|
|
133
|
+
<RatingsTab product={product} />
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
)
|
|
137
|
+
}
|
package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductFeaturePanel.tsx
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import SidePanel from "@modules/common/components/side-panel"
|
|
4
|
+
|
|
5
|
+
type ProductFeaturePanelProps = {
|
|
6
|
+
activeFeature: string | null
|
|
7
|
+
onClose: () => void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function ProductFeaturePanel({ activeFeature, onClose }: ProductFeaturePanelProps) {
|
|
11
|
+
return (
|
|
12
|
+
<SidePanel
|
|
13
|
+
isOpen={!!activeFeature}
|
|
14
|
+
onClose={() => onClose()}
|
|
15
|
+
title={
|
|
16
|
+
activeFeature === 'return' ? '7 Days Easy Return' :
|
|
17
|
+
activeFeature === 'delivery' ? 'Fast Delivery' :
|
|
18
|
+
activeFeature === 'cod' ? 'Cash On Delivery' :
|
|
19
|
+
activeFeature === 'size_chart' ? 'Size Guide' : ''
|
|
20
|
+
}
|
|
21
|
+
>
|
|
22
|
+
{activeFeature === 'return' && (
|
|
23
|
+
<div className="space-y-6">
|
|
24
|
+
<div className="bg-purple-50 p-4 rounded-xl border border-purple-100">
|
|
25
|
+
<p className="text-sm text-purple-900 leading-relaxed font-medium">
|
|
26
|
+
We offer a hassle-free 7-day return policy for all our customers. If you're not satisfied with your purchase, we're here to help!
|
|
27
|
+
</p>
|
|
28
|
+
</div>
|
|
29
|
+
<div className="space-y-4">
|
|
30
|
+
<div className="flex gap-4">
|
|
31
|
+
<div className="w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center flex-shrink-0">
|
|
32
|
+
<span className="font-bold text-gray-700">1</span>
|
|
33
|
+
</div>
|
|
34
|
+
<div>
|
|
35
|
+
<h4 className="font-bold text-gray-900 mb-1">Unused Conditions</h4>
|
|
36
|
+
<p className="text-sm text-gray-600">Items must be returned in their original condition, unused, and with all tags intact.</p>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div className="flex gap-4">
|
|
40
|
+
<div className="w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center flex-shrink-0">
|
|
41
|
+
<span className="font-bold text-gray-700">2</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<h4 className="font-bold text-gray-900 mb-1">Easy Process</h4>
|
|
45
|
+
<p className="text-sm text-gray-600">Raise a return request from your account or contact our support team directly.</p>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div className="flex gap-4">
|
|
49
|
+
<div className="w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center flex-shrink-0">
|
|
50
|
+
<span className="font-bold text-gray-700">3</span>
|
|
51
|
+
</div>
|
|
52
|
+
<div>
|
|
53
|
+
<h4 className="font-bold text-gray-900 mb-1">Quick Refund</h4>
|
|
54
|
+
<p className="text-sm text-gray-600">Once the quality check is completed, your refund will be processed within 24–48 hours. The amount may take a few business days to reflect in your account depending on your bank.</p>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
{activeFeature === 'delivery' && (
|
|
62
|
+
<div className="space-y-6">
|
|
63
|
+
<div className="bg-blue-50 p-4 rounded-xl border border-blue-100">
|
|
64
|
+
<p className="text-sm text-blue-900 leading-relaxed font-medium">
|
|
65
|
+
We prioritize your excitement! Our fast delivery network ensures your order reaches you as soon as possible.
|
|
66
|
+
</p>
|
|
67
|
+
</div>
|
|
68
|
+
<div className="space-y-6">
|
|
69
|
+
<div>
|
|
70
|
+
<h4 className="font-bold text-gray-900 mb-2 flex items-center gap-2">
|
|
71
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-blue-500">
|
|
72
|
+
<path d="M12 2v20m10-10H2"></path>
|
|
73
|
+
</svg>
|
|
74
|
+
Order Processing
|
|
75
|
+
</h4>
|
|
76
|
+
<p className="text-sm text-gray-600 pl-7">Most orders are processed and dispatched within 24 hours of placement.</p>
|
|
77
|
+
</div>
|
|
78
|
+
<div>
|
|
79
|
+
<h4 className="font-bold text-gray-900 mb-2 flex items-center gap-2">
|
|
80
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-blue-500">
|
|
81
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
82
|
+
<polyline points="12 6 12 12 16 14"></polyline>
|
|
83
|
+
</svg>
|
|
84
|
+
Average Timelines
|
|
85
|
+
</h4>
|
|
86
|
+
<ul className="text-sm text-gray-600 pl-7 space-y-2 list-disc">
|
|
87
|
+
<li>Metro Cities: 2-3 business days</li>
|
|
88
|
+
<li>Tier 2 Cities: 4-5 business days</li>
|
|
89
|
+
<li>Rest of India: 5-7 business days</li>
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
<div>
|
|
93
|
+
<h4 className="font-bold text-gray-900 mb-2 flex items-center gap-2">
|
|
94
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="text-blue-500">
|
|
95
|
+
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path>
|
|
96
|
+
<circle cx="12" cy="10" r="3"></circle>
|
|
97
|
+
</svg>
|
|
98
|
+
Live Tracking
|
|
99
|
+
</h4>
|
|
100
|
+
<p className="text-sm text-gray-600 pl-7">You will receive a real-time tracking link via Email & WhatsApp once your order is shipped.</p>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
)}
|
|
105
|
+
|
|
106
|
+
{activeFeature === 'cod' && (
|
|
107
|
+
<div className="space-y-6">
|
|
108
|
+
<div className="bg-green-50 p-4 rounded-xl border border-green-100">
|
|
109
|
+
<p className="text-sm text-green-900 leading-relaxed font-medium">
|
|
110
|
+
Shop with confidence! Pay only when you receive your package at your doorstep.
|
|
111
|
+
</p>
|
|
112
|
+
</div>
|
|
113
|
+
<div className="space-y-5">
|
|
114
|
+
<div className="flex gap-4 p-4 bg-gray-50 rounded-lg">
|
|
115
|
+
<div className="w-10 h-10 flex items-center justify-center bg-page-bg rounded-lg shadow-sm flex-shrink-0">
|
|
116
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#22c55e" strokeWidth="2">
|
|
117
|
+
<rect x="2" y="5" width="20" height="14" rx="2"></rect>
|
|
118
|
+
<line x1="2" y1="10" x2="22" y2="10"></line>
|
|
119
|
+
</svg>
|
|
120
|
+
</div>
|
|
121
|
+
<div>
|
|
122
|
+
<h4 className="font-bold text-gray-900">Zero Upfront Cost</h4>
|
|
123
|
+
<p className="text-xs text-gray-500">No need for credit cards or online payments to place your order.</p>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div className="flex gap-4 p-4 bg-gray-50 rounded-lg">
|
|
127
|
+
<div className="w-10 h-10 flex items-center justify-center bg-page-bg rounded-lg shadow-sm flex-shrink-0">
|
|
128
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#22c55e" strokeWidth="2">
|
|
129
|
+
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
|
|
130
|
+
</svg>
|
|
131
|
+
</div>
|
|
132
|
+
<div>
|
|
133
|
+
<h4 className="font-bold text-gray-900">Safe & Secure</h4>
|
|
134
|
+
<p className="text-xs text-gray-500">Verify your package and then pay our delivery partner directly.</p>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<ul className="text-xs text-gray-500 italic space-y-1 pl-4 list-disc">
|
|
138
|
+
<li>Available for orders up to ₹10,000.</li>
|
|
139
|
+
<li>Please keep the exact change ready for a smoother experience.</li>
|
|
140
|
+
<li>Only cash payments are accepted for COD.</li>
|
|
141
|
+
</ul>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
)}
|
|
145
|
+
|
|
146
|
+
{activeFeature === 'size_chart' && (
|
|
147
|
+
<div className="flex flex-col h-full">
|
|
148
|
+
{/* Tip Section */}
|
|
149
|
+
<div className="mb-8 bg-gradient-to-r from-purple-50 to-page-bg p-4 rounded-xl border border-purple-100 flex gap-3 shadow-sm">
|
|
150
|
+
<div className="text-xl">💡</div>
|
|
151
|
+
<div className="flex-1">
|
|
152
|
+
<h4 className="text-purple-900 font-bold text-sm mb-1">Pro Tip</h4>
|
|
153
|
+
<p className="text-xs text-purple-700 leading-relaxed font-medium">
|
|
154
|
+
Kids grow fast! If your child is between sizes, we always recommend choosing the larger size for a longer-lasting fit.
|
|
155
|
+
</p>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div className="space-y-8">
|
|
160
|
+
{/* Infants Section */}
|
|
161
|
+
<div>
|
|
162
|
+
<div className="flex items-center gap-3 mb-4">
|
|
163
|
+
<div className="w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center text-brand-accent">
|
|
164
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
165
|
+
<circle cx="12" cy="12" r="10" />
|
|
166
|
+
<path d="M12 16v-4" />
|
|
167
|
+
<path d="M12 8h.01" />
|
|
168
|
+
</svg>
|
|
169
|
+
</div>
|
|
170
|
+
<h4 className="font-bold text-gray-900 text-base">Infants (0-24 Months)</h4>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div className="overflow-hidden rounded-xl border border-gray-100 shadow-sm">
|
|
174
|
+
<table className="w-full text-sm text-left border-collapse">
|
|
175
|
+
<thead>
|
|
176
|
+
<tr className="bg-gray-50 border-b border-gray-100">
|
|
177
|
+
<th className="p-4 font-bold text-gray-900 text-xs uppercase tracking-wider">Age</th>
|
|
178
|
+
<th className="p-4 font-bold text-gray-900 text-xs uppercase tracking-wider text-center">Height</th>
|
|
179
|
+
<th className="p-4 font-bold text-gray-900 text-xs uppercase tracking-wider text-center">Weight</th>
|
|
180
|
+
</tr>
|
|
181
|
+
</thead>
|
|
182
|
+
<tbody className="divide-y divide-gray-100 bg-page-bg">
|
|
183
|
+
{[
|
|
184
|
+
{ age: 'Newborn', h: '45 - 52 cm', w: '2.5 - 3.5 kg' },
|
|
185
|
+
{ age: '0-3 Months', h: '52 - 60 cm', w: '3.5 - 5.5 kg' },
|
|
186
|
+
{ age: '3-6 Months', h: '60 - 68 cm', w: '5.5 - 7.5 kg' },
|
|
187
|
+
{ age: '6-12 Months', h: '68 - 76 cm', w: '7.5 - 10 kg' },
|
|
188
|
+
{ age: '12-18 Months', h: '76 - 83 cm', w: '10 - 12 kg' },
|
|
189
|
+
{ age: '18-24 Months', h: '83 - 90 cm', w: '12 - 14 kg' },
|
|
190
|
+
].map((row, i) => (
|
|
191
|
+
<tr key={i} className="hover:bg-purple-50/30 transition-colors">
|
|
192
|
+
<td className="p-4 font-semibold text-gray-900">{row.age}</td>
|
|
193
|
+
<td className="p-4 text-center text-gray-600">{row.h}</td>
|
|
194
|
+
<td className="p-4 text-center text-gray-600 font-medium">{row.w}</td>
|
|
195
|
+
</tr>
|
|
196
|
+
))}
|
|
197
|
+
</tbody>
|
|
198
|
+
</table>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
{/* Toddlers Section */}
|
|
203
|
+
<div>
|
|
204
|
+
<div className="flex items-center gap-3 mb-4">
|
|
205
|
+
<div className="w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center text-brand-accent">
|
|
206
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
207
|
+
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
|
|
208
|
+
<circle cx="12" cy="7" r="4" />
|
|
209
|
+
</svg>
|
|
210
|
+
</div>
|
|
211
|
+
<h4 className="font-bold text-gray-900 text-base">Toddlers (2-6 Years)</h4>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div className="overflow-hidden rounded-xl border border-gray-100 shadow-sm">
|
|
215
|
+
<table className="w-full text-sm text-left border-collapse">
|
|
216
|
+
<thead>
|
|
217
|
+
<tr className="bg-gray-50 border-b border-gray-100">
|
|
218
|
+
<th className="p-4 font-bold text-gray-900 text-xs uppercase tracking-wider">Age</th>
|
|
219
|
+
<th className="p-4 font-bold text-gray-900 text-xs uppercase tracking-wider text-center">Height</th>
|
|
220
|
+
<th className="p-4 font-bold text-gray-900 text-xs uppercase tracking-wider text-center">Chest</th>
|
|
221
|
+
</tr>
|
|
222
|
+
</thead>
|
|
223
|
+
<tbody className="divide-y divide-gray-100 bg-page-bg">
|
|
224
|
+
{[
|
|
225
|
+
{ age: '2-3 Years', h: '90 - 98 cm', c: '52 - 54 cm' },
|
|
226
|
+
{ age: '3-4 Years', h: '98 - 104 cm', c: '54 - 56 cm' },
|
|
227
|
+
{ age: '4-5 Years', h: '104 - 110 cm', c: '56 - 58 cm' },
|
|
228
|
+
{ age: '5-6 Years', h: '110 - 116 cm', c: '58 - 60 cm' },
|
|
229
|
+
].map((row, i) => (
|
|
230
|
+
<tr key={i} className="hover:bg-purple-50/30 transition-colors">
|
|
231
|
+
<td className="p-4 font-semibold text-gray-900">{row.age}</td>
|
|
232
|
+
<td className="p-4 text-center text-gray-600">{row.h}</td>
|
|
233
|
+
<td className="p-4 text-center text-gray-600 font-medium">{row.c}</td>
|
|
234
|
+
</tr>
|
|
235
|
+
))}
|
|
236
|
+
</tbody>
|
|
237
|
+
</table>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
)}
|
|
243
|
+
</SidePanel>
|
|
244
|
+
)
|
|
245
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { clx } from "@medusajs/ui"
|
|
4
|
+
import { HttpTypes } from "@medusajs/types"
|
|
5
|
+
|
|
6
|
+
export function ProductHighlightsSection({ product }: { product: HttpTypes.StoreProduct }) {
|
|
7
|
+
return (
|
|
8
|
+
<div className="flex flex-col gap-6 py-10 border-t border-gray-100/80 animate-in fade-in slide-in-from-bottom-4 duration-700">
|
|
9
|
+
<div className="flex items-center gap-4">
|
|
10
|
+
<div className="w-1.5 h-8 rounded-full bg-gradient-to-b from-brand-accent to-[#A885C9]"></div>
|
|
11
|
+
<h3 className="text-sm sm:text-base font-black text-gray-800 uppercase tracking-[0.2em]">Product highlights</h3>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div className="grid grid-cols-2 gap-3 sm:gap-4 mt-2">
|
|
15
|
+
{(() => {
|
|
16
|
+
// Extract unique colors from variants/options instead of metadata
|
|
17
|
+
const colorOpt = product.options?.find(opt =>
|
|
18
|
+
opt.title?.toLowerCase().includes('color') ||
|
|
19
|
+
opt.title?.toLowerCase().includes('colour')
|
|
20
|
+
)
|
|
21
|
+
const variantColors = colorOpt?.values?.map(v => v.value).filter(Boolean) || []
|
|
22
|
+
const uniqueColors = Array.from(new Set(variantColors))
|
|
23
|
+
const colorValue = uniqueColors.length > 0 ? uniqueColors.join(', ') : null
|
|
24
|
+
|
|
25
|
+
const highlights = [
|
|
26
|
+
{ id: 'type', label: "Type", value: product.metadata?.product_type, icon: 'M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z' },
|
|
27
|
+
{ id: 'occasion', label: "Occasion", value: product.metadata?.occasion, icon: 'M19 21l-7-5-7 5V5a2 2 0 012-2h10a2 2 0 012 2z' },
|
|
28
|
+
{ id: 'material', label: "Material", value: product.metadata?.material, icon: 'M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5' },
|
|
29
|
+
{ id: 'gender', label: "Gender", value: product.metadata?.gender, icon: 'M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2M12 11a4 4 0 100-8 4 4 0 000 8z' },
|
|
30
|
+
{ id: 'color', label: "Available Colors", value: colorValue, icon: 'M12 2.25l-7.5 12.13a6.75 6.75 0 1015 0L12 2.25z' },
|
|
31
|
+
].filter(h => h.value)
|
|
32
|
+
|
|
33
|
+
return highlights.map((highlight) => (
|
|
34
|
+
<div
|
|
35
|
+
key={highlight.id}
|
|
36
|
+
className={clx(
|
|
37
|
+
"group flex items-center gap-3 sm:gap-4 p-3 sm:p-4 rounded-2xl bg-white border border-gray-100 shadow-[0_2px_10px_-4px_rgba(0,0,0,0.05)] hover:shadow-[0_10px_25px_-5px_rgba(29,78,216,0.15)] hover:border-purple-100 hover:-translate-y-1 transition-all duration-300",
|
|
38
|
+
highlight.id === 'color' && "col-span-2"
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
<div className="flex-shrink-0 w-10 h-10 sm:w-12 sm:h-12 rounded-xl bg-surface-muted flex items-center justify-center group-hover:bg-purple-50 transition-all duration-300 shadow-inner overflow-hidden">
|
|
42
|
+
{highlight.id === 'color' ? (
|
|
43
|
+
<svg width="28" height="28" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" className="transform group-hover:scale-110 transition-transform duration-300">
|
|
44
|
+
{/* Palette Body */}
|
|
45
|
+
<path d="M75 55c0 15-12 27-27 27S21 70 21 55s12-27 27-27 27 12 27 27z" fill="#E8B088" stroke="#333" strokeWidth="3" />
|
|
46
|
+
|
|
47
|
+
{/* Color Dots */}
|
|
48
|
+
<circle cx="40" cy="45" r="5" fill="#FF4D4D" stroke="#333" strokeWidth="1.5" /> {/* Red */}
|
|
49
|
+
<circle cx="56" cy="46" r="5" fill="#2ECC71" stroke="#333" strokeWidth="1.5" /> {/* Green */}
|
|
50
|
+
<circle cx="42" cy="62" r="5" fill="#3498DB" stroke="#333" strokeWidth="1.5" /> {/* Blue */}
|
|
51
|
+
<circle cx="58" cy="64" r="5" fill="#F06292" stroke="#333" strokeWidth="1.5" /> {/* Pink */}
|
|
52
|
+
|
|
53
|
+
{/* Brush */}
|
|
54
|
+
<g transform="rotate(25 70 40)">
|
|
55
|
+
<rect x="68" y="15" width="6" height="35" rx="3" fill="#F39C12" stroke="#333" strokeWidth="2" /> {/* Handle */}
|
|
56
|
+
<path d="M68 12c0-4 3-8 3-8s3 4 3 8H68z" fill="#AED6F1" stroke="#333" strokeWidth="2" /> {/* Tip */}
|
|
57
|
+
<rect x="68" y="45" width="6" height="4" fill="#BDC3C7" stroke="#333" strokeWidth="1.5" /> {/* Ferrule */}
|
|
58
|
+
</g>
|
|
59
|
+
</svg>
|
|
60
|
+
) : (
|
|
61
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" className="w-[18px] h-[18px] sm:w-5 sm:h-5 text-brand-accent">
|
|
62
|
+
<path d={highlight.icon} />
|
|
63
|
+
</svg>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
<div className="flex flex-col min-w-0 flex-1">
|
|
67
|
+
<span className="text-[9px] sm:text-[10px] font-black text-gray-800 uppercase tracking-widest mb-0.5 sm:mb-1">{highlight.label}</span>
|
|
68
|
+
<div className="flex items-center gap-2">
|
|
69
|
+
{highlight.id === 'color' ? (
|
|
70
|
+
<div className="flex flex-wrap gap-x-4 gap-y-1.5">
|
|
71
|
+
{String(highlight.value || '').split(/[,\s]+/).map((color, i) => {
|
|
72
|
+
const trimmedColor = color.trim().toLowerCase()
|
|
73
|
+
if (!trimmedColor) return null
|
|
74
|
+
return (
|
|
75
|
+
<div key={i} className="flex items-center gap-2">
|
|
76
|
+
<div
|
|
77
|
+
className="w-3.5 h-3.5 rounded-full border border-gray-100 shadow-sm"
|
|
78
|
+
style={{ backgroundColor: trimmedColor }}
|
|
79
|
+
/>
|
|
80
|
+
<span className="text-sm text-gray-800 font-semibold capitalize leading-none tracking-tight">{trimmedColor}</span>
|
|
81
|
+
</div>
|
|
82
|
+
)
|
|
83
|
+
})}
|
|
84
|
+
</div>
|
|
85
|
+
) : (
|
|
86
|
+
<span className="text-xs sm:text-sm text-gray-800 font-semibold capitalize tracking-tight truncate">
|
|
87
|
+
{String(highlight.value || '').replace(/_/g, ' ')}
|
|
88
|
+
</span>
|
|
89
|
+
)}
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
))
|
|
94
|
+
})()}
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
)
|
|
98
|
+
}
|