hey-pharmacist-ecommerce 1.1.37 → 1.1.39

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 CHANGED
@@ -37,7 +37,6 @@ export const ecommerceConfig = {
37
37
  accent: "#F59E0B",
38
38
  },
39
39
  apiBaseUrl: "https://your-api.com",
40
- stripePublicKey: "pk_test_...",
41
40
  };
42
41
  ```
43
42
 
@@ -92,9 +91,6 @@ export default function ShopPage() {
92
91
 
93
92
  The package exposes CSS variables for theme colors and a dynamic header gradient. Update via `EcommerceConfig`:
94
93
 
95
- ```ts
96
- headerGradient?: { from: string; via: string; to: string } // hex colors
97
- ```
98
94
 
99
95
  Under the hood, `ThemeProvider` sets `--color-<brand>-<shade>` and:
100
96
 
@@ -180,7 +176,6 @@ export const config: EcommerceConfig = {
180
176
  accent: '#10B981',
181
177
  },
182
178
  apiBaseUrl: 'https://api.heypharmacist.com',
183
- stripePublicKey: 'pk_test_...',
184
179
  };
185
180
  ```
186
181
 
package/dist/index.d.mts CHANGED
@@ -9,17 +9,13 @@ interface EcommerceConfig {
9
9
  logo: string;
10
10
  colors: {
11
11
  primary: string;
12
+ primaryDark: string;
12
13
  secondary: string;
13
14
  accent: string;
14
- };
15
- /** Optional hex colors to override header gradient */
16
- headerGradient?: {
17
- from: string;
18
- via: string;
19
- to: string;
15
+ accentDark: string;
16
+ textMuted: string;
20
17
  };
21
18
  apiBaseUrl: string;
22
- stripePublicKey: string;
23
19
  }
24
20
  interface ProductFilters {
25
21
  category?: string;
package/dist/index.d.ts CHANGED
@@ -9,17 +9,13 @@ interface EcommerceConfig {
9
9
  logo: string;
10
10
  colors: {
11
11
  primary: string;
12
+ primaryDark: string;
12
13
  secondary: string;
13
14
  accent: string;
14
- };
15
- /** Optional hex colors to override header gradient */
16
- headerGradient?: {
17
- from: string;
18
- via: string;
19
- to: string;
15
+ accentDark: string;
16
+ textMuted: string;
20
17
  };
21
18
  apiBaseUrl: string;
22
- stripePublicKey: string;
23
19
  }
24
20
  interface ProductFilters {
25
21
  category?: string;
package/dist/index.js CHANGED
@@ -251,18 +251,12 @@ function ThemeProvider({ config, children }) {
251
251
  Object.entries(accentShades).forEach(([shade, rgb]) => {
252
252
  root.style.setProperty(`--color-accent-${shade}`, rgb);
253
253
  });
254
- if (config.headerGradient) {
255
- const [fr, fg, fb] = hexToRgb(config.headerGradient.from);
256
- const [vr, vg, vb] = hexToRgb(config.headerGradient.via);
257
- const [tr, tg, tb] = hexToRgb(config.headerGradient.to);
258
- root.style.setProperty(`--header-from`, `${fr} ${fg} ${fb}`);
259
- root.style.setProperty(`--header-via`, `${vr} ${vg} ${vb}`);
260
- root.style.setProperty(`--header-to`, `${tr} ${tg} ${tb}`);
261
- } else {
262
- root.style.setProperty(`--header-from`, primaryShades[700]);
263
- root.style.setProperty(`--header-via`, primaryShades[600]);
264
- root.style.setProperty(`--header-to`, secondaryShades[600]);
265
- }
254
+ root.style.setProperty("--color-primary", config.colors.primary);
255
+ root.style.setProperty("--color-primary-dark", config.colors.primaryDark);
256
+ root.style.setProperty("--color-secondary", config.colors.secondary);
257
+ root.style.setProperty("--color-accent", config.colors.accent);
258
+ root.style.setProperty("--color-accent-dark", config.colors.accentDark);
259
+ root.style.setProperty("--color-text-muted", config.colors.textMuted);
266
260
  }, [config]);
267
261
  return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: { config }, children });
268
262
  }
