@instockng/storefront-ui 1.0.110 → 1.0.111

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 (144) hide show
  1. package/dist/components/AssistantDrawer.d.ts.map +1 -1
  2. package/dist/components/Checkout.d.ts.map +1 -1
  3. package/dist/components/DeliveryConfirmation.d.ts.map +1 -1
  4. package/dist/components/OrderConfirmation.d.ts.map +1 -1
  5. package/dist/index100.mjs +8 -4
  6. package/dist/index101.mjs +69 -173
  7. package/dist/index102.mjs +4 -53
  8. package/dist/index103.mjs +2 -69
  9. package/dist/index104.mjs +83 -2
  10. package/dist/index105.mjs +52 -4
  11. package/dist/index106.mjs +5 -1133
  12. package/dist/index107.mjs +4 -19
  13. package/dist/index108.mjs +171 -47
  14. package/dist/index109.mjs +52 -32
  15. package/dist/index110.mjs +69 -2
  16. package/dist/index117.mjs +2 -2
  17. package/dist/index118.mjs +2 -2
  18. package/dist/index153.mjs +1 -1
  19. package/dist/index154.mjs +1 -1
  20. package/dist/index155.mjs +5 -5
  21. package/dist/index157.mjs +2 -2
  22. package/dist/index159.mjs +2 -2
  23. package/dist/index161.mjs +1 -1
  24. package/dist/index163.mjs +4 -4
  25. package/dist/index164.mjs +3 -3
  26. package/dist/index171.mjs +1 -1
  27. package/dist/index172.mjs +1 -1
  28. package/dist/index173.mjs +1 -1
  29. package/dist/index175.mjs +3 -3
  30. package/dist/index176.mjs +1 -1
  31. package/dist/index178.mjs +2 -2
  32. package/dist/index179.mjs +1 -1
  33. package/dist/index186.mjs +1 -1
  34. package/dist/index188.mjs +2 -2
  35. package/dist/index189.mjs +5 -5
  36. package/dist/index192.mjs +1 -1
  37. package/dist/index195.mjs +1 -1
  38. package/dist/index198.mjs +1 -1
  39. package/dist/index199.mjs +1 -1
  40. package/dist/index203.mjs +1 -1
  41. package/dist/index205.mjs +1 -1
  42. package/dist/index209.mjs +1 -1
  43. package/dist/index21.mjs +66 -66
  44. package/dist/index211.mjs +1 -1
  45. package/dist/index22.mjs +105 -91
  46. package/dist/index224.mjs +1 -1
  47. package/dist/index225.mjs +3 -3
  48. package/dist/index228.mjs +3 -3
  49. package/dist/index230.mjs +1 -1
  50. package/dist/index232.mjs +3 -3
  51. package/dist/index233.mjs +5 -5
  52. package/dist/index234.mjs +3 -3
  53. package/dist/index236.mjs +2 -2
  54. package/dist/index237.mjs +2 -108
  55. package/dist/index238.mjs +2 -2
  56. package/dist/index241.mjs +2 -2
  57. package/dist/index243.mjs +2 -2
  58. package/dist/index244.mjs +108 -2
  59. package/dist/index245.mjs +2 -2
  60. package/dist/index247.mjs +3 -3
  61. package/dist/index248.mjs +2 -2
  62. package/dist/index249.mjs +2 -2
  63. package/dist/index250.mjs +2 -2
  64. package/dist/index251.mjs +244 -2
  65. package/dist/index252.mjs +2 -2
  66. package/dist/index253.mjs +33 -2
  67. package/dist/index254.mjs +65 -2
  68. package/dist/index255.mjs +25 -2
  69. package/dist/index256.mjs +2 -2
  70. package/dist/index257.mjs +2 -244
  71. package/dist/index258.mjs +2 -2
  72. package/dist/index259.mjs +2 -33
  73. package/dist/index260.mjs +2 -65
  74. package/dist/index261.mjs +2 -25
  75. package/dist/index262.mjs +2 -2
  76. package/dist/index264.mjs +1 -1
  77. package/dist/index267.mjs +2 -3
  78. package/dist/index268.mjs +18 -2
  79. package/dist/index269.mjs +47 -2
  80. package/dist/index270.mjs +2 -17
  81. package/dist/index271.mjs +2 -13
  82. package/dist/index272.mjs +2 -6
  83. package/dist/index273.mjs +2 -30
  84. package/dist/index275.mjs +91 -2
  85. package/dist/index276.mjs +3 -18
  86. package/dist/index277.mjs +2 -47
  87. package/dist/index278.mjs +2 -2
  88. package/dist/index280.mjs +17 -2
  89. package/dist/index281.mjs +13 -2
  90. package/dist/index282.mjs +6 -2
  91. package/dist/index283.mjs +30 -91
  92. package/dist/index30.mjs +31 -27
  93. package/dist/index43.mjs +1 -1
  94. package/dist/index44.mjs +1 -1
  95. package/dist/index45.mjs +1 -1
  96. package/dist/index46.mjs +1 -1
  97. package/dist/index47.mjs +1 -1
  98. package/dist/index48.mjs +2 -2
  99. package/dist/index50.mjs +2 -2
  100. package/dist/index58.mjs +1 -1
  101. package/dist/index63.mjs +17 -17
  102. package/dist/index65.mjs +1 -1
  103. package/dist/index66.mjs +1 -1
  104. package/dist/index67.mjs +1 -1
  105. package/dist/index68.mjs +1 -1
  106. package/dist/index69.mjs +1 -1
  107. package/dist/index70.mjs +1 -1
  108. package/dist/index71.mjs +1 -1
  109. package/dist/index72.mjs +1 -1
  110. package/dist/index73.mjs +1 -1
  111. package/dist/index74.mjs +1 -1
  112. package/dist/index75.mjs +1 -1
  113. package/dist/index76.mjs +1 -1
  114. package/dist/index77.mjs +1 -1
  115. package/dist/index78.mjs +1 -1
  116. package/dist/index79.mjs +23 -4
  117. package/dist/index8.mjs +81 -82
  118. package/dist/index80.mjs +2 -23
  119. package/dist/index81.mjs +150 -21
  120. package/dist/index82.mjs +4 -152
  121. package/dist/index83.mjs +23 -2
  122. package/dist/index86.mjs +1 -1
  123. package/dist/index87.mjs +2 -235
  124. package/dist/index88.mjs +5 -5
  125. package/dist/index89.mjs +1125 -125
  126. package/dist/index9.mjs +43 -44
  127. package/dist/index90.mjs +19 -67
  128. package/dist/index91.mjs +50 -82
  129. package/dist/index92.mjs +32 -28
  130. package/dist/index93.mjs +2 -9
  131. package/dist/index94.mjs +229 -69
  132. package/dist/index95.mjs +5 -3
  133. package/dist/index96.mjs +134 -2
  134. package/dist/index97.mjs +64 -79
  135. package/dist/index98.mjs +84 -51
  136. package/dist/index99.mjs +28 -5
  137. package/dist/lib/utils.d.ts +3 -0
  138. package/dist/lib/utils.d.ts.map +1 -1
  139. package/package.json +1 -1
  140. package/src/components/AssistantDrawer.tsx +16 -2
  141. package/src/components/Checkout.tsx +1 -5
  142. package/src/components/DeliveryConfirmation.tsx +1 -6
  143. package/src/components/OrderConfirmation.tsx +1 -7
  144. package/src/lib/utils.ts +6 -0
