@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,62 @@
|
|
|
1
|
+
import Image from "next/image"
|
|
2
|
+
import type { WhyChooseUsBlockData } from "@core/types/home"
|
|
3
|
+
import { colorClasses } from "@theme/tokens"
|
|
4
|
+
|
|
5
|
+
const WhyChooseUs = ({ title, features }: WhyChooseUsBlockData) => {
|
|
6
|
+
if (features.length === 0) {
|
|
7
|
+
return null
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className={`w-full py-8 sm:py-12 md:py-14 lg:py-16 ${colorClasses.pageBg}`}>
|
|
12
|
+
<div className="w-full px-4 sm:px-6 md:px-8 lg:px-12 xl:px-16">
|
|
13
|
+
<div className="max-w-[1440px] mx-auto">
|
|
14
|
+
<h2 className="text-xl sm:text-2xl md:text-2xl lg:text-3xl font-bold text-center mb-6 sm:mb-8 md:mb-10 lg:mb-12 text-gray-900">
|
|
15
|
+
{title}
|
|
16
|
+
</h2>
|
|
17
|
+
<style
|
|
18
|
+
dangerouslySetInnerHTML={{
|
|
19
|
+
__html: `
|
|
20
|
+
@media (max-width: 449px) {
|
|
21
|
+
.why-choose-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 0.5rem !important; }
|
|
22
|
+
.why-choose-icon { width: 45px !important; height: 45px !important; }
|
|
23
|
+
.why-choose-text-scroll { font-size: 8.5px !important; }
|
|
24
|
+
}
|
|
25
|
+
@media (min-width: 450px) {
|
|
26
|
+
.why-choose-grid { grid-template-columns: repeat(4, 1fr) !important; }
|
|
27
|
+
.why-choose-icon { width: 60px !important; height: 60px !important; }
|
|
28
|
+
}
|
|
29
|
+
@media (min-width: 550px) { .why-choose-icon { width: 70px !important; height: 70px !important; } }
|
|
30
|
+
@media (min-width: 640px) { .why-choose-icon { width: 75px !important; height: 75px !important; } }
|
|
31
|
+
@media (min-width: 768px) { .why-choose-icon { width: 85px !important; height: 85px !important; } }
|
|
32
|
+
`,
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
<div className="grid grid-cols-4 sm:grid-cols-4 why-choose-grid gap-3 sm:gap-4 md:gap-6 lg:gap-8 xl:gap-12 2xl:gap-16 justify-items-center">
|
|
36
|
+
{features.map((feature, index) => (
|
|
37
|
+
<div
|
|
38
|
+
key={`${feature.name}-${index}`}
|
|
39
|
+
className="flex flex-col items-center group w-full max-w-[160px] sm:max-w-[180px] md:max-w-[200px] lg:max-w-[220px]"
|
|
40
|
+
>
|
|
41
|
+
<div className="relative w-[60px] h-[60px] sm:w-[75px] sm:h-[75px] md:w-[85px] md:h-[85px] lg:w-[95px] lg:h-[95px] xl:w-[105px] xl:h-[105px] 2xl:w-[120px] 2xl:h-[120px] mb-2 sm:mb-3 md:mb-4 why-choose-icon">
|
|
42
|
+
<Image
|
|
43
|
+
src={feature.icon}
|
|
44
|
+
alt={feature.name}
|
|
45
|
+
width={120}
|
|
46
|
+
height={120}
|
|
47
|
+
className="w-full h-full object-contain"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
<h3 className="text-[10px] xs:text-xs sm:text-sm md:text-base lg:text-lg font-semibold text-gray-900 text-center leading-tight px-1 why-choose-text-scroll">
|
|
51
|
+
{feature.name}
|
|
52
|
+
</h3>
|
|
53
|
+
</div>
|
|
54
|
+
))}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default WhyChooseUs
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react"
|
|
2
|
+
import { colorClasses } from "@theme/tokens"
|
|
3
|
+
|
|
4
|
+
type MainLayoutShellProps = {
|
|
5
|
+
children: ReactNode
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function MainLayoutShell({ children }: MainLayoutShellProps) {
|
|
9
|
+
return (
|
|
10
|
+
<main className={`${colorClasses.pageBg} min-h-screen w-full`}>
|
|
11
|
+
{children}
|
|
12
|
+
</main>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Button as MedusaButton } from "@medusajs/ui"
|
|
2
|
+
import { clx } from "@medusajs/ui"
|
|
3
|
+
import type { ComponentProps } from "react"
|
|
4
|
+
|
|
5
|
+
type ButtonProps = ComponentProps<typeof MedusaButton> & {
|
|
6
|
+
variant?: "primary" | "secondary" | "ghost"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const variantClasses: Record<NonNullable<ButtonProps["variant"]>, string> = {
|
|
10
|
+
primary:
|
|
11
|
+
"bg-brand-accent hover:bg-brand-accent-hover text-white rounded-full font-bold shadow-sm",
|
|
12
|
+
secondary:
|
|
13
|
+
"bg-white border border-brand-accent text-brand-accent rounded-full font-semibold",
|
|
14
|
+
ghost: "bg-transparent text-gray-700 hover:bg-gray-50 rounded-lg",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function Button({
|
|
18
|
+
variant = "primary",
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
...props
|
|
22
|
+
}: ButtonProps) {
|
|
23
|
+
return (
|
|
24
|
+
<MedusaButton className={clx(variantClasses[variant], className)} {...props}>
|
|
25
|
+
{children}
|
|
26
|
+
</MedusaButton>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { clx } from "@medusajs/ui"
|
|
2
|
+
import type { HTMLAttributes } from "react"
|
|
3
|
+
|
|
4
|
+
type CardProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
padding?: "sm" | "md" | "lg"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const paddingClasses = {
|
|
9
|
+
sm: "p-4",
|
|
10
|
+
md: "p-6",
|
|
11
|
+
lg: "p-8",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function Card({
|
|
15
|
+
padding = "md",
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}: CardProps) {
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
className={clx(
|
|
23
|
+
"rounded-xl bg-white border border-gray-100 shadow-sm",
|
|
24
|
+
paddingClasses[padding],
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
{...props}
|
|
28
|
+
>
|
|
29
|
+
{children}
|
|
30
|
+
</div>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@pradip1995/commerce-auth/components/forgot-password"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@pradip1995/commerce-auth/components/login"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
|
|
5
|
+
import { LOGIN_VIEW } from "@core/types/account"
|
|
6
|
+
import type { AccountPageData } from "@core/types/account"
|
|
7
|
+
import Login from "@theme/slots/account/Login"
|
|
8
|
+
import Register from "@theme/slots/account/Register"
|
|
9
|
+
import ForgotPassword from "@theme/slots/account/ForgotPassword"
|
|
10
|
+
import { colorClasses } from "@theme/tokens"
|
|
11
|
+
|
|
12
|
+
type LoginTemplateProps = Pick<AccountPageData, "countryCode">
|
|
13
|
+
|
|
14
|
+
export default function LoginTemplate(_props: LoginTemplateProps) {
|
|
15
|
+
const [currentView, setCurrentView] = useState(LOGIN_VIEW.SIGN_IN)
|
|
16
|
+
|
|
17
|
+
const renderView = () => {
|
|
18
|
+
switch (currentView) {
|
|
19
|
+
case LOGIN_VIEW.REGISTER:
|
|
20
|
+
return <Register setCurrentView={setCurrentView} />
|
|
21
|
+
case LOGIN_VIEW.FORGOT_PASSWORD:
|
|
22
|
+
return <ForgotPassword setCurrentView={setCurrentView} />
|
|
23
|
+
default:
|
|
24
|
+
return <Login setCurrentView={setCurrentView} />
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className={`min-h-screen w-full flex flex-col ${colorClasses.pageBg}`}>
|
|
30
|
+
<div className="flex-1 flex flex-col items-center justify-start px-2 min-[340px]:px-3 min-[550px]:px-4 sm:px-6 md:px-8 pt-2 min-[340px]:pt-3 min-[550px]:pt-4 sm:pt-4 md:pt-6 pb-6 min-[340px]:pb-8 min-[550px]:pb-8 sm:pb-8 md:pb-8">
|
|
31
|
+
<h1 className="text-2xl min-[340px]:text-3xl min-[550px]:text-3xl sm:text-4xl md:text-4xl font-bold text-heading mb-4 min-[340px]:mb-6 min-[550px]:mb-8 sm:mb-8 md:mb-8 text-center">
|
|
32
|
+
My Account
|
|
33
|
+
</h1>
|
|
34
|
+
|
|
35
|
+
<div
|
|
36
|
+
className={`w-full ${colorClasses.pageBg} rounded-2xl shadow-lg p-4 min-[340px]:p-5 min-[550px]:p-6 sm:p-7 md:p-8`}
|
|
37
|
+
style={{ maxWidth: "560px" }}
|
|
38
|
+
>
|
|
39
|
+
{renderView()}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@pradip1995/commerce-auth/components/register"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpTypes } from "@medusajs/types"
|
|
2
|
+
import CartItemCard from "@modules/cart/components/cart-item-card"
|
|
3
|
+
|
|
4
|
+
export type CartItemSlotProps = {
|
|
5
|
+
item: HttpTypes.StoreCartLineItem
|
|
6
|
+
currencyCode: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function CartItem({ item, currencyCode }: CartItemSlotProps) {
|
|
10
|
+
return <CartItemCard item={item} currencyCode={currencyCode} />
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HttpTypes } from "@medusajs/types"
|
|
2
|
+
import Summary from "@modules/cart/templates/summary"
|
|
3
|
+
|
|
4
|
+
export type CartSummarySlotProps = {
|
|
5
|
+
cart: HttpTypes.StoreCart & {
|
|
6
|
+
promotions: HttpTypes.StorePromotion[]
|
|
7
|
+
}
|
|
8
|
+
customer: HttpTypes.StoreCustomer | null
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function CartSummary({ cart, customer }: CartSummarySlotProps) {
|
|
12
|
+
return <Summary cart={cart} customer={customer} />
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@modules/checkout/templates/checkout-form"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@modules/checkout/templates/checkout-summary"
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { FooterSlotData } from "@core/types/layout"
|
|
2
|
+
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
|
3
|
+
import FooterNewsletter from "@modules/layout/components/footer-newsletter"
|
|
4
|
+
|
|
5
|
+
const COMPANY_LINKS = [
|
|
6
|
+
{ href: "/", label: "Home" },
|
|
7
|
+
{ href: "/store", label: "Shop" },
|
|
8
|
+
{ href: "/blog", label: "Blog" },
|
|
9
|
+
{ href: "/contact", label: "Contact" },
|
|
10
|
+
{ href: "/help", label: "Help" },
|
|
11
|
+
{ href: "/privacy-policy", label: "Privacy Policy" },
|
|
12
|
+
{ href: "/terms-of-use", label: "Terms of Use" },
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
export default function Footer({ categories }: FooterSlotData) {
|
|
16
|
+
return (
|
|
17
|
+
<footer className="bg-brand-footer text-[var(--color-text-inverse)] mt-auto">
|
|
18
|
+
<div
|
|
19
|
+
className="mx-auto px-4 sm:px-6 lg:px-8 py-12 lg:py-16"
|
|
20
|
+
style={{ maxWidth: "var(--container-max)" }}
|
|
21
|
+
>
|
|
22
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-10 lg:gap-12">
|
|
23
|
+
<div className="sm:col-span-2 lg:col-span-1">
|
|
24
|
+
<p className="text-lg font-heading font-bold uppercase tracking-[var(--letter-spacing-nav)] mb-4">
|
|
25
|
+
Valero
|
|
26
|
+
</p>
|
|
27
|
+
<p className="text-sm text-white/70 leading-relaxed max-w-xs">
|
|
28
|
+
Premium fashion with bold promotions. Shop the latest collections
|
|
29
|
+
with fast delivery and easy returns.
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div>
|
|
34
|
+
<h3 className="text-xs font-semibold uppercase tracking-[var(--letter-spacing-nav)] mb-4 text-white/90">
|
|
35
|
+
Shop
|
|
36
|
+
</h3>
|
|
37
|
+
<ul className="space-y-2.5">
|
|
38
|
+
{(categories?.slice(0, 6) ?? []).map((cat) => (
|
|
39
|
+
<li key={cat.id}>
|
|
40
|
+
<LocalizedClientLink
|
|
41
|
+
href={`/store?category=${cat.id}`}
|
|
42
|
+
className="text-sm text-white/70 hover:text-white transition-colors"
|
|
43
|
+
>
|
|
44
|
+
{cat.name}
|
|
45
|
+
</LocalizedClientLink>
|
|
46
|
+
</li>
|
|
47
|
+
))}
|
|
48
|
+
{!categories?.length && (
|
|
49
|
+
<li>
|
|
50
|
+
<LocalizedClientLink
|
|
51
|
+
href="/store"
|
|
52
|
+
className="text-sm text-white/70 hover:text-white transition-colors"
|
|
53
|
+
>
|
|
54
|
+
All products
|
|
55
|
+
</LocalizedClientLink>
|
|
56
|
+
</li>
|
|
57
|
+
)}
|
|
58
|
+
</ul>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div>
|
|
62
|
+
<h3 className="text-xs font-semibold uppercase tracking-[var(--letter-spacing-nav)] mb-4 text-white/90">
|
|
63
|
+
Company
|
|
64
|
+
</h3>
|
|
65
|
+
<ul className="space-y-2.5">
|
|
66
|
+
{COMPANY_LINKS.map((link) => (
|
|
67
|
+
<li key={link.href}>
|
|
68
|
+
<LocalizedClientLink
|
|
69
|
+
href={link.href}
|
|
70
|
+
className="text-sm text-white/70 hover:text-white transition-colors"
|
|
71
|
+
>
|
|
72
|
+
{link.label}
|
|
73
|
+
</LocalizedClientLink>
|
|
74
|
+
</li>
|
|
75
|
+
))}
|
|
76
|
+
</ul>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div>
|
|
80
|
+
<h3 className="text-xs font-semibold uppercase tracking-[var(--letter-spacing-nav)] mb-4 text-white/90">
|
|
81
|
+
Newsletter
|
|
82
|
+
</h3>
|
|
83
|
+
<p className="text-sm text-white/70 mb-4">
|
|
84
|
+
Subscribe for exclusive offers and new arrivals.
|
|
85
|
+
</p>
|
|
86
|
+
<FooterNewsletter />
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div className="mt-12 pt-8 border-t border-white/10 flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-white/50">
|
|
91
|
+
<p>© {new Date().getFullYear()} Valero. All rights reserved.</p>
|
|
92
|
+
<div className="flex gap-6">
|
|
93
|
+
<LocalizedClientLink href="/privacy-policy" className="hover:text-white">
|
|
94
|
+
Privacy
|
|
95
|
+
</LocalizedClientLink>
|
|
96
|
+
<LocalizedClientLink href="/terms-of-use" className="hover:text-white">
|
|
97
|
+
Terms
|
|
98
|
+
</LocalizedClientLink>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</footer>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Suspense } from "react"
|
|
2
|
+
import { HttpTypes } from "@medusajs/types"
|
|
3
|
+
import type { NavSlotData } from "@core/types/layout"
|
|
4
|
+
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
|
5
|
+
import CartButton from "@modules/layout/components/cart-button"
|
|
6
|
+
import DynamicLogo from "@modules/layout/components/dynamic-logo"
|
|
7
|
+
import MobileMenu from "@modules/layout/components/mobile-menu"
|
|
8
|
+
import SearchPanel from "@modules/layout/components/search-panel"
|
|
9
|
+
import DesktopSearch, {
|
|
10
|
+
DesktopSearchIcon,
|
|
11
|
+
} from "@modules/layout/components/desktop-search"
|
|
12
|
+
import AccountDropdown from "@modules/layout/components/account-dropdown"
|
|
13
|
+
|
|
14
|
+
const NAV_LINKS = [
|
|
15
|
+
{ href: "/", label: "Home" },
|
|
16
|
+
{ href: "/store", label: "Shop" },
|
|
17
|
+
{ href: "/contact", label: "Contact" },
|
|
18
|
+
{ href: "/help", label: "Help" },
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
export default function Nav({ currentLocale, customer }: NavSlotData) {
|
|
22
|
+
return (
|
|
23
|
+
<div className="sticky top-0 inset-x-0 z-50">
|
|
24
|
+
<header className="bg-[var(--color-header-bg)] border-b border-[var(--color-header-border)]">
|
|
25
|
+
<div
|
|
26
|
+
className="mx-auto px-4 sm:px-6 flex items-center justify-between gap-4"
|
|
27
|
+
style={{ maxWidth: "var(--container-max)", height: "var(--header-height)" }}
|
|
28
|
+
>
|
|
29
|
+
<div className="flex items-center gap-3 lg:hidden flex-shrink-0">
|
|
30
|
+
<MobileMenu
|
|
31
|
+
customer={customer}
|
|
32
|
+
countryCode={currentLocale || "in"}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div className="flex-shrink-0 lg:flex-1 lg:basis-0">
|
|
37
|
+
<DynamicLogo />
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<nav
|
|
41
|
+
className="hidden lg:flex items-center justify-center gap-8 xl:gap-10 flex-1"
|
|
42
|
+
aria-label="Main"
|
|
43
|
+
>
|
|
44
|
+
{NAV_LINKS.map((link) => (
|
|
45
|
+
<LocalizedClientLink
|
|
46
|
+
key={link.href}
|
|
47
|
+
href={link.href}
|
|
48
|
+
className="text-[11px] xl:text-xs font-semibold uppercase tracking-[var(--letter-spacing-nav)] text-heading hover:text-brand-accent transition-colors"
|
|
49
|
+
>
|
|
50
|
+
{link.label}
|
|
51
|
+
</LocalizedClientLink>
|
|
52
|
+
))}
|
|
53
|
+
</nav>
|
|
54
|
+
|
|
55
|
+
<DesktopSearch countryCode={currentLocale || "in"} hideNavLinks>
|
|
56
|
+
<div className="flex items-center justify-end gap-3 sm:gap-5 flex-shrink-0 lg:flex-1 lg:basis-0">
|
|
57
|
+
<div className="hidden lg:block">
|
|
58
|
+
<DesktopSearchIcon />
|
|
59
|
+
</div>
|
|
60
|
+
<div className="lg:hidden">
|
|
61
|
+
<SearchPanel countryCode={currentLocale || "in"} />
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
{!customer ? (
|
|
65
|
+
<LocalizedClientLink
|
|
66
|
+
href="/account"
|
|
67
|
+
className="hidden sm:inline-flex text-[11px] font-semibold uppercase tracking-[var(--letter-spacing-nav)] text-heading hover:opacity-70 transition-opacity"
|
|
68
|
+
data-testid="nav-login-link"
|
|
69
|
+
>
|
|
70
|
+
Account
|
|
71
|
+
</LocalizedClientLink>
|
|
72
|
+
) : (
|
|
73
|
+
<AccountDropdown customer={customer as HttpTypes.StoreCustomer} />
|
|
74
|
+
)}
|
|
75
|
+
|
|
76
|
+
<Suspense
|
|
77
|
+
fallback={
|
|
78
|
+
<LocalizedClientLink
|
|
79
|
+
href="/cart"
|
|
80
|
+
className="text-heading hover:opacity-70"
|
|
81
|
+
data-testid="nav-cart-link"
|
|
82
|
+
>
|
|
83
|
+
<span className="text-[11px] font-semibold uppercase tracking-[var(--letter-spacing-nav)]">
|
|
84
|
+
Bag
|
|
85
|
+
</span>
|
|
86
|
+
</LocalizedClientLink>
|
|
87
|
+
}
|
|
88
|
+
>
|
|
89
|
+
<CartButton />
|
|
90
|
+
</Suspense>
|
|
91
|
+
</div>
|
|
92
|
+
</DesktopSearch>
|
|
93
|
+
</div>
|
|
94
|
+
</header>
|
|
95
|
+
</div>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PromoBarSlotData } from "@core/types/layout"
|
|
2
|
+
import PromoBarContent from "./promo-bar-content"
|
|
3
|
+
|
|
4
|
+
export default function PromoBar({
|
|
5
|
+
text,
|
|
6
|
+
code,
|
|
7
|
+
value,
|
|
8
|
+
active,
|
|
9
|
+
}: PromoBarSlotData) {
|
|
10
|
+
if (!active || !text) {
|
|
11
|
+
return null
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="relative bg-brand-accent text-[var(--color-text-inverse)] text-center py-2.5 px-4 text-xs sm:text-sm font-medium tracking-[var(--letter-spacing-nav)] uppercase">
|
|
16
|
+
<PromoBarContent text={text} code={code} value={value} />
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import Link from "next/link"
|
|
5
|
+
import { Copy, Check } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
export default function PromoBarContent({ text, code: explicitCode, value: explicitValue }: { text: string; code: string | null; value: string | null }) {
|
|
8
|
+
const [copied, setCopied] = useState(false)
|
|
9
|
+
|
|
10
|
+
// Regex for code and value
|
|
11
|
+
const codeRegex = /\b[A-Z0-9]{4,}\b/;
|
|
12
|
+
const valueRegex = /(\d+%\s?(OFF)?)|([₹$]\d+)|(\d+\s?(Rs|₹|%|OFF))/gi;
|
|
13
|
+
|
|
14
|
+
let currentText = text;
|
|
15
|
+
let codeToCopy = explicitCode || "";
|
|
16
|
+
|
|
17
|
+
// Find code part
|
|
18
|
+
let codeMatch = explicitCode && currentText.includes(explicitCode)
|
|
19
|
+
? { text: explicitCode, index: currentText.indexOf(explicitCode) }
|
|
20
|
+
: null;
|
|
21
|
+
|
|
22
|
+
if (!codeMatch) {
|
|
23
|
+
const regMatch = currentText.match(codeRegex);
|
|
24
|
+
if (regMatch) {
|
|
25
|
+
codeMatch = { text: regMatch[0], index: regMatch.index! };
|
|
26
|
+
if (!explicitCode) codeToCopy = regMatch[0];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Find value part
|
|
31
|
+
let valueMatch = explicitValue && currentText.includes(explicitValue)
|
|
32
|
+
? { text: explicitValue, index: currentText.indexOf(explicitValue) }
|
|
33
|
+
: null;
|
|
34
|
+
|
|
35
|
+
if (!valueMatch) {
|
|
36
|
+
const regMatch = Array.from(currentText.matchAll(valueRegex));
|
|
37
|
+
if (regMatch.length > 0) {
|
|
38
|
+
const firstValue = regMatch[0];
|
|
39
|
+
valueMatch = { text: firstValue[0], index: firstValue.index! };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Handle priority: if explicitCode/explicitValue exist but not found in text,
|
|
44
|
+
// we replace the detected ones or append if none detected?
|
|
45
|
+
// User said "replace" essentially by saying priority.
|
|
46
|
+
|
|
47
|
+
// To render precisely, we need to collect all segments.
|
|
48
|
+
const segments: Array<{ text: string; type: 'text' | 'code' | 'value' }> = [];
|
|
49
|
+
let lastIndex = 0;
|
|
50
|
+
|
|
51
|
+
const matches = [
|
|
52
|
+
...(codeMatch ? [{ ...codeMatch, type: 'code' as const }] : []),
|
|
53
|
+
...(valueMatch ? [{ ...valueMatch, type: 'value' as const }] : [])
|
|
54
|
+
].sort((a, b) => a.index - b.index);
|
|
55
|
+
|
|
56
|
+
// Avoid overlaps
|
|
57
|
+
let filteredMatches: typeof matches = [];
|
|
58
|
+
let currentPos = 0;
|
|
59
|
+
for (const match of matches) {
|
|
60
|
+
if (match.index >= currentPos) {
|
|
61
|
+
filteredMatches.push(match);
|
|
62
|
+
currentPos = match.index + match.text.length;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
filteredMatches.forEach(match => {
|
|
67
|
+
if (match.index > lastIndex) {
|
|
68
|
+
segments.push({ text: currentText.substring(lastIndex, match.index), type: 'text' });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Use explicit values if they exist, even if the text match was different (Priority logic)
|
|
72
|
+
const displayText = match.type === 'code' ? (explicitCode || match.text) : (explicitValue || match.text);
|
|
73
|
+
segments.push({ text: displayText, type: match.type });
|
|
74
|
+
lastIndex = match.index + match.text.length;
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
if (lastIndex < currentText.length) {
|
|
78
|
+
segments.push({ text: currentText.substring(lastIndex), type: 'text' });
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Fallback for cases where no match was found but explicit values exist:
|
|
82
|
+
// (Optional: we could append them, but usually text should contain them)
|
|
83
|
+
|
|
84
|
+
const handleCopy = () => {
|
|
85
|
+
navigator.clipboard.writeText(codeToCopy || text)
|
|
86
|
+
setCopied(true)
|
|
87
|
+
setTimeout(() => setCopied(false), 2000)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<div className="max-w-[1440px] mx-auto w-full relative z-10 flex flex-row items-center justify-start lg:justify-center gap-x-4 text-center font-medium overflow-hidden whitespace-nowrap py-0.5">
|
|
92
|
+
{/* Visual Feedback Overlay for Copy Success - Mobile Only */}
|
|
93
|
+
{copied && (
|
|
94
|
+
<div className="absolute inset-0 z-50 flex sm:hidden items-center justify-center bg-promo-gradient animate-in fade-in zoom-in duration-200">
|
|
95
|
+
<span className="text-yellow-300 text-[11px] sm:text-[13px] font-extrabold tracking-wider uppercase flex items-center gap-2 drop-shadow-md">
|
|
96
|
+
PROMOCODE COPIED! APPLY AT CHECKOUT 🎁
|
|
97
|
+
</span>
|
|
98
|
+
</div>
|
|
99
|
+
)}
|
|
100
|
+
|
|
101
|
+
<div className="flex items-center lg:animate-none animate-marquee whitespace-nowrap min-w-full lg:min-w-0">
|
|
102
|
+
<button
|
|
103
|
+
onClick={handleCopy}
|
|
104
|
+
className="group/btn flex items-center justify-center gap-1.5 focus:outline-none flex-shrink-0"
|
|
105
|
+
title={codeToCopy ? `Click to copy promo code: ${codeToCopy}` : "Click to copy"}
|
|
106
|
+
>
|
|
107
|
+
{/* Main Content Segment */}
|
|
108
|
+
<div className="flex items-center gap-1.5 px-2 sm:px-0">
|
|
109
|
+
<span className="text-[11px] sm:text-[12.5px] font-bold tracking-[0.05em] uppercase drop-shadow-sm group-hover/btn:text-yellow-100 transition-colors flex items-center">
|
|
110
|
+
{segments.length > 0 ? segments.map((s, i) => (
|
|
111
|
+
s.type === 'text' ? (
|
|
112
|
+
<span key={i}>{s.text}</span>
|
|
113
|
+
) : (
|
|
114
|
+
<span key={i} className="text-yellow-300 text-[12px] sm:text-[13.5px] mx-1 font-extrabold shadow-sm group-hover/btn:text-yellow-200 transition-colors drop-shadow-md">
|
|
115
|
+
"{s.text}"
|
|
116
|
+
</span>
|
|
117
|
+
)
|
|
118
|
+
)) : text}
|
|
119
|
+
</span>
|
|
120
|
+
<span className="bg-white/20 p-1 rounded-md group-hover/btn:bg-white/30 transition-colors flex items-center justify-center flex-shrink-0 ml-1">
|
|
121
|
+
{copied ? (
|
|
122
|
+
<Check size={13} className="text-green-300" strokeWidth={3} />
|
|
123
|
+
) : (
|
|
124
|
+
<Copy size={13} className="text-white/80 group-hover/btn:text-white" strokeWidth={2.5} />
|
|
125
|
+
)}
|
|
126
|
+
</span>
|
|
127
|
+
</div>
|
|
128
|
+
</button>
|
|
129
|
+
|
|
130
|
+
<div className="mx-4 h-3 w-px bg-white/30 flex-shrink-0" />
|
|
131
|
+
|
|
132
|
+
<Link
|
|
133
|
+
href="/store"
|
|
134
|
+
className="text-[11px] sm:text-[12.5px] font-bold tracking-[0.02em] uppercase text-yellow-300 hover:text-white underline underline-offset-4 decoration-white/40 hover:decoration-white transition-all flex items-center group/link flex-shrink-0 mr-8 sm:mr-0"
|
|
135
|
+
>
|
|
136
|
+
SHOP NOW
|
|
137
|
+
<svg
|
|
138
|
+
className="ml-1 w-3 h-3 transform group-hover/link:translate-x-1 transition-transform"
|
|
139
|
+
fill="none"
|
|
140
|
+
viewBox="0 0 24 24"
|
|
141
|
+
stroke="currentColor"
|
|
142
|
+
>
|
|
143
|
+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={3} d="M9 5l7 7-7 7" />
|
|
144
|
+
</svg>
|
|
145
|
+
</Link>
|
|
146
|
+
|
|
147
|
+
{/* Duplicated Content for Seamless Loop on Mobile and Tablet */}
|
|
148
|
+
<div className="flex lg:hidden items-center gap-x-4">
|
|
149
|
+
<div className="mx-4 h-3 w-px bg-white/30 flex-shrink-0" />
|
|
150
|
+
<div className="flex items-center gap-1.5 px-2">
|
|
151
|
+
<span className="text-[11px] font-bold tracking-[0.05em] uppercase drop-shadow-sm flex items-center">
|
|
152
|
+
{segments.length > 0 ? segments.map((s, i) => (
|
|
153
|
+
s.type === 'text' ? (
|
|
154
|
+
<span key={i}>{s.text}</span>
|
|
155
|
+
) : (
|
|
156
|
+
<span key={i} className="text-yellow-300 text-[12px] mx-1 font-extrabold">
|
|
157
|
+
"{s.text}"
|
|
158
|
+
</span>
|
|
159
|
+
)
|
|
160
|
+
)) : text}
|
|
161
|
+
</span>
|
|
162
|
+
<span className="bg-white/20 p-1 rounded-md flex items-center justify-center flex-shrink-0 ml-1">
|
|
163
|
+
<Copy size={13} className="text-white/80" strokeWidth={2.5} />
|
|
164
|
+
</span>
|
|
165
|
+
</div>
|
|
166
|
+
<div className="mx-4 h-3 w-px bg-white/30 flex-shrink-0" />
|
|
167
|
+
<span className="text-[11px] font-bold tracking-[0.02em] uppercase text-yellow-300 flex items-center mr-8">
|
|
168
|
+
SHOP NOW
|
|
169
|
+
</span>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
)
|
|
174
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import OrderDetailsTemplate from "@modules/order/templates/order-details-template"
|
|
4
|
+
import type { HttpTypes } from "@medusajs/types"
|
|
5
|
+
|
|
6
|
+
type OrderDetailsProps = {
|
|
7
|
+
order: HttpTypes.StoreOrder
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function OrderDetails({ order }: OrderDetailsProps) {
|
|
11
|
+
return <OrderDetailsTemplate order={order} />
|
|
12
|
+
}
|