@instockng/storefront-ui 1.0.110 → 1.0.112

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 (169) 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 +28 -4
  6. package/dist/index101.mjs +7 -177
  7. package/dist/index102.mjs +72 -50
  8. package/dist/index103.mjs +4 -69
  9. package/dist/index104.mjs +2 -2
  10. package/dist/index105.mjs +82 -5
  11. package/dist/index106.mjs +53 -1133
  12. package/dist/index107.mjs +5 -19
  13. package/dist/index108.mjs +4 -54
  14. package/dist/index109.mjs +174 -28
  15. package/dist/index110.mjs +53 -2
  16. package/dist/index111.mjs +69 -37
  17. package/dist/index112.mjs +34 -40
  18. package/dist/index113.mjs +43 -2
  19. package/dist/index117.mjs +2 -2
  20. package/dist/index118.mjs +2 -2
  21. package/dist/index153.mjs +2 -2
  22. package/dist/index154.mjs +1 -1
  23. package/dist/index155.mjs +6 -6
  24. package/dist/index156.mjs +2 -2
  25. package/dist/index157.mjs +2 -2
  26. package/dist/index159.mjs +2 -2
  27. package/dist/index160.mjs +2 -2
  28. package/dist/index161.mjs +1 -1
  29. package/dist/index163.mjs +8 -8
  30. package/dist/index164.mjs +8 -8
  31. package/dist/index169.mjs +1 -1
  32. package/dist/index170.mjs +1 -1
  33. package/dist/index171.mjs +1 -1
  34. package/dist/index172.mjs +1 -1
  35. package/dist/index173.mjs +1 -1
  36. package/dist/index175.mjs +3 -3
  37. package/dist/index176.mjs +1 -1
  38. package/dist/index178.mjs +2 -2
  39. package/dist/index179.mjs +1 -1
  40. package/dist/index184.mjs +2 -2
  41. package/dist/index186.mjs +1 -1
  42. package/dist/index188.mjs +2 -2
  43. package/dist/index189.mjs +5 -5
  44. package/dist/index192.mjs +1 -1
  45. package/dist/index195.mjs +1 -1
  46. package/dist/index198.mjs +1 -1
  47. package/dist/index199.mjs +1 -1
  48. package/dist/index203.mjs +1 -1
  49. package/dist/index205.mjs +1 -1
  50. package/dist/index209.mjs +1 -1
  51. package/dist/index21.mjs +66 -66
  52. package/dist/index211.mjs +1 -1
  53. package/dist/index22.mjs +117 -99
  54. package/dist/index220.mjs +2 -2
  55. package/dist/index222.mjs +1 -1
  56. package/dist/index223.mjs +1 -1
  57. package/dist/index224.mjs +2 -31
  58. package/dist/index225.mjs +2 -11
  59. package/dist/index226.mjs +2 -4
  60. package/dist/index227.mjs +2 -4
  61. package/dist/index228.mjs +2 -13
  62. package/dist/index229.mjs +2 -7
  63. package/dist/index230.mjs +107 -11
  64. package/dist/index231.mjs +2 -5
  65. package/dist/index232.mjs +2 -33
  66. package/dist/index233.mjs +2 -31
  67. package/dist/index234.mjs +2 -28
  68. package/dist/index235.mjs +34 -58
  69. package/dist/index236.mjs +2 -2
  70. package/dist/index237.mjs +233 -97
  71. package/dist/index238.mjs +2 -2
  72. package/dist/index239.mjs +33 -2
  73. package/dist/index240.mjs +65 -2
  74. package/dist/index241.mjs +25 -2
  75. package/dist/index242.mjs +2 -2
  76. package/dist/index245.mjs +2 -2
  77. package/dist/index246.mjs +2 -2
  78. package/dist/index247.mjs +2 -37
  79. package/dist/index248.mjs +2 -2
  80. package/dist/index249.mjs +2 -2
  81. package/dist/index251.mjs +2 -2
  82. package/dist/index252.mjs +2 -2
  83. package/dist/index253.mjs +31 -2
  84. package/dist/index254.mjs +11 -2
  85. package/dist/index255.mjs +4 -2
  86. package/dist/index256.mjs +4 -2
  87. package/dist/index257.mjs +2 -244
  88. package/dist/index258.mjs +4 -2
  89. package/dist/index259.mjs +13 -33
  90. package/dist/index260.mjs +7 -65
  91. package/dist/index261.mjs +11 -24
  92. package/dist/index262.mjs +5 -2
  93. package/dist/index263.mjs +33 -2
  94. package/dist/index264.mjs +31 -4
  95. package/dist/index265.mjs +28 -2
  96. package/dist/index266.mjs +61 -2
  97. package/dist/index267.mjs +2 -3
  98. package/dist/index268.mjs +2 -2
  99. package/dist/index269.mjs +18 -2
  100. package/dist/index270.mjs +46 -16
  101. package/dist/index271.mjs +2 -13
  102. package/dist/index272.mjs +2 -6
  103. package/dist/index273.mjs +2 -30
  104. package/dist/index275.mjs +91 -2
  105. package/dist/index276.mjs +2 -18
  106. package/dist/index277.mjs +3 -47
  107. package/dist/index278.mjs +2 -2
  108. package/dist/index279.mjs +2 -2
  109. package/dist/index280.mjs +17 -2
  110. package/dist/index281.mjs +13 -2
  111. package/dist/index282.mjs +6 -2
  112. package/dist/index283.mjs +30 -91
  113. package/dist/index30.mjs +31 -27
  114. package/dist/index43.mjs +1 -1
  115. package/dist/index44.mjs +1 -1
  116. package/dist/index45.mjs +1 -1
  117. package/dist/index46.mjs +1 -1
  118. package/dist/index47.mjs +1 -1
  119. package/dist/index48.mjs +2 -2
  120. package/dist/index50.mjs +2 -2
  121. package/dist/index54.mjs +3 -3
  122. package/dist/index58.mjs +1 -1
  123. package/dist/index63.mjs +17 -17
  124. package/dist/index64.mjs +2 -2
  125. package/dist/index65.mjs +1 -1
  126. package/dist/index66.mjs +1 -1
  127. package/dist/index67.mjs +1 -1
  128. package/dist/index68.mjs +1 -1
  129. package/dist/index69.mjs +1 -1
  130. package/dist/index70.mjs +1 -1
  131. package/dist/index71.mjs +1 -1
  132. package/dist/index72.mjs +1 -1
  133. package/dist/index73.mjs +1 -1
  134. package/dist/index74.mjs +1 -1
  135. package/dist/index75.mjs +1 -1
  136. package/dist/index76.mjs +1 -1
  137. package/dist/index77.mjs +1 -1
  138. package/dist/index78.mjs +1 -1
  139. package/dist/index79.mjs +23 -4
  140. package/dist/index8.mjs +81 -82
  141. package/dist/index80.mjs +2 -23
  142. package/dist/index81.mjs +150 -21
  143. package/dist/index82.mjs +19 -149
  144. package/dist/index83.mjs +75 -2
  145. package/dist/index84.mjs +14 -74
  146. package/dist/index85.mjs +62 -14
  147. package/dist/index86.mjs +4 -62
  148. package/dist/index87.mjs +2 -235
  149. package/dist/index88.mjs +5 -5
  150. package/dist/index89.mjs +1125 -125
  151. package/dist/index9.mjs +43 -44
  152. package/dist/index90.mjs +19 -67
  153. package/dist/index91.mjs +50 -82
  154. package/dist/index92.mjs +32 -28
  155. package/dist/index93.mjs +2 -9
  156. package/dist/index94.mjs +2 -75
  157. package/dist/index95.mjs +234 -3
  158. package/dist/index96.mjs +6 -2
  159. package/dist/index97.mjs +128 -77
  160. package/dist/index98.mjs +67 -53
  161. package/dist/index99.mjs +86 -5
  162. package/dist/lib/utils.d.ts +3 -0
  163. package/dist/lib/utils.d.ts.map +1 -1
  164. package/package.json +1 -1
  165. package/src/components/AssistantDrawer.tsx +19 -3
  166. package/src/components/Checkout.tsx +1 -5
  167. package/src/components/DeliveryConfirmation.tsx +1 -6
  168. package/src/components/OrderConfirmation.tsx +1 -7
  169. package/src/lib/utils.ts +6 -0