package/dist/index195.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as r } from "./index249.mjs";
2
+ import { __exports as r } from "./index256.mjs";
3
3
  var u;
4
4
  function D() {
5
5
  return u ? r : (u = 1, function(t) {
package/dist/index198.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __module as t } from "./index251.mjs";
2
+ import { __module as t } from "./index257.mjs";
3
3
  import { __require as _ } from "./index116.mjs";
4
4
  import { __require as d } from "./index130.mjs";
5
5
  var u;
package/dist/index199.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as t } from "./index252.mjs";
2
+ import { __exports as t } from "./index258.mjs";
3
3
  import { __require as _ } from "./index203.mjs";
4
4
  import { __require as c } from "./index205.mjs";
5
5
  var u;
package/dist/index203.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as r } from "./index254.mjs";
2
+ import { __exports as r } from "./index259.mjs";
3
3
  import { __require as o } from "./index130.mjs";
4
4
  var i;
5
5
  function _() {
package/dist/index205.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index253.mjs";
2
+ import { __exports as e } from "./index260.mjs";
3
3
  import { __require as f } from "./index130.mjs";
4
4
  var n;
5
5
  function p() {
package/dist/index209.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as t } from "./index255.mjs";
2
+ import { __exports as t } from "./index262.mjs";
3
3
  import { __require as a } from "./index205.mjs";
4
4
  var n;
5
5
  function h() {
package/dist/index21.mjs CHANGED
@@ -1,42 +1,42 @@
1
1
  'use client';
2
2
  import { jsxs as a, jsx as e, Fragment as O } from "react/jsx-runtime";
3
- import { useState as C, useEffect as Z, useMemo as V, useCallback as qe } from "react";
4
- import { object as Q, string as S, ValidationError as _e } from "./index54.mjs";
3
+ import { useState as C, useEffect as _, useMemo as V, useCallback as qe } from "react";
4
+ import { object as Q, string as S, ValidationError as Le } from "./index54.mjs";
5
5
  import "./index31.mjs";
6
6
  import "@tanstack/react-query";
7
- import { useGetDeliveryZones as Le } from "./index47.mjs";
8
- import { useCart as Ze } from "./index3.mjs";
7
+ import { useGetDeliveryZones as Ze } from "./index47.mjs";
8
+ import { useCart as _e } from "./index3.mjs";
9
9
  import { Modal as fe } from "./index27.mjs";
10
10
  import { FormInput as W } from "./index28.mjs";
11
11
  import { FormSelect as ve } from "./index29.mjs";
12
12
  import { Button as $ } from "./index24.mjs";
13
- import { Loader2 as R, ChevronLeft as ze, ChevronRight as Fe, Package as ge, Banknote as Ne, Phone as Te, ChevronDown as Ae, Zap as Be } from "lucide-react";
13
+ import { Loader2 as K, ChevronLeft as ze, ChevronRight as Fe, Package as ge, Banknote as Ne, Phone as Te, ChevronDown as Ae, Zap as Be } from "lucide-react";
14
14
  import { PostPurchaseUpsell as We } from "./index55.mjs";
15
- import { formatCurrency as _, cn as M, getFbCookies as Y, getTikTokCookies as J } from "./index30.mjs";
16
- import $e from "./index56.mjs";
15
+ import { formatCurrency as L, WHATSAPP_HELP_LINK as $e, cn as M, getFbCookies as Y, getTikTokCookies as J } from "./index30.mjs";
16
+ import Ke from "./index56.mjs";
17
17
  import { usePaystackPayment as Re } from "./index57.mjs";
18
- const Ue = "2348125648668", He = `https://wa.me/${Ue}`, Ke = (d) => d.replace(/\D/g, ""), U = (d) => {
18
+ const Ue = (d) => d.replace(/\D/g, ""), R = (d) => {
19
19
  const x = d.trim().split(/\s+/), i = x[0] || "", b = x.slice(1).join(" ") || "-";
20
20
  return { firstName: i, lastName: b };
21
21
  }, Ge = Q({
22
22
  fullName: S().required("Name is required").min(2, "Name must be at least 2 characters").max(100, "Name must be less than 100 characters"),
23
23
  phone: S().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (d) => {
24
24
  if (!d) return !1;
25
- const x = Ke(d);
25
+ const x = Ue(d);
26
26
  return [
27
27
  /^0[789]\d{9}$/
28
28
  // 0xxxxxxxxx (11 digits total)
29
29
  ].some((b) => b.test(x));
30
30
  })
31
- }), Oe = Q({
31
+ }), He = Q({
32
32
  address: S().required("Street address is required").min(10, "Please provide a complete address"),
33
33
  city: S().required("City is required").min(3, "City name must be at least 3 characters"),
34
34
  state: S().required("State is required").test("not-empty", "State is required", (d) => !!d && d.trim() !== ""),
35
35
  deliveryZoneId: S().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (d) => !!d && d.trim() !== "")
36
- }), Ve = Q({
36
+ }), Oe = Q({
37
37
  paymentMethod: S().oneOf(["cod", "online"], "Please select a payment method").required("Payment method is required")
38
38
  });
39
- function mt({
39
+ function ct({
40
40
  isOpen: d,
41
41
  onClose: x,
42
42
  initialData: i,
@@ -46,14 +46,14 @@ function mt({
46
46
  refundPolicy: z
47
47
  }) {
48
48
  var ie, de, oe, ce, me, he, ue, pe, ye;
49
- const [m, w] = C("customer"), [F, xe] = C(void 0), [y, X] = C(void 0), [f, H] = C(null), { refetch: E, isLoading: D, cart: t, updateCartMutation: P, checkoutMutation: we, clearAndCreateNewCart: ee } = Ze(), te = (ie = t == null ? void 0 : t.brand) == null ? void 0 : ie.paystackPublicKey, ae = Re({
49
+ const [m, w] = C("customer"), [F, xe] = C(void 0), [y, X] = C(void 0), [f, U] = C(null), { refetch: E, isLoading: D, cart: t, updateCartMutation: k, checkoutMutation: we, clearAndCreateNewCart: ee } = _e(), te = (ie = t == null ? void 0 : t.brand) == null ? void 0 : ie.paystackPublicKey, ae = Re({
50
50
  isOpen: d,
51
51
  publicKey: te || "",
52
52
  onSuccess: async (n) => {
53
53
  try {
54
- const { fbc: r, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: L } = U(s.fullName), N = await j.mutateAsync({
54
+ const { fbc: r, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: Z } = R(s.fullName), N = await j.mutateAsync({
55
55
  firstName: p,
56
- lastName: L,
56
+ lastName: Z,
57
57
  phone: s.phone,
58
58
  address: s.address,
59
59
  city: s.city,
@@ -70,7 +70,7 @@ function mt({
70
70
  c == null || c(new Error((I == null ? void 0 : I.message) || "Checkout failed"));
71
71
  return;
72
72
  }
73
- H(N), ee(), b == null || b(N);
73
+ U(N), ee(), b == null || b(N);
74
74
  } catch (r) {
75
75
  c == null || c(r);
76
76
  }
@@ -79,16 +79,16 @@ function mt({
79
79
  console.log("Payment popup closed by user");
80
80
  }
81
81
  });
82
- Z(() => {
82
+ _(() => {
83
83
  d && E();
84
84
  }, [d, E]);
85
- const { data: k } = Le(((de = t == null ? void 0 : t.brand) == null ? void 0 : de.id) || "", {
85
+ const { data: P } = Ze(((de = t == null ? void 0 : t.brand) == null ? void 0 : de.id) || "", {
86
86
  enabled: !!((oe = t == null ? void 0 : t.brand) != null && oe.id)
87
- }), u = V(() => k == null ? void 0 : k.find((n) => n.id === F), [k, F]), h = V(() => u == null ? void 0 : u.zones.find((n) => n.id === y), [u, y]), j = we;
88
- Z(() => {
89
- d || (H(null), w("customer"), j.reset());
87
+ }), u = V(() => P == null ? void 0 : P.find((n) => n.id === F), [P, F]), h = V(() => u == null ? void 0 : u.zones.find((n) => n.id === y), [u, y]), j = we;
88
+ _(() => {
89
+ d || (U(null), w("customer"), j.reset());
90
90
  }, [d]);
91
- const [s, K] = C({
91
+ const [s, G] = C({
92
92
  fullName: (i == null ? void 0 : i.fullName) || "",
93
93
  phone: (i == null ? void 0 : i.phone) || "",
94
94
  address: (i == null ? void 0 : i.address) || "",
@@ -97,14 +97,14 @@ function mt({
97
97
  paymentMethod: (i == null ? void 0 : i.paymentMethod) || "online",
98
98
  notes: (i == null ? void 0 : i.notes) || ""
99
99
  });
100
- Z(() => {
100
+ _(() => {
101
101
  d && w("customer");
102
102
  }, [d]);
103
103
  const [se, re] = C(!1);
104
- Z(() => {
104
+ _(() => {
105
105
  if (d && t && !i && !se) {
106
106
  const n = [t.customerFirstName, t.customerLastName].filter(Boolean).join(" ");
107
- K((r) => {
107
+ G((r) => {
108
108
  var l;
109
109
  return {
110
110
  ...r,
@@ -115,28 +115,28 @@ function mt({
115
115
  }), re(!0);
116
116
  }
117
117
  d || re(!1);
118
- }, [d, t, i, se]), Z(() => {
118
+ }, [d, t, i, se]), _(() => {
119
119
  if (y) {
120
120
  const n = u == null ? void 0 : u.zones.find((r) => r.id === y);
121
- n && K((r) => ({
121
+ n && G((r) => ({
122
122
  ...r,
123
123
  paymentMethod: n.allowOnline ? "online" : "cod"
124
124
  }));
125
125
  }
126
126
  }, [y, u]);
127
- const [v, T] = C({}), [G, Ce] = C(!1), q = (n) => {
127
+ const [v, T] = C({}), [H, Ce] = C(!1), q = (n) => {
128
128
  const { name: r, value: l } = n.target;
129
- K((o) => ({ ...o, [r]: l })), v[r] && T((o) => ({ ...o, [r]: void 0 }));
129
+ G((o) => ({ ...o, [r]: l })), v[r] && T((o) => ({ ...o, [r]: void 0 }));
130
130
  }, ne = qe(
131
131
  (n) => {
132
132
  const r = s[n];
133
133
  if (r)
134
134
  if (n === "fullName") {
135
- const { firstName: l, lastName: o } = U(r);
136
- P.mutate({ customerFirstName: l, customerLastName: o });
137
- } else n === "phone" && P.mutate({ customerPhone: r });
135
+ const { firstName: l, lastName: o } = R(r);
136
+ k.mutate({ customerFirstName: l, customerLastName: o });
137
+ } else n === "phone" && k.mutate({ customerPhone: r });
138
138
  },
139
- [s, P]
139
+ [s, k]
140
140
  ), A = (n) => {
141
141
  const r = {};
142
142
  try {
@@ -149,17 +149,17 @@ function mt({
149
149
  state: F || s.state || "",
150
150
  deliveryZoneId: y || s.deliveryZoneId || ""
151
151
  };
152
- Oe.validateSync(l, { abortEarly: !1 });
153
- } else n === "payment" && Ve.validateSync(s, { abortEarly: !1 });
152
+ He.validateSync(l, { abortEarly: !1 });
153
+ } else n === "payment" && Oe.validateSync(s, { abortEarly: !1 });
154
154
  } catch (l) {
155
- l instanceof _e && l.inner.forEach((o) => {
155
+ l instanceof Le && l.inner.forEach((o) => {
156
156
  o.path && (r[o.path] = o.message);
157
157
  });
158
158
  }
159
159
  return T(r), Object.keys(r).length === 0;
160
- }, Pe = () => {
161
- A(m) && (m === "customer" ? w("delivery") : m === "delivery" && w("payment"));
162
160
  }, ke = () => {
161
+ A(m) && (m === "customer" ? w("delivery") : m === "delivery" && w("payment"));
162
+ }, Pe = () => {
163
163
  m === "payment" ? w("delivery") : m === "delivery" && w("customer");
164
164
  }, Ie = async () => {
165
165
  var n;
@@ -181,7 +181,7 @@ function mt({
181
181
  c == null || c(new Error("Payment system is loading. Please try again."));
182
182
  return;
183
183
  }
184
- const r = Math.round(t.pricing.total * 100), { fbc: l, fbp: o } = Y(), { ttp: g, ttclid: p } = J(), { firstName: L, lastName: N } = U(s.fullName);
184
+ const r = Math.round(t.pricing.total * 100), { fbc: l, fbp: o } = Y(), { ttp: g, ttclid: p } = J(), { firstName: Z, lastName: N } = R(s.fullName);
185
185
  ae.initializePayment({
186
186
  email: (t == null ? void 0 : t.customerEmail) || `${s.phone.replace(/\D/g, "")}@customer.instock.ng`,
187
187
  phone: s.phone,
@@ -193,7 +193,7 @@ function mt({
193
193
  address: s.address,
194
194
  city: s.city,
195
195
  delivery_zone_id: y || s.deliveryZoneId,
196
- firstName: L,
196
+ firstName: Z,
197
197
  lastName: N,
198
198
  phone: s.phone,
199
199
  fbc: l,
@@ -232,9 +232,9 @@ function mt({
232
232
  return;
233
233
  }
234
234
  try {
235
- const { fbc: r, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: L } = U(s.fullName), N = await j.mutateAsync({
235
+ const { fbc: r, fbp: l } = Y(), { ttp: o, ttclid: g } = J(), { firstName: p, lastName: Z } = R(s.fullName), N = await j.mutateAsync({
236
236
  firstName: p,
237
- lastName: L,
237
+ lastName: Z,
238
238
  phone: s.phone,
239
239
  address: s.address,
240
240
  city: s.city,
@@ -250,7 +250,7 @@ function mt({
250
250
  c == null || c(new Error((I == null ? void 0 : I.message) || "Checkout failed"));
251
251
  return;
252
252
  }
253
- H(N), ee(), b == null || b(N);
253
+ U(N), ee(), b == null || b(N);
254
254
  } catch (r) {
255
255
  c == null || c(r);
256
256
  }
@@ -261,16 +261,16 @@ function mt({
261
261
  payment: "Payment Method"
262
262
  }, Se = V(() => Me[m], [m]), je = /* @__PURE__ */ a("div", { className: "space-y-3", children: [
263
263
  (m === "payment" || m === "delivery") && ((ce = t == null ? void 0 : t.pricing) == null ? void 0 : ce.total) && /* @__PURE__ */ a("div", { className: "text-sm text-black relative", children: [
264
- D && /* @__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" }) }),
264
+ D && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(K, { className: "animate-spin text-accent-500" }) }),
265
265
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
266
266
  /* @__PURE__ */ e("span", { children: "Subtotal" }),
267
- /* @__PURE__ */ e("span", { children: _(((me = t == null ? void 0 : t.pricing) == null ? void 0 : me.subtotal) ?? 0) })
267
+ /* @__PURE__ */ e("span", { children: L(((me = t == null ? void 0 : t.pricing) == null ? void 0 : me.subtotal) ?? 0) })
268
268
  ] }),
269
269
  t.pricing.discount && /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
270
270
  /* @__PURE__ */ e("span", { children: "Discount" }),
271
271
  /* @__PURE__ */ a("span", { className: "text-green-600", children: [
272
272
  "-",
273
- _(((ue = (he = t == null ? void 0 : t.pricing) == null ? void 0 : he.discount) == null ? void 0 : ue.amount) ?? 0)
273
+ L(((ue = (he = t == null ? void 0 : t.pricing) == null ? void 0 : he.discount) == null ? void 0 : ue.amount) ?? 0)
274
274
  ] })
275
275
  ] }),
276
276
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
@@ -282,14 +282,14 @@ function mt({
282
282
  const n = (o = t == null ? void 0 : t.brand) == null ? void 0 : o.freeShippingThreshold, r = ((g = t == null ? void 0 : t.pricing) == null ? void 0 : g.subtotal) ?? 0;
283
283
  if (n && r >= n)
284
284
  return /* @__PURE__ */ e("span", { className: "text-green-600", children: "Free" });
285
- const l = P.isPending ? (h == null ? void 0 : h.deliveryCost) ?? 0 : ((p = t == null ? void 0 : t.pricing) == null ? void 0 : p.deliveryCharge) ?? 0;
286
- return l === 0 ? /* @__PURE__ */ e("span", { className: "text-green-600", children: "Free" }) : _(l);
285
+ const l = k.isPending ? (h == null ? void 0 : h.deliveryCost) ?? 0 : ((p = t == null ? void 0 : t.pricing) == null ? void 0 : p.deliveryCharge) ?? 0;
286
+ return l === 0 ? /* @__PURE__ */ e("span", { className: "text-green-600", children: "Free" }) : L(l);
287
287
  })() })
288
288
  ] }),
289
289
  /* @__PURE__ */ e("hr", { className: "border-gray-200 my-2" }),
290
290
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
291
291
  /* @__PURE__ */ e("span", { children: "Total" }),
292
- /* @__PURE__ */ e("span", { children: _(((pe = t == null ? void 0 : t.pricing) == null ? void 0 : pe.total) ?? 0) })
292
+ /* @__PURE__ */ e("span", { children: L(((pe = t == null ? void 0 : t.pricing) == null ? void 0 : pe.total) ?? 0) })
293
293
  ] })
294
294
  ] }),
295
295
  /* @__PURE__ */ a("div", { className: "flex gap-3", children: [
@@ -298,7 +298,7 @@ function mt({
298
298
  {
299
299
  type: "button",
300
300
  variant: "outline",
301
- onClick: ke,
301
+ onClick: Pe,
302
302
  className: "flex-1 border-gray-400",
303
303
  size: "lg",
304
304
  children: [
@@ -311,12 +311,12 @@ function mt({
311
311
  $,
312
312
  {
313
313
  type: "button",
314
- onClick: Pe,
315
- disabled: m === "delivery" && P.isPending,
314
+ onClick: ke,
315
+ disabled: m === "delivery" && k.isPending,
316
316
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
317
317
  size: "lg",
318
- children: m === "delivery" && P.isPending ? /* @__PURE__ */ a(O, { children: [
319
- /* @__PURE__ */ e(R, { className: "mr-2 h-4 w-4 animate-spin" }),
318
+ children: m === "delivery" && k.isPending ? /* @__PURE__ */ a(O, { children: [
319
+ /* @__PURE__ */ e(K, { className: "mr-2 h-4 w-4 animate-spin" }),
320
320
  "Updating..."
321
321
  ] }) : /* @__PURE__ */ a(O, { children: [
322
322
  "Next",
@@ -332,7 +332,7 @@ function mt({
332
332
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
333
333
  size: "lg",
334
334
  children: j.isPending ? /* @__PURE__ */ a(O, { children: [
335
- /* @__PURE__ */ e(R, { className: "mr-2 h-4 w-4 animate-spin" }),
335
+ /* @__PURE__ */ e(K, { className: "mr-2 h-4 w-4 animate-spin" }),
336
336
  "Processing..."
337
337
  ] }) : be
338
338
  }
@@ -397,7 +397,7 @@ function mt({
397
397
  ] }),
398
398
  /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
399
399
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Total" }),
400
- /* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children: _(f.totalPrice) })
400
+ /* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children: L(f.totalPrice) })
401
401
  ] })
402
402
  ] })
403
403
  ] }),
@@ -423,7 +423,7 @@ function mt({
423
423
  footer: je,
424
424
  size: "lg",
425
425
  contentClassName: "p-0",
426
- children: D ? /* @__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__ */ a("div", { className: "relative w-full", children: [
426
+ children: D ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(K, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ a("div", { className: "relative w-full", children: [
427
427
  le && /* @__PURE__ */ a("div", { className: "space-y-3 p-4 pb-0", children: [
428
428
  h.noteTitle && h.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
429
429
  /* @__PURE__ */ e(ge, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
@@ -443,7 +443,7 @@ function mt({
443
443
  /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ a(
444
444
  "a",
445
445
  {
446
- href: He,
446
+ href: $e,
447
447
  target: "_blank",
448
448
  rel: "noopener noreferrer",
449
449
  className: "flex items-center justify-center gap-2 p-3 bg-green-500 hover:bg-green-600 rounded-lg transition-colors",
@@ -547,7 +547,7 @@ function mt({
547
547
  required: !0,
548
548
  children: [
549
549
  /* @__PURE__ */ e("option", { disabled: !0, value: "", children: "Select State" }),
550
- k == null ? void 0 : k.slice().sort((n, r) => {
550
+ P == null ? void 0 : P.slice().sort((n, r) => {
551
551
  const l = n.name.toLowerCase() === "lagos" ? 0 : 1, o = r.name.toLowerCase() === "lagos" ? 0 : 1;
552
552
  return l - o;
553
553
  }).map((n) => /* @__PURE__ */ e("option", { value: n.id, children: n.name }, n.id))
@@ -561,7 +561,7 @@ function mt({
561
561
  value: y || "",
562
562
  onChange: (n) => {
563
563
  const r = n.target.value;
564
- X(r || void 0), v.deliveryZoneId && T((l) => ({ ...l, deliveryZoneId: void 0 })), r && P.mutate({ deliveryZoneId: r });
564
+ X(r || void 0), v.deliveryZoneId && T((l) => ({ ...l, deliveryZoneId: void 0 })), r && k.mutate({ deliveryZoneId: r });
565
565
  },
566
566
  disabled: !u,
567
567
  error: v.deliveryZoneId,
@@ -573,7 +573,7 @@ function mt({
573
573
  const n = ((o = t == null ? void 0 : t.pricing) == null ? void 0 : o.subtotal) ?? 0, r = (g = t == null ? void 0 : t.brand) == null ? void 0 : g.freeShippingThreshold, l = r && n >= r;
574
574
  return u == null ? void 0 : u.zones.map((p) => /* @__PURE__ */ a("option", { value: p.id, children: [
575
575
  p.name,
576
- l ? "" : ` (${_(p.deliveryCost)})`
576
+ l ? "" : ` (${L(p.deliveryCost)})`
577
577
  ] }, p.id));
578
578
  })()
579
579
  ]
@@ -587,7 +587,7 @@ function mt({
587
587
  "button",
588
588
  {
589
589
  type: "button",
590
- onClick: () => Ce(!G),
590
+ onClick: () => Ce(!H),
591
591
  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",
592
592
  children: [
593
593
  /* @__PURE__ */ e("span", { className: "text-sm font-bold text-accent-700", children: z.title || "Yes, we offer refunds!" }),
@@ -597,7 +597,7 @@ function mt({
597
597
  size: 16,
598
598
  className: M(
599
599
  "transform transition-transform duration-200 text-gray-500",
600
- G && "rotate-180"
600
+ H && "rotate-180"
601
601
  )
602
602
  }
603
603
  )
@@ -609,7 +609,7 @@ function mt({
609
609
  {
610
610
  className: M(
611
611
  "overflow-hidden transition-all duration-300 ease-in-out",
612
- G ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
612
+ H ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
613
613
  ),
614
614
  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: z.policies && /* @__PURE__ */ a("div", { children: [
615
615
  /* @__PURE__ */ e("h4", { className: "font-bold text-gray-800 mb-2", children: "Our Refund Policy" }),
@@ -660,7 +660,7 @@ function mt({
660
660
  /* @__PURE__ */ e(
661
661
  "img",
662
662
  {
663
- src: $e,
663
+ src: Ke,
664
664
  alt: "Paystack",
665
665
  className: "h-4 w-auto mt-2 mx-auto"
666
666
  }
@@ -723,5 +723,5 @@ function mt({
723
723
  );
724
724
  }
725
725
  export {
726
- mt as Checkout
726
+ ct as Checkout
727
727
  };
package/dist/index211.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as r } from "./index262.mjs";
2
+ import { __exports as r } from "./index261.mjs";
3
3
  import { __require as s } from "./index130.mjs";
4
4
  var a;
5
5
  function _() {