@instockng/storefront-ui 1.0.72 → 1.0.74
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/ShoppingCart.d.ts.map +1 -1
- package/dist/index.mjs +64 -62
- package/dist/index100.mjs +68 -178
- package/dist/index101.mjs +31 -50
- package/dist/index102.mjs +43 -69
- package/dist/index104.mjs +1 -1
- package/dist/index105.mjs +1 -1
- package/dist/index106.mjs +8 -8
- package/dist/index107.mjs +6 -6
- package/dist/index108.mjs +3 -3
- package/dist/index109.mjs +1 -1
- package/dist/index110.mjs +1 -1
- package/dist/index111.mjs +1 -1
- package/dist/index112.mjs +2 -2
- package/dist/index113.mjs +2 -2
- package/dist/index114.mjs +3 -3
- package/dist/index115.mjs +1 -1
- package/dist/index116.mjs +3 -3
- package/dist/index117.mjs +2 -2
- package/dist/index118.mjs +2 -2
- package/dist/index119.mjs +1 -1
- package/dist/index120.mjs +3 -3
- package/dist/index121.mjs +1 -1
- package/dist/index122.mjs +1 -1
- package/dist/index123.mjs +3 -3
- package/dist/index124.mjs +2 -2
- package/dist/index125.mjs +4 -4
- package/dist/index126.mjs +1 -1
- package/dist/index127.mjs +3 -3
- package/dist/index128.mjs +4 -4
- package/dist/index129.mjs +1 -1
- package/dist/index13.mjs +103 -82
- package/dist/index130.mjs +1 -1
- package/dist/index131.mjs +1 -1
- package/dist/index132.mjs +1 -1
- package/dist/index133.mjs +1 -1
- package/dist/index134.mjs +1 -1
- package/dist/index135.mjs +1 -1
- package/dist/index136.mjs +2 -2
- package/dist/index137.mjs +3 -3
- package/dist/index140.mjs +1 -1
- package/dist/index142.mjs +2 -2
- package/dist/index143.mjs +2 -2
- package/dist/index144.mjs +1 -1
- package/dist/index145.mjs +6 -6
- package/dist/index146.mjs +2 -2
- package/dist/index147.mjs +2 -2
- package/dist/index149.mjs +2 -2
- package/dist/index15.mjs +26 -31
- package/dist/index150.mjs +2 -2
- package/dist/index151.mjs +1 -1
- package/dist/index153.mjs +8 -8
- package/dist/index154.mjs +8 -8
- package/dist/index155.mjs +2 -2
- package/dist/index157.mjs +2 -2
- package/dist/index158.mjs +2 -18
- package/dist/index159.mjs +11 -25
- package/dist/index160.mjs +26 -32
- package/dist/index161.mjs +32 -12
- package/dist/index162.mjs +9 -9
- package/dist/index163.mjs +18 -2
- package/dist/index164.mjs +2 -20
- package/dist/index165.mjs +13 -39
- package/dist/index166.mjs +46 -2
- package/dist/index167.mjs +2 -30
- package/dist/index168.mjs +24 -12
- package/dist/index169.mjs +18 -2
- package/dist/index170.mjs +2 -2
- package/dist/index171.mjs +2 -2
- package/dist/index172.mjs +2 -2
- package/dist/index173.mjs +2 -72
- package/dist/index174.mjs +72 -2
- package/dist/index175.mjs +2 -53
- package/dist/index176.mjs +53 -2
- package/dist/index177.mjs +2 -36
- package/dist/index178.mjs +30 -146
- package/dist/index179.mjs +152 -2
- package/dist/index180.mjs +2 -2
- package/dist/index181.mjs +2 -19
- package/dist/index182.mjs +19 -2
- package/dist/index183.mjs +2 -2
- package/dist/index184.mjs +2 -26
- package/dist/index185.mjs +26 -2
- package/dist/index186.mjs +2 -2
- package/dist/index187.mjs +2 -24
- package/dist/index188.mjs +17 -16
- package/dist/index189.mjs +23 -2
- package/dist/index191.mjs +2 -2
- package/dist/index192.mjs +2 -23
- package/dist/index193.mjs +23 -2
- package/dist/index194.mjs +2 -23
- package/dist/index195.mjs +23 -2
- package/dist/index196.mjs +2 -2
- package/dist/index198.mjs +2 -23
- package/dist/index199.mjs +23 -2
- package/dist/index200.mjs +2 -23
- package/dist/index201.mjs +23 -2
- package/dist/index202.mjs +2 -2
- package/dist/index203.mjs +2 -2
- package/dist/index205.mjs +2 -2
- package/dist/index206.mjs +2 -2
- package/dist/index207.mjs +2 -2
- package/dist/index208.mjs +2 -2
- package/dist/index209.mjs +2 -127
- package/dist/index210.mjs +127 -2
- package/dist/index211.mjs +2 -74
- package/dist/index212.mjs +60 -60
- package/dist/index213.mjs +74 -2
- package/dist/index214.mjs +2 -2
- package/dist/index215.mjs +2 -2
- package/dist/index216.mjs +2 -2
- package/dist/index217.mjs +2 -2
- package/dist/index218.mjs +108 -2
- package/dist/index219.mjs +2 -2
- package/dist/index220.mjs +2 -2
- package/dist/index221.mjs +25 -96
- package/dist/index222.mjs +2 -2
- package/dist/index223.mjs +2 -2
- package/dist/index224.mjs +2 -37
- package/dist/index225.mjs +2 -2
- package/dist/index226.mjs +2 -2
- package/dist/index227.mjs +2 -244
- package/dist/index228.mjs +2 -2
- package/dist/index229.mjs +243 -32
- package/dist/index230.mjs +2 -65
- package/dist/index231.mjs +24 -16
- package/dist/index232.mjs +65 -2
- package/dist/index233.mjs +25 -2
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +2 -2
- package/dist/index237.mjs +2 -2
- package/dist/index240.mjs +2 -31
- package/dist/index241.mjs +2 -11
- package/dist/index242.mjs +2 -4
- package/dist/index243.mjs +2 -4
- package/dist/index244.mjs +4 -13
- package/dist/index245.mjs +31 -7
- package/dist/index246.mjs +10 -11
- package/dist/index247.mjs +3 -4
- package/dist/index248.mjs +4 -33
- package/dist/index249.mjs +12 -30
- package/dist/index250.mjs +7 -28
- package/dist/index251.mjs +12 -61
- package/dist/index252.mjs +5 -2
- package/dist/index253.mjs +33 -4
- package/dist/index254.mjs +31 -2
- package/dist/index255.mjs +28 -2
- package/dist/index256.mjs +61 -2
- package/dist/index257.mjs +2 -2
- package/dist/index258.mjs +2 -18
- package/dist/index259.mjs +13 -42
- package/dist/index26.mjs +2 -1
- package/dist/index260.mjs +47 -2
- package/dist/index261.mjs +2 -2
- package/dist/index262.mjs +2 -2
- package/dist/index263.mjs +2 -2
- package/dist/index264.mjs +2 -91
- package/dist/index265.mjs +91 -2
- package/dist/index266.mjs +1 -2
- package/dist/index267.mjs +3 -2
- package/dist/index268.mjs +2 -2
- package/dist/index269.mjs +2 -17
- package/dist/index27.mjs +20 -10
- package/dist/index270.mjs +15 -11
- package/dist/index271.mjs +13 -6
- package/dist/index272.mjs +6 -30
- package/dist/index273.mjs +30 -2
- package/dist/index275.mjs +2 -2
- package/dist/index276.mjs +5 -0
- package/dist/index32.mjs +8 -1
- package/dist/index33.mjs +17 -16
- package/dist/index34.mjs +44 -35
- package/dist/index35.mjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index37.mjs +25 -17
- package/dist/index38.mjs +1 -1
- package/dist/index39.mjs +1 -1
- package/dist/index40.mjs +1 -1
- package/dist/index42.mjs +2 -2
- package/dist/index45.mjs +3 -3
- package/dist/index49.mjs +1 -1
- package/dist/index54.mjs +17 -17
- package/dist/index55.mjs +2 -2
- 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/index60.mjs +1 -1
- package/dist/index61.mjs +1 -1
- package/dist/index62.mjs +1 -1
- package/dist/index63.mjs +1 -1
- package/dist/index64.mjs +54 -54
- package/dist/index65.mjs +1 -1
- package/dist/index66.mjs +1 -1
- package/dist/index67.mjs +1 -1
- package/dist/index68.mjs +133 -22
- package/dist/index69.mjs +21 -150
- package/dist/index71.mjs +149 -19
- package/dist/index72.mjs +21 -73
- package/dist/index73.mjs +5 -15
- package/dist/index74.mjs +68 -56
- package/dist/index75.mjs +15 -5
- package/dist/index76.mjs +63 -2
- package/dist/index77.mjs +2 -6
- package/dist/index78.mjs +5 -1133
- package/dist/index79.mjs +1130 -16
- package/dist/index80.mjs +16 -51
- package/dist/index81.mjs +49 -27
- package/dist/index82.mjs +33 -2
- package/dist/index83.mjs +2 -2
- package/dist/index84.mjs +231 -30
- package/dist/index85.mjs +5 -42
- package/dist/index86.mjs +127 -228
- package/dist/index87.mjs +66 -4
- package/dist/index88.mjs +77 -124
- package/dist/index89.mjs +26 -65
- package/dist/index90.mjs +6 -84
- package/dist/index91.mjs +72 -26
- package/dist/index92.mjs +3 -8
- package/dist/index93.mjs +2 -75
- package/dist/index94.mjs +82 -3
- package/dist/index95.mjs +54 -2
- package/dist/index96.mjs +5 -82
- package/dist/index97.mjs +4 -53
- package/dist/index98.mjs +178 -5
- package/dist/index99.mjs +53 -5
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/src/components/Checkout.tsx +2 -2
- package/src/components/ShoppingCart.tsx +36 -0
package/dist/index106.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as m } from "./
|
|
3
|
-
import "./
|
|
4
|
-
import { __require as j } from "./
|
|
5
|
-
import { __require as V } from "./
|
|
6
|
-
import { __require as k } from "./
|
|
7
|
-
import { __require as G } from "./
|
|
8
|
-
import { __require as W } from "./
|
|
9
|
-
import { __exports as X } from "./
|
|
2
|
+
import { __module as m } from "./index158.mjs";
|
|
3
|
+
import "./index78.mjs";
|
|
4
|
+
import { __require as j } from "./index159.mjs";
|
|
5
|
+
import { __require as V } from "./index160.mjs";
|
|
6
|
+
import { __require as k } from "./index161.mjs";
|
|
7
|
+
import { __require as G } from "./index162.mjs";
|
|
8
|
+
import { __require as W } from "./index163.mjs";
|
|
9
|
+
import { __exports as X } from "./index83.mjs";
|
|
10
10
|
var M;
|
|
11
11
|
function ee() {
|
|
12
12
|
return M ? m.exports : (M = 1, function(N, c) {
|
package/dist/index107.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as L } from "./
|
|
3
|
-
import "./
|
|
2
|
+
import { __module as L } from "./index164.mjs";
|
|
3
|
+
import "./index78.mjs";
|
|
4
4
|
import { __require as K } from "./index104.mjs";
|
|
5
5
|
import F from "react/jsx-runtime";
|
|
6
6
|
import J from "react-dom";
|
|
7
7
|
import N from "react";
|
|
8
|
-
import { __require as B } from "./
|
|
9
|
-
import { __require as D } from "./
|
|
10
|
-
import { __require as G } from "./
|
|
11
|
-
import { __exports as Q } from "./
|
|
8
|
+
import { __require as B } from "./index165.mjs";
|
|
9
|
+
import { __require as D } from "./index166.mjs";
|
|
10
|
+
import { __require as G } from "./index161.mjs";
|
|
11
|
+
import { __exports as Q } from "./index83.mjs";
|
|
12
12
|
var w;
|
|
13
13
|
function ie() {
|
|
14
14
|
return w ? L.exports : (w = 1, function(x, o) {
|
package/dist/index108.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 "./index167.mjs";
|
|
3
|
+
import { __require as m } from "./index168.mjs";
|
|
4
|
+
import { __require as l } from "./index169.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function p() {
|
|
7
7
|
return i ? r : (i = 1, function(t) {
|
package/dist/index109.mjs
CHANGED
package/dist/index110.mjs
CHANGED
package/dist/index111.mjs
CHANGED
package/dist/index112.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 "./index173.mjs";
|
|
3
|
+
import { __require as c } from "./index174.mjs";
|
|
4
4
|
var i;
|
|
5
5
|
function p() {
|
|
6
6
|
return i ? t : (i = 1, function(r) {
|
package/dist/index113.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as i } from "./
|
|
2
|
+
import { __exports as i } from "./index175.mjs";
|
|
3
3
|
import { __require as U } from "./index111.mjs";
|
|
4
|
-
import { __require as _ } from "./
|
|
4
|
+
import { __require as _ } from "./index176.mjs";
|
|
5
5
|
var s;
|
|
6
6
|
function q() {
|
|
7
7
|
return s ? i : (s = 1, function(n) {
|
package/dist/index114.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 "./index177.mjs";
|
|
3
|
+
import { __require as z } from "./index178.mjs";
|
|
4
|
+
import { __require as A } from "./index179.mjs";
|
|
5
5
|
import { __require as F } from "./index105.mjs";
|
|
6
6
|
import { __require as O } from "./index109.mjs";
|
|
7
7
|
import { __require as U } from "./index122.mjs";
|
package/dist/index115.mjs
CHANGED
package/dist/index116.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as p } from "./
|
|
2
|
+
import { __exports as p } from "./index181.mjs";
|
|
3
3
|
import { __require as I } from "./index135.mjs";
|
|
4
|
-
import { __require as q } from "./
|
|
5
|
-
import { __require as v } from "./
|
|
4
|
+
import { __require as q } from "./index174.mjs";
|
|
5
|
+
import { __require as v } from "./index182.mjs";
|
|
6
6
|
import { __require as O } from "./index105.mjs";
|
|
7
7
|
var N;
|
|
8
8
|
function w() {
|
package/dist/index117.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as c } from "./
|
|
2
|
+
import { __exports as c } from "./index183.mjs";
|
|
3
3
|
import { __require as y } from "./index104.mjs";
|
|
4
|
-
import { __require as U } from "./
|
|
4
|
+
import { __require as U } from "./index176.mjs";
|
|
5
5
|
var l;
|
|
6
6
|
function x() {
|
|
7
7
|
return l ? c : (l = 1, function(h) {
|
package/dist/index118.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 "./index184.mjs";
|
|
3
|
+
import { __require as c } from "./index185.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function d() {
|
|
6
6
|
return a ? u.exports : (a = 1, function(o, e) {
|
package/dist/index119.mjs
CHANGED
package/dist/index120.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 "./index187.mjs";
|
|
3
|
+
import { __require as f } from "./index188.mjs";
|
|
4
|
+
import { __require as c } from "./index189.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function g() {
|
|
7
7
|
return i ? a.exports : (i = 1, function(o, e) {
|
package/dist/index121.mjs
CHANGED
package/dist/index122.mjs
CHANGED
package/dist/index123.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 "./index192.mjs";
|
|
3
|
+
import { __require as _ } from "./index193.mjs";
|
|
4
|
+
import { __require as l } from "./index188.mjs";
|
|
5
5
|
var t;
|
|
6
6
|
function h() {
|
|
7
7
|
return t ? a.exports : (t = 1, function(u, e) {
|
package/dist/index124.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 "./index194.mjs";
|
|
3
|
+
import { __require as s } from "./index195.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function _() {
|
|
6
6
|
return a ? t.exports : (a = 1, function(u, e) {
|
package/dist/index125.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 "./index196.mjs";
|
|
3
|
+
import { __require as H } from "./index176.mjs";
|
|
4
4
|
import { __require as L } from "./index117.mjs";
|
|
5
5
|
import { __require as j } from "./index132.mjs";
|
|
6
6
|
import { __require as O } from "./index111.mjs";
|
|
7
|
-
import { __require as S } from "./
|
|
7
|
+
import { __require as S } from "./index188.mjs";
|
|
8
8
|
import { __require as w } from "./index130.mjs";
|
|
9
|
-
import { __require as M } from "./
|
|
9
|
+
import { __require as M } from "./index168.mjs";
|
|
10
10
|
import { __require as A } from "./index133.mjs";
|
|
11
11
|
var p;
|
|
12
12
|
function $() {
|
package/dist/index126.mjs
CHANGED
package/dist/index127.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as l } from "./
|
|
2
|
+
import { __exports as l } from "./index198.mjs";
|
|
3
3
|
import { __require as _ } from "./index109.mjs";
|
|
4
|
-
import { __require as v } from "./
|
|
5
|
-
import { __require as q } from "./
|
|
4
|
+
import { __require as v } from "./index199.mjs";
|
|
5
|
+
import { __require as q } from "./index195.mjs";
|
|
6
6
|
var s;
|
|
7
7
|
function N() {
|
|
8
8
|
return s ? l : (s = 1, function(h) {
|
package/dist/index128.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as r } from "./
|
|
2
|
+
import { __exports as r } from "./index200.mjs";
|
|
3
3
|
import { __require as m } from "./index105.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 "./index193.mjs";
|
|
5
|
+
import { __require as h } from "./index201.mjs";
|
|
6
|
+
import { __require as s } from "./index189.mjs";
|
|
7
7
|
var n;
|
|
8
8
|
function q() {
|
|
9
9
|
return n ? r : (n = 1, function(t) {
|
package/dist/index129.mjs
CHANGED
package/dist/index13.mjs
CHANGED
|
@@ -1,152 +1,173 @@
|
|
|
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 { DiscountCodeInput as
|
|
7
|
-
import { Checkout as
|
|
8
|
-
import { RecommendedProducts as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { X as
|
|
11
|
-
import { cn as
|
|
12
|
-
import { useHideBodyOverflow as
|
|
13
|
-
function
|
|
14
|
-
isOpen:
|
|
15
|
-
onClose:
|
|
16
|
-
onCheckout:
|
|
17
|
-
onContinueShopping:
|
|
18
|
-
onPurchaseSuccess:
|
|
19
|
-
className:
|
|
20
|
-
showDiscountCode:
|
|
21
|
-
showContinueShopping:
|
|
22
|
-
checkoutButtonText:
|
|
23
|
-
continueShoppingText:
|
|
24
|
-
checkoutButtonClassName:
|
|
25
|
-
continueShoppingButtonClassName:
|
|
26
|
-
disableCheckout:
|
|
27
|
-
emptyMessage:
|
|
2
|
+
import { jsxs as a, Fragment as k, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as X, useEffect as Z } from "react";
|
|
4
|
+
import { useCart as $ } from "./index3.mjs";
|
|
5
|
+
import { CartItem as A } from "./index12.mjs";
|
|
6
|
+
import { DiscountCodeInput as G } from "./index14.mjs";
|
|
7
|
+
import { Checkout as J } from "./index15.mjs";
|
|
8
|
+
import { RecommendedProducts as K } from "./index11.mjs";
|
|
9
|
+
import { Button as j } from "./index16.mjs";
|
|
10
|
+
import { X as O, Loader2 as Q, Package as p } from "lucide-react";
|
|
11
|
+
import { cn as c, formatCurrency as d } from "./index22.mjs";
|
|
12
|
+
import { useHideBodyOverflow as S } from "./index44.mjs";
|
|
13
|
+
function ne({
|
|
14
|
+
isOpen: s,
|
|
15
|
+
onClose: i,
|
|
16
|
+
onCheckout: m,
|
|
17
|
+
onContinueShopping: h,
|
|
18
|
+
onPurchaseSuccess: f,
|
|
19
|
+
className: C,
|
|
20
|
+
showDiscountCode: E = !0,
|
|
21
|
+
showContinueShopping: R = !0,
|
|
22
|
+
checkoutButtonText: F = "Complete Purchase",
|
|
23
|
+
continueShoppingText: I = "Continue Shopping",
|
|
24
|
+
checkoutButtonClassName: L,
|
|
25
|
+
continueShoppingButtonClassName: z,
|
|
26
|
+
disableCheckout: Y = !1,
|
|
27
|
+
emptyMessage: B = "Your cart is empty"
|
|
28
28
|
}) {
|
|
29
|
-
var x,
|
|
30
|
-
const { cart: t, isLoading: l, error:
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
29
|
+
var x, y, N;
|
|
30
|
+
const { cart: t, isLoading: l, error: o, trackCheckoutInitiated: D } = $(), [M, u] = X(!1);
|
|
31
|
+
S(s), Z(() => {
|
|
32
|
+
const r = (n) => {
|
|
33
|
+
n.key === "Escape" && s && i();
|
|
34
34
|
};
|
|
35
|
-
return window.addEventListener("keydown",
|
|
36
|
-
}, [
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
35
|
+
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
36
|
+
}, [s, i]);
|
|
37
|
+
const q = ((x = t == null ? void 0 : t.pricing) == null ? void 0 : x.subtotal) || 0, g = ((y = t == null ? void 0 : t.pricing.discount) == null ? void 0 : y.amount) || 0, H = () => {
|
|
38
|
+
D(), u(!0), m == null || m();
|
|
39
|
+
}, P = () => {
|
|
40
|
+
h == null || h(), i();
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */ a(
|
|
42
|
+
return /* @__PURE__ */ a(k, { children: [
|
|
43
43
|
/* @__PURE__ */ e(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
|
-
className:
|
|
46
|
+
className: c(
|
|
47
47
|
"fixed inset-0 z-40 bg-black/50 transition-opacity duration-300",
|
|
48
|
-
|
|
48
|
+
s ? "opacity-100" : "pointer-events-none opacity-0"
|
|
49
49
|
),
|
|
50
|
-
onClick:
|
|
50
|
+
onClick: i,
|
|
51
51
|
"aria-hidden": "true"
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
54
|
/* @__PURE__ */ e(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
|
-
className:
|
|
57
|
+
className: c(
|
|
58
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]",
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
s ? "translate-x-0" : "translate-x-full",
|
|
60
|
+
C
|
|
61
61
|
),
|
|
62
62
|
children: /* @__PURE__ */ a("div", { className: "flex h-full flex-col", children: [
|
|
63
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: [
|
|
64
64
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", 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: (
|
|
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: (N = t == null ? void 0 : t.items) == null ? void 0 : N.length }),
|
|
66
66
|
/* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Your Cart" })
|
|
67
67
|
] }),
|
|
68
68
|
/* @__PURE__ */ e(
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
|
-
onClick:
|
|
71
|
+
onClick: i,
|
|
72
72
|
className: "rounded-full p-2 transition-colors hover:bg-gray-100",
|
|
73
73
|
"aria-label": "Close cart",
|
|
74
|
-
children: /* @__PURE__ */ e(
|
|
74
|
+
children: /* @__PURE__ */ e(O, { className: "h-6 w-6" })
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
] }) }),
|
|
78
|
+
!l && !o && t && t.items && t.items.length > 0 && /* @__PURE__ */ e("div", { className: "bg-gray-50 px-4 py-3 border-b border-gray-200", children: (() => {
|
|
79
|
+
var w;
|
|
80
|
+
const n = ((w = t.pricing) == null ? void 0 : w.subtotal) || 0, b = Math.max(0, 2e4 - n), T = Math.min(100, n / 2e4 * 100), v = b <= 0;
|
|
81
|
+
return /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
82
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-center", children: v ? /* @__PURE__ */ e("span", { className: "text-green-600", children: "You've unlocked FREE delivery! 🎉" }) : /* @__PURE__ */ a("span", { children: [
|
|
83
|
+
"You're ",
|
|
84
|
+
/* @__PURE__ */ e("span", { className: "text-red-500", children: d(b) }),
|
|
85
|
+
" away from FREE delivery"
|
|
86
|
+
] }) }),
|
|
87
|
+
/* @__PURE__ */ e("div", { className: "h-2 w-full bg-gray-200 rounded-full overflow-hidden", children: /* @__PURE__ */ e(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: c(
|
|
91
|
+
"h-full transition-all duration-500 ease-out",
|
|
92
|
+
v ? "bg-green-500" : "bg-red-500"
|
|
93
|
+
),
|
|
94
|
+
style: { width: `${T}%` }
|
|
95
|
+
}
|
|
96
|
+
) })
|
|
97
|
+
] });
|
|
98
|
+
})() }),
|
|
78
99
|
l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
79
|
-
/* @__PURE__ */ e(
|
|
100
|
+
/* @__PURE__ */ e(Q, { className: "mx-auto mb-4 h-12 w-12 animate-spin text-accent-500" }),
|
|
80
101
|
/* @__PURE__ */ e("p", { className: "text-gray-600", children: "Loading cart..." })
|
|
81
102
|
] }) }),
|
|
82
|
-
|
|
83
|
-
/* @__PURE__ */ e(
|
|
103
|
+
o && !l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
104
|
+
/* @__PURE__ */ e(p, { className: "mx-auto mb-4 h-12 w-12 text-red-600" }),
|
|
84
105
|
/* @__PURE__ */ e("p", { className: "text-red-600", children: "Failed to load cart. Please try again." })
|
|
85
106
|
] }) }),
|
|
86
|
-
!l && !
|
|
87
|
-
/* @__PURE__ */ e(
|
|
88
|
-
/* @__PURE__ */ e("p", { className: "text-gray-600", children:
|
|
107
|
+
!l && !o && (!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: [
|
|
108
|
+
/* @__PURE__ */ e(p, { className: "mx-auto mb-4 h-12 w-12 text-gray-400" }),
|
|
109
|
+
/* @__PURE__ */ e("p", { className: "text-gray-600", children: B })
|
|
89
110
|
] }) }),
|
|
90
|
-
!l && !
|
|
111
|
+
!l && !o && t && t.items && t.items.length > 0 && /* @__PURE__ */ a(k, { children: [
|
|
91
112
|
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto", children: [
|
|
92
|
-
/* @__PURE__ */ e("div", { className: "space-y-4 p-4", children: t.items.map((
|
|
113
|
+
/* @__PURE__ */ e("div", { className: "space-y-4 p-4", children: t.items.map((r, n) => /* @__PURE__ */ a("div", { children: [
|
|
93
114
|
/* @__PURE__ */ e(
|
|
94
|
-
|
|
115
|
+
A,
|
|
95
116
|
{
|
|
96
|
-
item:
|
|
117
|
+
item: r
|
|
97
118
|
}
|
|
98
119
|
),
|
|
99
120
|
/* @__PURE__ */ e("hr", { className: "border-gray-200 mt-2" })
|
|
100
|
-
] },
|
|
101
|
-
|
|
121
|
+
] }, r.id)) }),
|
|
122
|
+
E && /* @__PURE__ */ e("div", { className: "px-4 pb-4", children: /* @__PURE__ */ e(G, {}) })
|
|
102
123
|
] }),
|
|
103
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(K, { limit: 6, className: "border-t border-gray-200" }),
|
|
104
125
|
/* @__PURE__ */ a("div", { className: "border-t border-gray-300 bg-white", children: [
|
|
105
126
|
/* @__PURE__ */ a("div", { className: " text-base", children: [
|
|
106
127
|
/* @__PURE__ */ a("div", { className: "px-4 py-2 space-y-2", children: [
|
|
107
128
|
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
108
129
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Subtotal" }),
|
|
109
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children:
|
|
130
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: d(q) })
|
|
110
131
|
] }),
|
|
111
|
-
|
|
132
|
+
g > 0 && /* @__PURE__ */ a("div", { className: "flex justify-between text-green-600", children: [
|
|
112
133
|
/* @__PURE__ */ e("span", { children: "Discount" }),
|
|
113
134
|
/* @__PURE__ */ a("span", { className: "font-semibold", children: [
|
|
114
135
|
"-",
|
|
115
|
-
|
|
136
|
+
d(g)
|
|
116
137
|
] })
|
|
117
138
|
] }),
|
|
118
139
|
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
119
140
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Shipping" }),
|
|
120
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: t.pricing && t.deliveryZone ?
|
|
141
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: t.pricing && t.deliveryZone ? d(t.pricing.deliveryCharge) : "-" })
|
|
121
142
|
] })
|
|
122
143
|
] }),
|
|
123
144
|
/* @__PURE__ */ a("div", { className: "flex justify-between p-4 border-t border-gray-300 text-lg", children: [
|
|
124
145
|
/* @__PURE__ */ e("span", { className: "font-bold", children: "Total" }),
|
|
125
|
-
/* @__PURE__ */ e("span", { className: "font-bold", children:
|
|
146
|
+
/* @__PURE__ */ e("span", { className: "font-bold", children: d(t.pricing.total) })
|
|
126
147
|
] })
|
|
127
148
|
] }),
|
|
128
149
|
/* @__PURE__ */ a("div", { className: "px-4 py-2 space-y-2 pt-0", children: [
|
|
129
150
|
/* @__PURE__ */ a(
|
|
130
|
-
|
|
151
|
+
j,
|
|
131
152
|
{
|
|
132
|
-
onClick:
|
|
133
|
-
disabled:
|
|
134
|
-
className:
|
|
153
|
+
onClick: H,
|
|
154
|
+
disabled: Y || t.items.length === 0,
|
|
155
|
+
className: c("w-full bg-accent-500 text-white hover:bg-accent-600", L),
|
|
135
156
|
size: "lg",
|
|
136
157
|
children: [
|
|
137
|
-
/* @__PURE__ */ e(
|
|
138
|
-
|
|
158
|
+
/* @__PURE__ */ e(p, { className: "h-5 w-5" }),
|
|
159
|
+
F
|
|
139
160
|
]
|
|
140
161
|
}
|
|
141
162
|
),
|
|
142
|
-
|
|
143
|
-
|
|
163
|
+
R && /* @__PURE__ */ e(
|
|
164
|
+
j,
|
|
144
165
|
{
|
|
145
|
-
onClick:
|
|
166
|
+
onClick: P,
|
|
146
167
|
variant: "outline",
|
|
147
|
-
className:
|
|
168
|
+
className: c("w-full border-gray-300 text-gray-600 hover:bg-gray-100", z),
|
|
148
169
|
size: "lg",
|
|
149
|
-
children:
|
|
170
|
+
children: I
|
|
150
171
|
}
|
|
151
172
|
)
|
|
152
173
|
] })
|
|
@@ -156,13 +177,13 @@ function ie({
|
|
|
156
177
|
}
|
|
157
178
|
),
|
|
158
179
|
/* @__PURE__ */ e(
|
|
159
|
-
|
|
180
|
+
J,
|
|
160
181
|
{
|
|
161
|
-
isOpen:
|
|
162
|
-
onSuccess: (
|
|
163
|
-
|
|
182
|
+
isOpen: M,
|
|
183
|
+
onSuccess: (r) => {
|
|
184
|
+
f == null || f(r), i();
|
|
164
185
|
},
|
|
165
|
-
onClose: () =>
|
|
186
|
+
onClose: () => u(!1),
|
|
166
187
|
refundPolicy: {
|
|
167
188
|
title: "🤔 Curious about Refunds?",
|
|
168
189
|
policies: [
|
|
@@ -178,5 +199,5 @@ function ie({
|
|
|
178
199
|
] });
|
|
179
200
|
}
|
|
180
201
|
export {
|
|
181
|
-
|
|
202
|
+
ne as ShoppingCart
|
|
182
203
|
};
|
package/dist/index130.mjs
CHANGED
package/dist/index131.mjs
CHANGED
package/dist/index132.mjs
CHANGED
package/dist/index133.mjs
CHANGED
package/dist/index134.mjs
CHANGED
package/dist/index135.mjs
CHANGED
package/dist/index136.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 "./index209.mjs";
|
|
3
|
+
import { __require as c } from "./index210.mjs";
|
|
4
4
|
var u;
|
|
5
5
|
function y() {
|
|
6
6
|
return u ? n : (u = 1, function(a) {
|
package/dist/index137.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 "./index211.mjs";
|
|
3
|
+
import { __require as o } from "./index212.mjs";
|
|
4
|
+
import { __require as t } from "./index213.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);
|