@instockng/storefront-ui 1.0.26 → 1.0.28
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/CartItem.d.ts +0 -5
- package/dist/components/CartItem.d.ts.map +1 -1
- package/dist/components/DiscountCodeInput.d.ts +0 -6
- package/dist/components/DiscountCodeInput.d.ts.map +1 -1
- package/dist/components/ProductCard.d.ts +0 -6
- package/dist/components/ProductCard.d.ts.map +1 -1
- package/dist/components/ShoppingCart.d.ts +3 -1
- package/dist/components/ShoppingCart.d.ts.map +1 -1
- package/dist/index10.mjs +39 -38
- package/dist/index100.mjs +3 -3
- package/dist/index101.mjs +1 -1
- package/dist/index102.mjs +1 -1
- package/dist/index103.mjs +1 -1
- package/dist/index104.mjs +2 -2
- package/dist/index105.mjs +2 -2
- package/dist/index106.mjs +3 -3
- package/dist/index107.mjs +1 -1
- package/dist/index108.mjs +3 -3
- package/dist/index109.mjs +2 -2
- package/dist/index110.mjs +2 -2
- package/dist/index111.mjs +1 -1
- package/dist/index112.mjs +3 -3
- package/dist/index113.mjs +1 -1
- package/dist/index114.mjs +1 -1
- package/dist/index115.mjs +3 -3
- package/dist/index116.mjs +2 -2
- package/dist/index117.mjs +4 -4
- package/dist/index118.mjs +1 -1
- package/dist/index119.mjs +3 -3
- package/dist/index120.mjs +4 -4
- package/dist/index121.mjs +1 -1
- package/dist/index122.mjs +1 -1
- package/dist/index123.mjs +1 -1
- package/dist/index124.mjs +1 -1
- package/dist/index125.mjs +1 -1
- package/dist/index126.mjs +1 -1
- package/dist/index127.mjs +1 -1
- package/dist/index128.mjs +2 -2
- package/dist/index129.mjs +3 -3
- package/dist/index132.mjs +1 -1
- package/dist/index134.mjs +2 -21
- package/dist/index135.mjs +2 -56
- package/dist/index136.mjs +2 -29
- package/dist/index137.mjs +2 -7
- package/dist/index138.mjs +16 -50
- package/dist/index139.mjs +32 -6
- package/dist/index140.mjs +37 -11
- package/dist/index141.mjs +18 -7
- package/dist/index142.mjs +18 -28
- package/dist/index143.mjs +2 -2
- package/dist/index144.mjs +20 -70
- package/dist/index145.mjs +42 -163
- package/dist/index147.mjs +30 -2
- package/dist/index148.mjs +18 -2
- package/dist/index149.mjs +2 -2
- package/dist/index150.mjs +2 -18
- package/dist/index151.mjs +2 -32
- package/dist/index152.mjs +2 -38
- package/dist/index153.mjs +67 -13
- package/dist/index154.mjs +2 -18
- package/dist/index155.mjs +53 -2
- package/dist/index156.mjs +2 -20
- package/dist/index157.mjs +29 -39
- package/dist/index158.mjs +152 -2
- package/dist/index159.mjs +2 -30
- package/dist/index160.mjs +2 -18
- package/dist/index161.mjs +19 -2
- package/dist/index162.mjs +2 -2
- package/dist/index163.mjs +2 -2
- package/dist/index164.mjs +26 -2
- package/dist/index165.mjs +2 -72
- package/dist/index166.mjs +2 -2
- package/dist/index167.mjs +20 -49
- package/dist/index168.mjs +23 -2
- package/dist/index169.mjs +2 -36
- package/dist/index170.mjs +2 -152
- package/dist/index171.mjs +2 -2
- package/dist/index172.mjs +23 -2
- package/dist/index173.mjs +2 -19
- package/dist/index174.mjs +23 -2
- package/dist/index176.mjs +2 -26
- package/dist/index177.mjs +2 -2
- package/dist/index178.mjs +23 -2
- package/dist/index179.mjs +2 -24
- package/dist/index180.mjs +15 -15
- package/dist/index181.mjs +2 -2
- package/dist/index182.mjs +2 -2
- package/dist/index183.mjs +2 -2
- package/dist/index184.mjs +2 -23
- package/dist/index185.mjs +2 -2
- package/dist/index186.mjs +2 -23
- package/dist/index187.mjs +2 -2
- package/dist/index188.mjs +2 -2
- package/dist/index189.mjs +127 -2
- package/dist/index190.mjs +2 -23
- package/dist/index191.mjs +74 -2
- package/dist/index192.mjs +71 -20
- package/dist/index193.mjs +21 -2
- package/dist/index194.mjs +56 -2
- package/dist/index195.mjs +29 -2
- package/dist/index196.mjs +7 -2
- package/dist/index197.mjs +52 -2
- package/dist/index198.mjs +6 -2
- package/dist/index199.mjs +12 -2
- package/dist/index200.mjs +7 -2
- package/dist/index201.mjs +28 -127
- package/dist/index202.mjs +2 -2
- package/dist/index203.mjs +69 -73
- package/dist/index204.mjs +164 -71
- package/dist/index205.mjs +2 -31
- package/dist/index206.mjs +2 -11
- package/dist/index207.mjs +2 -4
- package/dist/index208.mjs +2 -4
- package/dist/index209.mjs +2 -13
- package/dist/index210.mjs +2 -7
- package/dist/index211.mjs +37 -2
- package/dist/index212.mjs +2 -2
- package/dist/index213.mjs +2 -2
- package/dist/index214.mjs +2 -2
- package/dist/index215.mjs +2 -2
- package/dist/index216.mjs +244 -2
- package/dist/index218.mjs +33 -2
- package/dist/index219.mjs +56 -99
- package/dist/index220.mjs +25 -2
- package/dist/index221.mjs +2 -12
- package/dist/index222.mjs +2 -5
- package/dist/index223.mjs +108 -33
- package/dist/index224.mjs +2 -31
- package/dist/index225.mjs +2 -28
- package/dist/index226.mjs +2 -61
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +2 -2
- package/dist/index229.mjs +2 -37
- package/dist/index232.mjs +2 -244
- package/dist/index233.mjs +4 -2
- package/dist/index234.mjs +2 -33
- package/dist/index235.mjs +2 -65
- package/dist/index236.mjs +30 -24
- package/dist/index237.mjs +11 -2
- package/dist/index238.mjs +4 -2
- package/dist/index239.mjs +4 -2
- package/dist/index240.mjs +13 -2
- package/dist/index241.mjs +7 -2
- package/dist/index242.mjs +12 -2
- package/dist/index243.mjs +5 -2
- package/dist/index244.mjs +33 -2
- package/dist/index245.mjs +31 -4
- package/dist/index246.mjs +28 -2
- package/dist/index247.mjs +61 -2
- package/dist/index248.mjs +2 -2
- package/dist/index249.mjs +18 -2
- package/dist/index250.mjs +42 -13
- package/dist/index251.mjs +2 -47
- package/dist/index252.mjs +2 -2
- package/dist/index253.mjs +2 -2
- package/dist/index254.mjs +2 -2
- package/dist/index255.mjs +91 -2
- package/dist/index256.mjs +2 -91
- package/dist/index257.mjs +1 -2
- package/dist/index258.mjs +3 -2
- package/dist/index259.mjs +2 -2
- package/dist/index260.mjs +2 -2
- package/dist/index263.mjs +1 -1
- package/dist/index264.mjs +2 -2
- package/dist/index32.mjs +1 -1
- package/dist/index33.mjs +1 -1
- package/dist/index34.mjs +1 -1
- package/dist/index35.mjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index39.mjs +3 -3
- package/dist/index47.mjs +17 -17
- package/dist/index48.mjs +2 -2
- package/dist/index49.mjs +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.mjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.mjs +1 -1
- package/dist/index57.mjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index62.mjs +2 -5
- package/dist/index64.mjs +75 -2
- package/dist/index65.mjs +14 -74
- package/dist/index66.mjs +62 -14
- package/dist/index67.mjs +4 -62
- package/dist/index75.mjs +231 -30
- package/dist/index76.mjs +5 -42
- package/dist/index77.mjs +127 -228
- package/dist/index78.mjs +66 -4
- package/dist/index79.mjs +77 -124
- package/dist/index80.mjs +26 -65
- package/dist/index81.mjs +6 -84
- package/dist/index82.mjs +72 -26
- package/dist/index83.mjs +3 -8
- package/dist/index84.mjs +2 -75
- package/dist/index85.mjs +82 -3
- package/dist/index86.mjs +54 -2
- package/dist/index87.mjs +5 -82
- package/dist/index88.mjs +4 -53
- package/dist/index89.mjs +178 -5
- package/dist/index9.mjs +22 -22
- package/dist/index90.mjs +53 -5
- package/dist/index91.mjs +68 -178
- package/dist/index92.mjs +2 -53
- package/dist/index93.mjs +34 -69
- package/dist/index94.mjs +43 -2
- package/dist/index96.mjs +1 -1
- package/dist/index97.mjs +1 -1
- package/dist/index98.mjs +6 -6
- package/dist/index99.mjs +4 -4
- package/package.json +1 -1
- package/src/components/CartItem.tsx +6 -2
- package/src/components/DiscountCodeInput.tsx +2 -0
- package/src/components/ProductCard.tsx +2 -0
- package/src/components/ShoppingCart.tsx +5 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartItem.d.ts","sourceRoot":"","sources":["../../src/components/CartItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartItem.d.ts","sourceRoot":"","sources":["../../src/components/CartItem.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAItE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,QAAgB,GACjB,EAAE,aAAa,2CAsHf"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DiscountCodeInput Component
|
|
3
|
-
*
|
|
4
|
-
* Input field for applying/removing discount codes with validation feedback.
|
|
5
|
-
* Uses CartProvider for cart operations.
|
|
6
|
-
*/
|
|
7
1
|
export interface DiscountCodeInputProps {
|
|
8
2
|
/** Callback on successful apply/remove */
|
|
9
3
|
onSuccess?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscountCodeInput.d.ts","sourceRoot":"","sources":["../../src/components/DiscountCodeInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DiscountCodeInput.d.ts","sourceRoot":"","sources":["../../src/components/DiscountCodeInput.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,sBAAsB;IACrC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,SAAS,EACT,WAAmC,EACnC,cAAc,EACd,eAAe,GAChB,EAAE,sBAAsB,2CA+HxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../src/components/ProductCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../src/components/ProductCard.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,QAAQ,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oCAAoC;IACpC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,WAAW,EACX,SAAgB,EAChB,SAAS,EACT,cAAc,EACd,gBAAwB,EACxB,cAAsB,EACtB,OAAO,GACR,EAAE,gBAAgB,2CAsIlB"}
|
|
@@ -11,6 +11,8 @@ export interface ShoppingCartProps {
|
|
|
11
11
|
className?: string;
|
|
12
12
|
/** Show discount code input */
|
|
13
13
|
showDiscountCode?: boolean;
|
|
14
|
+
/** Show continue shopping button */
|
|
15
|
+
showContinueShopping?: boolean;
|
|
14
16
|
/** Checkout button text */
|
|
15
17
|
checkoutButtonText?: string;
|
|
16
18
|
/** Continue shopping button text */
|
|
@@ -24,5 +26,5 @@ export interface ShoppingCartProps {
|
|
|
24
26
|
/** Empty cart message */
|
|
25
27
|
emptyMessage?: string;
|
|
26
28
|
}
|
|
27
|
-
export declare function ShoppingCart({ isOpen, onClose, onCheckout, onContinueShopping, className, showDiscountCode, checkoutButtonText, continueShoppingText, checkoutButtonClassName, continueShoppingButtonClassName, disableCheckout, emptyMessage, }: ShoppingCartProps): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
28
30
|
//# sourceMappingURL=ShoppingCart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAkBA,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,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,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,SAAS,EACT,gBAAuB,EACvB,kBAAwC,EACxC,oBAA0C,EAC1C,uBAAuB,EACvB,+BAA+B,EAC/B,eAAuB,EACvB,YAAmC,GACpC,EAAE,iBAAiB,2CAyNnB"}
|
|
1
|
+
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAkBA,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,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,SAAS,EACT,gBAAuB,EACvB,oBAA2B,EAC3B,kBAAwC,EACxC,oBAA0C,EAC1C,uBAAuB,EACvB,+BAA+B,EAC/B,eAAuB,EACvB,YAAmC,GACpC,EAAE,iBAAiB,2CAyNnB"}
|
package/dist/index10.mjs
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs as a, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useCart as
|
|
5
|
-
import { CartItem as
|
|
6
|
-
import { DiscountCodeInput as
|
|
7
|
-
import { Checkout as
|
|
3
|
+
import { useState as q, useEffect as b } from "react";
|
|
4
|
+
import { useCart as B } from "./index3.mjs";
|
|
5
|
+
import { CartItem as T } from "./index9.mjs";
|
|
6
|
+
import { DiscountCodeInput as X } from "./index11.mjs";
|
|
7
|
+
import { Checkout as Z } from "./index12.mjs";
|
|
8
8
|
import { Button as v } from "./index13.mjs";
|
|
9
|
-
import { X as
|
|
9
|
+
import { X as A, Loader2 as G, Package as u } from "lucide-react";
|
|
10
10
|
import { cn as n, formatCurrency as c } from "./index19.mjs";
|
|
11
|
-
function
|
|
11
|
+
function $({
|
|
12
12
|
isOpen: s,
|
|
13
13
|
onClose: i,
|
|
14
14
|
onCheckout: d,
|
|
15
15
|
onContinueShopping: o,
|
|
16
16
|
className: w,
|
|
17
17
|
showDiscountCode: k = !0,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
showContinueShopping: j = !0,
|
|
19
|
+
checkoutButtonText: C = "Complete Purchase",
|
|
20
|
+
continueShoppingText: E = "Continue Shopping",
|
|
21
|
+
checkoutButtonClassName: I,
|
|
22
|
+
continueShoppingButtonClassName: L,
|
|
23
|
+
disableCheckout: z = !1,
|
|
24
|
+
emptyMessage: P = "Your cart is empty"
|
|
24
25
|
}) {
|
|
25
26
|
var g, x, y;
|
|
26
|
-
const { cart: t, isLoading: l, error: m, trackCheckoutInitiated:
|
|
27
|
+
const { cart: t, isLoading: l, error: m, trackCheckoutInitiated: R } = B(), [S, f] = q(!1);
|
|
27
28
|
b(() => (s ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
28
29
|
document.body.style.overflow = "";
|
|
29
30
|
}), [s]), b(() => {
|
|
@@ -32,9 +33,9 @@ function _({
|
|
|
32
33
|
};
|
|
33
34
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
34
35
|
}, [s, i]);
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
},
|
|
36
|
+
const D = ((g = t == null ? void 0 : t.pricing) == null ? void 0 : g.subtotal) || 0, p = ((x = t == null ? void 0 : t.pricing.discount) == null ? void 0 : x.amount) || 0, F = () => {
|
|
37
|
+
R(), f(!0), d == null || d();
|
|
38
|
+
}, Y = () => {
|
|
38
39
|
o == null || o(), i();
|
|
39
40
|
};
|
|
40
41
|
return /* @__PURE__ */ a(N, { children: [
|
|
@@ -69,41 +70,41 @@ function _({
|
|
|
69
70
|
onClick: i,
|
|
70
71
|
className: "rounded-full p-2 transition-colors hover:bg-gray-100",
|
|
71
72
|
"aria-label": "Close cart",
|
|
72
|
-
children: /* @__PURE__ */ e(
|
|
73
|
+
children: /* @__PURE__ */ e(A, { className: "h-6 w-6" })
|
|
73
74
|
}
|
|
74
75
|
)
|
|
75
76
|
] }) }),
|
|
76
77
|
l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
+
/* @__PURE__ */ e(G, { className: "mx-auto mb-4 h-12 w-12 animate-spin text-accent-500" }),
|
|
78
79
|
/* @__PURE__ */ e("p", { className: "text-gray-600", children: "Loading cart..." })
|
|
79
80
|
] }) }),
|
|
80
81
|
m && !l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
81
|
-
/* @__PURE__ */ e(
|
|
82
|
+
/* @__PURE__ */ e(u, { className: "mx-auto mb-4 h-12 w-12 text-red-600" }),
|
|
82
83
|
/* @__PURE__ */ e("p", { className: "text-red-600", children: "Failed to load cart. Please try again." })
|
|
83
84
|
] }) }),
|
|
84
85
|
!l && !m && (!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
|
-
/* @__PURE__ */ e(
|
|
86
|
-
/* @__PURE__ */ e("p", { className: "text-gray-600", children:
|
|
86
|
+
/* @__PURE__ */ e(u, { className: "mx-auto mb-4 h-12 w-12 text-gray-400" }),
|
|
87
|
+
/* @__PURE__ */ e("p", { className: "text-gray-600", children: P })
|
|
87
88
|
] }) }),
|
|
88
89
|
!l && !m && t && t.items && t.items.length > 0 && /* @__PURE__ */ a(N, { children: [
|
|
89
90
|
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto p-4", children: [
|
|
90
91
|
/* @__PURE__ */ e("div", { className: "space-y-4", children: t.items.map((r, h) => /* @__PURE__ */ a("div", { children: [
|
|
91
92
|
/* @__PURE__ */ e(
|
|
92
|
-
|
|
93
|
+
T,
|
|
93
94
|
{
|
|
94
95
|
item: r
|
|
95
96
|
}
|
|
96
97
|
),
|
|
97
98
|
h < t.items.length - 1 && /* @__PURE__ */ e("hr", { className: "border-gray-200 mt-2" })
|
|
98
99
|
] }, r.id)) }),
|
|
99
|
-
k && /* @__PURE__ */ e("div", { className: "mt-6", children: /* @__PURE__ */ e(
|
|
100
|
+
k && /* @__PURE__ */ e("div", { className: "mt-6", children: /* @__PURE__ */ e(X, {}) })
|
|
100
101
|
] }),
|
|
101
102
|
/* @__PURE__ */ a("div", { className: "border-t border-gray-300 bg-white", children: [
|
|
102
103
|
/* @__PURE__ */ a("div", { className: " text-base", children: [
|
|
103
104
|
/* @__PURE__ */ a("div", { className: "p-4 space-y-2", children: [
|
|
104
105
|
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
105
106
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Subtotal" }),
|
|
106
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: c(
|
|
107
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: c(D) })
|
|
107
108
|
] }),
|
|
108
109
|
p > 0 && /* @__PURE__ */ a("div", { className: "flex justify-between text-green-600", children: [
|
|
109
110
|
/* @__PURE__ */ e("span", { children: "Discount" }),
|
|
@@ -126,24 +127,24 @@ function _({
|
|
|
126
127
|
/* @__PURE__ */ a(
|
|
127
128
|
v,
|
|
128
129
|
{
|
|
129
|
-
onClick:
|
|
130
|
-
disabled:
|
|
131
|
-
className: n("w-full bg-accent-500 text-white hover:bg-accent-600",
|
|
130
|
+
onClick: F,
|
|
131
|
+
disabled: z || t.items.length === 0,
|
|
132
|
+
className: n("w-full bg-accent-500 text-white hover:bg-accent-600", I),
|
|
132
133
|
size: "lg",
|
|
133
134
|
children: [
|
|
134
|
-
/* @__PURE__ */ e(
|
|
135
|
-
|
|
135
|
+
/* @__PURE__ */ e(u, { className: "h-5 w-5" }),
|
|
136
|
+
C
|
|
136
137
|
]
|
|
137
138
|
}
|
|
138
139
|
),
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
+
j && /* @__PURE__ */ e(
|
|
140
141
|
v,
|
|
141
142
|
{
|
|
142
|
-
onClick:
|
|
143
|
+
onClick: Y,
|
|
143
144
|
variant: "outline",
|
|
144
|
-
className: n("w-full border-gray-300 text-gray-600 hover:bg-gray-100",
|
|
145
|
+
className: n("w-full border-gray-300 text-gray-600 hover:bg-gray-100", L),
|
|
145
146
|
size: "lg",
|
|
146
|
-
children:
|
|
147
|
+
children: E
|
|
147
148
|
}
|
|
148
149
|
)
|
|
149
150
|
] })
|
|
@@ -153,11 +154,11 @@ function _({
|
|
|
153
154
|
}
|
|
154
155
|
),
|
|
155
156
|
/* @__PURE__ */ e(
|
|
156
|
-
|
|
157
|
+
Z,
|
|
157
158
|
{
|
|
158
|
-
isOpen:
|
|
159
|
+
isOpen: S,
|
|
159
160
|
onSuccess: () => i(),
|
|
160
|
-
onClose: () =>
|
|
161
|
+
onClose: () => f(!1),
|
|
161
162
|
refundPolicy: {
|
|
162
163
|
title: "🤔 Curious about Refunds?",
|
|
163
164
|
policies: [
|
|
@@ -173,5 +174,5 @@ function _({
|
|
|
173
174
|
] });
|
|
174
175
|
}
|
|
175
176
|
export {
|
|
176
|
-
|
|
177
|
+
$ as ShoppingCart
|
|
177
178
|
};
|
package/dist/index100.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as r } from "./
|
|
3
|
-
import { __require as m } from "./
|
|
4
|
-
import { __require as l } from "./
|
|
2
|
+
import { __exports as r } from "./index146.mjs";
|
|
3
|
+
import { __require as m } from "./index147.mjs";
|
|
4
|
+
import { __require as l } from "./index148.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function p() {
|
|
7
7
|
return i ? r : (i = 1, function(t) {
|
package/dist/index101.mjs
CHANGED
package/dist/index102.mjs
CHANGED
package/dist/index103.mjs
CHANGED
package/dist/index104.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as t } from "./
|
|
3
|
-
import { __require as c } from "./
|
|
2
|
+
import { __exports as t } from "./index152.mjs";
|
|
3
|
+
import { __require as c } from "./index153.mjs";
|
|
4
4
|
var i;
|
|
5
5
|
function p() {
|
|
6
6
|
return i ? t : (i = 1, function(r) {
|
package/dist/index105.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as i } from "./
|
|
2
|
+
import { __exports as i } from "./index154.mjs";
|
|
3
3
|
import { __require as U } from "./index103.mjs";
|
|
4
|
-
import { __require as _ } from "./
|
|
4
|
+
import { __require as _ } from "./index155.mjs";
|
|
5
5
|
var s;
|
|
6
6
|
function q() {
|
|
7
7
|
return s ? i : (s = 1, function(n) {
|
package/dist/index106.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as f } from "./
|
|
3
|
-
import { __require as z } from "./
|
|
4
|
-
import { __require as A } from "./
|
|
2
|
+
import { __exports as f } from "./index156.mjs";
|
|
3
|
+
import { __require as z } from "./index157.mjs";
|
|
4
|
+
import { __require as A } from "./index158.mjs";
|
|
5
5
|
import { __require as F } from "./index97.mjs";
|
|
6
6
|
import { __require as O } from "./index101.mjs";
|
|
7
7
|
import { __require as U } from "./index114.mjs";
|
package/dist/index107.mjs
CHANGED
package/dist/index108.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as p } from "./
|
|
2
|
+
import { __exports as p } from "./index160.mjs";
|
|
3
3
|
import { __require as I } from "./index127.mjs";
|
|
4
|
-
import { __require as q } from "./
|
|
5
|
-
import { __require as v } from "./
|
|
4
|
+
import { __require as q } from "./index153.mjs";
|
|
5
|
+
import { __require as v } from "./index161.mjs";
|
|
6
6
|
import { __require as O } from "./index97.mjs";
|
|
7
7
|
var N;
|
|
8
8
|
function w() {
|
package/dist/index109.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as c } from "./
|
|
2
|
+
import { __exports as c } from "./index162.mjs";
|
|
3
3
|
import { __require as y } from "./index96.mjs";
|
|
4
|
-
import { __require as U } from "./
|
|
4
|
+
import { __require as U } from "./index155.mjs";
|
|
5
5
|
var l;
|
|
6
6
|
function x() {
|
|
7
7
|
return l ? c : (l = 1, function(h) {
|
package/dist/index110.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as u } from "./
|
|
3
|
-
import { __require as c } from "./
|
|
2
|
+
import { __module as u } from "./index163.mjs";
|
|
3
|
+
import { __require as c } from "./index164.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function d() {
|
|
6
6
|
return a ? u.exports : (a = 1, function(o, e) {
|
package/dist/index111.mjs
CHANGED
package/dist/index112.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as a } from "./
|
|
3
|
-
import { __require as f } from "./
|
|
4
|
-
import { __require as c } from "./
|
|
2
|
+
import { __module as a } from "./index166.mjs";
|
|
3
|
+
import { __require as f } from "./index167.mjs";
|
|
4
|
+
import { __require as c } from "./index168.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function g() {
|
|
7
7
|
return i ? a.exports : (i = 1, function(o, e) {
|
package/dist/index113.mjs
CHANGED
package/dist/index114.mjs
CHANGED
package/dist/index115.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as a } from "./
|
|
3
|
-
import { __require as _ } from "./
|
|
4
|
-
import { __require as l } from "./
|
|
2
|
+
import { __module as a } from "./index171.mjs";
|
|
3
|
+
import { __require as _ } from "./index172.mjs";
|
|
4
|
+
import { __require as l } from "./index167.mjs";
|
|
5
5
|
var t;
|
|
6
6
|
function h() {
|
|
7
7
|
return t ? a.exports : (t = 1, function(u, e) {
|
package/dist/index116.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as t } from "./
|
|
3
|
-
import { __require as s } from "./
|
|
2
|
+
import { __module as t } from "./index173.mjs";
|
|
3
|
+
import { __require as s } from "./index174.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function _() {
|
|
6
6
|
return a ? t.exports : (a = 1, function(u, e) {
|
package/dist/index117.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as n } from "./
|
|
3
|
-
import { __require as H } from "./
|
|
2
|
+
import { __module as n } from "./index175.mjs";
|
|
3
|
+
import { __require as H } from "./index155.mjs";
|
|
4
4
|
import { __require as L } from "./index109.mjs";
|
|
5
5
|
import { __require as j } from "./index124.mjs";
|
|
6
6
|
import { __require as O } from "./index103.mjs";
|
|
7
|
-
import { __require as S } from "./
|
|
7
|
+
import { __require as S } from "./index167.mjs";
|
|
8
8
|
import { __require as w } from "./index122.mjs";
|
|
9
|
-
import { __require as M } from "./
|
|
9
|
+
import { __require as M } from "./index147.mjs";
|
|
10
10
|
import { __require as A } from "./index125.mjs";
|
|
11
11
|
var p;
|
|
12
12
|
function $() {
|
package/dist/index118.mjs
CHANGED
package/dist/index119.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as l } from "./
|
|
2
|
+
import { __exports as l } from "./index177.mjs";
|
|
3
3
|
import { __require as _ } from "./index101.mjs";
|
|
4
|
-
import { __require as v } from "./
|
|
5
|
-
import { __require as q } from "./
|
|
4
|
+
import { __require as v } from "./index178.mjs";
|
|
5
|
+
import { __require as q } from "./index174.mjs";
|
|
6
6
|
var s;
|
|
7
7
|
function N() {
|
|
8
8
|
return s ? l : (s = 1, function(h) {
|
package/dist/index120.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as r } from "./
|
|
2
|
+
import { __exports as r } from "./index179.mjs";
|
|
3
3
|
import { __require as m } from "./index97.mjs";
|
|
4
|
-
import { __require as f } from "./
|
|
5
|
-
import { __require as h } from "./
|
|
6
|
-
import { __require as s } from "./
|
|
4
|
+
import { __require as f } from "./index172.mjs";
|
|
5
|
+
import { __require as h } from "./index180.mjs";
|
|
6
|
+
import { __require as s } from "./index168.mjs";
|
|
7
7
|
var n;
|
|
8
8
|
function q() {
|
|
9
9
|
return n ? r : (n = 1, function(t) {
|
package/dist/index121.mjs
CHANGED
package/dist/index122.mjs
CHANGED
package/dist/index123.mjs
CHANGED
package/dist/index124.mjs
CHANGED
package/dist/index125.mjs
CHANGED
package/dist/index126.mjs
CHANGED
package/dist/index127.mjs
CHANGED
package/dist/index128.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as n } from "./
|
|
3
|
-
import { __require as c } from "./
|
|
2
|
+
import { __exports as n } from "./index188.mjs";
|
|
3
|
+
import { __require as c } from "./index189.mjs";
|
|
4
4
|
var u;
|
|
5
5
|
function y() {
|
|
6
6
|
return u ? n : (u = 1, function(a) {
|
package/dist/index129.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as e } from "./
|
|
3
|
-
import { __require as o } from "./
|
|
4
|
-
import { __require as t } from "./
|
|
2
|
+
import { __module as e } from "./index190.mjs";
|
|
3
|
+
import { __require as o } from "./index191.mjs";
|
|
4
|
+
import { __require as t } from "./index192.mjs";
|
|
5
5
|
var r;
|
|
6
6
|
function p() {
|
|
7
7
|
return r ? e.exports : (r = 1, process.env.NODE_ENV === "production" ? e.exports = o() : e.exports = t(), e.exports);
|
package/dist/index132.mjs
CHANGED
package/dist/index134.mjs
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import d from "./index205.mjs";
|
|
4
|
-
function l(e) {
|
|
5
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
6
|
-
}
|
|
7
|
-
function m(e, c, i) {
|
|
8
|
-
if (!c)
|
|
9
|
-
return e;
|
|
10
|
-
const t = i && i.encode || l;
|
|
11
|
-
f.isFunction(i) && (i = {
|
|
12
|
-
serialize: i
|
|
13
|
-
});
|
|
14
|
-
const r = i && i.serialize;
|
|
15
|
-
let n;
|
|
16
|
-
if (r ? n = r(c, i) : n = f.isURLSearchParams(c) ? c.toString() : new d(c, i).toString(t), n) {
|
|
17
|
-
const a = e.indexOf("#");
|
|
18
|
-
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + n;
|
|
19
|
-
}
|
|
20
|
-
return e;
|
|
21
|
-
}
|
|
2
|
+
var a = {};
|
|
22
3
|
export {
|
|
23
|
-
|
|
4
|
+
a as __exports
|
|
24
5
|
};
|