@@ -13042,7 +13036,7 @@ function ProductCard({
13042
13036
  /* @__PURE__ */ jsxRuntime.jsxs(
13043
13037
  framerMotion.motion.div,
13044
13038
  {
13045
- className: "bg-white rounded-[16px] overflow-hidden border-2 border-gray-100 hover:border-[#5B9BD5] hover:shadow-lg transition-all duration-300 group h-full flex flex-col",
13039
+ className: "bg-white rounded-[16px] overflow-hidden border-2 border-gray-100 hover:border-secondary hover:shadow-lg transition-all duration-300 group h-full flex flex-col",
13046
13040
  whileHover: { y: -4 },
13047
13041
  onMouseEnter: () => setIsHovered(true),
13048
13042
  onMouseLeave: () => setIsHovered(false),
@@ -13094,7 +13088,7 @@ function ProductCard({
13094
13088
  displayDiscountAmount,
13095
13089
  "%"
13096
13090
  ] }) }) }),
13097
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-['Poppins',sans-serif] text-xs text-[#5B9BD5] uppercase tracking-wide font-medium", children: product.brand }) }),
13091
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-['Poppins',sans-serif] text-xs text-secondary uppercase tracking-wide font-medium", children: product.brand }) }),
13098
13092
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-[40px] mb-3", children: [
13099
13093
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-['Poppins',sans-serif] font-semibold text-[#2B4B7C] line-clamp-2", children: product.name }),
13100
13094
  selectedVariant && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-['Poppins',sans-serif] text-[#676c80]", children: selectedVariant.name })
@@ -13193,7 +13187,7 @@ function ProductCard({
13193
13187
  }
13194
13188
  },
13195
13189
  disabled: isAddingToCart || variantImages.length > 0 && !selectedVariantId || displayInventoryCount === 0,
13196
- 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 cursor-pointer",
13190
+ className: "w-full font-['Poppins',sans-serif] font-medium text-[11px] px-3 py-2 rounded-full bg-secondary text-white hover:bg-secondary/80 hover:shadow-lg transition-all duration-300 flex items-center justify-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",
13197
13191
  children: [
13198
13192
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShoppingCart, { className: "h-4 w-4" }),
13199
13193
  displayInventoryCount === 0 ? "Out of Stock" : "Add to Cart"
@@ -14738,7 +14732,7 @@ function ReviewCard({ review, showProductInfo = false }) {
14738
14732
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-gray-200 rounded-lg p-4 bg-white", children: [
14739
14733
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-3", children: [
14740
14734
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
14741
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 bg-[#E67E50]/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-5 text-[#E67E50]" }) }),
14735
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 bg-secondary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-5 text-secondary" }) }),
14742
14736
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
14743
14737
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-gray-900", children: "Customer Review" }),
14744
14738
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: dateFns.formatDistanceToNow(reviewDate, { addSuffix: true }) })
@@ -14748,9 +14742,9 @@ function ReviewCard({ review, showProductInfo = false }) {
14748
14742
  ] }),
14749
14743
  review.reviewType && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded mb-2", children: review.reviewType }),
14750
14744
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-700 text-sm leading-relaxed mb-3", children: review.review }),
14751
- review.reply && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 pl-4 border-l-2 border-[#E67E50] bg-gray-50 p-3 rounded", children: [
14745
+ review.reply && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 pl-4 border-l-2 border-secondary bg-gray-50 p-3 rounded", children: [
14752
14746
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
14753
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircle, { className: "size-4 text-[#E67E50]" }),
14747
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircle, { className: "size-4 text-secondary" }),
14754
14748
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-gray-900", children: "Store Response" }),
14755
14749
  replyDate && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: dateFns.formatDistanceToNow(replyDate, { addSuffix: true }) })
14756
14750
  ] }),
@@ -15344,7 +15338,7 @@ function ProductDetailScreen({ productId }) {
15344
15338
  )
15345
15339
  ] })
15346
15340
  ] }),
