@instockng/storefront-ui 1.0.53 → 1.0.54
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/dist/components/Checkout.d.ts +2 -1
- package/dist/components/Checkout.d.ts.map +1 -1
- package/dist/components/ShoppingCart.d.ts +4 -1
- package/dist/components/ShoppingCart.d.ts.map +1 -1
- package/dist/index103.mjs +2 -2
- package/dist/index104.mjs +2 -2
- package/dist/index11.mjs +74 -67
- package/dist/index13.mjs +2 -2
- package/dist/index139.mjs +1 -1
- package/dist/index140.mjs +1 -1
- package/dist/index141.mjs +5 -5
- package/dist/index143.mjs +2 -2
- package/dist/index145.mjs +2 -2
- package/dist/index147.mjs +1 -1
- package/dist/index149.mjs +4 -4
- package/dist/index150.mjs +3 -3
- package/dist/index161.mjs +3 -3
- package/dist/index162.mjs +1 -1
- package/dist/index164.mjs +2 -2
- package/dist/index165.mjs +1 -1
- package/dist/index170.mjs +2 -2
- package/dist/index172.mjs +1 -1
- package/dist/index174.mjs +2 -2
- package/dist/index175.mjs +5 -5
- package/dist/index178.mjs +1 -1
- package/dist/index181.mjs +1 -1
- package/dist/index184.mjs +1 -1
- package/dist/index185.mjs +1 -1
- package/dist/index189.mjs +1 -1
- package/dist/index191.mjs +1 -1
- package/dist/index195.mjs +1 -1
- package/dist/index197.mjs +1 -1
- package/dist/index210.mjs +1 -1
- package/dist/index211.mjs +3 -3
- package/dist/index216.mjs +1 -1
- package/dist/index218.mjs +1 -1
- package/dist/index219.mjs +3 -3
- package/dist/index220.mjs +3 -3
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +108 -2
- package/dist/index229.mjs +2 -2
- package/dist/index230.mjs +2 -108
- package/dist/index231.mjs +37 -2
- package/dist/index232.mjs +2 -2
- package/dist/index233.mjs +243 -36
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +33 -2
- package/dist/index236.mjs +61 -240
- package/dist/index237.mjs +25 -2
- package/dist/index238.mjs +2 -33
- package/dist/index239.mjs +2 -65
- package/dist/index240.mjs +2 -25
- package/dist/index241.mjs +2 -2
- package/dist/index243.mjs +2 -2
- package/dist/index244.mjs +2 -2
- package/dist/index245.mjs +2 -2
- package/dist/index246.mjs +2 -2
- package/dist/index247.mjs +2 -2
- package/dist/index248.mjs +2 -2
- package/dist/index250.mjs +1 -1
- package/dist/index259.mjs +1 -1
- package/dist/index261.mjs +2 -2
- package/dist/index262.mjs +2 -18
- package/dist/index263.mjs +13 -42
- package/dist/index264.mjs +47 -2
- package/dist/index38.mjs +1 -1
- package/dist/index40.mjs +2 -2
- package/dist/index47.mjs +1 -1
- package/dist/index52.mjs +17 -17
- package/dist/index53.mjs +2 -2
- package/dist/index66.mjs +20 -21
- package/dist/index67.mjs +21 -150
- package/dist/index69.mjs +149 -19
- package/dist/index72.mjs +1 -1
- package/dist/index73.mjs +231 -30
- package/dist/index74.mjs +5 -42
- package/dist/index75.mjs +134 -2
- package/dist/index76.mjs +67 -5
- package/dist/index77.mjs +80 -1127
- package/dist/index78.mjs +28 -19
- package/dist/index79.mjs +8 -54
- package/dist/index80.mjs +72 -30
- package/dist/index81.mjs +4 -2
- package/dist/index82.mjs +2 -235
- package/dist/index83.mjs +82 -5
- package/dist/index84.mjs +50 -130
- package/dist/index85.mjs +4 -66
- package/dist/index86.mjs +4 -86
- package/dist/index87.mjs +176 -26
- package/dist/index88.mjs +52 -8
- package/dist/index89.mjs +69 -75
- package/dist/index90.mjs +34 -4
- package/dist/index91.mjs +43 -2
- package/dist/index92.mjs +2 -83
- package/dist/index93.mjs +4 -52
- package/dist/index94.mjs +1133 -5
- package/dist/index95.mjs +19 -4
- package/dist/index96.mjs +47 -171
- package/dist/index97.mjs +32 -52
- package/dist/index98.mjs +2 -69
- package/package.json +1 -1
- package/src/components/Checkout.tsx +3 -3
- package/src/components/ShoppingCart.tsx +10 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Order } from '@instockng/api-client';
|
|
1
2
|
export type PaymentMethod = 'cod' | 'online';
|
|
2
3
|
export interface CheckoutFormData {
|
|
3
4
|
firstName: string;
|
|
@@ -19,7 +20,7 @@ export interface CheckoutProps {
|
|
|
19
20
|
/** Initial form data */
|
|
20
21
|
initialData?: Partial<CheckoutFormData>;
|
|
21
22
|
/** Callback on successful checkout */
|
|
22
|
-
onSuccess?: (
|
|
23
|
+
onSuccess?: (order: Order) => void;
|
|
23
24
|
/** Callback on error */
|
|
24
25
|
onError?: (error: Error) => void;
|
|
25
26
|
/** Submit button text */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkout.d.ts","sourceRoot":"","sources":["../../src/components/Checkout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkout.d.ts","sourceRoot":"","sources":["../../src/components/Checkout.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAoFnD,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;IAC5B,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACxC,sCAAsC;IACtC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACnC,wBAAwB;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,4BAA4B;IAC5B,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAID,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,OAAO,EACP,gBAAgC,EAChC,YAAY,GACb,EAAE,aAAa,2CA83Bf"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Order } from '@instockng/api-client';
|
|
1
2
|
export interface ShoppingCartProps {
|
|
2
3
|
/** Whether the cart is open */
|
|
3
4
|
isOpen: boolean;
|
|
@@ -7,6 +8,8 @@ export interface ShoppingCartProps {
|
|
|
7
8
|
onCheckout?: () => void;
|
|
8
9
|
/** Callback when continue shopping is clicked */
|
|
9
10
|
onContinueShopping?: () => void;
|
|
11
|
+
/** Callback when purchase is successfully completed */
|
|
12
|
+
onPurchaseSuccess?: (order: Order) => void;
|
|
10
13
|
/** Custom class name */
|
|
11
14
|
className?: string;
|
|
12
15
|
/** Show discount code input */
|
|
@@ -26,5 +29,5 @@ export interface ShoppingCartProps {
|
|
|
26
29
|
/** Empty cart message */
|
|
27
30
|
emptyMessage?: string;
|
|
28
31
|
}
|
|
29
|
-
export declare function ShoppingCart({ isOpen, onClose, onCheckout, onContinueShopping, className, showDiscountCode, showContinueShopping, checkoutButtonText, continueShoppingText, checkoutButtonClassName, continueShoppingButtonClassName, disableCheckout, emptyMessage, }: ShoppingCartProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function ShoppingCart({ isOpen, onClose, onCheckout, onContinueShopping, onPurchaseSuccess, className, showDiscountCode, showContinueShopping, checkoutButtonText, continueShoppingText, checkoutButtonClassName, continueShoppingButtonClassName, disableCheckout, emptyMessage, }: ShoppingCartProps): import("react/jsx-runtime").JSX.Element;
|
|
30
33
|
//# sourceMappingURL=ShoppingCart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAWnD,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3C,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gDAAgD;IAChD,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,uBAAuB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,gBAAuB,EACvB,oBAA2B,EAC3B,kBAAwC,EACxC,oBAA0C,EAC1C,uBAAuB,EACvB,+BAA+B,EAC/B,eAAuB,EACvB,YAAmC,GACpC,EAAE,iBAAiB,2CAoNnB"}
|
package/dist/index103.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __module as m } from "./index154.mjs";
|
|
3
|
-
import "./
|
|
3
|
+
import "./index93.mjs";
|
|
4
4
|
import { __require as j } from "./index155.mjs";
|
|
5
5
|
import { __require as V } from "./index156.mjs";
|
|
6
6
|
import { __require as k } from "./index157.mjs";
|
|
7
7
|
import { __require as G } from "./index158.mjs";
|
|
8
8
|
import { __require as W } from "./index159.mjs";
|
|
9
|
-
import { __exports as X } from "./
|
|
9
|
+
import { __exports as X } from "./index98.mjs";
|
|
10
10
|
var M;
|
|
11
11
|
function ee() {
|
|
12
12
|
return M ? m.exports : (M = 1, function(N, c) {
|
package/dist/index104.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { __module as L } from "./index160.mjs";
|
|
3
|
-
import "./
|
|
3
|
+
import "./index93.mjs";
|
|
4
4
|
import { __require as K } from "./index101.mjs";
|
|
5
5
|
import F from "react/jsx-runtime";
|
|
6
6
|
import J from "react-dom";
|
|
@@ -8,7 +8,7 @@ import N from "react";
|
|
|
8
8
|
import { __require as B } from "./index161.mjs";
|
|
9
9
|
import { __require as D } from "./index162.mjs";
|
|
10
10
|
import { __require as G } from "./index157.mjs";
|
|
11
|
-
import { __exports as Q } from "./
|
|
11
|
+
import { __exports as Q } from "./index98.mjs";
|
|
12
12
|
var w;
|
|
13
13
|
function ie() {
|
|
14
14
|
return w ? L.exports : (w = 1, function(x, o) {
|
package/dist/index11.mjs
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as a, Fragment as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useCart as
|
|
5
|
-
import { CartItem as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { jsxs as a, Fragment as b, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as H, useEffect as P } from "react";
|
|
4
|
+
import { useCart as T } from "./index3.mjs";
|
|
5
|
+
import { CartItem as X } from "./index10.mjs";
|
|
6
|
+
import { DiscountCodeInput as Z } from "./index12.mjs";
|
|
7
|
+
import { Checkout as A } from "./index13.mjs";
|
|
8
|
+
import { RecommendedProducts as G } from "./index41.mjs";
|
|
9
|
+
import { Button as v } from "./index14.mjs";
|
|
10
|
+
import { X as J, Loader2 as K, Package as h } from "lucide-react";
|
|
10
11
|
import { cn as n, formatCurrency as c } from "./index20.mjs";
|
|
11
|
-
import { useHideBodyOverflow as
|
|
12
|
-
function
|
|
13
|
-
isOpen:
|
|
12
|
+
import { useHideBodyOverflow as M } from "./index42.mjs";
|
|
13
|
+
function ie({
|
|
14
|
+
isOpen: r,
|
|
14
15
|
onClose: s,
|
|
15
16
|
onCheckout: d,
|
|
16
17
|
onContinueShopping: o,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
onPurchaseSuccess: m,
|
|
19
|
+
className: w,
|
|
20
|
+
showDiscountCode: k = !0,
|
|
21
|
+
showContinueShopping: j = !0,
|
|
22
|
+
checkoutButtonText: C = "Complete Purchase",
|
|
23
|
+
continueShoppingText: E = "Continue Shopping",
|
|
24
|
+
checkoutButtonClassName: I,
|
|
25
|
+
continueShoppingButtonClassName: L,
|
|
26
|
+
disableCheckout: z = !1,
|
|
27
|
+
emptyMessage: R = "Your cart is empty"
|
|
26
28
|
}) {
|
|
27
|
-
var
|
|
28
|
-
const { cart: t, isLoading: l, error:
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
29
|
+
var x, g, y;
|
|
30
|
+
const { cart: t, isLoading: l, error: f, trackCheckoutInitiated: B } = T(), [D, p] = H(!1);
|
|
31
|
+
M(r), P(() => {
|
|
32
|
+
const i = (N) => {
|
|
33
|
+
N.key === "Escape" && r && s();
|
|
32
34
|
};
|
|
33
|
-
return window.addEventListener("keydown",
|
|
34
|
-
}, [
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
},
|
|
35
|
+
return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
|
|
36
|
+
}, [r, s]);
|
|
37
|
+
const F = ((x = t == null ? void 0 : t.pricing) == null ? void 0 : x.subtotal) || 0, u = ((g = t == null ? void 0 : t.pricing.discount) == null ? void 0 : g.amount) || 0, Y = () => {
|
|
38
|
+
B(), p(!0), d == null || d();
|
|
39
|
+
}, q = () => {
|
|
38
40
|
o == null || o(), s();
|
|
39
41
|
};
|
|
40
|
-
return /* @__PURE__ */ a(
|
|
42
|
+
return /* @__PURE__ */ a(b, { children: [
|
|
41
43
|
/* @__PURE__ */ e(
|
|
42
44
|
"div",
|
|
43
45
|
{
|
|
44
46
|
className: n(
|
|
45
47
|
"fixed inset-0 z-40 bg-black/50 transition-opacity duration-300",
|
|
46
|
-
|
|
48
|
+
r ? "opacity-100" : "pointer-events-none opacity-0"
|
|
47
49
|
),
|
|
48
50
|
onClick: s,
|
|
49
51
|
"aria-hidden": "true"
|
|
@@ -54,13 +56,13 @@ function ee({
|
|
|
54
56
|
{
|
|
55
57
|
className: n(
|
|
56
58
|
"fixed right-0 top-0 z-50 h-full w-full bg-white shadow-2xl transition-transform duration-300 ease-in-out sm:w-[480px]",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
r ? "translate-x-0" : "translate-x-full",
|
|
60
|
+
w
|
|
59
61
|
),
|
|
60
62
|
children: /* @__PURE__ */ a("div", { className: "flex h-full flex-col", children: [
|
|
61
63
|
/* @__PURE__ */ e("div", { className: "border-b border-gray-300 px-4 py-2", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
62
64
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
63
|
-
/* @__PURE__ */ e("div", { className: "bg-accent-500 text-white px-2 py-1 rounded-full text-sm aspect-square flex items-center justify-center w-8 h-8", children: (
|
|
65
|
+
/* @__PURE__ */ e("div", { className: "bg-accent-500 text-white px-2 py-1 rounded-full text-sm aspect-square flex items-center justify-center w-8 h-8", children: (y = t == null ? void 0 : t.items) == null ? void 0 : y.length }),
|
|
64
66
|
/* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Your Cart" })
|
|
65
67
|
] }),
|
|
66
68
|
/* @__PURE__ */ e(
|
|
@@ -69,39 +71,42 @@ function ee({
|
|
|
69
71
|
onClick: s,
|
|
70
72
|
className: "rounded-full p-2 transition-colors hover:bg-gray-100",
|
|
71
73
|
"aria-label": "Close cart",
|
|
72
|
-
children: /* @__PURE__ */ e(
|
|
74
|
+
children: /* @__PURE__ */ e(J, { className: "h-6 w-6" })
|
|
73
75
|
}
|
|
74
76
|
)
|
|
75
77
|
] }) }),
|
|
76
78
|
l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
77
|
-
/* @__PURE__ */ e(
|
|
79
|
+
/* @__PURE__ */ e(K, { className: "mx-auto mb-4 h-12 w-12 animate-spin text-accent-500" }),
|
|
78
80
|
/* @__PURE__ */ e("p", { className: "text-gray-600", children: "Loading cart..." })
|
|
79
81
|
] }) }),
|
|
80
|
-
|
|
82
|
+
f && !l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
81
83
|
/* @__PURE__ */ e(h, { className: "mx-auto mb-4 h-12 w-12 text-red-600" }),
|
|
82
84
|
/* @__PURE__ */ e("p", { className: "text-red-600", children: "Failed to load cart. Please try again." })
|
|
83
85
|
] }) }),
|
|
84
|
-
!l && !
|
|
86
|
+
!l && !f && (!t || !t.items || t.items.length === 0) && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
85
87
|
/* @__PURE__ */ e(h, { className: "mx-auto mb-4 h-12 w-12 text-gray-400" }),
|
|
86
|
-
/* @__PURE__ */ e("p", { className: "text-gray-600", children:
|
|
88
|
+
/* @__PURE__ */ e("p", { className: "text-gray-600", children: R })
|
|
87
89
|
] }) }),
|
|
88
|
-
!l && !
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */ e(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
!l && !f && t && t.items && t.items.length > 0 && /* @__PURE__ */ a(b, { children: [
|
|
91
|
+
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto", children: [
|
|
92
|
+
/* @__PURE__ */ e("div", { className: "space-y-4 p-4", children: t.items.map((i, N) => /* @__PURE__ */ a("div", { children: [
|
|
93
|
+
/* @__PURE__ */ e(
|
|
94
|
+
X,
|
|
95
|
+
{
|
|
96
|
+
item: i
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ e("hr", { className: "border-gray-200 mt-2" })
|
|
100
|
+
] }, i.id)) }),
|
|
101
|
+
k && /* @__PURE__ */ e("div", { className: "px-4 pb-4", children: /* @__PURE__ */ e(Z, {}) })
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ e(G, { limit: 6, className: "border-t border-gray-200" }),
|
|
99
104
|
/* @__PURE__ */ a("div", { className: "border-t border-gray-300 bg-white", children: [
|
|
100
105
|
/* @__PURE__ */ a("div", { className: " text-base", children: [
|
|
101
106
|
/* @__PURE__ */ a("div", { className: "px-4 py-2 space-y-2", children: [
|
|
102
107
|
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
103
108
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Subtotal" }),
|
|
104
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: c(
|
|
109
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: c(F) })
|
|
105
110
|
] }),
|
|
106
111
|
u > 0 && /* @__PURE__ */ a("div", { className: "flex justify-between text-green-600", children: [
|
|
107
112
|
/* @__PURE__ */ e("span", { children: "Discount" }),
|
|
@@ -122,26 +127,26 @@ function ee({
|
|
|
122
127
|
] }),
|
|
123
128
|
/* @__PURE__ */ a("div", { className: "px-4 py-2 space-y-2 pt-0", children: [
|
|
124
129
|
/* @__PURE__ */ a(
|
|
125
|
-
|
|
130
|
+
v,
|
|
126
131
|
{
|
|
127
|
-
onClick:
|
|
128
|
-
disabled:
|
|
129
|
-
className: n("w-full bg-accent-500 text-white hover:bg-accent-600",
|
|
132
|
+
onClick: Y,
|
|
133
|
+
disabled: z || t.items.length === 0,
|
|
134
|
+
className: n("w-full bg-accent-500 text-white hover:bg-accent-600", I),
|
|
130
135
|
size: "lg",
|
|
131
136
|
children: [
|
|
132
137
|
/* @__PURE__ */ e(h, { className: "h-5 w-5" }),
|
|
133
|
-
|
|
138
|
+
C
|
|
134
139
|
]
|
|
135
140
|
}
|
|
136
141
|
),
|
|
137
|
-
|
|
138
|
-
|
|
142
|
+
j && /* @__PURE__ */ e(
|
|
143
|
+
v,
|
|
139
144
|
{
|
|
140
|
-
onClick:
|
|
145
|
+
onClick: q,
|
|
141
146
|
variant: "outline",
|
|
142
|
-
className: n("w-full border-gray-300 text-gray-600 hover:bg-gray-100",
|
|
147
|
+
className: n("w-full border-gray-300 text-gray-600 hover:bg-gray-100", L),
|
|
143
148
|
size: "lg",
|
|
144
|
-
children:
|
|
149
|
+
children: E
|
|
145
150
|
}
|
|
146
151
|
)
|
|
147
152
|
] })
|
|
@@ -151,11 +156,13 @@ function ee({
|
|
|
151
156
|
}
|
|
152
157
|
),
|
|
153
158
|
/* @__PURE__ */ e(
|
|
154
|
-
|
|
159
|
+
A,
|
|
155
160
|
{
|
|
156
|
-
isOpen:
|
|
157
|
-
onSuccess: () =>
|
|
158
|
-
|
|
161
|
+
isOpen: D,
|
|
162
|
+
onSuccess: (i) => {
|
|
163
|
+
m == null || m(i), s();
|
|
164
|
+
},
|
|
165
|
+
onClose: () => p(!1),
|
|
159
166
|
refundPolicy: {
|
|
160
167
|
title: "🤔 Curious about Refunds?",
|
|
161
168
|
policies: [
|
|
@@ -171,5 +178,5 @@ function ee({
|
|
|
171
178
|
] });
|
|
172
179
|
}
|
|
173
180
|
export {
|
|
174
|
-
|
|
181
|
+
ie as ShoppingCart
|
|
175
182
|
};
|
package/dist/index13.mjs
CHANGED
|
@@ -70,7 +70,7 @@ function ct({
|
|
|
70
70
|
o == null || o(new Error((H == null ? void 0 : H.message) || "Checkout failed"));
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
B(x), J(), N == null || N(x
|
|
73
|
+
B(x), J(), N == null || N(x);
|
|
74
74
|
} catch (n) {
|
|
75
75
|
o == null || o(n);
|
|
76
76
|
}
|
|
@@ -221,7 +221,7 @@ function ct({
|
|
|
221
221
|
o == null || o(new Error((x == null ? void 0 : x.message) || "Checkout failed"));
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
B(M), J(), N == null || N(M
|
|
224
|
+
B(M), J(), N == null || N(M);
|
|
225
225
|
} catch (t) {
|
|
226
226
|
o == null || o(t);
|
|
227
227
|
}
|
package/dist/index139.mjs
CHANGED
package/dist/index140.mjs
CHANGED
package/dist/index141.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import r from "./index211.mjs";
|
|
3
|
-
import p from "./
|
|
4
|
-
import l from "./
|
|
5
|
-
import m from "./
|
|
6
|
-
import a from "./
|
|
7
|
-
import o from "./
|
|
3
|
+
import p from "./index81.mjs";
|
|
4
|
+
import l from "./index77.mjs";
|
|
5
|
+
import m from "./index79.mjs";
|
|
6
|
+
import a from "./index87.mjs";
|
|
7
|
+
import o from "./index88.mjs";
|
|
8
8
|
function d(e) {
|
|
9
9
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
10
10
|
throw new m(null, e);
|
package/dist/index143.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { VERSION as w } from "./
|
|
3
|
-
import s from "./
|
|
2
|
+
import { VERSION as w } from "./index82.mjs";
|
|
3
|
+
import s from "./index84.mjs";
|
|
4
4
|
const l = {};
|
|
5
5
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, t) => {
|
|
6
6
|
l[n] = function(o) {
|
package/dist/index145.mjs
CHANGED
package/dist/index147.mjs
CHANGED
package/dist/index149.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import H from "./
|
|
2
|
+
import H from "./index73.mjs";
|
|
3
3
|
import D from "./index216.mjs";
|
|
4
4
|
import L from "./index144.mjs";
|
|
5
|
-
import n from "./
|
|
6
|
-
import y from "./
|
|
5
|
+
import n from "./index84.mjs";
|
|
6
|
+
import y from "./index79.mjs";
|
|
7
7
|
import O from "./index217.mjs";
|
|
8
8
|
import U from "./index146.mjs";
|
|
9
|
-
import q from "./
|
|
9
|
+
import q from "./index87.mjs";
|
|
10
10
|
import { progressEventReducer as A } from "./index218.mjs";
|
|
11
11
|
import v from "./index219.mjs";
|
|
12
12
|
const N = typeof XMLHttpRequest < "u", Q = N && function(s) {
|
package/dist/index150.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import K from "./index146.mjs";
|
|
3
|
-
import t from "./
|
|
4
|
-
import b from "./
|
|
3
|
+
import t from "./index73.mjs";
|
|
4
|
+
import b from "./index84.mjs";
|
|
5
5
|
import ee from "./index220.mjs";
|
|
6
6
|
import { trackStream as z } from "./index221.mjs";
|
|
7
|
-
import te from "./
|
|
7
|
+
import te from "./index87.mjs";
|
|
8
8
|
import { progressEventDecorator as I, progressEventReducer as M, asyncDecorator as j } from "./index218.mjs";
|
|
9
9
|
import se from "./index219.mjs";
|
|
10
10
|
import re from "./index216.mjs";
|
package/dist/index161.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as e } from "./
|
|
3
|
-
import "./
|
|
2
|
+
import { __exports as e } from "./index247.mjs";
|
|
3
|
+
import "./index93.mjs";
|
|
4
4
|
import n from "react";
|
|
5
|
-
import { __exports as o } from "./
|
|
5
|
+
import { __exports as o } from "./index98.mjs";
|
|
6
6
|
var a;
|
|
7
7
|
function c() {
|
|
8
8
|
return a ? e : (a = 1, function(t) {
|
package/dist/index162.mjs
CHANGED
package/dist/index164.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as e } from "./
|
|
3
|
-
import { __require as f } from "./
|
|
2
|
+
import { __exports as e } from "./index227.mjs";
|
|
3
|
+
import { __require as f } from "./index228.mjs";
|
|
4
4
|
import { __require as _ } from "./index109.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function R() {
|
package/dist/index165.mjs
CHANGED
package/dist/index170.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as u } from "./
|
|
3
|
-
import { __require as d } from "./
|
|
2
|
+
import { __exports as u } from "./index230.mjs";
|
|
3
|
+
import { __require as d } from "./index231.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function h() {
|
|
6
6
|
return a ? u : (a = 1, function(c) {
|
package/dist/index172.mjs
CHANGED
package/dist/index174.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as n } from "./
|
|
3
|
-
import { __require as d } from "./
|
|
2
|
+
import { __exports as n } from "./index232.mjs";
|
|
3
|
+
import { __require as d } from "./index233.mjs";
|
|
4
4
|
var o;
|
|
5
5
|
function p() {
|
|
6
6
|
return o ? n : (o = 1, function(i) {
|
package/dist/index175.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as A } from "./
|
|
3
|
-
import { __require as T } from "./
|
|
2
|
+
import { __exports as A } from "./index234.mjs";
|
|
3
|
+
import { __require as T } from "./index233.mjs";
|
|
4
4
|
import { __require as L } from "./index178.mjs";
|
|
5
|
-
import { __require as N } from "./
|
|
5
|
+
import { __require as N } from "./index235.mjs";
|
|
6
6
|
import { __require as U } from "./index170.mjs";
|
|
7
|
-
import { __require as j } from "./
|
|
8
|
-
import { __require as v } from "./
|
|
7
|
+
import { __require as j } from "./index236.mjs";
|
|
8
|
+
import { __require as v } from "./index237.mjs";
|
|
9
9
|
var S;
|
|
10
10
|
function W() {
|
|
11
11
|
return S ? A : (S = 1, function(R) {
|
package/dist/index178.mjs
CHANGED
package/dist/index181.mjs
CHANGED
package/dist/index184.mjs
CHANGED
package/dist/index185.mjs
CHANGED
package/dist/index189.mjs
CHANGED
package/dist/index191.mjs
CHANGED
package/dist/index195.mjs
CHANGED
package/dist/index197.mjs
CHANGED
package/dist/index210.mjs
CHANGED
package/dist/index211.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import i from "./
|
|
3
|
-
import m from "./
|
|
4
|
-
import s from "./
|
|
2
|
+
import i from "./index73.mjs";
|
|
3
|
+
import m from "./index77.mjs";
|
|
4
|
+
import s from "./index87.mjs";
|
|
5
5
|
function h(f, t) {
|
|
6
6
|
const o = this || m, r = t || o, n = s.from(r.headers);
|
|
7
7
|
let a = r.data;
|
package/dist/index216.mjs
CHANGED