hey-pharmacist-ecommerce 1.1.7 → 1.1.9
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 +676 -606
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +481 -411
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AddressFormModal.tsx +2 -2
- package/src/screens/CartScreen.tsx +120 -11
- package/src/screens/LoginScreen.tsx +2 -2
- package/src/screens/RegisterScreen.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hey-pharmacist-ecommerce",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "Production-ready, multi-tenant e‑commerce UI + API adapter for Next.js with auth, carts, checkout, orders, theming, and pharmacist-focused UX.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { useForm } from 'react-hook-form';
|
|
3
3
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
4
|
import { Button } from '@/components/ui/Button';
|
|
@@ -176,4 +176,4 @@ export function AddressFormModal({ isOpen, onClose, onAddressAdded, onAddressUpd
|
|
|
176
176
|
</form>
|
|
177
177
|
</Modal>
|
|
178
178
|
);
|
|
179
|
-
}
|
|
179
|
+
}
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
ShoppingBag,
|
|
11
11
|
} from 'lucide-react';
|
|
12
12
|
import { CartItem } from '@/components/CartItem';
|
|
13
|
-
import { EmptyState } from '@/components/EmptyState';
|
|
14
13
|
import { Button } from '@/components/ui/Button';
|
|
15
14
|
import { useCart } from '@/providers/CartProvider';
|
|
16
15
|
import { formatPrice } from '@/lib/utils/format';
|
|
@@ -25,16 +24,127 @@ export function CartScreen() {
|
|
|
25
24
|
const { buildPath } = useBasePath();
|
|
26
25
|
|
|
27
26
|
if (!cart || cart.cartBody.items.length === 0) {
|
|
27
|
+
const highlights = [
|
|
28
|
+
{
|
|
29
|
+
icon: ShieldCheck,
|
|
30
|
+
title: 'Pharmacist approved',
|
|
31
|
+
description:
|
|
32
|
+
'Every product passes pharmacist review and cold-chain handling standards.',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
icon: BadgePercent,
|
|
36
|
+
title: 'Bundle savings',
|
|
37
|
+
description: 'Unlock tiered discounts when you combine vitamins, OTC, and wellness kits.',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
icon: HeartPulse,
|
|
41
|
+
title: 'Personalized guidance',
|
|
42
|
+
description: 'Follow curated collections tailored to your health goals and routines.',
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
|
|
28
46
|
return (
|
|
29
|
-
<div className="min-h-screen
|
|
30
|
-
<div className="
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
<div className="relative min-h-screen overflow-hidden bg-slate-950">
|
|
48
|
+
<div className="absolute inset-0 bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))]" />
|
|
49
|
+
<div className="absolute inset-0">
|
|
50
|
+
<div className="pointer-events-none absolute -top-24 -left-20 h-96 w-96 rounded-full bg-white/20 blur-3xl opacity-60" />
|
|
51
|
+
<div className="pointer-events-none absolute bottom-0 right-0 h-[28rem] w-[28rem] rounded-full bg-secondary-500/40 blur-[220px] opacity-70" />
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div className="relative z-10 flex min-h-screen items-center px-6 py-20">
|
|
55
|
+
<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">
|
|
56
|
+
<motion.div
|
|
57
|
+
initial={{ opacity: 0, y: 24 }}
|
|
58
|
+
animate={{ opacity: 1, y: 0 }}
|
|
59
|
+
transition={{ duration: 0.4 }}
|
|
60
|
+
className="space-y-8 text-white"
|
|
61
|
+
>
|
|
62
|
+
<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">
|
|
63
|
+
<ShoppingBag className="h-4 w-4" />
|
|
64
|
+
Cart status
|
|
65
|
+
</span>
|
|
66
|
+
<div className="space-y-4">
|
|
67
|
+
<h1 className="text-4xl font-bold md:text-5xl">
|
|
68
|
+
Your wellness cart is waiting for a refill
|
|
69
|
+
</h1>
|
|
70
|
+
<p className="max-w-xl text-lg text-white/75">
|
|
71
|
+
Build a pharmacist-curated bundle with fast shipping, personalized recommendations,
|
|
72
|
+
and exclusive member perks designed to keep you feeling your best.
|
|
73
|
+
</p>
|
|
74
|
+
</div>
|
|
75
|
+
<div className="flex flex-wrap gap-4">
|
|
76
|
+
<Button
|
|
77
|
+
size="lg"
|
|
78
|
+
className="bg-white text-primary-700 shadow-xl shadow-white/30 hover:bg-white/90 hover:text-primary-700"
|
|
79
|
+
onClick={() => router.push(buildPath('/shop'))}
|
|
80
|
+
>
|
|
81
|
+
Discover products
|
|
82
|
+
<ArrowRight className="h-5 w-5" />
|
|
83
|
+
</Button>
|
|
84
|
+
<button
|
|
85
|
+
type="button"
|
|
86
|
+
onClick={() => router.push(buildPath('/categories'))}
|
|
87
|
+
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"
|
|
88
|
+
>
|
|
89
|
+
Browse categories
|
|
90
|
+
<ArrowRight className="h-4 w-4" />
|
|
91
|
+
</button>
|
|
92
|
+
</div>
|
|
93
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
94
|
+
{highlights.map(({ icon: Icon, title, description }) => (
|
|
95
|
+
<div
|
|
96
|
+
key={title}
|
|
97
|
+
className="rounded-2xl border border-white/15 bg-white/10 p-5 backdrop-blur transition hover:border-white/25 hover:bg-white/15"
|
|
98
|
+
>
|
|
99
|
+
<Icon className="h-6 w-6 text-white/90" />
|
|
100
|
+
<p className="mt-3 text-sm font-semibold text-white">{title}</p>
|
|
101
|
+
<p className="mt-1 text-xs text-white/70">{description}</p>
|
|
102
|
+
</div>
|
|
103
|
+
))}
|
|
104
|
+
</div>
|
|
105
|
+
</motion.div>
|
|
106
|
+
|
|
107
|
+
<motion.div
|
|
108
|
+
initial={{ opacity: 0, y: 24 }}
|
|
109
|
+
animate={{ opacity: 1, y: 0 }}
|
|
110
|
+
transition={{ delay: 0.1, duration: 0.4 }}
|
|
111
|
+
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)]"
|
|
112
|
+
>
|
|
113
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-2xl bg-white/20">
|
|
114
|
+
<ShoppingBag className="h-8 w-8 text-white" />
|
|
115
|
+
</div>
|
|
116
|
+
<h2 className="mt-6 text-3xl font-semibold text-white">
|
|
117
|
+
Still building your bag?
|
|
118
|
+
</h2>
|
|
119
|
+
<p className="mt-3 text-sm text-white/80">
|
|
120
|
+
Add supplements, wellness tools, and everyday pharmacy favorites to personalize your
|
|
121
|
+
routine. We'll keep them chilled, curated, and ready for doorstep delivery.
|
|
122
|
+
</p>
|
|
123
|
+
<ul className="mt-6 space-y-3 text-sm text-white/80">
|
|
124
|
+
<li className="flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3">
|
|
125
|
+
<ShieldCheck className="h-5 w-5 text-white" />
|
|
126
|
+
Pharmacist oversight on every order
|
|
127
|
+
</li>
|
|
128
|
+
<li className="flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3">
|
|
129
|
+
<BadgePercent className="h-5 w-5 text-white" />
|
|
130
|
+
Member-only savings unlock at checkout
|
|
131
|
+
</li>
|
|
132
|
+
<li className="flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3">
|
|
133
|
+
<HeartPulse className="h-5 w-5 text-white" />
|
|
134
|
+
Personalized care plans for each purchase
|
|
135
|
+
</li>
|
|
136
|
+
</ul>
|
|
137
|
+
<Button
|
|
138
|
+
size="lg"
|
|
139
|
+
variant="outline"
|
|
140
|
+
className="mt-8 w-full border-white/40 text-white hover:border-white hover:bg-white/10"
|
|
141
|
+
onClick={() => router.push(buildPath('/shop'))}
|
|
142
|
+
>
|
|
143
|
+
Start building my cart
|
|
144
|
+
<ArrowRight className="h-5 w-5" />
|
|
145
|
+
</Button>
|
|
146
|
+
</motion.div>
|
|
147
|
+
</div>
|
|
38
148
|
</div>
|
|
39
149
|
</div>
|
|
40
150
|
);
|
|
@@ -175,4 +285,3 @@ export function CartScreen() {
|
|
|
175
285
|
</div>
|
|
176
286
|
);
|
|
177
287
|
}
|
|
178
|
-
|
|
@@ -100,7 +100,7 @@ export function LoginScreen() {
|
|
|
100
100
|
<div className="flex items-center gap-6 text-sm text-white/80">
|
|
101
101
|
<span>Need an account?</span>
|
|
102
102
|
<Link
|
|
103
|
-
href=
|
|
103
|
+
href={buildPath('/register')}
|
|
104
104
|
className="inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2 font-semibold transition hover:bg-white/25"
|
|
105
105
|
>
|
|
106
106
|
Create one now
|
|
@@ -159,7 +159,7 @@ export function LoginScreen() {
|
|
|
159
159
|
Remember me
|
|
160
160
|
</label>
|
|
161
161
|
<Link
|
|
162
|
-
href=
|
|
162
|
+
href={buildPath('/forgot-password')}
|
|
163
163
|
className="font-medium text-primary-600 transition hover:text-primary-700"
|
|
164
164
|
>
|
|
165
165
|
Forgot password?
|
|
@@ -115,7 +115,7 @@ export function RegisterScreen() {
|
|
|
115
115
|
<div className="flex items-center gap-6 text-sm text-white/80">
|
|
116
116
|
<span>Already part of the community?</span>
|
|
117
117
|
<Link
|
|
118
|
-
href=
|
|
118
|
+
href={buildPath('/login')}
|
|
119
119
|
className="inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2 font-semibold transition hover:bg-white/25"
|
|
120
120
|
>
|
|
121
121
|
Sign in
|
|
@@ -206,12 +206,12 @@ export function RegisterScreen() {
|
|
|
206
206
|
<Shield className="mt-0.5 h-5 w-5 text-primary-500" />
|
|
207
207
|
<span>
|
|
208
208
|
By creating an account, you agree to our{' '}
|
|
209
|
-
<Link href=
|
|
209
|
+
<Link href={buildPath('/terms')} className="font-semibold text-primary-600 hover:text-primary-700">
|
|
210
210
|
Terms of Service
|
|
211
211
|
</Link>{' '}
|
|
212
212
|
and{' '}
|
|
213
213
|
<Link
|
|
214
|
-
href=
|
|
214
|
+
href={buildPath('/privacy')}
|
|
215
215
|
className="font-semibold text-primary-600 hover:text-primary-700"
|
|
216
216
|
>
|
|
217
217
|
Privacy Policy
|