15347
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 p-6 bg-linear-to-br from-[#5B9BD5]/5 to-[#2B4B7C]/5 rounded-[24px]", children: [
15341
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 p-6 bg-linear-to-br from-secondary/5 to-secondary/5 rounded-[24px]", children: [
15348
15342
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
15349
15343
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-10 rounded-full bg-white flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Truck, { className: "size-5 text-primary" }) }),
15350
15344
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -15454,7 +15448,7 @@ function CartItem({ item }) {
15454
15448
  initial: { opacity: 0, y: 20 },
15455
15449
  animate: { opacity: 1, y: 0 },
15456
15450
  exit: { opacity: 0, x: -100 },
15457
- className: "bg-white border-2 border-gray-100 rounded-[24px] p-6 hover:border-[#5B9BD5]/30 transition-all duration-300",
15451
+ className: "bg-white border-2 border-gray-100 rounded-[24px] p-6 hover:border-secondary/30 transition-all duration-300",
15458
15452
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 pr-8", children: [
15459
15453
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-28 h-28 rounded-[16px] overflow-hidden bg-gray-50 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
15460
15454
  Image4__default.default,
@@ -15509,7 +15503,7 @@ function CartItem({ item }) {
15509
15503
  )
15510
15504
  ] }),
15511
15505
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-right", children: [
15512
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-['Poppins',sans-serif] font-bold text-[18px] text-[#E67E50]", children: formatPrice(itemTotal) }),
15506
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-['Poppins',sans-serif] font-bold text-[18px] text-secondary", children: formatPrice(itemTotal) }),
15513
15507
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-['Poppins',sans-serif] text-[11px] text-[#676c80]", children: [
15514
15508
  formatPrice(unitPrice),
15515
15509
  " each"
@@ -15545,7 +15539,7 @@ function CartScreen() {
15545
15539
  {
15546
15540
  type: "button",
15547
15541
  onClick: () => router.push(buildPath("/shop")),
15548
- className: "rounded-xl border-2 border-primary bg-primary text-white px-6 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2 hover:opacity-80",
15542
+ className: "rounded-xl border-2 border-primary bg-secondary text-white px-6 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2 hover:opacity-80",
15549
15543
  children: [
15550
15544
  "Discover products",
15551
15545
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-5 w-5" })
@@ -15619,7 +15613,7 @@ function CartScreen() {
15619
15613
  animate: { opacity: 1, y: 0 },
15620
15614
  transition: { delay: 0.1 },
15621
15615
  className: "space-y-6 lg:sticky lg:top-24 h-fit lg:col-span-1",
15622
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-linear-to-br from-[#5B9BD5]/10 to-[#2B4B7C]/10 rounded-[24px] p-8 border-2 border-[#5B9BD5]/20 sticky top-24", children: [
15616
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-linear-to-br from-secondary/10 to-secondary/10 rounded-[24px] p-8 border-2 border-secondary/20 sticky top-24", children: [
15623
15617
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-['Poppins',sans-serif] font-semibold text-secondary mb-6", children: "Order Summary" }),
15624
15618
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 mb-6", children: [
15625
15619
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
@@ -15647,7 +15641,7 @@ function CartScreen() {
15647
15641
  {
15648
15642
  type: "submit",
15649
15643
  onClick: handleSubmit,
15650
- className: "w-full rounded-full border-2 border-[#E67E50] bg-[#E67E50] hover:bg-[#E67E50]/80 text-white px-4 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2",
15644
+ className: "w-full rounded-full border-2 border-secondary bg-secondary hover:bg-secondary/80 text-white px-4 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2",
15651
15645
  children: [
15652
15646
  "Proceed to Checkout",
15653
15647
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-5 w-5" })
@@ -16957,8 +16951,8 @@ function CheckoutScreen() {
16957
16951
  animate: { opacity: 1, y: 0 },
16958
16952
  transition: { duration: 0.5, ease: "easeOut", delay: 0.1 },
16959
16953
  className: "space-y-10 lg:sticky lg:top-24 lg:col-span-1",
16960
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-linear-to-br from-[#5B9BD5]/10 to-[#2B4B7C]/10 rounded-[24px] p-8 border-2 border-[#5B9BD5]/20 sticky top-24", children: [
16961
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-['Poppins',sans-serif] font-semibold text-[#2B4B7C] mb-6 text-2xl", children: "Order Summary" }),
16954
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-linear-to-br from-secondary/10 to-secondary/10 rounded-[24px] p-8 border-2 border-secondary/20 sticky top-24", children: [
16955
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-['Poppins',sans-serif] font-semibold text-secondary mb-6 text-2xl", children: "Order Summary" }),
16962
16956
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "mt-8 pt-6 border-t border-slate-100", children: [
16963
16957
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4 mb-6", children: cart?.cartBody?.items?.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
16964
16958
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-xl overflow-hidden bg-white shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: item.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC, alt: item.productVariantData.name, className: "w-full h-full object-cover", height: 200, width: 200 }) }),
@@ -16969,10 +16963,10 @@ function CheckoutScreen() {
16969
16963
  " \u2022 Qty: ",
16970
16964
  item.quantity
16971
16965
  ] }),
16972
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-['Poppins',sans-serif] font-semibold text-[12px] text-[#E67E50] mt-1", children: formatPrice(item.productVariantData.finalPrice * item.quantity) })
16966
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-['Poppins',sans-serif] font-semibold text-[12px] text-secondary mt-1", children: formatPrice(item.productVariantData.finalPrice * item.quantity) })
16973
16967
  ] })
16974
16968
  ] }, item.productVariantId || item.id)) }),
