@instockng/storefront-ui 1.0.10 → 1.0.11

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.
Files changed (97) hide show
  1. package/README.md +26 -0
  2. package/dist/components/Checkout.d.ts.map +1 -1
  3. package/dist/contexts/CartContext.d.ts.map +1 -1
  4. package/dist/index10.mjs +144 -141
  5. package/dist/index101.mjs +1 -1
  6. package/dist/index102.mjs +3 -3
  7. package/dist/index103.mjs +3 -3
  8. package/dist/index111.mjs +1 -1
  9. package/dist/index20.mjs +2 -2
  10. package/dist/index21.mjs +1 -1
  11. package/dist/index28.mjs +11 -11
  12. package/dist/index29.mjs +1 -1
  13. package/dist/index3.mjs +83 -73
  14. package/dist/index30.mjs +1 -1
  15. package/dist/index31.mjs +1 -1
  16. package/dist/index32.mjs +1 -1
  17. package/dist/index37.mjs +1 -1
  18. package/dist/index41.mjs +36 -23
  19. package/dist/index42.mjs +44 -36
  20. package/dist/index43.mjs +99 -44
  21. package/dist/index44.mjs +112 -99
  22. package/dist/index45.mjs +44 -80
  23. package/dist/index46.mjs +64 -53
  24. package/dist/index47.mjs +66 -49
  25. package/dist/index48.mjs +54 -73
  26. package/dist/index49.mjs +52 -63
  27. package/dist/index50.mjs +14 -70
  28. package/dist/index51.mjs +13 -14
  29. package/dist/index52.mjs +58 -13
  30. package/dist/index53.mjs +101 -34
  31. package/dist/index54.mjs +99 -95
  32. package/dist/index55.mjs +22 -132
  33. package/dist/index58.mjs +2 -2
  34. package/dist/index59.mjs +4 -3
  35. package/dist/index60.mjs +4 -2
  36. package/dist/index61.mjs +2 -5
  37. package/dist/index62.mjs +30 -231
  38. package/dist/index63.mjs +42 -5
  39. package/dist/index64.mjs +228 -127
  40. package/dist/index65.mjs +4 -66
  41. package/dist/index66.mjs +124 -77
  42. package/dist/index67.mjs +65 -26
  43. package/dist/index68.mjs +84 -6
  44. package/dist/index69.mjs +26 -72
  45. package/dist/index70.mjs +8 -3
  46. package/dist/index71.mjs +75 -2
  47. package/dist/index72.mjs +3 -82
  48. package/dist/index73.mjs +2 -54
  49. package/dist/index74.mjs +82 -5
  50. package/dist/index75.mjs +53 -4
  51. package/dist/index76.mjs +5 -178
  52. package/dist/index77.mjs +5 -53
  53. package/dist/index78.mjs +178 -68
  54. package/dist/index79.mjs +50 -31
  55. package/dist/index80.mjs +69 -43
  56. package/dist/index81.mjs +1 -1
  57. package/dist/index82.mjs +1 -1
  58. package/dist/index83.mjs +5 -5
  59. package/dist/index85.mjs +2 -2
  60. package/dist/index87.mjs +2 -2
  61. package/dist/index89.mjs +1 -1
  62. package/dist/index91.mjs +4 -4
  63. package/dist/index92.mjs +3 -3
  64. package/dist/index93.mjs +1 -1
  65. package/dist/index94.mjs +3 -3
  66. package/dist/index99.mjs +1 -1
  67. package/dist/styles.css +1 -0
  68. package/package.json +14 -13
  69. package/src/components/CartItem.stories.tsx +94 -0
  70. package/src/components/CartItem.tsx +141 -0
  71. package/src/components/Checkout.stories.tsx +380 -0
  72. package/src/components/Checkout.tsx +954 -0
  73. package/src/components/DiscountCodeInput.stories.tsx +76 -0
  74. package/src/components/DiscountCodeInput.tsx +162 -0
  75. package/src/components/OrderConfirmation.stories.tsx +142 -0
  76. package/src/components/OrderConfirmation.tsx +301 -0
  77. package/src/components/ProductCard.stories.tsx +112 -0
  78. package/src/components/ProductCard.tsx +195 -0
  79. package/src/components/ProductGrid.stories.tsx +137 -0
  80. package/src/components/ProductGrid.tsx +141 -0
  81. package/src/components/ShoppingCart.stories.tsx +459 -0
  82. package/src/components/ShoppingCart.tsx +262 -0
  83. package/src/components/ui/badge.tsx +37 -0
  84. package/src/components/ui/button.tsx +71 -0
  85. package/src/components/ui/card.tsx +79 -0
  86. package/src/components/ui/form-input.tsx +78 -0
  87. package/src/components/ui/form-select.tsx +73 -0
  88. package/src/components/ui/modal.tsx +181 -0
  89. package/src/contexts/CartContext.tsx +305 -0
  90. package/src/hooks/usePaystackPayment.ts +137 -0
  91. package/src/index.ts +51 -0
  92. package/src/lib/utils.ts +45 -0
  93. package/src/paystack.svg +67 -0
  94. package/src/providers/StorefrontProvider.tsx +70 -0
  95. package/src/styles.css +1 -0
  96. package/src/test-utils/MockCartProvider.tsx +424 -0
  97. package/src/vite-env.d.ts +12 -0
