hey-pharmacist-ecommerce 1.1.17 → 1.1.18
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/dist/index.js +35 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ProductCard.tsx +28 -8
- package/src/components/QuickViewModal.tsx +11 -7
- package/src/screens/CartScreen.tsx +1 -1
- package/src/screens/CheckoutScreen.tsx +2 -2
- package/src/screens/ProductDetailScreen.tsx +8 -8
- package/src/screens/ShopScreen.tsx +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7291,7 +7291,11 @@ function QuickViewModal({ product, onClose, onNavigateToProduct }) {
|
|
|
7291
7291
|
};
|
|
7292
7292
|
const selectedVariant = product.productVariants[selectedVariantIndex];
|
|
7293
7293
|
selectedVariant.productMedia[selectedSizeIndex];
|
|
7294
|
-
const displayPrice =
|
|
7294
|
+
const displayPrice = selectedVariant.finalPrice;
|
|
7295
|
+
const displayOriginalPrice = selectedVariant.retailPrice;
|
|
7296
|
+
const isDiscounted = selectedVariant.isDiscounted;
|
|
7297
|
+
const discountAmount = selectedVariant.discountAmount;
|
|
7298
|
+
const displayName = selectedVariant.name || product.name;
|
|
7295
7299
|
const handleAddToCart = async () => {
|
|
7296
7300
|
if (!product || !selectedVariant) return;
|
|
7297
7301
|
setIsAddingToCart(true);
|
|
@@ -7328,7 +7332,7 @@ function QuickViewModal({ product, onClose, onNavigateToProduct }) {
|
|
|
7328
7332
|
className: "bg-white rounded-[32px] max-w-5xl w-full max-h-[90vh] overflow-y-auto",
|
|
7329
7333
|
onClick: (e) => e.stopPropagation()
|
|
7330
7334
|
},
|
|
7331
|
-
/* @__PURE__ */ React.createElement("div", { className: "p-8" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between mb-6" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "font-['Poppins',sans-serif] text-[11px] text-primary uppercase tracking-wide font-medium mb-2" }, product.brand, " \u2022 ", product.parentCategories[0].name), /* @__PURE__ */ React.createElement("h2", { className: "font-['Poppins',sans-serif] font-semibold text-secondary tracking-[-1px]" },
|
|
7335
|
+
/* @__PURE__ */ React.createElement("div", { className: "p-8" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between mb-6" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "font-['Poppins',sans-serif] text-[11px] text-primary uppercase tracking-wide font-medium mb-2" }, product.brand, " \u2022 ", product.parentCategories[0].name), /* @__PURE__ */ React.createElement("h2", { className: "font-['Poppins',sans-serif] font-semibold text-secondary tracking-[-1px]" }, displayName), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5" }, [...Array(5)].map((_, i) => /* @__PURE__ */ React.createElement(
|
|
7332
7336
|
Star,
|
|
7333
7337
|
{
|
|
7334
7338
|
key: i,
|
|
@@ -7348,7 +7352,7 @@ function QuickViewModal({ product, onClose, onNavigateToProduct }) {
|
|
|
7348
7352
|
alt: product.name,
|
|
7349
7353
|
className: "w-full h-full object-cover"
|
|
7350
7354
|
}
|
|
7351
|
-
), /* @__PURE__ */ React.createElement("div", { className: "absolute top-4 left-4 flex flex-col gap-2" },
|
|
7355
|
+
), /* @__PURE__ */ React.createElement("div", { className: "absolute top-4 left-4 flex flex-col gap-2" }, isDiscounted && /* @__PURE__ */ React.createElement("div", { className: "bg-accent text-white rounded-full px-3 py-1.5" }, /* @__PURE__ */ React.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[11px] uppercase" }, "-", discountAmount, "%")))), selectedVariant.productMedia.length > 1 && /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-4 gap-3" }, selectedVariant.productMedia.map((image, index) => /* @__PURE__ */ React.createElement(
|
|
7352
7356
|
"div",
|
|
7353
7357
|
{
|
|
7354
7358
|
key: index,
|
|
@@ -7363,7 +7367,7 @@ function QuickViewModal({ product, onClose, onNavigateToProduct }) {
|
|
|
7363
7367
|
className: "w-full h-full object-cover"
|
|
7364
7368
|
}
|
|
7365
7369
|
)
|
|
7366
|
-
)))), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3 mb-4" }, /* @__PURE__ */ React.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[32px] text-accent" }, "$", displayPrice.toFixed(2)),
|
|
7370
|
+
)))), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3 mb-4" }, /* @__PURE__ */ React.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[32px] text-accent" }, "$", displayPrice.toFixed(2)), isDiscounted && /* @__PURE__ */ React.createElement("span", { className: "font-['Poppins',sans-serif] text-[20px] text-muted line-through" }, "$", displayOriginalPrice.toFixed(2))), /* @__PURE__ */ React.createElement("div", { className: "mb-6" }, selectedVariant.inventoryCount === 0 ? /* @__PURE__ */ React.createElement("span", { className: "font-['Poppins',sans-serif] text-[12px] text-red-500 font-medium" }, "Out of Stock") : selectedVariant.inventoryCount <= 10 ? /* @__PURE__ */ React.createElement("span", { className: "font-['Poppins',sans-serif] text-[12px] text-primary font-medium flex items-center gap-1" }, /* @__PURE__ */ React.createElement(Package, { className: "size-3" }), "Only ", selectedVariant.inventoryCount, " left in stock") : /* @__PURE__ */ React.createElement("span", { className: "font-['Poppins',sans-serif] text-[12px] text-green-600 font-medium flex items-center gap-1" }, /* @__PURE__ */ React.createElement(Package, { className: "size-3" }), "In Stock")), /* @__PURE__ */ React.createElement("p", { className: "font-['Poppins',sans-serif] text-[14px] text-muted leading-[1.7] mb-6" }, /* @__PURE__ */ React.createElement("div", { dangerouslySetInnerHTML: { __html: product.description } })), /* @__PURE__ */ React.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React.createElement("h3", { className: "font-['Poppins',sans-serif] font-semibold text-[13px] text-secondary mb-3" }, "Selected Variant: ", /* @__PURE__ */ React.createElement("span", { className: "font-normal text-muted" }, product.productVariants[selectedVariantIndex].name)), /* @__PURE__ */ React.createElement("div", { className: "flex flex-wrap gap-3" }, product.productVariants.map((variant, index) => /* @__PURE__ */ React.createElement(
|
|
7367
7371
|
"button",
|
|
7368
7372
|
{
|
|
7369
7373
|
key: variant.id,
|
|
@@ -7496,6 +7500,21 @@ function ProductCard({
|
|
|
7496
7500
|
const displayName = useMemo(() => {
|
|
7497
7501
|
return selectedVariant?.name || product.name;
|
|
7498
7502
|
}, [selectedVariant, product.name]);
|
|
7503
|
+
const displayFinalPrice = useMemo(() => {
|
|
7504
|
+
return selectedVariant?.finalPrice ?? product.finalPrice;
|
|
7505
|
+
}, [selectedVariant, product.finalPrice]);
|
|
7506
|
+
const displayPriceBeforeDiscount = useMemo(() => {
|
|
7507
|
+
return selectedVariant?.retailPrice ?? product.priceBeforeDiscount;
|
|
7508
|
+
}, [selectedVariant, product.priceBeforeDiscount]);
|
|
7509
|
+
const displayIsDiscounted = useMemo(() => {
|
|
7510
|
+
return selectedVariant ? selectedVariant.isDiscounted : product.isDiscounted;
|
|
7511
|
+
}, [selectedVariant, product.isDiscounted]);
|
|
7512
|
+
const displayDiscountAmount = useMemo(() => {
|
|
7513
|
+
return selectedVariant ? selectedVariant.discountAmount : product.discountAmount;
|
|
7514
|
+
}, [selectedVariant, product.discountAmount]);
|
|
7515
|
+
const displayInventoryCount = useMemo(() => {
|
|
7516
|
+
return selectedVariant ? selectedVariant.inventoryCount : product.inventoryCount;
|
|
7517
|
+
}, [selectedVariant, product.inventoryCount]);
|
|
7499
7518
|
const imageSource = useMemo(() => {
|
|
7500
7519
|
const src = selectedVariantImage || product.productMedia?.[0]?.file || "/placeholder-product.jpg";
|
|
7501
7520
|
return {
|
|
@@ -7550,15 +7569,15 @@ function ProductCard({
|
|
|
7550
7569
|
},
|
|
7551
7570
|
/* @__PURE__ */ React21.createElement(Eye, { className: "size-4 text-[#2B4B7C]" })
|
|
7552
7571
|
),
|
|
7553
|
-
|
|
7572
|
+
displayInventoryCount === 0 && /* @__PURE__ */ React21.createElement("div", { className: "absolute inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center" }, /* @__PURE__ */ React21.createElement("div", { className: "bg-white rounded-full px-4 py-2" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[11px] text-[#2B4B7C] uppercase" }, "Out of Stock")))
|
|
7554
7573
|
),
|
|
7555
|
-
/* @__PURE__ */ React21.createElement("div", { className: "p-4 flex-1 flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "p-0 flex-1 flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1 mb-2 flex-wrap" },
|
|
7574
|
+
/* @__PURE__ */ React21.createElement("div", { className: "p-4 flex-1 flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "p-0 flex-1 flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1 mb-2 flex-wrap" }, displayIsDiscounted && /* @__PURE__ */ React21.createElement("span", { className: "bg-[#E67E50] text-white rounded-full px-2 py-0.5 flex items-center gap-1" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[8px] uppercase" }, "-", displayDiscountAmount, "%"))), /* @__PURE__ */ React21.createElement("div", { className: "mb-1" }, /* @__PURE__ */ React21.createElement("p", { className: "font-['Poppins',sans-serif] text-xs text-[#5B9BD5] uppercase tracking-wide font-medium" }, product.brand)), /* @__PURE__ */ React21.createElement("h3", { className: "text-sm font-['Poppins',sans-serif] font-semibold text-[#2B4B7C] mb-3" }, displayName), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1.5 mb-2" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-0.5" }, [...Array(5)].map((_, i) => /* @__PURE__ */ React21.createElement(
|
|
7556
7575
|
Star,
|
|
7557
7576
|
{
|
|
7558
7577
|
key: i,
|
|
7559
7578
|
className: `size-4 ${i < Math.floor(product.rating ? product.rating : 0) ? "text-[#E67E50] fill-[#E67E50]" : "text-gray-300"}`
|
|
7560
7579
|
}
|
|
7561
|
-
))), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[10px] text-[#676c80]" }, "(", product.reviews?.length || 0, ")")), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1.5 mb-3" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-md text-primary-600" }, "$",
|
|
7580
|
+
))), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[10px] text-[#676c80]" }, "(", product.reviews?.length || 0, ")")), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1.5 mb-3" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-md text-primary-600" }, "$", displayFinalPrice.toFixed(2)), displayIsDiscounted && /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-sm text-[#676c80] line-through" }, "$", formatPrice(displayPriceBeforeDiscount))), variantImages.length > 0 && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1.5 mb-3" }, variantImages.map((variant, index) => /* @__PURE__ */ React21.createElement(
|
|
7562
7581
|
"button",
|
|
7563
7582
|
{
|
|
7564
7583
|
key: variant.variantId || index,
|
|
@@ -7610,11 +7629,11 @@ function ProductCard({
|
|
|
7610
7629
|
console.error("Failed to add to cart", error);
|
|
7611
7630
|
}
|
|
7612
7631
|
},
|
|
7613
|
-
disabled: isAddingToCart || variantImages.length > 0 && !selectedVariantId,
|
|
7632
|
+
disabled: isAddingToCart || variantImages.length > 0 && !selectedVariantId || displayInventoryCount === 0,
|
|
7614
7633
|
className: "w-full font-['Poppins',sans-serif] font-medium text-[11px] px-3 py-2 rounded-full bg-[#5B9BD5] text-white hover:bg-[#4a8ac4] hover:shadow-lg transition-all duration-300 flex items-center justify-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
7615
7634
|
},
|
|
7616
7635
|
/* @__PURE__ */ React21.createElement(ShoppingCart, { className: "h-4 w-4" }),
|
|
7617
|
-
|
|
7636
|
+
displayInventoryCount === 0 ? "Out of Stock" : "Add to Cart"
|
|
7618
7637
|
))
|
|
7619
7638
|
), showQuickView && /* @__PURE__ */ React21.createElement(
|
|
7620
7639
|
QuickViewModal,
|
|
@@ -8459,7 +8478,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
|
|
|
8459
8478
|
animate: { opacity: 1, y: 0 },
|
|
8460
8479
|
className: "max-w-4xl mx-auto space-y-6 text-center"
|
|
8461
8480
|
},
|
|
8462
|
-
/* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-center gap-2 mb-4" }, /* @__PURE__ */ React21.createElement(Star, { className: "h-5 w-5 text-
|
|
8481
|
+
/* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-center gap-2 mb-4" }, /* @__PURE__ */ React21.createElement(Star, { className: "h-5 w-5 text-primary fill-primary" }), /* @__PURE__ */ React21.createElement("span", { className: "text-sm font-semibold uppercase tracking-wider text-primary" }, "COMPLETE PHARMACY SHOP")),
|
|
8463
8482
|
/* @__PURE__ */ React21.createElement("h1", { className: "text-3xl md:text-4xl font-bold text-slate-900 leading-tight" }, "Medical Supplies & Wellness Products"),
|
|
8464
8483
|
/* @__PURE__ */ React21.createElement("p", { className: "text-base md:text-lg text-slate-600 max-w-2xl mx-auto" }, "From professional scrubs to vitamins, medicines to personal care - everything you need for health and wellness."),
|
|
8465
8484
|
/* @__PURE__ */ React21.createElement(
|
|
@@ -8716,6 +8735,7 @@ function ProductDetailScreen({ productId }) {
|
|
|
8716
8735
|
const variantImages = getVariantImages();
|
|
8717
8736
|
const variantPrice = selectedVariant?.finalPrice || currentVariant?.finalPrice || product?.price || 0;
|
|
8718
8737
|
const variantComparePrice = selectedVariant?.retailPrice || (currentVariant && "retailPrice" in currentVariant ? currentVariant.retailPrice : null) || product?.compareAtPrice;
|
|
8738
|
+
const discount = variantComparePrice && variantPrice && variantComparePrice > variantPrice ? Math.round((variantComparePrice - variantPrice) / variantComparePrice * 100) : 0;
|
|
8719
8739
|
const lastUpdatedLabel = safeFormatDate(
|
|
8720
8740
|
currentVariant && "updatedAt" in currentVariant && currentVariant.updatedAt ? currentVariant.updatedAt : product?.updatedAt
|
|
8721
8741
|
);
|
|
@@ -8860,7 +8880,7 @@ function ProductDetailScreen({ productId }) {
|
|
|
8860
8880
|
className: "object-contain"
|
|
8861
8881
|
}
|
|
8862
8882
|
) : null,
|
|
8863
|
-
/* @__PURE__ */ React21.createElement("div", { className: "absolute top-6 left-6 flex flex-col gap-3" },
|
|
8883
|
+
/* @__PURE__ */ React21.createElement("div", { className: "absolute top-6 left-6 flex flex-col gap-3" }, discount > 0 && /* @__PURE__ */ React21.createElement("div", { className: "bg-[#E67E50] text-white rounded-full px-4 py-2" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[12px] uppercase tracking-wide" }, "Save ", discount, "%")))
|
|
8864
8884
|
), variantImages.length > 0 && /* @__PURE__ */ React21.createElement("div", { className: "grid grid-cols-8 gap-2" }, variantImages.map((image, index) => /* @__PURE__ */ React21.createElement(
|
|
8865
8885
|
"button",
|
|
8866
8886
|
{
|
|
@@ -8880,13 +8900,13 @@ function ProductDetailScreen({ productId }) {
|
|
|
8880
8900
|
unoptimized: true
|
|
8881
8901
|
}
|
|
8882
8902
|
)
|
|
8883
|
-
)))))), /* @__PURE__ */ React21.createElement("aside", { className: "space-y-6 lg:sticky lg:top-24" }, /* @__PURE__ */ React21.createElement("div", { className: "mb-4" }, /* @__PURE__ */ React21.createElement("p", { className: "font-['Poppins',sans-serif] text-[12px] text-primary uppercase tracking-wide font-medium mb-2" }, product.brand, " \u2022 ", product.parentCategories?.[0].name), /* @__PURE__ */ React21.createElement("h1", { className: "text-3xl font-['Poppins',sans-serif] font-semibold text-secondary tracking-[-1.5px] mb-3" }, product.name), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1" }, [...Array(5)].map((_, i) => /* @__PURE__ */ React21.createElement(
|
|
8903
|
+
)))))), /* @__PURE__ */ React21.createElement("aside", { className: "space-y-6 lg:sticky lg:top-24" }, /* @__PURE__ */ React21.createElement("div", { className: "mb-4" }, /* @__PURE__ */ React21.createElement("p", { className: "font-['Poppins',sans-serif] text-[12px] text-primary uppercase tracking-wide font-medium mb-2" }, product.brand, " \u2022 ", product.parentCategories?.[0].name), /* @__PURE__ */ React21.createElement("h1", { className: "text-3xl font-['Poppins',sans-serif] font-semibold text-secondary tracking-[-1.5px] mb-3" }, selectedVariant?.name || product.name), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1" }, [...Array(5)].map((_, i) => /* @__PURE__ */ React21.createElement(
|
|
8884
8904
|
Star,
|
|
8885
8905
|
{
|
|
8886
8906
|
key: i,
|
|
8887
8907
|
className: `size-4 ${i < Math.floor(product.rating) ? "text-[#E67E50] fill-[#E67E50]" : "text-gray-300"}`
|
|
8888
8908
|
}
|
|
8889
|
-
))), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[14px] text-muted" }, product.rating, " (", product.reviewCount ? product.reviewCount : 0, " reviews)")), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3 mb-6 pb-6 border-b-2 border-gray-100" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[40px] text-[#E67E50]" },
|
|
8909
|
+
))), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[14px] text-muted" }, product.rating, " (", product.reviewCount ? product.reviewCount : 0, " reviews)")), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3 mb-6 pb-6 border-b-2 border-gray-100" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-bold text-[40px] text-[#E67E50]" }, "$", variantPrice.toFixed(2)), variantComparePrice && variantComparePrice > variantPrice && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[24px] text-muted line-through" }, "$", variantComparePrice.toFixed(2)), /* @__PURE__ */ React21.createElement("div", { className: "px-3 py-1 rounded-full bg-[#E67E50]/10" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-semibold text-[13px] text-[#E67E50]" }, "Save $", formatPrice(variantComparePrice - variantPrice))))), selectedVariant && /* @__PURE__ */ React21.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 mb-2" }, selectedVariant.inventoryStatus === "OUT_OF_STOCK" /* OUTOFSTOCK */ || selectedVariant.inventoryStatus === "LOW_STOCK" /* LOWSTOCK */ ? /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "size-3 rounded-full bg-red-500" }), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[13px] text-red-600 font-medium" }, "Out of Stock")) : selectedVariant.inventoryCount <= 10 ? /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "size-3 rounded-full bg-primary animate-pulse" }), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[13px] text-primary font-medium" }, "Only ", selectedVariant.inventoryCount, " left in stock - Order soon!")) : /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { className: "size-3 rounded-full bg-green-500" }), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[13px] text-green-600 font-medium" }, "In Stock"))), /* @__PURE__ */ React21.createElement("p", { className: "font-['Poppins',sans-serif] text-[12px] text-muted" }, "SKU: ", selectedVariant?.sku)), product.description && /* @__PURE__ */ React21.createElement("p", { className: "font-['Poppins',sans-serif] text-[14px] text-muted leading-[1.7] mb-8" }, /* @__PURE__ */ React21.createElement("div", { dangerouslySetInnerHTML: { __html: product.description } })), product?.productVariants && product.productVariants.length > 0 && /* @__PURE__ */ React21.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React21.createElement("h3", { className: "font-['Poppins',sans-serif] font-semibold text-[14px] text-secondary mb-3" }, "Select Variant"), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-wrap gap-3" }, product.productVariants.map((variant) => {
|
|
8890
8910
|
const isSelected = selectedVariant?.id === variant.id;
|
|
8891
8911
|
const variantImage = variant.productMedia?.[0]?.file || product.productMedia?.[0]?.file || product.images?.[0] || "/placeholder-product.jpg";
|
|
8892
8912
|
return /* @__PURE__ */ React21.createElement(
|
|
@@ -9094,7 +9114,7 @@ function CartScreen() {
|
|
|
9094
9114
|
transition: { delay: 0.1 },
|
|
9095
9115
|
className: "space-y-6 lg:sticky lg:top-24 h-fit lg:col-span-1"
|
|
9096
9116
|
},
|
|
9097
|
-
/* @__PURE__ */ React21.createElement("div", { className: "bg-gradient-to-br from-[#5B9BD5]/10 to-[#2B4B7C]/10 rounded-[24px] p-8 border-2 border-[#5B9BD5]/20 sticky top-24" }, /* @__PURE__ */ React21.createElement("h2", { className: "font-['Poppins',sans-serif] font-semibold text-secondary mb-6" }, "Order Summary"), /* @__PURE__ */ React21.createElement("div", { className: "space-y-4 mb-6" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[14px] text-muted" }, "Subtotal (", itemCount, " ", itemCount === 1 ? "item" : "items", ")"), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-semibold text-[14px] text-secondary" }, formatPrice(subtotal))), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between text-sm" }, /* @__PURE__ */ React21.createElement("span", { className: "text-gray-600" }, "Shipping"), /* @__PURE__ */ React21.createElement("span", { className: "font-semibold text-green-600" }, "Will be calculated at checkout")), /* @__PURE__ */ React21.createElement("div", { className: "border-t border-gray-200 pt-4 mt-4" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("span", { className: "text-lg font-bold text-secondary" }, "Total"), /* @__PURE__ */ React21.createElement("span", { className: "text-2xl font-bold text-
|
|
9117
|
+
/* @__PURE__ */ React21.createElement("div", { className: "bg-gradient-to-br from-[#5B9BD5]/10 to-[#2B4B7C]/10 rounded-[24px] p-8 border-2 border-[#5B9BD5]/20 sticky top-24" }, /* @__PURE__ */ React21.createElement("h2", { className: "font-['Poppins',sans-serif] font-semibold text-secondary mb-6" }, "Order Summary"), /* @__PURE__ */ React21.createElement("div", { className: "space-y-4 mb-6" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] text-[14px] text-muted" }, "Subtotal (", itemCount, " ", itemCount === 1 ? "item" : "items", ")"), /* @__PURE__ */ React21.createElement("span", { className: "font-['Poppins',sans-serif] font-semibold text-[14px] text-secondary" }, formatPrice(subtotal))), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between text-sm" }, /* @__PURE__ */ React21.createElement("span", { className: "text-gray-600" }, "Shipping"), /* @__PURE__ */ React21.createElement("span", { className: "font-semibold text-green-600" }, "Will be calculated at checkout")), /* @__PURE__ */ React21.createElement("div", { className: "border-t border-gray-200 pt-4 mt-4" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React21.createElement("span", { className: "text-lg font-bold text-secondary" }, "Total"), /* @__PURE__ */ React21.createElement("span", { className: "text-2xl font-bold text-primary" }, formatPrice(total))))), /* @__PURE__ */ React21.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React21.createElement(
|
|
9098
9118
|
"button",
|
|
9099
9119
|
{
|
|
9100
9120
|
type: "submit",
|
|
@@ -9846,7 +9866,7 @@ function CheckoutScreen() {
|
|
|
9846
9866
|
width: 48,
|
|
9847
9867
|
height: 48
|
|
9848
9868
|
}
|
|
9849
|
-
)), /* @__PURE__ */ React21.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, rate.provider, " ", rate.servicelevel?.name), isTest && /* @__PURE__ */ React21.createElement("span", { className: "px-2 py-1 text-xs font-medium bg-
|
|
9869
|
+
)), /* @__PURE__ */ React21.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-lg font-semibold text-gray-900" }, rate.provider, " ", rate.servicelevel?.name), isTest && /* @__PURE__ */ React21.createElement("span", { className: "px-2 py-1 text-xs font-medium bg-primary-100 text-primary-800 rounded-full" }, "TEST")), hasAttributes && /* @__PURE__ */ React21.createElement("div", { className: "flex flex-wrap gap-2 mb-3" }, rate.attributes.map((attr) => /* @__PURE__ */ React21.createElement(
|
|
9850
9870
|
"span",
|
|
9851
9871
|
{
|
|
9852
9872
|
key: attr,
|