package/dist/index8.mjs CHANGED
@@ -1,200 +1,199 @@
1
1
  'use client';
2
- import { jsx as e, jsxs as r, Fragment as T } from "react/jsx-runtime";
3
- import { useState as E } from "react";
2
+ import { jsx as e, jsxs as r, Fragment as D } from "react/jsx-runtime";
3
+ import { useState as O } from "react";
4
4
  import "./index31.mjs";
5
5
  import "@tanstack/react-query";
6
- import { useGetOrder as U, useConfirmOrder as M } from "./index46.mjs";
7
- import { Card as s, CardHeader as m, CardTitle as o, CardContent as i } from "./index25.mjs";
8
- import { Button as S } from "./index24.mjs";
9
- import { Badge as v } from "./index26.mjs";
10
- import { Loader2 as b, XCircle as _, Package as H, CheckCircle as L } from "lucide-react";
11
- import { cn as c, formatDateTime as k, formatCurrency as l } from "./index30.mjs";
12
- const g = "2348125648668", f = "0" + g.slice(3), W = `${f.slice(0, 4)} ${f.slice(4, 7)} ${f.slice(7)}`, $ = `https://wa.me/${g}`;
13
- function X({
14
- orderId: N,
15
- token: x,
6
+ import { useGetOrder as T, useConfirmOrder as U } from "./index46.mjs";
7
+ import { Card as i, CardHeader as m, CardTitle as o, CardContent as s } from "./index25.mjs";
8
+ import { Button as E } from "./index24.mjs";
9
+ import { Badge as y } from "./index26.mjs";
10
+ import { Loader2 as v, XCircle as M, Package as S, CheckCircle as k } from "lucide-react";
11
+ import { cn as c, formatDateTime as L, formatCurrency as l, WHATSAPP_HELP_NUMBER_FORMATTED as _, WHATSAPP_HELP_LINK as H } from "./index30.mjs";
12
+ function G({
13
+ orderId: f,
14
+ token: N,
16
15
  className: h,
17
- headerClassName: w,
18
- buttonClassName: P,
16
+ headerClassName: b,
17
+ buttonClassName: g,
19
18
  cardClassName: n,
20
- whatsappHelpLink: A = $,
21
- whatsappHelpNumber: C = W
19
+ whatsappHelpLink: w = H,
20
+ whatsappHelpNumber: P = _
22
21
  }) {
23
- var y;
24
- const [p, j] = E(!1), { data: u, isLoading: D, error: O } = U(N, x, {
22
+ var x;
23
+ const [p, A] = O(!1), { data: u, isLoading: C, error: j } = T(f, N, {
25
24
  retry: !1
26
- }), d = M({
27
- onSuccess: (a) => {
28
- j(!0);
25
+ }), d = U({
26
+ onSuccess: (t) => {
27
+ A(!0);
29
28
  },
30
- onError: (a) => {
29
+ onError: (t) => {
31
30
  }
32
31
  });
33
- if (D)
32
+ if (C)
34
33
  return /* @__PURE__ */ e("div", { className: c("min-h-screen flex items-center justify-center", h), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
35
- /* @__PURE__ */ e(b, { className: "h-12 w-12 animate-spin text-blue-500 mx-auto mb-4" }),
34
+ /* @__PURE__ */ e(v, { className: "h-12 w-12 animate-spin text-blue-500 mx-auto mb-4" }),
36
35
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "Loading order details..." })
37
36
  ] }) });
38
- if (O || !u || "error" in u)
39
- return /* @__PURE__ */ e("div", { className: c("min-h-screen flex items-center justify-center p-4", h), children: /* @__PURE__ */ r(s, { className: c("max-w-md w-full", n), children: [
37
+ if (j || !u || "error" in u)
38
+ return /* @__PURE__ */ e("div", { className: c("min-h-screen flex items-center justify-center p-4", h), children: /* @__PURE__ */ r(i, { className: c("max-w-md w-full", n), children: [
40
39
  /* @__PURE__ */ e(m, { children: /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
41
- /* @__PURE__ */ e(_, { className: "h-6 w-6 text-red-500" }),
40
+ /* @__PURE__ */ e(M, { className: "h-6 w-6 text-red-500" }),
42
41
  /* @__PURE__ */ e(o, { children: "Order Not Found" })
43
42
  ] }) }),
44
- /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "We couldn't find this order. The link may be invalid or expired. Please contact support if you need assistance." }) })
43
+ /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "We couldn't find this order. The link may be invalid or expired. Please contact support if you need assistance." }) })
45
44
  ] }) });
