hey-pharmacist-ecommerce 1.1.41 → 1.1.43
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/README.md +70 -8
- package/dist/index.d.mts +380 -2364
- package/dist/index.d.ts +380 -2364
- package/dist/index.js +576 -615
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +576 -612
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/AccountAddressesTab.tsx +9 -9
- package/src/components/AccountOrdersTab.tsx +11 -11
- package/src/components/AccountOverviewTab.tsx +26 -26
- package/src/components/AccountPaymentTab.tsx +2 -2
- package/src/components/AccountReviewsTab.tsx +1 -1
- package/src/components/AccountSettingsTab.tsx +6 -6
- package/src/components/AddressFormModal.tsx +2 -2
- package/src/components/CartItem.tsx +15 -15
- package/src/components/FilterChips.tsx +7 -7
- package/src/components/Footer.tsx +9 -9
- package/src/components/Header.tsx +7 -7
- package/src/components/Notification.tsx +3 -3
- package/src/components/NotificationBell.tsx +3 -3
- package/src/components/NotificationDrawer.tsx +1 -1
- package/src/components/NotificationModal.tsx +1 -1
- package/src/components/OrderCard.tsx +2 -2
- package/src/components/ProductCard.tsx +13 -13
- package/src/components/QuickViewModal.tsx +28 -28
- package/src/components/ReviewCard.tsx +6 -6
- package/src/components/TabNavigation.tsx +2 -2
- package/src/components/ui/Badge.tsx +2 -2
- package/src/components/ui/Button.tsx +3 -3
- package/src/components/ui/ConfirmModal.tsx +3 -3
- package/src/components/ui/Input.tsx +1 -1
- package/src/lib/Apis/api.ts +0 -1
- package/src/lib/Apis/models/group-with-no-users-dto.ts +0 -6
- package/src/lib/Apis/models/group-with-users-dto.ts +0 -6
- package/src/lib/Apis/models/index.ts +0 -35
- package/src/lib/Apis/models/order.ts +0 -6
- package/src/lib/Apis/models/populated-order.ts +0 -6
- package/src/lib/Apis/models/preference-update-item.ts +1 -0
- package/src/lib/Apis/models/update-user-dto.ts +0 -6
- package/src/lib/Apis/models/user-group.ts +0 -6
- package/src/lib/Apis/models/user-with-no-id.ts +0 -6
- package/src/lib/Apis/sharedConfig.ts +1 -1
- package/src/providers/ThemeProvider.tsx +2 -2
- package/src/screens/AddressesScreen.tsx +6 -6
- package/src/screens/CartScreen.tsx +23 -23
- package/src/screens/ChangePasswordScreen.tsx +2 -2
- package/src/screens/CheckoutScreen.tsx +28 -28
- package/src/screens/CurrentOrdersScreen.tsx +4 -4
- package/src/screens/EditProfileScreen.tsx +1 -1
- package/src/screens/ForgotPasswordScreen.tsx +11 -11
- package/src/screens/LoginScreen.tsx +12 -12
- package/src/screens/OrderDetailScreen.tsx +30 -30
- package/src/screens/OrdersScreen.tsx +3 -3
- package/src/screens/ProductDetailScreen.tsx +59 -59
- package/src/screens/ProfileScreen.tsx +2 -2
- package/src/screens/RegisterScreen.tsx +15 -15
- package/src/screens/ResetPasswordScreen.tsx +14 -14
- package/src/screens/SearchResultsScreen.tsx +7 -7
- package/src/screens/ShopScreen.tsx +55 -55
- package/src/screens/WishlistScreen.tsx +22 -22
- package/src/styles/globals.css +43 -43
- package/src/lib/Apis/apis/marketing-api.ts +0 -3099
- package/src/lib/Apis/models/add-contact-to-list-dto.ts +0 -33
- package/src/lib/Apis/models/browser-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-content-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-draft-dto.ts +0 -175
- package/src/lib/Apis/models/campaign-draft-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-draft-schedule-dto.ts +0 -49
- package/src/lib/Apis/models/campaign-draft-schedule-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-draft-sending-dto.ts +0 -43
- package/src/lib/Apis/models/campaign-draft-sending-response-dto.ts +0 -40
- package/src/lib/Apis/models/contact-aggregated-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/contact-full-dto.ts +0 -93
- package/src/lib/Apis/models/contact-full-response-dto.ts +0 -40
- package/src/lib/Apis/models/contact-list-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/contact-lists-response-dto.ts +0 -40
- package/src/lib/Apis/models/country-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/create-contact-dto.ts +0 -39
- package/src/lib/Apis/models/create-contact-list-dto.ts +0 -27
- package/src/lib/Apis/models/create-email-template-dto.ts +0 -51
- package/src/lib/Apis/models/create-marketing-campaign-dto.ts +0 -81
- package/src/lib/Apis/models/email-template-response-dto.ts +0 -117
- package/src/lib/Apis/models/general-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/link-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/marketing-campaign-content-dto.ts +0 -27
- package/src/lib/Apis/models/marketing-list-contact-dto.ts +0 -51
- package/src/lib/Apis/models/schedule-campaign-draft-dto.ts +0 -27
- package/src/lib/Apis/models/send-test-email-dto.ts +0 -28
- package/src/lib/Apis/models/single-browser-stats-dto.ts +0 -45
- package/src/lib/Apis/models/single-contact-aggregated-stats-dto.ts +0 -129
- package/src/lib/Apis/models/single-contact-list-stats-dto.ts +0 -117
- package/src/lib/Apis/models/single-country-stats-dto.ts +0 -39
- package/src/lib/Apis/models/single-general-stats.ts +0 -153
- package/src/lib/Apis/models/single-link-stats-dto.ts +0 -39
- package/src/lib/Apis/models/single-recipient-dto.ts +0 -33
- package/src/lib/Apis/models/update-campaign-draft-content-dto.ts +0 -27
- package/src/lib/Apis/models/update-marketing-camp-draft-dto.ts +0 -81
|
@@ -41,7 +41,7 @@ export function ThemeProvider({ config, children }: ThemeProviderProps) {
|
|
|
41
41
|
vars.push(`--hp-secondary: ${config.colors.secondary}`);
|
|
42
42
|
vars.push(`--hp-accent: ${config.colors.accent}`);
|
|
43
43
|
vars.push(`--hp-accent-dark: ${config.colors.accentDark}`);
|
|
44
|
-
vars.push(`--hp-text-
|
|
44
|
+
vars.push(`--hp-text-hmuted: ${config.colors.textMuted}`);
|
|
45
45
|
|
|
46
46
|
// Shaded colors (namespaced)
|
|
47
47
|
Object.entries(primaryShades).forEach(([shade, rgb]) => {
|
|
@@ -70,7 +70,7 @@ export function ThemeProvider({ config, children }: ThemeProviderProps) {
|
|
|
70
70
|
root.style.setProperty('--hp-secondary', config.colors.secondary);
|
|
71
71
|
root.style.setProperty('--hp-accent', config.colors.accent);
|
|
72
72
|
root.style.setProperty('--hp-accent-dark', config.colors.accentDark);
|
|
73
|
-
root.style.setProperty('--hp-text-
|
|
73
|
+
root.style.setProperty('--hp-text-hmuted', config.colors.textMuted);
|
|
74
74
|
|
|
75
75
|
// Set shaded color variables (namespaced)
|
|
76
76
|
Object.entries(primaryShades).forEach(([shade, rgb]) => {
|
|
@@ -247,7 +247,7 @@ export function AddressesScreen() {
|
|
|
247
247
|
</p>
|
|
248
248
|
<div className="flex flex-wrap gap-3 text-xs text-slate-500">
|
|
249
249
|
<span className="inline-flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-2">
|
|
250
|
-
<Sparkles className="h-4 w-4 text-
|
|
250
|
+
<Sparkles className="h-4 w-4 text-hprimary-600" />
|
|
251
251
|
Default: {defaultAddress ? defaultAddress.name : 'Not set'}
|
|
252
252
|
</span>
|
|
253
253
|
</div>
|
|
@@ -328,7 +328,7 @@ export function AddressesScreen() {
|
|
|
328
328
|
key={address.id}
|
|
329
329
|
initial={{ opacity: 0, y: 24 }}
|
|
330
330
|
animate={{ opacity: 1, y: 0 }}
|
|
331
|
-
className="group relative flex h-full flex-col rounded-3xl border border-slate-200 bg-white p-6 shadow-xs transition hover:-translate-y-1 hover:border-
|
|
331
|
+
className="group relative flex h-full flex-col rounded-3xl border border-slate-200 bg-white p-6 shadow-xs transition hover:-translate-y-1 hover:border-hprimary-200 hover:shadow-lg"
|
|
332
332
|
>
|
|
333
333
|
{address.isDefault && (
|
|
334
334
|
<span className="absolute right-6 top-6 inline-flex items-center gap-2 rounded-full bg-amber-100 px-3 py-1 text-xs font-semibold text-amber-700">
|
|
@@ -337,7 +337,7 @@ export function AddressesScreen() {
|
|
|
337
337
|
</span>
|
|
338
338
|
)}
|
|
339
339
|
<div className="flex items-center gap-3">
|
|
340
|
-
<span className="rounded-full bg-
|
|
340
|
+
<span className="rounded-full bg-hprimary-50 p-3 text-hprimary-600">
|
|
341
341
|
<User className="h-5 w-5" />
|
|
342
342
|
</span>
|
|
343
343
|
<div>
|
|
@@ -362,7 +362,7 @@ export function AddressesScreen() {
|
|
|
362
362
|
<button
|
|
363
363
|
type="button"
|
|
364
364
|
onClick={() => openEditModal(address)}
|
|
365
|
-
className="inline-flex items-center gap-2 rounded-full border border-slate-200 px-3 py-1 text-sm font-medium text-slate-600 transition hover:border-
|
|
365
|
+
className="inline-flex items-center gap-2 rounded-full border border-slate-200 px-3 py-1 text-sm font-medium text-slate-600 transition hover:border-hprimary-300 hover:text-hprimary-600"
|
|
366
366
|
>
|
|
367
367
|
<Edit3 className="h-4 w-4" />
|
|
368
368
|
Edit
|
|
@@ -463,7 +463,7 @@ export function AddressesScreen() {
|
|
|
463
463
|
<span className="text-sm font-semibold text-slate-700">Address type</span>
|
|
464
464
|
<select
|
|
465
465
|
{...register('addressType')}
|
|
466
|
-
className="rounded-xl border border-slate-200 px-3 py-2 text-sm text-slate-700 focus:border-
|
|
466
|
+
className="rounded-xl border border-slate-200 px-3 py-2 text-sm text-slate-700 focus:border-hprimary-400 focus:outline-hidden focus:ring-2 focus:ring-hprimary-500/20"
|
|
467
467
|
>
|
|
468
468
|
<option value="Shipping">Shipping</option>
|
|
469
469
|
<option value="Billing">Billing</option>
|
|
@@ -475,7 +475,7 @@ export function AddressesScreen() {
|
|
|
475
475
|
<input
|
|
476
476
|
type="checkbox"
|
|
477
477
|
{...register('isDefault')}
|
|
478
|
-
className="h-4 w-4 rounded-sm border-
|
|
478
|
+
className="h-4 w-4 rounded-sm border-hprimary-300 text-hprimary-600 focus:ring-hprimary-500"
|
|
479
479
|
/>
|
|
480
480
|
</label>
|
|
481
481
|
</div>
|
|
@@ -42,15 +42,15 @@ export function CartScreen() {
|
|
|
42
42
|
>
|
|
43
43
|
<div className="flex justify-center">
|
|
44
44
|
<div className="rounded-full bg-gray-100 p-6">
|
|
45
|
-
<ShoppingBag className="h-12 w-12 text-
|
|
45
|
+
<ShoppingBag className="h-12 w-12 text-hsecondary" />
|
|
46
46
|
</div>
|
|
47
47
|
</div>
|
|
48
48
|
|
|
49
49
|
<div className="space-y-2">
|
|
50
|
-
<h2 className="text-2xl font-bold text-
|
|
50
|
+
<h2 className="text-2xl font-bold text-hsecondary">
|
|
51
51
|
Your cart is empty
|
|
52
52
|
</h2>
|
|
53
|
-
<p className="text-
|
|
53
|
+
<p className="text-hmuted">
|
|
54
54
|
Start adding products to your cart to see them here.
|
|
55
55
|
</p>
|
|
56
56
|
</div>
|
|
@@ -59,7 +59,7 @@ export function CartScreen() {
|
|
|
59
59
|
<button
|
|
60
60
|
type="button"
|
|
61
61
|
onClick={() => router.push(buildPath('/shop'))}
|
|
62
|
-
className="rounded-xl border-2 border-
|
|
62
|
+
className="rounded-xl border-2 border-hprimary bg-hsecondary text-white px-6 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2 hover:opacity-80"
|
|
63
63
|
>
|
|
64
64
|
Discover products
|
|
65
65
|
<ArrowRight className="h-5 w-5" />
|
|
@@ -68,15 +68,15 @@ export function CartScreen() {
|
|
|
68
68
|
|
|
69
69
|
<div className="mt-8 space-y-3 pt-6 border-t border-gray-200">
|
|
70
70
|
<div className="flex items-start gap-3 text-sm text-slate-600">
|
|
71
|
-
<CheckCircle2 className="h-5 w-5 text-
|
|
71
|
+
<CheckCircle2 className="h-5 w-5 text-hsecondary shrink-0 mt-0.5" />
|
|
72
72
|
<span>Free shipping on all orders</span>
|
|
73
73
|
</div>
|
|
74
74
|
<div className="flex items-start gap-3 text-sm text-slate-600">
|
|
75
|
-
<CheckCircle2 className="h-5 w-5 text-
|
|
75
|
+
<CheckCircle2 className="h-5 w-5 text-hsecondary shrink-0 mt-0.5" />
|
|
76
76
|
<span>Easy returns within 30 days</span>
|
|
77
77
|
</div>
|
|
78
78
|
<div className="flex items-start gap-3 text-sm text-slate-600">
|
|
79
|
-
<CheckCircle2 className="h-5 w-5 text-
|
|
79
|
+
<CheckCircle2 className="h-5 w-5 text-hsecondary shrink-0 mt-0.5" />
|
|
80
80
|
<span>Secure checkout process</span>
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
@@ -109,14 +109,14 @@ export function CartScreen() {
|
|
|
109
109
|
|
|
110
110
|
return (
|
|
111
111
|
<div className="min-h-screen bg-white">
|
|
112
|
-
<div className="max-w-[1400px] mx-auto px-
|
|
113
|
-
<div className="
|
|
112
|
+
<div className="max-w-[1400px] mx-auto px-4 md:px-12">
|
|
113
|
+
<div className="py-8">
|
|
114
114
|
{/* Header */}
|
|
115
|
-
<div className="mb-12">
|
|
116
|
-
<h1 className="font-
|
|
115
|
+
<div className="mb-8 md:mb-12">
|
|
116
|
+
<h1 className="font-semibold text-hsecondary tracking-[-1px] md:tracking-[-2px] mb-2 text-3xl md:text-4xl">
|
|
117
117
|
Shopping Cart
|
|
118
118
|
</h1>
|
|
119
|
-
<p className="
|
|
119
|
+
<p className="text-[14px] md:text-[16px] text-hmuted">
|
|
120
120
|
{itemCount} {itemCount === 1 ? 'item' : 'items'} in your cart
|
|
121
121
|
</p>
|
|
122
122
|
</div>
|
|
@@ -148,15 +148,15 @@ export function CartScreen() {
|
|
|
148
148
|
initial={{ opacity: 0, y: 24 }}
|
|
149
149
|
animate={{ opacity: 1, y: 0 }}
|
|
150
150
|
transition={{ delay: 0.1 }}
|
|
151
|
-
className="
|
|
151
|
+
className="lg:sticky lg:top-24 h-fit lg:col-span-1"
|
|
152
152
|
>
|
|
153
|
-
<div className="bg-linear-to-br from-
|
|
154
|
-
<h2 className="font-
|
|
153
|
+
<div className="bg-hsecondary/[0.03] md:bg-linear-to-br md:from-hsecondary/10 md:to-hsecondary/10 rounded-[24px] p-6 md:p-8 border-2 border-hsecondary/10 md:border-hsecondary/20 lg:sticky lg:top-24">
|
|
154
|
+
<h2 className="font-semibold text-hsecondary mb-6">Order Summary</h2>
|
|
155
155
|
|
|
156
156
|
<div className="space-y-4 mb-6">
|
|
157
157
|
<div className="flex items-center justify-between">
|
|
158
|
-
<span className="
|
|
159
|
-
<span className="font-
|
|
158
|
+
<span className="text-[14px] text-hmuted">Subtotal ({itemCount} {itemCount === 1 ? 'item' : 'items'})</span>
|
|
159
|
+
<span className="font-semibold text-[14px] text-hsecondary">{formatPrice(subtotal)}</span>
|
|
160
160
|
</div>
|
|
161
161
|
<div className="flex items-center justify-between text-sm">
|
|
162
162
|
<span className="text-gray-600">Shipping</span>
|
|
@@ -166,8 +166,8 @@ export function CartScreen() {
|
|
|
166
166
|
</div>
|
|
167
167
|
<div className="border-t border-gray-200 pt-4 mt-4">
|
|
168
168
|
<div className="flex items-center justify-between">
|
|
169
|
-
<span className="text-lg font-bold text-
|
|
170
|
-
<span className="text-2xl font-bold text-
|
|
169
|
+
<span className="text-lg font-bold text-hsecondary">Total</span>
|
|
170
|
+
<span className="text-2xl font-bold text-hprimary">{formatPrice(total)}</span>
|
|
171
171
|
</div>
|
|
172
172
|
</div>
|
|
173
173
|
</div>
|
|
@@ -176,7 +176,7 @@ export function CartScreen() {
|
|
|
176
176
|
<button
|
|
177
177
|
type="submit"
|
|
178
178
|
onClick={handleSubmit}
|
|
179
|
-
className="w-full rounded-full border-2 border-
|
|
179
|
+
className="w-full rounded-full border-2 border-hsecondary bg-hsecondary hover:bg-hsecondary/80 text-white px-4 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2"
|
|
180
180
|
>
|
|
181
181
|
Proceed to Checkout
|
|
182
182
|
<ArrowRight className="h-5 w-5" />
|
|
@@ -192,17 +192,17 @@ export function CartScreen() {
|
|
|
192
192
|
|
|
193
193
|
<div className="mt-6 space-y-3 pt-6 border-t border-gray-200">
|
|
194
194
|
<div className="flex items-start gap-3 text-sm text-slate-600">
|
|
195
|
-
<CheckCircle2 className="h-5 w-5 text-
|
|
195
|
+
<CheckCircle2 className="h-5 w-5 text-hmuted shrink-0 mt-0.5" />
|
|
196
196
|
<span>Easy returns within 30 days</span>
|
|
197
197
|
</div>
|
|
198
198
|
<div className="flex items-start gap-3 text-sm text-slate-600">
|
|
199
|
-
<CheckCircle2 className="h-5 w-5 text-
|
|
199
|
+
<CheckCircle2 className="h-5 w-5 text-hmuted shrink-0 mt-0.5" />
|
|
200
200
|
<span>Secure checkout process</span>
|
|
201
201
|
</div>
|
|
202
202
|
</div>
|
|
203
203
|
</div>
|
|
204
204
|
|
|
205
|
-
{/* <div className="rounded-3xl border border-
|
|
205
|
+
{/* <div className="rounded-3xl border border-hprimary-100 bg-hprimary-50/70 p-6 text-sm text-hprimary-700 shadow-xs">
|
|
206
206
|
<p className="font-semibold uppercase tracking-[0.3em]">Need help?</p>
|
|
207
207
|
<p className="mt-2 leading-relaxed">
|
|
208
208
|
Chat with a pharmacist to optimize your regimen or discuss substitutions before you
|
|
@@ -74,7 +74,7 @@ export function ChangePasswordScreen() {
|
|
|
74
74
|
className="mx-auto max-w-2xl rounded-3xl border border-slate-200 bg-white p-8 shadow-xl shadow-primary-50"
|
|
75
75
|
>
|
|
76
76
|
<div className="flex items-center gap-3">
|
|
77
|
-
<span className="flex h-11 w-11 items-center justify-center rounded-2xl bg-
|
|
77
|
+
<span className="flex h-11 w-11 items-center justify-center rounded-2xl bg-hprimary-50 text-hprimary-600">
|
|
78
78
|
<Lock className="h-5 w-5" />
|
|
79
79
|
</span>
|
|
80
80
|
<div>
|
|
@@ -143,7 +143,7 @@ export function ChangePasswordScreen() {
|
|
|
143
143
|
</form>
|
|
144
144
|
|
|
145
145
|
<div className="mt-6 flex items-center gap-2 rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-600">
|
|
146
|
-
<ShieldCheck className="h-4 w-4 text-
|
|
146
|
+
<ShieldCheck className="h-4 w-4 text-hprimary-600" />
|
|
147
147
|
Strong passwords and up-to-date contact details help pharmacists verify changes quickly.
|
|
148
148
|
</div>
|
|
149
149
|
</motion.div>
|
|
@@ -557,10 +557,10 @@ export function CheckoutScreen() {
|
|
|
557
557
|
>
|
|
558
558
|
{/* Header */}
|
|
559
559
|
<div className="mb-12">
|
|
560
|
-
<h1 className="font-
|
|
560
|
+
<h1 className="font-semibold text-[#2B4B7C] mb-2 text-3xl">
|
|
561
561
|
Checkout
|
|
562
562
|
</h1>
|
|
563
|
-
<p className="
|
|
563
|
+
<p className="text-[14px] text-[#676c80] text-md leading-relaxed">
|
|
564
564
|
Complete your order information below
|
|
565
565
|
</p>
|
|
566
566
|
</div>
|
|
@@ -595,13 +595,13 @@ export function CheckoutScreen() {
|
|
|
595
595
|
}
|
|
596
596
|
}}
|
|
597
597
|
className={`relative flex w-full items-center justify-between rounded-xl border-2 p-3 transition-all duration-200 ${active
|
|
598
|
-
? 'border-
|
|
599
|
-
: 'border-gray-200 hover:border-
|
|
598
|
+
? 'border-hprimary-500 bg-hprimary-50'
|
|
599
|
+
: 'border-gray-200 hover:border-hprimary-300'
|
|
600
600
|
}`}
|
|
601
601
|
>
|
|
602
602
|
<div className="flex items-center gap-3">
|
|
603
603
|
<div
|
|
604
|
-
className={`p-2 rounded-lg ${active ? 'bg-
|
|
604
|
+
className={`p-2 rounded-lg ${active ? 'bg-hprimary-100 text-hprimary-600' : 'bg-gray-100 text-gray-600'
|
|
605
605
|
}`}
|
|
606
606
|
>
|
|
607
607
|
{option.icon}
|
|
@@ -612,7 +612,7 @@ export function CheckoutScreen() {
|
|
|
612
612
|
</div>
|
|
613
613
|
</div>
|
|
614
614
|
{active && (
|
|
615
|
-
<div className="w-5 h-5 rounded-full bg-
|
|
615
|
+
<div className="w-5 h-5 rounded-full bg-hprimary-500 flex items-center justify-center shrink-0">
|
|
616
616
|
<Check className="w-3 h-3 text-white" />
|
|
617
617
|
</div>
|
|
618
618
|
)}
|
|
@@ -694,7 +694,7 @@ export function CheckoutScreen() {
|
|
|
694
694
|
<section className="bg-white border-2 border-gray-100 rounded-[24px] p-8 text-[#2B4B7C]">
|
|
695
695
|
<div className="flex flex-wrap items-center justify-between gap-4">
|
|
696
696
|
<div>
|
|
697
|
-
<h2 className="font-
|
|
697
|
+
<h2 className="font-semibold text-[#2B4B7C] mb-2 text-2xl">
|
|
698
698
|
{isDelivery ? 'Delivery Address' : 'Contact Information'}
|
|
699
699
|
</h2>
|
|
700
700
|
<p className="text-sm text-slate-500">
|
|
@@ -726,9 +726,9 @@ export function CheckoutScreen() {
|
|
|
726
726
|
<label
|
|
727
727
|
key={addr.id}
|
|
728
728
|
className={`group relative flex items-start gap-3 p-4 rounded-2xl border ${selectedAddressId === addr.id
|
|
729
|
-
? 'border-
|
|
729
|
+
? 'border-hprimary-500 bg-hprimary-50 shadow-xs'
|
|
730
730
|
: 'border-slate-200 bg-white'
|
|
731
|
-
} cursor-pointer hover:border-
|
|
731
|
+
} cursor-pointer hover:border-hprimary-300 transition-colors`}
|
|
732
732
|
>
|
|
733
733
|
<input
|
|
734
734
|
type="radio"
|
|
@@ -763,14 +763,14 @@ export function CheckoutScreen() {
|
|
|
763
763
|
)}
|
|
764
764
|
<div className="mt-3 flex items-center gap-2">
|
|
765
765
|
{addr.isDefault && (
|
|
766
|
-
<span className="inline-flex items-center gap-1 rounded-full bg-
|
|
766
|
+
<span className="inline-flex items-center gap-1 rounded-full bg-hprimary-100 px-2.5 py-0.5 text-xs font-semibold text-hprimary-700">
|
|
767
767
|
Default
|
|
768
768
|
</span>
|
|
769
769
|
)}
|
|
770
770
|
<button
|
|
771
771
|
type="button"
|
|
772
772
|
onClick={(e) => { e.preventDefault(); setEditingAddress(addr); setIsAddressModalOpen(true); }}
|
|
773
|
-
className="inline-flex items-center gap-1 rounded-full border border-slate-200 px-2.5 py-0.5 text-xs font-medium text-slate-600 hover:border-
|
|
773
|
+
className="inline-flex items-center gap-1 rounded-full border border-slate-200 px-2.5 py-0.5 text-xs font-medium text-slate-600 hover:border-hprimary-300 hover:text-hprimary-600"
|
|
774
774
|
>
|
|
775
775
|
<Edit3 className="h-3.5 w-3.5" /> Edit
|
|
776
776
|
</button>
|
|
@@ -828,12 +828,12 @@ export function CheckoutScreen() {
|
|
|
828
828
|
<div className="bg-white border-2 border-gray-100 rounded-[24px] p-8 text-[#2B4B7C]">
|
|
829
829
|
<div className="flex items-center gap-3 text-xl font-semibold text-gray-900 pb-4 mb-8 border-b">
|
|
830
830
|
<Truck className="w-8 h-8 flex items-center justify-center text-[#2B4B7C]" />
|
|
831
|
-
<h2 className="font-
|
|
831
|
+
<h2 className="font-semibold text-[#2B4B7C] text-2xl">Shipping Options</h2>
|
|
832
832
|
</div>
|
|
833
833
|
|
|
834
834
|
{shippingRatesLoading ? (
|
|
835
835
|
<div className="flex items-center justify-center py-12">
|
|
836
|
-
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-
|
|
836
|
+
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-haccent"></div>
|
|
837
837
|
<span className="ml-3 text-gray-600">Loading shipping options...</span>
|
|
838
838
|
</div>
|
|
839
839
|
) : shippingRatesError ? (
|
|
@@ -861,7 +861,7 @@ export function CheckoutScreen() {
|
|
|
861
861
|
setShippingPrice(parseFloat(rate.amount));
|
|
862
862
|
}}
|
|
863
863
|
className={`relative p-5 border-2 rounded-xl cursor-pointer transition-all duration-200 hover:shadow-md ${isSelected
|
|
864
|
-
? 'border-
|
|
864
|
+
? 'border-hprimary-500 bg-hprimary-50 ring-2 ring-hprimary-200'
|
|
865
865
|
: 'border-gray-200 hover:border-gray-300'
|
|
866
866
|
}`}
|
|
867
867
|
>
|
|
@@ -889,7 +889,7 @@ export function CheckoutScreen() {
|
|
|
889
889
|
{rate.provider} {rate.servicelevel?.name}
|
|
890
890
|
</h3>
|
|
891
891
|
{isTest && (
|
|
892
|
-
<span className="px-2 py-1 text-xs font-medium bg-
|
|
892
|
+
<span className="px-2 py-1 text-xs font-medium bg-hprimary-100 text-hprimary-800 rounded-full">
|
|
893
893
|
TEST
|
|
894
894
|
</span>
|
|
895
895
|
)}
|
|
@@ -947,7 +947,7 @@ export function CheckoutScreen() {
|
|
|
947
947
|
{/* Selection Indicator */}
|
|
948
948
|
{isSelected && (
|
|
949
949
|
<div className="absolute top-3 right-3">
|
|
950
|
-
<div className="w-6 h-6 bg-
|
|
950
|
+
<div className="w-6 h-6 bg-hprimary-500 rounded-full flex items-center justify-center">
|
|
951
951
|
<CheckIcon className="w-4 h-4 text-white" />
|
|
952
952
|
</div>
|
|
953
953
|
</div>
|
|
@@ -979,8 +979,8 @@ export function CheckoutScreen() {
|
|
|
979
979
|
className="space-y-10 lg:sticky lg:top-24 lg:col-span-1"
|
|
980
980
|
>
|
|
981
981
|
{/* Order Summary */}
|
|
982
|
-
<div className="bg-linear-to-br from-
|
|
983
|
-
<h2 className="font-
|
|
982
|
+
<div className="bg-linear-to-br from-hsecondary/10 to-hsecondary/10 rounded-[24px] p-8 border-2 border-hsecondary/20 sticky top-24">
|
|
983
|
+
<h2 className="font-semibold text-hsecondary mb-6 text-2xl">Order Summary</h2>
|
|
984
984
|
|
|
985
985
|
|
|
986
986
|
{/* Cart Summary */}
|
|
@@ -992,13 +992,13 @@ export function CheckoutScreen() {
|
|
|
992
992
|
<Image src={item.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC} alt={item.productVariantData.name} className="w-full h-full object-cover" height={200} width={200} />
|
|
993
993
|
</div>
|
|
994
994
|
<div className="flex-1 min-w-0">
|
|
995
|
-
<p className="font-
|
|
995
|
+
<p className="font-medium text-[12px] text-[#2B4B7C] mb-1">
|
|
996
996
|
{item?.productVariantData?.name}
|
|
997
997
|
</p>
|
|
998
|
-
<p className="
|
|
998
|
+
<p className="text-[11px] text-[#676c80]">
|
|
999
999
|
{item?.productVariantData?.brand} • Qty: {item.quantity}
|
|
1000
1000
|
</p>
|
|
1001
|
-
<p className="font-
|
|
1001
|
+
<p className="font-semibold text-[12px] text-hsecondary mt-1">
|
|
1002
1002
|
{formatPrice(item.productVariantData.finalPrice * item.quantity)}
|
|
1003
1003
|
</p>
|
|
1004
1004
|
</div>
|
|
@@ -1006,7 +1006,7 @@ export function CheckoutScreen() {
|
|
|
1006
1006
|
))}
|
|
1007
1007
|
</div>
|
|
1008
1008
|
|
|
1009
|
-
<div className="h-px bg-
|
|
1009
|
+
<div className="h-px bg-hsecondary/20 my-4" />
|
|
1010
1010
|
|
|
1011
1011
|
{/* Coupon Code Section */}
|
|
1012
1012
|
<div className="mb-6">
|
|
@@ -1042,11 +1042,11 @@ export function CheckoutScreen() {
|
|
|
1042
1042
|
<span>Estimated tax</span>
|
|
1043
1043
|
<span className="font-semibold">{formatPrice(tax)}</span>
|
|
1044
1044
|
</div>
|
|
1045
|
-
<div className="h-px bg-
|
|
1045
|
+
<div className="h-px bg-hsecondary/20 mt-6" />
|
|
1046
1046
|
|
|
1047
1047
|
<div className="flex items-center justify-between mb-6">
|
|
1048
|
-
<span className="font-
|
|
1049
|
-
<span className="font-
|
|
1048
|
+
<span className="font-semibold text-[16px] text-hsecondary">Total</span>
|
|
1049
|
+
<span className="font-bold text-[24px] text-hsecondary">{formatPrice(total)}</span>
|
|
1050
1050
|
</div>
|
|
1051
1051
|
{/* <p className="mt-1 text-xs text-slate-500">
|
|
1052
1052
|
Tax is estimated. Final amount confirmed after payment.
|
|
@@ -1054,8 +1054,8 @@ export function CheckoutScreen() {
|
|
|
1054
1054
|
</div>
|
|
1055
1055
|
|
|
1056
1056
|
<div className="bg-white/80 rounded-xl p-4">
|
|
1057
|
-
<p className="
|
|
1058
|
-
<strong className="text-
|
|
1057
|
+
<p className="text-[11px] text-[#676c80] leading-[1.6]">
|
|
1058
|
+
<strong className="text-hsecondary">Payment:</strong> We'll contact you to arrange payment upon pickup or delivery. We accept cash, credit cards, and all major payment methods.
|
|
1059
1059
|
</p>
|
|
1060
1060
|
</div>
|
|
1061
1061
|
</section>
|
|
@@ -1093,7 +1093,7 @@ export function CheckoutScreen() {
|
|
|
1093
1093
|
<button
|
|
1094
1094
|
type="submit"
|
|
1095
1095
|
disabled={isSubmitting}
|
|
1096
|
-
className="font-
|
|
1096
|
+
className="font-medium text-[14px] px-6 py-3 rounded-full text-white hover:bg-[#d66f45] hover:shadow-lg transition-all duration-300 mt-4 w-full bg-hsecondary hover:bg-[#2B4B7C] flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1097
1097
|
>
|
|
1098
1098
|
<CreditCard className="h-5 w-5" />
|
|
1099
1099
|
{isSubmitting ? 'Placing order...' : 'Place Secure Order'}
|
|
@@ -112,21 +112,21 @@ export function CurrentOrdersScreen() {
|
|
|
112
112
|
</h2>
|
|
113
113
|
<div className="mt-4 space-y-4 text-sm text-slate-600">
|
|
114
114
|
<div className="flex items-start gap-3 rounded-2xl bg-slate-50 p-4">
|
|
115
|
-
<Warehouse className="h-5 w-5 text-
|
|
115
|
+
<Warehouse className="h-5 w-5 text-hprimary-500" />
|
|
116
116
|
<div>
|
|
117
117
|
<p className="font-semibold text-slate-800">Preparation</p>
|
|
118
118
|
<p>Our pharmacists verify ingredients and pack thermo-sensitive items.</p>
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
121
|
<div className="flex items-start gap-3 rounded-2xl bg-slate-50 p-4">
|
|
122
|
-
<Truck className="h-5 w-5 text-
|
|
122
|
+
<Truck className="h-5 w-5 text-hprimary-500" />
|
|
123
123
|
<div>
|
|
124
124
|
<p className="font-semibold text-slate-800">In transit</p>
|
|
125
125
|
<p>Track live courier location with ETA updates tailored to your delivery window.</p>
|
|
126
126
|
</div>
|
|
127
127
|
</div>
|
|
128
128
|
<div className="flex items-start gap-3 rounded-2xl bg-slate-50 p-4">
|
|
129
|
-
<BellRing className="h-5 w-5 text-
|
|
129
|
+
<BellRing className="h-5 w-5 text-hprimary-500" />
|
|
130
130
|
<div>
|
|
131
131
|
<p className="font-semibold text-slate-800">Arrival alerts</p>
|
|
132
132
|
<p>Receive SMS and email notifications when parcels are out for delivery.</p>
|
|
@@ -135,7 +135,7 @@ export function CurrentOrdersScreen() {
|
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
|
-
<div className="rounded-3xl border border-
|
|
138
|
+
<div className="rounded-3xl border border-hprimary-100 bg-hprimary-50/70 p-6 text-sm text-hprimary-700 shadow-xs">
|
|
139
139
|
<p className="font-semibold uppercase tracking-[0.3em]">Need support?</p>
|
|
140
140
|
<p className="mt-3 leading-relaxed">
|
|
141
141
|
Our fulfillment team is online 7 days a week. Message us if you need to adjust
|
|
@@ -75,7 +75,7 @@ export function EditProfileScreen() {
|
|
|
75
75
|
className="mx-auto max-w-3xl rounded-3xl border border-slate-200 bg-white p-8 shadow-xl shadow-primary-50"
|
|
76
76
|
>
|
|
77
77
|
<div className="flex items-center gap-3">
|
|
78
|
-
<span className="flex h-11 w-11 items-center justify-center rounded-2xl bg-
|
|
78
|
+
<span className="flex h-11 w-11 items-center justify-center rounded-2xl bg-hprimary-50 text-hprimary-600">
|
|
79
79
|
<User className="h-5 w-5" />
|
|
80
80
|
</span>
|
|
81
81
|
<div>
|
|
@@ -67,10 +67,10 @@ export function ForgotPasswordScreen() {
|
|
|
67
67
|
<div className="space-y-2">
|
|
68
68
|
<Mail
|
|
69
69
|
strokeWidth={2}
|
|
70
|
-
className="h-16 w-16 mx-auto text-white rounded-full bg-
|
|
70
|
+
className="h-16 w-16 mx-auto text-white rounded-full bg-hsecondary m-2 mb-4 px-4"
|
|
71
71
|
/>
|
|
72
|
-
<h2 className="text-4xl text-
|
|
73
|
-
<p className="text-sm text-
|
|
72
|
+
<h2 className="text-4xl text-hsecondary">Forgot Password?</h2>
|
|
73
|
+
<p className="text-sm text-hmuted">
|
|
74
74
|
No worries! Enter your email and we'll send you reset instructions.
|
|
75
75
|
</p>
|
|
76
76
|
</div>
|
|
@@ -95,23 +95,23 @@ export function ForgotPasswordScreen() {
|
|
|
95
95
|
</div>
|
|
96
96
|
)}
|
|
97
97
|
|
|
98
|
-
<div className="text-start text-
|
|
99
|
-
<h2 className="text-sm text-
|
|
100
|
-
Email Address <span className="text-
|
|
98
|
+
<div className="text-start text-hsecondary">
|
|
99
|
+
<h2 className="text-sm text-hsecondary mb-3">
|
|
100
|
+
Email Address <span className="text-hprimary-500">*</span>
|
|
101
101
|
</h2>
|
|
102
102
|
<Input
|
|
103
103
|
type="email"
|
|
104
104
|
placeholder="you@example.com"
|
|
105
105
|
{...register('email')}
|
|
106
106
|
error={errors.email?.message}
|
|
107
|
-
className="text-
|
|
107
|
+
className="text-hsecondary"
|
|
108
108
|
/>
|
|
109
109
|
</div>
|
|
110
110
|
|
|
111
111
|
<button
|
|
112
112
|
type="submit"
|
|
113
113
|
disabled={isSubmitting}
|
|
114
|
-
className="w-full bg-
|
|
114
|
+
className="w-full bg-hsecondary hover:opacity-80 text-white font-medium py-3 px-4 rounded-lg transition-colors disabled:opacity-70 disabled:cursor-not-allowed flex items-center justify-center gap-2"
|
|
115
115
|
>
|
|
116
116
|
{isSubmitting ? (
|
|
117
117
|
'Sending...'
|
|
@@ -126,7 +126,7 @@ export function ForgotPasswordScreen() {
|
|
|
126
126
|
<div className="pt-4 border-t border-slate-200">
|
|
127
127
|
<Link
|
|
128
128
|
href={buildPath('/login')}
|
|
129
|
-
className="flex items-center justify-center gap-2 text-sm font-medium text-
|
|
129
|
+
className="flex items-center justify-center gap-2 text-sm font-medium text-hprimary transition hover:opacity-80"
|
|
130
130
|
>
|
|
131
131
|
<ArrowLeft className="h-4 w-4" />
|
|
132
132
|
Back to login
|
|
@@ -135,11 +135,11 @@ export function ForgotPasswordScreen() {
|
|
|
135
135
|
</form>
|
|
136
136
|
|
|
137
137
|
<div className="mt-4">
|
|
138
|
-
<p className="text-
|
|
138
|
+
<p className="text-hmuted">
|
|
139
139
|
Don't have an account?{' '}
|
|
140
140
|
<Link
|
|
141
141
|
href={buildPath('/register')}
|
|
142
|
-
className="font-medium text-
|
|
142
|
+
className="font-medium text-hprimary transition hover:opacity-90"
|
|
143
143
|
>
|
|
144
144
|
Sign up
|
|
145
145
|
</Link>
|