package/README.md CHANGED
@@ -35,6 +35,32 @@ npm install react react-dom @tanstack/react-query lucide-react
35
35
 
36
36
  ### Setup
37
37
 
38
+ #### Option A: If your project already uses Tailwind CSS (Recommended)
39
+
40
+ Add storefront-ui to your Tailwind config's content array:
41
+
42
+ ```ts
43
+ // tailwind.config.ts
44
+ export default {
45
+ content: [
46
+ './app/**/*.{js,ts,jsx,tsx}',
47
+ './node_modules/@instockng/storefront-ui/src/**/*.{js,ts,jsx,tsx}', // Add this
48
+ ],
49
+ // ... rest of your config
50
+ }
51
+ ```
52
+
53
+ #### Option B: If your project doesn't use Tailwind CSS
54
+
55
+ Import the pre-built CSS file:
56
+
57
+ ```tsx
58
+ // app/layout.tsx or _app.tsx
59
+ import '@instockng/storefront-ui/styles.css';
60
+ ```
61
+
62
+ ### Providers
63
+
38
64
  Wrap your app with providers:
39
65
 
40
66
  ```tsx
@@ -1 +1 @@
1
- {"version":3,"file":"Checkout.d.ts","sourceRoot":"","sources":["../../src/components/Checkout.tsx"],"names":[],"mappings":"AA4FA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa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C,CAAC;IAC/C,2BAA2B;IAC3B,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,wBAAwB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,kDAA+C,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,IAAI,CAAC,OAAO,4BAA4B,EAAE,iBAAiB,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;CACxG;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,iBAAiB,2CA2NxG;AAED;;GAEG;AACH,wBAAgB,OAAO,qBAMtB"}
package/dist/index10.mjs CHANGED
@@ -1,72 +1,72 @@
1
1
  'use client';
2
- import { jsxs as a, jsx as e, Fragment as he } from "react/jsx-runtime";
3
- import { useState as w, useEffect as q, useMemo as X, useCallback as ye } from "react";
4
- import { object as R, string as y, ValidationError as fe } from "./index34.mjs";
2
+ import { jsxs as a, jsx as e, Fragment as fe } from "react/jsx-runtime";
3
+ import { useState as N, useEffect as q, useMemo as te, useCallback as pe } from "react";
4
+ import { object as $, string as y, ValidationError as ve } from "./index34.mjs";
5
5
  import "./index18.mjs";
6
6
  import "@tanstack/react-query";
7
- import { useGetDeliveryZones as pe } from "./index32.mjs";
8
- import { useCart as ve } from "./index3.mjs";
9
- import { Modal as E } from "./index14.mjs";
7
+ import { useGetDeliveryZones as Ne } from "./index32.mjs";
8
+ import { useCart as ge } from "./index3.mjs";
9
+ import { Modal as re } from "./index14.mjs";
10
10
  import { FormInput as P } from "./index15.mjs";
11
- import { FormSelect as D } from "./index16.mjs";
11
+ import { FormSelect as ae } from "./index16.mjs";
12
12
  import { Button as L } from "./index11.mjs";
13
- import { ChevronLeft as Ne, ChevronRight as ge, Loader2 as ee, CheckCircle as be, Package as xe, Mail as we, Phone as Ce, Zap as Pe, Banknote as ke, ChevronDown as Me } from "lucide-react";
14
- import { formatCurrency as k, cn as C } from "./index17.mjs";
15
- import qe from "./index35.mjs";
16
- import { usePaystackPayment as Ie } from "./index36.mjs";
17
- const Ze = (i) => i.replace(/\D/g, ""), je = R({
13
+ import { Loader2 as R, ChevronLeft as be, ChevronRight as xe, CheckCircle as we, Package as Ce, Mail as Pe, Phone as ke, Zap as Me, Banknote as qe, ChevronDown as Ie } from "lucide-react";
14
+ import { formatCurrency as k, cn as w } from "./index17.mjs";
15
+ import Ze from "./index35.mjs";
16
+ import { usePaystackPayment as je } from "./index36.mjs";
17
+ const Se = (d) => d.replace(/\D/g, ""), ze = $({
18
18
  firstName: y().required("First name is required").min(2, "First name must be at least 2 characters").max(50, "First name must be less than 50 characters"),
19
19
  lastName: y().required("Last name is required").min(2, "Last name must be at least 2 characters").max(50, "Last name must be less than 50 characters"),
20
20
  email: y().required("Email is required").email("Please enter a valid email address"),
21
- phone: y().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (i) => {
22
- if (!i) return !1;
23
- const M = Ze(i);
21
+ phone: y().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (d) => {
22
+ if (!d) return !1;
23
+ const M = Se(d);
24
24
  return [
25
25
  /^0[789]\d{9}$/
26
26
  // 0xxxxxxxxx (11 digits total)
27
27
  ].some((f) => f.test(M));
28
28
  })
29
- }), Se = R({
29
+ }), Fe = $({
30
30
  address: y().required("Street address is required").min(10, "Please provide a complete address"),
31
31
  city: y().required("City is required").min(3, "City name must be at least 3 characters"),
32
- state: y().required("State is required").test("not-empty", "State is required", (i) => !!i && i.trim() !== ""),
33
- deliveryZoneId: y().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (i) => !!i && i.trim() !== "")
34
- }), ze = R({
32
+ state: y().required("State is required").test("not-empty", "State is required", (d) => !!d && d.trim() !== ""),
33
+ deliveryZoneId: y().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (d) => !!d && d.trim() !== "")
34
+ }), Le = $({
35
35
  paymentMethod: y().oneOf(["cod", "online"], "Please select a payment method").required("Payment method is required")
36
36
  });
37
- function Qe({
38
- isOpen: i,
37
+ function Xe({
38
+ isOpen: d,
39
39
  onClose: M,
40
40
  initialData: l,
41
41
  onSuccess: f,
42
42
  onError: c,
43
- submitButtonText: te = "Place Order",
43
+ submitButtonText: se = "Place Order",
44
44
  refundPolicy: I
45
45
  }) {
46
- var K, V, Y, W, H, J, Q, U;
47
- const re = "pk_live_dfb74efb5f74d2acbc253d5ca396ab9015ef0fa7", [o, p] = w("customer"), [Z, ae] = w(void 0), [N, O] = w(void 0), [u, B] = w(null), { refetch: $, isLoading: se, cart: n, updateCartMutation: T, checkoutMutation: ne } = ve(), G = Ie({
48
- publicKey: re,
46
+ var W, J, Q, U, X, E, D, ee;
47
+ const ne = "pk_live_dfb74efb5f74d2acbc253d5ca396ab9015ef0fa7", [o, p] = N("customer"), [Z, le] = N(void 0), [g, G] = N(void 0), [u, B] = N(null), { refetch: K, isLoading: O, cart: s, updateCartMutation: T, checkoutMutation: de } = ge(), V = je({
48
+ publicKey: ne,
49
49
  onSuccess: async (t) => {
50
50
  try {
51
- const s = await b.mutateAsync({
51
+ const n = await C.mutateAsync({
52
52
  firstName: r.firstName,
53
53
  lastName: r.lastName,
54
54
  email: r.email,
55
55
  phone: r.phone,
56
56
  address: r.address,
57
57
  city: r.city,
58
- deliveryZoneId: N || r.deliveryZoneId,
58
+ deliveryZoneId: g || r.deliveryZoneId,
59
59
  paymentMethod: r.paymentMethod,
60
60
  paystackReference: t.reference
61
61
  });
62
- if ("error" in s) {
63
- const d = s.error;
64
- c == null || c(new Error((d == null ? void 0 : d.message) || "Checkout failed"));
62
+ if ("error" in n) {
63
+ const i = n.error;
64
+ c == null || c(new Error((i == null ? void 0 : i.message) || "Checkout failed"));
65
65
  return;
66
66
  }
67
- B(s), f == null || f(s.id);
68
- } catch (s) {
69
- c == null || c(s);
67
+ B(n), f == null || f(n.id);
68
+ } catch (n) {
69
+ c == null || c(n);
70
70
  }
71
71
  },
72
72
  onClose: () => {
@@ -74,15 +74,15 @@ function Qe({
74
74
  }
75
75
  });
76
76
  q(() => {
77
- i && $();
78
- }, [i, $]);
79
- const { data: g } = pe(((K = n == null ? void 0 : n.brand) == null ? void 0 : K.id) || "", {
80
- enabled: !!((V = n == null ? void 0 : n.brand) != null && V.id)
81
- }), h = X(() => g == null ? void 0 : g.find((t) => t.id === Z), [g, Z]), b = ne;
77
+ d && K();
78
+ }, [d, K]);
79
+ const { data: b } = Ne(((W = s == null ? void 0 : s.brand) == null ? void 0 : W.id) || "", {
80
+ enabled: !!((J = s == null ? void 0 : s.brand) != null && J.id)
81
+ }), h = te(() => b == null ? void 0 : b.find((t) => t.id === Z), [b, Z]), C = de;
82
82
  q(() => {
83
- i || (B(null), p("customer"), b.reset());
84
- }, [i, b]);
85
- const [r, _] = w({
83
+ d || (B(null), p("customer"), C.reset());
84
+ }, [d]);
85
+ const [r, _] = N({
86
86
  firstName: (l == null ? void 0 : l.firstName) || "",
87
87
  lastName: (l == null ? void 0 : l.lastName) || "",
88
88
  email: (l == null ? void 0 : l.email) || "",
@@ -94,64 +94,66 @@ function Qe({
94
94
  notes: (l == null ? void 0 : l.notes) || ""
95
95
  });
96
96
  q(() => {
97
- i && p("customer");
98
- }, [i]), q(() => {
99
- n && !l && _((t) => {
100
- var s;
97
+ d && p("customer");
98
+ }, [d]);
99
+ const [Y, H] = N(!1);
100
+ q(() => {
101
+ d && s && !l && !Y && (_((t) => {
102
+ var n;
101
103
  return {
102
104
  ...t,
103
- firstName: n.customerFirstName || "",
104
- lastName: n.customerLastName || "",
105
- email: n.customerEmail || "",
106
- phone: n.customerPhone || "",
107
- deliveryZoneId: ((s = n.deliveryZone) == null ? void 0 : s.id) || ""
105
+ firstName: s.customerFirstName || t.firstName,
106
+ lastName: s.customerLastName || t.lastName,
107
+ email: s.customerEmail || t.email,
108
+ phone: s.customerPhone || t.phone,
109
+ deliveryZoneId: ((n = s.deliveryZone) == null ? void 0 : n.id) || t.deliveryZoneId
108
110
  };
109
- });
110
- }, [n, l]), q(() => {
111
- if (N) {
112
- const t = h == null ? void 0 : h.zones.find((s) => s.id === N);
113
- t && _((s) => ({
114
- ...s,
111
+ }), H(!0)), d || H(!1);
112
+ }, [d, s, l, Y]), q(() => {
113
+ if (g) {
114
+ const t = h == null ? void 0 : h.zones.find((n) => n.id === g);
115
+ t && _((n) => ({
116
+ ...n,
115
117
  paymentMethod: t.allowOnline ? "online" : "cod"
116
118
  }));
117
119
  }
118
- }, [N, h]);
119
- const [m, j] = w({}), [A, le] = w(!1), v = (t) => {
120
- const { name: s, value: d } = t.target;
121
- _((x) => ({ ...x, [s]: d })), m[s] && j((x) => ({ ...x, [s]: void 0 }));
122
- }, S = ye(
120
+ }, [g, h]);
121
+ const [m, j] = N({}), [A, ie] = N(!1), v = (t) => {
122
+ const { name: n, value: i } = t.target;
123
+ _((x) => ({ ...x, [n]: i })), m[n] && j((x) => ({ ...x, [n]: void 0 }));
124
+ }, S = pe(
123
125
  (t) => {
124
- const s = r[t];
125
- if (!s) return;
126
- const d = {};
127
- t === "firstName" ? d.customerFirstName = s : t === "lastName" ? d.customerLastName = s : t === "email" ? d.customerEmail = s : t === "phone" && (d.customerPhone = s), T.mutate(d);
126
+ const n = r[t];
127
+ if (!n) return;
128
+ const i = {};
129
+ t === "firstName" ? i.customerFirstName = n : t === "lastName" ? i.customerLastName = n : t === "email" ? i.customerEmail = n : t === "phone" && (i.customerPhone = n), T.mutate(i);
128
130
  },
129
131
  [r, T]
130
132
  ), z = (t) => {
131
- const s = {};
133
+ const n = {};
132
134
  try {
133
135
  if (t === "customer")
134
- je.validateSync(r, { abortEarly: !1 });
136
+ ze.validateSync(r, { abortEarly: !1 });
135
137
  else if (t === "delivery") {
136
- const d = {
138
+ const i = {
137
139
  address: r.address,
138
140
  city: r.city,
139
141
  state: Z || r.state || "",
140
- deliveryZoneId: N || r.deliveryZoneId || ""
142
+ deliveryZoneId: g || r.deliveryZoneId || ""
141
143
  };
142
- Se.validateSync(d, { abortEarly: !1 });
143
- } else t === "payment" && ze.validateSync(r, { abortEarly: !1 });
144
- } catch (d) {
145
- d instanceof fe && d.inner.forEach((x) => {
146
- x.path && (s[x.path] = x.message);
144
+ Fe.validateSync(i, { abortEarly: !1 });
145
+ } else t === "payment" && Le.validateSync(r, { abortEarly: !1 });
146
+ } catch (i) {
147
+ i instanceof ve && i.inner.forEach((x) => {
148
+ x.path && (n[x.path] = x.message);
147
149
  });
148
150
  }
149
- return j(s), Object.keys(s).length === 0;
150
- }, de = () => {
151
+ return j(n), Object.keys(n).length === 0;
152
+ }, ce = () => {
151
153
  z(o) && (o === "customer" ? p("delivery") : o === "delivery" && p("payment"));
152
- }, ie = () => {
154
+ }, oe = () => {
153
155
  o === "payment" ? p("delivery") : o === "delivery" && p("customer");
154
- }, ce = async () => {
156
+ }, me = async () => {
155
157
  if (!z("customer")) {
156
158
  p("customer");
157
159
  return;
@@ -162,17 +164,17 @@ function Qe({
162
164
  }
163
165
  if (z("payment")) {
164
166
  if (r.paymentMethod === "online") {
165
- if (!G.isLoaded) {
167
+ if (!V.isLoaded) {
166
168
  c == null || c(new Error("Payment system is loading. Please try again."));
167
169
  return;
168
170
  }
169
- const t = Math.round(n.pricing.total * 100);
170
- G.initializePayment({
171
- email: r.email || (n == null ? void 0 : n.customerEmail) || "customer@example.com",
171
+ const t = Math.round(s.pricing.total * 100);
172
+ V.initializePayment({
173
+ email: r.email || (s == null ? void 0 : s.customerEmail) || "customer@example.com",
172
174
  amount: t,
173
175
  currency: "NGN",
174
176
  metadata: {
175
- cartId: n == null ? void 0 : n.id,
177
+ cartId: s == null ? void 0 : s.id,
176
178
  custom_fields: [
177
179
  {
178
180
  display_name: "Customer Name",
@@ -190,19 +192,19 @@ function Qe({
190
192
  return;
191
193
  }
192
194
  try {
193
- const t = await b.mutateAsync({
195
+ const t = await C.mutateAsync({
194
196
  firstName: r.firstName,
195
197
  lastName: r.lastName,
196
198
  email: r.email,
197
199
  phone: r.phone,
198
200
  address: r.address,
199
201
  city: r.city,
200
- deliveryZoneId: N || r.deliveryZoneId,
202
+ deliveryZoneId: g || r.deliveryZoneId,
201
203
  paymentMethod: r.paymentMethod
202
204
  });
203
205
  if ("error" in t) {
204
- const s = t.error;
205
- c == null || c(new Error((s == null ? void 0 : s.message) || "Checkout failed"));
206
+ const n = t.error;
207
+ c == null || c(new Error((n == null ? void 0 : n.message) || "Checkout failed"));
206
208
  return;
207
209
  }
208
210
  B(t), f == null || f(t.id);
@@ -210,31 +212,32 @@ function Qe({
210
212
  c == null || c(t);
211
213
  }
212
214
  }
213
- }, oe = {
215
+ }, ue = {
214
216
  customer: "Customer Information",
215
217
  delivery: "Delivery Address",
216
218
  payment: "Payment Method"
217
- }, me = X(() => oe[o], [o]), ue = /* @__PURE__ */ a("div", { className: "space-y-3", children: [
218
- (o === "payment" || o === "delivery") && ((Y = n == null ? void 0 : n.pricing) == null ? void 0 : Y.total) && /* @__PURE__ */ a("div", { className: "text-sm text-black", children: [
219
+ }, he = te(() => ue[o], [o]), ye = /* @__PURE__ */ a("div", { className: "space-y-3", children: [
220
+ (o === "payment" || o === "delivery") && ((Q = s == null ? void 0 : s.pricing) == null ? void 0 : Q.total) && /* @__PURE__ */ a("div", { className: "text-sm text-black relative", children: [
221
+ O && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(R, { className: "animate-spin text-accent-500" }) }),
219
222
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
220
223
  /* @__PURE__ */ e("span", { children: "Subtotal" }),
221
- /* @__PURE__ */ e("span", { children: k(((W = n == null ? void 0 : n.pricing) == null ? void 0 : W.subtotal) ?? 0) })
224
+ /* @__PURE__ */ e("span", { children: k(((U = s == null ? void 0 : s.pricing) == null ? void 0 : U.subtotal) ?? 0) })
222
225
  ] }),
223
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
226
+ s.pricing.discount && /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
224
227
  /* @__PURE__ */ e("span", { children: "Discount" }),
225
228
  /* @__PURE__ */ a("span", { className: "text-green-600", children: [
226
229
  "-",
227
- k(((J = (H = n == null ? void 0 : n.pricing) == null ? void 0 : H.discount) == null ? void 0 : J.amount) ?? 0)
230
+ k(((E = (X = s == null ? void 0 : s.pricing) == null ? void 0 : X.discount) == null ? void 0 : E.amount) ?? 0)
228
231
  ] })
229
232
  ] }),
230
233
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
231
234
  /* @__PURE__ */ e("span", { children: "Delivery Fee" }),
232
- /* @__PURE__ */ e("span", { children: k(((Q = n == null ? void 0 : n.pricing) == null ? void 0 : Q.deliveryCharge) ?? 0) })
235
+ /* @__PURE__ */ e("span", { children: k(((D = s == null ? void 0 : s.pricing) == null ? void 0 : D.deliveryCharge) ?? 0) })
233
236
  ] }),
234
237
  /* @__PURE__ */ e("hr", { className: "border-gray-200 my-2" }),
235
238
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
236
239
  /* @__PURE__ */ e("span", { children: "Total" }),
237
- /* @__PURE__ */ e("span", { children: k(((U = n == null ? void 0 : n.pricing) == null ? void 0 : U.total) ?? 0) })
240
+ /* @__PURE__ */ e("span", { children: k(((ee = s == null ? void 0 : s.pricing) == null ? void 0 : ee.total) ?? 0) })
238
241
  ] })
239
242
  ] }),
240
243
  /* @__PURE__ */ a("div", { className: "flex gap-3", children: [
@@ -243,11 +246,11 @@ function Qe({
243
246
  {
244
247
  type: "button",
245
248
  variant: "outline",
246
- onClick: ie,
249
+ onClick: oe,
247
250
  className: "flex-1 border-gray-400",
248
251
  size: "lg",
249
252
  children: [
250
- /* @__PURE__ */ e(Ne, { className: "mr-2 h-4 w-4" }),
253
+ /* @__PURE__ */ e(be, { className: "mr-2 h-4 w-4" }),
251
254
  "Back"
252
255
  ]
253
256
  }
@@ -256,35 +259,35 @@ function Qe({
256
259
  L,
257
260
  {
258
261
  type: "button",
259
- onClick: de,
262
+ onClick: ce,
260
263
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
261
264
  size: "lg",
262
265
  children: [
263
266
  "Next",
264
- /* @__PURE__ */ e(ge, { className: "ml-2 h-4 w-4" })
267
+ /* @__PURE__ */ e(xe, { className: "ml-2 h-4 w-4" })
265
268
  ]
266
269
  }
267
270
  ) : /* @__PURE__ */ e(
268
271
  L,
269
272
  {
270
273
  type: "button",
271
- onClick: ce,
272
- disabled: b.isPending,
274
+ onClick: me,
275
+ disabled: C.isPending,
273
276
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
274
277
  size: "lg",
275
- children: b.isPending ? /* @__PURE__ */ a(he, { children: [
276
- /* @__PURE__ */ e(ee, { className: "mr-2 h-4 w-4 animate-spin" }),
278
+ children: C.isPending ? /* @__PURE__ */ a(fe, { children: [
279
+ /* @__PURE__ */ e(R, { className: "mr-2 h-4 w-4 animate-spin" }),
277
280
  "Processing..."
278
- ] }) : te
281
+ ] }) : se
279
282
  }
280
283
  )
281
284
  ] }),
282
- b.isError && /* @__PURE__ */ e("div", { className: "rounded-lg bg-red-50 p-3 text-sm text-red-600", children: "Failed to place order. Please check your information and try again." })
283
- ] }), F = (t) => !(n != null && n.availablePaymentMethods.includes(t));
285
+ C.isError && /* @__PURE__ */ e("div", { className: "rounded-lg bg-red-50 p-3 text-sm text-red-600", children: "Failed to place order. Please check your information and try again." })
286
+ ] }), F = (t) => !(s != null && s.availablePaymentMethods.includes(t));
284
287
  return u ? /* @__PURE__ */ e(
285
- E,
288
+ re,
286
289
  {
287
- isOpen: i,
290
+ isOpen: d,
288
291
  onClose: M,
289
292
  title: "Order Placed Successfully!",
290
293
  footer: /* @__PURE__ */ e(
@@ -299,14 +302,14 @@ function Qe({
299
302
  size: "lg",
300
303
  contentClassName: "p-6",
301
304
  children: /* @__PURE__ */ a("div", { className: "text-center space-y-6", children: [
302
- /* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ e("div", { className: "w-20 h-20 bg-green-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e(be, { className: "h-12 w-12 text-green-600" }) }) }),
305
+ /* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ e("div", { className: "w-20 h-20 bg-green-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e(we, { className: "h-12 w-12 text-green-600" }) }) }),
303
306
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
304
307
  /* @__PURE__ */ e("h3", { className: "text-2xl font-bold text-gray-900", children: "Thank You!" }),
305
308
  /* @__PURE__ */ e("p", { className: "text-gray-600", children: "Your order has been placed successfully." })
306
309
  ] }),
307
310
  /* @__PURE__ */ a("div", { className: "bg-gray-50 rounded-lg p-6 space-y-4", children: [
308
311
  /* @__PURE__ */ a("div", { className: "flex items-center justify-center space-x-2 text-gray-700", children: [
309
- /* @__PURE__ */ e(xe, { className: "h-5 w-5" }),
312
+ /* @__PURE__ */ e(Ce, { className: "h-5 w-5" }),
310
313
  /* @__PURE__ */ a("span", { className: "font-medium", children: [
311
314
  "Order #",
312
315
  u.orderNumber
@@ -347,18 +350,18 @@ function Qe({
347
350
  ] })
348
351
  }
349
352
  ) : /* @__PURE__ */ e(
350
- E,
353
+ re,
351
354
  {
352
- isOpen: i,
355
+ isOpen: d,
353
356
  onClose: M,
354
- title: me,
355
- footer: ue,
357
+ title: he,
358
+ footer: ye,
356
359
  size: "lg",
357
360
  contentClassName: "p-0",
358
- children: se ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(ee, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ e("div", { className: "relative w-full", children: /* @__PURE__ */ a(
361
+ children: O ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(R, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ e("div", { className: "relative w-full", children: /* @__PURE__ */ a(
359
362
  "div",
360
363
  {
361
- className: C(
364
+ className: w(
362
365
  "flex transition-transform duration-300 ease-in-out w-full",
363
366
  o === "customer" && "translate-x-0",
364
367
  o === "delivery" && "-translate-x-full",
@@ -404,7 +407,7 @@ function Qe({
404
407
  onChange: v,
405
408
  onBlur: () => S("email"),
406
409
  error: m.email,
407
- icon: /* @__PURE__ */ e(we, { size: 16 }),
410
+ icon: /* @__PURE__ */ e(Pe, { size: 16 }),
408
411
  autoCorrect: "off",
409
412
  required: !0
410
413
  }
@@ -421,7 +424,7 @@ function Qe({
421
424
  placeholder: "e.g. 08012345678",
422
425
  maxLength: 18,
423
426
  error: m.phone,
424
- icon: /* @__PURE__ */ e(Ce, { size: 16 }),
427
+ icon: /* @__PURE__ */ e(ke, { size: 16 }),
425
428
  autoCorrect: "off",
426
429
  required: !0,
427
430
  className: "font-semibold"
@@ -457,32 +460,32 @@ function Qe({
457
460
  }
458
461
  ),
459
462
  /* @__PURE__ */ a(
460
- D,
463
+ ae,
461
464
  {
462
465
  label: "State",
463
466
  name: "state",
464
467
  value: Z || "",
465
468
  onChange: (t) => {
466
- O("");
467
- const s = t.target.value;
468
- ae(s || void 0), m.state && j((d) => ({ ...d, state: void 0 }));
469
+ G("");
470
+ const n = t.target.value;
471
+ le(n || void 0), m.state && j((i) => ({ ...i, state: void 0 }));
469
472
  },
470
473
  error: m.state,
471
474
  required: !0,
472
475
  children: [
473
476
  /* @__PURE__ */ e("option", { disabled: !0, value: "", children: "Select State" }),
474
- g == null ? void 0 : g.map((t) => /* @__PURE__ */ e("option", { value: t.id, children: t.name }, t.id))
477
+ b == null ? void 0 : b.map((t) => /* @__PURE__ */ e("option", { value: t.id, children: t.name }, t.id))
475
478
  ]
476
479
  }
477
480
  ),
478
481
  /* @__PURE__ */ a(
479
- D,
482
+ ae,
480
483
  {
481
484
  label: "Delivery Zone",
482
- value: N || "",
485
+ value: g || "",
483
486
  onChange: (t) => {
484
- const s = t.target.value;
485
- O(s || void 0), m.deliveryZoneId && j((d) => ({ ...d, deliveryZoneId: void 0 })), s && T.mutate({ deliveryZoneId: s });
487
+ const n = t.target.value;
488
+ G(n || void 0), m.deliveryZoneId && j((i) => ({ ...i, deliveryZoneId: void 0 })), n && T.mutate({ deliveryZoneId: n });
486
489
  },
487
490
  disabled: !h,
488
491
  error: m.deliveryZoneId,
@@ -505,7 +508,7 @@ function Qe({
505
508
  /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ a(
506
509
  "label",
507
510
  {
508
- className: C(
511
+ className: w(
509
512
  "flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
510
513
  r.paymentMethod === "online" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
511
514
  F("online") && "opacity-50 cursor-not-allowed"
@@ -527,11 +530,11 @@ function Qe({
527
530
  /* @__PURE__ */ e(
528
531
  "div",
529
532
  {
530
- className: C(
533
+ className: w(
531
534
  "p-3 rounded-full",
532
535
  r.paymentMethod === "online" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
533
536
  ),
534
- children: /* @__PURE__ */ e(Pe, { size: 24 })
537
+ children: /* @__PURE__ */ e(Me, { size: 24 })
535
538
  }
536
539
  ),
537
540
  /* @__PURE__ */ a("div", { children: [
@@ -540,7 +543,7 @@ function Qe({
540
543
  /* @__PURE__ */ e(
541
544
  "img",
542
545
  {
543
- src: qe,
546
+ src: Ze,
544
547
  alt: "Paystack",
545
548
  className: "h-4 w-auto mt-2 mx-auto"
546
549
  }
@@ -554,7 +557,7 @@ function Qe({
554
557
  /* @__PURE__ */ a(
555
558
  "label",
556
559
  {
557
- className: C(
560
+ className: w(
558
561
  "flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
559
562
  r.paymentMethod === "cod" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
560
563
  F("cod") && "opacity-50 cursor-not-allowed"
@@ -576,11 +579,11 @@ function Qe({
576
579
  /* @__PURE__ */ e(
577
580
  "div",
578
581
  {
579
- className: C(
582
+ className: w(
580
583
  "p-3 rounded-full",
581
584
  r.paymentMethod === "cod" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
582
585
  ),
583
- children: /* @__PURE__ */ e(ke, { size: 24 })
586
+ children: /* @__PURE__ */ e(qe, { size: 24 })
584
587
  }
585
588
  ),
586
589
  /* @__PURE__ */ a("div", { children: [
@@ -599,15 +602,15 @@ function Qe({
599
602
  "button",
600
603
  {
601
604
  type: "button",
602
- onClick: () => le(!A),
605
+ onClick: () => ie(!A),
603
606
  className: "overflow-hidden w-full flex items-center overflow-hidden rounded-lg rounded-b-none justify-between p-4 text-left hover:bg-gray-50 transition-colors",
604
607
  children: [
605
608
  /* @__PURE__ */ e("span", { className: "text-sm font-medium text-gray-700", children: I.title || "🤔 Curious about Refunds?" }),
606
609
  /* @__PURE__ */ e(
607
- Me,
610
+ Ie,
608
611
  {
609
612
  size: 16,
610
- className: C(
613
+ className: w(
611
614
  "transform transition-transform duration-200 text-gray-500",
612
615
  A && "rotate-180"
613
616
  )
@@ -619,16 +622,16 @@ function Qe({
619
622
  /* @__PURE__ */ e(
620
623
  "div",
621
624
  {
622
- className: C(
625
+ className: w(
623
626
  "overflow-hidden transition-all duration-300 ease-in-out",
624
627
  A ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
625
628
  ),
626
629
  children: /* @__PURE__ */ e("div", { className: "px-4 pb-4 border-t border-gray-100", children: /* @__PURE__ */ e("div", { className: "text-sm text-gray-600 space-y-3 pt-4", children: I.policies && /* @__PURE__ */ a("div", { children: [
627
630
  /* @__PURE__ */ e("h4", { className: "font-bold text-gray-800 mb-2", children: "Our Refund Policy" }),
628
- /* @__PURE__ */ e("ul", { className: "space-y-1 ml-4", children: I.policies.map((t, s) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
631
+ /* @__PURE__ */ e("ul", { className: "space-y-1 ml-4", children: I.policies.map((t, n) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
629
632
  /* @__PURE__ */ e("span", { className: "text-green-600 mr-2", children: "✓" }),
630
633
  /* @__PURE__ */ e("span", { children: t })
631
- ] }, s)) })
634
+ ] }, n)) })
632
635
  ] }) }) })
633
636
  }
634
637
  )
@@ -641,5 +644,5 @@ function Qe({
641
644
  );
642
645
  }
643
646
  export {
644
- Qe as Checkout
647
+ Xe as Checkout
645
648
  };