46
- const t = u;
45
+ const a = u;
47
46
  return /* @__PURE__ */ e("div", { className: c("min-h-screen py-8 px-4", h), children: /* @__PURE__ */ r("div", { className: "max-w-3xl mx-auto space-y-6", children: [
48
- /* @__PURE__ */ r("div", { className: c("text-center", w), children: [
49
- t.brand.logoUrl ? /* @__PURE__ */ e("div", { className: "inline-flex items-center justify-center w-24 h-16 mb-4", children: /* @__PURE__ */ e(
47
+ /* @__PURE__ */ r("div", { className: c("text-center", b), children: [
48
+ a.brand.logoUrl ? /* @__PURE__ */ e("div", { className: "inline-flex items-center justify-center w-24 h-16 mb-4", children: /* @__PURE__ */ e(
50
49
  "img",
51
50
  {
52
- src: t.brand.logoUrl,
53
- alt: `${t.brand.name} logo`,
51
+ src: a.brand.logoUrl,
52
+ alt: `${a.brand.name} logo`,
54
53
  className: "max-w-full max-h-full object-contain"
55
54
  }
56
- ) }) : /* @__PURE__ */ e("div", { className: "inline-flex items-center justify-center w-16 h-16 bg-blue-100 rounded-full mb-4", children: /* @__PURE__ */ e(H, { className: "h-8 w-8 text-blue-600" }) }),
55
+ ) }) : /* @__PURE__ */ e("div", { className: "inline-flex items-center justify-center w-16 h-16 bg-blue-100 rounded-full mb-4", children: /* @__PURE__ */ e(S, { className: "h-8 w-8 text-blue-600" }) }),
57
56
  /* @__PURE__ */ r("h1", { className: "text-3xl font-bold", children: [
58
57
  "Order #",
59
- t.orderNumber
58
+ a.orderNumber
60
59
  ] }),
61
- /* @__PURE__ */ e("p", { className: "text-muted-foreground mt-2", children: t.brand.name })
60
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground mt-2", children: a.brand.name })
62
61
  ] }),
63
- p && /* @__PURE__ */ e(s, { className: c("border-green-200 bg-green-50", n), children: /* @__PURE__ */ e(i, { className: "pt-6", children: /* @__PURE__ */ r("div", { className: "flex items-start space-x-3", children: [
64
- /* @__PURE__ */ e(L, { className: "h-6 w-6 text-green-600 mt-0.5" }),
62
+ p && /* @__PURE__ */ e(i, { className: c("border-green-200 bg-green-50", n), children: /* @__PURE__ */ e(s, { className: "pt-6", children: /* @__PURE__ */ r("div", { className: "flex items-start space-x-3", children: [
63
+ /* @__PURE__ */ e(k, { className: "h-6 w-6 text-green-600 mt-0.5" }),
65
64
  /* @__PURE__ */ r("div", { children: [
66
65
  /* @__PURE__ */ e("h3", { className: "font-semibold text-green-900", children: "Order Confirmed!" }),
67
66
  /* @__PURE__ */ e("p", { className: "text-green-700 mt-1", children: "Thank you for confirming your order. We will contact you soon to arrange delivery." })
68
67
  ] })
69
68
  ] }) }) }),
70
- !p && t.confirmationMessage && /* @__PURE__ */ e(s, { className: c(n), children: /* @__PURE__ */ e(i, { className: "pt-6", children: /* @__PURE__ */ e("p", { children: t.confirmationMessage }) }) }),
71
- t.canConfirm && !p && /* @__PURE__ */ e(s, { className: n, children: /* @__PURE__ */ r(i, { className: "pt-6", children: [
69
+ !p && a.confirmationMessage && /* @__PURE__ */ e(i, { className: c(n), children: /* @__PURE__ */ e(s, { className: "pt-6", children: /* @__PURE__ */ e("p", { children: a.confirmationMessage }) }) }),
70
+ a.canConfirm && !p && /* @__PURE__ */ e(i, { className: n, children: /* @__PURE__ */ r(s, { className: "pt-6", children: [
72
71
  /* @__PURE__ */ e(
73
- S,
72
+ E,
74
73
  {
75
- onClick: () => d.mutate({ orderId: N, token: x }),
74
+ onClick: () => d.mutate({ orderId: f, token: N }),
76
75
  disabled: d.isPending,
77
- className: c("w-full", P),
76
+ className: c("w-full", g),
78
77
  size: "lg",
79
- children: d.isPending ? /* @__PURE__ */ r(T, { children: [
80
- /* @__PURE__ */ e(b, { className: "mr-2 h-5 w-5 animate-spin" }),
78
+ children: d.isPending ? /* @__PURE__ */ r(D, { children: [
79
+ /* @__PURE__ */ e(v, { className: "mr-2 h-5 w-5 animate-spin" }),
81
80
  "Confirming..."
82
81
  ] }) : "Confirm Order"
83
82
  }
84
83
  ),
85
84
  d.isError && /* @__PURE__ */ e("p", { className: "text-red-600 text-sm mt-2 text-center", children: "Failed to confirm order. Please try again or contact support." })
86
85
  ] }) }),
87
- /* @__PURE__ */ r(s, { className: n, children: [
86
+ /* @__PURE__ */ r(i, { className: n, children: [
88
87
  /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(o, { children: "Order Details" }) }),
89
- /* @__PURE__ */ e(i, { className: "space-y-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-4", children: [
88
+ /* @__PURE__ */ e(s, { className: "space-y-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-4", children: [
90
89
  /* @__PURE__ */ r("div", { children: [
91
90
  /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: "Status" }),
92
- /* @__PURE__ */ e(v, { className: "mt-1", children: t.status })
91
+ /* @__PURE__ */ e(y, { className: "mt-1", children: a.status })
93
92
  ] }),
94
93
  /* @__PURE__ */ r("div", { children: [
95
94
  /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: "Order Date" }),
96
- /* @__PURE__ */ e("p", { className: "font-medium", children: t.createdAt ? k(t.createdAt) : "N/A" })
95
+ /* @__PURE__ */ e("p", { className: "font-medium", children: a.createdAt ? L(a.createdAt) : "N/A" })
97
96
  ] }),
98
97
  /* @__PURE__ */ r("div", { children: [
99
98
  /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: "Payment Method" }),
100
- /* @__PURE__ */ e("p", { className: "font-medium", children: t.paymentMethod === "cod" ? "Cash on Delivery" : "Online Payment" })
99
+ /* @__PURE__ */ e("p", { className: "font-medium", children: a.paymentMethod === "cod" ? "Cash on Delivery" : "Online Payment" })
101
100
  ] }),
102
101
  /* @__PURE__ */ r("div", { children: [
103
102
  /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: "Estimated Delivery" }),
104
- /* @__PURE__ */ e("p", { className: "font-medium", children: t.estimatedDays ? `${t.estimatedDays} days` : "TBD" })
103
+ /* @__PURE__ */ e("p", { className: "font-medium", children: a.estimatedDays ? `${a.estimatedDays} days` : "TBD" })
105
104
  ] })
106
105
  ] }) })
107
106
  ] }),
108
- /* @__PURE__ */ r(s, { className: n, children: [
107
+ /* @__PURE__ */ r(i, { className: n, children: [
109
108
  /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(o, { children: "Delivery Information" }) }),
110
- /* @__PURE__ */ r(i, { className: "space-y-3", children: [
109
+ /* @__PURE__ */ r(s, { className: "space-y-3", children: [
111
110
  /* @__PURE__ */ r("div", { children: [
112
111
  /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: "Customer" }),
113
112
  /* @__PURE__ */ r("p", { className: "font-medium", children: [
114
- t.firstName,
113
+ a.firstName,
115
114
  " ",
116
- t.lastName
115
+ a.lastName
117
116
  ] }),
118
- /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: t.phone })
117
+ /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: a.phone })
119
118
  ] }),
120
119
  /* @__PURE__ */ r("div", { children: [
121
120
  /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: "Address" }),
122
- /* @__PURE__ */ e("p", { className: "font-medium", children: t.address }),
121
+ /* @__PURE__ */ e("p", { className: "font-medium", children: a.address }),
123
122
  /* @__PURE__ */ r("p", { className: "text-sm opacity-70", children: [
124
- t.city,
123
+ a.city,
125
124
  ", ",
126
- t.deliveryZone.state.name
125
+ a.deliveryZone.state.name
127
126
  ] }),
128
- /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: t.deliveryZone.name })
127
+ /* @__PURE__ */ e("p", { className: "text-sm opacity-70", children: a.deliveryZone.name })
129
128
  ] })
130
129
  ] })
131
130
  ] }),
132
- /* @__PURE__ */ r(s, { className: n, children: [
131
+ /* @__PURE__ */ r(i, { className: n, children: [
133
132
  /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(o, { children: "Items" }) }),
134
- /* @__PURE__ */ r(i, { children: [
135
- /* @__PURE__ */ e("div", { className: "space-y-4", children: (y = t.items) == null ? void 0 : y.map((a) => /* @__PURE__ */ r("div", { className: "flex items-start justify-between border-b pb-4 last:border-0", children: [
133
+ /* @__PURE__ */ r(s, { children: [
134
+ /* @__PURE__ */ e("div", { className: "space-y-4", children: (x = a.items) == null ? void 0 : x.map((t) => /* @__PURE__ */ r("div", { className: "flex items-start justify-between border-b pb-4 last:border-0", children: [
136
135
  /* @__PURE__ */ r("div", { className: "flex items-start space-x-4 flex-1", children: [
137
- (a.variant.thumbnailUrl || a.variant.product.thumbnailUrl) && /* @__PURE__ */ e(
136
+ (t.variant.thumbnailUrl || t.variant.product.thumbnailUrl) && /* @__PURE__ */ e(
138
137
  "img",
139
138
  {
140
- src: a.variant.thumbnailUrl || a.variant.product.thumbnailUrl || void 0,
141
- alt: a.variant.product.name,
139
+ src: t.variant.thumbnailUrl || t.variant.product.thumbnailUrl || void 0,
140
+ alt: t.variant.product.name,
142
141
  className: "w-16 h-16 object-cover rounded"
143
142
  }
144
143
  ),
145
144
  /* @__PURE__ */ r("div", { className: "flex-1", children: [
146
- /* @__PURE__ */ e("p", { className: "font-medium", children: a.variant.product.name }),
147
- a.variant.name && /* @__PURE__ */ e(v, { variant: "outline", className: "mt-1", children: a.variant.name }),
145
+ /* @__PURE__ */ e("p", { className: "font-medium", children: t.variant.product.name }),
146
+ t.variant.name && /* @__PURE__ */ e(y, { variant: "outline", className: "mt-1", children: t.variant.name }),
148
147
  /* @__PURE__ */ r("p", { className: "text-sm opacity-70 mt-1", children: [
149
148
  "Quantity: ",
150
- a.quantity
149
+ t.quantity
151
150
  ] }),
152
151
  /* @__PURE__ */ r("p", { className: "text-sm opacity-70", children: [
153
152
  "SKU: ",
154
- a.variant.sku
153
+ t.variant.sku
155
154
  ] })
156
155
  ] })
157
156
  ] }),
158
157
  /* @__PURE__ */ r("div", { className: "text-right", children: [
159
- /* @__PURE__ */ e("p", { className: "font-medium", children: l(a.priceAtPurchase * a.quantity) }),
158
+ /* @__PURE__ */ e("p", { className: "font-medium", children: l(t.priceAtPurchase * t.quantity) }),
160
159
  /* @__PURE__ */ r("p", { className: "text-sm opacity-70", children: [
161
- l(a.priceAtPurchase),
160
+ l(t.priceAtPurchase),
162
161
  " each"
163
162
  ] })
164
163
  ] })
165
- ] }, a.id)) }),
164
+ ] }, t.id)) }),
166
165
  /* @__PURE__ */ r("div", { className: "mt-6 border-t pt-4 space-y-2", children: [
167
166
  /* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
168
167
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Subtotal" }),
169
- /* @__PURE__ */ e("span", { className: "font-medium", children: l(t.subtotal) })
168
+ /* @__PURE__ */ e("span", { className: "font-medium", children: l(a.subtotal) })
170
169
  ] }),
171
- t.discountAmount && t.discountAmount > 0 && /* @__PURE__ */ r("div", { className: "flex justify-between text-sm text-green-600", children: [
170
+ a.discountAmount && a.discountAmount > 0 && /* @__PURE__ */ r("div", { className: "flex justify-between text-sm text-green-600", children: [
172
171
  /* @__PURE__ */ e("span", { children: "Discount" }),
173
172
  /* @__PURE__ */ r("span", { children: [
174
173
  "-",
175
- l(t.discountAmount)
174
+ l(a.discountAmount)
176
175
  ] })
177
176
  ] }),
178
177
  /* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
179
178
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Delivery Charge" }),
180
- /* @__PURE__ */ e("span", { className: "font-medium", children: l(t.deliveryCharge) })
179
+ /* @__PURE__ */ e("span", { className: "font-medium", children: l(a.deliveryCharge) })
181
180
  ] }),
182
181
  /* @__PURE__ */ r("div", { className: "flex justify-between text-lg font-bold border-t pt-2", children: [
183
182
  /* @__PURE__ */ e("span", { children: "Total" }),
184
- /* @__PURE__ */ e("span", { children: l(t.totalPrice) })
183
+ /* @__PURE__ */ e("span", { children: l(a.totalPrice) })
185
184
  ] })
186
185
  ] })
187
186
  ] })
188
187
  ] }),
189
- /* @__PURE__ */ e(s, { className: n, children: /* @__PURE__ */ e(i, { className: "pt-6", children: /* @__PURE__ */ r("p", { className: "text-sm opacity-70 text-center", children: [
188
+ /* @__PURE__ */ e(i, { className: n, children: /* @__PURE__ */ e(s, { className: "pt-6", children: /* @__PURE__ */ r("p", { className: "text-sm opacity-70 text-center", children: [
190
189
  "Need help with your order? Call us on ",
191
- C,
190
+ P,
192
191
  " or contact us on",
193
192
  " ",
194
- /* @__PURE__ */ e("a", { href: A, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:underline", children: "WhatsApp" })
193
+ /* @__PURE__ */ e("a", { href: w, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:underline", children: "WhatsApp" })
195
194
  ] }) }) })
196
195
  ] }) });
197
196
  }
198
197
  export {
199
- X as OrderConfirmation
198
+ G as OrderConfirmation
200
199
  };
package/dist/index80.mjs CHANGED
@@ -1,26 +1,5 @@
1
1
  'use client';
2
- import "react";
3
- function i(n, o) {
4
- if (typeof n == "function")
5
- return n(o);
6
- n != null && (n.current = o);
7
- }
8
- function f(...n) {
9
- return (o) => {
10
- let u = !1;
11
- const c = n.map((t) => {
12
- const e = i(t, o);
13
- return !u && typeof e == "function" && (u = !0), e;
14
- });
15
- if (u)
16
- return () => {
17
- for (let t = 0; t < c.length; t++) {
18
- const e = c[t];
19
- typeof e == "function" ? e() : i(n[t], null);
20
- }
21
- };
22
- };
23
- }
2
+ var e = { exports: {} };
24
3
  export {
25
- f as composeRefs
4
+ e as __module
26
5
  };
package/dist/index81.mjs CHANGED
@@ -1,27 +1,156 @@
1
1
  'use client';
2
- function n(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
5
- function c(e) {
6
- if (e.__esModule) return e;
7
- var o = e.default;
8
- if (typeof o == "function") {
9
- var t = function r() {
10
- return this instanceof r ? Reflect.construct(o, arguments, this.constructor) : o.apply(this, arguments);
11
- };
12
- t.prototype = o.prototype;
13
- } else t = {};
14
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
15
- var u = Object.getOwnPropertyDescriptor(e, r);
16
- Object.defineProperty(t, r, u.get ? u : {
17
- enumerable: !0,
18
- get: function() {
19
- return e[r];
2
+ import { __module as l } from "./index87.mjs";
3
+ import "./index88.mjs";
4
+ import j from "react";
5
+ import { __require as A } from "./index89.mjs";
6
+ import { __require as O } from "./index90.mjs";
7
+ import { __require as x } from "./index91.mjs";
8
+ import { __require as F } from "./index92.mjs";
9
+ import { __exports as M } from "./index93.mjs";
10
+ var p;
11
+ function W() {
12
+ return p ? l.exports : (p = 1, function(g, u) {
13
+ Object.defineProperty(u, "__esModule", {
14
+ value: !0
15
+ });
16
+ function _(e, o) {
17
+ for (var t in o) Object.defineProperty(e, t, {
18
+ enumerable: !0,
19
+ get: o[t]
20
+ });
21
+ }
22
+ _(u, {
23
+ Router: function() {
24
+ return i.default;
25
+ },
26
+ createRouter: function() {
27
+ return P;
28
+ },
29
+ // Export the singletonRouter and this is the public API.
30
+ default: function() {
31
+ return v;
32
+ },
33
+ makePublicRouterInstance: function() {
34
+ return E;
35
+ },
36
+ useRouter: function() {
37
+ return q;
38
+ },
39
+ withRouter: function() {
40
+ return w.default;
41
+ }
42
+ });
43
+ const f = M, R = /* @__PURE__ */ f._(j), i = /* @__PURE__ */ f._(A()), b = O(), y = /* @__PURE__ */ f._(x()), w = /* @__PURE__ */ f._(F()), n = {
44
+ router: null,
45
+ readyCallbacks: [],
46
+ ready(e) {
47
+ if (this.router) return e();
48
+ typeof window < "u" && this.readyCallbacks.push(e);
20
49
  }
50
+ }, d = [
51
+ "pathname",
52
+ "route",
53
+ "query",
54
+ "asPath",
55
+ "components",
56
+ "isFallback",
57
+ "basePath",
58
+ "locale",
59
+ "locales",
60
+ "defaultLocale",
61
+ "isReady",
62
+ "isPreview",
63
+ "isLocaleDomain",
64
+ "domainLocales"
65
+ ], C = [
66
+ "routeChangeStart",
67
+ "beforeHistoryChange",
68
+ "routeChangeComplete",
69
+ "routeChangeError",
70
+ "hashChangeStart",
71
+ "hashChangeComplete"
72
+ ], h = [
73
+ "push",
74
+ "replace",
75
+ "reload",
76
+ "back",
77
+ "prefetch",
78
+ "beforePopState"
79
+ ];
80
+ Object.defineProperty(n, "events", {
81
+ get() {
82
+ return i.default.events;
83
+ }
84
+ });
85
+ function m() {
86
+ if (!n.router) {
87
+ const e = `No router instance found.
88
+ You should only use "next/router" on the client side of your app.
89
+ `;
90
+ throw new Error(e);
91
+ }
92
+ return n.router;
93
+ }
94
+ d.forEach((e) => {
95
+ Object.defineProperty(n, e, {
96
+ get() {
97
+ return m()[e];
98
+ }
99
+ });
100
+ }), h.forEach((e) => {
101
+ n[e] = function() {
102
+ for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
103
+ t[r] = arguments[r];
104
+ return m()[e](...t);
105
+ };
106
+ }), C.forEach((e) => {
107
+ n.ready(() => {
108
+ i.default.events.on(e, function() {
109
+ for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
110
+ t[r] = arguments[r];
111
+ const s = "on" + e.charAt(0).toUpperCase() + e.substring(1), c = n;
112
+ if (c[s])
113
+ try {
114
+ c[s](...t);
115
+ } catch (a) {
116
+ console.error("Error when running the Router event: " + s), console.error((0, y.default)(a) ? a.message + `
117
+ ` + a.stack : a + "");
118
+ }
119
+ });
120
+ });
21
121
  });
22
- }), t;
122
+ const v = n;
123
+ function q() {
124
+ const e = R.default.useContext(b.RouterContext);
125
+ if (!e)
126
+ throw new Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");
127
+ return e;
128
+ }
129
+ function P() {
130
+ for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
131
+ o[t] = arguments[t];
132
+ return n.router = new i.default(...o), n.readyCallbacks.forEach((r) => r()), n.readyCallbacks = [], n.router;
133
+ }
134
+ function E(e) {
135
+ const o = e, t = {};
136
+ for (const r of d) {
137
+ if (typeof o[r] == "object") {
138
+ t[r] = Object.assign(Array.isArray(o[r]) ? [] : {}, o[r]);
139
+ continue;
140
+ }
141
+ t[r] = o[r];
142
+ }
143
+ return t.events = i.default.events, h.forEach((r) => {
144
+ t[r] = function() {
145
+ for (var s = arguments.length, c = new Array(s), a = 0; a < s; a++)
146
+ c[a] = arguments[a];
147
+ return o[r](...c);
148
+ };
149
+ }), t;
150
+ }
151
+ (typeof u.default == "function" || typeof u.default == "object" && u.default !== null) && typeof u.default.__esModule > "u" && (Object.defineProperty(u.default, "__esModule", { value: !0 }), Object.assign(u.default, u), g.exports = u.default);
152
+ }(l, l.exports), l.exports);
23
153
  }
24
154
  export {
25
- c as getAugmentedNamespace,
26
- n as getDefaultExportFromCjs
155
+ W as __require
27
156
  };