hey-pharmacist-ecommerce 1.1.8 → 1.1.10
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 +84 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/screens/CartScreen.tsx +120 -11
- package/src/screens/LoginScreen.tsx +2 -2
- package/src/screens/RegisterScreen.tsx +3 -3
- package/src/screens/ShopScreen.tsx +1 -2
package/dist/index.js
CHANGED
|
@@ -8136,8 +8136,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
|
|
|
8136
8136
|
{
|
|
8137
8137
|
product,
|
|
8138
8138
|
onClickProduct: (item) => {
|
|
8139
|
-
|
|
8140
|
-
router.push(buildPath(`/products/${item.id}?product=${productData}`));
|
|
8139
|
+
router.push(buildPath(`/products/${item.id}`));
|
|
8141
8140
|
}
|
|
8142
8141
|
}
|
|
8143
8142
|
)))) : /* @__PURE__ */ React21__default.default.createElement("div", { className: "space-y-4" }, displayedProducts.map((product) => {
|
|
@@ -8654,16 +8653,86 @@ function CartScreen() {
|
|
|
8654
8653
|
const { cart, isLoading } = useCart();
|
|
8655
8654
|
const { buildPath } = useBasePath();
|
|
8656
8655
|
if (!cart || cart.cartBody.items.length === 0) {
|
|
8657
|
-
|
|
8658
|
-
EmptyState,
|
|
8656
|
+
const highlights = [
|
|
8659
8657
|
{
|
|
8660
|
-
icon: lucideReact.
|
|
8661
|
-
title: "
|
|
8662
|
-
description: "
|
|
8663
|
-
|
|
8664
|
-
|
|
8658
|
+
icon: lucideReact.ShieldCheck,
|
|
8659
|
+
title: "Pharmacist approved",
|
|
8660
|
+
description: "Every product passes pharmacist review and cold-chain handling standards."
|
|
8661
|
+
},
|
|
8662
|
+
{
|
|
8663
|
+
icon: lucideReact.BadgePercent,
|
|
8664
|
+
title: "Bundle savings",
|
|
8665
|
+
description: "Unlock tiered discounts when you combine vitamins, OTC, and wellness kits."
|
|
8666
|
+
},
|
|
8667
|
+
{
|
|
8668
|
+
icon: lucideReact.HeartPulse,
|
|
8669
|
+
title: "Personalized guidance",
|
|
8670
|
+
description: "Follow curated collections tailored to your health goals and routines."
|
|
8665
8671
|
}
|
|
8666
|
-
|
|
8672
|
+
];
|
|
8673
|
+
return /* @__PURE__ */ React21__default.default.createElement("div", { className: "relative min-h-screen overflow-hidden bg-slate-950" }, /* @__PURE__ */ React21__default.default.createElement("div", { className: "absolute inset-0 bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))]" }), /* @__PURE__ */ React21__default.default.createElement("div", { className: "absolute inset-0" }, /* @__PURE__ */ React21__default.default.createElement("div", { className: "pointer-events-none absolute -top-24 -left-20 h-96 w-96 rounded-full bg-white/20 blur-3xl opacity-60" }), /* @__PURE__ */ React21__default.default.createElement("div", { className: "pointer-events-none absolute bottom-0 right-0 h-[28rem] w-[28rem] rounded-full bg-secondary-500/40 blur-[220px] opacity-70" })), /* @__PURE__ */ React21__default.default.createElement("div", { className: "relative z-10 flex min-h-screen items-center px-6 py-20" }, /* @__PURE__ */ React21__default.default.createElement("div", { className: "mx-auto grid w-full max-w-6xl gap-12 lg:grid-cols-[minmax(0,1.25fr)_minmax(0,1fr)] lg:items-center" }, /* @__PURE__ */ React21__default.default.createElement(
|
|
8674
|
+
framerMotion.motion.div,
|
|
8675
|
+
{
|
|
8676
|
+
initial: { opacity: 0, y: 24 },
|
|
8677
|
+
animate: { opacity: 1, y: 0 },
|
|
8678
|
+
transition: { duration: 0.4 },
|
|
8679
|
+
className: "space-y-8 text-white"
|
|
8680
|
+
},
|
|
8681
|
+
/* @__PURE__ */ React21__default.default.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-1 text-sm font-semibold uppercase tracking-[0.3em] text-white/80 backdrop-blur" }, /* @__PURE__ */ React21__default.default.createElement(lucideReact.ShoppingBag, { className: "h-4 w-4" }), "Cart status"),
|
|
8682
|
+
/* @__PURE__ */ React21__default.default.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React21__default.default.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Your wellness cart is waiting for a refill"), /* @__PURE__ */ React21__default.default.createElement("p", { className: "max-w-xl text-lg text-white/75" }, "Build a pharmacist-curated bundle with fast shipping, personalized recommendations, and exclusive member perks designed to keep you feeling your best.")),
|
|
8683
|
+
/* @__PURE__ */ React21__default.default.createElement("div", { className: "flex flex-wrap gap-4" }, /* @__PURE__ */ React21__default.default.createElement(
|
|
8684
|
+
Button,
|
|
8685
|
+
{
|
|
8686
|
+
size: "lg",
|
|
8687
|
+
className: "bg-white text-primary-700 shadow-xl shadow-white/30 hover:bg-white/90 hover:text-primary-700",
|
|
8688
|
+
onClick: () => router.push(buildPath("/shop"))
|
|
8689
|
+
},
|
|
8690
|
+
"Discover products",
|
|
8691
|
+
/* @__PURE__ */ React21__default.default.createElement(lucideReact.ArrowRight, { className: "h-5 w-5" })
|
|
8692
|
+
), /* @__PURE__ */ React21__default.default.createElement(
|
|
8693
|
+
"button",
|
|
8694
|
+
{
|
|
8695
|
+
type: "button",
|
|
8696
|
+
onClick: () => router.push(buildPath("/categories")),
|
|
8697
|
+
className: "inline-flex items-center gap-2 rounded-full border border-white/40 px-5 py-3 text-sm font-semibold text-white/80 transition hover:border-white hover:bg-white/10"
|
|
8698
|
+
},
|
|
8699
|
+
"Browse categories",
|
|
8700
|
+
/* @__PURE__ */ React21__default.default.createElement(lucideReact.ArrowRight, { className: "h-4 w-4" })
|
|
8701
|
+
)),
|
|
8702
|
+
/* @__PURE__ */ React21__default.default.createElement("div", { className: "grid gap-4 sm:grid-cols-2" }, highlights.map(({ icon: Icon, title, description }) => /* @__PURE__ */ React21__default.default.createElement(
|
|
8703
|
+
"div",
|
|
8704
|
+
{
|
|
8705
|
+
key: title,
|
|
8706
|
+
className: "rounded-2xl border border-white/15 bg-white/10 p-5 backdrop-blur transition hover:border-white/25 hover:bg-white/15"
|
|
8707
|
+
},
|
|
8708
|
+
/* @__PURE__ */ React21__default.default.createElement(Icon, { className: "h-6 w-6 text-white/90" }),
|
|
8709
|
+
/* @__PURE__ */ React21__default.default.createElement("p", { className: "mt-3 text-sm font-semibold text-white" }, title),
|
|
8710
|
+
/* @__PURE__ */ React21__default.default.createElement("p", { className: "mt-1 text-xs text-white/70" }, description)
|
|
8711
|
+
)))
|
|
8712
|
+
), /* @__PURE__ */ React21__default.default.createElement(
|
|
8713
|
+
framerMotion.motion.div,
|
|
8714
|
+
{
|
|
8715
|
+
initial: { opacity: 0, y: 24 },
|
|
8716
|
+
animate: { opacity: 1, y: 0 },
|
|
8717
|
+
transition: { delay: 0.1, duration: 0.4 },
|
|
8718
|
+
className: "rounded-[32px] border border-white/10 bg-white/10 p-10 backdrop-blur-2xl shadow-[0_40px_120px_-45px_rgba(12,5,40,0.6)]"
|
|
8719
|
+
},
|
|
8720
|
+
/* @__PURE__ */ React21__default.default.createElement("div", { className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-white/20" }, /* @__PURE__ */ React21__default.default.createElement(lucideReact.ShoppingBag, { className: "h-8 w-8 text-white" })),
|
|
8721
|
+
/* @__PURE__ */ React21__default.default.createElement("h2", { className: "mt-6 text-3xl font-semibold text-white" }, "Still building your bag?"),
|
|
8722
|
+
/* @__PURE__ */ React21__default.default.createElement("p", { className: "mt-3 text-sm text-white/80" }, "Add supplements, wellness tools, and everyday pharmacy favorites to personalize your routine. We'll keep them chilled, curated, and ready for doorstep delivery."),
|
|
8723
|
+
/* @__PURE__ */ React21__default.default.createElement("ul", { className: "mt-6 space-y-3 text-sm text-white/80" }, /* @__PURE__ */ React21__default.default.createElement("li", { className: "flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3" }, /* @__PURE__ */ React21__default.default.createElement(lucideReact.ShieldCheck, { className: "h-5 w-5 text-white" }), "Pharmacist oversight on every order"), /* @__PURE__ */ React21__default.default.createElement("li", { className: "flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3" }, /* @__PURE__ */ React21__default.default.createElement(lucideReact.BadgePercent, { className: "h-5 w-5 text-white" }), "Member-only savings unlock at checkout"), /* @__PURE__ */ React21__default.default.createElement("li", { className: "flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3" }, /* @__PURE__ */ React21__default.default.createElement(lucideReact.HeartPulse, { className: "h-5 w-5 text-white" }), "Personalized care plans for each purchase")),
|
|
8724
|
+
/* @__PURE__ */ React21__default.default.createElement(
|
|
8725
|
+
Button,
|
|
8726
|
+
{
|
|
8727
|
+
size: "lg",
|
|
8728
|
+
variant: "outline",
|
|
8729
|
+
className: "mt-8 w-full border-white/40 text-white hover:border-white hover:bg-white/10",
|
|
8730
|
+
onClick: () => router.push(buildPath("/shop"))
|
|
8731
|
+
},
|
|
8732
|
+
"Start building my cart",
|
|
8733
|
+
/* @__PURE__ */ React21__default.default.createElement(lucideReact.ArrowRight, { className: "h-5 w-5" })
|
|
8734
|
+
)
|
|
8735
|
+
))));
|
|
8667
8736
|
}
|
|
8668
8737
|
const subtotal = cart.total;
|
|
8669
8738
|
const shipping = 0;
|
|
@@ -9599,7 +9668,7 @@ function LoginScreen() {
|
|
|
9599
9668
|
/* @__PURE__ */ React21__default.default.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React21__default.default.createElement("span", null, "Need an account?"), /* @__PURE__ */ React21__default.default.createElement(
|
|
9600
9669
|
Link8__default.default,
|
|
9601
9670
|
{
|
|
9602
|
-
href: "/register",
|
|
9671
|
+
href: buildPath("/register"),
|
|
9603
9672
|
className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2 font-semibold transition hover:bg-white/25"
|
|
9604
9673
|
},
|
|
9605
9674
|
"Create one now",
|
|
@@ -9648,7 +9717,7 @@ function LoginScreen() {
|
|
|
9648
9717
|
), "Remember me"), /* @__PURE__ */ React21__default.default.createElement(
|
|
9649
9718
|
Link8__default.default,
|
|
9650
9719
|
{
|
|
9651
|
-
href: "/forgot-password",
|
|
9720
|
+
href: buildPath("/forgot-password"),
|
|
9652
9721
|
className: "font-medium text-primary-600 transition hover:text-primary-700"
|
|
9653
9722
|
},
|
|
9654
9723
|
"Forgot password?"
|
|
@@ -9725,7 +9794,7 @@ function RegisterScreen() {
|
|
|
9725
9794
|
/* @__PURE__ */ React21__default.default.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React21__default.default.createElement("span", null, "Already part of the community?"), /* @__PURE__ */ React21__default.default.createElement(
|
|
9726
9795
|
Link8__default.default,
|
|
9727
9796
|
{
|
|
9728
|
-
href: "/login",
|
|
9797
|
+
href: buildPath("/login"),
|
|
9729
9798
|
className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2 font-semibold transition hover:bg-white/25"
|
|
9730
9799
|
},
|
|
9731
9800
|
"Sign in"
|
|
@@ -9817,10 +9886,10 @@ function RegisterScreen() {
|
|
|
9817
9886
|
},
|
|
9818
9887
|
showConfirmPassword ? /* @__PURE__ */ React21__default.default.createElement(lucideReact.EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React21__default.default.createElement(lucideReact.Eye, { className: "h-5 w-5" })
|
|
9819
9888
|
)),
|
|
9820
|
-
/* @__PURE__ */ React21__default.default.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4 text-sm text-slate-600" }, /* @__PURE__ */ React21__default.default.createElement(lucideReact.Shield, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React21__default.default.createElement("span", null, "By creating an account, you agree to our", " ", /* @__PURE__ */ React21__default.default.createElement(Link8__default.default, { href: "/terms", className: "font-semibold text-primary-600 hover:text-primary-700" }, "Terms of Service"), " ", "and", " ", /* @__PURE__ */ React21__default.default.createElement(
|
|
9889
|
+
/* @__PURE__ */ React21__default.default.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4 text-sm text-slate-600" }, /* @__PURE__ */ React21__default.default.createElement(lucideReact.Shield, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React21__default.default.createElement("span", null, "By creating an account, you agree to our", " ", /* @__PURE__ */ React21__default.default.createElement(Link8__default.default, { href: buildPath("/terms"), className: "font-semibold text-primary-600 hover:text-primary-700" }, "Terms of Service"), " ", "and", " ", /* @__PURE__ */ React21__default.default.createElement(
|
|
9821
9890
|
Link8__default.default,
|
|
9822
9891
|
{
|
|
9823
|
-
href: "/privacy",
|
|
9892
|
+
href: buildPath("/privacy"),
|
|
9824
9893
|
className: "font-semibold text-primary-600 hover:text-primary-700"
|
|
9825
9894
|
},
|
|
9826
9895
|
"Privacy Policy"
|