16975
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px bg-[#5B9BD5]/20 my-4" }),
16969
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px bg-secondary/20 my-4" }),
16976
16970
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(
16977
16971
  CouponCodeInput,
16978
16972
  {
@@ -17004,14 +16998,14 @@ function CheckoutScreen() {
17004
16998
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Estimated tax" }),
17005
16999
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: formatPrice(tax) })
17006
17000
  ] }),
17007
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px bg-[#5B9BD5]/20 mt-6" }),
17001
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px bg-secondary/20 mt-6" }),
17008
17002
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-6", children: [
17009
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-['Poppins',sans-serif] font-semibold text-[16px] text-[#2B4B7C]", children: "Total" }),
17010
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-['Poppins',sans-serif] font-bold text-[24px] text-[#E67E50]", children: formatPrice(total) })
17003
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-['Poppins',sans-serif] font-semibold text-[16px] text-secondary", children: "Total" }),
17004
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-['Poppins',sans-serif] font-bold text-[24px] text-secondary", children: formatPrice(total) })
17011
17005
  ] })
17012
17006
  ] }),
17013
17007
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white/80 rounded-xl p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-['Poppins',sans-serif] text-[11px] text-[#676c80] leading-[1.6]", children: [
17014
- /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-[#2B4B7C]", children: "Payment:" }),
17008
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-secondary", children: "Payment:" }),
17015
17009
  " We'll contact you to arrange payment upon pickup or delivery. We accept cash, credit cards, and all major payment methods."
17016
17010
  ] }) })
17017
17011
  ] }),
@@ -17047,7 +17041,7 @@ function CheckoutScreen() {
17047
17041
  {
17048
17042
  type: "submit",
17049
17043
  disabled: isSubmitting,
17050
- className: "font-['Poppins',sans-serif] 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-[#E67E50] hover:bg-[#2B4B7C] flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",
17044
+ className: "font-['Poppins',sans-serif] 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-secondary hover:bg-[#2B4B7C] flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",
17051
17045
  children: [
17052
17046
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: "h-5 w-5" }),
17053
17047
  isSubmitting ? "Placing order..." : "Place Secure Order"
@@ -17152,14 +17146,11 @@ function LoginScreen() {
17152
17146
  boxShadow: "0px 4px 6px -4px #0000001A, 0px 10px 15px -3px #0000001A"
17153
17147
  },
17154
17148
  children: [
17155
- status && /* @__PURE__ */ jsxRuntime.jsxs(
17149
+ status && /* @__PURE__ */ jsxRuntime.jsx(
17156
17150
  "div",
17157
17151
  {
17158
- className: `flex items-start gap-2 rounded-2xl border px-4 py-3 text-sm ${status.type === "success" ? "border-green-200 bg-green-50 text-green-800" : "border-red-200 bg-red-50 text-red-700"}`,
17159
- children: [
17160
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-[2px] text-base", children: status.type === "success" ? "\u2714" : "!" }),
17161
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: status.message })
17162
- ]
17152
+ className: `flex flex-row items-start gap-2 rounded-2xl border px-4 py-3 text-sm ${status.type === "success" ? "border-green-200 bg-green-50 text-green-800" : "border-red-200 bg-red-50 text-red-700"}`,
17153
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: status.message })
17163
17154
  }
