@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,30 @@
|
|
|
1
|
+
const SkeletonCartTotals = ({ header = true }) => {
|
|
2
|
+
return (
|
|
3
|
+
<div className="flex flex-col">
|
|
4
|
+
{header && <div className="w-32 h-4 bg-gray-100 mb-4"></div>}
|
|
5
|
+
<div className="flex items-center justify-between">
|
|
6
|
+
<div className="w-32 h-3 bg-gray-100"></div>
|
|
7
|
+
<div className="w-32 h-3 bg-gray-100"></div>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div className="flex items-center justify-between my-4">
|
|
11
|
+
<div className="w-24 h-3 bg-gray-100"></div>
|
|
12
|
+
<div className="w-24 h-3 bg-gray-100"></div>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div className="flex items-center justify-between">
|
|
16
|
+
<div className="w-28 h-3 bg-gray-100 "></div>
|
|
17
|
+
<div className="w-20 h-3 bg-gray-100"></div>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div className="w-full border-b border-gray-200 border-dashed my-4"></div>
|
|
21
|
+
|
|
22
|
+
<div className="flex items-center justify-between">
|
|
23
|
+
<div className="w-32 h-6 bg-gray-100 mb-4"></div>
|
|
24
|
+
<div className="w-24 h-6 bg-gray-100 mb-4"></div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default SkeletonCartTotals
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const SkeletonCodeForm = () => {
|
|
2
|
+
return (
|
|
3
|
+
<div className="w-full flex flex-col">
|
|
4
|
+
<div className="bg-gray-100 h-7 w-24 mb-4"></div>
|
|
5
|
+
<div className="grid grid-cols-[1fr_80px] gap-x-2">
|
|
6
|
+
<div className="bg-gray-100 h-12"></div>
|
|
7
|
+
<div className="bg-gray-100 h-12"></div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default SkeletonCodeForm
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Table } from "@medusajs/ui"
|
|
2
|
+
|
|
3
|
+
const SkeletonLineItem = () => {
|
|
4
|
+
return (
|
|
5
|
+
<Table.Row className="w-full m-4">
|
|
6
|
+
<Table.Cell className="p-4 w-24">
|
|
7
|
+
<div className="flex w-24 h-24 p-4 bg-gray-200 animate-pulse" />
|
|
8
|
+
</Table.Cell>
|
|
9
|
+
<Table.Cell className="text-left">
|
|
10
|
+
<div className="flex flex-col gap-y-2">
|
|
11
|
+
<div className="w-32 h-4 bg-gray-200 animate-pulse" />
|
|
12
|
+
<div className="w-24 h-4 bg-gray-200 animate-pulse" />
|
|
13
|
+
</div>
|
|
14
|
+
</Table.Cell>
|
|
15
|
+
<Table.Cell>
|
|
16
|
+
<div className="flex gap-2 items-center">
|
|
17
|
+
<div className="w-6 h-8 bg-gray-200 animate-pulse" />
|
|
18
|
+
<div className="w-14 h-10 bg-gray-200 animate-pulse" />
|
|
19
|
+
</div>
|
|
20
|
+
</Table.Cell>
|
|
21
|
+
<Table.Cell>
|
|
22
|
+
<div className="flex gap-2">
|
|
23
|
+
<div className="w-12 h-6 bg-gray-200 animate-pulse" />
|
|
24
|
+
</div>
|
|
25
|
+
</Table.Cell>
|
|
26
|
+
<Table.Cell>
|
|
27
|
+
<div className="flex gap-2 justify-end">
|
|
28
|
+
<div className="w-12 h-6 bg-gray-200 animate-pulse" />
|
|
29
|
+
</div>
|
|
30
|
+
</Table.Cell>
|
|
31
|
+
</Table.Row>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default SkeletonLineItem
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const SkeletonOrderConfirmedHeader = () => {
|
|
2
|
+
return (
|
|
3
|
+
<div className="flex flex-col gap-y-2 pb-10 animate-pulse">
|
|
4
|
+
<div className="w-2/5 h-4 bg-gray-100"></div>
|
|
5
|
+
<div className="w-3/6 h-6 bg-gray-100"></div>
|
|
6
|
+
<div className="flex gap-x-4">
|
|
7
|
+
<div className="w-16 h-4 bg-gray-100"></div>
|
|
8
|
+
<div className="w-12 h-4 bg-gray-100"></div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default SkeletonOrderConfirmedHeader
|
package/templates/storefront/src/modules/skeletons/components/skeleton-order-information/index.tsx
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import SkeletonCartTotals from "@modules/skeletons/components/skeleton-cart-totals"
|
|
2
|
+
|
|
3
|
+
const SkeletonOrderInformation = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div>
|
|
6
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 py-10 border-b border-gray-200">
|
|
7
|
+
<div className="flex flex-col">
|
|
8
|
+
<div className="w-32 h-4 bg-gray-100 mb-4"></div>
|
|
9
|
+
<div className="w-2/6 h-3 bg-gray-100"></div>
|
|
10
|
+
<div className="w-3/6 h-3 bg-gray-100 my-2"></div>
|
|
11
|
+
<div className="w-1/6 h-3 bg-gray-100"></div>
|
|
12
|
+
</div>
|
|
13
|
+
<div className="flex flex-col">
|
|
14
|
+
<div className="w-32 h-4 bg-gray-100 mb-4"></div>
|
|
15
|
+
<div className="w-2/6 h-3 bg-gray-100"></div>
|
|
16
|
+
<div className="w-3/6 h-3 bg-gray-100 my-2"></div>
|
|
17
|
+
<div className="w-2/6 h-3 bg-gray-100"></div>
|
|
18
|
+
<div className="w-1/6 h-3 bg-gray-100 mt-2"></div>
|
|
19
|
+
<div className="w-32 h-4 bg-gray-100 my-4"></div>
|
|
20
|
+
<div className="w-1/6 h-3 bg-gray-100"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 py-10">
|
|
24
|
+
<div className="flex flex-col">
|
|
25
|
+
<div className="w-32 h-4 bg-gray-100 mb-4"></div>
|
|
26
|
+
<div className="w-2/6 h-3 bg-gray-100"></div>
|
|
27
|
+
<div className="w-3/6 h-3 bg-gray-100 my-4"></div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<SkeletonCartTotals />
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default SkeletonOrderInformation
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const SkeletonOrderItems = () => {
|
|
2
|
+
return (
|
|
3
|
+
<div className="flex flex-col gap-y-4 py-10 border-y border-gray-200">
|
|
4
|
+
<div className="grid grid-cols-[122px_1fr] gap-x-4">
|
|
5
|
+
<div className="w-full aspect-[29/34] bg-gray-100"></div>
|
|
6
|
+
<div className="flex items-start justify-between">
|
|
7
|
+
<div className="flex flex-col gap-y-2">
|
|
8
|
+
<div className="w-48 h-6 bg-gray-100"></div>
|
|
9
|
+
<div className="w-24 h-4 bg-gray-100"></div>
|
|
10
|
+
<div className="w-32 h-4 bg-gray-100"></div>
|
|
11
|
+
</div>
|
|
12
|
+
<div className="w-32 h-6 bg-gray-100"></div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div className="grid grid-cols-[122px_1fr] gap-x-4">
|
|
17
|
+
<div className="w-full aspect-[29/34] bg-gray-100"></div>
|
|
18
|
+
<div className="flex items-start justify-between">
|
|
19
|
+
<div className="flex flex-col gap-y-2">
|
|
20
|
+
<div className="w-48 h-6 bg-gray-100"></div>
|
|
21
|
+
<div className="w-24 h-4 bg-gray-100"></div>
|
|
22
|
+
<div className="w-32 h-4 bg-gray-100"></div>
|
|
23
|
+
</div>
|
|
24
|
+
<div className="w-32 h-6 bg-gray-100"></div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div className="grid grid-cols-[122px_1fr] gap-x-4">
|
|
29
|
+
<div className="w-full aspect-[29/34] bg-gray-100"></div>
|
|
30
|
+
<div className="flex items-start justify-between">
|
|
31
|
+
<div className="flex flex-col gap-y-2">
|
|
32
|
+
<div className="w-48 h-6 bg-gray-100"></div>
|
|
33
|
+
<div className="w-24 h-4 bg-gray-100"></div>
|
|
34
|
+
<div className="w-32 h-4 bg-gray-100"></div>
|
|
35
|
+
</div>
|
|
36
|
+
<div className="w-32 h-6 bg-gray-100"></div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default SkeletonOrderItems
|
package/templates/storefront/src/modules/skeletons/components/skeleton-order-summary/index.tsx
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import SkeletonButton from "@modules/skeletons/components/skeleton-button"
|
|
2
|
+
import SkeletonCartTotals from "@modules/skeletons/components/skeleton-cart-totals"
|
|
3
|
+
|
|
4
|
+
const SkeletonOrderSummary = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="grid-cols-1">
|
|
7
|
+
<SkeletonCartTotals header={false} />
|
|
8
|
+
<div className="mt-4">
|
|
9
|
+
<SkeletonButton />
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default SkeletonOrderSummary
|
package/templates/storefront/src/modules/skeletons/components/skeleton-product-preview/index.tsx
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Container } from "@medusajs/ui"
|
|
2
|
+
|
|
3
|
+
const SkeletonProductPreview = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div className="animate-pulse">
|
|
6
|
+
<Container className="aspect-[9/16] w-full bg-gray-100 bg-ui-bg-subtle" />
|
|
7
|
+
<div className="flex justify-between text-base-regular mt-2">
|
|
8
|
+
<div className="w-2/5 h-6 bg-gray-100"></div>
|
|
9
|
+
<div className="w-1/5 h-6 bg-gray-100"></div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default SkeletonProductPreview
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Table } from "@medusajs/ui"
|
|
2
|
+
|
|
3
|
+
import repeat from "@core/util/repeat"
|
|
4
|
+
import SkeletonCartItem from "@modules/skeletons/components/skeleton-cart-item"
|
|
5
|
+
import SkeletonCodeForm from "@modules/skeletons/components/skeleton-code-form"
|
|
6
|
+
import SkeletonOrderSummary from "@modules/skeletons/components/skeleton-order-summary"
|
|
7
|
+
|
|
8
|
+
const SkeletonCartPage = () => {
|
|
9
|
+
return (
|
|
10
|
+
<div className="py-12">
|
|
11
|
+
<div className="content-container">
|
|
12
|
+
<div className="grid grid-cols-1 small:grid-cols-[1fr_360px] gap-x-40">
|
|
13
|
+
<div className="flex flex-col bg-white p-6 gap-y-6">
|
|
14
|
+
<div className="bg-white flex items-start justify-between">
|
|
15
|
+
<div className="flex flex-col gap-y-2">
|
|
16
|
+
<div className="w-60 h-8 bg-gray-200 animate-pulse" />
|
|
17
|
+
<div className="w-48 h-6 bg-gray-200 animate-pulse" />
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<div className="w-14 h-8 bg-gray-200 animate-pulse" />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<div className="pb-3 flex items-center">
|
|
25
|
+
<div className="w-20 h-12 bg-gray-200 animate-pulse" />
|
|
26
|
+
</div>
|
|
27
|
+
<Table>
|
|
28
|
+
<Table.Header className="border-t-0">
|
|
29
|
+
<Table.Row>
|
|
30
|
+
<Table.HeaderCell className="!pl-0">
|
|
31
|
+
<div className="w-10 h-6 bg-gray-200 animate-pulse" />
|
|
32
|
+
</Table.HeaderCell>
|
|
33
|
+
<Table.HeaderCell></Table.HeaderCell>
|
|
34
|
+
<Table.HeaderCell>
|
|
35
|
+
<div className="w-16 h-6 bg-gray-200 animate-pulse" />
|
|
36
|
+
</Table.HeaderCell>
|
|
37
|
+
<Table.HeaderCell>
|
|
38
|
+
<div className="w-12 h-6 bg-gray-200 animate-pulse" />
|
|
39
|
+
</Table.HeaderCell>
|
|
40
|
+
<Table.HeaderCell className="!pr-0">
|
|
41
|
+
<div className="flex justify-end">
|
|
42
|
+
<div className="w-12 h-6 bg-gray-200 animate-pulse" />
|
|
43
|
+
</div>
|
|
44
|
+
</Table.HeaderCell>
|
|
45
|
+
</Table.Row>
|
|
46
|
+
</Table.Header>
|
|
47
|
+
<Table.Body>
|
|
48
|
+
{repeat(4).map((index) => (
|
|
49
|
+
<SkeletonCartItem key={index} />
|
|
50
|
+
))}
|
|
51
|
+
</Table.Body>
|
|
52
|
+
</Table>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="flex flex-col gap-y-8">
|
|
56
|
+
<SkeletonOrderSummary />
|
|
57
|
+
<SkeletonCodeForm />
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default SkeletonCartPage
|
package/templates/storefront/src/modules/skeletons/templates/skeleton-order-confirmed/index.tsx
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import SkeletonOrderConfirmedHeader from "@modules/skeletons/components/skeleton-order-confirmed-header"
|
|
2
|
+
import SkeletonOrderInformation from "@modules/skeletons/components/skeleton-order-information"
|
|
3
|
+
import SkeletonOrderItems from "@modules/skeletons/components/skeleton-order-items"
|
|
4
|
+
|
|
5
|
+
const SkeletonOrderConfirmed = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div className="bg-gray-50 py-6 min-h-[calc(100vh-64px)] animate-pulse">
|
|
8
|
+
<div className="content-container flex justify-center">
|
|
9
|
+
<div className="max-w-4xl h-full bg-white w-full p-10">
|
|
10
|
+
<SkeletonOrderConfirmedHeader />
|
|
11
|
+
|
|
12
|
+
<SkeletonOrderItems />
|
|
13
|
+
|
|
14
|
+
<SkeletonOrderInformation />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default SkeletonOrderConfirmed
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import repeat from "@core/util/repeat"
|
|
2
|
+
import SkeletonProductPreview from "@modules/skeletons/components/skeleton-product-preview"
|
|
3
|
+
|
|
4
|
+
const SkeletonProductGrid = ({
|
|
5
|
+
numberOfProducts = 8,
|
|
6
|
+
}: {
|
|
7
|
+
numberOfProducts?: number
|
|
8
|
+
}) => {
|
|
9
|
+
return (
|
|
10
|
+
<ul
|
|
11
|
+
className="grid grid-cols-2 small:grid-cols-3 medium:grid-cols-4 gap-x-6 gap-y-8 flex-1"
|
|
12
|
+
data-testid="products-list-loader"
|
|
13
|
+
>
|
|
14
|
+
{repeat(numberOfProducts).map((index) => (
|
|
15
|
+
<li key={index}>
|
|
16
|
+
<SkeletonProductPreview />
|
|
17
|
+
</li>
|
|
18
|
+
))}
|
|
19
|
+
</ul>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default SkeletonProductGrid
|
package/templates/storefront/src/modules/skeletons/templates/skeleton-related-products/index.tsx
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import repeat from "@core/util/repeat"
|
|
2
|
+
import SkeletonProductPreview from "@modules/skeletons/components/skeleton-product-preview"
|
|
3
|
+
|
|
4
|
+
const SkeletonRelatedProducts = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="product-page-constraint">
|
|
7
|
+
<div className="flex flex-col gap-8 items-center text-center mb-8">
|
|
8
|
+
<div className="w-20 h-6 animate-pulse bg-gray-100"></div>
|
|
9
|
+
<div className="flex flex-col gap-4 items-center text-center mb-16">
|
|
10
|
+
<div className="w-96 h-10 animate-pulse bg-gray-100"></div>
|
|
11
|
+
<div className="w-48 h-10 animate-pulse bg-gray-100"></div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<ul className="grid grid-cols-2 small:grid-cols-3 medium:grid-cols-4 gap-x-6 gap-y-8 flex-1">
|
|
15
|
+
{repeat(3).map((index) => (
|
|
16
|
+
<li key={index}>
|
|
17
|
+
<SkeletonProductPreview />
|
|
18
|
+
</li>
|
|
19
|
+
))}
|
|
20
|
+
</ul>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default SkeletonRelatedProducts
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useProductListing } from "medusa-product-library"
|
|
4
|
+
import ProductCard from "@registry/components/product-card"
|
|
5
|
+
import { Pagination } from "@modules/store/components/pagination"
|
|
6
|
+
import StoreHeader from "@modules/store/components/store-header"
|
|
7
|
+
import { SortOptions } from "@modules/store/components/refinement-list/sort-products"
|
|
8
|
+
|
|
9
|
+
const PRODUCT_LIMIT = 12
|
|
10
|
+
|
|
11
|
+
export const ClientPaginatedProductsInner = ({
|
|
12
|
+
sortBy,
|
|
13
|
+
initialPage,
|
|
14
|
+
collectionId,
|
|
15
|
+
categoryId,
|
|
16
|
+
productsIds,
|
|
17
|
+
gender,
|
|
18
|
+
type,
|
|
19
|
+
material,
|
|
20
|
+
color,
|
|
21
|
+
min_price,
|
|
22
|
+
max_price,
|
|
23
|
+
q,
|
|
24
|
+
region,
|
|
25
|
+
}: {
|
|
26
|
+
sortBy?: string
|
|
27
|
+
initialPage?: number
|
|
28
|
+
collectionId?: string
|
|
29
|
+
categoryId?: string
|
|
30
|
+
productsIds?: string[]
|
|
31
|
+
gender?: string
|
|
32
|
+
type?: string
|
|
33
|
+
material?: string
|
|
34
|
+
color?: string
|
|
35
|
+
min_price?: string
|
|
36
|
+
max_price?: string
|
|
37
|
+
q?: string
|
|
38
|
+
region: any
|
|
39
|
+
}) => {
|
|
40
|
+
// ALL pagination state managed by library
|
|
41
|
+
const {
|
|
42
|
+
products,
|
|
43
|
+
count,
|
|
44
|
+
isLoading,
|
|
45
|
+
totalPages,
|
|
46
|
+
currentPage,
|
|
47
|
+
pageNumbers,
|
|
48
|
+
setPage,
|
|
49
|
+
hasNext,
|
|
50
|
+
hasPrev,
|
|
51
|
+
} = useProductListing({
|
|
52
|
+
sortBy,
|
|
53
|
+
initialPage: initialPage ?? 1,
|
|
54
|
+
limit: PRODUCT_LIMIT,
|
|
55
|
+
collectionId,
|
|
56
|
+
categoryId,
|
|
57
|
+
gender,
|
|
58
|
+
type,
|
|
59
|
+
material,
|
|
60
|
+
color,
|
|
61
|
+
minPrice: min_price,
|
|
62
|
+
maxPrice: max_price,
|
|
63
|
+
q,
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<>
|
|
68
|
+
<StoreHeader sortBy={(sortBy || "created_at") as SortOptions} productCount={count} q={q} />
|
|
69
|
+
{isLoading ? (
|
|
70
|
+
<div className="w-full flex justify-center py-20">
|
|
71
|
+
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900"></div>
|
|
72
|
+
</div>
|
|
73
|
+
) : (
|
|
74
|
+
<ul
|
|
75
|
+
className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6 lg:gap-8"
|
|
76
|
+
data-testid="products-list"
|
|
77
|
+
>
|
|
78
|
+
{products.map((p) => (
|
|
79
|
+
<li key={p.id} className="w-full min-w-0">
|
|
80
|
+
<ProductCard product={p as any} region={region} />
|
|
81
|
+
</li>
|
|
82
|
+
))}
|
|
83
|
+
</ul>
|
|
84
|
+
)}
|
|
85
|
+
{totalPages > 1 && (
|
|
86
|
+
<div className="mt-8">
|
|
87
|
+
{/* Chocomelon designs this Pagination UI, library provides the data */}
|
|
88
|
+
<Pagination
|
|
89
|
+
data-testid="product-pagination"
|
|
90
|
+
page={currentPage}
|
|
91
|
+
totalPages={totalPages}
|
|
92
|
+
pageNumbers={pageNumbers}
|
|
93
|
+
onPageChange={setPage}
|
|
94
|
+
hasNext={hasNext}
|
|
95
|
+
hasPrev={hasPrev}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
)}
|
|
99
|
+
</>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
export default function ClientPaginatedProducts(props: any) {
|
|
105
|
+
return (
|
|
106
|
+
<ClientPaginatedProductsInner {...props} />
|
|
107
|
+
)
|
|
108
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import React, { useState, useEffect } from "react"
|
|
4
|
+
import { useSearchParams } from "next/navigation"
|
|
5
|
+
import { clx } from "@medusajs/ui"
|
|
6
|
+
import RefinementList from "../refinement-list"
|
|
7
|
+
import { SortOptions } from "../refinement-list/sort-products"
|
|
8
|
+
import { HttpTypes } from "@medusajs/types"
|
|
9
|
+
|
|
10
|
+
type MobileFiltersProps = {
|
|
11
|
+
sortBy: SortOptions
|
|
12
|
+
collections?: HttpTypes.StoreCollection[]
|
|
13
|
+
collectionValue?: string | string[]
|
|
14
|
+
genderValue?: string | string[]
|
|
15
|
+
typeValue?: string | string[]
|
|
16
|
+
materialValue?: string | string[]
|
|
17
|
+
colorValue?: string | string[]
|
|
18
|
+
minPrice?: string
|
|
19
|
+
maxPrice?: string
|
|
20
|
+
genderOptions?: { value: string; label: string }[]
|
|
21
|
+
typeOptions?: { value: string; label: string }[]
|
|
22
|
+
materialOptions?: { value: string; label: string }[]
|
|
23
|
+
colorOptions?: { value: string; label: string }[]
|
|
24
|
+
hideMargin?: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const MobileFilters: React.FC<MobileFiltersProps> = ({ hideMargin, ...props }) => {
|
|
28
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
29
|
+
const searchParams = useSearchParams()
|
|
30
|
+
|
|
31
|
+
// Close panel when search params change (filter applied)
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
setIsOpen(false)
|
|
34
|
+
}, [searchParams])
|
|
35
|
+
|
|
36
|
+
// Prevent body scroll when panel is open
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (isOpen) {
|
|
39
|
+
document.body.style.overflow = "hidden"
|
|
40
|
+
} else {
|
|
41
|
+
document.body.style.overflow = "unset"
|
|
42
|
+
}
|
|
43
|
+
return () => {
|
|
44
|
+
document.body.style.overflow = "unset"
|
|
45
|
+
}
|
|
46
|
+
}, [isOpen])
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<div className={clx("lg:hidden w-full", !hideMargin && "mb-4")}>
|
|
50
|
+
{/* Filter Button */}
|
|
51
|
+
<button
|
|
52
|
+
onClick={() => setIsOpen(true)}
|
|
53
|
+
className="flex items-center justify-center gap-x-2 bg-white border border-gray-200 px-8 py-1.5 rounded-full shadow-[0_2px_10px_-4px_rgba(0,0,0,0.1)] hover:bg-gray-50 transition-all active:scale-95 w-full min-[450px]:w-auto"
|
|
54
|
+
data-ga-event="mobile_filter_open_click"
|
|
55
|
+
data-ga-label="Open Filters"
|
|
56
|
+
>
|
|
57
|
+
<svg
|
|
58
|
+
width="18"
|
|
59
|
+
height="18"
|
|
60
|
+
viewBox="0 0 24 24"
|
|
61
|
+
fill="none"
|
|
62
|
+
stroke="currentColor"
|
|
63
|
+
strokeWidth="2.5"
|
|
64
|
+
strokeLinecap="round"
|
|
65
|
+
strokeLinejoin="round"
|
|
66
|
+
className="text-[#8B5AB1]"
|
|
67
|
+
>
|
|
68
|
+
<line x1="4" y1="21" x2="4" y2="14" />
|
|
69
|
+
<line x1="4" y1="10" x2="4" y2="3" />
|
|
70
|
+
<line x1="12" y1="21" x2="12" y2="12" />
|
|
71
|
+
<line x1="12" y1="8" x2="12" y2="3" />
|
|
72
|
+
<line x1="20" y1="21" x2="20" y2="16" />
|
|
73
|
+
<line x1="20" y1="12" x2="20" y2="3" />
|
|
74
|
+
<line x1="1" y1="14" x2="7" y2="14" />
|
|
75
|
+
<line x1="9" y1="8" x2="15" y2="8" />
|
|
76
|
+
<line x1="17" y1="16" x2="23" y2="16" />
|
|
77
|
+
</svg>
|
|
78
|
+
<span className="text-sm font-bold text-gray-900 uppercase tracking-wider">Filters</span>
|
|
79
|
+
</button>
|
|
80
|
+
|
|
81
|
+
{/* Backdrop */}
|
|
82
|
+
<div
|
|
83
|
+
className={clx(
|
|
84
|
+
"fixed inset-0 bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 z-[9999]",
|
|
85
|
+
isOpen ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"
|
|
86
|
+
)}
|
|
87
|
+
onClick={() => setIsOpen(false)}
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
{/* Left Side Panel */}
|
|
91
|
+
<div
|
|
92
|
+
className={clx(
|
|
93
|
+
"fixed top-0 left-0 h-full w-[280px] min-[400px]:w-[320px] bg-[#FFFAFE] shadow-2xl transition-transform duration-200 ease-in-out z-[10000] flex flex-col",
|
|
94
|
+
isOpen ? "translate-x-0" : "-translate-x-full"
|
|
95
|
+
)}
|
|
96
|
+
>
|
|
97
|
+
{/* Header */}
|
|
98
|
+
<div className="flex items-center justify-between p-5 border-b border-gray-100 bg-[#FFFAFE]">
|
|
99
|
+
<h2 className="text-lg font-bold text-gray-900 uppercase tracking-tight">Filters</h2>
|
|
100
|
+
<button
|
|
101
|
+
onClick={() => setIsOpen(false)}
|
|
102
|
+
className="p-2 hover:bg-gray-100 rounded-full transition-colors text-gray-500"
|
|
103
|
+
data-ga-event="mobile_filter_close_click"
|
|
104
|
+
data-ga-label="Close Filters"
|
|
105
|
+
>
|
|
106
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
|
107
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
108
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
109
|
+
</svg>
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
{/* Content */}
|
|
114
|
+
<div className="flex-1 overflow-y-auto custom-scrollbar-hidden p-0">
|
|
115
|
+
<style dangerouslySetInnerHTML={{
|
|
116
|
+
__html: `
|
|
117
|
+
.custom-scrollbar-hidden::-webkit-scrollbar {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
120
|
+
.custom-scrollbar-hidden {
|
|
121
|
+
-ms-overflow-style: none;
|
|
122
|
+
scrollbar-width: none;
|
|
123
|
+
}
|
|
124
|
+
`}} />
|
|
125
|
+
{/* We wrap RefinementList but we remove its shadow/border since it's already in a panel */}
|
|
126
|
+
<div className="p-0 [&>div]:shadow-none [&>div]:border-0 [&>div]:rounded-none">
|
|
127
|
+
<RefinementList {...props} hideTitle={true} />
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export default MobileFilters
|