17164
17155
  ),
17165
17156
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-start text-secondary", children: [
@@ -17202,26 +17193,14 @@ function LoginScreen() {
17202
17193
  }
17203
17194
  )
17204
17195
  ] }),
17205
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
17206
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-slate-600", children: [
17207
- /* @__PURE__ */ jsxRuntime.jsx(
17208
- "input",
17209
- {
17210
- type: "checkbox",
17211
- className: "h-4 w-4 rounded-sm border-slate-300 text-primary-600 focus:ring-primary-500"
17212
- }
17213
- ),
17214
- "Remember me"
17215
- ] }),
17216
- /* @__PURE__ */ jsxRuntime.jsx(
17217
- Link9__default.default,
17218
- {
17219
- href: buildPath("/forgot-password"),
17220
- className: "font-medium text-primary transition hover:opacity-80",
17221
- children: "Forgot password?"
17222
- }
17223
- )
17224
- ] }),
17196
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end text-sm", children: /* @__PURE__ */ jsxRuntime.jsx(
17197
+ Link9__default.default,
17198
+ {
17199
+ href: buildPath("/forgot-password"),
17200
+ className: "font-medium text-primary transition hover:opacity-80",
17201
+ children: "Forgot password?"
17202
+ }
17203
+ ) }),
17225
17204
  /* @__PURE__ */ jsxRuntime.jsx(
17226
17205
  "button",
17227
17206
  {
@@ -17992,7 +17971,7 @@ function AccountOverviewTab() {
17992
17971
  ] }),
17993
17972
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
17994
17973
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
17995
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-5 w-5 text-[#5B9BD5]" }) }),
17974
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-5 w-5 text-secondary" }) }),
17996
17975
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17997
17976
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted", children: "Full Name" }),
17998
17977
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-medium text-secondary", children: [
@@ -18003,21 +17982,21 @@ function AccountOverviewTab() {
18003
17982
  ] })
18004
17983
  ] }),
18005
17984
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
18006
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "h-5 w-5 text-[#5B9BD5]" }) }),
17985
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "h-5 w-5 text-secondary" }) }),
18007
17986
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
18008
17987
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted", children: "E-mail Address" }),
18009
17988
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-secondary", children: user.email })
18010
17989
  ] })
18011
17990
  ] }),
18012
17991
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
18013
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Phone, { className: "h-5 w-5 text-[#5B9BD5]" }) }),
17992
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Phone, { className: "h-5 w-5 text-secondary" }) }),
18014
17993
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
18015
17994
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted", children: "Phone Number" }),
18016
17995
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-secondary", children: user.phoneNumber || "Not provided" })
18017
17996
  ] })
18018
17997
  ] }),
18019
17998
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
18020
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPin, { className: "h-5 w-5 text-[#5B9BD5]" }) }),
17999
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[#DBEAFE]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPin, { className: "h-5 w-5 text-secondary" }) }),
18021
18000
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
18022
18001
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted", children: "Date of Birth" }),
18023
18002
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-secondary", children: "Not provided" })
@@ -18049,7 +18028,8 @@ function AccountOverviewTab() {
18049
18028
  )) }) : recentOrders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted text-center py-8", children: "No orders yet" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: recentOrders.map((order) => /* @__PURE__ */ jsxRuntime.jsxs(
18050
18029
  "div",
18051
18030
  {
18052
- className: "flex items-center justify-between rounded-lg bg-slate-50 p-4 hover:bg-slate-100 transition-colors",
18031
+ onClick: () => router.push(buildPath(`/account/orders/${order._id}`)),
18032
+ className: "flex items-center justify-between rounded-lg bg-slate-50 p-4 hover:bg-slate-100 transition-colors cursor-pointer",
18053
18033
  children: [
18054
18034
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
18055
18035
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-white", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Package, { className: "h-5 w-5 text-slate-600" }) }),
@@ -18081,6 +18061,8 @@ function AccountOverviewTab() {
18081
18061
  }
18082
18062
  function AccountOrdersTab() {
18083
18063
  const { orders, isLoading, error } = useCurrentOrders();
18064
+ const router = navigation.useRouter();
18065
+ const { buildPath } = useBasePath();
18084
18066
  if (isLoading) {
18085
18067
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 px-3 pb-24", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
18086
18068
  "div",
@@ -18108,7 +18090,8 @@ function AccountOrdersTab() {
18108
18090
  return /* @__PURE__ */ jsxRuntime.jsxs(
18109
18091
  "div",
18110
18092
  {
18111
- className: "rounded-xl border border-slate-200 bg-white p-6 hover:shadow-md transition-shadow",
18093
+ onClick: () => router.push(buildPath(`/account/orders/${order._id}`)),
18094
+ className: "rounded-xl border border-slate-200 bg-white p-6 hover:shadow-md transition-shadow cursor-pointer",
18112
18095
  children: [
18113
18096
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-4 pb-4 border-b border-slate-200", children: [
18114
18097
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
@@ -18548,7 +18531,7 @@ function AccountReviewsTab() {
18548
18531
  "button",
18549
18532
  {
18550
18533
  onClick: () => router.push(buildPath("/reviews")),
18551
- className: "inline-flex items-center gap-2 px-4 py-2 border border-[#E67E50] text-[#E67E50] rounded-lg font-medium hover:bg-[#E67E50]/5 transition-colors text-sm",
18534
+ className: "inline-flex items-center gap-2 px-4 py-2 border border-secondary text-secondary rounded-lg font-medium hover:bg-secondary/5 transition-colors text-sm",
18552
18535
  children: [
18553
18536
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "size-4" }),
18554
18537
  "Write a Review"
@@ -19923,7 +19906,7 @@ function WishlistScreen() {
19923
19906
  {
19924
19907
  type: "button",
19925
19908
  onClick: () => router.push(buildPath("/shop")),
19926
- className: "rounded-xl border-2 border-primary bg-primary text-white px-6 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2 hover:opacity-80",
19909
+ className: "rounded-xl border-2 border-secondary bg-secondary text-white px-6 py-3 text-sm font-medium transition-colors flex items-center justify-center gap-2 hover:opacity-80",
19927
19910
  children: "Discover products"
19928
19911
  }
19929
19912
  ) })
@@ -21314,6 +21297,23 @@ function OrderDetailScreen({ id }) {
21314
21297
  const router = navigation.useRouter();
21315
21298
  const { buildPath } = useBasePath();
21316
21299
  const { order, isLoading, error } = useOrder(id);
21300
+ const [storeAddress, setStoreAddress] = React10.useState(null);
21301
+ React10.useEffect(() => {
21302
+ if (order && order.orderType !== "Delivery" && !order.pickUpAddress) {
21303
+ const fetchStoreAddress = async () => {
21304
+ try {
21305
+ const api = new ShippingApi(AXIOS_CONFIG);
21306
+ const res = await api.getStoreAddress();
21307
+ if (res.data) {
21308
+ setStoreAddress(res.data);
21309
+ }
21310
+ } catch (e) {
21311
+ console.error("Failed to fetch store address:", e);
21312
+ }
21313
+ };
21314
+ fetchStoreAddress();
21315
+ }
21316
+ }, [order]);
21317
21317
  if (isLoading) {
21318
21318
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-slate-50 flex flex-col items-center justify-center p-4", children: [
21319
21319
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 border-4 border-primary-20 border-t-primary rounded-full animate-spin mb-4" }),
@@ -21348,7 +21348,7 @@ function OrderDetailScreen({ id }) {
21348
21348
  }
21349
21349
  };
21350
21350
  const shippingAddress = order.shippingInfo?.addressTo;
21351
- const pickupAddress = order.pickUpAddress;
21351
+ const pickupAddress = order.pickUpAddress || storeAddress;
21352
21352
  const activeAddress = isDelivery ? shippingAddress : pickupAddress;
21353
21353
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-linear-to-b from-[#F8FAFC] to-[#EBF4FB] pb-20", children: [
21354
21354
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto px-4 pt-8 max-w-6xl", children: [